if (stoppingMessage != null) { stoppingMessage.show(); }
if (null != sslmgr){ sslmgr.setContext(conn); // N.B. must be done after opening connection }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportMainFrame.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
Method name: void run() Method name: HttpURLConnection setupConnection(URL, String, HTTPSampleResult)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (stoppingMessage != null) {
1
if (
2
                    stoppingMessage.show();
3
                
2
null != sslmgr){
3
				    sslmgr.setContext(conn); // N.B. must be done after opening connection
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.3
Clones locationClones are in different classes
Number of node comparisons4
  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 fragment0
    Time elapsed for statement mapping (ms)24.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (stoppingMessage != null)
    1
    if (stoppingMessage != null)
    9
    if (null != sslmgr)
    Differences
    Expression1Expression2Difference
    stoppingMessagenullTYPE_COMPATIBLE_REPLACEMENT
    nullsslmgrTYPE_COMPATIBLE_REPLACEMENT
    9
    if (null != sslmgr)
    2
    stoppingMessage.show();
    2
    stoppingMessage.show();
    10
    sslmgr.setContext(conn);
    Differences
    Expression1Expression2Difference
    showsetContextMETHOD_INVOCATION_NAME_MISMATCH
    stoppingMessagesslmgrVARIABLE_NAME_MISMATCH
    javax.swing.JDialogorg.apache.jmeter.util.SSLManagerVARIABLE_TYPE_MISMATCH
    stoppingMessage.show()sslmgr.setContext(conn)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression stoppingMessage.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sslmgr.setContext(conn) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression stoppingMessage.show() is a void method call, and thus it cannot be parameterized
    Expression sslmgr.setContext(conn) is a void method call, and thus it cannot be parameterized
    Type javax.swing.JDialog of variable stoppingMessage does not match with type org.apache.jmeter.util.SSLManager of variable sslmgr
    • Make classes javax.swing.JDialog and org.apache.jmeter.util.SSLManager extend a common superclass
    Expression stoppingMessage.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sslmgr.setContext(conn) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression stoppingMessage.show() is a void method call, and thus it cannot be parameterized
    Expression sslmgr.setContext(conn) is a void method call, and thus it cannot be parameterized
    10
    sslmgr.setContext(conn);
    Precondition Violations (10)
    Row Violation
    1Expression stoppingMessage.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression sslmgr.setContext(conn) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression stoppingMessage.show() is a void method call, and thus it cannot be parameterized
    4Expression sslmgr.setContext(conn) is a void method call, and thus it cannot be parameterized
    5Type javax.swing.JDialog of variable stoppingMessage does not match with type org.apache.jmeter.util.SSLManager of variable sslmgr
    6Expression stoppingMessage.show() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression sslmgr.setContext(conn) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression stoppingMessage.show() is a void method call, and thus it cannot be parameterized
    9Expression sslmgr.setContext(conn) is a void method call, and thus it cannot be parameterized
    10The refactoring of the clones is infeasible, because classes and org.apache.jmeter.protocol.http.sampler.HTTPSampler do not have a common superclass