long ans;
try {
ans = (Long.valueOf(appProperties.getProperty(propName, Long.toString(defaultVal)).trim())).longValue();
} catch (Exception e) {
ans = defaultVal;
}
return ans;
int ans;
try {
ans = (Integer.valueOf(appProperties.getProperty(propName, Integer.toString(defaultVal)).trim()))
.intValue();
} catch (Exception e) {
ans = defaultVal;
}
return ans;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/JMeterUtils.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/util/JMeterUtils.java
|
Method name: long getPropDefault(String, long)
|
|
Method name: int getPropDefault(String, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | long ans;↵ | | 1 | int ans;↵
|
2 | try {↵ | | 2 | try {↵
|
3 | ans = (Long.valueOf(appProperties.getProperty(propName, Long.toString(defaultVal)).trim())).long↵ | | 3 | ans = (Integer.valueOf(appProperties.getProperty(propName, Integer.toString(defaultVal)).trim()))↵
|
4 | Value();↵ | | 4 | .intValue();↵
|
5 | } catch (Exception e) {↵ | | 5 | } catch (Exception e) {↵
|
6 | ans = defaultVal;↵ | | 6 | ans = defaultVal;↵
|
7 | }↵ | | 7 | }↵
|
8 | return ans; | | 8 | return ans;
|
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 declared in the same class |
Number of node comparisons | 1 |