this.setLayout(new BorderLayout()); // WEB SERVER PANEL VerticalPanel webServerPanel = new VerticalPanel(); webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_server"))); // $NON-NLS-1$ final JPanel domainPanel = getDomainPanel(); final JPanel portPanel = getPortPanel(); domainPanel.add(portPanel,BorderLayout.EAST); webServerPanel.add(domainPanel); //webServerPanel.add(getPortPanel()); JPanel northPanel = new JPanel(); northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS)); northPanel.add(getProtocolAndMethodPanel()); northPanel.add(getPathPanel()); // WEB REQUEST PANEL JPanel webRequestPanel = new JPanel(); webRequestPanel.setLayout(new BorderLayout()); webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_request"))); // $NON-NLS-1$ webRequestPanel.add(northPanel, BorderLayout.NORTH); webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER); webRequestPanel.add(getHTTPFileArgsPanel(), BorderLayout.SOUTH); this.add(webServerPanel, BorderLayout.NORTH); this.add(webRequestPanel, BorderLayout.CENTER);
this.setLayout(new BorderLayout()); // WEB SERVER PANEL VerticalPanel webServerPanel = new VerticalPanel(); webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_server"))); // $NON-NLS-1$ final JPanel domainPanel = getDomainPanel(); final JPanel portPanel = getPortPanel(); domainPanel.add(portPanel,BorderLayout.EAST); webServerPanel.add(domainPanel); JPanel northPanel = new JPanel(); northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS)); northPanel.add(getProtocolAndMethodPanel()); northPanel.add(getPathPanel()); // WEB REQUEST PANEL JPanel webRequestPanel = new JPanel(); webRequestPanel.setLayout(new BorderLayout()); webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_request"))); // $NON-NLS-1$ webRequestPanel.add(northPanel, BorderLayout.NORTH); webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER); this.add(webServerPanel, BorderLayout.NORTH); this.add(webRequestPanel, BorderLayout.CENTER);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
Method name: void init() Method name: void init()
Number of AST nodes: 19 Number of AST nodes: 18
1
this.setLayout(new BorderLayout());
1
this.setLayout(new BorderLayout());
2
		// WEB SERVER PANEL
2
		// WEB SERVER PANEL
3
		VerticalPanel webServerPanel = new VerticalPanel();
3
		VerticalPanel webServerPanel = new VerticalPanel();
4
		webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), 
4
		webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), 
5
				JMeterUtils.getResString("web_server"))); // $NON-NLS-1$
5
				JMeterUtils.getResString("web_server"))); // $NON-NLS-1$
6
		final JPanel domainPanel = getDomainPanel();
6
		final JPanel domainPanel = getDomainPanel();
7
		final JPanel portPanel = getPortPanel();
7
		final JPanel portPanel = getPortPanel();
8
		domainPanel.add(portPanel,BorderLayout.EAST);
8
		domainPanel.add(portPanel,BorderLayout.EAST);
9
		webServerPanel.add(domainPanel);
9
		webServerPanel.add(domainPanel);
10
		//webServerPanel.add(getPortPanel());
11
		JPanel northPanel = new JPanel();
10
		JPanel northPanel = new JPanel();
12
		northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
11
		northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
13
		northPanel.add(getProtocolAndMethodPanel());
12
		northPanel.add(getProtocolAndMethodPanel());
14
		northPanel.add(getPathPanel());
13
		northPanel.add(getPathPanel());
15
		// WEB REQUEST PANEL
14
		// WEB REQUEST PANEL
16
		JPanel webRequestPanel = new JPanel();
15
		JPanel webRequestPanel = new JPanel();
17
		webRequestPanel.setLayout(new BorderLayout());
16
		webRequestPanel.setLayout(new BorderLayout());
18
		webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), 
17
		webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), 
19
				JMeterUtils.getResString("web_request"))); // $NON-NLS-1$
18
				JMeterUtils.getResString("web_request"))); // $NON-NLS-1$
20
		webRequestPanel.add(northPanel, BorderLayout.NORTH);
19
		webRequestPanel.add(northPanel, BorderLayout.NORTH);
21
		webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
20
		webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
22
		webRequestPanel.add(getHTTPFileArgsPanel(), BorderLayout.SOUTH);
23
		this.add(webServerPanel, BorderLayout.NORTH);
21
		this.add(webServerPanel, BorderLayout.NORTH);
24
		this.add(webRequestPanel, BorderLayout.CENTER);
22
		this.add(webRequestPanel, 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 comparisons165
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements18
    Number of unmapped statements in the first code fragment1
    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
    VerticalPanel webServerPanel = new VerticalPanel();
    2
    VerticalPanel webServerPanel = new VerticalPanel();
    3
    webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_server")));
    3
    webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_server")));
    4
    final JPanel domainPanel = getDomainPanel();
    4
    final JPanel domainPanel = getDomainPanel();
    5
    final JPanel portPanel = getPortPanel();
    5
    final JPanel portPanel = getPortPanel();
    6
    domainPanel.add(portPanel, BorderLayout.EAST);
    6
    domainPanel.add(portPanel, BorderLayout.EAST);
    7
    webServerPanel.add(domainPanel);
    7
    webServerPanel.add(domainPanel);
    8
    JPanel northPanel = new JPanel();
    8
    JPanel northPanel = new JPanel();
    9
    northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
    9
    northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
    10
    northPanel.add(getProtocolAndMethodPanel());
    10
    northPanel.add(getProtocolAndMethodPanel());
    11
    northPanel.add(getPathPanel());
    11
    northPanel.add(getPathPanel());
    12
    JPanel webRequestPanel = new JPanel();
    12
    JPanel webRequestPanel = new JPanel();
    13
    webRequestPanel.setLayout(new BorderLayout());
    13
    webRequestPanel.setLayout(new BorderLayout());
    14
    webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_request")));
    14
    webRequestPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("web_request")));
    15
    webRequestPanel.add(northPanel, BorderLayout.NORTH);
    15
    webRequestPanel.add(northPanel, BorderLayout.NORTH);
    16
    webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
    16
    webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
    17
    webRequestPanel.add(getHTTPFileArgsPanel(), BorderLayout.SOUTH);
                                                                                                                                          
    18
    this.add(webServerPanel, BorderLayout.NORTH);
    17
    this.add(webServerPanel, BorderLayout.NORTH);
    19
    this.add(webRequestPanel, BorderLayout.CENTER);
    18
    this.add(webRequestPanel, BorderLayout.CENTER);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables webRequestPanel , while Clone fragment #2 returns variables