if (theName == null) { throw new IllegalArgumentException("name == null"); } if (theNamespace == null) { throw new IllegalArgumentException("namespace"); } if (value == null) { throw new IllegalArgumentException("value == null"); }
if (dtStart == null) throw new IllegalArgumentException("dtStart == null"); if (due == null) throw new IllegalArgumentException("due == null"); if (summary == null) throw new IllegalArgumentException("summary == 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/calendar/src/main/java/org/columba/calendar/model/Todo.java
Method name: void setObject(String, String, Object) Method name: void Todo(Calendar, Calendar, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (theName == null) {
1
if (dtStart == null)
2
			throw new IllegalArgumentException("name == null");
2
			throw new IllegalArgumentException("dtStart == null");
3
		}
4
		if (theNamespace == null) {
3
		if (due == null)
5
			throw new IllegalArgumentException("namespace");
4
			throw new IllegalArgumentException("due == null");
6
		}
7
		if (value == null) {
5
		if (summary == null)
8
			throw new IllegalArgumentException("value == null");
6
			throw new IllegalArgumentException("summary == null");
9
		}
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.3
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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (theName == null)
    1
    if (theName == null)
    2
    if (dtStart == null)
    Differences
    Expression1Expression2Difference
    theNamedtStartVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.util.CalendarVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable theName does not match with type java.util.Calendar of variable dtStart
    • Make classes java.lang.String and java.util.Calendar extend a common superclass
    2
    if (dtStart == null)
    2
    throw new IllegalArgumentException("name == null");
    2
    throw new IllegalArgumentException("name == null");
    3
    throw new IllegalArgumentException("dtStart == null");
    Differences
    Expression1Expression2Difference
    "name == null""dtStart == null"LITERAL_VALUE_MISMATCH
    3
    throw new IllegalArgumentException("dtStart == null");
    3
    if (theNamespace == null)
    3
    if (theNamespace == null)
    4
    if (due == null)
    Differences
    Expression1Expression2Difference
    theNamespacedueVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.util.CalendarVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable theNamespace does not match with type java.util.Calendar of variable due
    • Make classes java.lang.String and java.util.Calendar extend a common superclass
    4
    if (due == null)
    4
    throw new IllegalArgumentException("namespace");
    4
    throw new IllegalArgumentException("namespace");
    5
    throw new IllegalArgumentException("due == null");
    Differences
    Expression1Expression2Difference
    "namespace""due == null"LITERAL_VALUE_MISMATCH
    5
    throw new IllegalArgumentException("due == null");
    5
    if (value == null)
    5
    if (value == null)
    6
    if (summary == null)
    Differences
    Expression1Expression2Difference
    valuesummaryVARIABLE_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 summary
    • Make classes java.lang.Object and java.lang.String extend a common superclass
    6
    if (summary == null)
    6
    throw new IllegalArgumentException("value == null");
    6
    throw new IllegalArgumentException("value == null");
    7
    throw new IllegalArgumentException("summary == null");
    Differences
    Expression1Expression2Difference
    "value == null""summary == null"LITERAL_VALUE_MISMATCH
    7
    throw new IllegalArgumentException("summary == null");
    Precondition Violations (3)
    Row Violation
    1Type java.lang.String of variable theName does not match with type java.util.Calendar of variable dtStart
    2Type java.lang.String of variable theNamespace does not match with type java.util.Calendar of variable due
    3Type java.lang.Object of variable value does not match with type java.lang.String of variable summary