CloneSet180


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
47240.997switch_group
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
147294
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
247341
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
Clone Instance
1
Line Count
47
Source Line
294
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java

                case OR:
                        switch (this.bits&  ASTNode.ReturnTypeIDMASK) {
                                case T_int:
                                        // 0 | x
                                        if ((this.left.constant != Constant.NotAConstant) &&
                                                   (this.left.constant.typeID() == TypeIds.T_int) &&
                                                   (this.left.constant.intValue() == 0)) {
                                                this.right.generateCode(currentScope, codeStream, valueRequired);
                                        }
                                        else   {
                                                // x | 0
                                                if ((this.right.constant != Constant.NotAConstant) &&
                                                           (this.right.constant.typeID() == TypeIds.T_int) &&
                                                           (this.right.constant.intValue() == 0)) {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                }
                                                else   {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                        this.right.generateCode(currentScope, codeStream, valueRequired);
                                                        if (valueRequired)
                                                                codeStream.ior();
                                                }
                                        }
                                        break;
                                case T_long:
                                        // 0 | x
                                        if ((this.left.constant != Constant.NotAConstant) &&
                                                   (this.left.constant.typeID() == TypeIds.T_long) &&
                                                   (this.left.constant.longValue() == 0L)) {
                                                this.right.generateCode(currentScope, codeStream, valueRequired);
                                        }
                                        else   {
                                                // x | 0
                                                if ((this.right.constant != Constant.NotAConstant) &&
                                                           (this.right.constant.typeID() == TypeIds.T_long) &&
                                                           (this.right.constant.longValue() == 0L)) {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                }
                                                else   {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                        this.right.generateCode(currentScope, codeStream, valueRequired);
                                                        if (valueRequired)
                                                                codeStream.lor();
                                                }
                                        }
                                        break;
                                case T_boolean:  // logical or
                                        generateLogicalOr(currentScope, codeStream, valueRequired);
                                        break;
                              }
                        break;


Clone Instance
2
Line Count
47
Source Line
341
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java

                case XOR:
                        switch (this.bits&  ASTNode.ReturnTypeIDMASK) {
                                case T_int:
                                        // 0 ^ x
                                        if ((this.left.constant != Constant.NotAConstant) &&
                                                   (this.left.constant.typeID() == TypeIds.T_int) &&
                                                   (this.left.constant.intValue() == 0)) {
                                                this.right.generateCode(currentScope, codeStream, valueRequired);
                                        }
                                        else   {
                                                // x ^ 0
                                                if ((this.right.constant != Constant.NotAConstant) &&
                                                           (this.right.constant.typeID() == TypeIds.T_int) &&
                                                           (this.right.constant.intValue() == 0)) {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                }
                                                else   {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                        this.right.generateCode(currentScope, codeStream, valueRequired);
                                                        if (valueRequired)
                                                                codeStream.ixor();
                                                }
                                        }
                                        break;
                                case T_long:
                                        // 0 ^ x
                                        if ((this.left.constant != Constant.NotAConstant) &&
                                                   (this.left.constant.typeID() == TypeIds.T_long) &&
                                                   (this.left.constant.longValue() == 0L)) {
                                                this.right.generateCode(currentScope, codeStream, valueRequired);
                                        }
                                        else   {
                                                // x ^ 0
                                                if ((this.right.constant != Constant.NotAConstant) &&
                                                           (this.right.constant.typeID() == TypeIds.T_long) &&
                                                           (this.right.constant.longValue() == 0L)) {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                }
                                                else   {
                                                        this.left.generateCode(currentScope, codeStream, valueRequired);
                                                        this.right.generateCode(currentScope, codeStream, valueRequired);
                                                        if (valueRequired)
                                                                codeStream.lxor();
                                                }
                                        }
                                        break;
                                case T_boolean:
                                        generateLogicalXor(currentScope,        codeStream, valueRequired);
                                        break;
                              }
                        break;


Clone AbstractionParameter Count: 4Parameter Bindings

case [[#variable5e6461a0]]:
  switch (this.bits&ASTNode.ReturnTypeIDMASK) {
    case T_int:
      // 0 | x
      // 0 ^ x
      if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.typeID() == TypeIds.T_int) && (this.left.constant.intValue() == 0)) {
        this.right.generateCode(currentScope, codeStream, valueRequired);
      }
      else {
        // x | 0
        // x ^ 0
        if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.typeID() == TypeIds.T_int) && (this.right.constant.intValue() == 0)) {
          this.left.generateCode(currentScope, codeStream, valueRequired);
        }
        else {
          this.left.generateCode(currentScope, codeStream, valueRequired);
          this.right.generateCode(currentScope, codeStream, valueRequired);
          if (valueRequired)
            codeStream. [[#variable5e6460e0]]();
        }
      }
      break;
    case T_long:
      // 0 | x
      // 0 ^ x
      if ((this.left.constant != Constant.NotAConstant) && (this.left.constant.typeID() == TypeIds.T_long) && (this.left.constant.longValue() == 0L)) {
        this.right.generateCode(currentScope, codeStream, valueRequired);
      }
      else {
        // x | 0
        // x ^ 0
        if ((this.right.constant != Constant.NotAConstant) && (this.right.constant.typeID() == TypeIds.T_long) && (this.right.constant.longValue() == 0L)) {
          this.left.generateCode(currentScope, codeStream, valueRequired);
        }
        else {
          this.left.generateCode(currentScope, codeStream, valueRequired);
          this.right.generateCode(currentScope, codeStream, valueRequired);
          if (valueRequired)
            codeStream. [[#variable5e646180]]();
        }
      }
      break;
    case T_boolean: // logical or
       [[#variable5e646120]](currentScope, codeStream, valueRequired);
      break;
  }
  break;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5e6461a0]]
OR 
12[[#5e6461a0]]
XOR 
21[[#5e6460e0]]
ior 
22[[#5e6460e0]]
ixor 
31[[#5e646180]]
lor 
32[[#5e646180]]
lxor 
41[[#5e646120]]
generateLogicalOr 
42[[#5e646120]]
generateLogicalXor