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: IContactModel unmarshall(Document, String)
|
Method name: IContactModel unmarshall(Document, String)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | while (it.hasNext()) {↵ | |||
2 | model.addEmail((IEmailModel) it.next());↵ | |||
3 | }↵ | |||
1 | it = parser.getPhoneIterator();↵ | 4 | it = parser.getPhoneIterator();↵ | |
2 | while (it.hasNext()) {↵ | 5 | while (it.hasNext()) {↵ | |
3 | model.addPhone((PhoneModel) it.next());↵ | 6 | model.addPhone((PhoneModel) it.next());↵ | |
4 | }↵ | 7 | }↵ | |
5 | it = parser.getInstantMessagingIterator();↵ | 8 | it = parser.getInstantMessagingIterator();↵ | |
6 | while (it.hasNext()) {↵ | 9 | while (it.hasNext()) {↵ | |
7 | model.addInstantMessaging((InstantMessagingModel) it.next());↵ | 10 | model.addInstantMessaging((InstantMessagingModel) it.next());↵ | |
8 | }↵ | 11 |
| |
9 | it = parser.getAddressIterator();↵ | |||
10 | while (it.hasNext()) {↵ | |||
11 | model.addAddress((AddressModel) it.next());↵ | |||
12 | } | |||
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 the same method |
Number of node comparisons | 36 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 198.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32 | it = parser.getPhoneIterator(); | 32 | it = parser.getPhoneIterator(); | |||||||||||||||||||||
33 | while (it.hasNext()) | 33 | while (it.hasNext()) | |||||||||||||||||||||
34 | model.addPhone((PhoneModel)it.next()); | 34 | model.addPhone((PhoneModel)it.next()); | |||||||||||||||||||||
35 | it = parser.getInstantMessagingIterator(); | 35 | it = parser.getInstantMessagingIterator(); | |||||||||||||||||||||
36 | while (it.hasNext()) | 36 | while (it.hasNext()) | |||||||||||||||||||||
37 | model.addInstantMessaging((InstantMessagingModel)it.next()); | 37 | model.addInstantMessaging((InstantMessagingModel)it.next()); | |||||||||||||||||||||
38 | it = parser.getAddressIterator(); |
| | |||||||||||||||||||||
39 | while (it.hasNext()) | 30 | while (it.hasNext()) | |||||||||||||||||||||
40 | model.addAddress((AddressModel)it.next()); |
| 31 | model.addEmail((IEmailModel)it.next()); |
Row | Violation |
---|---|
1 | Unmatched statement it=parser.getAddressIterator(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression model.addAddress((AddressModel)it.next()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression model.addEmail((IEmailModel)it.next()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression model.addAddress((AddressModel)it.next()) is a void method call, and thus it cannot be parameterized |
5 | Expression model.addEmail((IEmailModel)it.next()) is a void method call, and thus it cannot be parameterized |
6 | Expression (AddressModel)it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression (IEmailModel)it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.columba.addressbook.model.AddressModel of variable (AddressModel)it.next() does not match with type org.columba.addressbook.model.IEmailModel of variable (IEmailModel)it.next() |