if (icon == null) throw new IllegalArgumentException("icon == null"); if (action == null) throw new IllegalArgumentException("action == null"); if (border == null) throw new IllegalArgumentException("border == null");
if (searchTerm == null) throw new IllegalArgumentException("searchTerm == null"); if (providerName == null) throw new IllegalArgumentException("providerName == null"); if (criteriaName == null) throw new IllegalArgumentException("criteriaName == null");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/docking/TitleBar.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
Method name: JButton addButton(ImageIcon, Action, String) Method name: void executeSearch(String, String, String, boolean, int, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (icon == null)
1
if (searchTerm == null)
2
			throw new IllegalArgumentException("icon == null");
2
			throw new IllegalArgumentException("searchTerm == null");
3
		if (action == null)
3
		if (providerName == null)
4
			throw new IllegalArgumentException("action == null");
4
			throw new IllegalArgumentException("providerName == null");
5
		if (border == null)
5
		if (criteriaName == null)
6
			throw new IllegalArgumentException("border == null");
6
			throw new IllegalArgumentException("criteriaName == 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.5
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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (icon == null)
    1
    if (icon == null)
    1
    if (searchTerm == null)
    Differences
    Expression1Expression2Difference
    iconsearchTermVARIABLE_NAME_MISMATCH
    javax.swing.ImageIconjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.swing.ImageIcon of variable icon does not match with type java.lang.String of variable searchTerm
    • Make classes javax.swing.ImageIcon and java.lang.String extend a common superclass
    1
    if (searchTerm == null)
    2
    throw new IllegalArgumentException("icon == null");
    2
    throw new IllegalArgumentException("icon == null");
    2
    throw new IllegalArgumentException("searchTerm == null");
    Differences
    Expression1Expression2Difference
    "icon == null""searchTerm == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("searchTerm == null");
    3
    if (action == null)
    3
    if (action == null)
    3
    if (providerName == null)
    Differences
    Expression1Expression2Difference
    actionproviderNameVARIABLE_NAME_MISMATCH
    javax.swing.Actionjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.swing.Action of variable action does not match with type java.lang.String of variable providerName
    • Make classes javax.swing.Action and java.lang.String extend a common superclass
    3
    if (providerName == null)
    4
    throw new IllegalArgumentException("action == null");
    4
    throw new IllegalArgumentException("action == null");
    4
    throw new IllegalArgumentException("providerName == null");
    Differences
    Expression1Expression2Difference
    "action == null""providerName == null"LITERAL_VALUE_MISMATCH
    4
    throw new IllegalArgumentException("providerName == null");
    5
    if (border == null)
    5
    if (border == null)
    5
    if (criteriaName == null)
    Differences
    Expression1Expression2Difference
    bordercriteriaNameVARIABLE_NAME_MISMATCH
    5
    if (criteriaName == null)
    6
    throw new IllegalArgumentException("border == null");
    6
    throw new IllegalArgumentException("border == null");
    6
    throw new IllegalArgumentException("criteriaName == null");
    Differences
    Expression1Expression2Difference
    "border == null""criteriaName == null"LITERAL_VALUE_MISMATCH
    6
    throw new IllegalArgumentException("criteriaName == null");
    Precondition Violations (3)
    Row Violation
    1Type javax.swing.ImageIcon of variable icon does not match with type java.lang.String of variable searchTerm
    2Type javax.swing.Action of variable action does not match with type java.lang.String of variable providerName
    3The refactoring of the clones is infeasible, because classes org.columba.core.gui.docking.TitleBar and org.columba.core.search.SearchManager do not have a common superclass