if(msgSet)
{
GUIUtilities.getView((Component)evt.getSource())
.getStatus().setMessage(null);
msgSet = false;
}
if(background)
{
background = false;
Log.log(Log.WARNING,jEdit.class,"You cannot specify both the"
+ " -background and -noserver switches");
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/EnhancedButton.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java
|
Method name: void mouseReleased(MouseEvent)
|
|
Method name: void main(String[])
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if(msgSet)↵ | | 1 | if(background)↵
|
2 | {↵ | | 2 | {↵
|
3 | GUIUtilities.getView((Component)evt.getSource())↵ | | 3 | ↵
|
4 | .getStatus().setMessage(null);↵ | | |
|
5 | msgSet = false↵ | | 4 | background = false;↵
|
| | | 5 | Log.log(Log.WARNING,jEdit.class,"You cannot specify both the"↵
|
6 | ;↵ | | 6 | + " -background and -noserver switches");↵
|
7 | } | | 7 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (msgSet) | | 161 | if (background) |
2 | GUIUtilities.getView((Component)evt.getSource()).getStatus().setMessage(null); | | | |
3 | | | 162 | |
| | | 163 | Log.log(Log.WARNING, jEdit.class, "You cannot specify both the" + " -background and -noserver switches"); |
Precondition Violations (2)
Row |
Violation |
1 | Expression msgSet is a field being modified, and thus it cannot be parameterized |
2 | Expression background is a field being modified, and thus it cannot be parameterized |