CounterConfig config = (CounterConfig) c; config.setStart(startField.getText()); // Bug 22820 if (endField.getText().length() > 0) { config.setEnd(endField.getText()); } config.setIncrement(incrField.getText()); config.setVarName(varNameField.getText()); config.setFormat(formatField.getText()); config.setIsPerUser(perUserField.isSelected());
SoapSampler sampler = (SoapSampler) s; sampler.setURLData(urlField.getText()); sampler.setXmlData(soapXml.getText()); sampler.setXmlFile(soapXmlFile.getFilename()); sampler.setSOAPAction(soapAction.getText()); sampler.setSendSOAPAction(sendSoapAction.isSelected()); sampler.setUseKeepAlive(useKeepAlive.isSelected());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/gui/CounterConfigGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/SoapSamplerGui.java
Method name: void modifyTestElement(TestElement) Method name: void modifyTestElement(TestElement)
Number of AST nodes: 7 Number of AST nodes: 7
1
CounterConfig config = (CounterConfig) c;
1
SoapSampler sampler = (SoapSampler) s;
2
			config.setStart(startField.getText());
2
			
3
			// Bug 22820 if (endField.getText().length() > 0)
4
			{
5
				config.setEnd(endField.getText());
6
			}
7
			config.setIncrement(incrField.getText());
8
			config.setVarName(varNameField.getText());
9
            config.setFormat(formatField.getText());
