super.configure(element); BarChart bc = (BarChart)element; xItems.setText(bc.getXAxis()); yItems.setText(bc.getYAxis()); xAxisLabel.setText(bc.getXLabel()); yAxisLabel.setText(bc.getYLabel()); caption.setText(bc.getCaption()); url.setText(bc.getURL());
super.configure(element); CounterConfig config = (CounterConfig) element; startField.setText(config.getStartAsString()); endField.setText(config.getEndAsString()); incrField.setText(config.getIncrementAsString()); formatField.setText(config.getFormat()); varNameField.setText(config.getVarName()); perUserField.setSelected(config.isPerUser());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/BarChartGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/gui/CounterConfigGui.java
Method name: void configure(TestElement) Method name: void configure(TestElement)
Number of AST nodes: 8 Number of AST nodes: 8
1
super.configure(element);
1
super.configure(element);
2
        BarChart bc = (BarChart)element;
3
        xItems.setText(bc.getXAxis());
4
        yItems
2
		CounterConfig config = (CounterConfig) element;
3
		startField.setText(config.getStartAsString());
5
.setText(bc.getYAxis());
4
		endField.setText(
6
        xAxisLab
5
config.getEndAsString());
7
el.setText(bc.getXLabel());
6
		incrField.setText(config.getIncrementAsString());
8
        yAxisLabel.setText(bc.getYLabel());
7
        formatField.setText(
9
        caption
8
config.getFormat());
10
.setText(bc.getCaption());
9
		varNameField.setText(
11
        url.setText(bc.getURL
10
config.getVarName());
12
());
11
		perUserField.setSelected(config.isPerUser());
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 comparisons64
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    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
    1
    super.configure(element);
    1
    super.configure(element);
    1
    super.configure(element);
    Preondition Violations
    Super method call super.configure(element); cannot be extracted from method
    Super method call super.configure(element); cannot be extracted from method
    1
    super.configure(element);
    2
    BarChart bc = (BarChart)element;
    2
    BarChart bc = (BarChart)element;
    2
    CounterConfig config = (CounterConfig)element;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    bcconfigVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    2
    CounterConfig config = (CounterConfig)element;
    3
    xItems.setText(bc.getXAxis());
    3
    xItems.setText(bc.getXAxis());
    5
    incrField.setText(config.getIncrementAsString());
    Differences
    Expression1Expression2Difference
    getXAxisgetIncrementAsStringMETHOD_INVOCATION_NAME_MISMATCH
    bcconfigVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    xItemsincrFieldVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledChoiceorg.apache.jorphan.gui.JLabeledTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression bc.getXAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.getIncrementAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getXAxis() , public java.lang.String getIncrementAsString()
    Expression xItems cannot be unified with expression incrField , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    5
    incrField.setText(config.getIncrementAsString());
    4
    yItems.setText(bc.getYAxis());
    4
    yItems.setText(bc.getYAxis());
    4
    endField.setText(config.getEndAsString());
    Differences
    Expression1Expression2Difference
    getYAxisgetEndAsStringMETHOD_INVOCATION_NAME_MISMATCH
    bcconfigVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    yItemsendFieldVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledChoiceorg.apache.jorphan.gui.JLabeledTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression bc.getYAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.getEndAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getYAxis() , public java.lang.String getEndAsString()
    Expression yItems cannot be unified with expression endField , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    4
    endField.setText(config.getEndAsString());
    5
    xAxisLabel.setText(bc.getXLabel());
    5
    xAxisLabel.setText(bc.getXLabel());
    Preondition Violations
    Unmatched statement xAxisLabel.setText(bc.getXLabel()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                
    6
    yAxisLabel.setText(bc.getYLabel());
    6
    yAxisLabel.setText(bc.getYLabel());
    7
    varNameField.setText(config.getVarName());
    Differences
    Expression1Expression2Difference
    getYLabelgetVarNameMETHOD_INVOCATION_NAME_MISMATCH
    bcconfigVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    yAxisLabelvarNameFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bc.getYLabel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.getVarName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getYLabel() , public java.lang.String getVarName()
    7
    varNameField.setText(config.getVarName());
    7
    caption.setText(bc.getCaption());
    7
    caption.setText(bc.getCaption());
    3
    startField.setText(config.getStartAsString());
    Differences
    Expression1Expression2Difference
    getCaptiongetStartAsStringMETHOD_INVOCATION_NAME_MISMATCH
    bcconfigVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    captionstartFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bc.getCaption() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.getStartAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getCaption() , public java.lang.String getStartAsString()
    3
    startField.setText(config.getStartAsString());
    8
    url.setText(bc.getURL());
    8
    url.setText(bc.getURL());
    6
    formatField.setText(config.getFormat());
    Differences
    Expression1Expression2Difference
    getURLgetFormatMETHOD_INVOCATION_NAME_MISMATCH
    bcconfigVARIABLE_NAME_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.modifiers.CounterConfigSUBCLASS_TYPE_MISMATCH
    urlformatFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bc.getURL() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression config.getFormat() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getURL() , public java.lang.String getFormat()
    6
    formatField.setText(config.getFormat());
                                                                                                    
    8
    perUserField.setSelected(config.isPerUser());
    Preondition Violations
    Unmatched statement perUserField.setSelected(config.isPerUser()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8
    perUserField.setSelected(config.isPerUser());
    Precondition Violations (22)
    Row Violation
    1Super method call super.configure(element); cannot be extracted from method
    2Super method call super.configure(element); cannot be extracted from method
    3Expression bc.getXAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression config.getIncrementAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getXAxis() , public java.lang.String getIncrementAsString()
    6Expression xItems cannot be unified with expression incrField , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    7Expression bc.getYAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression config.getEndAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getYAxis() , public java.lang.String getEndAsString()
    10Expression yItems cannot be unified with expression endField , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    11Unmatched statement xAxisLabel.setText(bc.getXLabel()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12Expression bc.getYLabel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression config.getVarName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getYLabel() , public java.lang.String getVarName()
    15Expression bc.getCaption() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression config.getStartAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getCaption() , public java.lang.String getStartAsString()
    18Expression bc.getURL() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression config.getFormat() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression bc cannot be unified with expression config , because common superclass org.apache.jmeter.testelement.AbstractTestElement does not declare member(s) public java.lang.String getURL() , public java.lang.String getFormat()
    21Unmatched statement perUserField.setSelected(config.isPerUser()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    22Clone fragment #1 returns variables , while Clone fragment #2 returns variables config