BufferedReader reader = new BufferedReader( new InputStreamReader(in)); String nextLine = reader.readLine(); while (nextLine != null) { result.append(nextLine); result.append("\n"); nextLine = reader.readLine(); }
BufferedReader reader = new BufferedReader(new InputStreamReader(is)); String 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: 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
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons20
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    BufferedReader reader = new BufferedReader(new InputStreamReader(in));
    6
    BufferedReader reader = new BufferedReader(new InputStreamReader(in));
    2
    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
    Differences
    Expression1Expression2Difference
    inisVARIABLE_NAME_MISMATCH
    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");
    10
    result.append("\n");
    6
    result.append("\r\n");
    Differences
    Expression1Expression2Difference
    "\n""\r\n"LITERAL_VALUE_MISMATCH
    6
    result.append("\r\n");
    11
    nextLine = reader.readLine();
    7
    nextLine = reader.readLine();
    Precondition Violations (0)
    Row Violation