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 newUTF8(String)
|
Method name: Item newClass(String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | key.set(UTF8, value, null, null);↵ | 1 | key2.set(CLASS, value, null, null);↵ | |
2 | Item result = get(key);↵ | 2 | Item result = get(key2);↵ | |
3 | if (result == null) {↵ | 3 | if (result == null) {↵ | |
4 | pool.put1(UTF8).putUTF(value);↵ | 4 | pool.put12(CLASS, newUTF8(value).index);↵ | |
5 | result = new Item(index++, key);↵ | 5 | result = new Item(index++, key2);↵ | |
6 | put(result);↵ | 6 | put(result);↵ | |
7 | }↵ | 7 | }↵ | |
8 | return result; | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 7.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | key.set(UTF8, value, null, null); |
| 1 | key2.set(CLASS, value, null, null); | |||||||||||||||||||||||||
2 | Item result = get(key); |
| 2 | Item result = get(key2); | |||||||||||||||||||||||||
3 | if (result == null) | 3 | if (result == null) | ||||||||||||||||||||||||||
4 | pool.put1(UTF8).putUTF(value); |
| 4 | pool.put12(CLASS, newUTF8(value).index); | |||||||||||||||||||||||||
5 | result = new Item(index++, key); |
| 5 | result = new Item(index++, key2); | |||||||||||||||||||||||||
6 | put(result); | 6 | put(result); | ||||||||||||||||||||||||||
7 | return result; | 7 | return result; |
Row | Violation |
---|---|
1 | Expression pool.put1(UTF8).putUTF(value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression pool.put12(CLASS,newUTF8(value).index) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression pool.put1(UTF8).putUTF(value) is a void method call, and thus it cannot be parameterized |
4 | Expression pool.put12(CLASS,newUTF8(value).index) is a void method call, and thus it cannot be parameterized |
5 | Expression pool.put1(UTF8) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression pool.put1(UTF8).putUTF(value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression pool.put12(CLASS,newUTF8(value).index) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression pool.put1(UTF8).putUTF(value) is a void method call, and thus it cannot be parameterized |
9 | Expression pool.put12(CLASS,newUTF8(value).index) is a void method call, and thus it cannot be parameterized |