if(!recent.exists()) return; recentModTime = recent.lastModified(); Log.log(Log.MESSAGE,BufferHistory.class,"Loading recent.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/BufferHistory.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(!recent
1
history = new File(MiscUtilities.constructPath(
2
			settingsDirectory,"history"));
2
.exists())
3
		if(!history.exists())
3
			return;
4
			return;
4
		recentModTime = recent.lastModified();
5
		historyModTime = history.lastModified();
5
		Log.log(Log.MESSAGE,BufferHistory.class,"Loading recent.xml");
6
		Log.log(Log.MESSAGE,HistoryModel.class,"Loading history");
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                
    4
    history = new File(MiscUtilities.constructPath(settingsDirectory, "history"));
    5
    if (!recent.exists())
    5
    if (!recent.exists())
    5
    if (!history.exists())
    Differences
    Expression1Expression2Difference
    recenthistoryVARIABLE_NAME_MISMATCH
    5
    if (!history.exists())
    6
    return;
    6
    return;
    6
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    6
    return;
    7
    recentModTime = recent.lastModified();
    7
    recentModTime = recent.lastModified();
    7
    historyModTime = history.lastModified();
    Differences
    Expression1Expression2Difference
    recentModTimehistoryModTimeVARIABLE_NAME_MISMATCH
    recenthistoryVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression recentModTime is a field being modified, and thus it cannot be parameterized
    Expression historyModTime is a field being modified, and thus it cannot be parameterized
    7
    historyModTime = history.lastModified();
    8
    Log.log(Log.MESSAGE, BufferHistory.class, "Loading recent.xml");
    8
    Log.log(Log.MESSAGE, HistoryModel.class, "Loading history");
    Precondition Violations (4)
    Row Violation
    1Conditional return;
    2Conditional return;
    3Expression recentModTime is a field being modified, and thus it cannot be parameterized
    4Expression historyModTime is a field being modified, and thus it cannot be parameterized