System.out.println(new String(expected,0,i+1));
System.out.println("--------------------");
System.out.println(new String(actual,0,i+1));
System.out.println("====================");
fail("byte at position " + i + " is different, expected is " + expected[i] + ", actual is " + actual[i]);
System.out.println(new String(expected,0,i+1));
System.out.println("====================");
System.out.println(new String(actual,0,i+1));
System.out.println("<<<<<<<<<<<<<<<<<<<<");
/*
// Useful to when debugging
for(int j = 0; j < expected.length; j++) {
System.out.print(expected[j] + " ");
}
System.out.println();
for(int j = 0; j < actual.length; j++) {
System.out.print(actual[j] + " ");
}
System.out.println();
*/
fail("byte at position " + i + " is different, expected is " + expected[i] + ", actual is " + actual[i]);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
|
|
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
|
Method name: void checkArraysHaveSameContent(byte[], byte[])
|
|
Method name: void checkArraysHaveSameContent(byte[], byte[])
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | System.out.println(new String(expected,0,i+1));↵ | | 1 | System.out.println(new String(expected,0,i+1));↵
|
2 | System.out.println("--------------------");↵ | | 2 | System.out.println("====================");↵
|
3 | System.out.println(new String(actual,0,i+1));↵ | | 3 | System.out.println(new String(actual,0,i+1));↵
|
4 | System.out.println("====================");↵ | | 4 | System.out.println("<<<<<<<<<<<<<<<<<<<<");↵
|
| | | 5 | /* ↵
|
| | | 6 | // Useful to when debugging↵
|
| | | 7 | for(int j = 0; j < expected.length; j++) {↵
|
| | | 8 | System.out.print(expected[j] + " ");↵
|
| | | 9 | }↵
|
| | | 10 | System.out.println();↵
|
| | | 11 | for(int j = 0; j < actual.length; j++) {↵
|
| | | 12 | System.out.print(actual[j] + " ");↵
|
| | | 13 | }↵
|
| | | 14 | System.out.println();↵
|
| | | 15 | */ ↵
|
5 | fail("byte at position " + i + " is different, expected is " + expected[i] + ", actual is " + actual[i]); | | 16 | fail("byte at position " + i + " is different, expected is " + expected[i] + ", actual is " + actual[i]);
|
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 26 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | System.out.println(new String(expected, 0, i + 1)); | | 12 | System.out.println(new String(expected, 0, i + 1)); |
11 | System.out.println("--------------------"); | | 15 | System.out.println("<<<<<<<<<<<<<<<<<<<<"); |
12 | System.out.println(new String(actual, 0, i + 1)); | | 14 | System.out.println(new String(actual, 0, i + 1)); |
13 | System.out.println("===================="); | | 13 | System.out.println("===================="); |
14 | fail("byte at position " + i + " is different, expected is " + expected[i] + ", actual is " + actual[i]); | | 16 | fail("byte at position " + i + " is different, expected is " + expected[i] + ", actual is " + actual[i]); |
Precondition Violations (0)
Row |
Violation |