| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 30 | 2 | 1 | 0.987 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 30 | 263 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ConstructorPattern.java |
| 2 | 30 | 306 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java |
| ||||
EntryResult[] queryIn(Index index) throws IOException {
char[] key = this.declaringSimpleName; // can be null
int matchRule = getMatchRule();
switch (getMatchMode()) {
case R_EXACT_MATCH:
if (this.isCamelCase) break;
if (this.declaringSimpleName != null && this.parameterCount >= 0 && !this.varargs)
key = createIndexKey(this.declaringSimpleName, this.parameterCount);
else { // do a prefix query with the declaringSimpleName
matchRule &= ~R_EXACT_MATCH;
matchRule |= R_PREFIX_MATCH;
}
break;
case R_PREFIX_MATCH:
// do a prefix query with the declaringSimpleName
break;
case R_PATTERN_MATCH:
if (this.parameterCount >= 0 && !this.varargs)
key = createIndexKey(this.declaringSimpleName == null ? ONE_STAR: this.declaringSimpleName, this.parameterCount);
else if (this.declaringSimpleName != null && this.declaringSimpleName[this.declaringSimpleName.length - 1] != '*')
key = CharOperation.concat(this.declaringSimpleName, ONE_STAR, SEPARATOR);
// else do a pattern query with just the declaringSimpleName
break;
case R_REGEXP_MATCH:
// TODO (frederic) implement regular expression match
break;
}
return index.query(getIndexCategories(), key, matchRule); // match rule is irrelevant when the key is null
}
|
| ||||
EntryResult[] queryIn(Index index) throws IOException {
char[] key = this.selector; // can be null
int matchRule = getMatchRule();
switch (getMatchMode()) {
case R_EXACT_MATCH:
if (this.isCamelCase) break;
if (this.selector != null && this.parameterCount >= 0 && !this.varargs)
key = createIndexKey(this.selector, this.parameterCount);
else { // do a prefix query with the selector
matchRule &= ~R_EXACT_MATCH;
matchRule |= R_PREFIX_MATCH;
}
break;
case R_PREFIX_MATCH:
// do a prefix query with the selector
break;
case R_PATTERN_MATCH:
if (this.parameterCount >= 0 && !this.varargs)
key = createIndexKey(this.selector == null ? ONE_STAR: this.selector, this.parameterCount);
else if (this.selector != null && this.selector[this.selector.length - 1] != '*')
key = CharOperation.concat(this.selector, ONE_STAR, SEPARATOR);
// else do a pattern query with just the selector
break;
case R_REGEXP_MATCH:
// TODO (frederic) implement regular expression match
break;
}
return index.query(getIndexCategories(), key, matchRule); // match rule is irrelevant when the key is null
}
|
| |||
EntryResult[] queryIn(Index index) throws IOException {
char[] key = this. [[#variablea4df5b80]]; // can be null
int matchRule = getMatchRule();
switch (getMatchMode()) {
case R_EXACT_MATCH:
if (this.isCamelCase)
break;
if (this. [[#variablea4df5b80]]!= null && this.parameterCount >= 0 && !this.varargs)
key = createIndexKey(this. [[#variablea4df5b80]], this.parameterCount);
else { // do a prefix query with the declaringSimpleName // do a prefix query with the selector
matchRule &= ~R_EXACT_MATCH;
matchRule |= R_PREFIX_MATCH;
}
break;
case R_PREFIX_MATCH:
// do a prefix query with the declaringSimpleName
// do a prefix query with the selector
break;
case R_PATTERN_MATCH:
if (this.parameterCount >= 0 && !this.varargs)
key = createIndexKey(this. [[#variablea4df5b80]]== null ? ONE_STAR: this. [[#variablea4df5b80]], this.parameterCount);
else
if (this. [[#variablea4df5b80]]!= null && this. [[#variablea4df5b80]][this. [[#variablea4df5b80]].length - 1] != '*')
key = CharOperation.concat(this. [[#variablea4df5b80]], ONE_STAR, SEPARATOR);
// else do a pattern query with just the declaringSimpleName
// else do a pattern query with just the selector
break;
case R_REGEXP_MATCH:
// TODO (frederic) implement regular expression match
break;
}
return index.query(getIndexCategories(), key, matchRule); // match rule is irrelevant when the key is null
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#a4df5b80]] | declaringSimpleName |
| 1 | 2 | [[#a4df5b80]] | selector |