Buggy code:
public boolean getSyncWithManagedTransactions ( ) { } public void setSyncWithManagedTransactions ( boolean sync ) { } public boolean getEvictFromDataCache ( ) { } public void setEvictFromDataCache ( boolean evict ) { } public boolean getPopulateDataCache ( ) { } public void setPopulateDataCache ( boolean cache ) { } public boolean isTrackChangesByType ( ) { } public void setTrackChangesByType ( boolean largeTransaction ) { } public Object getUserObject ( Object key ) { } public Object putUserObject ( Object key , Object val ) { } public Map < String , Object > getProperties ( ) { } public Set < String > getSupportedProperties ( ) { } public void addLifecycleListener ( Object listener , Class [ ] classes ) { } public void removeLifecycleListener ( Object listener ) { } public int getLifecycleListenerCallbackMode ( ) { } public void setLifecycleListenerCallbackMode ( int mode ) { } public LifecycleEventManager getLifecycleEventManager ( ) { } boolean fireLifecycleEvent ( Object src , Object related , ClassMetaData meta , int eventType ) { } private void handleCallbackExceptions ( Exception [ ] exceps , int mode ) { } public void addTransactionListener ( Object tl ) { } public void removeTransactionListener ( Object tl ) { } public Collection < Object > getTransactionListeners ( ) { } public int getTransactionListenerCallbackMode ( ) { } public void setTransactionListenerCallbackMode ( int mode ) { } private void fireTransactionEvent ( TransactionEvent trans ) { } public void setSuppressBatchOLELogging ( boolean b ) { } public boolean getSuppressBatchOLELogging ( ) { } public Object find ( Object oid , boolean validate , FindCallbacks call ) { } public Object find ( Object oid , FetchConfiguration fetch , BitSet exclude , Object edata , int flags ) { } protected Object find ( Object oid , FetchConfiguration fetch , BitSet exclude , Object edata , int flags , FindCallbacks call ) { } protected StateManagerImpl initialize ( StateManagerImpl sm , boolean load , FetchConfiguration fetch , Object edata ) { } public Object [ ] findAll ( Collection oids , boolean validate , FindCallbacks call ) { } public Object [ ] findAll ( Collection oids , FetchConfiguration fetch , BitSet exclude , Object edata , int flags ) { } protected Object [ ] findAll ( Collection oids , FetchConfiguration fetch , BitSet exclude , Object edata , int flags , FindCallbacks call ) { } private boolean hasFlushed ( ) { } private boolean requiresLoad ( OpenJPAStateManager sm , boolean initialized , FetchConfiguration fetch , Object edata , int flags ) { } private boolean useTransactionalState ( FetchConfiguration fetch ) { } public Object findCached ( Object oid , FindCallbacks call ) { } public Class < ? > getObjectIdType ( Class < ? > cls ) { } public Object newObjectId ( Class < ? > cls , Object val ) { } private StateManagerImpl newStateManagerImpl ( Object oid , boolean copy ) { } protected StateManagerImpl newStateManagerImpl ( Object oid , ClassMetaData meta ) { } public void begin ( ) { } private void beginInternal ( ) { } public void beginStore ( ) { } private void beginStoreManagerTransaction ( boolean optimistic ) { } private RuntimeException endStoreManagerTransaction ( boolean rollback ) { } public void commit ( ) { } public void rollback ( ) { } public boolean syncWithManagedTransaction ( ) { } public void commitAndResume ( ) { } public void rollbackAndResume ( ) { } private void endAndResume ( boolean commit ) { } public boolean getRollbackOnly ( ) { } public Throwable getRollbackCause ( ) { } public void setRollbackOnly ( ) { } public void setRollbackOnly ( Throwable cause ) { } private void setRollbackOnlyInternal ( Throwable cause ) { try { javax . transaction . Transaction trans = _runtime . getTransactionManager ( ) . getTransaction ( ) ; if ( trans == null ) throw new org . apache . openjpa . util . InvalidStateException ( BrokerImpl . _loc . get ( "null-trans" ) ) ; int tranStatus = trans . getStatus ( ) ; if ( ( ( tranStatus != ( Status . STATUS_NO_TRANSACTION ) ) && ( tranStatus != ( Status . STATUS_ROLLEDBACK ) ) ) && ( tranStatus != ( Status . STATUS_COMMITTED ) ) ) _runtime . setRollbackOnly ( cause ) ; else if ( _log . isTraceEnabled ( ) ) <START_BUG> _log . trace ( BrokerImpl . _loc . get ( "invalid-tran-status" , new Integer ( tranStatus ) , "setRollbackOnly" ) ) ; <END_BUG> } catch ( OpenJPAException ke ) { throw ke ; } catch ( Exception e ) { throw new GeneralException ( e ) ; } } public void setSavepoint ( String name ) { } public void releaseSavepoint ( ) { } public void releaseSavepoint ( String savepoint ) { } public void rollbackToSavepoint ( ) { } public void rollbackToSavepoint ( String savepoint ) { } public void flush ( ) { } public void preFlush ( ) { } public void validateChanges ( ) { } public boolean isActive ( ) { } public boolean isStoreActive ( ) { } boolean isTransactionEnding ( ) { } public boolean beginOperation ( boolean syncTrans ) { } public boolean endOperation ( ) { } public Synchronization getSynchronization ( ) { } public void setSynchronization ( Synchronization sync ) { } public void beforeCompletion ( ) { } public void afterCompletion ( int status ) { } private RuntimeException translateManagedCompletionException ( RuntimeException re ) { } private void flushSafe ( int reason ) { } protected void flush ( int reason ) { } private void flushAdditions ( Collection transactional , int reason ) { } private boolean flushTransAdditions ( Collection transactional , int reason ) { } private boolean deleteDerefAdditions ( Collection derefs ) { } private void deleteDeref ( StateManagerImpl sm ) { } private int processArgument ( int op , Object obj , OpenJPAStateManager sm , OpCallbacks call ) { }

Fix:
_log . trace ( BrokerImpl . _loc . get ( "invalid-tran-status" , Integer . valueOf ( tranStatus ) , "setRollbackOnly" ) ) ;