| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 25 | 3 | 6 | 0.982 | statement_sequence_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 25 | 200 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpPacket.java |
| 2 | 25 | 1292 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java |
| 3 | 25 | 191 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpPacket.java |
| ||||
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
if ((field.getModifiers()& Modifier.PUBLIC) == 0 || (field.getModifiers()& Modifier.STATIC) == 0 || (field.getModifiers()& Modifier.FINAL) == 0) {
continue ;
}
String name = field.getName();
if ( !name.startsWith("FLAG_")) { //$NON-NLS-1$
continue ;
}
name = name.substring(5);
try {
byte value = field.getByte(null);
for (int j = 0; j < fgFlagStrings.length; j++) {
if ((1 << j& value) != 0) {
fgFlagStrings[j] = name;
break;
}
}
} catch (IllegalAccessException e) {
// Will not occur for own class.
}
catch (IllegalArgumentException e) {
// Should not occur.
// We should take care that all public static final constants
// in this class are bytes.
}
}
|
| ||||
for (int i = 0; i < fields.length; i++) {
java.lang.reflect.Field field = fields[i];
if ((field.getModifiers()& Modifier.PUBLIC) == 0 || (field.getModifiers()& Modifier.STATIC) == 0 || (field.getModifiers()& Modifier.FINAL) == 0) {
continue ;
}
String name = field.getName();
if ( !name.startsWith("JDWP_CLASS_STATUS_")) { //$NON-NLS-1$
continue ;
}
name = name.substring(18);
try {
int value = field.getInt(null);
for (int j = 0; j < fgClassStatusStrings.length; j++) {
if ((1 << j& value) != 0) {
fgClassStatusStrings[j] = name;
break;
}
}
} catch (IllegalAccessException e) {
// Will not occur for own class.
}
catch (IllegalArgumentException e) {
// Should not occur.
// We should take care that all public static final constants
// in this class are numbers that are convertible to int.
}
}
|
| ||||
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
if ((field.getModifiers()& Modifier.PUBLIC) == 0 || (field.getModifiers()& Modifier.STATIC) == 0 || (field.getModifiers()& Modifier.FINAL) == 0) {
continue ;
}
String name = field.getName();
if ( !name.startsWith("FLAG_")) { //$NON-NLS-1$
continue ;
}
name = name.substring(5);
try {
byte value = field.getByte(null);
for (int j = 0; j < fgFlagStrings.length; j++) {
if ((1 << j& value) != 0) {
fgFlagStrings[j] = name;
break;
}
}
} catch (IllegalAccessException e) {
// Will not occur for own class.
}
catch (IllegalArgumentException e) {
// Should not occur.
// We should take care that all public static final constants
// in this class are bytes.
}
}
|
| |||
for (int i = 0; i < fields.length; i++) {
[[#variablebf77a540]] field = fields[i];
if ((field.getModifiers()&Modifier.PUBLIC) == 0 || (field.getModifiers()&Modifier.STATIC) == 0 || (field.getModifiers()&Modifier.FINAL) == 0) {
continue ;
}
String name = field.getName();
if ( !name.startsWith( [[#variablebf77a4e0]])) { //$NON-NLS-1$
continue ;
}
name = name.substring( [[#variablebf77a440]]);
try {
[[#variablebf88a9c0]] value = field. [[#variableb4b7d2a0]](null);
for (int j = 0; j < [[#variablebf77a420]].length; j++) {
if ((1 << j&value) != 0) {
[[#variablebf77a420]][j] = name;
break;
}
}
}
catch (IllegalAccessException e) {
// Will not occur for own class.
}
catch (IllegalArgumentException e) {
// Should not occur.
// We should take care that all public static final constants
// in this class are bytes.
// in this class are numbers that are convertible to int.
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#bf77a540]] | Field |
| 1 | 2 | [[#bf77a540]] | java.lang.reflect.Field |
| 1 | 3 | [[#bf77a540]] | Field |
| 2 | 1 | [[#bf77a4e0]] | "FLAG_" |
| 2 | 2 | [[#bf77a4e0]] | "JDWP_CLASS_STATUS_" |
| 2 | 3 | [[#bf77a4e0]] | "FLAG_" |
| 3 | 1 | [[#bf77a440]] | 5 |
| 3 | 2 | [[#bf77a440]] | 18 |
| 3 | 3 | [[#bf77a440]] | 5 |
| 4 | 1 | [[#bf88a9c0]] | byte |
| 4 | 2 | [[#bf88a9c0]] | int |
| 4 | 3 | [[#bf88a9c0]] | byte |
| 5 | 1 | [[#b4b7d2a0]] | getByte |
| 5 | 2 | [[#b4b7d2a0]] | getInt |
| 5 | 3 | [[#b4b7d2a0]] | getByte |
| 6 | 1 | [[#bf77a420]] | fgFlagStrings |
| 6 | 2 | [[#bf77a420]] | fgClassStatusStrings |
| 6 | 3 | [[#bf77a420]] | fgFlagStrings |