if (sampler.getSuccessCode().length() > 0) { successCode.setText(sampler.getSuccessCode()); } else { successCode.setText(JMeterUtils.getResString("junit_success_default_code")); //$NON-NLS-1$ } if (sampler.getSuccess().length() > 0) { successMsg.setText(sampler.getSuccess()); } else { successMsg.setText(JMeterUtils.getResString("junit_success_default_msg")); //$NON-NLS-1$ } if (sampler.getFailureCode().length() > 0) { failureCode.setText(sampler.getFailureCode()); } else { failureCode.setText(JMeterUtils.getResString("junit_failure_default_code")); //$NON-NLS-1$ } if (sampler.getFailure().length() > 0) { failureMsg.setText(sampler.getFailure()); } else { failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg")); //$NON-NLS-1$ }
if (sampler.getFailureCode().length() > 0) { failureCode.setText(sampler.getFailureCode()); } else { failureCode.setText(JMeterUtils.getResString("junit_failure_default_code")); //$NON-NLS-1$ } if (sampler.getFailure().length() > 0) { failureMsg.setText(sampler.getFailure()); } else { failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg")); //$NON-NLS-1$ } if (sampler.getError().length() > 0) { errorMsg.setText(sampler.getError()); } else { errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg")); //$NON-NLS-1$ } if (sampler.getErrorCode().length() > 0) { errorCode.setText(sampler.getErrorCode()); } else { errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); //$NON-NLS-1$ }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java File path: /jakarta-jmeter-2.3.2/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java
Method name: void configure(TestElement) Method name: void configure(TestElement)
Number of AST nodes: 12 Number of AST nodes: 12
1
if (sampler.getSuccessCode().length() > 0) {
1
if (sampler.getFailureCode().length() > 0) {
2
            successCode.setText(sampler.getSuccessCode());
2
            failureCode.setText(sampler.getFailureCode());
3
        } else {
3
        } else {
4
            successCode.setText(JMeterUtils.getResString("junit_success_default_code")); //$NON-NLS-1$
4
            failureCode.setText(JMeterUtils.getResString("junit_failure_default_code")); //$NON-NLS-1$
5
        }
5
        }
6
        if (sampler.getSuccess().length() > 0) {
6
        if (sampler.getFailure().length() > 0) {
7
            successMsg.setText(sampler.getSuccess());
7
            failureMsg.setText(sampler.getFailure());
8
        } else {
8
        } else {
9
            successMsg.setText(JMeterUtils.getResString("junit_success_default_msg")); //$NON-NLS-1$
9
            failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg")); //$NON-NLS-1$
10
        }
10
        }
11
        if (sampler.getFailureCode().length() > 0) {
11
        if (sampler.getError().length() > 0) {
12
            failureCode.setText(sampler.getFailureCode());
12
            errorMsg.setText(sampler.getError());
13
        } else {
13
        } else {
14
            failureCode.setText(JMeterUtils.getResString("junit_failure_default_code")); //$NON-NLS-1$
14
            errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg")); //$NON-NLS-1$
15
        }
15
        }
16
        if (sampler.getFailure().length() > 0) {
16
        if (sampler.getErrorCode().length() > 0) {
17
            failureMsg.setText(sampler.getFailure());
17
            errorCode.setText(sampler.getErrorCode());
18
        } else {
18
        } else {
19
            failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg")); //$NON-NLS-1$
19
            errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); //$NON-NLS-1$
20
        }
20
        }
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)2.2
Clones locationClones are in the same method
Number of node comparisons96
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)8.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    if (sampler.getSuccessCode().length() > 0)
    8
    if (sampler.getSuccessCode().length() > 0)
    14
    if (sampler.getFailureCode().length() > 0)
    Differences
    Expression1Expression2Difference
    getSuccessCodegetFailureCodeMETHOD_INVOCATION_NAME_MISMATCH
    14
    if (sampler.getFailureCode().length() > 0)
    9
    successCode.setText(sampler.getSuccessCode());
    9
    successCode.setText(sampler.getSuccessCode());
    15
    failureCode.setText(sampler.getFailureCode());
    Differences
    Expression1Expression2Difference
    getSuccessCodegetFailureCodeMETHOD_INVOCATION_NAME_MISMATCH
    successCodefailureCodeVARIABLE_NAME_MISMATCH
    15
    failureCode.setText(sampler.getFailureCode());
    else
    else
    10
    successCode.setText(JMeterUtils.getResString("junit_success_default_code"));
    10
    successCode.setText(JMeterUtils.getResString("junit_success_default_code"));
    16
    failureCode.setText(JMeterUtils.getResString("junit_failure_default_code"));
    Differences
    Expression1Expression2Difference
    "junit_success_default_code""junit_failure_default_code"LITERAL_VALUE_MISMATCH
    successCodefailureCodeVARIABLE_NAME_MISMATCH
    16
    failureCode.setText(JMeterUtils.getResString("junit_failure_default_code"));
    11
    if (sampler.getSuccess().length() > 0)
    11
    if (sampler.getSuccess().length() > 0)
    17
    if (sampler.getFailure().length() > 0)
    Differences
    Expression1Expression2Difference
    getSuccessgetFailureMETHOD_INVOCATION_NAME_MISMATCH
    17
    if (sampler.getFailure().length() > 0)
    12
    successMsg.setText(sampler.getSuccess());
    12
    successMsg.setText(sampler.getSuccess());
    18
    failureMsg.setText(sampler.getFailure());
    Differences
    Expression1Expression2Difference
    getSuccessgetFailureMETHOD_INVOCATION_NAME_MISMATCH
    successMsgfailureMsgVARIABLE_NAME_MISMATCH
    18
    failureMsg.setText(sampler.getFailure());
    else
    else
    13
    successMsg.setText(JMeterUtils.getResString("junit_success_default_msg"));
    13
    successMsg.setText(JMeterUtils.getResString("junit_success_default_msg"));
    19
    failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg"));
    Differences
    Expression1Expression2Difference
    "junit_success_default_msg""junit_failure_default_msg"LITERAL_VALUE_MISMATCH
    successMsgfailureMsgVARIABLE_NAME_MISMATCH
    19
    failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg"));
    14
    if (sampler.getFailureCode().length() > 0)
    14
    if (sampler.getFailureCode().length() > 0)
    20
    if (sampler.getError().length() > 0)
    Differences
    Expression1Expression2Difference
    getFailureCodegetErrorMETHOD_INVOCATION_NAME_MISMATCH
    20
    if (sampler.getError().length() > 0)
    15
    failureCode.setText(sampler.getFailureCode());
    15
    failureCode.setText(sampler.getFailureCode());
    21
    errorMsg.setText(sampler.getError());
    Differences
    Expression1Expression2Difference
    getFailureCodegetErrorMETHOD_INVOCATION_NAME_MISMATCH
    failureCodeerrorMsgVARIABLE_NAME_MISMATCH
    21
    errorMsg.setText(sampler.getError());
    else
    else
    16
    failureCode.setText(JMeterUtils.getResString("junit_failure_default_code"));
    16
    failureCode.setText(JMeterUtils.getResString("junit_failure_default_code"));
    22
    errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg"));
    Differences
    Expression1Expression2Difference
    "junit_failure_default_code""junit_error_default_msg"LITERAL_VALUE_MISMATCH
    failureCodeerrorMsgVARIABLE_NAME_MISMATCH
    22
    errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg"));
    17
    if (sampler.getFailure().length() > 0)
    17
    if (sampler.getFailure().length() > 0)
    23
    if (sampler.getErrorCode().length() > 0)
    Differences
    Expression1Expression2Difference
    getFailuregetErrorCodeMETHOD_INVOCATION_NAME_MISMATCH
    23
    if (sampler.getErrorCode().length() > 0)
    18
    failureMsg.setText(sampler.getFailure());
    18
    failureMsg.setText(sampler.getFailure());
    24
    errorCode.setText(sampler.getErrorCode());
    Differences
    Expression1Expression2Difference
    getFailuregetErrorCodeMETHOD_INVOCATION_NAME_MISMATCH
    failureMsgerrorCodeVARIABLE_NAME_MISMATCH
    24
    errorCode.setText(sampler.getErrorCode());
    else
    else
    19
    failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg"));
    19
    failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg"));
    25
    errorCode.setText(JMeterUtils.getResString("junit_error_default_code"));
    Differences
    Expression1Expression2Difference
    "junit_failure_default_msg""junit_error_default_code"LITERAL_VALUE_MISMATCH
    failureMsgerrorCodeVARIABLE_NAME_MISMATCH
    25
    errorCode.setText(JMeterUtils.getResString("junit_error_default_code"));
    Precondition Violations (0)
    Row Violation