File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/LocalCalendarStore.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/LocalCalendarStore.java | |||
Method name: IComponentInfoList getComponentInfoList()
|
Method name: Iterator
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Document document = (Document) it.next();↵ | 1 | Document document = (Document) it.next();↵ | |
2 | IComponentInfo basicModel = null;↵ | 2 | IComponentInfo basicModel = null;↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | basicModel = VCalendarModelFactory.unmarshall(document);↵ | 4 | basicModel = VCalendarModelFactory.unmarshall(document);↵ | |
5 | } catch (SyntaxException e) {↵ | 5 | } catch (SyntaxException e) {↵ | |
6 | throw new StoreException(e);↵ | 6 | throw new StoreException(e);↵ | |
7 | } catch (IllegalArgumentException e) {↵ | 7 | } catch (IllegalArgumentException e) {↵ | |
8 | throw new StoreException(e);↵ | 8 | throw new StoreException(e);↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (basicModel.getType() == IComponent.TYPE.EVENT) {↵ | 10 | if (basicModel.getType() == IComponent.TYPE.EVENT) {↵ | |
11 | IEventInfo event = (IEventInfo) basicModel;↵ | 11 | IEventInfo event = (IEventInfo) basicModel;↵ | |
12 | list.add(event);↵ | 12 | result.add(event.getId());↵ | |
13 | } | 13 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 6 |
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) | 4.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
4 | Document document = (Document)it.next(); | 4 | Document document = (Document)it.next(); | ||||
5 | IComponentInfo basicModel = null; | 5 | IComponentInfo basicModel = null; | ||||
6 | try | 6 | try | ||||
7 | basicModel = VCalendarModelFactory.unmarshall(document); | 7 | basicModel = VCalendarModelFactory.unmarshall(document); | ||||
8 | if (basicModel.getType() == IComponent.TYPE.EVENT) | 8 | if (basicModel.getType() == IComponent.TYPE.EVENT) | ||||
9 | IEventInfo event = (IEventInfo)basicModel; | 9 | IEventInfo event = (IEventInfo)basicModel; | ||||
|
| 10 | result.add(event.getId()); | ||||
10 | list.add(event); |
| |
Row | Violation |
---|---|
1 | Unmatched statement result.add(event.getId()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement list.add(event); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |