this.configureTestElement(element); BarChart bc = (BarChart)element; bc.setXAxis(xItems.getText()); bc.setYAxis(yItems.getText()); bc.setXLabel(xAxisLabel.getText()); bc.setYLabel(yAxisLabel.getText()); bc.setCaption(caption.getText()); bc.setURL(url.getText());
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/report/gui/BarChartGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/LineGraphGui.java
Method name: void modifyTestElement(TestElement) Method name: void configure(TestElement)
Number of AST nodes: 8 Number of AST nodes: 8
1
this.configureTestElement(element);
1
super.configure(element);
2
		BarChart bc = (BarChart)element;
2
        LineChart bc = (LineChart)element;
3
		bc.setXAxis(xItems.getText());
3
        xItems.setText(
4
		bc.setYAxis(
4
bc.getXAxis());
5
yItems.getText());
5
        yItems.setText(
6
		bc.setXLabel(
6
bc.getYAxis());
7
xAxisLabel.getText());
7
        xAxisLabel.setText(
8
		bc.setYLabel(
8
bc.getXLabel());
9
yAxisLabel.getText());
9
        yAxisLabel.setText(
10
        bc.setCaption(caption.getText
10
bc.getYLabel());
11
());
11
        caption.setText(bc.getCaption());
12
        bc.setURL(url.getText());
12
        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 statements2
    Number of unmapped statements in the first code fragment6
    Number of unmapped statements in the second code fragment6
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    this.configureTestElement(element);
    1
    this.configureTestElement(element);
    1
    super.configure(element);
    Differences
    Expression1Expression2Difference
    this.configureTestElement(element)super.configure(element)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.configureTestElement(element) is a void method call, and thus it cannot be parameterized
    Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    1
    super.configure(element);
    2
    BarChart bc = (BarChart)element;
    2
    BarChart bc = (BarChart)element;
    2
    LineChart bc = (LineChart)element;
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.testelement.BarChartorg.apache.jmeter.testelement.LineChartSUBCLASS_TYPE_MISMATCH
    2
    LineChart bc = (LineChart)element;
                                                                      
    3
    xItems.setText(bc.getXAxis());
    3
    bc.setXAxis(xItems.getText());
                                                                      
                                                                      
    4
    yItems.setText(bc.getYAxis());
    4
    bc.setYAxis(yItems.getText());
                                                                      
                                                                                
    5
    xAxisLabel.setText(bc.getXLabel());
    5
    bc.setXLabel(xAxisLabel.getText());
                                                                                
                                                                                
    6
    yAxisLabel.setText(bc.getYLabel());
    6
    bc.setYLabel(yAxisLabel.getText());
                                                                                
                                                                            
    7
    caption.setText(bc.getCaption());
    7
    bc.setCaption(caption.getText());
                                                                            
                                                                
    8
    urls.setText(bc.getURLs());
    8
    bc.setURL(url.getText());
                                                            
    Precondition Violations (3)
    Row Violation
    1Expression this.configureTestElement(element) is a void method call, and thus it cannot be parameterized
    2Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    3Clone fragment #1 returns variable bc with type org.apache.jmeter.testelement.BarChart , while Clone fragment #2 returns variable bc with type org.apache.jmeter.testelement.LineChart