httpMethod = new PostMethod(urlStr); } else if (method.equals(PUT)){ httpMethod = new PutMethod(urlStr); } else if (method.equals(HEAD)){ httpMethod = new HeadMethod(urlStr);
httpMethod = new OptionsMethod(urlStr); } else if (method.equals(DELETE)){ httpMethod = new DeleteMethod(urlStr); } else if (method.equals(GET)){ httpMethod = new GetMethod(urlStr);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
Method name: HTTPSampleResult sample(URL, String, boolean, int) Method name: HTTPSampleResult sample(URL, String, boolean, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
httpMethod = new PostMethod(urlStr);
1
httpMethod = new OptionsMethod(urlStr);
2
			} else if (method.equals(PUT)){
2
			} else if (method.equals(DELETE)){
3
			    httpMethod = new PutMethod(urlStr);
3
			    httpMethod = new DeleteMethod(urlStr);
4
			} else if (method.equals(HEAD)){
4
			} else if (method.equals(GET)){
5
			    httpMethod = new HeadMethod(urlStr);
5
			    httpMethod = new GetMethod(urlStr);
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.0
Clones locationClones are in the same method
Number of node comparisons1
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    httpMethod = new PostMethod(urlStr);
    14
    httpMethod = new PostMethod(urlStr);
    22
    httpMethod = new OptionsMethod(urlStr);
    Differences
    Expression1Expression2Difference
    org.apache.commons.httpclient.methods.PostMethodorg.apache.commons.httpclient.methods.OptionsMethodSUBCLASS_TYPE_MISMATCH
    22
    httpMethod = new OptionsMethod(urlStr);
    Precondition Violations (0)
    Row Violation