CloneSet562


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
27220.957block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
127580
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
226632
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
Clone Instance
1
Line Count
27
Source Line
580
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java

                                                                                                                {
        int index;
        if ((index = putInCacheIfAbsent(declaringClass, selector, signature, this.currentIndex)) < 0) {
                // it doesn't exist yet
                this.currentIndex++;
                if ((index = -index) > 0xffff) {
                        this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
                }
                // Write the interface method ref constant into the constant pool
                // First add the tag
                writeU1(isInterface ? InterfaceMethodRefTag:  MethodRefTag);

                int classIndexOffset = this.currentOffset;
                if (currentOffset + 4 >= poolContent.length) {
                        resizePoolContents(4);
                }
                currentOffset += 4;

                final int classIndex = literalIndexForType(declaringClass);
                final int nameAndTypeIndex = literalIndexForNameAndType(selector, signature);

                poolContent[classIndexOffset++ ] = (byte) (classIndex >> 8);
                poolContent[classIndexOffset++ ] = (byte) classIndex;
                poolContent[classIndexOffset++ ] = (byte) (nameAndTypeIndex >> 8);
                poolContent[classIndexOffset] = (byte) nameAndTypeIndex;
        }
        return index;
                                                                                                                }


Clone Instance
2
Line Count
26
Source Line
632
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java

                                                                                      {
        int index;
        if ((index = putInCacheIfAbsent(declaringClass, name, signature, this.currentIndex)) < 0) {
                this.currentIndex++;
                // doesn't exist yet
                if ((index = -index) > 0xffff) {
                        this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
                }
                // Write the interface method ref constant into the constant pool
                // First add the tag
                writeU1(FieldRefTag);
                int classIndexOffset = this.currentOffset;
                if (currentOffset + 4 >= poolContent.length) {
                        resizePoolContents(4);
                }
                currentOffset += 4;

                final int classIndex = literalIndexForType(declaringClass);
                final int nameAndTypeIndex = literalIndexForNameAndType(name, signature);

                poolContent[classIndexOffset++ ] = (byte) (classIndex >> 8);
                poolContent[classIndexOffset++ ] = (byte) classIndex;
                poolContent[classIndexOffset++ ] = (byte) (nameAndTypeIndex >> 8);
                poolContent[classIndexOffset] = (byte) nameAndTypeIndex;
        }
        return index;
                                                                                      }


Clone AbstractionParameter Count: 2Parameter Bindings

{
  int index;
  if ((index = putInCacheIfAbsent(declaringClass,  [[#variableb9404100]], signature, this.currentIndex)) < 0) {
    // it doesn't exist yet
    this.currentIndex++;
    // doesn't exist yet
    if ((index = -index) > 0xffff) {
      this.classFile.referenceBinding.scope.problemReporter().noMoreAvailableSpaceInConstantPool(this.classFile.referenceBinding.scope.referenceType());
    }
    // Write the interface method ref constant into the constant pool
    // First add the tag
    writeU1( [[#variableb8de6660]]);
    int classIndexOffset = this.currentOffset;
    if (currentOffset + 4 >= poolContent.length) {
      resizePoolContents(4);
    }
    currentOffset += 4;
    final int classIndex = literalIndexForType(declaringClass);
    final int nameAndTypeIndex = literalIndexForNameAndType( [[#variableb9404100]], signature);
    poolContent[classIndexOffset++ ] = (byte) (classIndex >> 8);
    poolContent[classIndexOffset++ ] = (byte) classIndex;
    poolContent[classIndexOffset++ ] = (byte) (nameAndTypeIndex >> 8);
    poolContent[classIndexOffset] = (byte) nameAndTypeIndex;
  }
  return index;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b9404100]]
selector 
12[[#b9404100]]
name 
21[[#b8de6660]]
isInterface ? InterfaceMethodRefTag: MethodRefTag 
22[[#b8de6660]]
FieldRefTag