c3p.put( c3p0StyleKey, String.valueOf( value ).trim() ); if ( hibp.getProperty( c3p0StyleKey ) != null ) { warnPropertyConflict( hibernateStyleKey, c3p0StyleKey ); } String longC3p0StyleKey = "hibernate." + c3p0StyleKey; if ( hibp.getProperty( longC3p0StyleKey ) != null ) { warnPropertyConflict( hibernateStyleKey, longC3p0StyleKey ); }
if ( rootJoinable != null ) { joinFragment.addCrossJoin( rootJoinable.getTableName(), rootAlias ); String filterCondition = rootJoinable.filterFragment( rootAlias, enabledFilters ); // JoinProcessor needs to know if the where clause fragment came from a dynamic filter or not so it // can put the where clause fragment in the right place in the SQL AST. 'hasFilterCondition' keeps track // of that fact. joinFragment.setHasFilterCondition( joinFragment.addCondition( filterCondition ) ); if (includeExtraJoins) { //TODO: not quite sure about the full implications of this! addExtraJoins( joinFragment, rootAlias, rootJoinable, true ); } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/connection-c3p0/src/main/java/org/hibernate/connection/C3P0ConnectionProvider.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/JoinSequence.java
Method name: void setOverwriteProperty(String, String, Properties, Properties, Integer) Method name: JoinFragment toJoinFragment(Map, boolean, String, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
c3p.put( c3p0StyleKey, String.valueOf( value ).trim() );
2
			if ( hibp.getProperty( c3p0StyleKey ) != null ) {
3
				warnPropertyConflict( hibernateStyleKey, c3p0StyleKey );
4
			}
5
			String longC3p0StyleKey = "hibernate." + c3p0StyleKey;
6
			if ( hibp.getProperty( longC3p0StyleKey ) != null
1
if ( rootJoinable != null ) {
2
			joinFragment.addCrossJoin( rootJoinable.getTableName(), rootAlias );
3
			String filterCondition = rootJoinable.filterFragment( rootAlias, enabledFilters );
4
			// JoinProcessor needs to know if the where clause fragment came from a dynamic filter or not so it
5
			// can put the where clause fragment in the right place in the SQL AST.   'hasFilterCondition' keeps track
6
			// of that fact.
7
 ) {
7
			joinFragment.setHasFilterCondition( joinFragment.addCondition( filterCondition ) );
8
				warnPropertyConflict( hibernateStyleKey, longC3p0StyleKey
8
			if (includeExtraJoins) { //TODO: not quite sure about the full implications of this!
9
 );
9
				addExtraJoins( joinFragment, rootAlias, rootJoinable, true );
10
			}
10
			}
11
		}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons2