m_rNToGo = RAND_NUMS[ m_rTPos ];
m_rTPos++;
if( m_rTPos == 512 )
{
m_rTPos = 0;
}
m_rNToGo = RAND_NUMS[ m_rTPos ];
m_rTPos++;
if( m_rTPos == 512 )
{
m_rTPos = 0;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/CBZip2InputStream.java
|
|
File path: /jEdit-4.2/src/installer/CBZip2InputStream.java
|
Method name: void setupRandPartB()
|
|
Method name: void setupRandPartA()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | m_rNToGo = RAND_NUMS[ m_rTPos ];↵ | | 1 | m_rNToGo = RAND_NUMS[ m_rTPos ];↵
|
2 | m_rTPos++;↵ | | 2 | m_rTPos++;↵
|
3 | if( m_rTPos == 512 )↵ | | 3 | if( m_rTPos == 512 )↵
|
4 | {↵ | | 4 | ↵
|
5 | ↵ | | 5 | {↵
|
6 | m_rTPos = 0;↵ | | 6 | m_rTPos = 0;↵
|
7 | } | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | m_rNToGo = RAND_NUMS[m_rTPos]; | | 6 | m_rNToGo = RAND_NUMS[m_rTPos]; |
11 | m_rTPos++; | | 7 | m_rTPos++; |
12 | if (m_rTPos == 512) | | 8 | if (m_rTPos == 512) |
13 | | | 9 | |
Precondition Violations (0)
Row |
Violation |