CloneSet1070


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17250.954executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
117230
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
217208
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
Clone Instance
1
Line Count
17
Source Line
230
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java

                                                       {
                                        left.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, !leftIsConst);
                                        // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1
                                        if (leftIsConst && !leftIsTrue) {
                                                codeStream.goto_(falseLabel);
                                                codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
                                                break generateOperands; // no need to generate right operand
                                        }
                                        if (rightInitStateIndex != -1) {
                                                codeStream.
                                                                 addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
                                        }
                                        right.generateOptimizedBoolean(currentScope, codeStream, null, falseLabel, 
                                                        valueRequired && !rightIsConst);
                                        if (valueRequired && rightIsConst && !rightIsTrue) {
                                                codeStream.goto_(falseLabel);
                                                codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
                                        }
                                                       }


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

                                                       {
                                        // implicit falling through the FALSE case
                                        left.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, !leftIsConst);
                                        // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1
                                        if (leftIsConst && leftIsTrue) {
                                                codeStream.goto_(trueLabel);
                                                codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
                                                break generateOperands; // no need to generate right operand
                                        }
                                        if (rightInitStateIndex != -1) {
                                                codeStream.
                                                                 addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
                                        }
                                        right.generateOptimizedBoolean(currentScope, codeStream, trueLabel, null, valueRequired && !rightIsConst);
                                        if (valueRequired && rightIsConst && rightIsTrue) {
                                                codeStream.goto_(trueLabel);
                                                codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
                                        }
                                                       }


Clone AbstractionParameter Count: 5Parameter Bindings

{
  // implicit falling through the FALSE case
  left.generateOptimizedBoolean(currentScope, codeStream,  [[#variable59cbf360]],  [[#variable59cbf2a0]], !leftIsConst);
  // need value, e.g. if (a == 1 && ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a!=1
  // need value, e.g. if (a == 1 || ((b = 2) > 0)) {} -> shouldn't initialize 'b' if a==1
  if (leftIsConst && [[#variable59cbf240]]) {
    codeStream.goto_( [[#variable59cbf1e0]]);
    codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
    break generateOperands; // no need to generate right operand
  }
  if (rightInitStateIndex != -1) {
    codeStream.addDefinitelyAssignedVariables(currentScope, rightInitStateIndex);
  }
  right.generateOptimizedBoolean(currentScope, codeStream,  [[#variable59cbf360]],  [[#variable59cbf2a0]], valueRequired && !rightIsConst);
  if (valueRequired && rightIsConst && [[#variable59cbf160]]) {
    codeStream.goto_( [[#variable59cbf1e0]]);
    codeStream.updateLastRecordedEndPC(currentScope, codeStream.position);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#59cbf360]]
null 
12[[#59cbf360]]
trueLabel 
21[[#59cbf2a0]]
falseLabel 
22[[#59cbf2a0]]
null 
31[[#59cbf240]]
!leftIsTrue 
32[[#59cbf240]]
leftIsTrue 
41[[#59cbf1e0]]
falseLabel 
42[[#59cbf1e0]]
trueLabel 
51[[#59cbf160]]
!rightIsTrue 
52[[#59cbf160]]
rightIsTrue