File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/mailboximport/EvolutionImporter.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/mailboximport/PegasusMailImporter.java | |||
Method name: void importMailboxFile(File, IWorkerStatusController, IMailbox)
|
Method name: void importMailboxFile(File, IWorkerStatusController, IMailbox)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 10 | |||
1 | if ((str.startsWith("From ") == false) || (str.length↵ | 1 | while ((str = in.readLine()) != null) {↵ | |
2 | // if user cancelled task exit immediately↵ | |||
2 | () == 0)) {↵ | 3 | if (worker.cancelled() == true) {↵ | |
3 | strbuf.append(str + "\n");↵ | 4 | return;↵ | |
4 | } else {↵ | 5 | }↵ | |
5 | ↵ | |||
6 | // line contains "@" (evolution mbox style) or↵ | 6 | // if line ↵ | |
7 | // -> import message in Columba↵ | |||
7 | doesn't start with "From ???@???" or line length is 0↵ | |||
8 | // -> save everything in StringBuffer↵ | |||
9 | if ((str.startsWith("From ???@???") == false) ||↵ | |||
8 | if (str.indexOf("@") != -1) {↵ | 10 | (str.length() == 0)) {↵ | |
9 | ↵ | 11 | strbuf.append(str + "\n");↵ | |
12 | } else {↵ | |||
10 | if (strbuf.length() != 0) {↵ | 13 | if (strbuf.length() != 0) {↵ | |
11 | // found new message↵ | 14 | // found new message↵ | |
12 | saveMessage(strbuf.toString(), worker,↵ | 15 | saveMessage(strbuf.toString(), worker,↵ | |
13 | getDestinationFolder());↵ | 16 | getDestinationFolder());↵ | |
14 | count++;↵ | 17 | count++;↵ | |
15 | sucess = true;↵ | 18 | sucess = true;↵ | |
16 | }↵ | 19 | ↵ | |
17 | ↵ | 20 | }↵ | |
18 | strbuf = new StringBuffer();↵ | 21 | strbuf = new StringBuffer();↵ | |
19 | } else {↵ | 22 | ↵ | |
20 | strbuf.append(str + "\n");↵ | |||
21 | }↵ | |||
22 | ↵ | 23 | }↵ | |
23 | } | 24 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
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) | 72.5 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
12 | if (strbuf.length() != 0) | 11 | if (strbuf.length() != 0) | |
13 | saveMessage(strbuf.toString(), worker, getDestinationFolder()); | 12 | saveMessage(strbuf.toString(), worker, getDestinationFolder()); | |
14 | count++; | 13 | count++; | |
15 | sucess = true; | 14 | sucess = true; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables sucess, count , while Clone fragment #2 returns variables sucess, count |