te.clear(); this.configureTestElement(te); te.setProperty(BeanShellSampler.SCRIPT, scriptField.getText()); te.setProperty(BeanShellSampler.FILENAME, filename.getText()); te.setProperty(BeanShellSampler.PARAMETERS, parameters.getText()); te.setProperty(new BooleanProperty(BeanShellSampler.RESET_INTERPRETER, resetInterpreter.isSelected()));
te.clear(); this.configureTestElement(te); te.setProperty(BeanShellAssertion.SCRIPT, scriptField.getText()); te.setProperty(BeanShellAssertion.FILENAME, filename.getText()); te.setProperty(BeanShellAssertion.PARAMETERS, parameters.getText()); te.setProperty(new BooleanProperty(BeanShellAssertion.RESET_INTERPRETER, resetInterpreter.isSelected()));
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java
Method name: void modifyTestElement(TestElement) Method name: void modifyTestElement(TestElement)
Number of AST nodes: 6 Number of AST nodes: 6
1
te.clear();
1
te.clear();
2
		this.configureTestElement(te);
2
		this.configureTestElement(te);
3
		te.setProperty(BeanShellSampler.SCRIPT, scriptField.getText());
3
		te.setProperty(BeanShellAssertion.SCRIPT, scriptField.getText());
4
		te.setProperty(BeanShellSampler.FILENAME, filename.getText());
4
		te.setProperty(BeanShellAssertion.FILENAME, filename.getText());
5
		te.setProperty(BeanShellSampler.PARAMETERS, parameters.getText());
5
		te.setProperty(BeanShellAssertion.PARAMETERS, parameters.getText());
6
		te.setProperty(new BooleanProperty(BeanShellSampler.RESET_INTERPRETER, resetInterpreter.isSelected()));
6
        te.setProperty(new BooleanProperty(BeanShellAssertion.RESET_INTERPRETER, resetInterpreter.isSelected()));
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 in different classes having the same super class
Number of node comparisons36
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    te.clear();
    1
    te.clear();
    2
    this.configureTestElement(te);
    2
    this.configureTestElement(te);
    3
    te.setProperty(BeanShellSampler.SCRIPT, scriptField.getText());
    3
    te.setProperty(BeanShellSampler.SCRIPT, scriptField.getText());
    3
    te.setProperty(BeanShellAssertion.SCRIPT, scriptField.getText());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.java.sampler.BeanShellSamplerorg.apache.jmeter.assertions.BeanShellAssertionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String SCRIPT
    3
    te.setProperty(BeanShellAssertion.SCRIPT, scriptField.getText());
    4
    te.setProperty(BeanShellSampler.FILENAME, filename.getText());
    4
    te.setProperty(BeanShellSampler.FILENAME, filename.getText());
    4
    te.setProperty(BeanShellAssertion.FILENAME, filename.getText());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.java.sampler.BeanShellSamplerorg.apache.jmeter.assertions.BeanShellAssertionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String FILENAME
    4
    te.setProperty(BeanShellAssertion.FILENAME, filename.getText());
    5
    te.setProperty(BeanShellSampler.PARAMETERS, parameters.getText());
    5
    te.setProperty(BeanShellSampler.PARAMETERS, parameters.getText());
    5
    te.setProperty(BeanShellAssertion.PARAMETERS, parameters.getText());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.java.sampler.BeanShellSamplerorg.apache.jmeter.assertions.BeanShellAssertionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String PARAMETERS
    5
    te.setProperty(BeanShellAssertion.PARAMETERS, parameters.getText());
    6
    te.setProperty(new BooleanProperty(BeanShellSampler.RESET_INTERPRETER, resetInterpreter.isSelected()));
    6
    te.setProperty(new BooleanProperty(BeanShellSampler.RESET_INTERPRETER, resetInterpreter.isSelected()));
    6
    te.setProperty(new BooleanProperty(BeanShellAssertion.RESET_INTERPRETER, resetInterpreter.isSelected()));
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.java.sampler.BeanShellSamplerorg.apache.jmeter.assertions.BeanShellAssertionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String RESET_INTERPRETER
    6
    te.setProperty(new BooleanProperty(BeanShellAssertion.RESET_INTERPRETER, resetInterpreter.isSelected()));
    Precondition Violations (4)
    Row Violation
    1Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String SCRIPT
    2Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String FILENAME
    3Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String PARAMETERS
    4Expression BeanShellSampler cannot be unified with expression BeanShellAssertion , because common superclass org.apache.jmeter.util.BeanShellTestElement does not declare member(s) public static final java.lang.String RESET_INTERPRETER