if (type == null) throw new IllegalArgumentException("type == null"); if (calendarId == null) throw new IllegalArgumentException("calendarId == null"); if (component == null) throw new IllegalArgumentException("component == null");
if (theName == null) { throw new IllegalArgumentException("name == null"); } if (theNamespace == null) { throw new IllegalArgumentException("namespace"); } if (value == null) { throw new IllegalArgumentException("value == null"); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/model/ComponentInfo.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java
Method name: void ComponentInfo(String, TYPE, String, IComponent) Method name: void setObject(String, String, Object)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (type == null)
1
if (theName == null) {
2
			throw new IllegalArgumentException("type == null");
2
			throw new IllegalArgumentException("name == null");
3
		if (calendarId
3
		}
4
 == null)
4
		if (theNamespace == null) {
5
			throw new IllegalArgumentException("calendarId == null");
5
			throw new IllegalArgumentException("
6
		if (component
6
namespace");
7
		}
7
 == null)
8
		if (value == null) {
8
			throw new IllegalArgumentException("component == null");
9
			throw new IllegalArgumentException("value == 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.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
    3
    if (type == null)
    3
    if (type == null)
    3
    if (theNamespace == null)
    Differences
    Expression1Expression2Difference
    typetheNamespaceVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IComponent.TYPEjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.calendar.model.api.IComponent.TYPE of variable type does not match with type java.lang.String of variable theNamespace
    • Make classes org.columba.calendar.model.api.IComponent.TYPE and java.lang.String extend a common superclass
    3
    if (theNamespace == null)
    4
    throw new IllegalArgumentException("type == null");
    4
    throw new IllegalArgumentException("type == null");
    4
    throw new IllegalArgumentException("namespace");
    Differences
    Expression1Expression2Difference
    "type == null""namespace"LITERAL_VALUE_MISMATCH
    4
    throw new IllegalArgumentException("namespace");
    5
    if (calendarId == null)
    5
    if (calendarId == null)
    5
    if (value == null)
    Differences
    Expression1Expression2Difference
    calendarIdvalueVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.ObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable calendarId does not match with type java.lang.Object of variable value
    • Make classes java.lang.String and java.lang.Object extend a common superclass
    5
    if (value == null)
    6
    throw new IllegalArgumentException("calendarId == null");
    6
    throw new IllegalArgumentException("calendarId == null");
    6
    throw new IllegalArgumentException("value == null");
    Differences
    Expression1Expression2Difference
    "calendarId == null""value == null"LITERAL_VALUE_MISMATCH
    6
    throw new IllegalArgumentException("value == null");
    7
    if (component == null)
    7
    if (component == null)
    1
    if (theName == null)
    Differences
    Expression1Expression2Difference
    componenttheNameVARIABLE_NAME_MISMATCH
    org.columba.calendar.model.api.IComponentjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.calendar.model.api.IComponent of variable component does not match with type java.lang.String of variable theName
    • Make classes org.columba.calendar.model.api.IComponent and java.lang.String extend a common superclass
    1
    if (theName == null)
    8
    throw new IllegalArgumentException("component == null");
    8
    throw new IllegalArgumentException("component == null");
    2
    throw new IllegalArgumentException("name == null");
    Differences
    Expression1Expression2Difference
    "component == null""name == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("name == null");
    Precondition Violations (3)
    Row Violation
    1Type org.columba.calendar.model.api.IComponent.TYPE of variable type does not match with type java.lang.String of variable theNamespace
    2Type java.lang.String of variable calendarId does not match with type java.lang.Object of variable value
    3Type org.columba.calendar.model.api.IComponent of variable component does not match with type java.lang.String of variable theName