Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
18 | 2 | 3 | 0.960 | statement_sequence_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 290 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ExpressionsFix.java |
2 | 18 | 324 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java |
| ||||
while (fExpressions.size() > 0) { ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) fExpressions.iterator().next(); fExpressions.remove(parenthesizedExpression); ParenthesizedExpression down = parenthesizedExpression; while (fExpressions.contains(down.getExpression())) { down = (ParenthesizedExpression) down.getExpression(); fExpressions.remove(down); } ASTNode move = rewrite.createMoveTarget(down.getExpression()); ParenthesizedExpression top = parenthesizedExpression; while (fExpressions.contains(top.getParent())) { top = (ParenthesizedExpression) top.getParent(); fExpressions.remove(top); } rewrite.replace(top, move, group); } |
| ||||
while (fUnnecessaryCasts.size() > 0) { CastExpression castExpression = (CastExpression) fUnnecessaryCasts.iterator().next(); fUnnecessaryCasts.remove(castExpression); CastExpression down = castExpression; while (fUnnecessaryCasts.contains(down.getExpression())) { down = (CastExpression) down.getExpression(); fUnnecessaryCasts.remove(down); } ASTNode move = rewrite.createMoveTarget(down.getExpression()); CastExpression top = castExpression; while (fUnnecessaryCasts.contains(top.getParent())) { top = (CastExpression) top.getParent(); fUnnecessaryCasts.remove(top); } rewrite.replace(top, move, group); } |
| |||
while ( [[#variablebaf26640]].size() > 0) { [[#variablebaf265c0]] [[#variablebaf262a0]]= ( [[#variablebaf265c0]]) [[#variablebaf26640]].iterator().next(); [[#variablebaf26640]].remove( [[#variablebaf262a0]]); [[#variablebaf265c0]] down = [[#variablebaf262a0]]; while ( [[#variablebaf26640]].contains(down.getExpression())) { down = ( [[#variablebaf265c0]]) down.getExpression(); [[#variablebaf26640]].remove(down); } ASTNode move = rewrite.createMoveTarget(down.getExpression()); [[#variablebaf265c0]] top = [[#variablebaf262a0]]; while ( [[#variablebaf26640]].contains(top.getParent())) { top = ( [[#variablebaf265c0]]) top.getParent(); [[#variablebaf26640]].remove(top); } rewrite.replace(top, move, group); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#baf26640]] | fUnnecessaryCasts |
1 | 2 | [[#baf26640]] | fExpressions |
2 | 1 | [[#baf265c0]] | CastExpression |
2 | 2 | [[#baf265c0]] | ParenthesizedExpression |
3 | 1 | [[#baf262a0]] | castExpression |
3 | 2 | [[#baf262a0]] | parenthesizedExpression |