if (testListener != null) { testListener.testStarted(); }
if (el != null) { super.addTestElement(el); log.info("TestElement: " + el.getClass().getName()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/samplers/RemoteSampleListenerImpl.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/AbstractTable.java
Method name: void testStarted() Method name: void addTestElement(TestElement)
Number of AST nodes: 2 Number of AST nodes: 3
1
if (testListener != null) {
1
if (el != null) {
2
			testListener.testStarted();
3
		
2
            super.addTestElement(el);
3
            log.info("TestElement: " + el.getClass().getName());
4
}
4
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)5882.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (testListener != null)
    1
    if (testListener != null)
    1
    if (el != null)
    Differences
    Expression1Expression2Difference
    testListenerelVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.TestListenerorg.apache.jmeter.testelement.TestElementVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.testelement.TestListener of variable testListener does not match with type org.apache.jmeter.testelement.TestElement of variable el
    • Make classes org.apache.jmeter.testelement.TestListener and org.apache.jmeter.testelement.TestElement extend a common superclass
    1
    if (el != null)
    2
    testListener.testStarted();
    2
    testListener.testStarted();
    2
    super.addTestElement(el);
    Differences
    Expression1Expression2Difference
    testListener.testStarted()super.addTestElement(el)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression testListener.testStarted() is a void method call, and thus it cannot be parameterized
    Expression super.addTestElement(el) is a void method call, and thus it cannot be parameterized
    2
    super.addTestElement(el);
                                                                                                                  
    3
    log.info("TestElement: " + el.getClass().getName());
    Precondition Violations (3)
    Row Violation
    1Type org.apache.jmeter.testelement.TestListener of variable testListener does not match with type org.apache.jmeter.testelement.TestElement of variable el
    2Expression testListener.testStarted() is a void method call, and thus it cannot be parameterized
    3Expression super.addTestElement(el) is a void method call, and thus it cannot be parameterized