| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 24 | 2 | 6 | 0.978 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 24 | 36 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/LocalVariableAttribute.java |
| 2 | 24 | 36 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/LocalVariableTypeAttribute.java |
| ||||
/**
* Constructor for LocalVariableAttribute.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
public LocalVariableAttribute(
byte[] classFileBytes,
IConstantPool constantPool,
int offset ) throws
ClassFormatException {
super(classFileBytes, constantPool, offset);
final int length = u2At(classFileBytes, 6, offset);
this.localVariableTableLength = length;
if (length != 0) {
int readOffset = 8;
this.localVariableTable = new ILocalVariableTableEntry[length];
for (int i = 0; i < length; i++) {
this.localVariableTable[i] = new LocalVariableTableEntry(classFileBytes, constantPool, offset + readOffset);
readOffset += 10;
}
}
else {
this.localVariableTable = NO_ENTRIES;
}
}
/**
* @see ILocalVariableAttribute#getLocalVariableTable()
*/
public ILocalVariableTableEntry[] getLocalVariableTable() {
return this.localVariableTable;
}
|
| ||||
/**
* Constructor for LocalVariableTypeAttribute.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
public LocalVariableTypeAttribute(
byte[] classFileBytes,
IConstantPool constantPool,
int offset ) throws
ClassFormatException {
super(classFileBytes, constantPool, offset);
final int length = u2At(classFileBytes, 6, offset);
this.localVariableTypeTableLength = length;
if (length != 0) {
int readOffset = 8;
this.localVariableTypeTableEntries = new ILocalVariableTypeTableEntry[length];
for (int i = 0; i < length; i++) {
this.localVariableTypeTableEntries[i] = new LocalVariableTypeTableEntry(classFileBytes, constantPool, offset + readOffset);
readOffset += 10;
}
}
else {
this.localVariableTypeTableEntries = NO_ENTRIES;
}
}
/**
* @see ILocalVariableTypeTableAttribute#getLocalVariableTypeTable()
*/
public ILocalVariableTypeTableEntry[] getLocalVariableTypeTable() {
return this.localVariableTypeTableEntries;
}
|
| |||
/**
* Constructor for LocalVariableAttribute.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
/**
* Constructor for LocalVariableTypeAttribute.
* @param classFileBytes
* @param constantPool
* @param offset
* @throws ClassFormatException
*/
public [[#variablec203a2e0]](byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException {
super(classFileBytes, constantPool, offset);
final int length = u2At(classFileBytes, 6, offset);
this. [[#variablec203a260]]= length;
if (length != 0) {
int readOffset = 8;
this. [[#variablec203a1a0]]= new [[#variablec203a0a0]][length];
for (int i = 0; i < length; i++) {
this. [[#variablec203a1a0]][i] = new [[#variablec203a100]](classFileBytes, constantPool, offset + readOffset);
readOffset += 10;
}
}
else {
this. [[#variablec203a1a0]]= NO_ENTRIES;
}
}
/**
* @see ILocalVariableAttribute#getLocalVariableTable()
*/
/**
* @see ILocalVariableTypeTableAttribute#getLocalVariableTypeTable()
*/
public [[#variablec203a0a0]][] [[#variablec203a020]]() {
return this. [[#variablec203a1a0]];
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#c203a2e0]] | LocalVariableAttribute |
| 1 | 2 | [[#c203a2e0]] | LocalVariableTypeAttribute |
| 2 | 1 | [[#c203a260]] | localVariableTableLength |
| 2 | 2 | [[#c203a260]] | localVariableTypeTableLength |
| 3 | 1 | [[#c203a1a0]] | localVariableTable |
| 3 | 2 | [[#c203a1a0]] | localVariableTypeTableEntries |
| 4 | 1 | [[#c203a0a0]] | ILocalVariableTableEntry |
| 4 | 2 | [[#c203a0a0]] | ILocalVariableTypeTableEntry |
| 5 | 1 | [[#c203a100]] | LocalVariableTableEntry |
| 5 | 2 | [[#c203a100]] | LocalVariableTypeTableEntry |
| 6 | 1 | [[#c203a020]] | getLocalVariableTable |
| 6 | 2 | [[#c203a020]] | getLocalVariableTypeTable |