super.configure(el); SoapSampler sampler = (SoapSampler) el; urlField.setText(sampler.getURLData()); sendSoapAction.setSelected(sampler.getSendSOAPAction()); soapAction.setText(sampler.getSOAPAction()); soapXml.setText(sampler.getXmlData()); soapXmlFile.setFilename(sampler.getXmlFile()); useKeepAlive.setSelected(sampler.getUseKeepAlive());
super.configure(element); BSFSampler sampler = (BSFSampler) element; scriptField.setText(sampler.getScript()); langField.setSelectedItem(sampler.getScriptLanguage()); filename.setText(sampler.getFilename()); parameters.setText(sampler.getParameters());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/SoapSamplerGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BSFSamplerGui.java
Method name: void configure(TestElement) Method name: void configure(TestElement)
Number of AST nodes: 8 Number of AST nodes: 6
1
super.configure(el);
1
super.configure(element);
2
		SoapSampler sampler = (SoapSampler) el;
2
		BSFSampler sampler = (BSFSampler) el
3
		url
3
ement;
4
Field.setText(sampler.getURLData());
4
		scriptField.setText(sampler.getScript());
5
		sendSoapAction.setSelected(sampler.getSendSOAPAction());
5
		langField.setSelectedItem(sampler.getS
6
		soapAction.setText(sampler.getSOAPAction());
7
		soapXml.setText(sampler.getXmlData());
6
criptLanguage());
8
        soapXmlFile.setFilename(sampler.getXmlFile());
7
        filename.setText(sampler.getFilename());
9
        useKeepAlive.setSelected(sampler.getUseKeepAlive());
