CloneSet262


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
36240.955statement_sequence_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
136471
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
236162
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.java
Clone Instance
1
Line Count
36
Source Line
471
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java

        for (int i = children.size() - 1; i >= 0; i--) {
                SourceRefElement child = (SourceRefElement) children.get(i);
                switch (child.getElementType()) {
                        case IJavaElement.PACKAGE_DECLARATION:
                                currentElement = ((ICompilationUnit) currentElement).getPackageDeclaration(child.getElementName());
                                break;
                        case IJavaElement.IMPORT_CONTAINER:
                                currentElement = ((ICompilationUnit) currentElement).getImportContainer();
                                break;
                        case IJavaElement.IMPORT_DECLARATION:
                                currentElement = ((IImportContainer) currentElement).getImport(child.getElementName());
                                break;
                        case IJavaElement.TYPE:
                                switch (currentElement.getElementType()) {
                                        case IJavaElement.COMPILATION_UNIT:
                                                currentElement = ((ICompilationUnit) currentElement).getType(child.getElementName());
                                                break;
                                        case IJavaElement.TYPE:
                                                currentElement = ((IType) currentElement).getType(child.getElementName());
                                                break;
                                        case IJavaElement.FIELD:
                                        case IJavaElement.INITIALIZER:
                                        case IJavaElement.METHOD:
                                                currentElement =  ((IMember) currentElement).getType(child.getElementName(), child.occurrenceCount);
                                                break;
                                      }
                                break;
                        case IJavaElement.INITIALIZER:
                                currentElement = ((IType) currentElement).getInitializer(child.occurrenceCount);
                                break;
                        case IJavaElement.FIELD:
                                currentElement = ((IType) currentElement).getField(child.getElementName());
                                break;
                        case IJavaElement.METHOD:
                                currentElement = ((IType) currentElement).getMethod(child.getElementName(), ((IMethod) child).getParameterTypes());
                                break;
                      }
        }


Clone Instance
2
Line Count
36
Source Line
162
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.java

                for (int i = children.size() - path.size() - 1; i >= 0; i--) {
                        IJavaElement child = (IJavaElement) children.get(i);
                        switch (child.getElementType()) {
                                case IJavaElement.PACKAGE_DECLARATION:
                                        currentElement = ((ICompilationUnit) currentElement).getPackageDeclaration(child.getElementName());
                                        break;
                                case IJavaElement.IMPORT_CONTAINER:
                                        currentElement = ((ICompilationUnit) currentElement).getImportContainer();
                                        break;
                                case IJavaElement.IMPORT_DECLARATION:
                                        currentElement = ((IImportContainer) currentElement).getImport(child.getElementName());
                                        break;
                                case IJavaElement.TYPE:
                                        switch (currentElement.getElementType()) {
                                                case IJavaElement.COMPILATION_UNIT:
                                                        currentElement = ((ICompilationUnit) currentElement).getType(child.getElementName());
                                                        break;
                                                case IJavaElement.TYPE:
                                                        currentElement = ((IType) currentElement).getType(child.getElementName());
                                                        break;
                                                case IJavaElement.FIELD:
                                                case IJavaElement.INITIALIZER:
                                                case IJavaElement.METHOD:
                                                        currentElement =  ((IMember) currentElement).getType(child.getElementName(), ((IMember) child).getOccurrenceCount());
                                                        break;
                                              }
                                        break;
                                case IJavaElement.INITIALIZER:
                                        currentElement = ((IType) currentElement).getInitializer(((IMember) child).getOccurrenceCount());
                                        break;
                                case IJavaElement.FIELD:
                                        currentElement = ((IType) currentElement).getField(child.getElementName());
                                        break;
                                case IJavaElement.METHOD:
                                        currentElement = ((IType) currentElement).getMethod(child.getElementName(), ((IMethod) child).getParameterTypes());
                                        break;
                              }
                }


Clone AbstractionParameter Count: 4Parameter Bindings

for (int i = [[#variablea45eb2c0]] - 1; i >= 0; i--) {
   [[#variablea45eb240]] child = ( [[#variablea45eb240]]) children.get(i);
  switch (child.getElementType()) {
    case IJavaElement.PACKAGE_DECLARATION:
      currentElement = ((ICompilationUnit) currentElement).getPackageDeclaration(child.getElementName());
      break;
    case IJavaElement.IMPORT_CONTAINER:
      currentElement = ((ICompilationUnit) currentElement).getImportContainer();
      break;
    case IJavaElement.IMPORT_DECLARATION:
      currentElement = ((IImportContainer) currentElement).getImport(child.getElementName());
      break;
    case IJavaElement.TYPE:
      switch (currentElement.getElementType()) {
        case IJavaElement.COMPILATION_UNIT:
          currentElement = ((ICompilationUnit) currentElement).getType(child.getElementName());
          break;
        case IJavaElement.TYPE:
          currentElement = ((IType) currentElement).getType(child.getElementName());
          break;
        case IJavaElement.FIELD:
        case IJavaElement.INITIALIZER:
        case IJavaElement.METHOD:
          currentElement = ((IMember) currentElement).getType(child.getElementName(),  [[#variablea45eb1c0]] [[#variablea45eb140]]);
          break;
      }
      break;
    case IJavaElement.INITIALIZER:
      currentElement = ((IType) currentElement).getInitializer( [[#variablea45eb1c0]] [[#variablea45eb140]]);
      break;
    case IJavaElement.FIELD:
      currentElement = ((IType) currentElement).getField(child.getElementName());
      break;
    case IJavaElement.METHOD:
      currentElement = ((IType) currentElement).getMethod(child.getElementName(), ((IMethod) child).getParameterTypes());
      break;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#a45eb2c0]]
children.size() - path.size() 
12[[#a45eb2c0]]
children.size() 
21[[#a45eb240]]
IJavaElement 
22[[#a45eb240]]
SourceRefElement 
31[[#a45eb1c0]]
((IMember) child) 
32[[#a45eb1c0]]
child 
41[[#a45eb140]]
.getOccurrenceCount() 
42[[#a45eb140]]
.occurrenceCount