if(lastStart == null)
{
error("empty-tag","BEGIN");
return;
}
if(lastEnd == null)
{
error("empty-tag","END");
return;
}
if(lastStart == null)
{
error("empty-tag","BEGIN");
return;
}
if(lastEnd == null)
{
error("empty-tag","END");
return;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/syntax/XModeHandler.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/syntax/XModeHandler.java
|
Method name: void endElement(String)
|
|
Method name: void endElement(String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if(lastStart == null)↵ | | 1 | if(lastStart == null)↵
|
2 | {↵ | | 2 | {↵
|
3 | error("empty-tag","BEGIN");↵ | | 3 | error("empty-tag","BEGIN");↵
|
4 | return;↵ | | 4 | return;↵
|
5 | }↵ | | 5 | }↵
|
|
6 | if(lastEnd == null)↵ | | 6 | if(lastEnd == null)↵
|
7 | {↵ | | 7 | {↵
|
8 | error("empty-tag","END");↵ | | 8 | error("empty-tag","END");↵
|
9 | return;↵ | | 9 | return;↵
|
10 | } | | 10 | }
|
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 29 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
43 | if (lastStart == null) | | 52 | if (lastStart == null) |
44 | error("empty-tag", "BEGIN"); | | 53 | error("empty-tag", "BEGIN"); |
45 | | | 54 | |
46 | if (lastEnd == null) | | 55 | if (lastEnd == null) |
47 | error("empty-tag", "END"); | | 56 | error("empty-tag", "END"); |
48 | | | 57 | |
Precondition Violations (4)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |
3 | Conditional return; |
4 | Conditional return; |