| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 17 | 2 | 0 | 1.000 | statement_sequence[6] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 17 | 1985 | plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java |
| 2 | 17 | 2016 | 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;
|
| ||||
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;
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||