Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
4 | 2 | 6 | 0.956 | statement_sequence_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 4 | 625 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java |
2 | 4 | 632 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java |
| ||||
if (oldField != null) { FieldDeclaration newField = createNewFieldDeclarationNode(infos[offset], sourceRewriter.getRoot(), mapping, unitRewriter.getASTRewrite(), oldField); unitRewriter.getASTRewrite().getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newField, ASTNodes.getInsertionIndex(newField, declaration.bodyDeclarations()), unitRewriter.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PUSH_DOWN)); ImportRewriteUtil.addImports(unitRewriter, oldField.getParent(), new HashMap(), new HashMap(), false); } |
| ||||
if (oldMethod != null) { MethodDeclaration newMethod = createNewMethodDeclarationNode(infos[offset], sourceRewriter.getRoot(), mapping, unitRewriter, oldMethod); unitRewriter.getASTRewrite().getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newMethod, ASTNodes.getInsertionIndex(newMethod, declaration.bodyDeclarations()), unitRewriter.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PUSH_DOWN)); ImportRewriteUtil.addImports(unitRewriter, oldMethod, new HashMap(), new HashMap(), false); } |
| |||
if ( [[#variable9c66b360]]!= null) { [[#variable9c66b2e0]] [[#variable9c66b220]]= [[#variable9c66b180]](infos[offset], sourceRewriter.getRoot(), mapping, [[#variable9c66b100]], [[#variable9c66b360]]); unitRewriter.getASTRewrite().getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt( [[#variable9c66b220]], ASTNodes.getInsertionIndex( [[#variable9c66b220]], declaration.bodyDeclarations()), unitRewriter.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PUSH_DOWN)); ImportRewriteUtil.addImports(unitRewriter, [[#variable9c66b0a0]], new HashMap(), new HashMap(), false); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#9c66b360]] | oldField |
1 | 2 | [[#9c66b360]] | oldMethod |
2 | 1 | [[#9c66b2e0]] | FieldDeclaration |
2 | 2 | [[#9c66b2e0]] | MethodDeclaration |
3 | 1 | [[#9c66b220]] | newField |
3 | 2 | [[#9c66b220]] | newMethod |
4 | 1 | [[#9c66b180]] | createNewFieldDeclarationNode |
4 | 2 | [[#9c66b180]] | createNewMethodDeclarationNode |
5 | 1 | [[#9c66b100]] | unitRewriter.getASTRewrite() |
5 | 2 | [[#9c66b100]] | unitRewriter |
6 | 1 | [[#9c66b0a0]] | oldField.getParent() |
6 | 2 | [[#9c66b0a0]] | oldMethod |