if (xpath == null) { xpath = new JTextField(50); } return xpath;
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: JTextField getXPathTextField() Method name: JCheckBox getNamespace()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (xpath == null) {
1
if (namespace == null) {
2
			xpath = new JTextField(50);
2
			namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button")); //$NON-NLS-1$
3
		}
3
		}
4
		return xpath;
4
		return namespace;
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)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (xpath == null)
    1
    if (xpath == null)
    1
    if (namespace == null)
    Differences
    Expression1Expression2Difference
    xpathnamespaceVARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldjavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    1
    if (namespace == null)
                                                                                                                                                              
    2
    namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button"));
    Preondition Violations
    Unmatched statement namespace=new JCheckBox(JMeterUtils.getResString("xml_namespace_button")); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    namespace = new JCheckBox(JMeterUtils.getResString("xml_namespace_button"));
    2
    xpath = new JTextField(50);
    2
    xpath = new JTextField(50);
    Preondition Violations
    Unmatched statement xpath=new JTextField(50); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                            
    3
    return xpath;
    3
    return xpath;
    3
    return namespace;
    Differences
    Expression1Expression2Difference
    xpathnamespaceVARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldjavax.swing.JCheckBoxSUBCLASS_TYPE_MISMATCH
    3
    return namespace;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement namespace=new JCheckBox(JMeterUtils.getResString("xml_namespace_button")); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement xpath=new JTextField(50); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted