CloneSet392


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
42230.972statement_sequence[9]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
147531
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java
242880
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java
Clone Instance
1
Line Count
47
Source Line
531
Source File
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;


Clone Instance
2
Line Count
42
Source Line
880
Source File
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 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;


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bb5b6500]]
MultiTypeDeclarationPattern 
12[[#bb5b6500]]
TypeDeclarationPattern 
21[[#bb5b64e0]]
qualifications 
22[[#bb5b64e0]]
packageName, null 
31[[#bb5b64a0]]
typeNames 
32[[#bb5b64a0]]
typeName