| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 33 | 2 | 6 | 0.989 | class_body_declarations[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 33 | 214 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorPattern.java |
| 2 | 33 | 244 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java |
| ||||
public void decodeIndexKey(char[] key) {
int last = key.length - 1;
this.parameterCount = 0;
this.declaringSimpleName = null;
int power = 1;
for (int i = last; i >= 0; i--) {
if (key[i] == SEPARATOR) {
System.arraycopy(key, 0, this.declaringSimpleName = new char[i], 0, i);
break;
}
if (i == last) {
this.parameterCount = key[i] - '0';
}
else {
power *= 10;
this.parameterCount += power * (key[i] - '0');
}
}
}
public SearchPattern getBlankPattern() {
return new ConstructorPattern(R_EXACT_MATCH| R_CASE_SENSITIVE);
}
public char[][] getIndexCategories() {
if (this.findReferences)
return this.findDeclarations ? REF_AND_DECL_CATEGORIES: REF_CATEGORIES;
if (this.findDeclarations)
return DECL_CATEGORIES;
return CharOperation.NO_CHAR_CHAR;
}
boolean hasConstructorArguments() {
return constructorArguments != null && constructorArguments.length > 0;
}
boolean hasConstructorParameters() {
return constructorParameters;
}
|
| ||||
public void decodeIndexKey(char[] key) {
int last = key.length - 1;
this.parameterCount = 0;
this.selector = null;
int power = 1;
for (int i = last; i >= 0; i--) {
if (key[i] == SEPARATOR) {
System.arraycopy(key, 0, this.selector = new char[i], 0, i);
break;
}
if (i == last) {
this.parameterCount = key[i] - '0';
}
else {
power *= 10;
this.parameterCount += power * (key[i] - '0');
}
}
}
public SearchPattern getBlankPattern() {
return new MethodPattern(R_EXACT_MATCH| R_CASE_SENSITIVE);
}
public char[][] getIndexCategories() {
if (this.findReferences)
return this.findDeclarations ? REF_AND_DECL_CATEGORIES: REF_CATEGORIES;
if (this.findDeclarations)
return DECL_CATEGORIES;
return CharOperation.NO_CHAR_CHAR;
}
boolean hasMethodArguments() {
return methodArguments != null && methodArguments.length > 0;
}
boolean hasMethodParameters() {
return methodParameters;
}
|
| |||
public void decodeIndexKey(char[] key) {
int last = key.length - 1;
this.parameterCount = 0;
this. [[#variable76255760]]= null;
int power = 1;
for (int i = last; i >= 0; i--) {
if (key[i] == SEPARATOR) {
System.arraycopy(key, 0, this. [[#variable76255760]]= new char[i], 0, i);
break;
}
if (i == last) {
this.parameterCount = key[i] - '0';
}
else {
power *= 10;
this.parameterCount += power * (key[i] - '0');
}
}
}
public SearchPattern getBlankPattern() {
return new [[#variable762556c0]](R_EXACT_MATCH|R_CASE_SENSITIVE);
}
public char[][] getIndexCategories() {
if (this.findReferences)
return this.findDeclarations ? REF_AND_DECL_CATEGORIES: REF_CATEGORIES;
if (this.findDeclarations)
return DECL_CATEGORIES;
return CharOperation.NO_CHAR_CHAR;
}
boolean [[#variable76255660]]() {
return [[#variable76255560]]!= null && [[#variable76255560]].length > 0;
}
boolean [[#variable76255480]]() {
return [[#variable762554a0]];
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#76255760]] | declaringSimpleName |
| 1 | 2 | [[#76255760]] | selector |
| 2 | 1 | [[#762556c0]] | ConstructorPattern |
| 2 | 2 | [[#762556c0]] | MethodPattern |
| 3 | 1 | [[#76255660]] | hasConstructorArguments |
| 3 | 2 | [[#76255660]] | hasMethodArguments |
| 4 | 1 | [[#76255560]] | constructorArguments |
| 4 | 2 | [[#76255560]] | methodArguments |
| 5 | 1 | [[#76255480]] | hasConstructorParameters |
| 5 | 2 | [[#76255480]] | hasMethodParameters |
| 6 | 1 | [[#762554a0]] | constructorParameters |
| 6 | 2 | [[#762554a0]] | methodParameters |