CloneSet523


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29230.995statement_sequence[10]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12931
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
22834
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
Clone Instance
1
Line Count
29
Source Line
31
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java

                Constant cst = this.left.optimizedBooleanConstant();
                boolean isLeftOptimizedTrue = cst != Constant.NotAConstant && cst.booleanValue() == true;
                boolean isLeftOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false;

                if (isLeftOptimizedTrue) {
                        // TRUE && anything
                        // need to be careful of scenario:
                        //  (x && y) && !z, if passing the left info to the right, it would
                        // be swapped by the !
                        FlowInfo mergedInfo = left.analyseCode(currentScope, flowContext, flowInfo)
                                        .unconditionalInits();
                        mergedInfo = right.analyseCode(currentScope, flowContext, mergedInfo);
                        mergedInitStateIndex = currentScope.methodScope()
                                        .recordInitializationStates(mergedInfo);
                        return mergedInfo;
                }

                FlowInfo leftInfo = left.analyseCode(currentScope, flowContext, flowInfo);
                // need to be careful of scenario:
                //  (x && y) && !z, if passing the left info to the right, it would be
                // swapped by the !
                FlowInfo rightInfo = leftInfo.initsWhenTrue().unconditionalCopy();
                rightInitStateIndex = currentScope.methodScope().recordInitializationStates(rightInfo);

                int previousMode = rightInfo.reachMode();
                if (isLeftOptimizedFalse) {
                        rightInfo.setReachMode(FlowInfo.UNREACHABLE);
                }
                rightInfo = right.analyseCode(currentScope, flowContext, rightInfo);


Clone Instance
2
Line Count
28
Source Line
34
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java

                Constant cst = this.left.optimizedBooleanConstant();
                boolean isLeftOptimizedTrue = cst != Constant.NotAConstant && cst.booleanValue() == true;
                boolean isLeftOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false;

                if (isLeftOptimizedFalse) {
                        // FALSE || anything
                         // need to be careful of scenario:
                        //              (x || y) || !z, if passing the left info to the right, it would be swapped by the !
                        FlowInfo mergedInfo = left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
                        mergedInfo = right.analyseCode(currentScope, flowContext, mergedInfo);
                        mergedInitStateIndex =
                                currentScope.methodScope().recordInitializationStates(mergedInfo);
                        return mergedInfo;
                }

                FlowInfo leftInfo = left.analyseCode(currentScope, flowContext, flowInfo);

                 // need to be careful of scenario:
                //              (x || y) || !z, if passing the left info to the right, it would be swapped by the !
                FlowInfo rightInfo = leftInfo.initsWhenFalse().unconditionalCopy();
                rightInitStateIndex =
                        currentScope.methodScope().recordInitializationStates(rightInfo);

                int previousMode = rightInfo.reachMode();
                if (isLeftOptimizedTrue) {
                        rightInfo.setReachMode(FlowInfo.UNREACHABLE);
                }
                rightInfo = right.analyseCode(currentScope, flowContext, rightInfo);


Clone AbstractionParameter Count: 3Parameter Bindings

Constant cst = this.left.optimizedBooleanConstant();
boolean isLeftOptimizedTrue = cst != Constant.NotAConstant && cst.booleanValue() == true;
boolean isLeftOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false;
if ( [[#variableb9b3c7c0]]) {
  // TRUE && anything
  // FALSE || anything
  // need to be careful of scenario:
  //  (x && y) && !z, if passing the left info to the right, it would
  // be swapped by the !
  //              (x || y) || !z, if passing the left info to the right, it would be swapped by the !
  FlowInfo mergedInfo = left.analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
  mergedInfo = right.analyseCode(currentScope, flowContext, mergedInfo);
  mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
  return mergedInfo;
}
FlowInfo leftInfo = left.analyseCode(currentScope, flowContext, flowInfo);
// need to be careful of scenario:
//  (x && y) && !z, if passing the left info to the right, it would be
// swapped by the !
//              (x || y) || !z, if passing the left info to the right, it would be swapped by the !
FlowInfo rightInfo = leftInfo. [[#variableb6886d00]]().unconditionalCopy();
rightInitStateIndex = currentScope.methodScope().recordInitializationStates(rightInfo);
int previousMode = rightInfo.reachMode();
if ( [[#variableb9b3c840]]) {
  rightInfo.setReachMode(FlowInfo.UNREACHABLE);
}
rightInfo = right.analyseCode(currentScope, flowContext, rightInfo);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b9b3c7c0]]
isLeftOptimizedTrue 
12[[#b9b3c7c0]]
isLeftOptimizedFalse 
21[[#b6886d00]]
initsWhenTrue 
22[[#b6886d00]]
initsWhenFalse 
31[[#b9b3c840]]
isLeftOptimizedFalse 
32[[#b9b3c840]]
isLeftOptimizedTrue