if(!wrap.getSelectedItem().equals("none"))
{
if(maxLineLen.getSelectedItem()
.equals("0"))
{
wrap.setSelectedItem("none");
}
}
if(!wrap.getSelectedItem().equals("none"))
{
if(maxLineLen.getSelectedItem()
.equals("0"))
{
maxLineLen.setSelectedItem("80");
}
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/BufferOptions.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/BufferOptions.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if(!wrap.getSelectedItem().equals("none"))↵ | | 1 | if(!wrap.getSelectedItem().equals("none"))↵
|
2 | {↵ | | 2 | {↵
|
3 | if(maxLineLen.getSelectedItem()↵ | | 3 | if(maxLineLen.getSelectedItem()↵
|
4 | .equals("0"))↵ | | 4 | .equals("0"))↵
|
5 | {↵ | | 5 | {↵
|
6 | wrap.setSelectedItem("none");↵ | | 6 | maxLineLen.setSelectedItem("80");↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
-
{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) | 0.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | if (!wrap.getSelectedItem().equals("none")) | | 15 | if (!wrap.getSelectedItem().equals("none")) |
20 | if (maxLineLen.getSelectedItem().equals("0")) | | 16 | if (maxLineLen.getSelectedItem().equals("0")) |
21 | wrap.setSelectedItem("none"); | | 17 | maxLineLen.setSelectedItem("80"); |
Precondition Violations (0)
Row |
Violation |