File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java | |||
Method name: String createOutputFileName(File, String, boolean)
|
Method name: String createOutputFileName(File, String, String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (suffixPos == -1) {↵ | 1 | if (suffixPos == -1) {↵ | |
2 | optionalOutputFile = javaccFile + suffix;↵ | 2 | optionalOutputFile = jjtreeFile + DEFAULT_SUFFIX;↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | String currentSuffix = javaccFile.substring(suffixPos);↵ | 4 | String currentSuffix = jjtreeFile.substring(suffixPos);↵ | |
5 | if (currentSuffix.equals(suffix)) {↵ | 5 | if (currentSuffix.equals(DEFAULT_SUFFIX)) {↵ | |
6 | optionalOutputFile = javaccFile + suffix;↵ | 6 | optionalOutputFile = jjtreeFile + DEFAULT_SUFFIX;↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | optionalOutputFile = javaccFile.substring(0, suffixPos)↵ | 8 | optionalOutputFile = jjtreeFile.substring(0, suffixPos)↵ | |
9 | + suffix;↵ | 9 | + DEFAULT_SUFFIX;↵ | |
10 | }↵ | 10 | }↵ | |
11 | } | 11 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 19 |
Number of mapped statements | 6 |
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) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (suffixPos == -1) | 8 | if (suffixPos == -1) | ||||||||||||||
11 | optionalOutputFile = javaccFile + suffix; |
| 9 | optionalOutputFile = jjtreeFile + DEFAULT_SUFFIX; | |||||||||||||
else | else | ||||||||||||||||
12 | String currentSuffix = javaccFile.substring(suffixPos); |
| 10 | String currentSuffix = jjtreeFile.substring(suffixPos); | |||||||||||||
13 | if (currentSuffix.equals(suffix)) |
| 11 | if (currentSuffix.equals(DEFAULT_SUFFIX)) | |||||||||||||
14 | optionalOutputFile = javaccFile + suffix; |
| 12 | optionalOutputFile = jjtreeFile + DEFAULT_SUFFIX; | |||||||||||||
else | else | ||||||||||||||||
15 | optionalOutputFile = javaccFile.substring(0, suffixPos) + suffix; |
| 13 | optionalOutputFile = jjtreeFile.substring(0, suffixPos) + DEFAULT_SUFFIX; |
Row | Violation |
---|