File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/AttachmentModel.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/HeaderViewer.java | |||
Method name: void setCollection(MimeTree)
|
Method name: void removeBodyParts(MimeTree, List)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | StreamableMimePart bodyPart = (StreamableMimePart) collection↵ | 1 | StreamableMimePart bodyPart = (StreamableMimePart) model↵ | |
2 | .getFirstTextPart("plain");↵ | 2 | .getFirstTextPart("plain");↵ | |
3 | if (bodyPart != null) {↵ | 3 | if (bodyPart != null) {↵ | |
4 | MimePart bodyParent = bodyPart.getParent();↵ | 4 | MimePart bodyParent = bodyPart.getParent();↵ | |
5 | if (bodyParent != null) {↵ | 5 | if (bodyParent != null) {↵ | |
6 | if (bodyParent.getHeader().getMimeType().getSubtype().equals(↵ | 6 | if (bodyParent.getHeader().getMimeType().getSubtype().equals(↵ | |
7 | "alternative")) {↵ | 7 | "alternative")) {↵ | |
8 | List bodyParts = bodyParent.getChilds();↵ | 8 | List bodyParts = bodyParent.getChilds();↵ | |
9 | displayedMimeParts.removeAll(bodyParts);↵ | 9 | displayedMimeParts.removeAll(bodyParts);↵ | |
10 | } else {↵ | 10 | } else {↵ | |
11 | displayedMimeParts.remove(bodyPart);↵ | 11 | displayedMimeParts.remove(bodyPart);↵ | |
12 | }↵ | 12 | }↵ | |
13 | } else {↵ | 13 | } else {↵ | |
14 | displayedMimeParts.remove(bodyPart);↵ | 14 | displayedMimeParts.remove(bodyPart);↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 25 |
Number of mapped statements | 9 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | StreamableMimePart bodyPart = (StreamableMimePart)collection.getFirstTextPart("plain"); |
| 1 | StreamableMimePart bodyPart = (StreamableMimePart)model.getFirstTextPart("plain"); | ||||||||||
4 | if (bodyPart != null) | 2 | if (bodyPart != null) | |||||||||||
5 | MimePart bodyParent = bodyPart.getParent(); | 3 | MimePart bodyParent = bodyPart.getParent(); | |||||||||||
6 | if (bodyParent != null) | 4 | if (bodyParent != null) | |||||||||||
7 | if (bodyParent.getHeader().getMimeType().getSubtype().equals("alternative")) | 5 | if (bodyParent.getHeader().getMimeType().getSubtype().equals("alternative")) | |||||||||||
8 | List bodyParts = bodyParent.getChilds(); | 6 | List bodyParts = bodyParent.getChilds(); | |||||||||||
9 | displayedMimeParts.removeAll(bodyParts); | 7 | displayedMimeParts.removeAll(bodyParts); | |||||||||||
else | else | |||||||||||||
10 | displayedMimeParts.remove(bodyPart); | 8 | displayedMimeParts.remove(bodyPart); | |||||||||||
else | else | |||||||||||||
11 | displayedMimeParts.remove(bodyPart); | 9 | displayedMimeParts.remove(bodyPart); |
Row | Violation |
---|