Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
15 | 4 | 3 | 0.988 | block |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 15 | 304 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java |
2 | 15 | 373 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java |
3 | 15 | 394 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/HierarchyProcessor.java |
4 | 15 | 415 | 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; } |
| ||||
{ 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; } |
| ||||
{ 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; } |
| ||||
{ 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; } |
| |||
{ [[#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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b57ab380]] | SingleVariableDeclaration |
1 | 2 | [[#b57ab380]] | Type |
1 | 3 | [[#b57ab380]] | Expression |
1 | 4 | [[#b57ab380]] | BodyDeclaration |
2 | 1 | [[#b57ab320]] | declaration |
2 | 2 | [[#b57ab320]] | type |
2 | 3 | [[#b57ab320]] | expression |
2 | 4 | [[#b57ab320]] | bodyDeclaration |
3 | 1 | [[#b57ab2c0]] | SINGLE_VARIABLE_DECLARATION |
3 | 2 | [[#b57ab2c0]] | SIMPLE_TYPE |
3 | 3 | [[#b57ab2c0]] | METHOD_INVOCATION |
3 | 4 | [[#b57ab2c0]] | TYPE_DECLARATION |