PropertyDescriptor[] properties = getPropertyDescriptors();
for (int i = 0; i < properties.length; i++) {
if (properties[i].getName().equals(name)) {
return properties[i];
}
}
log.warn("Cannot find property: "+name);
return null;
for (int i = 0; i < m_optionDescriptors.length; i++) {
if (m_optionDescriptors[i].getId() == id) {
return m_optionDescriptors[i];
}
}
return null;
Clone fragments detected by clone detection tool
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(int)
|
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 (↵
|
4 | return properties[i];↵ | | |
|
5 | }↵ | | |
|
6 | }↵ | | |
|
7 | log.warn("Cannot find property: "+name);↵ | | 3 | m_optionDescriptors[i].getId() == id) {↵
|
| | | 4 | return m_optionDescriptors[i];↵
|
| | | 5 | }↵
|
| | | 6 | }↵
|
|
8 | return null; | | 7 | return null;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |