File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/AbstractStatement.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/any/ComplexPropertyValue.java | |||
Method name: String getDisplayText()
|
Method name: String keyString()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | /** | 1 | private String keyString() { | |
2 | * Returns additional display text for the AST node. | 2 | StringBuffer buff = new StringBuffer(); | |
3 | * | 3 | Iterator itr = subProperties.keySet().iterator(); | |
4 | * @return String - The additional display text. | 4 | while ( itr.hasNext() ) { | |
5 | */ | 5 | buff.append( itr.next() ); | |
6 | public String getDisplayText() { | 6 | if ( itr.hasNext() ) { | |
7 | StringBuffer buf = new StringBuffer(); | 7 | buff.append( ", " ); | |
8 | if ( getWalker().getQuerySpaces().size() > 0 ) { | 8 | } | |
9 | buf.append( " querySpaces (" ); | 9 | } | |
10 | for ( Iterator iterator = getWalker().getQuerySpaces().iterator(); iterator.hasNext(); ) { | 10 | return buff.toString(); | |
11 | buf.append( iterator.next() ); | 11 | } | |
12 | if ( iterator.hasNext() ) { | |||
13 | buf.append( "," ); | |||
14 | } | |||
15 | } | |||
16 | buf.append( ")" ); | |||
17 | } | |||
18 | return buf.toString(); | |||
19 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 5 |
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) | 0.0 |
Similarity Score | 1.000 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | for (Iterator iterator = getWalker().getQuerySpaces().iterator(); iterator.hasNext(); ) |
| 3 | while (itr.hasNext()) | ||||||||||||||||
5 | buf.append(iterator.next()); |
| 4 | buff.append(itr.next()); | ||||||||||||||||
6 | if (iterator.hasNext()) |
| 5 | if (itr.hasNext()) | ||||||||||||||||
7 | buf.append(","); |
| 6 | buff.append(", "); |
Row | Violation |
---|