(Color.white); yAxisLabel.setBackground(Color.white); JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis")); HorizontalPanel xpanel = new HorizontalPanel(Color.white); xLabel.setBorder(new EmptyBorder(5,2,5,2)); xItems.setBackground(Color.white); xItems.setValues(AbstractTable.xitems); xpanel.add(xLabel); xpanel.add(xItems); options.add(xpanel); JLabel xALabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis_label")); HorizontalPanel xApanel = new HorizontalPanel(Color.white); xALabel.setBorder(new EmptyBorder(5,2,5,2)); xAxisLabel.setBackground(Color.white); xAxisLabel.setValues(AbstractChart.X_LABELS); xApanel.add(xALabel); xApanel.add(xAxisLabel); options.add(xApanel); JLabel yLabel = new JLabel(JMeterUtils.getResString("report_chart_y_axis")); HorizontalPanel ypanel = new HorizontalPanel(Color.white); yLabel.setBorder(new EmptyBorder(5,2,5,2)); yItems.setBackground(Color.white); yItems.setValues(AbstractTable.items); ypanel.add(yLabel); ypanel.add(yItems); options.add(ypanel); options.add(yAxisLabel); options.add(caption); options.add(urls); add(pane,BorderLayout.NORTH); add(options,BorderLayout.CENTER); } public TestElement createTestElement() { LineChart element = new LineChart(); modifyTestElement(element); return element; } public void modifyTestElement(TestElement element) { 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()); } public void configure(TestElement element) { 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()); }
(Color.white); yAxisLabel.setBackground(Color.white); JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis")); HorizontalPanel xpanel = new HorizontalPanel(Color.white); xLabel.setBorder(new EmptyBorder(5,2,5,2)); xItems.setBackground(Color.white); xItems.setValues(AbstractTable.xitems); xpanel.add(xLabel); xpanel.add(xItems); options.add(xpanel); JLabel xALabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis_label")); HorizontalPanel xApanel = new HorizontalPanel(Color.white); xALabel.setBorder(new EmptyBorder(5,2,5,2)); xAxisLabel.setBackground(Color.white); xAxisLabel.setValues(AbstractChart.X_LABELS); xApanel.add(xALabel); xApanel.add(xAxisLabel); options.add(xApanel); JLabel yLabel = new JLabel(JMeterUtils.getResString("report_chart_y_axis")); HorizontalPanel ypanel = new HorizontalPanel(Color.white); yLabel.setBorder(new EmptyBorder(5,2,5,2)); yItems.setBackground(Color.white); yItems.setValues(AbstractTable.items); ypanel.add(yLabel); ypanel.add(yItems); options.add(ypanel); options.add(yAxisLabel); options.add(caption); options.add(url); add(pane,BorderLayout.NORTH); add(options,BorderLayout.CENTER); } public TestElement createTestElement() { BarChart element = new BarChart(); modifyTestElement(element); return element; } public void modifyTestElement(TestElement element) { 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()); } public void configure(TestElement element) { 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()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/LineGraphGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/BarChartGui.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
(Color.white);
1
(Color.white);
2
        yAxisLabel.setBackground(Color.white);
2
        yAxisLabel.setBackground(Color.white);
3
        JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis"));
3
        JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis"));
4
		HorizontalPanel xpanel = new HorizontalPanel(Color.white);
4
		HorizontalPanel xpanel = new HorizontalPanel(Color.white);
5
		xLabel.setBorder(new EmptyBorder(5,2,5,2));
5
		xLabel.setBorder(new EmptyBorder(5,2,5,2));
6
        xItems.setBackground(Color.white);
6
        xItems.setBackground(Color.white);
7
        xItems.setValues(AbstractTable.xitems);
7
        xItems.setValues(AbstractTable.xitems);
8
        xpanel.add(xLabel);
8
        xpanel.add(xLabel);
9
        xpanel.add(xItems);
9
        xpanel.add(xItems);
10
        options.add(xpanel);
10
        options.add(xpanel);
11
        JLabel xALabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis_label"));
11
        JLabel xALabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis_label"));
12
        HorizontalPanel xApanel = new HorizontalPanel(Color.white);
12
        HorizontalPanel xApanel = new HorizontalPanel(Color.white);
13
        xALabel.setBorder(new EmptyBorder(5,2,5,2));
13
        xALabel.setBorder(new EmptyBorder(5,2,5,2));
14
        xAxisLabel.setBackground(Color.white);
14
        xAxisLabel.setBackground(Color.white);
15
        xAxisLabel.setValues(AbstractChart.X_LABELS);
15
        xAxisLabel.setValues(AbstractChart.X_LABELS);
16
        xApanel.add(xALabel);
16
        xApanel.add(xALabel);
17
        xApanel.add(xAxisLabel);
17
        xApanel.add(xAxisLabel);
18
        options.add(xApanel);
18
        options.add(xApanel);
19
        
19
        
20
		JLabel yLabel = new JLabel(JMeterUtils.getResString("report_chart_y_axis"));
20
		JLabel yLabel = new JLabel(JMeterUtils.getResString("report_chart_y_axis"));
21
		HorizontalPanel ypanel = new HorizontalPanel(Color.white);
21
		HorizontalPanel ypanel = new HorizontalPanel(Color.white);
22
		yLabel.setBorder(new EmptyBorder(5,2,5,2));
22
		yLabel.setBorder(new EmptyBorder(5,2,5,2));
23
        yItems.setBackground(Color.white);
23
        yItems.setBackground(Color.white);
24
        yItems.setValues(AbstractTable.items);
24
        yItems.setValues(AbstractTable.items);
25
        ypanel.add(yLabel);
25
        ypanel.add(yLabel);
26
        ypanel.add(yItems);
26
        ypanel.add(yItems);
27
        options.add(ypanel);
27
        options.add(ypanel);
28
        options.add(yAxisLabel);
28
        options.add(yAxisLabel);
29
        options.add(caption);
29
        options.add(caption);
30
        options.add(urls);
30
        options.add(url);
31
        
31
        
32
        add(pane,BorderLayout.NORTH);
32
        add(pane,BorderLayout.NORTH);
33
        add(options,BorderLayout.CENTER);
33
        add(options,BorderLayout.CENTER);
34
	}
