Buggy code:
public SchemaTool ( JDBCConfiguration conf ) { } public SchemaTool ( JDBCConfiguration conf , String action ) { } public String getAction ( ) { } public boolean getIgnoreErrors ( ) { } public void setIgnoreErrors ( boolean ignoreErrs ) { } public boolean getOpenJPATables ( ) { } public void setOpenJPATables ( boolean openjpaTables ) { } public boolean getDropTables ( ) { } public void setDropTables ( boolean dropTables ) { } public boolean getDropSequences ( ) { } public void setDropSequences ( boolean dropSeqs ) { } public boolean getSequences ( ) { } public void setSequences ( boolean seqs ) { } public boolean getIndexes ( ) { } public void setIndexes ( boolean indexes ) { } public boolean getForeignKeys ( ) { } public void setForeignKeys ( boolean fks ) { } public boolean getPrimaryKeys ( ) { } public void setPrimaryKeys ( boolean pks ) { } public Writer getWriter ( ) { } public void setWriter ( Writer writer ) { } public SchemaGroup getSchemaGroup ( ) { } public void setSchemaGroup ( SchemaGroup group ) { } public void run ( ) throws SQLException { } void add ( ) throws SQLException { } void drop ( ) throws SQLException { } void retain ( ) throws SQLException { } void refresh ( ) throws SQLException { } void createDB ( ) throws SQLException { } void build ( ) throws SQLException { } void dropDB ( ) throws SQLException { } public void record ( ) { } private void add ( SchemaGroup db , SchemaGroup repos ) throws SQLException { } private void retain ( SchemaGroup db , SchemaGroup repos , boolean tables , boolean sequences ) throws SQLException { } private void drop ( SchemaGroup db , SchemaGroup repos ) throws SQLException { } private boolean isDroppable ( Table table ) { } private boolean isDroppable ( Sequence seq ) { } private Index findIndex ( Table dbTable , Index idx ) { } private ForeignKey findForeignKey ( Table dbTable , ForeignKey fk ) { } private void dropTables ( Collection tables , SchemaGroup change ) throws SQLException { } public boolean createTable ( Table table ) throws SQLException { } public boolean dropTable ( Table table ) throws SQLException { } public boolean createSequence ( Sequence seq ) throws SQLException { } public boolean dropSequence ( Sequence seq ) throws SQLException { } public boolean createIndex ( Index idx , Table table ) throws SQLException { } public boolean dropIndex ( Index idx ) throws SQLException { } public boolean addColumn ( Column col ) throws SQLException { } public boolean dropColumn ( Column col ) throws SQLException { } public boolean addPrimaryKey ( PrimaryKey pk ) throws SQLException { } public boolean dropPrimaryKey ( PrimaryKey pk ) throws SQLException { } public boolean addForeignKey ( ForeignKey fk ) throws SQLException { } public boolean dropForeignKey ( ForeignKey fk ) throws SQLException { } public SchemaGroup getDBSchemaGroup ( ) { } public void setDBSchemaGroup ( SchemaGroup db ) { } private SchemaGroup getDBSchemaGroup ( boolean full ) throws SQLException { } private SchemaGroup assertSchemaGroup ( ) { } private boolean executeSQL ( String [ ] sql ) throws SQLException { } private void handleException ( SQLException sql ) throws SQLException { } public static void main ( String [ ] args ) throws IOException , SQLException { } public static boolean run ( JDBCConfiguration conf , String [ ] args , Options opts ) throws IOException , SQLException { if ( ( opts . containsKey ( "help" ) ) || ( opts . containsKey ( "-help" ) ) ) return false ; SchemaTool . Flags flags = new SchemaTool . Flags ( ) ; flags . dropTables = opts . removeBooleanProperty ( "dropTables" , "dt" , flags . dropTables ) ; flags . dropSequences = opts . removeBooleanProperty ( "dropSequences" , "dsq" , flags . dropSequences ) ; flags . ignoreErrors = opts . removeBooleanProperty ( "ignoreErrors" , "i" , flags . ignoreErrors ) ; <START_BUG> flags . openjpaTables = opts . removeBooleanProperty ( "openjpaTables" , "kt" , flags . openjpaTables ) ; <END_BUG> flags . primaryKeys = opts . removeBooleanProperty ( "primaryKeys" , "pk" , flags . primaryKeys ) ; flags . foreignKeys = opts . removeBooleanProperty ( "foreignKeys" , "fks" , flags . foreignKeys ) ; flags . indexes = opts . removeBooleanProperty ( "indexes" , "ix" , flags . indexes ) ; flags . sequences = opts . removeBooleanProperty ( "sequences" , "sq" , flags . sequences ) ; flags . record = opts . removeBooleanProperty ( "record" , "r" , flags . record ) ; flags . action = opts . removeProperty ( "action" , "a" , flags . action ) ; String fileName = opts . removeProperty ( "file" , "f" , null ) ; String schemas = opts . removeProperty ( "s" ) ; if ( schemas != null ) opts . setProperty ( "schemas" , schemas ) ; Configurations . populateConfiguration ( conf , opts ) ; ClassLoader loader = conf . getClassResolverInstance ( ) . getClassLoader ( SchemaTool . class , null ) ; flags . writer = Files . getWriter ( fileName , loader ) ; return SchemaTool . run ( conf , args , flags , loader ) ; } public static boolean run ( JDBCConfiguration conf , String [ ] args , SchemaTool . Flags flags , ClassLoader loader ) throws IOException , SQLException { } public static class Flags { public String action = SchemaTool . ACTION_ADD ; public Writer writer = null ; public boolean dropTables = true ; public boolean dropSequences = true ; public boolean ignoreErrors = false ; public boolean openjpaTables = false ; public boolean primaryKeys = true ; public boolean foreignKeys = true ; public boolean indexes = true ; public boolean sequences = true ; public boolean record = true ; } }

Fix:
flags . openjpaTables = opts . removeBooleanProperty ( "openjpaTables" , "ot" , flags . openjpaTables ) ;