File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javah/JavahAdapterFactory.java | |||
Method name: Native2AsciiAdapter getAdapter(String, ProjectComponent)
|
Method name: JavahAdapter getAdapter(String, ProjectComponent)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if ((JavaEnvUtils.isKaffe() && choice == null)↵ | 1 | if ((JavaEnvUtils.isKaffe() && choice == null)↵ | |
2 | || KaffeNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {↵ | 2 | || Kaffeh.IMPLEMENTATION_NAME.equals(choice)) {↵ | |
3 | return new KaffeNative2Ascii();↵ | 3 | return new Kaffeh();↵ | |
4 | } else if (SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {↵ | 4 | } else if (SunJavah.IMPLEMENTATION_NAME.equals(choice)) {↵ | |
5 | return new SunNative2Ascii();↵ | 5 | return new SunJavah();↵ | |
6 | } else if (choice != null) {↵ | 6 | } else if (choice != null) {↵ | |
7 | return resolveClassName(choice);↵ | 7 | return resolveClassName(choice);↵ | |
8 | }↵ | 8 | }↵ | |
9 | // This default has been good enough until Ant 1.6.3, so stick↵ | 9 | // This default has been good enough until Ant 1.6.3, so stick↵ | |
10 | // with it↵ | 10 | // with it↵ | |
11 | return new SunNative2Ascii(); | 11 | return new SunJavah(); | |
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) | 1.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 28 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if ((JavaEnvUtils.isKaffe() && choice == null) || KaffeNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) |
| 1 | if ((JavaEnvUtils.isKaffe() && choice == null) || Kaffeh.IMPLEMENTATION_NAME.equals(choice)) | |||||||||||
|
| 2 | return new Kaffeh(); | ||||||||||||
2 | return new KaffeNative2Ascii(); |
| | ||||||||||||
3 | else if (SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) |
| 3 | else if (SunJavah.IMPLEMENTATION_NAME.equals(choice)) | |||||||||||
|
| 4 | return new SunJavah(); | ||||||||||||
4 | return new SunNative2Ascii(); |
| | ||||||||||||
5 | else if (choice != null) | 5 | else if (choice != null) | ||||||||||||
6 | return resolveClassName(choice); | 6 | return resolveClassName(choice); | ||||||||||||
|
| 7 | return new SunJavah(); | ||||||||||||
7 | return new SunNative2Ascii(); |
| |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.taskdefs.optional.native2ascii.KaffeNative2Ascii of variable KaffeNative2Ascii does not match with type org.apache.tools.ant.taskdefs.optional.javah.Kaffeh of variable Kaffeh |
2 | Unmatched return new Kaffeh(); |
3 | Unmatched return new KaffeNative2Ascii(); |
4 | Type org.apache.tools.ant.taskdefs.optional.native2ascii.SunNative2Ascii of variable SunNative2Ascii does not match with type org.apache.tools.ant.taskdefs.optional.javah.SunJavah of variable SunJavah |
5 | Unmatched return new SunJavah(); |
6 | Unmatched return new SunNative2Ascii(); |
7 | Unmatched return new SunJavah(); |
8 | Unmatched return new SunNative2Ascii(); |