if (negated == null) { negated = new JCheckBox(JMeterUtils.getResString("xpath_assertion_negate"), false); //$NON-NLS-1$ } return negated;
if (namespace == null) { namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button")); //$NON-NLS-1$ } return namespace;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XPathPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/XMLConfPanel.java
Method name: JCheckBox getNegatedCheckBox() Method name: JCheckBox getNamespace()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (negated == null) {
1
if (namespace == null) {
2
			negated = new JCheckBox(JMeterUtils.getResString("xpath_assertion_negate"), false); //$NON-NLS-1$
2
			namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button")); //$NON-NLS-1$
3
		}
3
		}
4
		return negated;
4
		return namespace;
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 having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (negated == null)
    1
    if (negated == null)
    1
    if (namespace == null)
    Differences
    Expression1Expression2Difference
    negatednamespaceVARIABLE_NAME_MISMATCH
    1
    if (namespace == null)
    2
    negated = new JCheckBox(JMeterUtils.getResString("xpath_assertion_negate"), false);
    2
    negated = new JCheckBox(JMeterUtils.getResString("xpath_assertion_negate"), false);
    2
    namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button"));
    Differences
    Expression1Expression2Difference
    negatednamespaceVARIABLE_NAME_MISMATCH
    new JCheckBox(JMeterUtils.getResString("xpath_assertion_negate"),false)new JCheckBox(JMeterUtils.getResString("xml_namespace_button"))ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression negated is a field being modified, and thus it cannot be parameterized
    Expression namespace is a field being modified, and thus it cannot be parameterized
    2
    namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button"));
    3
    return negated;
    3
    return negated;
    3
    return namespace;
    Differences
    Expression1Expression2Difference
    negatednamespaceVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression negated cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression namespace cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    return namespace;
    Precondition Violations (4)
    Row Violation
    1Expression negated is a field being modified, and thus it cannot be parameterized
    2Expression namespace is a field being modified, and thus it cannot be parameterized
    3Expression negated cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression namespace cannot be parameterized, because it has dependencies to/from statements that will be extracted