if(!killRing.exists())
return;
killRingModTime = killRing.lastModified();
Log.log(Log.MESSAGE,KillRing.class,"Loading killring.xml");
history = new File(MiscUtilities.constructPath(
settingsDirectory,"history"));
if(!history.exists())
return;
historyModTime = history.lastModified();
Log.log(Log.MESSAGE,HistoryModel.class,"Loading history");
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/KillRing.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/HistoryModel.java
|
Method name: void load()
|
|
Method name: void loadHistory()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 5
|
|
1 | if(!killRing↵ | | 1 | history = new File(MiscUtilities.constructPath(↵
|
| | | 2 | settingsDirectory,"history"));↵
|
2 | .exists())↵ | | 3 | if(!history.exists())↵
|
3 | return;↵ | | 4 | return;↵
|
|
4 | killRingModTime = killRing.lastModified();↵ | | 5 | historyModTime = history.lastModified();↵
|
|
5 | Log.log(Log.MESSAGE,KillRing.class,"Loading killring.xml"); | | 6 | Log.log(Log.MESSAGE,HistoryModel.class,"Loading history");
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 4 | history = new File(MiscUtilities.constructPath(settingsDirectory, "history")); |
5 | if (!killRing.exists()) | | 5 | if (!history.exists()) |
6 | | | 6 | |
7 | killRingModTime = killRing.lastModified(); | | 7 | historyModTime = history.lastModified(); |
8 | Log.log(Log.MESSAGE, KillRing.class, "Loading killring.xml"); | | 8 | Log.log(Log.MESSAGE, HistoryModel.class, "Loading history"); |
Precondition Violations (4)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |
3 | Expression killRingModTime is a field being modified, and thus it cannot be parameterized |
4 | Expression historyModTime is a field being modified, and thus it cannot be parameterized |