if (theName == null) { throw new IllegalArgumentException("name == null"); } if (theNamespace == null) { throw new IllegalArgumentException("namespace"); } if (value == null) { throw new IllegalArgumentException("value == 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/context/base/StructureValue.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java
Method name: void setObject(String, String, Object) Method name: void executeSearch(String, String, String, boolean, int, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (theName == null) {
1
if (searchTerm == null)
2
			throw new IllegalArgumentException("name == null");
2
			throw new IllegalArgumentException("searchTerm == null");
3
		}
3
		
4
		if (theNamespace == null) {
4
if (providerName == null)
5
			throw new IllegalArgumentException("namespace");
5
			throw new IllegalArgumentException("
6
		}
7
		if (valu
6
providerName == null");
8
e == null) {
7
		if (criteriaName == null)
9
			throw new IllegalArgumentException("value == null");
8
			throw new IllegalArgumentException("criteriaName == null");
10
		}
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.4
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
    1
    if (theName == null)
    1
    if (theName == null)
    1
    if (searchTerm == null)
    Differences
    Expression1Expression2Difference
    theNamesearchTermVARIABLE_NAME_MISMATCH
    1
    if (searchTerm == null)
    2
    throw new IllegalArgumentException("name == null");
    2
    throw new IllegalArgumentException("name == null");
    2
    throw new IllegalArgumentException("searchTerm == null");
    Differences
    Expression1Expression2Difference
    "name == null""searchTerm == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("searchTerm == null");
    3
    if (theNamespace == null)
    3
    if (theNamespace == null)
    3
    if (providerName == null)
    Differences
    Expression1Expression2Difference
    theNamespaceproviderNameVARIABLE_NAME_MISMATCH
    3
    if (providerName == null)
    4
    throw new IllegalArgumentException("namespace");
    4
    throw new IllegalArgumentException("namespace");
    4
    throw new IllegalArgumentException("providerName == null");
    Differences
    Expression1Expression2Difference
    "namespace""providerName == null"LITERAL_VALUE_MISMATCH
    4
    throw new IllegalArgumentException("providerName == null");
    5
    if (value == null)
    5
    if (value == null)
    5
    if (criteriaName == null)
    Differences
    Expression1Expression2Difference
    valuecriteriaNameVARIABLE_NAME_MISMATCH
    java.lang.Objectjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object of variable value does not match with type java.lang.String of variable criteriaName
    • Make classes java.lang.Object and java.lang.String extend a common superclass
    5
    if (criteriaName == null)
    6
    throw new IllegalArgumentException("value == null");
    6
    throw new IllegalArgumentException("value == null");
    6
    throw new IllegalArgumentException("criteriaName == null");
    Differences
    Expression1Expression2Difference
    "value == null""criteriaName == null"LITERAL_VALUE_MISMATCH
    6
    throw new IllegalArgumentException("criteriaName == null");
    Precondition Violations (2)
    Row Violation
    1Type java.lang.Object of variable value does not match with type java.lang.String of variable criteriaName
    2The refactoring of the clones is infeasible, because classes org.columba.core.context.base.StructureValue and org.columba.core.search.SearchManager do not have a common superclass