| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 31 | 2 | 0 | 1.000 | class_body_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 31 | 131 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java |
| 2 | 31 | 130 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java |
| ||||
/**
* Retrieves constant mappings.
*/
public static void getConstantMaps() {
if (fErrorMap != null) {
return;
}
Field[] fields = JdwpReplyPacket.class .getDeclaredFields();
fErrorMap = new HashMap(fields.length);
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 ;
try {
Integer intValue = new Integer(field.getInt(null));
fErrorMap.put(intValue, field.getName());
} 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.
}
}
}
/**
* @return Returns a map with string representations of error codes.
*/
public static Map errorMap() {
getConstantMaps();
return fErrorMap;
}
|
| ||||
/**
* Retrieves constant mappings.
*/
public static void getConstantMaps() {
if (fErrorMap != null) {
return;
}
Field[] fields = JdwpReplyPacket.class .getDeclaredFields();
fErrorMap = new HashMap(fields.length);
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 ;
try {
Integer intValue = new Integer(field.getInt(null));
fErrorMap.put(intValue, field.getName());
} 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.
}
}
}
/**
* @return Returns a map with string representations of error codes.
*/
public static Map errorMap() {
getConstantMaps();
return fErrorMap;
}
|
| |||
/**
* Retrieves constant mappings.
*/
public static void getConstantMaps() {
if (fErrorMap != null) {
return;
}
Field[] fields = JdwpReplyPacket.class .getDeclaredFields();
fErrorMap = new HashMap(fields.length);
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 ;
try {
Integer intValue = new Integer(field.getInt(null));
fErrorMap.put(intValue, field.getName());
}
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.
}
}
}
/**
* @return Returns a map with string representations of error codes.
*/
public static Map errorMap() {
getConstantMaps();
return fErrorMap;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||