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: 8 | Number of AST nodes: 8 | |||
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.stopCellEditing();↵ | 4 | cellEditor.stopCellEditing();↵ | |
5 | }↵ | 5 | }↵ | |
6 | tableModel.addNewRow();↵ | 6 | tableModel.addNewColumn(THREAD_COLUMNS_PREFIX + tableModel.getColumnCount(), String.class);↵ | |
7 | tableModel.fireTableDataChanged();↵ | 7 | tableModel.fireTableDataChanged();↵ | |
8 | // Enable DELETE (which may already be enabled, but it won't hurt)↵ | 8 | // Enable DELETE (which may already be enabled, but it won't hurt)↵ | |
9 | deleteRowButton.setEnabled(true);↵ | 9 | deleteColumnButton.setEnabled(true);↵ | |
10 | // Highlight (select) the appropriate row.↵ | 10 | // Highlight (select) the appropriate row.↵ | |
11 | int rowToSelect = tableModel.getRowCount() - 1;↵ | 11 | int colToSelect = tableModel.getColumnCount() - 1;↵ | |
12 | paramTable.setRowSelectionInterval(rowToSelect, rowToSelect); | 12 | paramTable.setColumnSelectionInterval(colToSelect, colToSelect); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 34 |
Number of mapped statements | 8 |
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 |
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.stopCellEditing(); | 3 | cellEditor.stopCellEditing(); | |||||||||||||||||||||
4 | tableModel.addNewRow(); |
| 5 | tableModel.fireTableDataChanged(); | ||||||||||||||||||||
5 | tableModel.fireTableDataChanged(); |
| 4 | tableModel.addNewColumn(THREAD_COLUMNS_PREFIX + tableModel.getColumnCount(), String.class); | ||||||||||||||||||||
6 | deleteRowButton.setEnabled(true); |
| 6 | deleteColumnButton.setEnabled(true); | ||||||||||||||||||||
7 | int rowToSelect = tableModel.getRowCount() - 1; |
| 7 | int colToSelect = tableModel.getColumnCount() - 1; | ||||||||||||||||||||
8 | paramTable.setRowSelectionInterval(rowToSelect, rowToSelect); |
| 8 | paramTable.setColumnSelectionInterval(colToSelect, colToSelect); |
Row | Violation |
---|---|
1 | Expression tableModel.addNewRow() is a void method call, and thus it cannot be parameterized |
2 | Expression tableModel.fireTableDataChanged() is a void method call, and thus it cannot be parameterized |
3 | Expression tableModel.fireTableDataChanged() is a void method call, and thus it cannot be parameterized |
4 | Expression tableModel.addNewColumn(THREAD_COLUMNS_PREFIX + tableModel.getColumnCount(),String.class) is a void method call, and thus it cannot be parameterized |
5 | Expression tableModel.fireTableDataChanged() is a void method call, and thus it cannot be parameterized |
6 | Expression tableModel.addNewColumn(THREAD_COLUMNS_PREFIX + tableModel.getColumnCount(),String.class) is a void method call, and thus it cannot be parameterized |
7 | Expression tableModel.getRowCount() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression tableModel.getColumnCount() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression paramTable.setRowSelectionInterval(rowToSelect,rowToSelect) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression paramTable.setColumnSelectionInterval(colToSelect,colToSelect) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression paramTable.setRowSelectionInterval(rowToSelect,rowToSelect) is a void method call, and thus it cannot be parameterized |
12 | Expression paramTable.setColumnSelectionInterval(colToSelect,colToSelect) is a void method call, and thus it cannot be parameterized |