CloneSet1415


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
7230.977class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
17213
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java
27223
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java
Clone Instance
1
Line Count
7
Source Line
213
Source File
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));
                }
        }


Clone Instance
2
Line Count
7
Source Line
223
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java

        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));
                }
        }


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#58fa0bc0]]
FieldDeclaration 
12[[#58fa0bc0]]
MethodDeclaration 
21[[#58fa0b40]]
oldField 
22[[#58fa0b40]]
oldMethod 
31[[#58fa0a80]]
newField 
32[[#58fa0a80]]
newMethod