Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
13 | 2 | 5 | 0.956 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 1189 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java |
2 | 13 | 1204 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java |
| ||||
private ASTNode getNewQualifiedNameNode(ITypeBinding[] parameters, Name name) { final AST ast = name.getAST(); boolean raw = false; final ITypeBinding binding = name.resolveTypeBinding(); if (binding != null && binding.isRawType()) raw = true; if (parameters != null && parameters.length > 0 && !raw) { final ParameterizedType type = ast.newParameterizedType(ast.newSimpleType(ast.newName(fQualifiedTypeName))); for (int index = 0; index < parameters.length; index++) type.typeArguments().add(ast.newSimpleType(ast.newSimpleName(parameters[index].getName()))); return type; } return ast.newName(fQualifiedTypeName); } |
| ||||
private ASTNode getNewUnqualifiedTypeNode(ITypeBinding[] parameters, Name name) { final AST ast = name.getAST(); boolean raw = false; final ITypeBinding binding = name.resolveTypeBinding(); if (binding != null && binding.isRawType()) raw = true; if (parameters != null && parameters.length > 0 && !raw) { final ParameterizedType type = ast.newParameterizedType(ast.newSimpleType(ast.newSimpleName(fType.getElementName()))); for (int index = 0; index < parameters.length; index++) type.typeArguments().add(ast.newSimpleType(ast.newSimpleName(parameters[index].getName()))); return type; } return ast.newSimpleType(ast.newSimpleName(fType.getElementName())); } |
| |||
private ASTNode [[#variable92c01820]](ITypeBinding[] parameters, Name name) { final AST ast = name.getAST(); boolean raw = false; final ITypeBinding binding = name.resolveTypeBinding(); if (binding != null && binding.isRawType()) raw = true; if (parameters != null && parameters.length > 0 && !raw) { final ParameterizedType type = ast.newParameterizedType(ast.newSimpleType(ast. [[#variable92c01780]]( [[#variable92c01700]]))); for (int index = 0; index < parameters.length; index++) type.typeArguments().add(ast.newSimpleType(ast.newSimpleName(parameters[index].getName()))); return type; } return ast. [[#variable92c016a0]]( [[#variable92c01600]]); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#92c01820]] | getNewQualifiedNameNode |
1 | 2 | [[#92c01820]] | getNewUnqualifiedTypeNode |
2 | 1 | [[#92c01780]] | newName |
2 | 2 | [[#92c01780]] | newSimpleName |
3 | 1 | [[#92c01700]] | fQualifiedTypeName |
3 | 2 | [[#92c01700]] | fType.getElementName() |
4 | 1 | [[#92c016a0]] | newName |
4 | 2 | [[#92c016a0]] | newSimpleType |
5 | 1 | [[#92c01600]] | fQualifiedTypeName |
5 | 2 | [[#92c01600]] | ast.newSimpleName(fType.getElementName()) |