try {
return System.getProperty(property, defValue);
} catch (SecurityException se) {
return defValue;
}
if(provider != null) {
try {
return MessageDigest.getInstance(providerName, provider);
} catch(NoSuchAlgorithmException e) {
// bouncy castle doesn't support algorithm
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/SafePropertyAccessor.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyDigest.java
|
Method name: String getProperty(String, String)
|
|
Method name: MessageDigest createMessageDigest(Ruby, String)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 3
|
|
| | | 1 | if(provider != null) {↵
|
1 | try {↵ | | 2 | try {↵
|
2 | return System.getProperty(property, defValue);↵ | | 3 | return ↵
|
| | | 4 | MessageDigest.getInstance(providerName, provider);↵
|
3 | } catch (SecurityException se) {↵ | | 5 | } catch(NoSuchAlgorithmException e) {↵
|
4 | return defValue;↵ | | 6 | // bouncy castle doesn't support algorithm↵
|
| | | 7 | }↵
|
5 | } | | 8 | }
|
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 |