CloneSet513


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
35201.000switch_group
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
135464
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
235337
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
Clone Instance
1
Line Count
35
Source Line
464
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java

                        case Binding.LOCAL:  // assigning to a local variable (cannot assign to outer local)
                                LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
                                Constant assignConstant;
                                int increment;
                                // using incr bytecode if possible
                                switch (localBinding.type.id) {
                                        case T_JavaLangString:
                                                codeStream.generateStringConcatenationAppend(currentScope, this, expression);
                                                if (valueRequired) {
                                                        codeStream.dup();
                                                }
                                                codeStream.store(localBinding, false);
                                                return;
                                        case T_int:
                                                if (((assignConstant = expression.constant) != Constant.NotAConstant) &&
                                                           (assignConstant.typeID() != T_float) // only for integral types
                                                    &&     (assignConstant.typeID() != T_double) &&
                                                           ((increment = assignConstant.intValue()) == (short) increment)) { // 16 bits value
                                                        switch (operator) {
                                                                case PLUS:
                                                                        codeStream.iinc(localBinding.resolvedPosition, increment);
                                                                        if (valueRequired) {
                                                                                codeStream.load(localBinding);
                                                                        }
                                                                        return;
                                                                case MINUS:
                                                                        codeStream.iinc(localBinding.resolvedPosition, -increment);
                                                                        if (valueRequired) {
                                                                                codeStream.load(localBinding);
                                                                        }
                                                                        return;
                                                              }
                                                }
                                        default:
                                                codeStream.load(localBinding);
                                      }


Clone Instance
2
Line Count
35
Source Line
337
Source File
plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java

                case Binding.LOCAL:  // assigning to a local variable (cannot assign to outer local)
                        LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
                        Constant assignConstant;
                        int increment;
                        // using incr bytecode if possible
                        switch (localBinding.type.id) {
                                case T_JavaLangString:
                                        codeStream.generateStringConcatenationAppend(currentScope, this, expression);
                                        if (valueRequired) {
                                                codeStream.dup();
                                        }
                                        codeStream.store(localBinding, false);
                                        return;
                                case T_int:
                                        if (((assignConstant = expression.constant) != Constant.NotAConstant) &&
                                                   (assignConstant.typeID() != T_float) // only for integral types
                                            &&     (assignConstant.typeID() != T_double) &&
                                                   ((increment = assignConstant.intValue()) == (short) increment)) { // 16 bits value
                                                switch (operator) {
                                                        case PLUS:
                                                                codeStream.iinc(localBinding.resolvedPosition, increment);
                                                                if (valueRequired) {
                                                                        codeStream.load(localBinding);
                                                                }
                                                                return;
                                                        case MINUS:
                                                                codeStream.iinc(localBinding.resolvedPosition, -increment);
                                                                if (valueRequired) {
                                                                        codeStream.load(localBinding);
                                                                }
                                                                return;
                                                      }
                                        }
                                default:
                                        codeStream.load(localBinding);
                              }


Clone AbstractionParameter Count: 0Parameter Bindings

case Binding.LOCAL: // assigning to a local variable (cannot assign to outer local)
  LocalVariableBinding localBinding = (LocalVariableBinding) this.codegenBinding;
  Constant assignConstant;
  int increment;
  // using incr bytecode if possible
  switch (localBinding.type.id) {
    case T_JavaLangString:
      codeStream.generateStringConcatenationAppend(currentScope, this, expression);
      if (valueRequired) {
        codeStream.dup();
      }
      codeStream.store(localBinding, false);
      return;
    case T_int:
      if (((assignConstant = expression.constant) != Constant.NotAConstant) && (assignConstant.typeID() != T_float) // only for integral types
          && (assignConstant.typeID() != T_double) && ((increment = assignConstant.intValue()) == (short) increment)) { // 16 bits value
        switch (operator) {
          case PLUS:
            codeStream.iinc(localBinding.resolvedPosition, increment);
            if (valueRequired) {
              codeStream.load(localBinding);
            }
            return;
          case MINUS:
            codeStream.iinc(localBinding.resolvedPosition, -increment);
            if (valueRequired) {
              codeStream.load(localBinding);
            }
            return;
        }
      }
    default:
      codeStream.load(localBinding);
  }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None