assertion.setValidating(isValidate()); assertion.setWhitespace(isWhitespace()); assertion.setTolerant(isTolerant()); assertion.setNamespace(isNamespace()); assertion.setShowWarnings(showWarnings.isSelected()); assertion.setReportErrors(reportErrors.isSelected()); assertion.setQuiet(quiet.isSelected());
setWhitespace(assertion.isWhitespace()); setValidate(assertion.isValidating()); setTolerant(assertion.isTolerant()); setNamespace(assertion.isNamespace()); quiet.setSelected(assertion.isQuiet()); showWarnings.setSelected(assertion.showWarnings()); reportErrors.setSelected(assertion.reportErrors()); tolerant();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XMLConfPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XMLConfPanel.java
Method name: void modifyTestElement(XPathAssertion) Method name: void configure(XPathAssertion)
Number of AST nodes: 7 Number of AST nodes: 8
1
assertion.setValidating(isValidate());
2
		assertion.setWhitespace(isWhitespace());
3
		assertion.
1
setWhitespace(assertion.isWhitespace());
2
		setValidate(assertion.isValidating());
4
setTolerant(isTolerant());
3
		setTolerant(assertion.isTolerant());
5
		assertion.setNamespace(isNamespace());
4
		setNamespace(assertion.isNamespace());
6
		assertion.setShowWarnings(
5
		quiet.setSelected(assertion.isQuiet());
7
showWarnings.isSelected());
6
		showWarnings.setSelected(
8
		assertion.setReportErrors(
7
assertion.showWarnings());
9
reportErrors.isSelected());
8
		reportErrors.setSelected(
10
		assertion.setQuiet(quiet.isSelected()
9
assertion.reportErrors());
11
);
10
		tolerant();
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.0
Clones locationClones are declared in the same class
Number of node comparisons56
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    assertion.setValidating(isValidate());
    1
    assertion.setValidating(isValidate());
    2
    setValidate(assertion.isValidating());
    Differences
    Expression1Expression2Difference
    setValidatingsetValidateMETHOD_INVOCATION_NAME_MISMATCH
    isValidateisValidatingMETHOD_INVOCATION_NAME_MISMATCH
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression assertion.setValidating(isValidate()) is a void method call, and thus it cannot be parameterized
    Expression setValidate(assertion.isValidating()) is a void method call, and thus it cannot be parameterized
    Expression assertion.setValidating(isValidate()) is a void method call, and thus it cannot be parameterized
    Expression setValidate(assertion.isValidating()) is a void method call, and thus it cannot be parameterized
    2
    setValidate(assertion.isValidating());
    2
    assertion.setWhitespace(isWhitespace());
    2
    assertion.setWhitespace(isWhitespace());
    1
    setWhitespace(assertion.isWhitespace());
    Differences
    Expression1Expression2Difference
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression assertion.setWhitespace(isWhitespace()) is a void method call, and thus it cannot be parameterized
    Expression setWhitespace(assertion.isWhitespace()) is a void method call, and thus it cannot be parameterized
    1
    setWhitespace(assertion.isWhitespace());
    3
    assertion.setTolerant(isTolerant());
    3
    assertion.setTolerant(isTolerant());
    3
    setTolerant(assertion.isTolerant());
    Differences
    Expression1Expression2Difference
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression isTolerant() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method isTolerant
    Expression assertion.setTolerant(isTolerant()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setTolerant(assertion.isTolerant()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method setTolerant
    Expression assertion.setTolerant(isTolerant()) is a void method call, and thus it cannot be parameterized
    Expression setTolerant(assertion.isTolerant()) is a void method call, and thus it cannot be parameterized
    3
    setTolerant(assertion.isTolerant());
    4
    assertion.setNamespace(isNamespace());
    4
    assertion.setNamespace(isNamespace());
    4
    setNamespace(assertion.isNamespace());
    Differences
    Expression1Expression2Difference
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression isNamespace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method isNamespace
    Expression assertion.setNamespace(isNamespace()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setNamespace(assertion.isNamespace()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method setNamespace
    Expression assertion.setNamespace(isNamespace()) is a void method call, and thus it cannot be parameterized
    Expression setNamespace(assertion.isNamespace()) is a void method call, and thus it cannot be parameterized
    4
    setNamespace(assertion.isNamespace());
                                                                                        
    5
    quiet.setSelected(assertion.isQuiet());
                                                                                                                
    6
    showWarnings.setSelected(assertion.showWarnings());
                                                                                                                
    7
    reportErrors.setSelected(assertion.reportErrors());
    5
    assertion.setShowWarnings(showWarnings.isSelected());
    5
    assertion.setShowWarnings(showWarnings.isSelected());
    8
    tolerant();
    Differences
    Expression1Expression2Difference
    setShowWarningstolerantMETHOD_INVOCATION_NAME_MISMATCH
    assertion.setShowWarnings(showWarnings.isSelected())tolerant()ARGUMENT_NUMBER_MISMATCH
    assertionMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression tolerant() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method tolerant
    Expression assertion.setShowWarnings(showWarnings.isSelected()) is a void method call, and thus it cannot be parameterized
    Expression tolerant() is a void method call, and thus it cannot be parameterized
    Expression tolerant() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method tolerant
    Expression assertion.setShowWarnings(showWarnings.isSelected()) is a void method call, and thus it cannot be parameterized
    Expression tolerant() is a void method call, and thus it cannot be parameterized
    8
    tolerant();
    6
    assertion.setReportErrors(reportErrors.isSelected());
                                                                                                                    
    7
    assertion.setQuiet(quiet.isSelected());
                                                                                        
    Precondition Violations (22)
    Row Violation
    1Expression assertion.setValidating(isValidate()) is a void method call, and thus it cannot be parameterized
    2Expression setValidate(assertion.isValidating()) is a void method call, and thus it cannot be parameterized
    3Expression assertion.setValidating(isValidate()) is a void method call, and thus it cannot be parameterized
    4Expression setValidate(assertion.isValidating()) is a void method call, and thus it cannot be parameterized
    5Expression assertion.setWhitespace(isWhitespace()) is a void method call, and thus it cannot be parameterized
    6Expression setWhitespace(assertion.isWhitespace()) is a void method call, and thus it cannot be parameterized
    7Expression isTolerant() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression assertion.setTolerant(isTolerant()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression setTolerant(assertion.isTolerant()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression assertion.setTolerant(isTolerant()) is a void method call, and thus it cannot be parameterized
    11Expression setTolerant(assertion.isTolerant()) is a void method call, and thus it cannot be parameterized
    12Expression isNamespace() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression assertion.setNamespace(isNamespace()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression setNamespace(assertion.isNamespace()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression assertion.setNamespace(isNamespace()) is a void method call, and thus it cannot be parameterized
    16Expression setNamespace(assertion.isNamespace()) is a void method call, and thus it cannot be parameterized
    17Expression tolerant() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression assertion.setShowWarnings(showWarnings.isSelected()) is a void method call, and thus it cannot be parameterized
    19Expression tolerant() is a void method call, and thus it cannot be parameterized
    20Expression tolerant() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression assertion.setShowWarnings(showWarnings.isSelected()) is a void method call, and thus it cannot be parameterized
    22Expression tolerant() is a void method call, and thus it cannot be parameterized