if (text.charAt(i) == '\n')
{
lineEnd = i;
break;
}
if (text.charAt(i) == '\n')
{
lineBeg = i;
break;
}
Clone fragments detected by clone detection tool
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/DuplicateLineAction.java
|
|
File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/DuplicateLineAction.java
|
Method name: void duplicateLineAction(ISQLEntryPanel)
|
|
Method name: void duplicateLineAction(ISQLEntryPanel)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (text.charAt(i) == '\n')↵ | | 1 | if (text.charAt(i) == '\n')↵
|
2 | {↵ | | 2 | {↵
|
3 | lineEnd = i;↵ | | 3 | lineBeg = i;↵
|
4 | break;↵ | | 4 | break;↵
|
5 | } | | 5 | }
|
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 | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | if (text.charAt(i) == '\n') | | 8 | if (text.charAt(i) == '\n') |
14 | | | 9 | |
15 | | | 10 | |
Precondition Violations (2)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |