| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 42 | 2 | 3 | 0.972 | statement_sequence[9] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 47 | 531 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java |
| 2 | 42 | 880 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java |
| ||||
final char typeSuffix;
switch (searchFor) {
case IJavaSearchConstants.CLASS:
typeSuffix = IIndexConstants.CLASS_SUFFIX;
break;
case IJavaSearchConstants.CLASS_AND_INTERFACE:
typeSuffix = IIndexConstants.CLASS_AND_INTERFACE_SUFFIX;
break;
case IJavaSearchConstants.CLASS_AND_ENUM:
typeSuffix = IIndexConstants.CLASS_AND_ENUM_SUFFIX;
break;
case IJavaSearchConstants.INTERFACE:
typeSuffix = IIndexConstants.INTERFACE_SUFFIX;
break;
case IJavaSearchConstants.ENUM:
typeSuffix = IIndexConstants.ENUM_SUFFIX;
break;
case IJavaSearchConstants.ANNOTATION_TYPE:
typeSuffix = IIndexConstants.ANNOTATION_TYPE_SUFFIX;
break;
default:
typeSuffix = IIndexConstants.TYPE_SUFFIX;
break;
}
final TypeDeclarationPattern pattern = new TypeDeclarationPattern(
packageName,
null, // do find member types
typeName,
typeSuffix,
matchRule );
// Get working copy path(s). Store in a single string in case of only one to optimize comparison in requestor
final HashSet workingCopyPaths = new HashSet();
String workingCopyPath = null;
ICompilationUnit[] copies = getWorkingCopies();
final int copiesLength = copies == null ? 0: copies.length;
if (copies != null) {
if (copiesLength == 1) {
workingCopyPath = copies[0].getPath().toString();
}
else {
for (int i = 0; i < copiesLength; i++) {
ICompilationUnit workingCopy = copies[i];
workingCopyPaths.add(workingCopy.getPath().toString());
}
}
}
final String singleWkcpPath = workingCopyPath;
|
| ||||
final char typeSuffix;
switch (searchFor) {
case IJavaSearchConstants.CLASS:
typeSuffix = IIndexConstants.CLASS_SUFFIX;
break;
case IJavaSearchConstants.CLASS_AND_INTERFACE:
typeSuffix = IIndexConstants.CLASS_AND_INTERFACE_SUFFIX;
break;
case IJavaSearchConstants.CLASS_AND_ENUM:
typeSuffix = IIndexConstants.CLASS_AND_ENUM_SUFFIX;
break;
case IJavaSearchConstants.INTERFACE:
typeSuffix = IIndexConstants.INTERFACE_SUFFIX;
break;
case IJavaSearchConstants.ENUM:
typeSuffix = IIndexConstants.ENUM_SUFFIX;
break;
case IJavaSearchConstants.ANNOTATION_TYPE:
typeSuffix = IIndexConstants.ANNOTATION_TYPE_SUFFIX;
break;
default:
typeSuffix = IIndexConstants.TYPE_SUFFIX;
break;
}
final MultiTypeDeclarationPattern pattern = new MultiTypeDeclarationPattern(qualifications, typeNames, typeSuffix, matchRule);
// Get working copy path(s). Store in a single string in case of only one to optimize comparison in requestor
final HashSet workingCopyPaths = new HashSet();
String workingCopyPath = null;
ICompilationUnit[] copies = getWorkingCopies();
final int copiesLength = copies == null ? 0: copies.length;
if (copies != null) {
if (copiesLength == 1) {
workingCopyPath = copies[0].getPath().toString();
}
else {
for (int i = 0; i < copiesLength; i++) {
ICompilationUnit workingCopy = copies[i];
workingCopyPaths.add(workingCopy.getPath().toString());
}
}
}
final String singleWkcpPath = workingCopyPath;
|
| |||
final char typeSuffix;
switch (searchFor) {
case IJavaSearchConstants.CLASS:
typeSuffix = IIndexConstants.CLASS_SUFFIX;
break;
case IJavaSearchConstants.CLASS_AND_INTERFACE:
typeSuffix = IIndexConstants.CLASS_AND_INTERFACE_SUFFIX;
break;
case IJavaSearchConstants.CLASS_AND_ENUM:
typeSuffix = IIndexConstants.CLASS_AND_ENUM_SUFFIX;
break;
case IJavaSearchConstants.INTERFACE:
typeSuffix = IIndexConstants.INTERFACE_SUFFIX;
break;
case IJavaSearchConstants.ENUM:
typeSuffix = IIndexConstants.ENUM_SUFFIX;
break;
case IJavaSearchConstants.ANNOTATION_TYPE:
typeSuffix = IIndexConstants.ANNOTATION_TYPE_SUFFIX;
break;
default:
typeSuffix = IIndexConstants.TYPE_SUFFIX;
break;
}
final [[#variablebb5b6500]] pattern = new [[#variablebb5b6500]]( [[#variablebb5b64e0]], // do find member types
[[#variablebb5b64a0]], typeSuffix, matchRule);
// Get working copy path(s). Store in a single string in case of only one to optimize comparison in requestor
final HashSet workingCopyPaths = new HashSet();
String workingCopyPath = null;
ICompilationUnit[] copies = getWorkingCopies();
final int copiesLength = copies == null ? 0: copies.length;
if (copies != null) {
if (copiesLength == 1) {
workingCopyPath = copies[0].getPath().toString();
}
else {
for (int i = 0; i < copiesLength; i++) {
ICompilationUnit workingCopy = copies[i];
workingCopyPaths.add(workingCopy.getPath().toString());
}
}
}
final String singleWkcpPath = workingCopyPath;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#bb5b6500]] | MultiTypeDeclarationPattern |
| 1 | 2 | [[#bb5b6500]] | TypeDeclarationPattern |
| 2 | 1 | [[#bb5b64e0]] | qualifications |
| 2 | 2 | [[#bb5b64e0]] | packageName, null |
| 3 | 1 | [[#bb5b64a0]] | typeNames |
| 3 | 2 | [[#bb5b64a0]] | typeName |