if (paramTable.isEditing()) {
TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable
.getEditingColumn());
cellEditor.cancelCellEditing();
}
int rowSelected = paramTable.getSelectedRow();
if (paramTable.isEditing()) {
TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable
.getEditingColumn());
cellEditor.cancelCellEditing();
}
int colSelected = paramTable.getSelectedColumn();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/modifiers/gui/UserParametersGui.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 (paramTable.isEditing()) {↵ | | 1 | if (paramTable.isEditing()) {↵
|
2 | TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable↵ | | 2 | TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable↵
|
3 | .getEditingColumn());↵ | | 3 | .getEditingColumn());↵
|
4 | cellEditor.cancelCellEditing();↵ | | 4 | cellEditor.cancelCellEditing();↵
|
5 | }↵ | | 5 | }↵
|
|
6 | int rowSelected = paramTable.getSelectedRow(); | | 6 | int colSelected = paramTable.getSelectedColumn();
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in the same java file |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (paramTable.isEditing()) | | 1 | if (paramTable.isEditing()) |
2 | TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable.getEditingColumn()); | | 2 | TableCellEditor cellEditor = paramTable.getCellEditor(paramTable.getEditingRow(), paramTable.getEditingColumn()); |
3 | cellEditor.cancelCellEditing(); | | 3 | cellEditor.cancelCellEditing(); |
4 | int rowSelected = paramTable.getSelectedRow(); | | 4 | int colSelected = paramTable.getSelectedColumn(); |
Precondition Violations (0)
Row |
Violation |