if (dtStart == null) throw new IllegalArgumentException("dtStart == null"); if (dtEnd == null) throw new IllegalArgumentException("dtEnd == null"); if (summary == null) throw new IllegalArgumentException("summary == null");
if (icon == null) throw new IllegalArgumentException("icon == null"); if (action == null) throw new IllegalArgumentException("action == null"); if (border == null) throw new IllegalArgumentException("border == null");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/model/Event.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/docking/TitleBar.java
Method name: void Event(Calendar, Calendar, String) Method name: JButton addButton(ImageIcon, Action, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (dtStart == null)
1
if (icon == null)
2
			throw new IllegalArgumentException("dtStart == null");
2
			throw new IllegalArgumentException("icon == null");
3
		if (dtEnd == null)
3
		if (action == null)
4
			throw new IllegalArgumentException("dtEnd == null");
4
			throw new IllegalArgumentException("action == null");
5
		if (summary == null)
5
		if (border == null)
6
			throw new IllegalArgumentException("summary == null");
6
			throw new IllegalArgumentException("border == null");
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.6
Clones locationClones are in different classes
Number of node comparisons27
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (dtStart == null)
    2
    if (dtStart == null)
    1
    if (icon == null)
    Differences
    Expression1Expression2Difference
    dtStarticonVARIABLE_NAME_MISMATCH
    java.util.Calendarjavax.swing.ImageIconVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Calendar of variable dtStart does not match with type javax.swing.ImageIcon of variable icon
    • Make classes java.util.Calendar and javax.swing.ImageIcon extend a common superclass
    1
    if (icon == null)
    3
    throw new IllegalArgumentException("dtStart == null");
    3
    throw new IllegalArgumentException("dtStart == null");
    2
    throw new IllegalArgumentException("icon == null");
    Differences
    Expression1Expression2Difference
    "dtStart == null""icon == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("icon == null");
    4
    if (dtEnd == null)
    4
    if (dtEnd == null)
    3
    if (action == null)
    Differences
    Expression1Expression2Difference
    dtEndactionVARIABLE_NAME_MISMATCH
    java.util.Calendarjavax.swing.ActionVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Calendar of variable dtEnd does not match with type javax.swing.Action of variable action
    • Make classes java.util.Calendar and javax.swing.Action extend a common superclass
    3
    if (action == null)
    5
    throw new IllegalArgumentException("dtEnd == null");
    5
    throw new IllegalArgumentException("dtEnd == null");
    4
    throw new IllegalArgumentException("action == null");
    Differences
    Expression1Expression2Difference
    "dtEnd == null""action == null"LITERAL_VALUE_MISMATCH
    4
    throw new IllegalArgumentException("action == null");
    6
    if (summary == null)
    6
    if (summary == null)
    5
    if (border == null)
    Differences
    Expression1Expression2Difference
    summaryborderVARIABLE_NAME_MISMATCH
    5
    if (border == null)
    7
    throw new IllegalArgumentException("summary == null");
    7
    throw new IllegalArgumentException("summary == null");
    6
    throw new IllegalArgumentException("border == null");
    Differences
    Expression1Expression2Difference
    "summary == null""border == null"LITERAL_VALUE_MISMATCH
    6
    throw new IllegalArgumentException("border == null");
    Precondition Violations (3)
    Row Violation
    1Type java.util.Calendar of variable dtStart does not match with type javax.swing.ImageIcon of variable icon
    2Type java.util.Calendar of variable dtEnd does not match with type javax.swing.Action of variable action
    3The refactoring of the clones is infeasible, because classes org.columba.calendar.model.Event and org.columba.core.gui.docking.TitleBar do not have a common superclass