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());
setLayout(new BorderLayout(0, 5)); if (displayName) { setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); } // MAIN PANEL VerticalPanel mainPanel = new VerticalPanel(); mainPanel.add(createServerPanel()); mainPanel.add(createRemoteFilenamePanel()); mainPanel.add(createLocalFilenamePanel()); mainPanel.add(createLocalFileContentsPanel());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LdapConfigGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ftp/config/gui/FtpConfigGui.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
		// MAIN PANEL
6
		VerticalPanel mainPanel = new VerticalPanel();
7
		VerticalPanel mainPanel = new VerticalPanel();
7
		mainPanel.add(createServernamePanel());
8
		mainPanel.add(createServerPanel());
8
		mainPanel.add(createPortPanel());
9
		mainPanel.add(createRemoteFilenamePanel());
9
		mainPanel.add(createRootdnPanel());
10
		mainPanel.add(createLocalFilenamePanel());
10
		mainPanel.add(createTestPanel());
11
		mainPanel.add(createLocalFileContentsPanel());
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)33.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(createServernamePanel());
    6
    mainPanel.add(createServernamePanel());
    6
    mainPanel.add(createServerPanel());
    Differences
    Expression1Expression2Difference
    createServernamePanelcreateServerPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createServernamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createServernamePanel
    Expression createServerPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createServerPanel
    6
    mainPanel.add(createServerPanel());
    7
    mainPanel.add(createPortPanel());
    7
    mainPanel.add(createPortPanel());
    7
    mainPanel.add(createRemoteFilenamePanel());
    Differences
    Expression1Expression2Difference
    createPortPanelcreateRemoteFilenamePanelMETHOD_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 createRemoteFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createRemoteFilenamePanel
    7
    mainPanel.add(createRemoteFilenamePanel());
    8
    mainPanel.add(createRootdnPanel());
    8
    mainPanel.add(createRootdnPanel());
    8
    mainPanel.add(createLocalFilenamePanel());
    Differences
    Expression1Expression2Difference
    createRootdnPanelcreateLocalFilenamePanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createRootdnPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createRootdnPanel
    Expression createLocalFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createLocalFilenamePanel
    8
    mainPanel.add(createLocalFilenamePanel());
    9
    mainPanel.add(createTestPanel());
    9
    mainPanel.add(createTestPanel());
    9
    mainPanel.add(createLocalFileContentsPanel());
    Differences
    Expression1Expression2Difference
    createTestPanelcreateLocalFileContentsPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createTestPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createTestPanel
    Expression createLocalFileContentsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createLocalFileContentsPanel
    9
    mainPanel.add(createLocalFileContentsPanel());
    Precondition Violations (8)
    Row Violation
    1Expression createServernamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createServerPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression createPortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression createRemoteFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression createRootdnPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression createLocalFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression createTestPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression createLocalFileContentsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted