Program: 82127
Project: 82127
Buggy source:
private org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter getMrWorkingPathWriter(final Configuration configuration) throws IOException {
  String workingPathStr=configuration.get(BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH);
  Path workingPath=new Path(workingPathStr);
  Path tmpDir=new Path(workingPath,"String_Node_Str");
  final FileSystem fileSystem=tmpDir.getFileSystem(configuration);
  String loadId=configuration.get(BlurSerDe.BLUR_MR_LOAD_ID);
  final Path loadPath=new Path(tmpDir,loadId);
  String user=getBlurUser(configuration);
  UserGroupInformation proxyUser=UserGroupInformation.createProxyUser(user,UserGroupInformation.getLoginUser());
  try {
    return proxyUser.doAs(new PrivilegedExceptionAction<org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter>(){
      @Override public org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter run() throws Exception {
        final Writer writer=new SequenceFile.Writer(fileSystem,configuration,new Path(loadPath,UUID.randomUUID().toString()),Text.class,BlurRecord.class);
        return new org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter(){
          @Override public void write(          Writable w) throws IOException {
            BlurRecord blurRecord=(BlurRecord)w;
            String rowId=blurRecord.getRowId();
            writer.append(new Text(rowId),blurRecord);
          }
          @Override public void close(          boolean abort) throws IOException {
            writer.close();
          }
        }
;
      }
    }
);
  }
 catch (  InterruptedException e) {
    throw new IOException(e);
  }
}

Fixed version (ground truth):
private org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter getMrWorkingPathWriter(final Configuration configuration) throws IOException {
  PrivilegedExceptionAction<org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter> privilegedExceptionAction=new PrivilegedExceptionAction<org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter>(){
    @Override public org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter run() throws Exception {
      String workingPathStr=configuration.get(BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH);
      Path workingPath=new Path(workingPathStr);
      Path tmpDir=new Path(workingPath,"String_Node_Str");
      FileSystem fileSystem=tmpDir.getFileSystem(configuration);
      String loadId=configuration.get(BlurSerDe.BLUR_MR_LOAD_ID);
      Path loadPath=new Path(tmpDir,loadId);
      final Writer writer=new SequenceFile.Writer(fileSystem,configuration,new Path(loadPath,UUID.randomUUID().toString()),Text.class,BlurRecord.class);
      return new org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter(){
        @Override public void write(        Writable w) throws IOException {
          BlurRecord blurRecord=(BlurRecord)w;
          String rowId=blurRecord.getRowId();
          writer.append(new Text(rowId),blurRecord);
        }
        @Override public void close(        boolean abort) throws IOException {
          writer.close();
        }
      }
;
    }
  }
;
  UserGroupInformation userGroupInformation=getUGI(configuration);
  try {
    return userGroupInformation.doAs(privilegedExceptionAction);
  }
 catch (  InterruptedException e) {
    throw new IOException(e);
  }
}