if( gs >= m_nMTF )
{
break;
}
ge = gs + G_SIZE - 1;
if( ge >= m_nMTF )
{
ge = m_nMTF - 1;
}
if( gs >= m_nMTF )
{
break;
}
ge = gs + G_SIZE - 1;
if( ge >= m_nMTF )
{
ge = m_nMTF - 1;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java
|
|
File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java
|
Method name: void sendMTFValues()
|
|
Method name: void sendMTFValues()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if( gs >= m_nMTF )↵ | | 1 | if( gs >= m_nMTF )↵
|
2 | {↵ | | 2 | ↵
|
3 | ↵ | | 3 | {↵
|
4 | break;↵ | | 4 | break;↵
|
5 | }↵ | | 5 | ↵
|
6 | ↵ | | 6 | }↵
|
7 | ge = gs + G_SIZE - 1;↵ | | 7 | ge = gs + G_SIZE - 1;↵
|
8 | if( ge >= m_nMTF )↵ | | 8 | if( ge >= m_nMTF )↵
|
9 | {↵ | | 9 | {↵
|
10 | ge = m_nMTF - 1;↵ | | 10 | ge = m_nMTF - 1;↵
|
11 | } | | 11 | }
|
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 26 |
-
{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) | 1.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
68 | if (gs >= m_nMTF) | | 189 | if (gs >= m_nMTF) |
69 | | | 190 | |
70 | ge = gs + G_SIZE - 1; | | 191 | ge = gs + G_SIZE - 1; |
71 | if (ge >= m_nMTF) | | 192 | if (ge >= m_nMTF) |
72 | | | 193 | |
Precondition Violations (2)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |