CloneSet43


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
38220.966class_body_declarations[8]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13838
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java
23839
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java
Next
Last
Clone Instance
1
Line Count
38
Source Line
38
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java

private JCheckBox resetInterpreter; // reset the bsh.Interpreter before each execution

private JTextField filename; // script file name (if present)

private JTextField parameters; // parameters to pass to script file (or script)

private JTextArea scriptField; // script area

public BeanShellAssertionGui() {
  init();
}

public void configure(TestElement element) {
  scriptField.setText(element.getPropertyAsString(BeanShellAssertion.SCRIPT));
  filename.setText(element.getPropertyAsString(BeanShellAssertion.FILENAME));
  parameters.setText(element.getPropertyAsString(BeanShellAssertion.PARAMETERS));
  resetInterpreter.setSelected(element.getPropertyAsBoolean(BeanShellAssertion.RESET_INTERPRETER));
  super.configure(element);
}

public TestElement createTestElement() {
  BeanShellAssertion sampler = new BeanShellAssertion();
  modifyTestElement(sampler);
  return sampler;
}

/**
 * Modifies a given TestElement to mirror the data in the gui components.
 * 
 * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
 */
public void modifyTestElement(TestElement te) {
  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()));
}


First
Previous
Clone Instance
2
Line Count
38
Source Line
39
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java

private JCheckBox resetInterpreter; // reset the bsh.Interpreter before each execution

private JTextField filename; // script file name (if present)

private JTextField parameters; // parameters to pass to script file (or script)

private JTextArea scriptField; // script area

public BeanShellSamplerGui() {
  init();
}

public void configure(TestElement element) {
  scriptField.setText(element.getPropertyAsString(BeanShellSampler.SCRIPT));
  filename.setText(element.getPropertyAsString(BeanShellSampler.FILENAME));
  parameters.setText(element.getPropertyAsString(BeanShellSampler.PARAMETERS));
  resetInterpreter.setSelected(element.getPropertyAsBoolean(BeanShellSampler.RESET_INTERPRETER));
  super.configure(element);
}

public TestElement createTestElement() {
  BeanShellSampler sampler = new BeanShellSampler();
  modifyTestElement(sampler);
  return sampler;
}

/**
 * Modifies a given TestElement to mirror the data in the gui components.
 * 
 * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
 */
public void modifyTestElement(TestElement te) {
  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()));
}


Clone AbstractionParameter Count: 2Parameter Bindings

private JCheckBox resetInterpreter; // reset the bsh.Interpreter before each execution

private JTextField filename; // script file name (if present)

private JTextField parameters; // parameters to pass to script file (or script)

private JTextArea scriptField; // script area

public [[#variabledfc9a20]]() {
  init();
}

public void configure(TestElement element) {
  scriptField.setText(element.getPropertyAsString( [[#variabledfcbee0]].SCRIPT));
  filename.setText(element.getPropertyAsString( [[#variabledfcbee0]].FILENAME));
  parameters.setText(element.getPropertyAsString( [[#variabledfcbee0]].PARAMETERS));
  resetInterpreter.setSelected(element.getPropertyAsBoolean( [[#variabledfcbee0]].RESET_INTERPRETER));
  super.configure(element);
}

public TestElement createTestElement() {
   [[#variabledfcbee0]] sampler = new [[#variabledfcbee0]]();
  modifyTestElement(sampler);
  return sampler;
}

/**
         * Modifies a given TestElement to mirror the data in the gui components.
         * 
         * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
         */
public void modifyTestElement(TestElement te) {
  te.clear();
  this.configureTestElement(te);
  te.setProperty( [[#variabledfcbee0]].SCRIPT, scriptField.getText());
  te.setProperty( [[#variabledfcbee0]].FILENAME, filename.getText());
  te.setProperty( [[#variabledfcbee0]].PARAMETERS, parameters.getText());
  te.setProperty(new BooleanProperty( [[#variabledfcbee0]].RESET_INTERPRETER, resetInterpreter.isSelected()));
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#dfc9a20]]
BeanShellAssertionGui 
12[[#dfc9a20]]
BeanShellSamplerGui 
21[[#dfcbee0]]
BeanShellAssertion 
22[[#dfcbee0]]
BeanShellSampler