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: 4 | Number of AST nodes: 4 | |||
1 | mimePartFile = TempFileStore.createTempFile();↵ | 1 | mimePartFile = TempFileStore.createTempFile();↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | downloadMimePart(CIDPart, mimePartFile);↵ | 3 | downloadMimePart(CIDPart, mimePartFile);↵ | |
4 | matcher.appendReplacement(modifiedBody, mimePartFile↵ | 4 | matcher.appendReplacement(modifiedBody, mimePartFile↵ | |
5 | .toURL()↵ | 5 | .toURL()↵ | |
6 | .toString());↵ | 6 | .toString());↵ | |
7 | } catch (Exception e) {↵ | 7 | } catch (Exception e) {↵ | |
8 | matcher.appendReplacement(modifiedBody, "missing");↵ | 8 | matcher.appendReplacement(modifiedBody, "missing");↵ | |
9 | } | 9 | } | |
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 | 11 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 9.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
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()); |
| |
Row | Violation |
---|---|
1 | 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 |
2 | 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 |
3 | 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 |
4 | 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 |