Program: 155294
Project: 155294
Buggy source:
void init(){
  txThreadMap=java.util.Collections.synchronizedMap(new HashMap<Thread,Transaction>());
  String txLogDir=System.getProperty("String_Node_Str");
  if (txLogDir == null) {
    throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  }
  logSwitcherFileName=txLogDir + "String_Node_Str";
  txLog1FileName=txLogDir + "String_Node_Str";
  txLog2FileName=txLogDir + "String_Node_Str";
  try {
    if (new File(logSwitcherFileName).exists()) {
      FileChannel fc=new RandomAccessFile(logSwitcherFileName,"String_Node_Str").getChannel();
      byte fileName[]=new byte[256];
      ByteBuffer buf=ByteBuffer.wrap(fileName);
      fc.read(buf);
      String currentTxLog=new String(fileName).trim();
      if (!new File(currentTxLog).exists()) {
        throw new RuntimeException("String_Node_Str" + "String_Node_Str" + currentTxLog + "String_Node_Str");
      }
      txLog=new TxLog(currentTxLog);
    }
 else {
      if (new File(txLog1FileName).exists() || new File(txLog2FileName).exists()) {
        throw new RuntimeException("String_Node_Str" + "String_Node_Str" + txLog1FileName + "String_Node_Str"+ txLog2FileName+ "String_Node_Str"+ "String_Node_Str");
      }
      ByteBuffer buf=ByteBuffer.wrap(txLog1FileName.getBytes("String_Node_Str"));
      FileChannel fc=new RandomAccessFile(logSwitcherFileName,"String_Node_Str").getChannel();
      fc.write(buf);
      txLog=new TxLog(txLog1FileName);
      fc.force(true);
      fc.close();
    }
    Iterator<List<TxLog.Record>> danglingRecordList=txLog.getDanglingRecords();
    if (danglingRecordList.hasNext()) {
      log.warning("String_Node_Str" + "String_Node_Str");
      recover(danglingRecordList);
    }
    getTxLog().truncate();
    tmOk=true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    log.severe("String_Node_Str");
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
void init(){
  txThreadMap=java.util.Collections.synchronizedMap(new HashMap<Thread,Transaction>());
  String txLogDir=System.getProperty("String_Node_Str");
  if (txLogDir == null) {
    throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  }
  String separator=System.getProperty("String_Node_Str");
  logSwitcherFileName=txLogDir + separator + "String_Node_Str";
  txLog1FileName=txLogDir + separator + "String_Node_Str";
  txLog2FileName=txLogDir + separator + "String_Node_Str";
  try {
    if (new File(logSwitcherFileName).exists()) {
      FileChannel fc=new RandomAccessFile(logSwitcherFileName,"String_Node_Str").getChannel();
      byte fileName[]=new byte[256];
      ByteBuffer buf=ByteBuffer.wrap(fileName);
      fc.read(buf);
      String currentTxLog=new String(fileName).trim();
      if (!new File(currentTxLog).exists()) {
        throw new RuntimeException("String_Node_Str" + "String_Node_Str" + currentTxLog + "String_Node_Str");
      }
      txLog=new TxLog(currentTxLog);
    }
 else {
      if (new File(txLog1FileName).exists() || new File(txLog2FileName).exists()) {
        throw new RuntimeException("String_Node_Str" + "String_Node_Str" + txLog1FileName + "String_Node_Str"+ txLog2FileName+ "String_Node_Str"+ "String_Node_Str");
      }
      ByteBuffer buf=ByteBuffer.wrap(txLog1FileName.getBytes("String_Node_Str"));
      FileChannel fc=new RandomAccessFile(logSwitcherFileName,"String_Node_Str").getChannel();
      fc.write(buf);
      txLog=new TxLog(txLog1FileName);
      fc.force(true);
      fc.close();
    }
    Iterator<List<TxLog.Record>> danglingRecordList=txLog.getDanglingRecords();
    if (danglingRecordList.hasNext()) {
      log.warning("String_Node_Str" + "String_Node_Str");
      recover(danglingRecordList);
    }
    getTxLog().truncate();
    tmOk=true;
  }
 catch (  IOException e) {
    e.printStackTrace();
    log.severe("String_Node_Str");
    throw new RuntimeException(e);
  }
}