CloneSet353


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
44210.976switch_group
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
144270
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
2441796
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
Clone Instance
1
Line Count
44
Source Line
270
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java

                        case IAnnotationComponentValue.BYTE_TAG:
                        case IAnnotationComponentValue.CHAR_TAG:
                        case IAnnotationComponentValue.DOUBLE_TAG:
                        case IAnnotationComponentValue.FLOAT_TAG:
                        case IAnnotationComponentValue.INTEGER_TAG:
                        case IAnnotationComponentValue.LONG_TAG:
                        case IAnnotationComponentValue.SHORT_TAG:
                        case IAnnotationComponentValue.BOOLEAN_TAG:
                        case IAnnotationComponentValue.STRING_TAG:
                                IConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
                                String value = null;
                                switch (constantPoolEntry.getKind()) {
                                        case IConstantPoolConstant.CONSTANT_Long:
                                                value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Float:
                                                value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Double:
                                                value = Double.toString(constantPoolEntry.getDoubleValue());
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Integer:
                                                switch (annotationComponentValue.getTag()) {
                                                        case IAnnotationComponentValue.CHAR_TAG:
                                                                value = "\'" + (char) constantPoolEntry.getIntegerValue() + "\'"; //$NON-NLS-1$//$NON-NLS-2$
                                                                break;
                                                        case IAnnotationComponentValue.BOOLEAN_TAG:
                                                                value = constantPoolEntry.getIntegerValue() == 1 ? "true":  "false"; //$NON-NLS-1$//$NON-NLS-2$
                                                                break;
                                                        case IAnnotationComponentValue.BYTE_TAG:
                                                                value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
                                                                break;
                                                        case IAnnotationComponentValue.SHORT_TAG:
                                                                value =  "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
                                                                break;
                                                        case IAnnotationComponentValue.INTEGER_TAG:
                                                                value =  "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
                                                      }
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Utf8:
                                                value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\""; //$NON-NLS-1$//$NON-NLS-2$
                                      }
                                buffer.append(Messages.bind(Messages.disassembler_annotationdefaultvalue, value));
                                break;


Clone Instance
2
Line Count
44
Source Line
1796
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java

                        case IAnnotationComponentValue.BYTE_TAG:
                        case IAnnotationComponentValue.CHAR_TAG:
                        case IAnnotationComponentValue.DOUBLE_TAG:
                        case IAnnotationComponentValue.FLOAT_TAG:
                        case IAnnotationComponentValue.INTEGER_TAG:
                        case IAnnotationComponentValue.LONG_TAG:
                        case IAnnotationComponentValue.SHORT_TAG:
                        case IAnnotationComponentValue.BOOLEAN_TAG:
                        case IAnnotationComponentValue.STRING_TAG:
                                IConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
                                String value = null;
                                switch (constantPoolEntry.getKind()) {
                                        case IConstantPoolConstant.CONSTANT_Long:
                                                value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Float:
                                                value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Double:
                                                value = Double.toString(constantPoolEntry.getDoubleValue());
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Integer:
                                                switch (annotationComponentValue.getTag()) {
                                                        case IAnnotationComponentValue.CHAR_TAG:
                                                                value = "\'" + (char) constantPoolEntry.getIntegerValue() + "\'"; //$NON-NLS-1$//$NON-NLS-2$
                                                                break;
                                                        case IAnnotationComponentValue.BOOLEAN_TAG:
                                                                value = constantPoolEntry.getIntegerValue() == 1 ? "true":  "false"; //$NON-NLS-1$//$NON-NLS-2$
                                                                break;
                                                        case IAnnotationComponentValue.BYTE_TAG:
                                                                value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
                                                                break;
                                                        case IAnnotationComponentValue.SHORT_TAG:
                                                                value =  "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
                                                                break;
                                                        case IAnnotationComponentValue.INTEGER_TAG:
                                                                value =  "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
                                                      }
                                                break;
                                        case IConstantPoolConstant.CONSTANT_Utf8:
                                                value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\""; //$NON-NLS-1$//$NON-NLS-2$
                                      }
                                buffer.append(value);
                                break;


Clone AbstractionParameter Count: 1Parameter Bindings

case IAnnotationComponentValue.BYTE_TAG:
case IAnnotationComponentValue.CHAR_TAG:
case IAnnotationComponentValue.DOUBLE_TAG:
case IAnnotationComponentValue.FLOAT_TAG:
case IAnnotationComponentValue.INTEGER_TAG:
case IAnnotationComponentValue.LONG_TAG:
case IAnnotationComponentValue.SHORT_TAG:
case IAnnotationComponentValue.BOOLEAN_TAG:
case IAnnotationComponentValue.STRING_TAG:
  IConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
  String value = null;
  switch (constantPoolEntry.getKind()) {
    case IConstantPoolConstant.CONSTANT_Long:
      value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
      break;
    case IConstantPoolConstant.CONSTANT_Float:
      value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
      break;
    case IConstantPoolConstant.CONSTANT_Double:
      value = Double.toString(constantPoolEntry.getDoubleValue());
      break;
    case IConstantPoolConstant.CONSTANT_Integer:
      switch (annotationComponentValue.getTag()) {
        case IAnnotationComponentValue.CHAR_TAG:
          value = "\'" + (char) constantPoolEntry.getIntegerValue() + "\'"; //$NON-NLS-1$//$NON-NLS-2$
          break;
        case IAnnotationComponentValue.BOOLEAN_TAG:
          value = constantPoolEntry.getIntegerValue() == 1 ? "true": "false"; //$NON-NLS-1$//$NON-NLS-2$
          break;
        case IAnnotationComponentValue.BYTE_TAG:
          value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
          break;
        case IAnnotationComponentValue.SHORT_TAG:
          value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
          break;
        case IAnnotationComponentValue.INTEGER_TAG:
          value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
      }
      break;
    case IConstantPoolConstant.CONSTANT_Utf8:
      value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\""; //$NON-NLS-1$//$NON-NLS-2$
  }
  buffer.append( [[#variablec185c2a0]]);
  break;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#c185c2a0]]
Messages.bind(Messages.disassembler_annotationdefaultvalue, value) 
12[[#c185c2a0]]
value