setLayout(new BorderLayout(0, 5)); if (displayName) { setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); } VerticalPanel mainPanel = new VerticalPanel(); mainPanel.add(createServerPanel()); mainPanel.add(createClosePortPanel()); mainPanel.add(createPortPanel()); mainPanel.add(createTimeoutPanel());
setLayout(new BorderLayout(0, 5)); if (displayName) { setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); } VerticalPanel mainPanel = new VerticalPanel(); mainPanel.add(createServernamePanel()); mainPanel.add(createPortPanel()); mainPanel.add(createRootdnPanel()); mainPanel.add(createTestPanel());
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/ldap/config/gui/LdapConfigGui.java
Method name: void init() Method name: void init()
Number of AST nodes: 9 Number of AST nodes: 9
1
setLayout(new BorderLayout(0, 5));
1
setLayout(new BorderLayout(0, 5));
2
		if (displayName) {
2
		if (displayName) {
3
			setBorder(makeBorder());
3
			setBorder(makeBorder());
4
			add(makeTitlePanel(), BorderLayout.NORTH);
4
			add(makeTitlePanel(), BorderLayout.NORTH);
5
		}
5
		}
6
		VerticalPanel mainPanel = new VerticalPanel();
6
		VerticalPanel mainPanel = new VerticalPanel();
7
		mainPanel.add(createServerPanel());
7
		mainPanel.add(createServernamePanel());
8
		mainPanel.add(createClosePortPanel());
8
		mainPanel.add(createPortPanel());
9
		mainPanel.add(createPortPanel());
9
		mainPanel.add(createRootdnPanel());
10
		mainPanel.add(createTimeoutPanel());
10
		mainPanel.add(createTestPanel());
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons35
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)17.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    setLayout(new BorderLayout(0, 5));
    1
    setLayout(new BorderLayout(0, 5));
    2
    if (displayName)
    2
    if (displayName)
    3
    setBorder(makeBorder());
    3
    setBorder(makeBorder());
    4
    add(makeTitlePanel(), BorderLayout.NORTH);
    4
    add(makeTitlePanel(), BorderLayout.NORTH);
    5
    VerticalPanel mainPanel = new VerticalPanel();
    5
    VerticalPanel mainPanel = new VerticalPanel();
    6
    mainPanel.add(createServerPanel());
    6
    mainPanel.add(createServerPanel());
    6
    mainPanel.add(createServernamePanel());
    Differences
    Expression1Expression2Difference
    createServerPanelcreateServernamePanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createServerPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createServerPanel
    Expression createServernamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createServernamePanel
    6
    mainPanel.add(createServernamePanel());
    7
    mainPanel.add(createClosePortPanel());
    7
    mainPanel.add(createClosePortPanel());
    7
    mainPanel.add(createPortPanel());
    Differences
    Expression1Expression2Difference
    createClosePortPanelcreatePortPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createClosePortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createClosePortPanel
    Expression createPortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createPortPanel
    7
    mainPanel.add(createPortPanel());
    8
    mainPanel.add(createPortPanel());
    8
    mainPanel.add(createPortPanel());
    8
    mainPanel.add(createRootdnPanel());
    Differences
    Expression1Expression2Difference
    createPortPanelcreateRootdnPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createPortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createPortPanel
    Expression createRootdnPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createRootdnPanel
    8
    mainPanel.add(createRootdnPanel());
    9
    mainPanel.add(createTimeoutPanel());
    9
    mainPanel.add(createTimeoutPanel());
    9
    mainPanel.add(createTestPanel());
    Differences
    Expression1Expression2Difference
    createTimeoutPanelcreateTestPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createTimeoutPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createTimeoutPanel
    Expression createTestPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createTestPanel
    9
    mainPanel.add(createTestPanel());
    Precondition Violations (8)
    Row Violation
    1Expression createServerPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createServernamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression createClosePortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression createPortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression createPortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression createRootdnPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression createTimeoutPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression createTestPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted