File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/autocomplete/AddressCollector.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/util/AddressCollector.java | |||
Method name: void addAllContacts(String, boolean)
|
Method name: void addAllContacts(List
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | while (it.hasNext()) {↵ | 1 | while (it.hasNext()) {↵ | |
2 | BasicModelPartial headerItem = (BasicModelPartial) it.next();↵ | 2 | IHeaderItem headerItem = it.next();↵ | |
3 | if (headerItem.isContact()) {↵ | 3 | if (headerItem.isContact()) {↵ | |
4 | // contacts item↵ | 4 | // contacts item↵ | |
5 | ContactModelPartial item = (ContactModelPartial) headerItem;↵ | 5 | IContactItem item = (IContactItem) headerItem;↵ | |
6 | addAddress(item.getName(), item);↵ | 6 | addAddress(item.getName(), item);↵ | |
7 | addAddress(item.getLastname(), item);↵ | 7 | addAddress(item.getFirstName(), item);↵ | |
8 | addAddress(item.getFirstname(), item);↵ | 8 | addAddress(item.getLastName(), item);↵ | |
9 | addAddress(item.getAddress(), item);↵ | 9 | addAddress(item.getEmailAddress(), item);↵ | |
10 | } else {↵ | 10 | } else {↵ | |
11 | if (includeGroup) {↵ | 11 | if (includeGroup) {↵ | |
12 | // group item↵ | 12 | // group item↵ | |
13 | GroupModelPartial item = (GroupModelPartial) headerItem;↵ | 13 | IGroupItem item = (IGroupItem) headerItem;↵ | |
14 | addAddress(item.getName(), item);↵ | 14 | addAddress(item.getName(), item);↵ | |
15 | }↵ | 15 | }↵ | |
16 | }↵ | 16 | }↵ | |
17 | } | 17 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 49 |
Number of mapped statements | 8 |
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) | 26.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | while (it.hasNext()) |
| 4 | while (it.hasNext()) | ||||||||||||||||||||
|
| 5 | IHeaderItem headerItem = it.next(); | |||||||||||||||||||||
17 | BasicModelPartial headerItem = (BasicModelPartial)it.next(); |
| | |||||||||||||||||||||
18 | if (headerItem.isContact()) |
| 6 | if (headerItem.isContact()) | ||||||||||||||||||||
|
| 7 | IContactItem item = (IContactItem)headerItem; | |||||||||||||||||||||
19 | ContactModelPartial item = (ContactModelPartial)headerItem; |
| | |||||||||||||||||||||
20 | addAddress(item.getName(), item); |
| 8 | addAddress(item.getName(), item); | ||||||||||||||||||||
21 | addAddress(item.getLastname(), item); |
| 9 | addAddress(item.getFirstName(), item); | ||||||||||||||||||||
22 | addAddress(item.getFirstname(), item); |
| 10 | addAddress(item.getLastName(), item); | ||||||||||||||||||||
23 | addAddress(item.getAddress(), item); |
| 11 | addAddress(item.getEmailAddress(), item); | ||||||||||||||||||||
else | else | |||||||||||||||||||||||
24 | if (includeGroup) | 12 | if (includeGroup) | |||||||||||||||||||||
|
| 13 | IGroupItem item = (IGroupItem)headerItem; | |||||||||||||||||||||
25 | GroupModelPartial item = (GroupModelPartial)headerItem; |
| | |||||||||||||||||||||
26 | addAddress(item.getName(), item); |
| 14 | addAddress(item.getName(), item); |
Row | Violation |
---|---|
1 | Type java.util.Iterator of variable it does not match with type java.util.Iterator<org.columba.addressbook.facade.IHeaderItem> of variable it |
2 | Unmatched statement IHeaderItem headerItem=it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement BasicModelPartial headerItem=(BasicModelPartial)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type org.columba.addressbook.model.BasicModelPartial of variable headerItem does not match with type org.columba.addressbook.facade.IHeaderItem of variable headerItem |
5 | Unmatched statement IContactItem item=(IContactItem)headerItem; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement ContactModelPartial item=(ContactModelPartial)headerItem; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
8 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
9 | Expression item.getLastname() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression item.getFirstName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
12 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
13 | Expression item.getFirstname() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression item.getLastName() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
16 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
17 | Expression item.getAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression item.getEmailAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
20 | Type org.columba.addressbook.model.ContactModelPartial of variable item does not match with type org.columba.addressbook.facade.IContactItem of variable item |
21 | Unmatched statement IGroupItem item=(IGroupItem)headerItem; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
22 | Unmatched statement GroupModelPartial item=(GroupModelPartial)headerItem; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
23 | Type org.columba.addressbook.model.GroupModelPartial of variable item does not match with type org.columba.addressbook.facade.IGroupItem of variable item |
24 | Type org.columba.addressbook.model.GroupModelPartial of variable item does not match with type org.columba.addressbook.facade.IGroupItem of variable item |