while (nextLine != null) {
result.append(nextLine);
result.append("\n");
nextLine = reader.readLine();
}
while (nextLine != null) {
result.append(nextLine);
result.append("\r\n");
nextLine = reader.readLine();
}
Clone fragments detected by clone detection tool
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: 4
|
|
Number of AST nodes: 4
|
|
1 | while (nextLine != null) {↵ | | 1 | while (nextLine != null) {↵
|
2 | ↵ | | |
|
3 | result.append(nextLine);↵ | | 2 | result.append(nextLine);↵
|
4 | ↵ | | |
|
5 | result.append("\n");↵ | | 3 | result.append("\r\n");↵
|
6 | ↵ | | |
|
7 | nextLine = reader.readLine();↵ | | 4 | nextLine = reader.readLine();↵
|
8 | ↵ | | |
|
9 | } | | 5 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
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) | 2.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
8 | while (nextLine != null) | | 4 | while (nextLine != null) |
9 | | | 5 | |
10 | | | 6 | |
11 | nextLine = reader.readLine(); | | 7 | nextLine = reader.readLine(); |
Precondition Violations (0)
Row |
Violation |