String[][] columnNames = new String[types.length][];
for ( int i = 0; i < types.length; i++ ) {
int span = types[i].getColumnSpan( f );
columnNames[i] = new String[span];
for ( int j = 0; j < span; j++ ) {
columnNames[i][j] = NameGenerator.scalarName( i, j );
}
}
return columnNames;
String[] result = new String[ x.length + countTrue(use) ];
for ( int i=0; i<x.length; i++ ) result[i] = x[i];
int k = x.length;
for ( int i=0; i<y.length; i++ ) {
if ( use[i] ) result[k++] = y[i];
}
return result;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/NameGenerator.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/ArrayHelper.java
|
Method name: String[][] generateColumnNames(Type[], SessionFactoryImplementor)
|
|
Method name: String[] join(String[], String[], boolean[])
|
Number of AST nodes: 7
|
|
Number of AST nodes: 8
|
|
1 | String[][] columnNames = new String[types.length][];↵ | | 1 | String[] result = new String[ x.length + countTrue(use) ];↵
|
2 | for ( int i = 0; i < types.length; i++ ) {↵ | | 2 | for ( int i=0; i<x.length; i++ ) ↵
|
3 | int span = types[i].getColumnSpan( f );↵ | | |
|
4 | columnNames[i] = new String[span]↵ | | 3 | result[i] = x[i];↵
|
5 | ;↵ | | 4 | int k = x.length;↵
|
6 | for ( int j = 0; j < span; j++ ) {↵ | | 5 | for ( int i=0; i<y.length; i++ ) {↵
|
7 | columnNames[i][j] = NameGenerator.scalarName( i, j );↵ | | 6 | if ( use[i] ) result[k++] = y[i];↵
|
8 | }↵ | | 7 | ↵
|
9 | }↵ | | 8 | }↵
|
10 | return columnNames; | | 9 | return result;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |