Buggy code:
public , Select sel , int idx ) { } public boolean supportsLocking ( Select sel ) { } public boolean supportsRandomAccessResultSet ( Select sel , boolean forUpdate ) { } public void assertSupport ( boolean feature , String property ) { } public void substring ( SQLBuffer buf , FilterValue str , FilterValue start , FilterValue end ) { } long toLong ( FilterValue litValue ) { } public void indexOf ( SQLBuffer buf , FilterValue str , FilterValue find , FilterValue start ) { } public void mathFunction ( SQLBuffer buf , String op , FilterValue lhs , FilterValue rhs ) { } public void comparison ( SQLBuffer buf , String op , FilterValue lhs , FilterValue rhs ) { } public void appendXmlComparison ( SQLBuffer buf , String op , FilterValue lhs , FilterValue rhs , boolean lhsxml , boolean rhsxml ) { } protected void appendNumericCast ( SQLBuffer buf , FilterValue val ) { } public void appendCast ( SQLBuffer buf , Object val , int type ) { } protected void appendLength ( SQLBuffer buf , int type ) { } public String addCastAsType ( String func , Val val ) { } public void refSchemaComponents ( Table table ) { } public String getFullName ( Table table , boolean logical ) { } public String getFullName ( Index index ) { } public String getFullName ( Sequence seq ) { } public String getValidTableName ( String name , Schema schema ) { } public String getValidSequenceName ( String name , Schema schema ) { } public String getValidColumnName ( String name , Table table ) { } public String getValidColumnName ( String name , Table table , boolean checkForUniqueness ) { } public String getValidPrimaryKeyName ( String name , Table table ) { } public String getValidForeignKeyName ( String name , Table table , Table toTable ) { } public String getValidIndexName ( String name , Table table ) { } public String getValidUniqueName ( String name , Table table ) { } protected static String shorten ( String name , int targetLength ) { } private static boolean stripVowel ( StringBuffer name ) { } protected String makeNameValid ( String name , NameSet set , int maxLen , int nameType ) { } protected String makeNameValid ( String name , NameSet set , int maxLen , int nameType , boolean checkForUniqueness ) { } public String [ ] getCreateTableSQL ( Table table ) { } protected StringBuffer comment ( StringBuffer buf , String comment ) { } public String [ ] getDropTableSQL ( Table table ) { } public String [ ] getCreateSequenceSQL ( Sequence seq ) { } public String [ ] getDropSequenceSQL ( Sequence seq ) { } public String [ ] getCreateIndexSQL ( Index index ) { } public String [ ] getDropIndexSQL ( Index index ) { } public String [ ] getAddColumnSQL ( Column column ) { } public String [ ] getDropColumnSQL ( Column column ) { } public String [ ] getAddPrimaryKeySQL ( PrimaryKey pk ) { } public String [ ] getDropPrimaryKeySQL ( PrimaryKey pk ) { } public String [ ] getAddForeignKeySQL ( ForeignKey fk ) { } public String [ ] getDropForeignKeySQL ( ForeignKey fk ) { } protected String getDeclareColumnSQL ( Column col , boolean alter ) { } protected String getPrimaryKeyConstraintSQL ( PrimaryKey pk ) { } protected String getForeignKeyConstraintSQL ( ForeignKey fk ) { } protected boolean supportsDeferredForeignKeyConstraints ( ) { } private String getActionName ( int action ) { } public boolean supportsDeleteAction ( int action ) { } public boolean supportsUpdateAction ( int action ) { } protected String getUniqueConstraintSQL ( Unique unq ) { } protected boolean supportsDeferredUniqueConstraints ( ) { } public boolean isSystemTable ( String name , String schema , boolean targetSchema ) { } public boolean isSystemIndex ( String name , Table table ) { } public boolean isSystemSequence ( String name , String schema , boolean targetSchema ) { } public Table [ ] getTables ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , Connection conn ) throws SQLException { } protected Table newTable ( ResultSet tableMeta ) throws SQLException { } public Sequence [ ] getSequences ( DatabaseMetaData meta , String catalog , String schemaName , String sequenceName , Connection conn ) throws SQLException { } protected Sequence newSequence ( ResultSet sequenceMeta ) throws SQLException { } protected String getSequencesSQL ( String schemaName , String sequenceName ) { } public Column [ ] getColumns ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , String columnName , Connection conn ) throws SQLException { } protected Column newColumn ( ResultSet colMeta ) throws SQLException { } public PrimaryKey [ ] getPrimaryKeys ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , Connection conn ) throws SQLException { } protected PrimaryKey [ ] getPrimaryKeysFromGetPrimaryKeys ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , Connection conn ) throws SQLException { } protected PrimaryKey newPrimaryKey ( ResultSet pkMeta ) throws SQLException { } protected PrimaryKey [ ] getPrimaryKeysFromBestRowIdentifier ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , Connection conn ) throws SQLException { } public Index [ ] getIndexInfo ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , boolean unique , boolean approx , Connection conn ) throws SQLException { } protected Index newIndex ( ResultSet idxMeta ) throws SQLException { } public ForeignKey [ ] getImportedKeys ( DatabaseMetaData meta , String catalog , String schemaName , String tableName , Connection conn ) throws SQLException { } protected ForeignKey newForeignKey ( ResultSet fkMeta ) throws SQLException { } protected String getTableNameForMetadata ( String tableName ) { } protected String getSchemaNameForMetadata ( String schemaName ) { } protected String getCatalogNameForMetadata ( String catalogName ) { } protected String getColumnNameForMetadata ( String columnName ) { } protected String convertSchemaCase ( String objectName ) { } public String getSchemaCase ( ) { } private void beforeMetadataOperation ( Connection c ) { } public Object getGeneratedKey ( Column col , Connection conn ) throws SQLException { } protected String getGeneratedKeySequenceName ( Column col ) { } public void setConfiguration ( Configuration conf ) { } private boolean isSupported ( ) { } public void startConfiguration ( ) { } public void endConfiguration ( ) { } public void addErrorCode ( int errorType , String errorCode ) { } public Connection decorate ( Connection conn ) throws SQLException { } public void handleWarning ( SQLWarning warning ) throws SQLException { } public OpenJPAException newStoreException ( String msg , SQLException [ ] causes , Object failed ) { } OpenJPAException narrow ( String msg , SQLException ex ) { Boolean recoverable = null ; int errorType = StoreException . GENERAL ; for ( Integer type : sqlStateCodes . keySet ( ) ) { Set < String > errorStates = sqlStateCodes . get ( type ) ; if ( errorStates != null ) { recoverable = matchErrorState ( type , errorStates , ex ) ; if ( recoverable != null ) { errorType = type ; break ; } } } StoreException storeEx ; switch ( errorType ) { case StoreException . LOCK : storeEx = new LockException ( msg ) ; break ; case StoreException . OBJECT_EXISTS : storeEx = new ObjectExistsException ( msg ) ; break ; case StoreException . OBJECT_NOT_FOUND : storeEx = new ObjectNotFoundException ( msg ) ; break ; case StoreException . OPTIMISTIC : storeEx = new OptimisticException ( msg ) ; break ; case StoreException . REFERENTIAL_INTEGRITY : storeEx = new ReferentialIntegrityException ( msg ) ; break ; default : storeEx = new StoreException ( msg ) ; } if ( recoverable != null ) { <START_BUG> storeEx . setRecoverable ( recoverable ) ; <END_BUG>

Fix:
storeEx . setFatal ( ( ! recoverable ) ) ;