private Configuration getConfiguration() throws Exception { Configuration cfg = new Configuration(); if (namingStrategy!=null) { cfg.setNamingStrategy( (NamingStrategy) ReflectHelper.classForName(namingStrategy).newInstance() ); } if (configurationFile!=null) { cfg.configure( configurationFile ); } String[] files = getFiles(); for (int i = 0; i < files.length; i++) { String filename = files[i]; if ( filename.endsWith(".jar") ) { cfg.addJar( new File(filename) ); } else { cfg.addFile(filename); } } return cfg;
private Configuration getConfiguration() throws Exception { Configuration cfg = new Configuration(); if (namingStrategy!=null) { cfg.setNamingStrategy( (NamingStrategy) ReflectHelper.classForName(namingStrategy).newInstance() ); } if (configurationFile!=null) { cfg.configure( configurationFile ); } String[] files = getFiles(); for (int i = 0; i < files.length; i++) { String filename = files[i]; if ( filename.endsWith(".jar") ) { cfg.addJar( new File(filename) ); } else { cfg.addFile(filename); } } return cfg;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateTask.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidatorTask.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private Configuration getConfiguration() throws Exception {
1
private Configuration getConfiguration() throws Exception {
2
		Configuration cfg = new Configuration();
2
		Configuration cfg = new Configuration();
3
		if (namingStrategy!=null) {
3
		if (namingStrategy!=null) {
4
			cfg.setNamingStrategy(
4
			cfg.setNamingStrategy(
5
					(NamingStrategy) ReflectHelper.classForName(namingStrategy).newInstance()
5
					(NamingStrategy) ReflectHelper.classForName(namingStrategy).newInstance()
6
				);
6
				);
7
		}
7
		}
8
		if (configurationFile!=null) {
8
		if (configurationFile!=null) {
9
			cfg.configure( configurationFile );
9
			cfg.configure( configurationFile );
10
		}
10
		}
11
		String[] files = getFiles();
11
		String[] files = getFiles();
12
		for (int i = 0; i < files.length; i++) {
12
		for (int i = 0; i < files.length; i++) {
13
			String filename = files[i];
13
			String filename = files[i];
14
			if ( filename.endsWith(".jar") ) {
14
			if ( filename.endsWith(".jar") ) {
15
				cfg.addJar( new File(filename) );
15
				cfg.addJar( new File(filename) );
16
			}
16
			}
17
			else {
17
			else {
18
				cfg.addFile(filename);
18
				cfg.addFile(filename);
19
			}
19
			}
20
		}
20
		}
21
		return cfg;
21
		return cfg;
22
	
22
	
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)0.0
Clones location
Number of node comparisons0