if (method.equals(DELETE)){ httpMethod = new DeleteMethod(urlStr); } else if (method.equals(GET)){ httpMethod = new GetMethod(urlStr); } else { log.error("Unexpected method (converted to GET): "+method); httpMethod = new GetMethod(urlStr); }
if (useTemporyQueue()) { executor = new TemporaryQueueExecutor(session, sendQueue); } else { producer = session.createSender(sendQueue); if (isNonPersistent()) { producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); } executor = new FixedQueueExecutor(producer, getTimeout()); }
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/jms/sampler/JMSSampler.java
Method name: HTTPSampleResult sample(URL, String, boolean, int) Method name: void threadStarted()
Number of AST nodes: 6 Number of AST nodes: 6
1
if (method.equals(DELETE)){
1
if (useTemporyQueue()) {
2
			    httpMethod = new DeleteMethod(urlStr);
2
					executor = new TemporaryQueueExecutor(session, sendQueue);
3
			} else if (method.equals(GET)){
3
				} else 
4
			    httpMethod = new GetMethod(urlStr);
5
			} else {
6
				log.error("Unexpected method (converted to GET): "+method);
7
			    httpMethod = new GetMethod(urlStr
4
{
5
					producer = session.createSender(sendQueue);
6
					if (isNonPersistent()) {
7
						producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
8
					}
8
);
9
					executor = new FixedQueueExecutor(producer, getTimeout());
9
			}
10
				}
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