CloneSet591


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23220.956executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12363
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
22587
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
Clone Instance
1
Line Count
23
Source Line
63
Source File
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();
                             }
                                                                             }


Clone Instance
2
Line Count
25
Source Line
87
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java

                       { //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();
                             }
                       }


Clone AbstractionParameter Count: 2Parameter Bindings

{ //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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b9dbc7e0]]
left.constant.booleanValue() 
12[[#b9dbc7e0]]
!left.constant.booleanValue() 
21[[#b9dbc780]]
right.constant.booleanValue() 
22[[#b9dbc780]]
!right.constant.booleanValue()