localFile = new JTextField(10); label.setLabelFor(localFile); JPanel filenamePanel = new JPanel(new BorderLayout(5, 0)); filenamePanel.add(label, BorderLayout.WEST); filenamePanel.add(localFile, BorderLayout.CENTER); return filenamePanel;
remoteFile = new JTextField(10); label.setLabelFor(remoteFile); JPanel filenamePanel = new JPanel(new BorderLayout(5, 0)); filenamePanel.add(label, BorderLayout.WEST); filenamePanel.add(remoteFile, BorderLayout.CENTER); return filenamePanel;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ftp/config/gui/FtpConfigGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ftp/config/gui/FtpConfigGui.java
Method name: JPanel createLocalFilenamePanel() Method name: JPanel createRemoteFilenamePanel()
Number of AST nodes: 6 Number of AST nodes: 6
1
localFile = new JTextField(10);
1
remoteFile = new JTextField(10);
2
		label.setLabelFor(localFile);
2
		label.setLabelFor(remoteFile);
3
		JPanel filenamePanel = new JPanel(new BorderLayout(5, 0));
3
		JPanel filenamePanel = new JPanel(new BorderLayout(5, 0));
4
		filenamePanel.add(label, BorderLayout.WEST);
4
		filenamePanel.add(label, BorderLayout.WEST);
5
		filenamePanel.add(localFile, BorderLayout.CENTER);
5
		filenamePanel.add(remoteFile, BorderLayout.CENTER);
6
		return filenamePanel;
6
		return filenamePanel;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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
    2
    localFile = new JTextField(10);
    2
    localFile = new JTextField(10);
    2
    remoteFile = new JTextField(10);
    Differences
    Expression1Expression2Difference
    localFileremoteFileVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression localFile is a field being modified, and thus it cannot be parameterized
    Expression remoteFile is a field being modified, and thus it cannot be parameterized
    2
    remoteFile = new JTextField(10);
    3
    label.setLabelFor(localFile);
    3
    label.setLabelFor(localFile);
    3
    label.setLabelFor(remoteFile);
    Differences
    Expression1Expression2Difference
    localFileremoteFileVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression localFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression remoteFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    label.setLabelFor(remoteFile);
    4
    JPanel filenamePanel = new JPanel(new BorderLayout(5, 0));
    4
    JPanel filenamePanel = new JPanel(new BorderLayout(5, 0));
    5
    filenamePanel.add(label, BorderLayout.WEST);
    5
    filenamePanel.add(label, BorderLayout.WEST);
    6
    filenamePanel.add(localFile, BorderLayout.CENTER);
    6
    filenamePanel.add(localFile, BorderLayout.CENTER);
    6
    filenamePanel.add(remoteFile, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    localFileremoteFileVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression localFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression remoteFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    filenamePanel.add(remoteFile, BorderLayout.CENTER);
    7
    return filenamePanel;
    7
    return filenamePanel;
    Precondition Violations (6)
    Row Violation
    1Expression localFile is a field being modified, and thus it cannot be parameterized
    2Expression remoteFile is a field being modified, and thus it cannot be parameterized
    3Expression localFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression remoteFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression localFile cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression remoteFile cannot be parameterized, because it has dependencies to/from statements that will be extracted