File configDirectory = DefaultConfigDirectory.getInstance().getCurrentPath();
File dockDirectory = new File(configDirectory, "flexdock");
if (!dockDirectory.exists())
dockDirectory.mkdir();
String filename = getId() + ".xml";
File configDirectory = DefaultConfigDirectory.getInstance().getCurrentPath();
File dockDirectory = new File(configDirectory, "flexdock");
if (!dockDirectory.exists())
dockDirectory.mkdir();
String filename = getId() + ".xml";
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/frame/DockFrameController.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/frame/DockFrameController.java
|
Method name: void loadPositions()
|
|
Method name: void savePositions()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | File configDirectory = DefaultConfigDirectory.getInstance().getCurrentPath();↵ | | 1 | File configDirectory = DefaultConfigDirectory.getInstance().getCurrentPath();↵
|
2 | File dockDirectory = new File(configDirectory, "flexdock");↵ | | 2 | File dockDirectory = new File(configDirectory, "flexdock");↵
|
3 | if (!dockDirectory.exists())↵ | | 3 | if (!dockDirectory.exists())↵
|
4 | dockDirectory.mkdir();↵ | | 4 | dockDirectory.mkdir();↵
|
5 | String filename = getId() + ".xml"; | | 5 | String filename = getId() + ".xml";
|
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 declared in the same class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | File configDirectory = DefaultConfigDirectory.getInstance().getCurrentPath(); | | 3 | File configDirectory = DefaultConfigDirectory.getInstance().getCurrentPath(); |
4 | File dockDirectory = new File(configDirectory, "flexdock"); | | 4 | File dockDirectory = new File(configDirectory, "flexdock"); |
5 | if (!dockDirectory.exists()) | | 5 | if (!dockDirectory.exists()) |
6 | | | 6 | |
7 | String filename = getId() + ".xml"; | | 7 | String filename = getId() + ".xml"; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables dockDirectory, filename , while Clone fragment #2 returns variables dockDirectory, filename |