CloneSet474


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
33240.986class_body_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13122
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/SimpleLookupTable.java
23320
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/HashtableOfArrayToObject.java
Clone Instance
1
Line Count
31
Source Line
22
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/SimpleLookupTable.java

public Object[] valueTable;

public int elementSize; // number of elements in the table

public int threshold;

public SimpleLookupTable() {
        this(13);
}

public SimpleLookupTable(int size) {
        this.elementSize = 0;
        this.threshold = size; // size represents the expected number of elements
        int extraRoom = (int) (size * 1.5F);
        if (this.threshold == extraRoom)
                extraRoom++;
        this.keyTable = new Object[extraRoom];
        this.valueTable = new Object[extraRoom];
}

public Object clone() throws CloneNotSupportedException {
        SimpleLookupTable result = (SimpleLookupTable) super.clone();
        result.elementSize = this.elementSize;
        result.threshold = this.threshold;

        int length = this.keyTable.length;
        result.keyTable = new Object[length];
        System.arraycopy(this.keyTable, 0, result.keyTable, 0, length);

        length = this.valueTable.length;
        result.valueTable = new Object[length];
        System.arraycopy(this.valueTable, 0, result.valueTable, 0, length);
        return result;
}


Clone Instance
2
Line Count
33
Source Line
20
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/HashtableOfArrayToObject.java

        public Object[] valueTable;

        public int elementSize; // number of elements in the table

        int threshold;

        public HashtableOfArrayToObject() {
                this(13);
        }

        public HashtableOfArrayToObject(int size) {

                this.elementSize = 0;
                this.threshold = size; // size represents the expected number of elements
                int extraRoom = (int) (size * 1.75F);
                if (this.threshold == extraRoom)
                        extraRoom++;
                this.keyTable = new Object[extraRoom][];
                this.valueTable = new Object[extraRoom];
        }

        public Object clone() throws CloneNotSupportedException {
                HashtableOfArrayToObject result = (HashtableOfArrayToObject) super.clone();
                result.elementSize = this.elementSize;
                result.threshold = this.threshold;

                int length = this.keyTable.length;
                result.keyTable = new Object[length][];
                System.arraycopy(this.keyTable, 0, result.keyTable, 0, length);

                length = this.valueTable.length;
                result.valueTable = new Object[length];
                System.arraycopy(this.valueTable, 0, result.valueTable, 0, length);
                return result;
        }


Clone AbstractionParameter Count: 4Parameter Bindings

public Object[] valueTable;

public int elementSize; // number of elements in the table

 [[#variablebe761400]]int threshold;

public [[#variablebe7613c0]]() {
  this(13);
}

public [[#variablebe7613c0]](int size) {
  this.elementSize = 0;
  this.threshold = size; // size represents the expected number of elements
  int extraRoom = (int) (size *  [[#variableb5f84580]]);
  if (this.threshold == extraRoom)
    extraRoom++;
  this.keyTable = new Object[extraRoom] [[#variableb5f845a0]];
  this.valueTable = new Object[extraRoom];
}

public Object clone() throws CloneNotSupportedException {
   [[#variablebe7613c0]] result = ( [[#variablebe7613c0]]) super.clone();
  result.elementSize = this.elementSize;
  result.threshold = this.threshold;
  int length = this.keyTable.length;
  result.keyTable = new Object[length] [[#variableb5f845a0]];
  System.arraycopy(this.keyTable, 0, result.keyTable, 0, length);
  length = this.valueTable.length;
  result.valueTable = new Object[length];
  System.arraycopy(this.valueTable, 0, result.valueTable, 0, length);
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#be761400]]
12[[#be761400]]
public 
21[[#be7613c0]]
HashtableOfArrayToObject 
22[[#be7613c0]]
SimpleLookupTable 
31[[#b5f84580]]
1.75F 
32[[#b5f84580]]
1.5F 
41[[#b5f845a0]]
[] 
42[[#b5f845a0]]