Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
23 | 2 | 2 | 0.956 | executable_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 23 | 63 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java |
2 | 25 | 87 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java |
| ||||
{ if ((left.constant != Constant.NotAConstant) && (left.constant.typeID() == T_boolean)) { if (left.constant.booleanValue()) { // true == anything // this is equivalent to the right argument inits result = right.analyseCode(currentScope, flowContext, flowInfo); } else { // false == anything // this is equivalent to the right argument inits negated result = right.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition(); } } else if ((right.constant != Constant.NotAConstant) && (right.constant.typeID() == T_boolean)) { if (right.constant.booleanValue()) { // anything == true // this is equivalent to the left argument inits result = left.analyseCode(currentScope, flowContext, flowInfo); } else { // anything == false // this is equivalent to the right argument inits negated result = left.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition(); } } else { result = right.analyseCode( currentScope, flowContext, left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits()).unconditionalInits(); } } |
| ||||
{ //NOT_EQUAL : if ((left.constant != Constant.NotAConstant) && (left.constant.typeID() == T_boolean)) { if ( !left.constant.booleanValue()) { // false != anything // this is equivalent to the right argument inits result = right.analyseCode(currentScope, flowContext, flowInfo); } else { // true != anything // this is equivalent to the right argument inits negated result = right.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition(); } } else if ((right.constant != Constant.NotAConstant) && (right.constant.typeID() == T_boolean)) { if ( !right.constant.booleanValue()) { // anything != false // this is equivalent to the right argument inits result = left.analyseCode(currentScope, flowContext, flowInfo); } else { // anything != true // this is equivalent to the right argument inits negated result = left.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition(); } } else { result = right.analyseCode( currentScope, flowContext, left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits()). /* unneeded since we flatten it: asNegatedCondition(). */ unconditionalInits(); } } |
| |||
{ //NOT_EQUAL : if ((left.constant != Constant.NotAConstant) && (left.constant.typeID() == T_boolean)) { if ( [[#variableb9dbc7e0]]) { // true == anything // false != anything // this is equivalent to the right argument inits result = right.analyseCode(currentScope, flowContext, flowInfo); } else { // false == anything // true != anything // this is equivalent to the right argument inits negated result = right.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition(); } } else if ((right.constant != Constant.NotAConstant) && (right.constant.typeID() == T_boolean)) { if ( [[#variableb9dbc780]]) { // anything == true // anything != false // this is equivalent to the left argument inits // this is equivalent to the right argument inits result = left.analyseCode(currentScope, flowContext, flowInfo); } else { // anything == false // anything != true // this is equivalent to the right argument inits negated result = left.analyseCode(currentScope, flowContext, flowInfo).asNegatedCondition(); } } else { result = right.analyseCode(currentScope, flowContext, left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits()). /* unneeded since we flatten it: asNegatedCondition(). */ unconditionalInits(); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b9dbc7e0]] | left.constant.booleanValue() |
1 | 2 | [[#b9dbc7e0]] | !left.constant.booleanValue() |
2 | 1 | [[#b9dbc780]] | right.constant.booleanValue() |
2 | 2 | [[#b9dbc780]] | !right.constant.booleanValue() |