File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java | File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java | |||
Method name: int[] resizeInstructions(int[], int[], int)
|
Method name: void visitJumpInsn(int, Label)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | if (opcode == Constants.GOTO) {↵ | 1 | if (opcode == Constants.GOTO) {↵ | |
2 | newCode.put1(200); // GOTO_W↵ | 2 | code.put1(200); // GOTO_W↵ | |
3 | } else if (opcode == Constants.JSR) {↵ | 3 | } else if (opcode == Constants.JSR) {↵ | |
4 | newCode.put1(201); // JSR_W↵ | 4 | code.put1(201); // JSR_W↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | newCode.put1(opcode <= 166 ? ((opcode + 1) ^ 1) - 1 : opcode ^ 1);↵ | 6 | code.put1(opcode <= 166 ? ((opcode + 1) ^ 1) - 1 : opcode ^ 1);↵ | |
7 | newCode.put2(8); // jump offset↵ | 7 | code.put2(8); // jump offset↵ | |
8 | newCode.put1(200); // GOTO_W↵ | 8 | code.put1(200); // GOTO_W↵ | |
9 | ↵ | 9 | }↵ | |
10 | newOffset -= 3; // newOffset now computed from start of GOTO_W↵ | 10 | ↵ | |
11 | }↵ | |||
12 | newCode.put4(newOffset); | 11 | label.put(this, code, code.length - 1, true); | |
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) | 3.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 47 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 17.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
122 | if (opcode == Constants.GOTO) | 19 | if (opcode == Constants.GOTO) | |||||||||||
123 | newCode.put1(200); |
| 20 | code.put1(200); | ||||||||||
124 | else if (opcode == Constants.JSR) | 21 | else if (opcode == Constants.JSR) | |||||||||||
125 | newCode.put1(201); |
| 22 | code.put1(201); | ||||||||||
else | else | |||||||||||||
126 | newCode.put1(opcode <= 166 ? ((opcode + 1) ^ 1) - 1 : opcode ^ 1); |
| 23 | code.put1(opcode <= 166 ? ((opcode + 1) ^ 1) - 1 : opcode ^ 1); | ||||||||||
127 | newCode.put2(8); |
| 24 | code.put2(8); | ||||||||||
128 | newCode.put1(200); |
| 25 | code.put1(200); | ||||||||||
129 | newOffset -= 3; | | ||||||||||||
| 26 | label.put(this, code, code.length - 1, true); | ||||||||||||
130 | newCode.put4(newOffset); |
| |
Row | Violation |
---|---|
1 | Unmatched statement newCode.put4(newOffset); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |