File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/LineChart.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/BarChart.java | |||
Method name: JComponent renderGraphics(double[][], String[])
|
Method name: JComponent renderGraphics(double[][], String[])
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | LineGraph panel = new LineGraph();↵ | 1 | AxisGraph panel = new AxisGraph();↵ | |
2 | panel.setTitle(this.getTitle());↵ | 2 | panel.setTitle(this.getTitle());↵ | |
3 | panel.setData(data);↵ | 3 | panel.setData(data);↵ | |
4 | panel.setXAxisLabels(xAxisLabels);↵ | 4 | panel.setXAxisLabels(xAxisLabels);↵ | |
5 | panel.setYAxisLabels(this.getURLs().split(URL_DELIM));↵ | 5 | panel.setYAxisLabels(this.getYLabel());↵ | |
6 | panel.setXAxisTitle(this.getFormattedXAxis());↵ | 6 | panel.setXAxisTitle(this.getFormattedXAxis());↵ | |
7 | panel.setYAxisTitle(this.getYAxis());↵ | 7 | panel.setYAxisTitle(this.getYAxis());↵ | |
8 | // we should make this configurable eventually↵ | 8 | // we should make this configurable eventually↵ | |
9 | int _width = getWidth();↵ | 9 | int width = getWidth();↵ | |
10 | int _height = getHeight();↵ | 10 | int height = getHeight();↵ | |
11 | panel.setPreferredSize(new Dimension(_width,_height));↵ | 11 | panel.setPreferredSize(new Dimension(width,height));↵ | |
12 | panel.setSize(new Dimension(_width,_height));↵ | 12 | panel.setSize(new Dimension(width,height));↵ | |
13 | panel.setWidth(_width);↵ | 13 | panel.setWidth(width);↵ | |
14 | panel.setHeight(_width);↵ | 14 | panel.setHeight(width);↵ | |
15 | setBufferedImage(new BufferedImage(_width,_height,BufferedImage.TYPE_INT_RGB));↵ | 15 | setBufferedImage(new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB));↵ | |
16 | panel.paintComponent(this.getBufferedImage().createGraphics());↵ | 16 | panel.paintComponent(this.getBufferedImage().createGraphics());↵ | |
17 | return panel; | 17 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 157 |
Number of mapped statements | 15 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | LineGraph panel = new LineGraph(); |
| 1 | AxisGraph panel = new AxisGraph(); | ||||||||||||||||||||
2 | panel.setTitle(this.getTitle()); |
| 2 | panel.setTitle(this.getTitle()); | ||||||||||||||||||||
3 | panel.setData(data); |
| 3 | panel.setData(data); | ||||||||||||||||||||
4 | panel.setXAxisLabels(xAxisLabels); |
| 4 | panel.setXAxisLabels(xAxisLabels); | ||||||||||||||||||||
5 | panel.setYAxisLabels(this.getURLs().split(URL_DELIM)); |
| | |||||||||||||||||||||
6 | panel.setXAxisTitle(this.getFormattedXAxis()); |
| 6 | panel.setXAxisTitle(this.getFormattedXAxis()); | ||||||||||||||||||||
7 | panel.setYAxisTitle(this.getYAxis()); |
| 5 | panel.setYAxisLabels(this.getYLabel()); | ||||||||||||||||||||
|
| 7 | panel.setYAxisTitle(this.getYAxis()); | |||||||||||||||||||||
8 | int _width = getWidth(); |
| 8 | int width = getWidth(); | ||||||||||||||||||||
9 | int _height = getHeight(); |
| 9 | int height = getHeight(); | ||||||||||||||||||||
10 | panel.setPreferredSize(new Dimension(_width, _height)); |
| 10 | panel.setPreferredSize(new Dimension(width, height)); | ||||||||||||||||||||
11 | panel.setSize(new Dimension(_width, _height)); |
| 11 | panel.setSize(new Dimension(width, height)); | ||||||||||||||||||||
12 | panel.setWidth(_width); |
| 12 | panel.setWidth(width); | ||||||||||||||||||||
13 | panel.setHeight(_width); |
| 13 | panel.setHeight(width); | ||||||||||||||||||||
14 | setBufferedImage(new BufferedImage(_width, _height, BufferedImage.TYPE_INT_RGB)); |
| 14 | setBufferedImage(new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB)); | ||||||||||||||||||||
15 | panel.paintComponent(this.getBufferedImage().createGraphics()); |
| 15 | panel.paintComponent(this.getBufferedImage().createGraphics()); | ||||||||||||||||||||
16 | return panel; |
| 16 | return panel; |
Row | Violation |
---|---|
1 | Expression panel cannot be unified with expression panel , because common superclass javax.swing.JPanel does not declare member(s) public void setTitle(java.lang.String) |
2 | Expression panel cannot be unified with expression panel , because common superclass javax.swing.JPanel does not declare member(s) public void setData(double[][]) |
3 | Expression panel cannot be unified with expression panel , because common superclass javax.swing.JPanel does not declare member(s) public void setXAxisLabels(java.lang.String[]) |
4 | Unmatched statement panel.setYAxisLabels(this.getURLs().split(URL_DELIM)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Expression panel cannot be unified with expression panel , because common superclass javax.swing.JPanel does not declare member(s) public void setXAxisTitle(java.lang.String) |
6 | Expression panel.setYAxisTitle(this.getYAxis()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression panel.setYAxisLabels(this.getYLabel()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression panel.setYAxisTitle(this.getYAxis()) is a void method call, and thus it cannot be parameterized |
9 | Expression panel.setYAxisLabels(this.getYLabel()) is a void method call, and thus it cannot be parameterized |
10 | Unmatched statement panel.setYAxisTitle(this.getYAxis()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
11 | Expression panel cannot be unified with expression panel , because common superclass javax.swing.JPanel does not declare member(s) public void setWidth(int) |
12 | Expression panel cannot be unified with expression panel , because common superclass javax.swing.JPanel does not declare member(s) public void setHeight(int) |
13 | Clone fragment #1 returns variable panel with type org.apache.jmeter.visualizers.LineGraph , while Clone fragment #2 returns variable panel with type org.apache.jmeter.visualizers.AxisGraph |