CloneSet838


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17201.000statement_sequence[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1171985
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
2172016
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
Clone Instance
1
Line Count
17
Source Line
1985
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java

                int fieldCount = (typeDeclaration.fields == null) ? 0:  typeDeclaration.fields.length;
                int methodCount = (typeDeclaration.methods == null) ? 0:  typeDeclaration.methods.length;
                int typeCount = (typeDeclaration.memberTypes == null) ? 0:  typeDeclaration.memberTypes.length;

                if (methodCount <= 2) {
                        for (int i = 0, max = methodCount; i < max; i++) {
                                final AbstractMethodDeclaration abstractMethodDeclaration = typeDeclaration.methods[i];
                                if (abstractMethodDeclaration.isDefaultConstructor()) {
                                        methodCount--;
                                }
                                else   if (abstractMethodDeclaration.isClinit()) {
                                        methodCount--;
                                       }
                        }
                }
                final int memberLength = fieldCount + methodCount + typeCount;
                boolean insertNewLine = memberLength > 0;


Clone Instance
2
Line Count
17
Source Line
2016
Source File
plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java

                int fieldCount = (typeDeclaration.fields == null) ? 0:  typeDeclaration.fields.length;
                int methodCount = (typeDeclaration.methods == null) ? 0:  typeDeclaration.methods.length;
                int typeCount = (typeDeclaration.memberTypes == null) ? 0:  typeDeclaration.memberTypes.length;

                if (methodCount <= 2) {
                        for (int i = 0, max = methodCount; i < max; i++) {
                                final AbstractMethodDeclaration abstractMethodDeclaration = typeDeclaration.methods[i];
                                if (abstractMethodDeclaration.isDefaultConstructor()) {
                                        methodCount--;
                                }
                                else   if (abstractMethodDeclaration.isClinit()) {
                                        methodCount--;
                                       }
                        }
                }
                final int memberLength = fieldCount + methodCount + typeCount;
                boolean insertNewLine = memberLength > 0;


Clone AbstractionParameter Count: 0Parameter Bindings

int fieldCount = (typeDeclaration.fields == null) ? 0: typeDeclaration.fields.length;
int methodCount = (typeDeclaration.methods == null) ? 0: typeDeclaration.methods.length;
int typeCount = (typeDeclaration.memberTypes == null) ? 0: typeDeclaration.memberTypes.length;
if (methodCount <= 2) {
  for (int i = 0, max = methodCount; i < max; i++) {
    final AbstractMethodDeclaration abstractMethodDeclaration = typeDeclaration.methods[i];
    if (abstractMethodDeclaration.isDefaultConstructor()) {
      methodCount--;
    }
    else
      if (abstractMethodDeclaration.isClinit()) {
        methodCount--;
      }
  }
}
final int memberLength = fieldCount + methodCount + typeCount;
boolean insertNewLine = memberLength > 0;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None