Buggy code:
protected String matchAggregateFunction ( FeatureVisitor visitor ) { } protected AttributeDescriptor extractAggregateAttribute ( FeatureVisitor visitor , SimpleFeatureType featureType ) { } protected List < AttributeDescriptor > extractGroupByAttributes ( FeatureVisitor visitor , SimpleFeatureType featureType ) { } protected GroupByRawResult extractValuesFromResultSet ( ResultSet resultSet , int numberOfGroupByAttributes ) throws SQLException { } Expression getExpression ( FeatureVisitor visitor ) { } boolean setResult ( FeatureVisitor visitor , Object result ) { } protected void insert ( SimpleFeature feature , SimpleFeatureType featureType , Connection cx ) throws IOException { } protected void insert ( Collection < ? extends SimpleFeature > features , SimpleFeatureType featureType , Connection cx ) throws IOException { } private void insertPS ( Collection < SimpleFeature > features , InsertionClassifier kind , SimpleFeatureType featureType , Connection cx , PrimaryKey key ) throws IOException , SQLException { } static void checkAllInserted ( int [ ] inserts , int size ) throws IOException { } private String buildInsertPS ( InsertionClassifier kind , SimpleFeatureType featureType , KeysFetcher keysFetcher , PreparedStatementSQLDialect dialect ) throws SQLException { } private void insertNonPS ( Collection < ? extends SimpleFeature > features , SimpleFeatureType featureType , Connection cx , PrimaryKey key , boolean useExisting ) throws IOException , SQLException { } protected void update ( SimpleFeatureType featureType , List < AttributeDescriptor > attributes , List < Object > values , Filter filter , Connection cx ) throws IOException , SQLException { } protected void update ( SimpleFeatureType featureType , AttributeDescriptor [ ] attributes , Object [ ] values , Filter filter , Connection cx ) throws IOException , SQLException { } protected void delete ( SimpleFeatureType featureType , String fid , Connection cx ) throws IOException { } protected void delete ( SimpleFeatureType featureType , Filter filter , Connection cx ) throws IOException { } public Connection getConnection ( Transaction t ) throws IOException { } protected final Connection getConnection ( JDBCState state ) throws IOException { } protected final Connection createConnection ( ) { } protected final void releaseConnection ( Connection cx , JDBCState state ) { } protected String encodeFID ( PrimaryKey pkey , ResultSet rs ) throws IOException , SQLException { } protected String encodeFID ( PrimaryKey pkey , ResultSet rs , int offset ) throws IOException , SQLException { } protected static String encodeFID ( List < Object > keyValues ) { } protected static List < Object > decodeFID ( PrimaryKey key , String FID , boolean strict ) { } protected boolean isGenerated ( PrimaryKey pkey ) { } protected String createTableSQL ( SimpleFeatureType featureType , Connection cx ) throws Exception { } protected String findPrimaryKeyColumnName ( SimpleFeatureType featureType ) { } protected String dropTableSQL ( SimpleFeatureType featureType , Connection cx ) throws Exception { } protected void ensureAuthorization ( SimpleFeatureType featureType , Filter filter , Transaction tx , Connection cx ) throws IOException , SQLException { } private Set < FeatureId > getLockedIds ( Map locks ) { } protected void ensureAssociationTablesExist ( Connection cx ) throws IOException , SQLException { } protected String createRelationshipTableSQL ( Connection cx ) throws SQLException { } protected String createAssociationTableSQL ( Connection cx ) throws SQLException { } protected String createGeometryTableSQL ( Connection cx ) throws SQLException { } protected String createMultiGeometryTableSQL ( Connection cx ) throws SQLException { } protected String selectRelationshipSQL ( String table , String column ) throws SQLException { } protected PreparedStatement selectRelationshipSQLPS ( String table , String column , Connection cx ) throws SQLException { } protected String selectAssociationSQL ( String fid ) throws SQLException { } protected PreparedStatement selectAssociationSQLPS ( String fid , Connection cx ) throws SQLException { } protected String selectGeometrySQL ( String gid ) throws SQLException { } protected PreparedStatement selectGeometrySQLPS ( String gid , Connection cx ) throws SQLException { } protected String selectMultiGeometrySQL ( String gid ) throws SQLException { } protected PreparedStatement selectMultiGeometrySQLPS ( String gid , Connection cx ) throws SQLException { } protected String createGeometryAssociationTableSQL ( Connection cx ) throws SQLException { } protected String selectGeometryAssociationSQL ( String fid , String gid , String gname ) throws SQLException { } protected PreparedStatement selectGeometryAssociationSQLPS ( String fid , String gid , String gname , Connection cx ) throws SQLException { } private String createTableSQL ( String tableName , String [ ] columnNames , String [ ] sqlTypeNames , boolean [ ] nillable , String pkeyColumn , SimpleFeatureType featureType ) throws SQLException { StringBuffer sql = new StringBuffer ( ) ; <START_BUG> encodeCreateTable ( sql ) ; <END_BUG> encodeTableName ( tableName , sql , null ) ; sql . append ( "<seq2seq4repair_space>(<seq2seq4repair_space>" ) ; if ( pkeyColumn != null ) { dialect . encodePrimaryKey ( pkeyColumn , sql ) ; sql . append ( ",<seq2seq4repair_space>" ) ; } for ( int i = 0 ; i < ( columnNames . length ) ; i ++ ) { dialect . encodeColumnName ( columnNames [ i ] , sql ) ; sql . append ( "<seq2seq4repair_space>" ) ; int length = - 1 ; if ( sqlTypeNames [ i ] . toUpperCase ( ) . startsWith ( "VARCHAR" ) ) { if ( featureType != null ) { AttributeDescriptor att = featureType . getDescriptor ( columnNames [ i ] ) ; length = findVarcharColumnLength ( att ) ; } } if ( length == ( - 1 ) ) { dialect . encodeColumnType ( sqlTypeNames [ i ] , sql ) ; } else { dialect . encodeColumnType ( ( ( ( ( sqlTypeNames [ i ] ) + "(" ) + length ) + ")" ) , sql ) ; } if ( ( nillable != null ) && ( ! ( nillable [ i ] ) ) ) { sql . append ( "<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL<seq2seq4repair_space>" ) ; } if ( featureType != null ) { AttributeDescriptor att = featureType . getDescriptor ( columnNames [ i ] ) ; dialect . encodePostColumnCreateTable ( att , sql ) ; }

Fix:
dialect . encodeCreateTable ( sql ) ;