File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/CalendarImporter.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/CalendarImporter.java | |||
Method name: Iterator
|
Method name: Iterator
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (status != null)↵ | 1 | if (summary != null)↵ | |
2 | event.setStatus(status);↵ | 2 | event.setSummary(summary);↵ | |
3 | if (url != null)↵ | 3 | if (eventClass != null)↵ | |
4 | event.setUrl(url);↵ | 4 | event.setEventClass(eventClass);↵ | |
5 | if (description != null)↵ | 5 | if (location != null)↵ | |
6 | event.setDescription(description); | 6 | event.setLocation(location); | |
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.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 30 |
Number of mapped statements | 5 |
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) | 13.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
115 | if (status != null) |
| 107 | if (summary != null) | |||||||||||||||||
116 | event.setStatus(status); |
| 108 | event.setSummary(summary); | |||||||||||||||||
117 | if (url != null) |
| 109 | if (eventClass != null) | |||||||||||||||||
|
| 110 | event.setEventClass(eventClass); | ||||||||||||||||||
118 | event.setUrl(url); |
| | ||||||||||||||||||
119 | if (description != null) |
| 111 | if (location != null) | |||||||||||||||||
120 | event.setDescription(description); |
| 112 | event.setLocation(location); |
Row | Violation |
---|---|
1 | Expression event.setStatus(status) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression event.setSummary(summary) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression event.setStatus(status) is a void method call, and thus it cannot be parameterized |
4 | Expression event.setSummary(summary) is a void method call, and thus it cannot be parameterized |
5 | Type java.net.URL of variable url does not match with type java.lang.String of variable eventClass |
6 | Unmatched statement event.setEventClass(eventClass); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement event.setUrl(url); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Expression event.setDescription(description) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression event.setLocation(location) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression event.setDescription(description) is a void method call, and thus it cannot be parameterized |
11 | Expression event.setLocation(location) is a void method call, and thus it cannot be parameterized |