Program: 69848
Project: 69848
Buggy source:
/** 
 * Call this to commit a transaction opened by beginTransaction().
 */
@Override public void commit(){
  if (isLogDebugEnabled())   logDebug("String_Node_Str",null);
  try {
    if (hasTransaction() && !isError()) {
      if (isLogDebugEnabled())       logDebug("String_Node_Str",null);
      getData().incrementCommitCounter();
      if (isLogDebugEnabled()) {
        if ((maxCommitCounter != 0) && (getData().getCommitCounter() > maxCommitCounter)) {
          logInfo("String_Node_Str" + getData().getCommitCounter() + "String_Node_Str",null);
        }
      }
      EntityTransaction trx=getCurrentEntityManager().getTransaction();
      if (trx != null) {
        trx.commit();
      }
      if (isLogDebugEnabled())       logDebug("String_Node_Str" + hasTransaction(),null);
    }
 else {
      if (isLogDebugEnabled())       logDebug("String_Node_Str",null);
    }
  }
 catch (  Error er) {
    logError("String_Node_Str",er);
    throw er;
  }
catch (  Exception e) {
    if (!Thread.currentThread().getName().equals("String_Node_Str")) {
      logWarn("String_Node_Str",e);
    }
    try {
      if (hasTransaction()) {
        TransactionStatus status=txManager.getTransaction(null);
        txManager.rollback(status);
      }
    }
 catch (    Error er) {
      logError("String_Node_Str",er);
      throw er;
    }
catch (    Exception ex) {
      logWarn("String_Node_Str",ex);
      throw new DBRuntimeException("String_Node_Str",e);
    }
    throw new DBRuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Call this to commit a transaction opened by beginTransaction().
 */
@Override public void commit(){
  if (isLogDebugEnabled())   logDebug("String_Node_Str",null);
  try {
    if (hasTransaction() && !isError()) {
      if (isLogDebugEnabled())       logDebug("String_Node_Str",null);
      getData().incrementCommitCounter();
      if (isLogDebugEnabled()) {
        if ((maxCommitCounter != 0) && (getData().getCommitCounter() > maxCommitCounter)) {
          logInfo("String_Node_Str" + getData().getCommitCounter() + "String_Node_Str",null);
        }
      }
      EntityTransaction trx=getCurrentEntityManager().getTransaction();
      if (trx != null) {
        trx.commit();
      }
      if (isLogDebugEnabled())       logDebug("String_Node_Str" + hasTransaction(),null);
    }
 else {
      if (isLogDebugEnabled())       logDebug("String_Node_Str",null);
    }
  }
 catch (  Error er) {
    logError("String_Node_Str",er);
    throw er;
  }
catch (  Exception e) {
    if (!Thread.currentThread().getName().equals("String_Node_Str")) {
      logWarn("String_Node_Str",e);
    }
    try {
      if (hasTransaction()) {
        TransactionStatus status=txManager.getTransaction(null);
        txManager.rollback(status);
        EntityTransaction trx=getCurrentEntityManager().getTransaction();
        if (trx != null) {
          trx.rollback();
        }
      }
    }
 catch (    Error er) {
      logError("String_Node_Str",er);
      throw er;
    }
catch (    Exception ex) {
      logWarn("String_Node_Str",ex);
      throw new DBRuntimeException("String_Node_Str",e);
    }
    throw new DBRuntimeException("String_Node_Str",e);
  }
}