try
{
return Double.parseDouble(value.trim());
}
catch(NumberFormatException nf)
{
return def;
}
try
{
return Color.decode(name);
}
catch(NumberFormatException nf)
{
return defaultColor;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/GUIUtilities.java
|
Method name: double getDoubleProperty(String, double)
|
|
Method name: Color parseColor(String, Color)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | return Double.parseDouble(value.trim());↵ | | 3 | return Color.decode(name);↵
|
4 | }↵ | | 4 | }↵
|
5 | catch(NumberFormatException nf)↵ | | 5 | catch(NumberFormatException nf)↵
|
6 | {↵ | | 6 | {↵
|
7 | return def;↵ | | 7 | return defaultColor;↵
|
8 | } | | 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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |