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 newDouble(double)
|
Method name: Item newFloat(float)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 7 | |||
1 | key.set(value);↵ | 1 | key.set(value);↵ | |
2 | Item result = get(key);↵ | 2 | Item result = get(key);↵ | |
3 | if (result == null) {↵ | 3 | if (result == null) {↵ | |
4 | pool.put1(DOUBLE).put8(Double.doubleToLongBits(value));↵ | 4 | pool.put1(FLOAT).put4(Float.floatToIntBits(value));↵ | |
5 | result = new Item(index, key);↵ | 5 | result = new Item(index++, key);↵ | |
6 | put(result);↵ | 6 | put(result);↵ | |
7 | index += 2;↵ | |||
8 | }↵ | 7 | }↵ | |
9 | return result; | 8 |
| |
See real code fragment | See real code fragment |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 29 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 2.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | key.set(value); |
| 1 | key.set(value); | |||||||||||
2 | Item result = get(key); | 2 | Item result = get(key); | ||||||||||||
3 | if (result == null) | 3 | if (result == null) | ||||||||||||
| 4 | pool.put1(FLOAT).put4(Float.floatToIntBits(value)); | |||||||||||||
4 | pool.put1(DOUBLE).put8(Double.doubleToLongBits(value)); | | |||||||||||||
|
| 5 | result = new Item(index++, key); | ||||||||||||
5 | result = new Item(index, key); |
| | ||||||||||||
6 | put(result); | 6 | put(result); | ||||||||||||
7 | index += 2; | | |||||||||||||
8 | return result; | 7 | return result; |
Row | Violation |
---|---|
1 | Type double of variable value does not match with type float of variable value |
2 | Unmatched statement result=new Item(index++,key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement result=new Item(index,key); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |