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());
super.configure(element); LineChart bc = (LineChart)element; xItems.setText(bc.getXAxis()); yItems.setText(bc.getYAxis()); xAxisLabel.setText(bc.getXLabel()); yAxisLabel.setText(bc.getYLabel()); caption.setText(bc.getCaption()); urls.setText(bc.getURLs());
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/report/gui/LineGraphGui.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
		CounterConfig config = (CounterConfig) element;
3
		startField.setText(config.getStartAsString());
4
		endField
2
        LineChart bc = (LineChart)element;
3
        xItems.setText(bc.getXAxis());
5
.setText(config.getEndAsString());
4
        yItems.setText(
6
		incrFi
5
bc.getYAxis());
7
eld.setText(config.getIncrementAsString());
6
        xAxisLabel.setText(bc.getXLabel());
8
        formatField.setText(config.getFormat());
7
        yAxisLabel.setText(
9
		varNameField.setText(config.getVarName());
10
		perUserField.setSelected(config.isPerUser
8
bc.getYLabel());
9
        caption.setText(bc.getCaption());
11
());
10
        urls.setText(bc.getURLs());
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);
    2
    CounterConfig config = (CounterConfig)element;
    2
    CounterConfig config = (CounterConfig)element;
    2
    LineChart bc = (LineChart)element;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    configbcVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    2
    LineChart bc = (LineChart)element;
                                                                      
    3
    xItems.setText(bc.getXAxis());
    3
    startField.setText(config.getStartAsString());
    3
    startField.setText(config.getStartAsString());
    7
    caption.setText(bc.getCaption());
    Differences
    Expression1Expression2Difference
    getStartAsStringgetCaptionMETHOD_INVOCATION_NAME_MISMATCH
    configbcVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    startFieldcaptionVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression config.getStartAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc.getCaption() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7
    caption.setText(bc.getCaption());
    4
    endField.setText(config.getEndAsString());
    4
    endField.setText(config.getEndAsString());
    6
    yAxisLabel.setText(bc.getYLabel());
    Differences
    Expression1Expression2Difference
    getEndAsStringgetYLabelMETHOD_INVOCATION_NAME_MISMATCH
    configbcVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    endFieldyAxisLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression config.getEndAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc.getYLabel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    yAxisLabel.setText(bc.getYLabel());
    5
    incrField.setText(config.getIncrementAsString());
    5
    incrField.setText(config.getIncrementAsString());
    4
    yItems.setText(bc.getYAxis());
    Differences
    Expression1Expression2Difference
    getIncrementAsStringgetYAxisMETHOD_INVOCATION_NAME_MISMATCH
    configbcVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    incrFieldyItemsVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextFieldorg.apache.jorphan.gui.JLabeledChoiceSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.getIncrementAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc.getYAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression incrField cannot be unified with expression yItems , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    4
    yItems.setText(bc.getYAxis());
    6
    formatField.setText(config.getFormat());
    6
    formatField.setText(config.getFormat());
    5
    xAxisLabel.setText(bc.getXLabel());
    Differences
    Expression1Expression2Difference
    getFormatgetXLabelMETHOD_INVOCATION_NAME_MISMATCH
    configbcVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    formatFieldxAxisLabelVARIABLE_NAME_MISMATCH
    org.apache.jorphan.gui.JLabeledTextFieldorg.apache.jorphan.gui.JLabeledChoiceSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression config.getFormat() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc.getXLabel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression formatField cannot be unified with expression xAxisLabel , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    5
    xAxisLabel.setText(bc.getXLabel());
    7
    varNameField.setText(config.getVarName());
    7
    varNameField.setText(config.getVarName());
    8
    urls.setText(bc.getURLs());
    Differences
    Expression1Expression2Difference
    getVarNamegetURLsMETHOD_INVOCATION_NAME_MISMATCH
    configbcVARIABLE_NAME_MISMATCH
    org.apache.jmeter.modifiers.CounterConfigorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    varNameFieldurlsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression config.getVarName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression bc.getURLs() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    urls.setText(bc.getURLs());
    8
    perUserField.setSelected(config.isPerUser());
                                                                                                    
    Precondition Violations (13)
    Row Violation
    1Expression config.getStartAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression bc.getCaption() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression config.getEndAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression bc.getYLabel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression config.getIncrementAsString() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression bc.getYAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression incrField cannot be unified with expression yItems , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    8Expression config.getFormat() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression bc.getXLabel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression formatField cannot be unified with expression xAxisLabel , because common superclass javax.swing.JPanel does not declare member(s) public void setText(java.lang.String)
    11Expression config.getVarName() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression bc.getURLs() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Clone fragment #1 returns variable config with type org.apache.jmeter.modifiers.CounterConfig , while Clone fragment #2 returns variable bc with type org.apache.jmeter.testelement.LineChart