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/protocol/ldap/config/gui/LDAPArgumentsPanel.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void deleteArgument()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (colSelected >= 0) {↵ | |||
2 | tableModel.removeColumn(colSelected);↵ | 1 | tableModel.removeRow(rowSelected);↵ | |
3 | tableModel.fireTableDataChanged();↵ | 2 | tableModel.fireTableDataChanged();↵ | |
4 | // Disable DELETE if there are no rows in the table to delete.↵ | 3 | // Disable DELETE if there are no rows in the table to delete.↵ | |
5 | if (tableModel.getColumnCount() == 0) {↵ | 4 | if (tableModel.getRowCount() == 0) {↵ | |
6 | deleteColumnButton.setEnabled(false);↵ | 5 | delete.setEnabled(false);↵ | |
7 | }↵ | 6 | }↵ | |
8 | // Table still contains one or more rows, so highlight (select)↵ | 7 | // Table still contains one or more rows, so highlight (select)↵ | |
9 | // the appropriate one.↵ | 8 | // the appropriate one.↵ | |
10 | else {↵ | 9 | else {↵ | |
10 | int rowToSelect = rowSelected;↵ | |||
11 | if (colSelected >= tableModel.getColumnCount()) {↵ | 11 | if (rowSelected >= tableModel.getRowCount()) {↵ | |
12 | colSelected = colSelected - 1;↵ | 12 | rowToSelect = rowSelected - 1;↵ | |
13 | }↵ | 13 | }↵ | |
14 | paramTable.setColumnSelectionInterval(colSelected, colSelected);↵ | 14 | table.setRowSelectionInterval(rowToSelect↵ | |
15 | }↵ | 15 | , rowToSelect);↵ | |
16 | } | 16 |
| |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 4.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | tableModel.removeColumn(colSelected); |
| 6 | tableModel.removeRow(rowSelected); | |||||||||||||||||||||||||||
10 | tableModel.fireTableDataChanged(); |
| 7 | tableModel.fireTableDataChanged(); | |||||||||||||||||||||||||||
11 | if (tableModel.getColumnCount() == 0) |
| 8 | if (tableModel.getRowCount() == 0) | |||||||||||||||||||||||||||
12 | deleteColumnButton.setEnabled(false); |
| 9 | delete.setEnabled(false); | |||||||||||||||||||||||||||
else | else | ||||||||||||||||||||||||||||||
| 10 | int rowToSelect = rowSelected; | |||||||||||||||||||||||||||||
13 | if (colSelected >= tableModel.getColumnCount()) |
| 11 | if (rowSelected >= tableModel.getRowCount()) | |||||||||||||||||||||||||||
14 | colSelected = colSelected - 1; |
| 12 | rowToSelect = rowSelected - 1; | |||||||||||||||||||||||||||
15 | paramTable.setColumnSelectionInterval(colSelected, colSelected); |
| 13 | table.setRowSelectionInterval(rowToSelect, rowToSelect); |
Row | Violation |
---|---|
1 | Expression tableModel.removeColumn(colSelected) is a void method call, and thus it cannot be parameterized |
2 | Expression tableModel.removeRow(rowSelected) is a void method call, and thus it cannot be parameterized |
3 | Expression tableModel.getColumnCount() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression tableModel.getRowCount() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression tableModel.getColumnCount() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression tableModel.getRowCount() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression paramTable.setColumnSelectionInterval(colSelected,colSelected) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression table.setRowSelectionInterval(rowToSelect,rowToSelect) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression paramTable.setColumnSelectionInterval(colSelected,colSelected) is a void method call, and thus it cannot be parameterized |
10 | Expression table.setRowSelectionInterval(rowToSelect,rowToSelect) is a void method call, and thus it cannot be parameterized |
11 | Expression colSelected cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression rowToSelect cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression colSelected cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression rowToSelect cannot be parameterized, because it has dependencies to/from statements that will be extracted |