| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 33 | 2 | 4 | 0.986 | class_body_declarations[6] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 31 | 22 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/SimpleLookupTable.java |
| 2 | 33 | 20 | 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
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;
}
|
| ||||
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;
}
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#be761400]] | |
| 1 | 2 | [[#be761400]] | public |
| 2 | 1 | [[#be7613c0]] | HashtableOfArrayToObject |
| 2 | 2 | [[#be7613c0]] | SimpleLookupTable |
| 3 | 1 | [[#b5f84580]] | 1.75F |
| 3 | 2 | [[#b5f84580]] | 1.5F |
| 4 | 1 | [[#b5f845a0]] | [] |
| 4 | 2 | [[#b5f845a0]] | |