10
			config.setIsPerUser(perUserField
3
sampler.setURLData(urlField.getText());
4
			sampler.setXmlData(soapXml.getText());
5
            sampler.setXmlFile(soapXmlFile.getFilename());
6
			sampler.setSOAPAction(soapAction.getText());
7
			sampler.setSendSOAPAction(sendSoapAction.isSelected());
11
.isSelected());
8
			sampler.setUseKeepAlive(useKeepAlive.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 comparisons42
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    CounterConfig config = (CounterConfig)c;
    2
    CounterConfig config = (CounterConfig)c;
    3
    SoapSampler sampler = (SoapSampler)s;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    configsamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    csVARIABLE_NAME_MISMATCH
    3
    SoapSampler sampler = (SoapSampler)s;
    3
    config.setStart(startField.getText());
    3
    config.setStart(startField.getText());
    4
    sampler.setURLData(urlField.getText());
    Differences
    Expression1Expression2Difference
    setStartsetURLDataMETHOD_INVOCATION_NAME_MISMATCH
    startFieldurlFieldVARIABLE_NAME_MISMATCH
    configsamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.setStart(startField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.setURLData(urlField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.setStart(startField.getText()) is a void method call, and thus it cannot be parameterized
    Expression sampler.setURLData(urlField.getText()) is a void method call, and thus it cannot be parameterized
    4
    sampler.setURLData(urlField.getText());
    4
    config.setEnd(endField.getText());
                                                                              
    5
    config.setIncrement(incrField.getText());
    5
    config.setIncrement(incrField.getText());
    7
    sampler.setSOAPAction(soapAction.getText());
    Differences
    Expression1Expression2Difference
    setIncrementsetSOAPActionMETHOD_INVOCATION_NAME_MISMATCH
    incrFieldsoapActionVARIABLE_NAME_MISMATCH
    configsamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.setIncrement(incrField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.setSOAPAction(soapAction.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.setIncrement(incrField.getText()) is a void method call, and thus it cannot be parameterized
    Expression sampler.setSOAPAction(soapAction.getText()) is a void method call, and thus it cannot be parameterized
    7
    sampler.setSOAPAction(soapAction.getText());
    6
    config.setVarName(varNameField.getText());
    6
    config.setVarName(varNameField.getText());
    5
    sampler.setXmlData(soapXml.getText());
    Differences
    Expression1Expression2Difference
    setVarNamesetXmlDataMETHOD_INVOCATION_NAME_MISMATCH
    varNameFieldsoapXmlVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextFieldorg.apache.jorphan.gui.JLabeledTextAreaSUBCLASS_TYPE_MISMATCH
    configsamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.setVarName(varNameField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.setXmlData(soapXml.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.setVarName(varNameField.getText()) is a void method call, and thus it cannot be parameterized
    Expression sampler.setXmlData(soapXml.getText()) is a void method call, and thus it cannot be parameterized
    Expression varNameField cannot be unified with expression soapXml , because common superclass javax.swing.JPanel does not declare member(s) public java.lang.String getText()
    5
    sampler.setXmlData(soapXml.getText());
    7
    config.setFormat(formatField.getText());
    7
    config.setFormat(formatField.getText());
    6
    sampler.setXmlFile(soapXmlFile.getFilename());
    Differences
    Expression1Expression2Difference
    setFormatsetXmlFileMETHOD_INVOCATION_NAME_MISMATCH
    getTextgetFilenameMETHOD_INVOCATION_NAME_MISMATCH
    formatFieldsoapXmlFileVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextFieldorg.apache.jmeter.gui.util.FilePanelSUBCLASS_TYPE_MISMATCH
    configsamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.setFormat(formatField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.setXmlFile(soapXmlFile.getFilename()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.setFormat(formatField.getText()) is a void method call, and thus it cannot be parameterized
    Expression sampler.setXmlFile(soapXmlFile.getFilename()) is a void method call, and thus it cannot be parameterized
    6
    sampler.setXmlFile(soapXmlFile.getFilename());
    8
    config.setIsPerUser(perUserField.isSelected());
    8
    config.setIsPerUser(perUserField.isSelected());
    8
    sampler.setSendSOAPAction(sendSoapAction.isSelected());
    Differences
    Expression1Expression2Difference
    setIsPerUsersetSendSOAPActionMETHOD_INVOCATION_NAME_MISMATCH
    perUserFieldsendSoapActionVARIABLE_NAME_MISMATCH
    configsamplerVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.protocol.http.sampler.SoapSamplerSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.setIsPerUser(perUserField.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sampler.setSendSOAPAction(sendSoapAction.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.setIsPerUser(perUserField.isSelected()) is a void method call, and thus it cannot be parameterized
    Expression sampler.setSendSOAPAction(sendSoapAction.isSelected()) is a void method call, and thus it cannot be parameterized
    8
    sampler.setSendSOAPAction(sendSoapAction.isSelected());
                                                                                                                
    9
    sampler.setUseKeepAlive(useKeepAlive.isSelected());
    Precondition Violations (22)
    Row Violation
    1Expression config.setStart(startField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression sampler.setURLData(urlField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression config.setStart(startField.getText()) is a void method call, and thus it cannot be parameterized
    4Expression sampler.setURLData(urlField.getText()) is a void method call, and thus it cannot be parameterized
    5Expression config.setIncrement(incrField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression sampler.setSOAPAction(soapAction.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression config.setIncrement(incrField.getText()) is a void method call, and thus it cannot be parameterized
    8Expression sampler.setSOAPAction(soapAction.getText()) is a void method call, and thus it cannot be parameterized
    9Expression config.setVarName(varNameField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression sampler.setXmlData(soapXml.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression config.setVarName(varNameField.getText()) is a void method call, and thus it cannot be parameterized
    12Expression sampler.setXmlData(soapXml.getText()) is a void method call, and thus it cannot be parameterized
    13Expression varNameField cannot be unified with expression soapXml , because common superclass javax.swing.JPanel does not declare member(s) public java.lang.String getText()
    14Expression config.setFormat(formatField.getText()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression sampler.setXmlFile(soapXmlFile.getFilename()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression config.setFormat(formatField.getText()) is a void method call, and thus it cannot be parameterized
    17Expression sampler.setXmlFile(soapXmlFile.getFilename()) is a void method call, and thus it cannot be parameterized
    18Expression config.setIsPerUser(perUserField.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression sampler.setSendSOAPAction(sendSoapAction.isSelected()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression config.setIsPerUser(perUserField.isSelected()) is a void method call, and thus it cannot be parameterized
    21Expression sampler.setSendSOAPAction(sendSoapAction.isSelected()) is a void method call, and thus it cannot be parameterized
    22Clone fragment #1 returns variable config with type org.apache.jmeter.modifiers.CounterConfig , while Clone fragment #2 returns variable sampler with type org.apache.jmeter.protocol.http.sampler.SoapSampler