this.setLayout(new BorderLayout()); // MAIN PANEL Border margin = new EmptyBorder(10, 10, 5, 10); this.setBorder(margin); // Set up the graph with header, footer, Y axis and graph display JPanel graphPanel = new JPanel(new BorderLayout()); graphPanel.add(createYAxis(), BorderLayout.WEST); graphPanel.add(createChoosePanel(), BorderLayout.NORTH); graphPanel.add(createGraphPanel(), BorderLayout.CENTER); graphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH); // Add the main panel and the graph this.add(makeTitlePanel(), BorderLayout.NORTH); this.add(graphPanel, BorderLayout.CENTER);
this.setLayout(new BorderLayout()); // MAIN PANEL Border margin = new EmptyBorder(10, 10, 5, 10); this.setBorder(margin); // Set up the graph with header, footer, Y axis and graph display JPanel lgraphPanel = new JPanel(new BorderLayout()); lgraphPanel.add(createGraphPanel(), BorderLayout.CENTER); lgraphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH); // Add the main panel and the graph this.add(makeTitlePanel(), BorderLayout.NORTH); this.add(lgraphPanel, BorderLayout.CENTER);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphVisualizer.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/DistributionGraphVisualizer.java
Method name: void init() Method name: void init()
Number of AST nodes: 10 Number of AST nodes: 8
1
this.setLayout(new BorderLayout());
1
this.setLayout(new BorderLayout());
2
		// MAIN PANEL
2
		// MAIN PANEL
3
		Border margin = new EmptyBorder(10, 10, 5, 10);
3
		Border margin = new EmptyBorder(10, 10, 5, 10);
4
		this.setBorder(margin);
4
		this.setBorder(margin);
5
		// Set up the graph with header, footer, Y axis and graph display
5
		// Set up the graph with header, footer, Y axis and graph display
6
		JPanel graphPanel = new JPanel(new BorderLayout());
6
		JPanel lgraphPanel = new JPanel(new BorderLayout());
7
		graphPanel.add(createYAxis(), BorderLayout.WEST);
7
		
8
		graphPanel.add(createChoosePanel(), BorderLayout.NORTH);
9
		graphPanel.add(createGraphPanel(), BorderLayout.CENTER);
8
lgraphPanel.add(createGraphPanel(), BorderLayout.CENTER);
10
		graphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH);
9
		lgraphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH);
11
		// Add the main panel and the graph
10
		// Add the main panel and the graph
12
		this.add(makeTitlePanel(), BorderLayout.NORTH);
11
		this.add(makeTitlePanel(), BorderLayout.NORTH);
13
		this.add(graphPanel, BorderLayout.CENTER);
12
		this.add(lgraphPanel, BorderLayout.CENTER);
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 statements8
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    this.setLayout(new BorderLayout());
    1
    this.setLayout(new BorderLayout());
    2
    Border margin = new EmptyBorder(10, 10, 5, 10);
    2
    Border margin = new EmptyBorder(10, 10, 5, 10);
    3
    this.setBorder(margin);
    3
    this.setBorder(margin);
    4
    JPanel graphPanel = new JPanel(new BorderLayout());
    4
    JPanel graphPanel = new JPanel(new BorderLayout());
    4
    JPanel lgraphPanel = new JPanel(new BorderLayout());
    Differences
    Expression1Expression2Difference
    graphPanellgraphPanelVARIABLE_NAME_MISMATCH
    4
    JPanel lgraphPanel = new JPanel(new BorderLayout());
    5
    graphPanel.add(createYAxis(), BorderLayout.WEST);
                                                                                                          
    6
    graphPanel.add(createChoosePanel(), BorderLayout.NORTH);
                                                                                                                        
    7
    graphPanel.add(createGraphPanel(), BorderLayout.CENTER);
    7
    graphPanel.add(createGraphPanel(), BorderLayout.CENTER);
    5
    lgraphPanel.add(createGraphPanel(), BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    graphPanellgraphPanelVARIABLE_NAME_MISMATCH
    5
    lgraphPanel.add(createGraphPanel(), BorderLayout.CENTER);
    8
    graphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH);
    8
    graphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH);
    6
    lgraphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH);
    Differences
    Expression1Expression2Difference
    graphPanellgraphPanelVARIABLE_NAME_MISMATCH
    6
    lgraphPanel.add(createGraphInfoPanel(), BorderLayout.SOUTH);
    9
    this.add(makeTitlePanel(), BorderLayout.NORTH);
    7
    this.add(makeTitlePanel(), BorderLayout.NORTH);
    10
    this.add(graphPanel, BorderLayout.CENTER);
    10
    this.add(graphPanel, BorderLayout.CENTER);
    8
    this.add(lgraphPanel, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    graphPanellgraphPanelVARIABLE_NAME_MISMATCH
    8
    this.add(lgraphPanel, BorderLayout.CENTER);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables graphPanel , while Clone fragment #2 returns variables