if(path != null)
{
// this is such a bad way of doing it, but oh well...
jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);
}
wm.floatDockableWindow("vfs.browser");
jEdit.unsetProperty("vfs.browser.path.tmp");
if(path != null)
{
// this is such a bad way of doing it, but oh well...
jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);
}
wm.addDockableWindow("vfs.browser");
jEdit.unsetProperty("vfs.browser.path.tmp");
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/VFSBrowser.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/VFSBrowser.java
|
Method name: void browseDirectoryInNewWindow(View, String)
|
|
Method name: void browseDirectory(View, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if(path != null)↵ | | 1 | if(path != null)↵
|
2 | {↵ | | 2 | {↵
|
3 | // this is such a bad way of doing it, but oh well...↵ | | 3 | // this is such a bad way of doing it, but oh well...↵
|
4 | jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);↵ | | 4 | jEdit.setTemporaryProperty("vfs.browser.path.tmp",path);↵
|
5 | }↵ | | 5 | }↵
|
6 | wm.floatDockableWindow("vfs.browser");↵ | | 6 | wm.addDockableWindow("vfs.browser");↵
|
7 | jEdit.unsetProperty("vfs.browser.path.tmp"); | | 7 | jEdit.unsetProperty("vfs.browser.path.tmp");
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (path != null) | | 6 | if (path != null) |
3 | jEdit.setTemporaryProperty("vfs.browser.path.tmp", path); | | 7 | jEdit.setTemporaryProperty("vfs.browser.path.tmp", path); |
4 | wm.floatDockableWindow("vfs.browser"); | | | |
| | | 8 | wm.addDockableWindow("vfs.browser"); |
5 | jEdit.unsetProperty("vfs.browser.path.tmp"); | | 9 | jEdit.unsetProperty("vfs.browser.path.tmp"); |
Precondition Violations (0)
Row |
Violation |