if (day == null) throw new IllegalArgumentException("day == null"); this.day = day; this.offset = offset;
if (id == null) throw new IllegalArgumentException("id == null"); this.id = id; this.contact = contact;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/model/WeekDay.java File path: /columba-1.4-src/contact-facade/src/main/java/org/columba/addressbook/facade/HeaderItem.java
Method name: void WeekDay(String, int) Method name: void HeaderItem(String, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (day == null)
1
if (id == null)
2
			throw new IllegalArgumentException("day == null");
2
			throw new IllegalArgumentException("id == null");
3
		this.day = day;
3
		this.id = id;
4
		this.offset = offset;
4
		this.contact = contact;
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.1
Clones locationClones are in different classes
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (day == null)
    1
    if (day == null)
    1
    if (id == null)
    Differences
    Expression1Expression2Difference
    dayidVARIABLE_NAME_MISMATCH
    1
    if (id == null)
    2
    throw new IllegalArgumentException("day == null");
    2
    throw new IllegalArgumentException("day == null");
    2
    throw new IllegalArgumentException("id == null");
    Differences
    Expression1Expression2Difference
    "day == null""id == null"LITERAL_VALUE_MISMATCH
    2
    throw new IllegalArgumentException("id == null");
    3
    this.day = day;
    3
    this.day = day;
    3
    this.id = id;
    Differences
    Expression1Expression2Difference
    dayidVARIABLE_NAME_MISMATCH
    dayidVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.day is a field being modified, and thus it cannot be parameterized
    Expression this.id is a field being modified, and thus it cannot be parameterized
    3
    this.id = id;
                                                    
    4
    this.contact = contact;
    Preondition Violations
    Unmatched statement this.contact=contact; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4
    this.contact = contact;
    4
    this.offset = offset;
    4
    this.offset = offset;
    Preondition Violations
    Unmatched statement this.offset=offset; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                
    Precondition Violations (5)
    Row Violation
    1Expression this.day is a field being modified, and thus it cannot be parameterized
    2Expression this.id is a field being modified, and thus it cannot be parameterized
    3Unmatched statement this.contact=contact; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement this.offset=offset; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5The refactoring of the clones is infeasible, because classes org.columba.calendar.model.WeekDay and org.columba.addressbook.facade.HeaderItem do not have a common superclass