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()); mainPanel.add(createNoDelayPanel()); mainPanel.add(createRequestPanel()); // mainPanel.add(createFilenamePanel()); add(mainPanel, BorderLayout.CENTER);
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()); mainPanel.add(createOptionsPanel()); add(mainPanel, BorderLayout.CENTER);
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/ftp/config/gui/FtpConfigGui.java
Method name: void init() Method name: void init()
Number of AST nodes: 12 Number of AST nodes: 11
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(createServerPanel());
8
		mainPanel.add(createServerPanel());
8
		mainPanel.add(createClosePortPanel());
9
		mainPanel.add(create
9
		mainPanel.add(createPortPanel());
10
RemoteFilenamePanel());
10
		mainPanel.add(createTimeoutPanel());
11
		mainPanel.add(createLocalFilenamePanel());
11
		mainPanel.add(createNoDelayPanel());
12
		mainPanel.add(create
12
		mainPanel.add(createRequestPanel());
13
LocalFileContentsPanel());
13
		// mainPanel.add(createFilenamePanel());
14
        mainPanel.add(createOptionsPanel());
14
		add(mainPanel, BorderLayout.CENTER);
15
		add(mainPanel, BorderLayout.CENTER);
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 comparisons66
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)8.8
    Clone typeType 3
    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());
    7
    mainPanel.add(createClosePortPanel());
    7
    mainPanel.add(createClosePortPanel());
    7
    mainPanel.add(createRemoteFilenamePanel());
    Differences
    Expression1Expression2Difference
    createClosePortPanelcreateRemoteFilenamePanelMETHOD_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 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(createPortPanel());
    8
    mainPanel.add(createPortPanel());
    8
    mainPanel.add(createLocalFilenamePanel());
    Differences
    Expression1Expression2Difference
    createPortPanelcreateLocalFilenamePanelMETHOD_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 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(createTimeoutPanel());
    9
    mainPanel.add(createTimeoutPanel());
    9
    mainPanel.add(createLocalFileContentsPanel());
    Differences
    Expression1Expression2Difference
    createTimeoutPanelcreateLocalFileContentsPanelMETHOD_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 createLocalFileContentsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createLocalFileContentsPanel
    9
    mainPanel.add(createLocalFileContentsPanel());
    10
    mainPanel.add(createNoDelayPanel());
    10
    mainPanel.add(createNoDelayPanel());
    10
    mainPanel.add(createOptionsPanel());
    Differences
    Expression1Expression2Difference
    createNoDelayPanelcreateOptionsPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createNoDelayPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createNoDelayPanel
    Expression createOptionsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createOptionsPanel
    10
    mainPanel.add(createOptionsPanel());
    11
    mainPanel.add(createRequestPanel());
    11
    mainPanel.add(createRequestPanel());
    Preondition Violations
    Unmatched statement mainPanel.add(createRequestPanel()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                    
    12
    add(mainPanel, BorderLayout.CENTER);
    11
    add(mainPanel, BorderLayout.CENTER);
    Precondition Violations (9)
    Row Violation
    1Expression createClosePortPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createRemoteFilenamePanel() 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 createLocalFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression createTimeoutPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression createLocalFileContentsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression createNoDelayPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression createOptionsPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Unmatched statement mainPanel.add(createRequestPanel()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted