if ( args[i].startsWith( "--import=" ) ) { importFile = args[i].substring( 9 ); } else if ( args[i].startsWith( "--properties=" ) ) { propFile = args[i].substring( 13 ); } else if ( args[i].equals( "--format" ) ) { format = true; } else if ( args[i].startsWith( "--delimiter=" ) ) { delim = args[i].substring( 12 ); } else if ( args[i].startsWith( "--config=" ) ) { cfg.configure( args[i].substring( 9 ) ); } else if ( args[i].startsWith( "--naming=" ) ) { cfg.setNamingStrategy( ( NamingStrategy ) ReflectHelper.classForName( args[i].substring( 9 ) ) .newInstance() ); }
for ( int i = 0; i < args.length; i++ ) { if ( args[i].startsWith( "--" ) ) { if ( args[i].equals( "--quiet" ) ) { script = false; } else if ( args[i].startsWith( "--properties=" ) ) { propFile = args[i].substring( 13 ); } else if ( args[i].startsWith( "--config=" ) ) { cfg.configure( args[i].substring( 9 ) ); } else if ( args[i].startsWith( "--text" ) ) { doUpdate = false; } else if ( args[i].startsWith( "--naming=" ) ) { cfg.setNamingStrategy( ( NamingStrategy ) ReflectHelper.classForName( args[i].substring( 9 ) ).newInstance() ); } } else { cfg.addFile( args[i] ); } }
Clone fragments detected by clone detection tool
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: 12 Number of AST nodes: 13
1
for ( int i = 0; i < args.length; i++ ) {
1
if ( args[i].startsWith( "--import=" ) ) {
2
				if ( args[i].startsWith( "--" ) ) {
2
						importFile = args[i].substring( 9 )
3
					if ( args[i].equals( "--quiet" ) ) {
3
;
4
						script = false;
4
					}
5
					}
5
					else if ( args[i].startsWith( "--properties=" ) ) {
6
					else if ( args[i].startsWith( "--properties=" ) ) {
6
						propFile = args[i].substring( 13 );
7
						propFile = args[i].substring( 13 );
7
					}
8
					}
8
					else if ( args[i].equals( "--format" ) ) {
9
					
9
						format = true;
10
					}
11
					else if ( args[i].startsWith( "--delimiter=" ) ) {
10
else if ( args[i].startsWith( "--config=" ) ) {
12
						delim = args[i].substring( 12 );
11
						cfg.configure( args[i].substring( 9 ) );
13
					}
12
					}
14
					else if ( args[i].startsWith( "--config=" ) ) {
13
					else if ( args[i].startsWith( "--text" ) ) {
15
						cfg.configure( args[i].substring( 9 ) );
14
						doUpdate = false;
16
					}
15
					}
17
					else if ( args[i].startsWith( "--naming=" ) ) {
16
					else if ( args[i].startsWith( "--naming=" ) ) {
18
						cfg.setNamingStrategy(
17
						cfg.setNamingStrategy(
19
								( NamingStrategy ) ReflectHelper.classForName( args[i].substring( 9 ) )
18
								( NamingStrategy ) ReflectHelper.classForName( args[i].substring( 9 ) )
20
										.newInstance()
19
.newInstance()
21
						);
20
						);
22
					}
21
					}
22
				}
23
				else {
24
					cfg.addFile( args[i] );
25
				}
26
			}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)2.9
Clones locationClones are in different classes
Number of node comparisons30