if (opcode > 201) {
// converts temporary opcodes 202 to 217 (inclusive), 218 and 219
// to IFEQ ... JSR (inclusive), IFNULL and IFNONNULL
opcode = opcode < 218 ? opcode - 49 : opcode - 20;
label = u + readUnsignedShort(b, u + 1);
} else {
label = u + readShort(b, u + 1);
}
newOffset = getNewOffset(allIndexes, allSizes, u, label);
if (opcode > 201) {
// changes temporary opcodes 202 to 217 (inclusive), 218 and 219
// to IFEQ ... JSR (inclusive), IFNULL and IFNONNULL
opcode = opcode < 218 ? opcode - 49 : opcode - 20;
label = u + readUnsignedShort(b, u + 1);
} else {
label = u + readShort(b, u + 1);
}
newOffset = getNewOffset(allIndexes, allSizes, u, label);
Clone fragments detected by clone detection tool
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: int[] resizeInstructions(int[], int[], int)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (opcode > 201) {↵ | | 1 | if (opcode > 201) {↵
|
2 | // converts temporary opcodes 202 to 217 (inclusive), 218 and 219↵ | | 2 | // changes temporary opcodes 202 to 217 (inclusive), 218 and 219↵
|
3 | // to IFEQ ... JSR (inclusive), IFNULL and IFNONNULL↵ | | 3 | // to IFEQ ... JSR (inclusive), IFNULL and IFNONNULL↵
|
4 | opcode = opcode < 218 ? opcode - 49 : opcode - 20;↵ | | 4 | opcode = opcode < 218 ? opcode - 49 : opcode - 20;↵
|
5 | label = u + readUnsignedShort(b, u + 1);↵ | | 5 | label = u + readUnsignedShort(b, u + 1);↵
|
6 | } else {↵ | | 6 | } else {↵
|
7 | label = u + readShort(b, u + 1);↵ | | 7 | label = u + readShort(b, u + 1);↵
|
8 | }↵ | | 8 | ↵
|
9 | ↵ | | 9 | }↵
|
10 | newOffset = getNewOffset(allIndexes, allSizes, u, label); | | 10 | newOffset = getNewOffset(allIndexes, allSizes, u, label);
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 22 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 4.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
24 | if (opcode > 201) | | 116 | if (opcode > 201) |
25 | opcode = opcode < 218 ? opcode - 49 : opcode - 20; | | 117 | opcode = opcode < 218 ? opcode - 49 : opcode - 20; |
26 | label = u + readUnsignedShort(b, u + 1); | | 118 | label = u + readUnsignedShort(b, u + 1); |
| | | | |
27 | label = u + readShort(b, u + 1); | | 119 | label = u + readShort(b, u + 1); |
28 | newOffset = getNewOffset(allIndexes, allSizes, u, label); | | 120 | newOffset = getNewOffset(allIndexes, allSizes, u, label); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables newOffset, opcode , while Clone fragment #2 returns variables newOffset, opcode |