HTTPSampleResult res = (HTTPSampleResult) createCollection(context.getRequiredType()); retrieveAttributes(reader, context, res); while (reader.hasMoreChildren()) { reader.moveDown(); Object subItem = readItem(reader, context, res); if (!retrieveItem(reader, context, res, subItem)) { retrieveHTTPItem(reader, context, res, subItem); } reader.moveUp(); } // If we have a file, but no data, then read the file String resultFileName = res.getResultFileName(); if (resultFileName.length()>0 && res.getResponseData().length == 0) { readFile(resultFileName,res); } return res;
SampleResult res = (SampleResult) createCollection(context.getRequiredType()); retrieveAttributes(reader, context, res); while (reader.hasMoreChildren()) { reader.moveDown(); Object subItem = readItem(reader, context, res); retrieveItem(reader, context, res, subItem); reader.moveUp(); } // If we have a file, but no data, then read the file String resultFileName = res.getResultFileName(); if (resultFileName.length()>0 && res.getResponseData().length == 0) { readFile(resultFileName,res); } return res;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/util/HTTPResultConverter.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/converters/SampleResultConverter.java
Method name: Object unmarshal(HierarchicalStreamReader, UnmarshallingContext) Method name: Object unmarshal(HierarchicalStreamReader, UnmarshallingContext)
Number of AST nodes: 12 Number of AST nodes: 11
1
HTTPSampleResult res = (HTTPSampleResult) createCollection(context.getRequiredType());
1
SampleResult res = (SampleResult) createCollection(context.getRequiredType());
2
		retrieveAttributes(reader, context, res);
2
		retrieveAttributes(reader, context, res);
3
		while (reader.hasMoreChildren()) {
3
		while (reader.hasMoreChildren()) {
4
			reader.moveDown();
4
			reader.moveDown();
5
			Object subItem = readItem(reader, context, res);
5
			Object subItem = readItem(reader, context, res);
6
			if (!retrieveItem(reader, context, res, subItem)) {
6
			retrieveItem(reader, context, res, subItem)
7
				retrieveHTTPItem(reader, context, res, subItem);
8
			}
7
;
9
			reader.moveUp();
8
			reader.moveUp();
10
		}
9
		}
11
        // If we have a file, but no data, then read the file
10
        // If we have a file, but no data, then read the file
12
        String resultFileName = res.getResultFileName();
11
        String resultFileName = res.getResultFileName();
13
        if (resultFileName.length()>0 
12
        if (resultFileName.length()>0 
14
        &&  res.getResponseData().length == 0) {
13
        &&  res.getResponseData().length == 0) {
15
            readFile(resultFileName,res);
14
            readFile(resultFileName,res);
16
        }
15
        }
17
		return res;
16
		return res;
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons2