File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java | File path: /jEdit-4.2/src/installer/CBZip2InputStream.java | |||
Method name: void randomiseBlock()
|
Method name: void setupRandPartA()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | rNToGo = (char)RAND_NUMS[ rTPos ];↵ | 1 | m_rNToGo = RAND_NUMS[ m_rTPos ];↵ | |
2 | rTPos++;↵ | 2 | m_rTPos++;↵ | |
3 | if( rTPos == 512 )↵ | 3 | if( m_rTPos == 512 )↵ | |
4 | {↵ | 4 | {↵ | |
5 | rTPos = 0;↵ | 5 | m_rTPos = 0;↵ | |
6 | } | 6 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 6 | m_rNToGo = RAND_NUMS[m_rTPos]; | |||||||||||
8 | rNToGo = (char)RAND_NUMS[rTPos]; |
| | |||||||||||
9 | rTPos++; |
| 7 | m_rTPos++; | ||||||||||
10 | if (rTPos == 512) |
| 8 | if (m_rTPos == 512) | ||||||||||
11 | rTPos = 0; |
| 9 | m_rTPos = 0; |
Row | Violation |
---|---|
1 | Unmatched statement m_rNToGo=RAND_NUMS[m_rTPos]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement rNToGo=(char)RAND_NUMS[rTPos]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables rTPos , while Clone fragment #2 returns variables |