File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/parser/XMLContactDocumentParser.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/parser/XMLContactDocumentParser.java | |||
Method name: void addInstantMessaging(InstantMessagingModel)
|
Method name: void addAddress(AddressModel)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Element child = getParentElement().getChild(VCARD.IM);↵ | 1 | Element child = getParentElement().getChild(VCARD.ADR);↵ | |
2 | if (child == null) {↵ | 2 | if (child == null) {↵ | |
3 | child = new Element(VCARD.IM);↵ | 3 | child = new Element(VCARD.ADR);↵ | |
4 | getParentElement().addContent(child);↵ | 4 | getParentElement().addContent(child);↵ | |
5 | }↵ | 5 | }↵ | |
6 | // create <type> element↵ | |||
6 | Element prefixchild = new Element(m.getTypeString());↵ | 7 | Element prefixchild = new Element(m.getTypeString());↵ | |
7 | child.addContent(prefixchild); | 8 |
| |
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 declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Element child = getParentElement().getChild(VCARD.IM); |
| 1 | Element child = getParentElement().getChild(VCARD.ADR); | |||||||||||
2 | if (child == null) | 2 | if (child == null) | ||||||||||||
3 | child = new Element(VCARD.IM); |
| 3 | child = new Element(VCARD.ADR); | |||||||||||
4 | getParentElement().addContent(child); | 4 | getParentElement().addContent(child); | ||||||||||||
5 | Element prefixchild = new Element(m.getTypeString()); |
| 5 | Element prefixchild = new Element(m.getTypeString()); | |||||||||||
6 | child.addContent(prefixchild); | 6 | child.addContent(prefixchild); |
Row | Violation |
---|---|
1 | Type org.columba.addressbook.model.InstantMessagingModel of variable m does not match with type org.columba.addressbook.model.AddressModel of variable m |