File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExportTask.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateTask.java | |||
Method name: String[] getFiles()
|
Method name: String[] getFiles()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | for ( Iterator i = fileSets.iterator(); i.hasNext(); ) {↵ | 1 | for ( Iterator i = fileSets.iterator(); i.hasNext(); ) {↵ | |
2 | FileSet fs = (FileSet) i.next();↵ | 2 | FileSet fs = (FileSet) i.next();↵ | |
3 | DirectoryScanner ds = fs.getDirectoryScanner( getProject() );↵ | 3 | DirectoryScanner ds = fs.getDirectoryScanner( getProject() );↵ | |
4 | String[] dsFiles = ds.getIncludedFiles();↵ | 4 | String[] dsFiles = ds.getIncludedFiles();↵ | |
5 | for (int j = 0; j < dsFiles.length; j++) {↵ | 5 | for (int j = 0; j < dsFiles.length; j++) {↵ | |
6 | File f = new File(dsFiles[j]);↵ | 6 | File f = new File(dsFiles[j]);↵ | |
7 | if ( !f.isFile() ) {↵ | 7 | if ( !f.isFile() ) {↵ | |
8 | f = new File( ds.getBasedir(), dsFiles[j] );↵ | 8 | f = new File( ds.getBasedir(), dsFiles[j] );↵ | |
9 | }↵ | 9 | }↵ | |
10 | files.add( f.getAbsolutePath() );↵ | 10 | files.add( f.getAbsolutePath() );↵ | |
11 | }↵ | 11 | }↵ | |
12 | } | 12 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 30 |
Number of mapped statements | 9 |
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) | 1.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | for (Iterator i = fileSets.iterator(); i.hasNext(); ) | 2 | for (Iterator i = fileSets.iterator(); i.hasNext(); ) | |
3 | FileSet fs = (FileSet)i.next(); | 3 | FileSet fs = (FileSet)i.next(); | |
4 | DirectoryScanner ds = fs.getDirectoryScanner(getProject()); | 4 | DirectoryScanner ds = fs.getDirectoryScanner(getProject()); | |
5 | String[] dsFiles = ds.getIncludedFiles(); | 5 | String[] dsFiles = ds.getIncludedFiles(); | |
6 | for (int j = 0; j < dsFiles.length; j++) | 6 | for (int j = 0; j < dsFiles.length; j++) | |
7 | File f = new File(dsFiles[j]); | 7 | File f = new File(dsFiles[j]); | |
8 | if (!f.isFile()) | 8 | if (!f.isFile()) | |
9 | f = new File(ds.getBasedir(), dsFiles[j]); | 9 | f = new File(ds.getBasedir(), dsFiles[j]); | |
10 | files.add(f.getAbsolutePath()); | 10 | files.add(f.getAbsolutePath()); |
Row | Violation |
---|