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());
this.configureTestElement(element); LineChart bc = (LineChart)element; bc.setXAxis(xItems.getText()); bc.setYAxis(yItems.getText()); bc.setXLabel(xAxisLabel.getText()); bc.setYLabel(yAxisLabel.getText()); bc.setCaption(caption.getText()); bc.setURLs(urls.getText());
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 configure(TestElement) Method name: void modifyTestElement(TestElement)
Number of AST nodes: 8 Number of AST nodes: 8
1
super.configure(element);
1
this.configureTestElement(element);
2
        BarChart bc = (BarChart)element;
2
		LineChart bc = (LineChart)element;
3
        xItems.setText(
3
		bc.setXAxis(xItems.getText());
4
bc.getXAxis());
4
		bc.setYAxis(
5
        yItems.setText(
5
yItems.getText());
6
bc.getYAxis());
6
		bc.set
7
        xAxisLabel.setText(
7
XLabel(xAxisLabel.getText());
8
bc.getXLabel());
8
		bc.setYLabel(
9
        yAxisLabel.setText(bc.getYLabel());
9
yAxisLabel.getText(
10
        caption.setText(bc.getCaption
10
));
11
());
11
        bc.setCaption(caption.getText());
12
        url.setText(bc.getURL());
12
        bc.setURLs(urls.getText());
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
    super.configure(element);
    1
    super.configure(element);
    1
    this.configureTestElement(element);
    Differences
    Expression1Expression2Difference
    super.configure(element)this.configureTestElement(element)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.configureTestElement(element) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    Expression this.configureTestElement(element) is a void method call, and thus it cannot be parameterized
    1
    this.configureTestElement(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
    bc.setXAxis(xItems.getText());
    3
    xItems.setText(bc.getXAxis());
                                                                      
                                                                      
    4
    bc.setYAxis(yItems.getText());
    4
    yItems.setText(bc.getYAxis());
                                                                      
                                                                                
    5
    bc.setXLabel(xAxisLabel.getText());
    5
    xAxisLabel.setText(bc.getXLabel());
                                                                                
                                                                                
    6
    bc.setYLabel(yAxisLabel.getText());
    6
    yAxisLabel.setText(bc.getYLabel());
                                                                                
                                                                            
    7
    bc.setCaption(caption.getText());
    7
    caption.setText(bc.getCaption());
                                                                            
                                                                
    8
    bc.setURLs(urls.getText());
    8
    url.setText(bc.getURL());
                                                            
    Precondition Violations (4)
    Row Violation
    1Expression this.configureTestElement(element) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression super.configure(element) is a void method call, and thus it cannot be parameterized
    3Expression this.configureTestElement(element) is a void method call, and thus it cannot be parameterized
    4Clone 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