includeModel = new PowerTableModel(new String[] { INCLUDE_COL }, new Class[] { String.class }); includeTable = new JTable(includeModel); includeTable.setPreferredScrollableViewportSize(new Dimension(100, 30)); JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils .getResString("patterns_to_include"))); // $NON-NLS-1$ panel.add(new JScrollPane(includeTable), BorderLayout.CENTER); panel.add(createTableButtonPanel(ADD_INCLUDE, DELETE_INCLUDE), BorderLayout.SOUTH); return panel;
excludeModel = new PowerTableModel(new String[] { EXCLUDE_COL }, new Class[] { String.class }); excludeTable = new JTable(excludeModel); excludeTable.setPreferredScrollableViewportSize(new Dimension(100, 30)); JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils .getResString("patterns_to_exclude"))); // $NON-NLS-1$ panel.add(new JScrollPane(excludeTable), BorderLayout.CENTER); panel.add(createTableButtonPanel(ADD_EXCLUDE, DELETE_EXCLUDE), BorderLayout.SOUTH); return panel;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Method name: JPanel createIncludePanel() Method name: JPanel createExcludePanel()
Number of AST nodes: 8 Number of AST nodes: 8
1
includeModel = new PowerTableModel(new String[] { INCLUDE_COL }, new Class[] { String.class });
1
excludeModel = new PowerTableModel(new String[] { EXCLUDE_COL }, new Class[] { String.class });
2
		includeTable = new JTable(includeModel);
2
		excludeTable = new JTable(excludeModel);
3
		includeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));
3
		excludeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));
4
		JPanel panel = new JPanel(new BorderLayout());
4
		JPanel panel = new JPanel(new BorderLayout());
5
		panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
5
		panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
6
				.getResString("patterns_to_include"))); // $NON-NLS-1$
6
				.getResString("patterns_to_exclude"))); // $NON-NLS-1$
7
		panel.add(new JScrollPane(includeTable), BorderLayout.CENTER);
7
		panel.add(new JScrollPane(excludeTable), BorderLayout.CENTER);
8
		panel.add(createTableButtonPanel(ADD_INCLUDE, DELETE_INCLUDE), BorderLayout.SOUTH);
8
		panel.add(createTableButtonPanel(ADD_EXCLUDE, DELETE_EXCLUDE), BorderLayout.SOUTH);
9
		return panel;
9
		return panel;
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 comparisons31
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    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
    includeModel = new PowerTableModel(new String[] {INCLUDE_COL}, new Class[] {String.class});
    1
    includeModel = new PowerTableModel(new String[] {INCLUDE_COL}, new Class[] {String.class});
    1
    excludeModel = new PowerTableModel(new String[] {EXCLUDE_COL}, new Class[] {String.class});
    Differences
    Expression1Expression2Difference
    includeModelexcludeModelVARIABLE_NAME_MISMATCH
    INCLUDE_COLEXCLUDE_COLVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression includeModel is a field being modified, and thus it cannot be parameterized
    Expression excludeModel is a field being modified, and thus it cannot be parameterized
    1
    excludeModel = new PowerTableModel(new String[] {EXCLUDE_COL}, new Class[] {String.class});
    2
    includeTable = new JTable(includeModel);
    2
    includeTable = new JTable(includeModel);
    2
    excludeTable = new JTable(excludeModel);
    Differences
    Expression1Expression2Difference
    includeTableexcludeTableVARIABLE_NAME_MISMATCH
    includeModelexcludeModelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression includeTable is a field being modified, and thus it cannot be parameterized
    Expression excludeTable is a field being modified, and thus it cannot be parameterized
    Expression includeModel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression excludeModel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    excludeTable = new JTable(excludeModel);
    3
    includeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));
    3
    includeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));
    3
    excludeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));
    Differences
    Expression1Expression2Difference
    includeTableexcludeTableVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression includeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression excludeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    excludeTable.setPreferredScrollableViewportSize(new Dimension(100, 30));
    4
    JPanel panel = new JPanel(new BorderLayout());
    4
    JPanel panel = new JPanel(new BorderLayout());
    5
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("patterns_to_include")));
    5
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("patterns_to_include")));
    5
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("patterns_to_exclude")));
    Differences
    Expression1Expression2Difference
    "patterns_to_include""patterns_to_exclude"LITERAL_VALUE_MISMATCH
    5
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("patterns_to_exclude")));
    6
    panel.add(new JScrollPane(includeTable), BorderLayout.CENTER);
    6
    panel.add(new JScrollPane(includeTable), BorderLayout.CENTER);
    6
    panel.add(new JScrollPane(excludeTable), BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    includeTableexcludeTableVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression includeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression excludeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    panel.add(new JScrollPane(excludeTable), BorderLayout.CENTER);
    7
    panel.add(createTableButtonPanel(ADD_INCLUDE, DELETE_INCLUDE), BorderLayout.SOUTH);
    7
    panel.add(createTableButtonPanel(ADD_INCLUDE, DELETE_INCLUDE), BorderLayout.SOUTH);
    7
    panel.add(createTableButtonPanel(ADD_EXCLUDE, DELETE_EXCLUDE), BorderLayout.SOUTH);
    Differences
    Expression1Expression2Difference
    ADD_INCLUDEADD_EXCLUDEVARIABLE_NAME_MISMATCH
    DELETE_INCLUDEDELETE_EXCLUDEVARIABLE_NAME_MISMATCH
    7
    panel.add(createTableButtonPanel(ADD_EXCLUDE, DELETE_EXCLUDE), BorderLayout.SOUTH);
    8
    return panel;
    8
    return panel;
    Precondition Violations (10)
    Row Violation
    1Expression includeModel is a field being modified, and thus it cannot be parameterized
    2Expression excludeModel is a field being modified, and thus it cannot be parameterized
    3Expression includeTable is a field being modified, and thus it cannot be parameterized
    4Expression excludeTable is a field being modified, and thus it cannot be parameterized
    5Expression includeModel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression excludeModel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression includeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression excludeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression includeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression excludeTable cannot be parameterized, because it has dependencies to/from statements that will be extracted