File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/StringHelper.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/StringHelper.java | |||
Method name: String[] suffix(String[], String)
|
Method name: String[] qualify(String, String[])
|
|||
Number of AST nodes: 6 | Number of AST nodes: 7 | |||
1 | if ( suffix == null ) return columns↵ | 1 | if ( prefix == null ) return names;↵ | |
2 | ;↵ | 2 | int len = names.length;↵ | |
3 | String[] qualified = new String[columns.length];↵ | 3 | String[] qualified = new String[len];↵ | |
4 | for ( int i = 0; i < columns.length; i++ ) {↵ | 4 | for ( int i = 0; i < len; i++ ) {↵ | |
5 | qualified[i] = suffix( columns[i], suffix );↵ | 5 | qualified[i] = qualify( prefix, names[i] );↵ | |
6 | }↵ | 6 | }↵ | |
7 | return qualified; | 7 |
| |
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) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 19 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (suffix == null) |
| 1 | if (prefix == null) | ||||||||||||||||||||
2 | return columns; |
| 2 | return names; | ||||||||||||||||||||
| 3 | int len = names.length; | ||||||||||||||||||||||
3 | String[] qualified = new String[columns.length]; |
| 4 | String[] qualified = new String[len]; | ||||||||||||||||||||
4 | for (int i = 0; i < columns.length; i++) |
| 5 | for (int i = 0; i < len; i++) | ||||||||||||||||||||
5 | qualified[i] = suffix(columns[i], suffix); |
| 6 | qualified[i] = qualify(prefix, names[i]); | ||||||||||||||||||||
6 | return qualified; | 7 | return qualified; |
Row | Violation |
---|---|
1 | Expression suffix(columns[i],suffix) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression qualify(prefix,names[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression columns[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression names[i] cannot be parameterized, because it has dependencies to/from statements that will be extracted |