File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/TextViewer.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/TextViewer.java | |||
Method name: String downloadCIDParts(String, MimeTree)
|
Method name: String downloadCIDParts(String, MimeTree)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | CIDPart = findMimePart(mimeParts, matcher.group(1));↵ | |||
2 | if (CIDPart != null) {↵ | 1 | if (CIDPart != null) {↵ | |
3 | mimePartFile = TempFileStore.createTempFile();↵ | 2 | mimePartFile = TempFileStore.createTempFile();↵ | |
4 | try {↵ | 3 | try {↵ | |
5 | downloadMimePart(CIDPart, mimePartFile);↵ | 4 | downloadMimePart(CIDPart, mimePartFile);↵ | |
6 | matcher.appendReplacement(modifiedBody, mimePartFile↵ | 5 | matcher.appendReplacement(modifiedBody, mimePartFile↵ | |
7 | .toURL()↵ | 6 | .toURL()↵ | |
8 | .toString());↵ | 7 | .toString());↵ | |
9 | } catch (Exception e) {↵ | 8 | } catch (Exception e) {↵ | |
10 | matcher.appendReplacement(modifiedBody, "missing");↵ | 9 | matcher.appendReplacement(modifiedBody, "missing");↵ | |
11 | }↵ | 10 | }↵ | |
12 | } else {↵ | 11 | } else {↵ | |
13 | matcher.appendReplacement(modifiedBody, "missing");↵ | 12 | matcher.appendReplacement(modifiedBody, "missing");↵ | |
14 | } | 13 | } | |
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 | 18 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 11.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
15 | CIDPart = findMimePart(mimeParts, matcher.group(1)); |
| | |||||
16 | if (CIDPart != null) | 8 | if (CIDPart != null) | |||||
17 | mimePartFile = TempFileStore.createTempFile(); | 9 | mimePartFile = TempFileStore.createTempFile(); | |||||
18 | try | 10 | try | |||||
19 | downloadMimePart(CIDPart, mimePartFile); | 11 | downloadMimePart(CIDPart, mimePartFile); | |||||
|
| 12 | matcher.appendReplacement(modifiedBody, mimePartFile.toURL().toString()); | |||||
20 | matcher.appendReplacement(modifiedBody, mimePartFile.toURL().toString()); |
| | |||||
else | | |||||||
|
| 13 | matcher.appendReplacement(modifiedBody, "missing"); | |||||
21 | matcher.appendReplacement(modifiedBody, "missing"); |
| |
Row | Violation |
---|---|
1 | Unmatched statement CIDPart=findMimePart(mimeParts,matcher.group(1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement matcher.appendReplacement(modifiedBody,mimePartFile.toURL().toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement matcher.appendReplacement(modifiedBody,mimePartFile.toURL().toString()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
4 | Unmatched statement matcher.appendReplacement(modifiedBody,mimePartFile.toURL().toString()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement matcher.appendReplacement(modifiedBody,mimePartFile.toURL().toString()); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
6 | Unmatched statement matcher.appendReplacement(modifiedBody,"missing"); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement matcher.appendReplacement(modifiedBody,"missing"); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |