Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
41 | 2 | 2 | 0.957 | statement_sequence[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 40 | 77 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java |
2 | 41 | 166 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java |
| ||||
do { check: { needRename = false; // check for collision with known methods long range; MethodBinding[] methods = declaringSourceType.methods(); if ((range = ReferenceBinding.binarySearch(this.selector, methods)) >= 0) { int paramCount = this.parameters.length; nextMethod: for (int imethod = (int) range,end = (int) (range >> 32); imethod <= end; imethod++) { MethodBinding method = methods[imethod]; if (method.parameters.length == paramCount) { TypeBinding[] toMatch = method.parameters; for (int i = 0; i < paramCount; i++) { if (toMatch[i] != this.parameters[i]) { continue nextMethod; } } 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(methods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a selector postfixed by a growing methodId this.setSelector(CharOperation.concat(TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX, String.valueOf( ++methodId).toCharArray())); } } while ( needRename); // retrieve sourceStart position for the target field for line number attributes FieldDeclaration[] fieldDecls = declaringSourceType.scope.referenceContext.fields; |
| ||||
do { check: { needRename = false; // check for collision with known methods long range; MethodBinding[] methods = declaringSourceType.methods(); if ((range = ReferenceBinding.binarySearch(this.selector, methods)) >= 0) { int paramCount = this.parameters.length; nextMethod: for (int imethod = (int) range,end = (int) (range >> 32); imethod <= end; imethod++) { MethodBinding method = methods[imethod]; if (method.parameters.length == paramCount) { TypeBinding[] toMatch = method.parameters; for (int i = 0; i < paramCount; i++) { if (toMatch[i] != this.parameters[i]) { continue nextMethod; } } 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(methods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a selector postfixed by a growing methodId this.setSelector(CharOperation.concat(selector, String.valueOf( ++methodId).toCharArray())); } } while ( needRename); // We now at this point - per construction - it is for sure an enclosing instance, we are going to // show the target field type declaration location. this.sourceStart = declaringSourceType.scope.referenceContext.sourceStart; // use the target declaring class name position instead |
| |||
do { check: { needRename = false; // check for collision with known methods long range; MethodBinding[] methods = declaringSourceType.methods(); if ((range = ReferenceBinding.binarySearch(this.selector, methods)) >= 0) { int paramCount = this.parameters.length; nextMethod: for (int imethod = (int) range, end = (int) (range >> 32); imethod <= end; imethod++) { MethodBinding method = methods[imethod]; if (method.parameters.length == paramCount) { TypeBinding[] toMatch = method.parameters; for (int i = 0; i < paramCount; i++) { if (toMatch[i] != this.parameters[i]) { continue nextMethod; } } 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(methods[i])) { needRename = true; break check; } } } } if (needRename) { // retry with a selector postfixed by a growing methodId this.setSelector(CharOperation.concat( [[#variableb9f695c0]], String.valueOf( ++methodId).toCharArray())); } } while (needRename); [[#variableb9fb5020]] |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b9f695c0]] | selector |
1 | 2 | [[#b9f695c0]] | TypeConstants.SYNTHETIC_ACCESS_METHOD_PREFIX |
2 | 1 | [[#b9fb5020]] | // We now at this point - per construction - it is for sure an enclosing instance, we are going to // show the target field type declaration location. this.sourceStart = declaringSourceType.scope.referenceContext.sourceStart; // use the target declaring class name position instead |
2 | 2 | [[#b9fb5020]] | // retrieve sourceStart position for the target field for line number attributes FieldDeclaration[] fieldDecls = declaringSourceType.scope.referenceContext.fields; |