CloneSet2254


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
112480
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
213695
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java
Clone Instance
1
Line Count
12
Source Line
480
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java

        /**
         * Checks whether <code>position</code> resides in a default (Java) partition of <code>document</code>.
         *
         * @param document the document being modified
         * @param position the position to be checked
         * @param partitioning the document partitioning
         * @return <code>true</code> if <code>position</code> is in the default partition of <code>document</code>, <code>false</code> otherwise
         */
        private static boolean isDefaultPartition(IDocument document, int position, String partitioning) {
                Assert.isTrue(position >= 0);
                Assert.isTrue(position <= document.getLength());

                try {
                        ITypedRegion region = TextUtilities.getPartition(document, partitioning, position, false);
                        return region.getType().equals(IDocument.DEFAULT_CONTENT_TYPE);
                }
                  catch (BadLocationException e) {
                  }

                return false;
        }


Clone Instance
2
Line Count
13
Source Line
695
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/SmartSemicolonAutoEditStrategy.java

        /**
         * Checks whether <code>position</code> resides in a default (Java) partition of <code>document</code>.
         *
         * @param document the document being modified
         * @param position the position to be checked
         * @param partitioning the document partitioning
         * @return <code>true</code> if <code>position</code> is in the default partition of <code>document</code>, <code>false</code> otherwise
         */
        private static boolean isDefaultPartition(IDocument document, int position, String partitioning) {
                Assert.isTrue(position >= 0);
                Assert.isTrue(position <= document.getLength());

                try {
                        // don't use getPartition2 since we're interested in the scanned character's partition
                        ITypedRegion region = TextUtilities.getPartition(document, partitioning, position, false);
                        return region.getType().equals(IDocument.DEFAULT_CONTENT_TYPE);
                }
                  catch (BadLocationException e) {
                  }

                return false;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * Checks whether <code>position</code> resides in a default (Java) partition of <code>document</code>.
         *
         * @param document the document being modified
         * @param position the position to be checked
         * @param partitioning the document partitioning
         * @return <code>true</code> if <code>position</code> is in the default partition of <code>document</code>, <code>false</code> otherwise
         */
private static boolean isDefaultPartition(IDocument document, int position, String partitioning) {
  Assert.isTrue(position >= 0);
  Assert.isTrue(position <= document.getLength());
  try {
    // don't use getPartition2 since we're interested in the scanned character's partition
    ITypedRegion region = TextUtilities.getPartition(document, partitioning, position, false);
    return region.getType().equals(IDocument.DEFAULT_CONTENT_TYPE);
  }
  catch (BadLocationException e) {
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None