DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName()); String result = _dialect.getCreateIndexSQL(customDialog.getIndexName(), _info[0].getSimpleName(), customDialog.getAccessMethod(), customDialog.getIndexColumns(), customDialog.isUniqueSet(), customDialog.getTablespaceText(), customDialog.getConstraints(), qualifier, _sqlPrefs); return new String[] { result };
DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName()); String result = _dialect.getCreateSequenceSQL(customDialog.getSequenceName(), customDialog.getIncrement(), customDialog.getMinimum(), customDialog.getMaximum(), customDialog.getStart(), customDialog.getCache(), customDialog.isCycled(), qualifier, _sqlPrefs); return new String[] { result };
Clone fragments detected by clone detection tool
File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/AddIndexCommand.java File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/AddSequenceCommand.java
Method name: String[] generateSQLStatements() Method name: String[] generateSQLStatements()
Number of AST nodes: 3 Number of AST nodes: 3
1
DatabaseObjectQualifier qualifier =
1
DatabaseObjectQualifier qualifier =
2
			new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName());
2
			new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName());
3
		String result =
3
		String result =
4
			_dialect.getCreateIndexSQL(customDialog.getIndexName(),
4
			_dialect.getCreateSequenceSQL(customDialog.getSequenceName(),
5
				_info[0].getSimpleName(),
5
				customDialog.getIncrement(),
6
				customDialog.getAccessMethod(),
6
				customDialog.getMinimum(),
7
				customDialog.getIndexColumns(),
7
				customDialog.getMaximum(),
8
				customDialog.isUniqueSet(),
8
				customDialog.getStart(),
9
				customDialog.getTablespaceText(),
9
				customDialog.getCache(),
10
				customDialog.getConstraints(),
10
				customDialog.isCycled(),
11
				qualifier,
11
				qualifier,
12
				_sqlPrefs);
12
				_sqlPrefs);
13
		return new String[] { result };
13
		return new String[] { result };
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName());
    1
    DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName());
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    2
    String result = _dialect.getCreateSequenceSQL(customDialog.getSequenceName(), customDialog.getIncrement(), customDialog.getMinimum(), customDialog.getMaximum(), customDialog.getStart(), customDialog.getCache(), customDialog.isCycled(), qualifier, _sqlPrefs);
    Preondition Violations
    Unmatched statement String result=_dialect.getCreateSequenceSQL(customDialog.getSequenceName(),customDialog.getIncrement(),customDialog.getMinimum(),customDialog.getMaximum(),customDialog.getStart(),customDialog.getCache(),customDialog.isCycled(),qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    String result = _dialect.getCreateSequenceSQL(customDialog.getSequenceName(), customDialog.getIncrement(), customDialog.getMinimum(), customDialog.getMaximum(), customDialog.getStart(), customDialog.getCache(), customDialog.isCycled(), qualifier, _sqlPrefs);
    2
    String result = _dialect.getCreateIndexSQL(customDialog.getIndexName(), _info[0].getSimpleName(), customDialog.getAccessMethod(), customDialog.getIndexColumns(), customDialog.isUniqueSet(), customDialog.getTablespaceText(), customDialog.getConstraints(), qualifier, _sqlPrefs);
    2
    String result = _dialect.getCreateIndexSQL(customDialog.getIndexName(), _info[0].getSimpleName(), customDialog.getAccessMethod(), customDialog.getIndexColumns(), customDialog.isUniqueSet(), customDialog.getTablespaceText(), customDialog.getConstraints(), qualifier, _sqlPrefs);
    Preondition Violations
    Unmatched statement String result=_dialect.getCreateIndexSQL(customDialog.getIndexName(),_info[0].getSimpleName(),customDialog.getAccessMethod(),customDialog.getIndexColumns(),customDialog.isUniqueSet(),customDialog.getTablespaceText(),customDialog.getConstraints(),qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    3
    return new String[] {result};
    3
    return new String[] {result};
    Precondition Violations (2)
    Row Violation
    1Unmatched statement String result=_dialect.getCreateSequenceSQL(customDialog.getSequenceName(),customDialog.getIncrement(),customDialog.getMinimum(),customDialog.getMaximum(),customDialog.getStart(),customDialog.getCache(),customDialog.isCycled(),qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement String result=_dialect.getCreateIndexSQL(customDialog.getIndexName(),_info[0].getSimpleName(),customDialog.getAccessMethod(),customDialog.getIndexColumns(),customDialog.isUniqueSet(),customDialog.getTablespaceText(),customDialog.getConstraints(),qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted