attachBuf
.insert(0,
"<html><head><title>Attachment list</title></head><body><p>\n");
attachBuf.append("</p></body></html>\n");
// insert header for attachment list
String charset;
if ((DEFAULT_CHARSET != null) && (DEFAULT_CHARSET.length() > 0))
charset = "; charset=" + DEFAULT_CHARSET;
else
charset = "";
attachBuf.insert(0, "Content-Type: text/html" + charset
+ "; name=\"attachmentlist.html\"\n\n");
attachBuf
.insert(0,
"<html><head><title>Attachment list</title></head><body><p>\n");
attachBuf.append("</p></body></html>\n");
// insert header for attachment list
String charset;
if ((DEFAULT_CHARSET != null) && (DEFAULT_CHARSET.length() > 0))
charset = "; charset=" + DEFAULT_CHARSET;
else
charset = "";
attachBuf.insert(0, "Content-Type: text/html" + charset
+ "; name=\"attachmentlist.html\"\n\n");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/plugins/org.columba.mail.EudoraMailImportFilter/src/org/columba/mail/EudoraMailImportFilter.java
|
|
File path: /columba-1.4-src/plugins/org.columba.mail.EudoraMailImportFilter/src/org/columba/mail/EudoraMailImportFilter.java
|
Method name: String[] createAttachmentListFromHeader(String, String)
|
|
Method name: String[] createAttachmentListFromAttachmentConverted(String)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | attachBuf↵ | | 1 | attachBuf↵
|
2 | .insert(0,↵ | | 2 | .insert(0,↵
|
3 | "<html><head><title>Attachment list</title></head><body><p>\n");↵ | | 3 | "<html><head><title>Attachment list</title></head><body><p>\n");↵
|
4 | attachBuf.append("</p></body></html>\n");↵ | | 4 | attachBuf.append("</p></body></html>\n");↵
|
5 | // insert header for attachment list↵ | | 5 | // insert header for attachment list↵
|
6 | String charset;↵ | | 6 | String charset;↵
|
7 | if ((DEFAULT_CHARSET != null) && (DEFAULT_CHARSET.length() > 0))↵ | | 7 | if ((DEFAULT_CHARSET != null) && (DEFAULT_CHARSET.length() > 0))↵
|
8 | charset = "; charset=" + DEFAULT_CHARSET;↵ | | 8 | charset = "; charset=" + DEFAULT_CHARSET;↵
|
9 | else↵ | | 9 | else↵
|
10 | charset = "";↵ | | 10 | charset = "";↵
|
11 | attachBuf.insert(0, "Content-Type: text/html" + charset↵ | | 11 | attachBuf.insert(0, "Content-Type: text/html" + charset↵
|
12 | + "; name=\"attachmentlist.html\"\n\n"); | | 12 | + "; name=\"attachmentlist.html\"\n\n");
|
See real code fragment |
|
See real code fragment |
Summary
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 3.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | attachBuf.insert(0, "<html><head><title>Attachment list</title></head><body><p>\n"); | | 15 | attachBuf.insert(0, "<html><head><title>Attachment list</title></head><body><p>\n"); |
11 | attachBuf.append("</p></body></html>\n"); | | 16 | attachBuf.append("</p></body></html>\n"); |
12 | String charset; | | 17 | String charset; |
13 | if ((DEFAULT_CHARSET != null) && (DEFAULT_CHARSET.length() > 0)) | | 18 | if ((DEFAULT_CHARSET != null) && (DEFAULT_CHARSET.length() > 0)) |
14 | charset = "; charset=" + DEFAULT_CHARSET; | | 19 | charset = "; charset=" + DEFAULT_CHARSET; |
| | | | |
15 | | | 20 | |
16 | attachBuf.insert(0, "Content-Type: text/html" + charset + "; name=\"attachmentlist.html\"\n\n"); | | 21 | attachBuf.insert(0, "Content-Type: text/html" + charset + "; name=\"attachmentlist.html\"\n\n"); |
Precondition Violations (0)
Row |
Violation |