| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 20 | 2 | 2 | 0.989 | statement_sequence_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 20 | 297 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java |
| 2 | 17 | 376 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java |
| ||||
check: {
needRename = false;
// check for collision with known methods
MethodBinding[] methods = sourceType.methods();
for (int i = 0, length = methods.length; i < length; i++) {
if (CharOperation.equals(this.selector, methods[i].selector) &&
this.areParametersEqual(methods[i])) {
needRename = true;
break check;
}
}
// check for collision with synthetic accessors
if (knownSyntheticMethods != null) {
for (int i = 0, length = knownSyntheticMethods.length; i < length; i++) {
if (knownSyntheticMethods[i] == null)
continue ;
if (CharOperation.equals(this.selector, knownSyntheticMethods[i].selector) &&
this.areParametersEqual(knownSyntheticMethods[i])) {
needRename = true;
break check;
}
}
}
}
|
| ||||
check: {
needRename = false;
// check for collision with known methods
MethodBinding[] methods = declaringSourceType.methods();
for (int i = 0, length = methods.length; i < length; i++) {
if (CharOperation.equals(this.selector, methods[i].selector) && this.areParametersEqual(methods[i])) {
needRename = true;
break check;
}
}
// check for collision with synthetic accessors
if (knownAccessMethods != null) {
for (int i = 0, length = knownAccessMethods.length; i < length; i++) {
if (knownAccessMethods[i] == null) continue ;
if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && this.areParametersEqual(knownAccessMethods[i])) {
needRename = true;
break check;
}
}
}
}
|
| |||
check: {
needRename = false;
// check for collision with known methods
MethodBinding[] methods = [[#variableb773b5a0]].methods();
for (int i = 0, length = methods.length; i < length; i++) {
if (CharOperation.equals(this.selector, methods[i].selector) && this.areParametersEqual(methods[i])) {
needRename = true;
break check;
}
}
// check for collision with synthetic accessors
if ( [[#variableb773b160]]!= null) {
for (int i = 0, length = [[#variableb773b160]].length; i < length; i++) {
if ( [[#variableb773b160]][i] == null)
continue ;
if (CharOperation.equals(this.selector, [[#variableb773b160]][i].selector) && this.areParametersEqual( [[#variableb773b160]][i])) {
needRename = true;
break check;
}
}
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b773b5a0]] | sourceType |
| 1 | 2 | [[#b773b5a0]] | declaringSourceType |
| 2 | 1 | [[#b773b160]] | knownSyntheticMethods |
| 2 | 2 | [[#b773b160]] | knownAccessMethods |