34
	}
35
	
35
	
36
	public TestElement createTestElement() {
36
	public TestElement createTestElement() {
37
		LineChart element = new LineChart();
37
		BarChart element = new BarChart();
38
		modifyTestElement(element);
38
		modifyTestElement(element);
39
		return element;
39
		return element;
40
	}
40
	}
41
	public void modifyTestElement(TestElement element) {
41
	public void modifyTestElement(TestElement element) {
42
		this.configureTestElement(element);
42
		this.configureTestElement(element);
43
		LineChart bc = (LineChart)element;
43
		BarChart bc = (BarChart)element;
44
		bc.setXAxis(xItems.getText());
44
		bc.setXAxis(xItems.getText());
45
		bc.setYAxis(yItems.getText());
45
		bc.setYAxis(yItems.getText());
46
		bc.setXLabel(xAxisLabel.getText());
46
		bc.setXLabel(xAxisLabel.getText());
47
		bc.setYLabel(yAxisLabel.getText());
47
		bc.setYLabel(yAxisLabel.getText());
48
        bc.setCaption(caption.getText());
48
        bc.setCaption(caption.getText());
49
        bc.setURLs(urls.getText());
49
        bc.setURL(url.getText());
50
	}
50
	}
51
	
51
	
52
    public void configure(TestElement element) {
52
    public void configure(TestElement element) {
53
        super.configure(element);
53
        super.configure(element);
54
        LineChart bc = (LineChart)element;
54
        BarChart bc = (BarChart)element;
55
        xItems.setText(bc.getXAxis());
55
        xItems.setText(bc.getXAxis());
56
        yItems.setText(bc.getYAxis());
56
        yItems.setText(bc.getYAxis());
57
        xAxisLabel.setText(bc.getXLabel());
57
        xAxisLabel.setText(bc.getXLabel());
58
        yAxisLabel.setText(bc.getYLabel());
58
        yAxisLabel.setText(bc.getYLabel());
59
        caption.setText(bc.getCaption());
59
        caption.setText(bc.getCaption());
60
        urls.setText(bc.getURLs());
60
        url.setText(bc.getURL());
61
    }
61
    }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0