logList.clear(); ScriptLogger.getInstance().clear(); fireTableChangedEv();
headerList.clear(); getMessageFolderInfo().reset(); fireFolderPropertyChanged();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/scripting/ScriptLogTableModel.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/imap/IMAPFolder.java
Method name: void clearLog() Method name: void headerListCorrupted(IHeaderList)
Number of AST nodes: 3 Number of AST nodes: 3
1
logList.clear();
1
headerList.clear();
2
        ScriptLogger.getInstance().clear();
3
        fireTable
2
							getMessageFolderInfo().reset();
4
ChangedEv();
3
							fireFolderPropertyChanged();
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    logList.clear();
    1
    logList.clear();
    1
    headerList.clear();
    Differences
    Expression1Expression2Difference
    logListheaderListVARIABLE_NAME_MISMATCH
    java.util.Listorg.columba.mail.message.IHeaderListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<org.columba.core.scripting.ScriptLogger.LogEntry> of variable logList does not match with type org.columba.mail.message.IHeaderList of variable headerList
    • Make classes java.util.List and org.columba.mail.message.IHeaderList extend a common superclass
    1
    headerList.clear();
    2
    ScriptLogger.getInstance().clear();
    2
    ScriptLogger.getInstance().clear();
    3
    fireFolderPropertyChanged();
    Differences
    Expression1Expression2Difference
    clearfireFolderPropertyChangedMETHOD_INVOCATION_NAME_MISMATCH
    ScriptLogger.getInstance()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression ScriptLogger.getInstance().clear() is a void method call, and thus it cannot be parameterized
    Expression fireFolderPropertyChanged() is a void method call, and thus it cannot be parameterized
    Expression ScriptLogger.getInstance().clear() is a void method call, and thus it cannot be parameterized
    Expression fireFolderPropertyChanged() is a void method call, and thus it cannot be parameterized
    3
    fireFolderPropertyChanged();
    3
    fireTableChangedEv();
    3
    fireTableChangedEv();
    2
    getMessageFolderInfo().reset();
    Differences
    Expression1Expression2Difference
    fireTableChangedEvresetMETHOD_INVOCATION_NAME_MISMATCH
    getMessageFolderInfo()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression fireTableChangedEv() is a void method call, and thus it cannot be parameterized
    Expression getMessageFolderInfo().reset() is a void method call, and thus it cannot be parameterized
    Expression fireTableChangedEv() is a void method call, and thus it cannot be parameterized
    Expression getMessageFolderInfo().reset() is a void method call, and thus it cannot be parameterized
    2
    getMessageFolderInfo().reset();
    Precondition Violations (9)
    Row Violation
    1Type java.util.List<org.columba.core.scripting.ScriptLogger.LogEntry> of variable logList does not match with type org.columba.mail.message.IHeaderList of variable headerList
    2Expression ScriptLogger.getInstance().clear() is a void method call, and thus it cannot be parameterized
    3Expression fireFolderPropertyChanged() is a void method call, and thus it cannot be parameterized
    4Expression ScriptLogger.getInstance().clear() is a void method call, and thus it cannot be parameterized
    5Expression fireFolderPropertyChanged() is a void method call, and thus it cannot be parameterized
    6Expression fireTableChangedEv() is a void method call, and thus it cannot be parameterized
    7Expression getMessageFolderInfo().reset() is a void method call, and thus it cannot be parameterized
    8Expression fireTableChangedEv() is a void method call, and thus it cannot be parameterized
    9Expression getMessageFolderInfo().reset() is a void method call, and thus it cannot be parameterized