try {
Method getVersionMethod = Class.forName("org.columba.core.versioninfo.ColumbaVersionInfo").getMethod("getVersion", new Class[0]);
return (String) getVersionMethod.invoke(null,new Object[0]);
} catch (Exception e) {
return "CVS-" + DATE;
}
try {
Method getBuildDateMethod = Class.forName("org.columba.core.versioninfo.ColumbaVersionInfo").getMethod("getBuildDate", new Class[0]);
return (Date) getBuildDateMethod.invoke(null,new Object[0]);
} catch (Exception e) {
return TODAY;
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/versioninfo/VersionInfo.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/versioninfo/VersionInfo.java
|
Method name: String getVersion()
|
|
Method name: Date getBuildDate()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try {↵ | | 1 | try {↵
|
2 | Method getVersionMethod = Class.forName("org.columba.core.versioninfo.ColumbaVersionInfo").getMethod("getVersion", new Class[0]);↵ | | 2 | Method getBuildDateMethod = Class.forName("org.columba.core.versioninfo.ColumbaVersionInfo").getMethod("getBuildDate", new Class[0]);↵
|
3 | ↵ | | 3 | ↵
|
4 | return (String) getVersionMethod.invoke(null,new Object[0]);↵ | | 4 | return (Date) getBuildDateMethod.invoke(null,new Object[0]);↵
|
5 | } catch (Exception e) {↵ | | 5 | } catch (Exception e) {↵
|
6 | return "CVS-" + DATE;↵ | | 6 | return TODAY;↵
|
7 | } | | 7 | }
|
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 |