log.debug("Sample occurred"); synchronized (sampleStore) { sampleStore.add(e); }
setArguments(new Arguments()); synchronized (allSamplers) { allSamplers.add(this); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/samplers/HoldSampleSender.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/sampler/JavaSampler.java
Method name: void SampleOccurred(SampleEvent) Method name: void JavaSampler()
Number of AST nodes: 3 Number of AST nodes: 3
1
log.debug("Sample occurred");
1
setArguments(new Arguments());
2
		synchronized (sampleStore) {
2
		synchronized (allSamplers) {
3
			sampleStore.add(e);
3
			allSamplers.add(this);
4
		}
4
		}
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.1
Clones locationClones are in different classes
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                      
    1
    setArguments(new Arguments());
    1
    log.debug("Sample occurred");
                                                                    
    2
    synchronized (sampleStore)
    2
    synchronized (sampleStore)
    2
    synchronized (allSamplers)
    Differences
    Expression1Expression2Difference
    sampleStoreallSamplersVARIABLE_NAME_MISMATCH
    java.util.Listjava.util.SetSUBCLASS_TYPE_MISMATCH
    2
    synchronized (allSamplers)
                                                      
    3
    allSamplers.add(this);
    Preondition Violations
    Unmatched statement allSamplers.add(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    allSamplers.add(this);
    3
    sampleStore.add(e);
    3
    sampleStore.add(e);
    Preondition Violations
    Unmatched statement sampleStore.add(e); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                
    Precondition Violations (2)
    Row Violation
    1Unmatched statement allSamplers.add(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement sampleStore.add(e); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted