int val = ((Integer)cst).intValue();
return newInteger(val);
} else if (cst instanceof Float) {
float val = ((Float)cst).floatValue();
return newFloat(val);
long val = ((Long)cst).longValue();
return newLong(val);
} else if (cst instanceof Double) {
double val = ((Double)cst).doubleValue();
return newDouble(val);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/objectweb/asm/ClassWriter.java
|
|
File path: /jEdit-4.2/src/org/objectweb/asm/ClassWriter.java
|
Method name: Item newCst(Object)
|
|
Method name: Item newCst(Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | int val = ((Integer)cst).intValue();↵ | | 1 | long val = ((Long)cst).longValue();↵
|
2 | return newInteger(val);↵ | | 2 | return newLong(val);↵
|
3 | } else if (cst instanceof Float) {↵ | | 3 | } else if (cst instanceof Double) {↵
|
4 | float val = ((Float)cst).floatValue();↵ | | 4 | double val = ((Double)cst).doubleValue();↵
|
5 | return newFloat(val); | | 5 | return newDouble(val);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 4 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | int val = ((Integer)cst).intValue(); | | | |
| | | 8 | long val = ((Long)cst).longValue(); |
3 | return newInteger(val); | | 9 | return newLong(val); |
Precondition Violations (1)
Row |
Violation |
1 | Type int of variable val does not match with type long of variable val |