diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java
index b118d40..eb6ded5 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java
@@ -12,15 +12,15 @@
 import static com.google.common.collect.Maps.newHashMap;
 import static java.util.Collections.*;
 
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
 
+import java.io.*;
+import java.net.URI;
+import java.util.*;
+
 /**
  * @author alruiz@google.com (Alex Ruiz)
  */
@@ -28,115 +28,93 @@
   private final Map<String, List<MarkerStub>> markersByType = newHashMap();
   private IPath location;
 
-  /** {@inheritDoc} */
   @Override public void accept(IResourceProxyVisitor visitor, int memberFlags) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void accept(IResourceVisitor visitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void accept(IResourceVisitor visitor, int depth, boolean includePhantoms) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void accept(IResourceVisitor visitor, int depth, int memberFlags) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
-  @Override public void appendContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor)
-      {
+  @Override public void appendContents(
+      InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void appendContents(InputStream source, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void clearHistory(IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean contains(ISchedulingRule rule) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void copy(IPath destination, boolean force, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void copy(IPath destination, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void copy(IProjectDescription description, boolean force, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void copy(IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void create(InputStream source, boolean force, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void create(InputStream source, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void createLink(URI location, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IMarker createMarker(String type) {
     MarkerStub marker = new MarkerStub(type);
     addMarker(marker);
     return marker;
   }
 
-  /** {@inheritDoc} */
   @Override public IResourceProxy createProxy() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void delete(boolean force, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void delete(int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void deleteMarkers(String type, boolean includeSubtypes, int depth) {
     List<MarkerStub> markers = markersByType.get(type);
     if (markers != null) {
@@ -144,17 +122,14 @@
     }
   }
 
-  /** {@inheritDoc} */
   @Override public boolean exists() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IMarker findMarker(long id) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IMarker[] findMarkers(String type, boolean includeSubtypes, int depth) {
     List<MarkerStub> markers = markersByType.get(type);
     if (markers == null) {
@@ -163,52 +138,42 @@
     return markers.toArray(new IMarker[markers.size()]);
   }
 
-  /** {@inheritDoc} */
   @Override public int findMaxProblemSeverity(String type, boolean includeSubtypes, int depth) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getCharset() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getCharset(boolean checkImplicit) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getCharsetFor(Reader reader) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IContentDescription getContentDescription() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public InputStream getContents() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public InputStream getContents(boolean force) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @Deprecated public int getEncoding() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getFileExtension() {
     throw new UnsupportedOperationException();
   }
@@ -218,17 +183,14 @@
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IFileState[] getHistory(IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public long getLocalTimeStamp() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IPath getLocation() {
     return location;
   }
@@ -237,286 +199,227 @@
     this.location = location;
   }
 
-  /** {@inheritDoc} */
   @Override public URI getLocationURI() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IMarker getMarker(long id) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public long getModificationStamp() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getName() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IContainer getParent() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IPathVariableManager getPathVariableManager() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public Map<QualifiedName, String> getPersistentProperties() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getPersistentProperty(QualifiedName key) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IProject getProject() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IPath getProjectRelativePath() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IPath getRawLocation() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public URI getRawLocationURI() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public ResourceAttributes getResourceAttributes() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public Map<QualifiedName, Object> getSessionProperties() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public Object getSessionProperty(QualifiedName key) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public int getType() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IWorkspace getWorkspace() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isAccessible() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isConflicting(ISchedulingRule rule) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isDerived() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isDerived(int options) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isHidden() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isHidden(int options) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isLinked() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isLinked(int options) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @Deprecated public boolean isLocal(int depth) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isPhantom() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isReadOnly() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isSynchronized(int depth) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isTeamPrivateMember() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isTeamPrivateMember(int options) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isVirtual() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
-  @Override public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor)
-      {
+  @Override public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void move(IPath destination, boolean force, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void move(IPath destination, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
-  @Override public void move(IProjectDescription description, boolean force, boolean keepHistory, IProgressMonitor monitor)
-      {
+  @Override public void move(
+      IProjectDescription description, boolean force, boolean keepHistory, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void refreshLocal(int depth, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void revertModificationStamp(long value) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @Deprecated public void setCharset(String newCharset) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setCharset(String newCharset, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
-  @Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor)
-      {
+  @Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setContents(IFileState source, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
-  @Override public void setContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor)
-      {
+  @Override public void setContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setContents(InputStream source, int updateFlags, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @Deprecated public void setDerived(boolean isDerived) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setDerived(boolean isDerived, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setHidden(boolean isHidden) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @Deprecated public void setLocal(boolean flag, int depth, IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public long setLocalTimeStamp(long value) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setPersistentProperty(QualifiedName key, String value) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override @Deprecated public void setReadOnly(boolean readOnly) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setResourceAttributes(ResourceAttributes attributes) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setSessionProperty(QualifiedName key, Object value) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setTeamPrivateMember(boolean isTeamPrivate) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void touch(IProgressMonitor monitor) {
     throw new UnsupportedOperationException();
   }
@@ -544,8 +447,7 @@
     markers.add(marker);
   }
 
-  /** {@inheritDoc} */
-  @Override public void accept(IResourceProxyVisitor visitor, int depth, int memberFlags) throws CoreException {
+  @Override public void accept(IResourceProxyVisitor visitor, int depth, int memberFlags) {
     throw new UnsupportedOperationException();
   }
 }
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java
index cef018c..d3f669c 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java
@@ -13,11 +13,11 @@
 import static com.google.common.collect.Maps.newHashMap;
 import static java.util.Collections.unmodifiableMap;
 
-import java.util.*;
+import com.google.common.base.Objects;
 
 import org.eclipse.core.resources.*;
 
-import com.google.common.base.Objects;
+import java.util.*;
 
 /**
  * @author alruiz@google.com (Alex Ruiz)
@@ -40,27 +40,22 @@
     creationTime = System.currentTimeMillis();
   }
 
-  /** {@inheritDoc} */
   @Override @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void delete() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public boolean exists() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public Object getAttribute(String attributeName) {
     return attributes.get(attributeName);
   }
 
-  /** {@inheritDoc} */
   @Override public int getAttribute(String attributeName, int defaultValue) {
     Object attribute = attributes.get(attributeName);
     if (attribute instanceof Integer) {
@@ -69,7 +64,6 @@
     return defaultValue;
   }
 
-  /** {@inheritDoc} */
   @Override public String getAttribute(String attributeName, String defaultValue) {
     Object attribute = attributes.get(attributeName);
     if (attribute instanceof String) {
@@ -78,7 +72,6 @@
     return defaultValue;
   }
 
-  /** {@inheritDoc} */
   @Override public boolean getAttribute(String attributeName, boolean defaultValue) {
     Object attribute = attributes.get(attributeName);
     if (attribute instanceof Boolean) {
@@ -87,12 +80,10 @@
     return defaultValue;
   }
 
-  /** {@inheritDoc} */
   @Override public Map<String, Object> getAttributes() {
     return unmodifiableMap(attributes);
   }
 
-  /** {@inheritDoc} */
   @Override public Object[] getAttributes(String[] attributeNames) {
     List<Object> values = newArrayList();
     for (String name : attributeNames) {
@@ -101,52 +92,42 @@
     return values.toArray();
   }
 
-  /** {@inheritDoc} */
   @Override public long getCreationTime() {
     return creationTime;
   }
 
-  /** {@inheritDoc} */
   @Override public long getId() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public IResource getResource() {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public String getType() {
     return type;
   }
 
-  /** {@inheritDoc} */
   @Override public boolean isSubtypeOf(String superType) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setAttribute(String attributeName, int value) {
     attributes.put(attributeName, value);
   }
 
-  /** {@inheritDoc} */
   @Override public void setAttribute(String attributeName, Object value) {
     attributes.put(attributeName, value);
   }
 
-  /** {@inheritDoc} */
   @Override public void setAttribute(String attributeName, boolean value) {
     attributes.put(attributeName, value);
   }
 
-  /** {@inheritDoc} */
   @Override public void setAttributes(String[] attributeNames, Object[] values) {
     throw new UnsupportedOperationException();
   }
 
-  /** {@inheritDoc} */
   @Override public void setAttributes(Map<String, ? extends Object> attributes) {
     this.attributes.putAll(attributes);
   }
