if (id == null) throw new IllegalArgumentException("id == null"); if (type == null) throw new IllegalArgumentException("type == null"); if (calendarId == null) throw new IllegalArgumentException("calendarId == null");
if (type == null) throw new IllegalArgumentException("type == null"); if (calendarId == null) throw new IllegalArgumentException("calendarId == null"); if (component == null) throw new IllegalArgumentException("component == 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/calendar/src/main/java/org/columba/calendar/model/ComponentInfo.java
Method name: void ComponentInfo(String, TYPE, String, IComponent) Method name: void ComponentInfo(String, TYPE, String, IComponent)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (id == null)
2
			throw new IllegalArgumentException("id == null");
3
		if (type == null)
1
if (type == null)
4
			throw new IllegalArgumentException("type == null");
2
			throw new IllegalArgumentException("type == null");
5
		if (calendarId == null)
3
		if (calendarId == null)
6
			throw new IllegalArgumentException("calendarId == null");
4
			throw new IllegalArgumentException("calendarId == null");
5
		if (component == null)
6
			throw new IllegalArgumentException("component == 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.3
Clones locationClones are in the same method
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 (id == null)
    1
    if (id == null)
    3
    if (type == null)
    Differences
    Expression1Expression2Difference
    idtypeVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.columba.calendar.model.api.IComponent.TYPEVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable id does not match with type org.columba.calendar.model.api.IComponent.TYPE of variable type
    • Make classes java.lang.String and org.columba.calendar.model.api.IComponent.TYPE extend a common superclass
    3
    if (type == null)
    2
    throw new IllegalArgumentException("id == null");
    2
    throw new IllegalArgumentException("id == null");
    4
    throw new IllegalArgumentException("type == null");
    Differences
    Expression1Expression2Difference
    "id == null""type == null"LITERAL_VALUE_MISMATCH
    4
    throw new IllegalArgumentException("type == null");
    3
    if (type == null)
    3
    if (type == null)
    5
    if (calendarId == null)
    Differences
    Expression1Expression2Difference
    typecalendarIdVARIABLE_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 calendarId
    • Make classes org.columba.calendar.model.api.IComponent.TYPE and java.lang.String extend a common superclass
    5
    if (calendarId == null)
    4
    throw new IllegalArgumentException("type == null");
    4
    throw new IllegalArgumentException("type == null");
    6
    throw new IllegalArgumentException("calendarId == null");
    Differences
    Expression1Expression2Difference
    "type == null""calendarId == null"LITERAL_VALUE_MISMATCH
    6
    throw new IllegalArgumentException("calendarId == null");
    5
    if (calendarId == null)
    5
    if (calendarId == null)
    7
    if (component == null)
    Differences
    Expression1Expression2Difference
    calendarIdcomponentVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.columba.calendar.model.api.IComponentVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable calendarId does not match with type org.columba.calendar.model.api.IComponent of variable component
    • Make classes java.lang.String and org.columba.calendar.model.api.IComponent extend a common superclass
    7
    if (component == null)
    6
    throw new IllegalArgumentException("calendarId == null");
    6
    throw new IllegalArgumentException("calendarId == null");
    8
    throw new IllegalArgumentException("component == null");
    Differences
    Expression1Expression2Difference
    "calendarId == null""component == null"LITERAL_VALUE_MISMATCH
    8
    throw new IllegalArgumentException("component == null");
    Precondition Violations (3)
    Row Violation
    1Type java.lang.String of variable id does not match with type org.columba.calendar.model.api.IComponent.TYPE of variable type
    2Type org.columba.calendar.model.api.IComponent.TYPE of variable type does not match with type java.lang.String of variable calendarId
    3Type java.lang.String of variable calendarId does not match with type org.columba.calendar.model.api.IComponent of variable component