Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 3 | 0.991 | statement_sequence[9] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 437 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java |
2 | 14 | 615 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java |
| ||||
hashCodeMethod.setBody(body); // PRIME NUMBER VariableDeclarationFragment frag = fAst.newVariableDeclarationFragment(); frag.setName(fAst.newSimpleName(VARIABLE_NAME_PRIME)); frag.setInitializer(fAst.newNumberLiteral(PRIME_NUMBER)); VariableDeclarationStatement primeNumberDeclaration = fAst.newVariableDeclarationStatement(frag); primeNumberDeclaration.modifiers().add(fAst.newModifier(ModifierKeyword.FINAL_KEYWORD)); primeNumberDeclaration.setType(fAst.newPrimitiveType(PrimitiveType.INT)); body.statements().add(primeNumberDeclaration); // RESULT VariableDeclarationFragment fragment = fAst.newVariableDeclarationFragment(); |
| ||||
hashCodeMethod.setBody(body); // PRIME NUMBER VariableDeclarationFragment frag = fAst.newVariableDeclarationFragment(); frag.setName(fAst.newSimpleName(VARIABLE_NAME_PRIME)); frag.setInitializer(fAst.newNumberLiteral(PRIME_NUMBER)); VariableDeclarationStatement primeNumberDeclaration = fAst.newVariableDeclarationStatement(frag); primeNumberDeclaration.modifiers().add(fAst.newModifier(ModifierKeyword.FINAL_KEYWORD)); primeNumberDeclaration.setType(fAst.newPrimitiveType(PrimitiveType.INT)); body.statements().add(primeNumberDeclaration); // IF STATEMENT IfStatement ifStatement = fAst.newIfStatement(); |
| |||
hashCodeMethod.setBody(body); // PRIME NUMBER VariableDeclarationFragment frag = fAst.newVariableDeclarationFragment(); frag.setName(fAst.newSimpleName(VARIABLE_NAME_PRIME)); frag.setInitializer(fAst.newNumberLiteral(PRIME_NUMBER)); VariableDeclarationStatement primeNumberDeclaration = fAst.newVariableDeclarationStatement(frag); primeNumberDeclaration.modifiers().add(fAst.newModifier(ModifierKeyword.FINAL_KEYWORD)); primeNumberDeclaration.setType(fAst.newPrimitiveType(PrimitiveType.INT)); body.statements().add(primeNumberDeclaration); [[#variableb1a967e0]] [[#variable54ddc980]]= fAst. [[#variable54f9dea0]](); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b1a967e0]] | // IF STATEMENT IfStatement |
1 | 2 | [[#b1a967e0]] | // RESULT VariableDeclarationFragment |
2 | 1 | [[#54ddc980]] | ifStatement |
2 | 2 | [[#54ddc980]] | fragment |
3 | 1 | [[#54f9dea0]] | newIfStatement |
3 | 2 | [[#54f9dea0]] | newVariableDeclarationFragment |