public static String infoString(String entityName, Serializable id) {
StringBuffer s = new StringBuffer();
s.append( '[' );
if( entityName == null ) {
s.append( "<null entity name>" );
}
else {
s.append( entityName );
}
s.append( '#' );
if ( id == null ) {
s.append( "<null>" );
}
else {
s.append( id );
}
s.append( ']' );
return s.toString();
public static String collectionInfoString(String role, Serializable id) {
StringBuffer s = new StringBuffer();
s.append( '[' );
if( role == null ) {
s.append( "<unreferenced>" );
}
else {
s.append( role );
s.append( '#' );
if ( id == null ) {
s.append( "<null>" );
}
else {
s.append( id );
}
}
s.append( ']' );
return s.toString();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/pretty/MessageHelper.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/pretty/MessageHelper.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public static String infoString(String entityName, Serializable id) {↵ | | 1 | public static String collectionInfoString(String role, Serializable id) {↵
|
2 | StringBuffer s = new StringBuffer();↵ | | 2 | StringBuffer s = new StringBuffer();↵
|
3 | s.append( '[' );↵ | | 3 | s.append( '[' );↵
|
4 | if( entityName == null ) {↵ | | 4 | if( role == null ) {↵
|
5 | s.append( "<null entity name>" );↵ | | 5 | s.append( "<unreferenced>" );↵
|
6 | }↵ | | 6 | }↵
|
7 | else {↵ | | 7 | else {↵
|
8 | s.append( entityName );↵ | | 8 | s.append( role );↵
|
9 | }↵ | | 9 | ↵
|
10 | s.append( '#' );↵ | | 10 | s.append( '#' );↵
|
|
11 | if ( id == null ) {↵ | | 11 | if ( id == null ) {↵
|
12 | s.append( "<null>" );↵ | | 12 | s.append( "<null>" );↵
|
13 | }↵ | | 13 | }↵
|
14 | else {↵ | | 14 | else {↵
|
15 | s.append( id );↵ | | 15 | s.append( id );↵
|
16 | ↵ | | 16 | }↵
|
17 | }↵ | | 17 | }↵
|
18 | s.append( ']' );↵ | | 18 | s.append( ']' );↵
|
|
19 | return s.toString();↵ | | 19 | return s.toString();↵
|
20 | | | 20 |
|
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 | |
Number of node comparisons | 0 |