File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/LocalXMLFileStore.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/store/LocalCalendarStore.java | |||
Method name: Document load(Object)
|
Method name: IComponentInfo get(Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Document doc = null;↵ | |||
2 | try {↵ | |||
3 | doc = builder.build(file↵ | 1 | IComponentInfo basicModel = null;↵ | |
2 | try {↵ | |||
4 | );↵ | 3 | basicModel = VCalendarModelFactory.unmarshall(document);↵ | |
5 | } catch (JDOMException e) {↵ | 4 | } catch (SyntaxException e) {↵ | |
6 | throw new StoreException(e);↵ | 5 | throw new StoreException(e);↵ | |
7 | } catch (IOException e) {↵ | 6 | } catch (IllegalArgumentException e) {↵ | |
8 | throw new StoreException(e);↵ | 7 | throw new StoreException(e);↵ | |
9 | }↵ | 8 | }↵ | |
10 | return doc; | 9 | return basicModel; | |
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 in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 6 | IComponentInfo basicModel = null; | |||||||||||||||||||||||||||
6 | Document doc = null; | | |||||||||||||||||||||||||||
7 | try |
| 7 | try | |||||||||||||||||||||||||
|
| 8 | basicModel = VCalendarModelFactory.unmarshall(document); | ||||||||||||||||||||||||||
8 | doc = builder.build(file); |
| | ||||||||||||||||||||||||||
|
| 9 | return basicModel; | ||||||||||||||||||||||||||
9 | return doc; |
| |
Row | Violation |
---|---|
1 | Unmatched statement basicModel=VCalendarModelFactory.unmarshall(document); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
2 | Unmatched statement doc=builder.build(file); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched return basicModel; |
4 | Unmatched return doc; |