File path: /columba-1.4-src/core/src/main/java/org/columba/core/io/DiskIO.java | File path: /columba-1.4-src/mail/src/test/java/org/columba/mail/folder/FolderTstHelper.java | |||
Method name: String readStringFromResource(String)
|
Method name: String getStringFromInputStream(InputStream)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | BufferedReader reader = new BufferedReader(↵ | 1 | BufferedReader reader = new BufferedReader(↵ | |
2 | new InputStreamReader(in));↵ | 2 | new InputStreamReader(is));↵ | |
3 | ↵ | |||
4 | String nextLine = reader.readLine();↵ | 3 | String nextLine = reader.readLine();↵ | |
5 | ↵ | |||
6 | while (nextLine != null) {↵ | 4 | while (nextLine != null) {↵ | |
7 | ↵ | |||
8 | result.append(nextLine);↵ | 5 | result.append(nextLine);↵ | |
9 | ↵ | |||
10 | result.append("\n");↵ | 6 | result.append("\r\n");↵ | |
11 | ↵ | |||
12 | nextLine = reader.readLine();↵ | 7 | nextLine = reader.readLine();↵ | |
13 | ↵ | |||
14 | } | 8 | } | |
See real code fragment | See real code fragment |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
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 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | BufferedReader reader = new BufferedReader(new InputStreamReader(in)); |
| 2 | BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | ||||||||||
7 | String nextLine = reader.readLine(); | 3 | String nextLine = reader.readLine(); | |||||||||||
8 | while (nextLine != null) | 4 | while (nextLine != null) | |||||||||||
9 | result.append(nextLine); | 5 | result.append(nextLine); | |||||||||||
10 | result.append("\n"); |
| 6 | result.append("\r\n"); | ||||||||||
11 | nextLine = reader.readLine(); | 7 | nextLine = reader.readLine(); |
Row | Violation |
---|