ByteArrayOutputStream readBA(String name) throws IOException { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(findTestFile(name))); ByteArrayOutputStream baos = new ByteArrayOutputStream(1000); int len = 0; byte[] data = new byte[512]; while ((len = bis.read(data)) >= 0) { baos.write(data, 0, len); } bis.close(); return baos; } private byte[] readFile(String name) throws IOException { return readBA(name).toByteArray();
ByteArrayOutputStream readBA(String name) throws IOException { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(findTestFile(name))); ByteArrayOutputStream baos = new ByteArrayOutputStream(1000); int len = 0; byte[] data = new byte[512]; while ((len = bis.read(data)) >= 0) { baos.write(data, 0, len); } bis.close(); return baos; } private byte[] readFile(String name) throws IOException { return readBA(name).toByteArray();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/assertions/XPathAssertionTest.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/assertions/XMLSchemaAssertionTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
ByteArrayOutputStream readBA(String name) throws IOException {
1
ByteArrayOutputStream readBA(String name) throws IOException {
2
		BufferedInputStream bis = new BufferedInputStream(new FileInputStream(findTestFile(name)));
2
		BufferedInputStream bis = new BufferedInputStream(new FileInputStream(findTestFile(name)));
3
		ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
3
		ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
4
		int len = 0;
4
		int len = 0;
5
		byte[] data = new byte[512];
5
		byte[] data = new byte[512];
6
		while ((len = bis.read(data)) >= 0) {
6
		while ((len = bis.read(data)) >= 0) {
7
			baos.write(data, 0, len);
7
			baos.write(data, 0, len);
8
		}
8
		}
9
		bis.close();
9
		bis.close();
10
		return baos;
10
		return baos;
11
	}
11
	}
12
	private byte[] readFile(String name) throws IOException {
12
	private byte[] readFile(String name) throws IOException {
13
		return readBA(name).toByteArray();
13
		return readBA(name).toByteArray();
14
	
14
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0