if (authTable.isEditing()) { TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable .getEditingColumn()); cellEditor.cancelCellEditing(); } int rowSelected = authTable.getSelectedRow();
if (paramTable.isEditing()) { TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable .getEditingColumn()); cellEditor.cancelCellEditing(); } int rowSelected = paramTable.getSelectedRow();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/gui/AuthPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/gui/UserParametersGui.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (authTable.isEditing()) {
1
if (paramTable.isEditing()) {
2
					TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable
2
				TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable
3
							.getEditingColumn());
3
						.getEditingColumn());
4
					cellEditor.cancelCellEditing();
4
				cellEditor.cancelCellEditing();
5
				}
5
			}
6
				int rowSelected = authTable.getSelectedRow();
6
			int rowSelected = paramTable.getSelectedRow();
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.2
Clones locationClones are in different classes
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    if (authTable.isEditing())
    4
    if (authTable.isEditing())
    1
    if (paramTable.isEditing())
    Differences
    Expression1Expression2Difference
    authTableparamTableVARIABLE_NAME_MISMATCH
    1
    if (paramTable.isEditing())
    5
    TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable.getEditingColumn());
    5
    TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable.getEditingColumn());
    2
    TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable.getEditingColumn());
    Differences
    Expression1Expression2Difference
    authTableparamTableVARIABLE_NAME_MISMATCH
    authTableparamTableVARIABLE_NAME_MISMATCH
    authTableparamTableVARIABLE_NAME_MISMATCH
    2
    TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable.getEditingColumn());
    6
    cellEditor.cancelCellEditing();
    3
    cellEditor.cancelCellEditing();
    7
    int rowSelected = authTable.getSelectedRow();
    7
    int rowSelected = authTable.getSelectedRow();
    4
    int rowSelected = paramTable.getSelectedRow();
    Differences
    Expression1Expression2Difference
    authTableparamTableVARIABLE_NAME_MISMATCH
    4
    int rowSelected = paramTable.getSelectedRow();
    Precondition Violations (0)
    Row Violation