Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
7 | 2 | 3 | 0.977 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 7 | 213 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java |
2 | 7 | 223 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java |
| ||||
protected static void copyAnnotations( final FieldDeclaration oldField, final FieldDeclaration newField) { final AST ast = newField.getAST(); for (int index = 0,n = oldField.modifiers().size(); index < n; index++) { final IExtendedModifier modifier = (IExtendedModifier) oldField.modifiers().get(index); final List modifiers = newField.modifiers(); if (modifier.isAnnotation() && !modifiers.contains(modifier)) modifiers.add(index, ASTNode.copySubtree(ast, (Annotation) modifier)); } } |
| ||||
protected static void copyAnnotations( final MethodDeclaration oldMethod, final MethodDeclaration newMethod) { final AST ast = newMethod.getAST(); for (int index = 0,n = oldMethod.modifiers().size(); index < n; index++) { final IExtendedModifier modifier = (IExtendedModifier) oldMethod.modifiers().get(index); final List modifiers = newMethod.modifiers(); if (modifier.isAnnotation() && !modifiers.contains(modifier)) modifiers.add(index, ASTNode.copySubtree(ast, (Annotation) modifier)); } } |
| |||
protected static void copyAnnotations( final [[#variable58fa0bc0]] [[#variable58fa0b40]], final [[#variable58fa0bc0]] [[#variable58fa0a80]]) { final AST ast = [[#variable58fa0a80]].getAST(); for (int index = 0, n = [[#variable58fa0b40]].modifiers().size(); index < n; index++) { final IExtendedModifier modifier = (IExtendedModifier) [[#variable58fa0b40]].modifiers().get(index); final List modifiers = [[#variable58fa0a80]].modifiers(); if (modifier.isAnnotation() && !modifiers.contains(modifier)) modifiers.add(index, ASTNode.copySubtree(ast, (Annotation) modifier)); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#58fa0bc0]] | FieldDeclaration |
1 | 2 | [[#58fa0bc0]] | MethodDeclaration |
2 | 1 | [[#58fa0b40]] | oldField |
2 | 2 | [[#58fa0b40]] | oldMethod |
3 | 1 | [[#58fa0a80]] | newField |
3 | 2 | [[#58fa0a80]] | newMethod |