File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/ContactModelXMLFactory.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/ContactModelXMLFactory.java | |||
Method name: Document marshall(IContactModel)
|
Method name: Document marshall(IContactModel)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | it = contactModel.getInstantMessagingIterator();↵ | |||
2 | while (it.hasNext()) {↵ | 1 | while (it.hasNext()) {↵ | |
3 | InstantMessagingModel m = ((InstantMessagingModel) it.next());↵ | 2 | IEmailModel m = ((IEmailModel) it.next());↵ | |
4 | parser.addInstantMessaging(m);↵ | 3 | parser.addEmail(m);↵ | |
5 | }↵ | 4 | }↵ | |
6 | // <phone>↵ | 5 | // <im>↵ | |
7 | // <business>value</business>↵ | 6 | // <aol>value</aol>↵ | |
8 | // <home>value</home>↵ | 7 | // <yahoo>value</yahoo>↵ | |
9 | // </phone↵ | 8 | // <jabber>value</jabber>↵ | |
10 | >↵ | 9 | // </im>↵ | |
11 | it = contactModel.getPhoneIterator(); | 10 | it = contactModel.getInstantMessagingIterator(); | |
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 the same method |
Number of node comparisons | 13 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 13.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44 | it = contactModel.getInstantMessagingIterator(); | 44 | it = contactModel.getInstantMessagingIterator(); | |||||||||||||||||
45 | while (it.hasNext()) | 41 | while (it.hasNext()) | |||||||||||||||||
|
| 42 | IEmailModel m = ((IEmailModel)it.next()); | |||||||||||||||||
46 | InstantMessagingModel m = ((InstantMessagingModel)it.next()); |
| | |||||||||||||||||
47 | parser.addInstantMessaging(m); |
| 43 | parser.addEmail(m); | ||||||||||||||||
48 | it = contactModel.getPhoneIterator(); | |
Row | Violation |
---|---|
1 | Unmatched statement IEmailModel m=((IEmailModel)it.next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement InstantMessagingModel m=((InstantMessagingModel)it.next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression parser.addInstantMessaging(m) is a void method call, and thus it cannot be parameterized |
4 | Expression parser.addEmail(m) is a void method call, and thus it cannot be parameterized |
5 | Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.IEmailModel of variable m |