JLabel label = new JLabel(JMeterUtils.getResString("tcp_timeout")); // $NON-NLS-1$ timeout = new JTextField(10); timeout.setName(TIMEOUT); label.setLabelFor(timeout); JPanel timeoutPanel = new JPanel(new BorderLayout(5, 0)); timeoutPanel.add(label, BorderLayout.WEST); timeoutPanel.add(timeout, BorderLayout.CENTER); return timeoutPanel;
JLabel label = new JLabel(JMeterUtils.getResString("server")); // $NON-NLS-1$ server = new JTextField(10); server.setName(SERVER); label.setLabelFor(server); JPanel serverPanel = new JPanel(new BorderLayout(5, 0)); serverPanel.add(label, BorderLayout.WEST); serverPanel.add(server, BorderLayout.CENTER); return serverPanel;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java
Method name: JPanel createTimeoutPanel() Method name: JPanel createServerPanel()
Number of AST nodes: 8 Number of AST nodes: 8
1
JLabel label = new JLabel(JMeterUtils.getResString("tcp_timeout")); // $NON-NLS-1$
1
JLabel label = new JLabel(JMeterUtils.getResString("server")); // $NON-NLS-1$
2
		timeout = new JTextField(10);
2
		server = new JTextField(10);
3
		timeout.setName(TIMEOUT);
3
		server.setName(SERVER);
4
		label.setLabelFor(timeout);
4
		label.setLabelFor(server);
5
		JPanel timeoutPanel = new JPanel(new BorderLayout(5, 0));
5
		JPanel serverPanel = new JPanel(new BorderLayout(5, 0));
6
		timeoutPanel.add(label, BorderLayout.WEST);
6
		serverPanel.add(label, BorderLayout.WEST);
7
		timeoutPanel.add(timeout, BorderLayout.CENTER);
7
		serverPanel.add(server, BorderLayout.CENTER);
8
		return timeoutPanel;
8
		return serverPanel;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    JLabel label = new JLabel(JMeterUtils.getResString("tcp_timeout"));
    1
    JLabel label = new JLabel(JMeterUtils.getResString("tcp_timeout"));
    1
    JLabel label = new JLabel(JMeterUtils.getResString("server"));
    Differences
    Expression1Expression2Difference
    "tcp_timeout""server"LITERAL_VALUE_MISMATCH
    1
    JLabel label = new JLabel(JMeterUtils.getResString("server"));
    2
    timeout = new JTextField(10);
    2
    timeout = new JTextField(10);
    2
    server = new JTextField(10);
    Differences
    Expression1Expression2Difference
    timeoutserverVARIABLE_NAME_MISMATCH
    2
    server = new JTextField(10);
    3
    timeout.setName(TIMEOUT);
    3
    timeout.setName(TIMEOUT);
    3
    server.setName(SERVER);
    Differences
    Expression1Expression2Difference
    TIMEOUTSERVERVARIABLE_NAME_MISMATCH
    timeoutserverVARIABLE_NAME_MISMATCH
    3
    server.setName(SERVER);
    4
    label.setLabelFor(timeout);
    4
    label.setLabelFor(timeout);
    4
    label.setLabelFor(server);
    Differences
    Expression1Expression2Difference
    timeoutserverVARIABLE_NAME_MISMATCH
    4
    label.setLabelFor(server);
    5
    JPanel timeoutPanel = new JPanel(new BorderLayout(5, 0));
    5
    JPanel timeoutPanel = new JPanel(new BorderLayout(5, 0));
    5
    JPanel serverPanel = new JPanel(new BorderLayout(5, 0));
    Differences
    Expression1Expression2Difference
    timeoutPanelserverPanelVARIABLE_NAME_MISMATCH
    5
    JPanel serverPanel = new JPanel(new BorderLayout(5, 0));
    6
    timeoutPanel.add(label, BorderLayout.WEST);
    6
    timeoutPanel.add(label, BorderLayout.WEST);
    6
    serverPanel.add(label, BorderLayout.WEST);
    Differences
    Expression1Expression2Difference
    timeoutPanelserverPanelVARIABLE_NAME_MISMATCH
    6
    serverPanel.add(label, BorderLayout.WEST);
    7
    timeoutPanel.add(timeout, BorderLayout.CENTER);
    7
    timeoutPanel.add(timeout, BorderLayout.CENTER);
    7
    serverPanel.add(server, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    timeoutserverVARIABLE_NAME_MISMATCH
    timeoutPanelserverPanelVARIABLE_NAME_MISMATCH
    7
    serverPanel.add(server, BorderLayout.CENTER);
    8
    return timeoutPanel;
    8
    return timeoutPanel;
    8
    return serverPanel;
    Differences
    Expression1Expression2Difference
    timeoutPanelserverPanelVARIABLE_NAME_MISMATCH
    8
    return serverPanel;
    Precondition Violations (0)
    Row Violation