if (authTable.isEditing()) { TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable .getEditingColumn()); cellEditor.stopCellEditing(); } tableModel.addNewRow(); tableModel.fireTableDataChanged();
if (headerTable.isEditing()) { TableCellEditor cellEditor = headerTable.getCellEditor(headerTable.getEditingRow(), headerTable.getEditingColumn()); cellEditor.stopCellEditing(); } tableModel.addNewRow(); tableModel.fireTableDataChanged();
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/protocol/http/gui/HeaderPanel.java
Method name: void actionPerformed(ActionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (authTable.isEditing()) {
1
if (headerTable.isEditing()) {
2
				TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable
2
				TableCellEditor cellEditor = headerTable.getCellEditor(headerTable.getEditingRow(),
3
						
4
.getEditingColumn());
3
						headerTable.getEditingColumn());
5
				cellEditor.stopCellEditing();
4
				cellEditor.stopCellEditing();
6
			}
5
			}
7
			tableModel.addNewRow();
6
			tableModel.addNewRow();
8
			tableModel.fireTableDataChanged();
7
			tableModel.fireTableDataChanged();
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    19
    if (authTable.isEditing())
    19
    if (authTable.isEditing())
    19
    if (headerTable.isEditing())
    Differences
    Expression1Expression2Difference
    authTableheaderTableVARIABLE_NAME_MISMATCH
    19
    if (headerTable.isEditing())
    20
    TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable.getEditingColumn());
    20
    TableCellEditor cellEditor = authTable.getCellEditor(authTable.getEditingRow(), authTable.getEditingColumn());
    20
    TableCellEditor cellEditor = headerTable.getCellEditor(headerTable.getEditingRow(), headerTable.getEditingColumn());
    Differences
    Expression1Expression2Difference
    authTableheaderTableVARIABLE_NAME_MISMATCH
    authTableheaderTableVARIABLE_NAME_MISMATCH
    authTableheaderTableVARIABLE_NAME_MISMATCH
    20
    TableCellEditor cellEditor = headerTable.getCellEditor(headerTable.getEditingRow(), headerTable.getEditingColumn());
    21
    cellEditor.stopCellEditing();
    21
    cellEditor.stopCellEditing();
    22
    tableModel.addNewRow();
    22
    tableModel.addNewRow();
    22
    tableModel.addNewRow();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.http.gui.AuthPanel.InnerTableModelorg.apache.jmeter.protocol.http.gui.HeaderPanel.InnerTableModelSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression tableModel cannot be unified with expression tableModel , because common superclass javax.swing.table.AbstractTableModel does not declare member(s) public void addNewRow()
    22
    tableModel.addNewRow();
    23
    tableModel.fireTableDataChanged();
    23
    tableModel.fireTableDataChanged();
    23
    tableModel.fireTableDataChanged();
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.protocol.http.gui.AuthPanel.InnerTableModelorg.apache.jmeter.protocol.http.gui.HeaderPanel.InnerTableModelSUBCLASS_TYPE_MISMATCH
    23
    tableModel.fireTableDataChanged();
    Precondition Violations (1)
    Row Violation
    1Expression tableModel cannot be unified with expression tableModel , because common superclass javax.swing.table.AbstractTableModel does not declare member(s) public void addNewRow()