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: 8 | Number of AST nodes: 8 | |||
1 | int count = 0;↵ | 1 | int count = 0;↵ | |
2 | boolean sucess = false;↵ | 2 | boolean sucess = false;↵ | |
3 | StringBuffer strbuf = new StringBuffer();↵ | 3 | StringBuffer strbuf = new StringBuffer();↵ | |
4 | BufferedReader in = new BufferedReader(new FileReader(file));↵ | 4 | BufferedReader in = new BufferedReader(new FileReader(file));↵ | |
5 | String str;↵ | 5 | String str;↵ | |
6 | // parse line by line↵ | 6 | // parse line by line↵ | |
7 | while ((str = in.readLine()) != null) {↵ | 7 | while ((str = in.readLine()) != null) {↵ | |
8 | // if user cancelled task exit immediately↵ | 8 | // if user cancelled task exit immediately↵ | |
9 | if (worker.cancelled() == true) {↵ | 9 | if (worker.cancelled() == true) {↵ | |
10 | return;↵ | 10 | return;↵ | |
11 | }↵ | 11 | }↵ | |
12 | // if line doesn't start with "From" or line length is 0↵ | 12 | // if line doesn't start with "From ???@???" or line length is 0↵ | |
13 | // -> save everything in StringBuffer↵ | 13 | // -> save everything in StringBuffer↵ | |
14 | if ((str.startsWith("From ") == false) ||↵ | 14 | if ((str.startsWith("From ???@???") == false) ||↵ | |
15 | (str.length() == 0)) {↵ | 15 | (str.length() == 0)) {↵ | |
16 | strbuf.append(str + "\n"); | 16 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
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.5 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
7 | if (worker.cancelled() == true) | 7 | if (worker.cancelled() == true) | |||||||
8 | return; |
| 8 | return; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |