if (state == 1) {
// true number of bytes to be added (or removed) from this
// instruction = (future number of padding bytes - current number
// of padding byte) - previously over estimated variation =
// = ((3 - newOffset%4) - (3 - u%4)) - u%4
// = (-newOffset%4 + u%4) - u%4
// = -(newOffset & 3)
newOffset = getNewOffset(allIndexes, allSizes, 0, u);
insert = -(newOffset & 3);
} else if (!resize[u]) {
// over estimation of the number of bytes to be added to this
// instruction = 3 - current number of padding bytes = 3 - (3 -
// u%4) = u%4 = u & 3
insert = u & 3;
resize[u] = true;
if (state == 1) {
// like TABL_INSN
newOffset = getNewOffset(allIndexes, allSizes, 0, u);
insert = -(newOffset & 3);
} else if (!resize[u]) {
// like TABL_INSN
insert = u & 3;
resize[u] = true;
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:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | if (state == 1) {↵ | | 1 | if (state == 1) {↵
|
2 | // true number of bytes to be added (or removed) from this↵ | | 2 | // ↵
|
3 | // instruction = (future number of padding bytes - current number↵ | | |
|
4 | // of padding byte) - previously over estimated variation =↵ | | |
|
5 | // = ((3 - newOffset%4) - (3 - u%4)) - u%4↵ | | |
|
6 | // = (-newOffset%4 + u%4) - u%4↵ | | |
|
7 | // = -(newOffset & 3)↵ | | |
|
8 | newOffset = getNewOffset(allIndexes, allSizes, 0, u);↵ | | |
|
9 | insert = -(newOffset & 3);↵ | | |
|
10 | } else if (!resize[u]) {↵ | | |
|
11 | // over estimation of the number of bytes to be added to this↵ | | |
|
12 | // instruction = 3 - current number of padding bytes = 3 - (3 -↵ | | |
|
13 | // u%4) = u%4 = u & 3↵ | | 3 | like TABL_INSN↵
|
| | | 4 | newOffset = getNewOffset(allIndexes, allSizes, 0, u);↵
|
| | | 5 | insert = -(newOffset & 3);↵
|
| | | 6 | } else if (!resize[u]) {↵
|
| | | 7 | // like TABL_INSN↵
|
14 | insert = u & 3;↵ | | 8 | insert = u & 3;↵
|
15 | resize[u] = true;↵ | | 9 | resize[u] = true;↵
|
16 | | | 10 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |