File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Component.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Component.java | |||
Method name: boolean[] getColumnInsertability()
|
Method name: boolean[] getColumnUpdateability()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | boolean[] result = new boolean[ getColumnSpan() ];↵ | 1 | boolean[] result = new boolean[ getColumnSpan() ];↵ | |
2 | Iterator iter = getPropertyIterator();↵ | 2 | Iterator iter = getPropertyIterator();↵ | |
3 | int i=0;↵ | 3 | int i=0;↵ | |
4 | while ( iter.hasNext() ) {↵ | 4 | while ( iter.hasNext() ) {↵ | |
5 | Property prop = (Property) iter.next();↵ | 5 | Property prop = (Property) iter.next();↵ | |
6 | boolean[] chunk = prop.getValue().getColumnInsertability();↵ | 6 | boolean[] chunk = prop.getValue().getColumnUpdateability();↵ | |
7 | if ( prop.isInsertable() ) {↵ | 7 | if ( prop.isUpdateable() ) {↵ | |
8 | System.arraycopy(chunk, 0, result, i, chunk.length);↵ | 8 | System.arraycopy(chunk, 0, result, i, chunk.length);↵ | |
9 | }↵ | 9 | }↵ | |
10 | i+=chunk.length;↵ | 10 | i+=chunk.length;↵ | |
11 | }↵ | 11 | }↵ | |
12 | return result; | 12 |
| |
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 | 36 |
Number of mapped statements | 10 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | boolean[] result = new boolean[getColumnSpan()]; | 1 | boolean[] result = new boolean[getColumnSpan()]; | |||||||||||||
2 | Iterator iter = getPropertyIterator(); | 2 | Iterator iter = getPropertyIterator(); | |||||||||||||
3 | int i = 0; | 3 | int i = 0; | |||||||||||||
4 | while (iter.hasNext()) | 4 | while (iter.hasNext()) | |||||||||||||
5 | Property prop = (Property)iter.next(); | 5 | Property prop = (Property)iter.next(); | |||||||||||||
6 | boolean[] chunk = prop.getValue().getColumnInsertability(); |
| 6 | boolean[] chunk = prop.getValue().getColumnUpdateability(); | ||||||||||||
7 | if (prop.isInsertable()) |
| 7 | if (prop.isUpdateable()) | ||||||||||||
8 | System.arraycopy(chunk, 0, result, i, chunk.length); | 8 | System.arraycopy(chunk, 0, result, i, chunk.length); | |||||||||||||
9 | i += chunk.length; | 9 | i += chunk.length; | |||||||||||||
10 | return result; | 10 | return result; |
Row | Violation |
---|---|
1 | Expression prop.getValue().getColumnInsertability() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression prop.getValue().getColumnUpdateability() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression prop.isInsertable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression prop.isUpdateable() cannot be parameterized, because it has dependencies to/from statements that will be extracted |