CloneSet242


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
15430.988block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
115304
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java
215373
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java
315394
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java
415415
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java
Clone Instance
1
Line Count
15
Source Line
304
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java

                                                                                                                                                                                                                            {
                Expression result = null;
                try {
                        final IDocument document = new Document(declaringCu.getBuffer().getContents());
                        final ASTRewrite rewriter = ASTRewrite.create(expression.getAST());
                        final ITrackedNodePosition position = rewriter.track(expression);
                        expression.accept(new TypeVariableMapper(rewriter, mapping));
                        rewriter.rewriteAST(document, declaringCu.getJavaProject().getOptions(true)).apply(document, TextEdit.NONE);
                        result = (Expression) rewrite.createStringPlaceholder(document.get(position.getStartPosition(), position.getLength()), ASTNode.METHOD_INVOCATION);
                } catch (MalformedTreeException exception) {
                        JavaPlugin.log(exception);
                  }
                  catch (BadLocationException exception) {
                        JavaPlugin.log(exception);
                  }
                return result;
                                                                                                                                                                                                                            }


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

                                                                                                                                                                                                                                                                          {
                SingleVariableDeclaration result = null;
                try {
                        final IDocument document = new Document(declaringCu.getBuffer().getContents());
                        final ASTRewrite rewriter = ASTRewrite.create(declaration.getAST());
                        final ITrackedNodePosition position = rewriter.track(declaration);
                        declaration.accept(new TypeVariableMapper(rewriter, mapping));
                        rewriter.rewriteAST(document, declaringCu.getJavaProject().getOptions(true)).apply(document, TextEdit.NONE);
                        result = (SingleVariableDeclaration) rewrite.createStringPlaceholder(document.get(position.getStartPosition(), position.getLength()), ASTNode.SINGLE_VARIABLE_DECLARATION);
                } catch (MalformedTreeException exception) {
                        JavaPlugin.log(exception);
                  }
                  catch (BadLocationException exception) {
                        JavaPlugin.log(exception);
                  }
                return result;
                                                                                                                                                                                                                                                                          }


Clone Instance
3
Line Count
15
Source Line
394
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java

                                                                                                                                                                                                    {
                Type result = null;
                try {
                        final IDocument document = new Document(declaringCu.getBuffer().getContents());
                        final ASTRewrite rewriter = ASTRewrite.create(type.getAST());
                        final ITrackedNodePosition position = rewriter.track(type);
                        type.accept(new TypeVariableMapper(rewriter, mapping));
                        rewriter.rewriteAST(document, declaringCu.getJavaProject().getOptions(true)).apply(document, TextEdit.NONE);
                        result = (Type) rewrite.createStringPlaceholder(document.get(position.getStartPosition(), position.getLength()), ASTNode.SIMPLE_TYPE);
                } catch (MalformedTreeException exception) {
                        JavaPlugin.log(exception);
                  }
                  catch (BadLocationException exception) {
                        JavaPlugin.log(exception);
                  }
                return result;
                                                                                                                                                                                                    }


Clone Instance
4
Line Count
15
Source Line
415
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java

                                                                                                                                                                                                                                                                                 {
                BodyDeclaration result = null;
                try {
                        final IDocument document = new Document(declaringCu.getBuffer().getContents());
                        final ASTRewrite rewriter = ASTRewrite.create(bodyDeclaration.getAST());
                        final ITrackedNodePosition position = rewriter.track(bodyDeclaration);
                        bodyDeclaration.accept(new TypeVariableMapper(rewriter, mapping));
                        rewriter.rewriteAST(document, declaringCu.getJavaProject().getOptions(true)).apply(document, TextEdit.NONE);
                        result = (BodyDeclaration) rewrite.createStringPlaceholder(document.get(position.getStartPosition(), position.getLength()), ASTNode.TYPE_DECLARATION);
                } catch (MalformedTreeException exception) {
                        JavaPlugin.log(exception);
                  }
                  catch (BadLocationException exception) {
                        JavaPlugin.log(exception);
                  }
                return result;
                                                                                                                                                                                                                                                                                 }


Clone AbstractionParameter Count: 3Parameter Bindings

{
   [[#variableb57ab380]] result = null;
  try {
    final IDocument document = new Document(declaringCu.getBuffer().getContents());
    final ASTRewrite rewriter = ASTRewrite.create( [[#variableb57ab320]].getAST());
    final ITrackedNodePosition position = rewriter.track( [[#variableb57ab320]]);
     [[#variableb57ab320]].accept(new TypeVariableMapper(rewriter, mapping));
    rewriter.rewriteAST(document, declaringCu.getJavaProject().getOptions(true)).apply(document, TextEdit.NONE);
    result = ( [[#variableb57ab380]]) rewrite.createStringPlaceholder(document.get(position.getStartPosition(), position.getLength()), ASTNode. [[#variableb57ab2c0]]);
  }
  catch (MalformedTreeException exception) {
    JavaPlugin.log(exception);
  }
  catch (BadLocationException exception) {
    JavaPlugin.log(exception);
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b57ab380]]
SingleVariableDeclaration 
12[[#b57ab380]]
Type 
13[[#b57ab380]]
Expression 
14[[#b57ab380]]
BodyDeclaration 
21[[#b57ab320]]
declaration 
22[[#b57ab320]]
type 
23[[#b57ab320]]
expression 
24[[#b57ab320]]
bodyDeclaration 
31[[#b57ab2c0]]
SINGLE_VARIABLE_DECLARATION 
32[[#b57ab2c0]]
SIMPLE_TYPE 
33[[#b57ab2c0]]
METHOD_INVOCATION 
34[[#b57ab2c0]]
TYPE_DECLARATION