Program: 166335
Project: 166335
Buggy source:
private void openFile(){
  mLogger.debug("String_Node_Str");
  closeFile();
  mNextRolloverTime=MiscUtil.getNextRolloverTime(mNextRolloverTime,(mRolloverIntervalSeconds * 1000L));
  long startTime=MiscUtil.getRolloverStartTime(mNextRolloverTime,(mRolloverIntervalSeconds * 1000L));
  mHdfsFilename=MiscUtil.replaceTokens(mDirectory + org.apache.hadoop.fs.Path.SEPARATOR + mFile,startTime);
  FSDataOutputStream ostream=null;
  FileSystem fileSystem=null;
  Path pathLogfile=null;
  Configuration conf=null;
  boolean bOverwrite=false;
  try {
    mLogger.debug("String_Node_Str" + mHdfsFilename);
    URI uri=URI.create(mHdfsFilename);
    conf=createConfiguration();
    pathLogfile=new Path(mHdfsFilename);
    fileSystem=FileSystem.get(uri,conf);
    try {
      if (fileSystem.exists(pathLogfile)) {
        if (mIsAppend) {
          mLogger.info("String_Node_Str" + mHdfsFilename);
          ostream=fileSystem.append(pathLogfile);
        }
 else {
          mHdfsFilename=getNewFilename(mHdfsFilename,fileSystem);
          pathLogfile=new Path(mHdfsFilename);
        }
      }
      if (ostream == null) {
        mLogger.info("String_Node_Str" + mHdfsFilename);
        createParents(pathLogfile,fileSystem);
        ostream=fileSystem.create(pathLogfile,bOverwrite);
      }
    }
 catch (    IOException excp) {
      String failedFilename=mHdfsFilename;
      mHdfsFilename=getNewFilename(mHdfsFilename,fileSystem);
      pathLogfile=new Path(mHdfsFilename);
      mLogger.info("String_Node_Str" + failedFilename + "String_Node_Str"+ mHdfsFilename);
    }
    if (ostream == null) {
      mLogger.info("String_Node_Str" + mHdfsFilename);
      createParents(pathLogfile,fileSystem);
      ostream=fileSystem.create(pathLogfile,bOverwrite);
    }
  }
 catch (  Throwable ex) {
    mLogger.warn("String_Node_Str",ex);
  }
  mWriter=createWriter(ostream);
  if (mWriter != null) {
    mLogger.debug("String_Node_Str" + mHdfsFilename);
    mFsDataOutStream=ostream;
    mNextFlushTime=System.currentTimeMillis() + (mFlushIntervalSeconds * 1000L);
    mLastOpenFailedTime=0;
  }
 else {
    mLogger.warn("String_Node_Str" + mHdfsFilename);
    mHdfsFilename=null;
    mLastOpenFailedTime=System.currentTimeMillis();
  }
  mLogger.debug("String_Node_Str" + mHdfsFilename + "String_Node_Str");
}

Fixed version (ground truth):
private void openFile(){
  mLogger.debug("String_Node_Str");
  closeFile();
  mNextRolloverTime=MiscUtil.getNextRolloverTime(mNextRolloverTime,(mRolloverIntervalSeconds * 1000L));
  long startTime=MiscUtil.getRolloverStartTime(mNextRolloverTime,(mRolloverIntervalSeconds * 1000L));
  mHdfsFilename=MiscUtil.replaceTokens(mDirectory + Path.SEPARATOR + mFile,startTime);
  FSDataOutputStream ostream=null;
  FileSystem fileSystem=null;
  Path pathLogfile=null;
  Configuration conf=null;
  boolean bOverwrite=false;
  try {
    mLogger.debug("String_Node_Str" + mHdfsFilename);
    URI uri=URI.create(mHdfsFilename);
    conf=createConfiguration();
    pathLogfile=new Path(mHdfsFilename);
    fileSystem=FileSystem.get(uri,conf);
    try {
      if (fileSystem.exists(pathLogfile)) {
        if (mIsAppend) {
          mLogger.info("String_Node_Str" + mHdfsFilename);
          ostream=fileSystem.append(pathLogfile);
        }
 else {
          mHdfsFilename=getNewFilename(mHdfsFilename,fileSystem);
          pathLogfile=new Path(mHdfsFilename);
        }
      }
      if (ostream == null) {
        mLogger.info("String_Node_Str" + mHdfsFilename);
        createParents(pathLogfile,fileSystem);
        ostream=fileSystem.create(pathLogfile,bOverwrite);
      }
    }
 catch (    IOException excp) {
      String failedFilename=mHdfsFilename;
      mHdfsFilename=getNewFilename(mHdfsFilename,fileSystem);
      pathLogfile=new Path(mHdfsFilename);
      mLogger.info("String_Node_Str" + failedFilename + "String_Node_Str"+ mHdfsFilename);
    }
    if (ostream == null) {
      mLogger.info("String_Node_Str" + mHdfsFilename);
      createParents(pathLogfile,fileSystem);
      ostream=fileSystem.create(pathLogfile,bOverwrite);
    }
  }
 catch (  Throwable ex) {
    mLogger.warn("String_Node_Str",ex);
  }
  mWriter=createWriter(ostream);
  if (mWriter != null) {
    mLogger.debug("String_Node_Str" + mHdfsFilename);
    mFsDataOutStream=ostream;
    mNextFlushTime=System.currentTimeMillis() + (mFlushIntervalSeconds * 1000L);
    mLastOpenFailedTime=0;
  }
 else {
    mLogger.warn("String_Node_Str" + mHdfsFilename);
    mHdfsFilename=null;
    mLastOpenFailedTime=System.currentTimeMillis();
  }
  mLogger.debug("String_Node_Str" + mHdfsFilename + "String_Node_Str");
}