File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java | |||
Method name: void main(String[])
|
Method name: void main(String[])
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if ( args[i].equals( "--format" ) ) {↵ | 1 | if ( args[i].↵ | |
2 | format = true↵ | 2 | startsWith( "--properties=" ) ) {↵ | |
3 | ;↵ | 3 | propFile = args[i].substring( 13 );↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if ( args[i].startsWith( "--delimiter=" ) ) {↵ | 5 | else if ( args[i].startsWith( "--config=" ) ) {↵ | |
6 | delim = args[i].substring( 12 );↵ | 6 | cfg.configure( args[i].substring( 9 ) );↵ | |
7 | }↵ | 7 | }↵ | |
8 | else if ( args[i].startsWith( "--config=" ) ) {↵ | 8 | else if ( args[i].startsWith( "--text" ) ) {↵ | |
9 | cfg.configure( args[i].substring( 9 ) );↵ | 9 | doUpdate = false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | else if ( args[i].startsWith( "--naming=" ) ) {↵ | 11 | else if ( args[i].startsWith( "--naming=" ) ) {↵ | |
12 | cfg.setNamingStrategy(↵ | 12 | cfg.setNamingStrategy(↵ | |
13 | ( NamingStrategy ) ReflectHelper.classForName( args[i].substring( 9 ) )↵ | 13 | ( NamingStrategy ) ReflectHelper.classForName( args[i].substring( 9 ) )↵ | |
14 | .newInstance()↵ | 14 | .newInstance()↵ | |
15 | );↵ | 15 | );↵ | |
16 | } | 16 |
| |
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.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 48 |
Number of mapped statements | 8 |
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) | 58.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
31 | else if (args[i].equals("--format")) |
| 14 | else if (args[i].startsWith("--text")) | ||||||||||||||
32 | format = true; |
| 15 | doUpdate = false; | ||||||||||||||
33 | else if (args[i].startsWith("--delimiter=")) |
| 10 | else if (args[i].startsWith("--properties=")) | ||||||||||||||
34 | delim = args[i].substring(12); |
| 11 | propFile = args[i].substring(13); | ||||||||||||||
35 | else if (args[i].startsWith("--config=")) | 12 | else if (args[i].startsWith("--config=")) | |||||||||||||||
36 | cfg.configure(args[i].substring(9)); | 13 | cfg.configure(args[i].substring(9)); | |||||||||||||||
37 | else if (args[i].startsWith("--naming=")) | 16 | else if (args[i].startsWith("--naming=")) | |||||||||||||||
38 | cfg.setNamingStrategy((NamingStrategy)ReflectHelper.classForName(args[i].substring(9)).newInstance()); | 17 | cfg.setNamingStrategy((NamingStrategy)ReflectHelper.classForName(args[i].substring(9)).newInstance()); |
Row | Violation |
---|---|
1 | Expression args[i].startsWith("--text") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables delim, format , while Clone fragment #2 returns variables propFile, doUpdate |