File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java | |||
Method name: long sourceClassesModified(File)
|
Method name: long sourceClassesModified(File)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | pkFile = primaryKey.getClassFile(buildDir);↵ | 1 | remoteFile = remote.getClassFile(buildDir);↵ | |
2 | modified = pkFile.lastModified();↵ | 2 | modified = remoteFile.lastModified();↵ | |
3 | if (modified == -1) {↵ | 3 | if (modified == -1) {↵ | |
4 | System.out.println("The class "↵ | 4 | System.out.println("The class "↵ | |
5 | + primaryKey.getQualifiedClassName() + "couldn't be "↵ | 5 | + remote.getQualifiedClassName() + " couldn't ↵ | |
6 | ↵ | 6 | "↵ | |
7 | + "found on the classpath");↵ | 7 | + "be found on the classpath");↵ | |
8 | return -1;↵ | 8 | return -1;↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | pkFile = primaryKey.getClassFile(buildDir); |
| 7 | remoteFile = remote.getClassFile(buildDir); | ||||||||||||||||
21 | modified = pkFile.lastModified(); |
| 8 | modified = remoteFile.lastModified(); | ||||||||||||||||
22 | if (modified == -1) | 9 | if (modified == -1) | |||||||||||||||||
23 | System.out.println("The class " + primaryKey.getQualifiedClassName() + "couldn't be " + "found on the classpath"); |
| 10 | System.out.println("The class " + remote.getQualifiedClassName() + " couldn't " + "be found on the classpath"); | ||||||||||||||||
24 | return -1; | 11 | return -1; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables modified, pkFile , while Clone fragment #2 returns variables modified, remoteFile |
2 | Not all possible execution flows end in a return statement |