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.951 | executable_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 171 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java |
2 | 13 | 189 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java |
| ||||
{ if ((left.bits& UnnecessaryCast) == 0 && left.resolvedType.isBaseType()) { // narrowing conversion on base type may change value, thus necessary leftIsCast = false; } else { TypeBinding alternateLeftType = ((CastExpression) left).expression.resolvedType; if (alternateLeftType == null) return; // cannot do better if ((alternateLeftTypeId = alternateLeftType.id) == leftTypeId) { // obvious identity cast scope.problemReporter().unnecessaryCast((CastExpression) left); leftIsCast = false; } else if (alternateLeftTypeId == T_null) { alternateLeftTypeId = leftTypeId; // tolerate null argument cast leftIsCast = false; } } } |
| ||||
{ if ((right.bits& UnnecessaryCast) == 0 && right.resolvedType.isBaseType()) { // narrowing conversion on base type may change value, thus necessary rightIsCast = false; } else { TypeBinding alternateRightType = ((CastExpression) right).expression.resolvedType; if (alternateRightType == null) return; // cannot do better if ((alternateRightTypeId = alternateRightType.id) == rightTypeId) { // obvious identity cast scope.problemReporter().unnecessaryCast((CastExpression) right); rightIsCast = false; } else if (alternateRightTypeId == T_null) { alternateRightTypeId = rightTypeId; // tolerate null argument cast rightIsCast = false; } } } |
| |||
{ if (( [[#variable565cb460]].bits&UnnecessaryCast) == 0 && [[#variable565cb460]].resolvedType.isBaseType()) { [[#variableb1ebf600]]= false; } else { TypeBinding [[#variable565ca8c0]]= ((CastExpression) [[#variable565cb460]]).expression.resolvedType; if ( [[#variable565ca8c0]]== null) return; // cannot do better if (( [[#variableb1ebe5a0]]= [[#variable565ca8c0]].id) == [[#variable565cb3c0]]) { // obvious identity cast scope.problemReporter().unnecessaryCast((CastExpression) [[#variable565cb460]]); [[#variableb1ebf600]]= false; } else if ( [[#variableb1ebe5a0]]== T_null) { [[#variableb1ebe5a0]]= [[#variable565cb3c0]]; // tolerate null argument cast [[#variableb1ebf600]]= false; } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#565cb460]] | left |
1 | 2 | [[#565cb460]] | right |
2 | 1 | [[#b1ebf600]] | // narrowing conversion on base type may change value, thus necessary leftIsCast |
2 | 2 | [[#b1ebf600]] | // narrowing conversion on base type may change value, thus necessary rightIsCast |
3 | 1 | [[#565ca8c0]] | alternateLeftType |
3 | 2 | [[#565ca8c0]] | alternateRightType |
4 | 1 | [[#b1ebe5a0]] | alternateLeftTypeId |
4 | 2 | [[#b1ebe5a0]] | alternateRightTypeId |
5 | 1 | [[#565cb3c0]] | leftTypeId |
5 | 2 | [[#565cb3c0]] | rightTypeId |