JLabel label = new JLabel(JMeterUtils.getResString("tcp_nodelay")); // $NON-NLS-1$ setNoDelay = new JCheckBox(); setNoDelay.setName(NODELAY); label.setLabelFor(setNoDelay); JPanel nodelayPanel = new JPanel(new BorderLayout(5, 0)); nodelayPanel.add(label, BorderLayout.WEST); nodelayPanel.add(setNoDelay, BorderLayout.CENTER); return nodelayPanel;
JLabel label = new JLabel(JMeterUtils.getResString("reuseconnection")); //$NON-NLS-1$ reUseConnection = new JCheckBox("", true); reUseConnection.setName(RE_USE_CONNECTION); label.setLabelFor(reUseConnection); JPanel closePortPanel = new JPanel(new BorderLayout(5, 0)); closePortPanel.add(label, BorderLayout.WEST); closePortPanel.add(reUseConnection, BorderLayout.CENTER); return closePortPanel;
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 createNoDelayPanel() Method name: JPanel createClosePortPanel()
Number of AST nodes: 8 Number of AST nodes: 8
1
JLabel label = new JLabel(JMeterUtils.getResString("tcp_nodelay")); // $NON-NLS-1$
1
JLabel label = new JLabel(JMeterUtils.getResString("reuseconnection")); //$NON-NLS-1$
2
		setNoDelay = new JCheckBox();
2
        reUseConnection = new JCheckBox(
3
		setNoDelay.setName(NODELAY
3
"", true);
4
);
4
		reUseConnection.setName(RE_USE_CONNECTION);
5
		label.setLabelFor(setNoDelay);
5
		label.setLabelFor(reUseConnection);
6
		JPanel nodelayPanel = new JPanel(new BorderLayout(5, 0));
6
		JPanel closePortPanel = new JPanel(new BorderLayout(5, 0));
7
		nodelayPanel.add(label, BorderLayout.WEST);
7
		closePortPanel.add(label, BorderLayout.WEST);
8
		nodelayPanel.add(setNoDelay, BorderLayout.CENTER);
8
		closePortPanel.add(reUseConnection, BorderLayout.CENTER);
9
		return nodelayPanel;
9
		return closePortPanel;
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_nodelay"));
    1
    JLabel label = new JLabel(JMeterUtils.getResString("tcp_nodelay"));
    1
    JLabel label = new JLabel(JMeterUtils.getResString("reuseconnection"));
    Differences
    Expression1Expression2Difference
    "tcp_nodelay""reuseconnection"LITERAL_VALUE_MISMATCH
    1
    JLabel label = new JLabel(JMeterUtils.getResString("reuseconnection"));
    2
    setNoDelay = new JCheckBox();
    2
    setNoDelay = new JCheckBox();
    2
    reUseConnection = new JCheckBox("", true);
    Differences
    Expression1Expression2Difference
    setNoDelayreUseConnectionVARIABLE_NAME_MISMATCH
    new JCheckBox()new JCheckBox("",true)ARGUMENT_NUMBER_MISMATCH
    2
    reUseConnection = new JCheckBox("", true);
    3
    setNoDelay.setName(NODELAY);
    3
    setNoDelay.setName(NODELAY);
    3
    reUseConnection.setName(RE_USE_CONNECTION);
    Differences
    Expression1Expression2Difference
    NODELAYRE_USE_CONNECTIONVARIABLE_NAME_MISMATCH
    setNoDelayreUseConnectionVARIABLE_NAME_MISMATCH
    3
    reUseConnection.setName(RE_USE_CONNECTION);
    4
    label.setLabelFor(setNoDelay);
    4
    label.setLabelFor(setNoDelay);
    4
    label.setLabelFor(reUseConnection);
    Differences
    Expression1Expression2Difference
    setNoDelayreUseConnectionVARIABLE_NAME_MISMATCH
    4
    label.setLabelFor(reUseConnection);
    5
    JPanel nodelayPanel = new JPanel(new BorderLayout(5, 0));
    5
    JPanel nodelayPanel = new JPanel(new BorderLayout(5, 0));
    5
    JPanel closePortPanel = new JPanel(new BorderLayout(5, 0));
    Differences
    Expression1Expression2Difference
    nodelayPanelclosePortPanelVARIABLE_NAME_MISMATCH
    5
    JPanel closePortPanel = new JPanel(new BorderLayout(5, 0));
    6
    nodelayPanel.add(label, BorderLayout.WEST);
    6
    nodelayPanel.add(label, BorderLayout.WEST);
    6
    closePortPanel.add(label, BorderLayout.WEST);
    Differences
    Expression1Expression2Difference
    nodelayPanelclosePortPanelVARIABLE_NAME_MISMATCH
    6
    closePortPanel.add(label, BorderLayout.WEST);
    7
    nodelayPanel.add(setNoDelay, BorderLayout.CENTER);
    7
    nodelayPanel.add(setNoDelay, BorderLayout.CENTER);
    7
    closePortPanel.add(reUseConnection, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    setNoDelayreUseConnectionVARIABLE_NAME_MISMATCH
    nodelayPanelclosePortPanelVARIABLE_NAME_MISMATCH
    7
    closePortPanel.add(reUseConnection, BorderLayout.CENTER);
    8
    return nodelayPanel;
    8
    return nodelayPanel;
    8
    return closePortPanel;
    Differences
    Expression1Expression2Difference
    nodelayPanelclosePortPanelVARIABLE_NAME_MISMATCH
    8
    return closePortPanel;
    Precondition Violations (0)
    Row Violation