Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
36 | 2 | 4 | 0.955 | statement_sequence_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 36 | 471 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java |
2 | 36 | 162 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.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; } } |
| ||||
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; } } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#a45eb2c0]] | children.size() - path.size() |
1 | 2 | [[#a45eb2c0]] | children.size() |
2 | 1 | [[#a45eb240]] | IJavaElement |
2 | 2 | [[#a45eb240]] | SourceRefElement |
3 | 1 | [[#a45eb1c0]] | ((IMember) child) |
3 | 2 | [[#a45eb1c0]] | child |
4 | 1 | [[#a45eb140]] | .getOccurrenceCount() |
4 | 2 | [[#a45eb140]] | .occurrenceCount |