File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/cli/avalon/CLArgsParser.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/cli/avalon/CLArgsParser.java | |||
Method name: CLOptionDescriptor getDescriptorFor(String)
|
Method name: CLOptionDescriptor getDescriptorFor(int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < m_optionDescriptors.length; i++) {↵ | 1 | for (int i = 0; i < m_optionDescriptors.length; i++) {↵ | |
2 | if (m_optionDescriptors[i].getName().equals(name)) {↵ | 2 | if (m_optionDescriptors[i].getId() == id) {↵ | |
3 | return m_optionDescriptors[i];↵ | 3 | return m_optionDescriptors[i];↵ | |
4 | }↵ | 4 | }↵ | |
5 | }↵ | 5 | }↵ | |
6 | return null; | 6 |
| |
See real code fragment | See real code fragment |
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 declared in the same class |
Number of node comparisons | 3 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | for (int i = 0; i < m_optionDescriptors.length; i++) | 1 | for (int i = 0; i < m_optionDescriptors.length; i++) | |||||
|
| 2 | if (m_optionDescriptors[i].getId() == id) | |||||
|
| 3 | return m_optionDescriptors[i]; | |||||
2 | if (m_optionDescriptors[i].getName().equals(name)) |
| | |||||
3 | return m_optionDescriptors[i]; |
| | |||||
4 | return null; | 4 | return null; |
Row | Violation |
---|---|
1 | Unmatched statement if(m_optionDescriptors[i].getId() == id) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement return m_optionDescriptors[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return m_optionDescriptors[i]; |
4 | Unmatched statement if(m_optionDescriptors[i].getName().equals(name)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement return m_optionDescriptors[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return m_optionDescriptors[i]; |