File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/model/WeekDay.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/BasicModelPartial.java | |||
Method name: void WeekDay(String, int)
|
Method name: void BasicModelPartial(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.↵ | |
4 | this.offset = offset↵ | 4 | contact = contact;↵ | |
5 | ; | 5 | this.id = id; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 7 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (day == null) |
| 1 | if (id == null) | |||||||||||||||
2 | throw new IllegalArgumentException("day == null"); |
| 2 | throw new IllegalArgumentException("id == null"); | |||||||||||||||
|
| 3 | this.contact = contact; | ||||||||||||||||
3 | this.day = day; |
| 4 | this.id = id; | |||||||||||||||
4 | this.offset = offset; |
| |
Row | Violation |
---|---|
1 | Unmatched statement this.contact=contact; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression this.day is a field being modified, and thus it cannot be parameterized |
3 | Expression this.id is a field being modified, and thus it cannot be parameterized |
4 | Unmatched statement this.offset=offset; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | The refactoring of the clones is infeasible, because classes org.columba.calendar.model.WeekDay and org.columba.addressbook.model.BasicModelPartial do not have a common superclass |