File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/DerbyDialect.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/function/AbstractAnsiTrimEmulationFunction.java | |||
Method name: String render(List, SessionFactoryImplementor)
|
Method name: String render(List, SessionFactoryImplementor)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if ( "from".equalsIgnoreCase( potentialTrimCharacter ) ) {↵ | 1 | if ( "from".equalsIgnoreCase( potentialTrimCharacter ) ) { ↵ | |
2 | trimCharacter = "' '";↵ | 2 | trimCharacter = "' '";↵ | |
3 | trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );↵ | 3 | trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if ( potentialTrimCharacterArgIndex + 1 >= args.size() ) {↵ | 5 | else if ( potentialTrimCharacterArgIndex + 1 >= args.size() ) {↵ | |
6 | trimCharacter = "' '";↵ | 6 | trimCharacter = "' '";↵ | |
7 | trimSource = potentialTrimCharacter;↵ | 7 | trimSource = potentialTrimCharacter;↵ | |
8 | }↵ | 8 | }↵ | |
9 | else {↵ | 9 | else {↵ | |
10 | trimCharacter = potentialTrimCharacter;↵ | 10 | trimCharacter = potentialTrimCharacter;↵ | |
11 | if ( "from".equalsIgnoreCase( ( String ) args.get( potentialTrimCharacterArgIndex + 1 ) ) ) {↵ | 11 | if ( "from".equalsIgnoreCase( ( String ) args.get( potentialTrimCharacterArgIndex + 1 ) ) ) {↵ | |
12 | trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 2 );↵ | 12 | trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 2 );↵ | |
13 | }↵ | 13 | }↵ | |
14 | else {↵ | 14 | else {↵ | |
15 | trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );↵ | 15 | trimSource = ( String ) args.get( potentialTrimCharacterArgIndex + 1 );↵ | |
16 | }↵ | 16 | }↵ | |
17 | } | 17 | } | |
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.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 50 |
Number of mapped statements | 10 |
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.3 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
18 | if ("from".equalsIgnoreCase(potentialTrimCharacter)) | 18 | if ("from".equalsIgnoreCase(potentialTrimCharacter)) | |
19 | trimCharacter = "' '"; | 19 | trimCharacter = "' '"; | |
20 | trimSource = (String)args.get(potentialTrimCharacterArgIndex + 1); | 20 | trimSource = (String)args.get(potentialTrimCharacterArgIndex + 1); | |
21 | else if (potentialTrimCharacterArgIndex + 1 >= args.size()) | 21 | else if (potentialTrimCharacterArgIndex + 1 >= args.size()) | |
22 | trimCharacter = "' '"; | 22 | trimCharacter = "' '"; | |
23 | trimSource = potentialTrimCharacter; | 23 | trimSource = potentialTrimCharacter; | |
else | else | |||
24 | trimCharacter = potentialTrimCharacter; | 24 | trimCharacter = potentialTrimCharacter; | |
25 | if ("from".equalsIgnoreCase((String)args.get(potentialTrimCharacterArgIndex + 1))) | 25 | if ("from".equalsIgnoreCase((String)args.get(potentialTrimCharacterArgIndex + 1))) | |
26 | trimSource = (String)args.get(potentialTrimCharacterArgIndex + 2); | 26 | trimSource = (String)args.get(potentialTrimCharacterArgIndex + 2); | |
else | else | |||
27 | trimSource = (String)args.get(potentialTrimCharacterArgIndex + 1); | 27 | trimSource = (String)args.get(potentialTrimCharacterArgIndex + 1); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables trimSource, trimCharacter , while Clone fragment #2 returns variables trimSource, trimCharacter |