if ((iashome != null) && (!iashome.isDirectory())) {
String msg = "If \"iashome\" is specified, it must be a valid "
+ "directory (it was set to " + iashome + ").";
throw new BuildException(msg, getLocation());
}
if ((iashome != null) && (!iashome.isDirectory())) {
String msg = "If \"iashome\" is specified, it must be a valid "
+ "directory (it was set to " + iashome + ").";
throw new BuildException(msg, getLocation());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
|
Method name: void checkConfiguration(String, SAXParser)
|
|
Method name: void checkConfiguration()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if ((iashome != null) && (!iashome.isDirectory())) {↵ | | 1 | if ((iashome != null) && (!iashome.isDirectory())) {↵
|
2 | String msg = "If \"iashome\" is specified, it must be a valid "↵ | | 2 | String msg = "If \"iashome\" is specified, it must be a valid "↵
|
3 | + "directory (it was set to " + iashome + ").";↵ | | 3 | + "directory (it was set to " + iashome + ").";↵
|
4 | throw new BuildException(msg, getLocation());↵ | | 4 | throw new BuildException(msg, getLocation());↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 24.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | if ((iashome != null) && (!iashome.isDirectory())) | | 19 | if ((iashome != null) && (!iashome.isDirectory())) |
11 | String msg = "If \"iashome\" is specified, it must be a valid " + "directory (it was set to " + iashome + ")."; | | 20 | String msg = "If \"iashome\" is specified, it must be a valid " + "directory (it was set to " + iashome + ")."; |
12 | throw new BuildException(msg, getLocation()); | | 21 | throw new BuildException(msg, getLocation()); |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes org.apache.tools.ant.taskdefs.optional.ejb.IPlanetDeploymentTool and org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbcTask do not have a common superclass |