if(!killRing.exists())
return;
killRingModTime = killRing.lastModified();
Log.log(Log.MESSAGE,KillRing.class,"Loading killring.xml");
if(!recent.exists())
return;
recentModTime = recent.lastModified();
Log.log(Log.MESSAGE,BufferHistory.class,"Loading recent.xml");
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/BufferHistory.java
|
Method name: void load()
|
|
Method name: void load()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if(!killRing.exists())↵ | | 1 | if(!recent.exists())↵
|
2 | return;↵ | | 2 | return;↵
|
|
3 | killRingModTime = killRing.lastModified();↵ | | 3 | recentModTime = recent.lastModified();↵
|
|
4 | Log.log(Log.MESSAGE,KillRing.class,"Loading killring.xml"); | | 4 | Log.log(Log.MESSAGE,BufferHistory.class,"Loading recent.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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{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 | 0 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | if (!killRing.exists()) | | 5 | if (!recent.exists()) |
6 | | | 6 | |
7 | killRingModTime = killRing.lastModified(); | | 7 | recentModTime = recent.lastModified(); |
8 | Log.log(Log.MESSAGE, KillRing.class, "Loading killring.xml"); | | 8 | Log.log(Log.MESSAGE, BufferHistory.class, "Loading recent.xml"); |
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 recentModTime is a field being modified, and thus it cannot be parameterized |