File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testbeans/BeanInfoSupport.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/cli/avalon/CLArgsParser.java | |||
Method name: PropertyDescriptor property(String)
|
Method name: CLOptionDescriptor getDescriptorFor(String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 4 | |||
1 | PropertyDescriptor[] properties = getPropertyDescriptors();↵ | |||
2 | for (int i = 0; i < properties.length; i++) {↵ | 1 | for (int i = 0; i < m_optionDescriptors.length; i++) {↵ | |
3 | if (properties[i].getName().equals(name)) {↵ | 2 | if (m_optionDescriptors[i].getName().equals(name)) {↵ | |
4 | return properties[i];↵ | 3 | return ↵ | |
5 | }↵ | |||
6 | }↵ | |||
7 | log.warn("Cannot find property: "+name);↵ | 4 | m_optionDescriptors[i];↵ | |
5 | }↵ | |||
6 | }↵ | |||
8 | return null; | 7 |
| |
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 | 8 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | PropertyDescriptor[] properties = getPropertyDescriptors(); | | ||||||||||||||||
2 | for (int i = 0; i < properties.length; i++) |
| 1 | for (int i = 0; i < m_optionDescriptors.length; i++) | ||||||||||||||
3 | if (properties[i].getName().equals(name)) |
| 2 | if (m_optionDescriptors[i].getName().equals(name)) | ||||||||||||||
|
| 3 | return m_optionDescriptors[i]; | |||||||||||||||
4 | return properties[i]; |
| | |||||||||||||||
5 | log.warn("Cannot find property: " + name); | | ||||||||||||||||
6 | return null; | 4 | return null; |
Row | Violation |
---|---|
1 | Type java.beans.PropertyDescriptor[] of variable properties does not match with type org.apache.commons.cli.avalon.CLOptionDescriptor[] of variable m_optionDescriptors |
2 | Type java.beans.PropertyDescriptor[] of variable properties does not match with type org.apache.commons.cli.avalon.CLOptionDescriptor[] of variable m_optionDescriptors |
3 | 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 |
4 | Unmatched return m_optionDescriptors[i]; |
5 | Unmatched statement return properties[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return properties[i]; |