setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); Box box = Box.createVerticalBox(); box.add(makeTitlePanel()); box.add(createResetPanel()); box.add(createParameterPanel()); box.add(createFilenamePanel()); add(box, BorderLayout.NORTH); JPanel panel = createScriptPanel(); add(panel, BorderLayout.CENTER); // Don't let the input field shrink too much add(Box.createVerticalStrut(panel.getPreferredSize().height), BorderLayout.WEST);
setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); Box box = Box.createVerticalBox(); box.add(makeTitlePanel()); box.add(createLanguagePanel()); box.add(createFilenamePanel()); box.add(createParameterPanel()); add(box, BorderLayout.NORTH); JPanel panel = createScriptPanel(); add(panel, BorderLayout.CENTER); // Don't let the input field shrink too much add(Box.createVerticalStrut(panel.getPreferredSize().height), BorderLayout.WEST);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/java/control/gui/BSFSamplerGui.java
Method name: void init() Method name: void init()
Number of AST nodes: 11 Number of AST nodes: 11
1
setLayout(new BorderLayout(0, 5));
1
setLayout(new BorderLayout(0, 5));
2
		setBorder(makeBorder());
2
		setBorder(makeBorder());
3
		Box box = Box.createVerticalBox();
3
		Box box = Box.createVerticalBox();
4
		box.add(makeTitlePanel());
4
		box.add(makeTitlePanel());
5
		box.add(createResetPanel());
5
		box.add(createLanguagePanel());
6
		box.add(createParameterPanel());
6
		box.add(createFilenamePanel());
7
		box.add(createFilenamePanel());
7
		box.add(createParameterPanel());
8
		add(box, BorderLayout.NORTH);
8
		add(box, BorderLayout.NORTH);
9
		JPanel panel = createScriptPanel();
9
		JPanel panel = createScriptPanel();
10
		add(panel, BorderLayout.CENTER);
10
		add(panel, BorderLayout.CENTER);
11
		// Don't let the input field shrink too much
11
		// Don't let the input field shrink too much
12
		add(Box.createVerticalStrut(panel.getPreferredSize().height), BorderLayout.WEST);
12
		add(Box.createVerticalStrut(panel.getPreferredSize().height), BorderLayout.WEST);
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 in different classes having the same super class
Number of node comparisons85
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    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
    setLayout(new BorderLayout(0, 5));
    1
    setLayout(new BorderLayout(0, 5));
    2
    setBorder(makeBorder());
    2
    setBorder(makeBorder());
    3
    Box box = Box.createVerticalBox();
    3
    Box box = Box.createVerticalBox();
    4
    box.add(makeTitlePanel());
    4
    box.add(makeTitlePanel());
    5
    box.add(createResetPanel());
    5
    box.add(createResetPanel());
    5
    box.add(createLanguagePanel());
    Differences
    Expression1Expression2Difference
    createResetPanelcreateLanguagePanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createResetPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createResetPanel
    Expression createLanguagePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createLanguagePanel
    5
    box.add(createLanguagePanel());
    6
    box.add(createParameterPanel());
    6
    box.add(createParameterPanel());
    6
    box.add(createFilenamePanel());
    Differences
    Expression1Expression2Difference
    createParameterPanelcreateFilenamePanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createParameterPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createParameterPanel
    Expression createFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createFilenamePanel
    6
    box.add(createFilenamePanel());
    7
    box.add(createFilenamePanel());
    7
    box.add(createFilenamePanel());
    7
    box.add(createParameterPanel());
    Differences
    Expression1Expression2Difference
    createFilenamePanelcreateParameterPanelMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createFilenamePanel
    Expression createParameterPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createParameterPanel
    7
    box.add(createParameterPanel());
    8
    add(box, BorderLayout.NORTH);
    8
    add(box, BorderLayout.NORTH);
    9
    JPanel panel = createScriptPanel();
    9
    JPanel panel = createScriptPanel();
    10
    add(panel, BorderLayout.CENTER);
    10
    add(panel, BorderLayout.CENTER);
    11
    add(Box.createVerticalStrut(panel.getPreferredSize().height), BorderLayout.WEST);
    11
    add(Box.createVerticalStrut(panel.getPreferredSize().height), BorderLayout.WEST);
    Precondition Violations (6)
    Row Violation
    1Expression createResetPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createLanguagePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression createParameterPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression createFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression createFilenamePanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression createParameterPanel() cannot be parameterized, because it has dependencies to/from statements that will be extracted