if ( !quotedIdentifier && ( dialect.openQuote()==token.charAt(0) ) ) { isOpenQuote = true; quotedIdentifier = true; isQuoteCharacter = true; } else if ( quotedIdentifier && ( dialect.closeQuote()==token.charAt(0) ) ) { quotedIdentifier = false; isQuoteCharacter = true; isOpenQuote = false; } else { isOpenQuote = false; }
if ( !quotedIdentifier && ( dialect.openQuote()==token.charAt(0) ) ) { isOpenQuote = true; quotedIdentifier = true; isQuoteCharacter = true; } else if ( quotedIdentifier && ( dialect.closeQuote()==token.charAt(0) ) ) { quotedIdentifier = false; isQuoteCharacter = true; isOpenQuote = false; } else { isOpenQuote = false; }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/sql/Template.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/sql/Template.java
Method name: String renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry) Method name: String renderOrderByStringTemplate(String, Dialect, SQLFunctionRegistry)
Number of AST nodes: 9 Number of AST nodes: 9
1
if ( !quotedIdentifier && ( dialect.openQuote()==token.charAt(0) ) ) {
1
if ( !quotedIdentifier && ( dialect.openQuote()==token.charAt(0) ) ) {
2
					isOpenQuote = true;
2
					isOpenQuote = true;
3
					quotedIdentifier = true;	
3
					quotedIdentifier = true;	
4
					isQuoteCharacter = true;
4
					isQuoteCharacter = true;
5
				}
5
				}
6
				else if ( quotedIdentifier && ( dialect.closeQuote()==token.charAt(0) ) ) {
6
				else if ( quotedIdentifier && ( dialect.closeQuote()==token.charAt(0) ) ) {
7
					quotedIdentifier = false;
7
					quotedIdentifier = false;
8
					isQuoteCharacter = true;
8
					isQuoteCharacter = true;
9
					isOpenQuote = false;
9
					isOpenQuote = false;
10
				}
10
				}
11
				else {
11
				else {
12
					isOpenQuote = false;
12
					isOpenQuote = false;
13
				}
13
				}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.8
Clones locationClones are declared in the same class
Number of node comparisons64
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.1
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    27
    else if (!quotedIdentifier && (dialect.openQuote() == token.charAt(0)))
    24
    else if (!quotedIdentifier && (dialect.openQuote() == token.charAt(0)))
    28
    isOpenQuote = true;
    25
    isOpenQuote = true;
    29
    quotedIdentifier = true;
    26
    quotedIdentifier = true;
    30
    isQuoteCharacter = true;
    27
    isQuoteCharacter = true;
    31
    else if (quotedIdentifier && (dialect.closeQuote() == token.charAt(0)))
    28
    else if (quotedIdentifier && (dialect.closeQuote() == token.charAt(0)))
    32
    quotedIdentifier = false;
    29
    quotedIdentifier = false;
    33
    isQuoteCharacter = true;
    30
    isQuoteCharacter = true;
    34
    isOpenQuote = false;
    31
    isOpenQuote = false;
    else
    else
    35
    isOpenQuote = false;
    32
    isOpenQuote = false;
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables quotedIdentifier, isOpenQuote, isQuoteCharacter , while Clone fragment #2 returns variables quotedIdentifier, isOpenQuote, isQuoteCharacter