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: Iterator getAddressIterator()
|
Method name: Iterator getAddressIterator()
|
|||
Number of AST nodes: 22 | Number of AST nodes: 22 | |||
1 | String poBox = "";↵ | |||
2 | Element e1 = typeElement.getChild(VCARD.ADR_POSTOFFICEBOX);↵ | |||
3 | if (e1 != null)↵ | |||
4 | poBox = e1.getText();↵ | |||
1 | String street = "";↵ | 5 | String street = "";↵ | |
2 | Element e2 = typeElement.getChild(VCARD.ADR_STREETADDRESS);↵ | 6 | Element e2 = typeElement.getChild(VCARD.ADR_STREETADDRESS);↵ | |
3 | if (e2 != null)↵ | 7 | if (e2 != null)↵ | |
4 | street = e2.getText();↵ | 8 | street = e2.getText();↵ | |
5 | String locality = "";↵ | 9 | String locality = "";↵ | |
6 | Element e3 = typeElement.getChild(VCARD.ADR_LOCALITY);↵ | 10 | Element e3 = typeElement.getChild(VCARD.ADR_LOCALITY);↵ | |
7 | if (e3 != null)↵ | 11 | if (e3 != null)↵ | |
8 | locality = e3.getText();↵ | 12 | locality = e3.getText();↵ | |
9 | String postalCode = "";↵ | 13 | String postalCode = "";↵ | |
10 | Element e4 = typeElement.getChild(VCARD.ADR_POSTALCODE);↵ | 14 | Element e4 = typeElement.getChild(VCARD.ADR_POSTALCODE);↵ | |
11 | if (e4 != null)↵ | 15 | if (e4 != null)↵ | |
12 | postalCode = e4.getText();↵ | 16 | postalCode = e4.getText();↵ | |
13 | String region = "";↵ | 17 | String region = "";↵ | |
14 | Element e5 = typeElement.getChild(VCARD.ADR_REGION);↵ | 18 | Element e5 = typeElement.getChild(VCARD.ADR_REGION);↵ | |
15 | if (e5 != null)↵ | 19 | if (e5 != null)↵ | |
16 | region = e5.getText();↵ | 20 | region = e5.getText();↵ | |
17 | String country = "";↵ | 21 | String country = "";↵ | |
18 | Element e6 = typeElement.getChild(VCARD.ADR_COUNTRY);↵ | 22 |
| |
19 | if (e6 != null)↵ | |||
20 | country = e6.getText();↵ | |||
21 | String label = "";↵ | |||
22 | Element e7 = typeElement.getChild(VCARD.LABEL); | |||
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) | 1.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 215 |
Number of mapped statements | 22 |
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) | 7.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | String street = ""; | 12 | String street = ""; | ||||||||||||||||||
13 | Element e2 = typeElement.getChild(VCARD.ADR_STREETADDRESS); | 13 | Element e2 = typeElement.getChild(VCARD.ADR_STREETADDRESS); | ||||||||||||||||||
14 | if (e2 != null) | 14 | if (e2 != null) | ||||||||||||||||||
15 | street = e2.getText(); | 15 | street = e2.getText(); | ||||||||||||||||||
16 | String locality = ""; | 16 | String locality = ""; | ||||||||||||||||||
17 | Element e3 = typeElement.getChild(VCARD.ADR_LOCALITY); | 17 | Element e3 = typeElement.getChild(VCARD.ADR_LOCALITY); | ||||||||||||||||||
18 | if (e3 != null) | 18 | if (e3 != null) | ||||||||||||||||||
19 | locality = e3.getText(); | 19 | locality = e3.getText(); | ||||||||||||||||||
20 | String postalCode = ""; | 20 | String postalCode = ""; | ||||||||||||||||||
21 | Element e4 = typeElement.getChild(VCARD.ADR_POSTALCODE); | 21 | Element e4 = typeElement.getChild(VCARD.ADR_POSTALCODE); | ||||||||||||||||||
22 | if (e4 != null) | 22 | if (e4 != null) | ||||||||||||||||||
23 | postalCode = e4.getText(); | 23 | postalCode = e4.getText(); | ||||||||||||||||||
24 | String region = ""; | 24 | String region = ""; | ||||||||||||||||||
25 | Element e5 = typeElement.getChild(VCARD.ADR_REGION); | 25 | Element e5 = typeElement.getChild(VCARD.ADR_REGION); | ||||||||||||||||||
26 | if (e5 != null) | 26 | if (e5 != null) | ||||||||||||||||||
27 | region = e5.getText(); | 27 | region = e5.getText(); | ||||||||||||||||||
28 | String country = ""; | 28 | String country = ""; | ||||||||||||||||||
29 | Element e6 = typeElement.getChild(VCARD.ADR_COUNTRY); | 29 | Element e6 = typeElement.getChild(VCARD.ADR_COUNTRY); | ||||||||||||||||||
30 | if (e6 != null) |
| 10 | if (e1 != null) | |||||||||||||||||
31 | country = e6.getText(); |
| 11 | poBox = e1.getText(); | |||||||||||||||||
32 | String label = ""; |
| 8 | String poBox = ""; | |||||||||||||||||
33 | Element e7 = typeElement.getChild(VCARD.LABEL); |
| 9 | Element e1 = typeElement.getChild(VCARD.ADR_POSTOFFICEBOX); |
Row | Violation |
---|---|
1 | Expression e6 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression e1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression country cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression poBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression e6 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression e1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression poBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression e1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Clone fragment #1 returns variables e7, label, street, locality, postalCode, region, country , while Clone fragment #2 returns variables e6, country, poBox, street, locality, postalCode, region |