8
        parameters.setText(sampler.getParameters());
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 comparisons48
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super.configure(el);
    1
    super.configure(el);
    1
    super.configure(element);
    Differences
    Expression1Expression2Difference
    elelementVARIABLE_NAME_MISMATCH
    Preondition Violations
    Super method call super.configure(el); cannot be extracted from method
    Super method call super.configure(element); cannot be extracted from method
    1
    super.configure(element);
    2
    SoapSampler sampler = (SoapSampler)el;
    2
    SoapSampler sampler = (SoapSampler)el;
    2
    BSFSampler sampler = (BSFSampler)element;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    elelementVARIABLE_NAME_MISMATCH
    2
    BSFSampler sampler = (BSFSampler)element;
    3
    urlField.setText(sampler.getURLData());
    3
    urlField.setText(sampler.getURLData());
    3
    scriptField.setText(sampler.getScript());
    Differences
    Expression1Expression2Difference
    getURLDatagetScriptMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    urlFieldscriptFieldVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextFieldjavax.swing.JTextAreaSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression sampler.getURLData() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.getScript() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getURLData() , public java.lang.String getScript()
    Expression urlField cannot be unified with expression scriptField , because common superclass javax.swing.JComponent does not declare member(s) public void setText(java.lang.String)
    3
    scriptField.setText(sampler.getScript());
    4
    sendSoapAction.setSelected(sampler.getSendSOAPAction());
    4
    sendSoapAction.setSelected(sampler.getSendSOAPAction());
    Preondition Violations
    Unmatched statement sendSoapAction.setSelected(sampler.getSendSOAPAction()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                          
    5
    soapAction.setText(sampler.getSOAPAction());
    5
    soapAction.setText(sampler.getSOAPAction());
    6
    parameters.setText(sampler.getParameters());
    Differences
    Expression1Expression2Difference
    getSOAPActiongetParametersMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    soapActionparametersVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextFieldjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression sampler.getSOAPAction() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.getParameters() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getSOAPAction() , public java.lang.String getParameters()
    Expression soapAction cannot be unified with expression parameters , because common superclass javax.swing.JComponent does not declare member(s) public void setText(java.lang.String)
    6
    parameters.setText(sampler.getParameters());
    6
    soapXml.setText(sampler.getXmlData());
    6
    soapXml.setText(sampler.getXmlData());
    5
    filename.setText(sampler.getFilename());
    Differences
    Expression1Expression2Difference
    getXmlDatagetFilenameMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    soapXmlfilenameVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextAreajavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression sampler.getXmlData() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.getFilename() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getXmlData() , public java.lang.String getFilename()
    Expression soapXml cannot be unified with expression filename , because common superclass javax.swing.JComponent does not declare member(s) public void setText(java.lang.String)
    5
    filename.setText(sampler.getFilename());
    7
    soapXmlFile.setFilename(sampler.getXmlFile());
    7
    soapXmlFile.setFilename(sampler.getXmlFile());
    4
    langField.setSelectedItem(sampler.getScriptLanguage());
    Differences
    Expression1Expression2Difference
    getXmlFilegetScriptLanguageMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.protocol.http.sampler.SoapSamplerorg.apache.jmeter.protocol.java.sampler.BSFSamplerSUBCLASS_TYPE_MISMATCH
    setFilenamesetSelectedItemMETHOD_INVOCATION_NAME_MISMATCH
    soapXmlFilelangFieldVARIABLE_NAME_MISMATCH
    org.apache.jmeter.gui.util.FilePaneljavax.swing.JComboBoxSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression sampler.getXmlFile() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.getScriptLanguage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getXmlFile() , public java.lang.String getScriptLanguage()
    Expression soapXmlFile.setFilename(sampler.getXmlFile()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression langField.setSelectedItem(sampler.getScriptLanguage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression soapXmlFile.setFilename(sampler.getXmlFile()) is a void method call, and thus it cannot be parameterized
    Expression langField.setSelectedItem(sampler.getScriptLanguage()) is a void method call, and thus it cannot be parameterized
    Expression soapXmlFile cannot be unified with expression langField , because common superclass javax.swing.JComponent does not declare member(s) public void setFilename(java.lang.String) , public void setSelectedItem(java.lang.Object)
    4
    langField.setSelectedItem(sampler.getScriptLanguage());
    8
    useKeepAlive.setSelected(sampler.getUseKeepAlive());
    8
    useKeepAlive.setSelected(sampler.getUseKeepAlive());
    Preondition Violations
    Unmatched statement useKeepAlive.setSelected(sampler.getUseKeepAlive()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                  
    Precondition Violations (25)
    Row Violation
    1Super method call super.configure(el); cannot be extracted from method
    2Super method call super.configure(element); cannot be extracted from method
    3Expression sampler.getURLData() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression sampler.getScript() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getURLData() , public java.lang.String getScript()
    6Expression urlField cannot be unified with expression scriptField , because common superclass javax.swing.JComponent does not declare member(s) public void setText(java.lang.String)
    7Unmatched statement sendSoapAction.setSelected(sampler.getSendSOAPAction()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Expression sampler.getSOAPAction() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression sampler.getParameters() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getSOAPAction() , public java.lang.String getParameters()
    11Expression soapAction cannot be unified with expression parameters , because common superclass javax.swing.JComponent does not declare member(s) public void setText(java.lang.String)
    12Expression sampler.getXmlData() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression sampler.getFilename() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getXmlData() , public java.lang.String getFilename()
    15Expression soapXml cannot be unified with expression filename , because common superclass javax.swing.JComponent does not declare member(s) public void setText(java.lang.String)
    16Expression sampler.getXmlFile() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression sampler.getScriptLanguage() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression sampler cannot be unified with expression sampler , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getXmlFile() , public java.lang.String getScriptLanguage()
    19Expression soapXmlFile.setFilename(sampler.getXmlFile()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression langField.setSelectedItem(sampler.getScriptLanguage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression soapXmlFile.setFilename(sampler.getXmlFile()) is a void method call, and thus it cannot be parameterized
    22Expression langField.setSelectedItem(sampler.getScriptLanguage()) is a void method call, and thus it cannot be parameterized
    23Expression soapXmlFile cannot be unified with expression langField , because common superclass javax.swing.JComponent does not declare member(s) public void setFilename(java.lang.String) , public void setSelectedItem(java.lang.Object)
    24Unmatched statement useKeepAlive.setSelected(sampler.getUseKeepAlive()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    25Clone fragment #1 returns variables sampler , while Clone fragment #2 returns variables