Program: 82264
Project: 82264
Buggy source:
public GenericBlurRecordWriter(Configuration configuration,int attemptId,String tmpDirName) throws IOException {
  _indexLocally=BlurOutputFormat.isIndexLocally(configuration);
  _optimizeInFlight=BlurOutputFormat.isOptimizeInFlight(configuration);
  TableDescriptor tableDescriptor=BlurOutputFormat.getTableDescriptor(configuration);
  int shardCount=tableDescriptor.getShardCount();
  int shardId=attemptId % shardCount;
  _maxDocumentBufferSize=BlurOutputFormat.getMaxDocumentBufferSize(configuration);
  Path tableOutput=BlurOutputFormat.getOutputPath(configuration);
  String shardName=BlurUtil.getShardName(BlurConstants.SHARD_PREFIX,shardId);
  Path indexPath=new Path(tableOutput,shardName);
  _newIndex=new Path(indexPath,tmpDirName);
  _finalDir=new ProgressableDirectory(new HdfsDirectory(configuration,_newIndex),getProgressable());
  _finalDir.setLockFactory(NoLockFactory.getNoLockFactory());
  TableContext tableContext=TableContext.create(tableDescriptor);
  _fieldManager=tableContext.getFieldManager();
  Analyzer analyzer=_fieldManager.getAnalyzerForIndex();
  _conf=new IndexWriterConfig(LuceneVersionConstant.LUCENE_VERSION,analyzer);
  _conf.setCodec(new Blur022Codec());
  _conf.setSimilarity(tableContext.getSimilarity());
  TieredMergePolicy mergePolicy=(TieredMergePolicy)_conf.getMergePolicy();
  mergePolicy.setUseCompoundFile(false);
  _overFlowConf=_conf.clone();
  _overFlowConf.setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES);
  if (_indexLocally) {
    String localDirPath=System.getProperty(JAVA_IO_TMPDIR);
    _localPath=new File(localDirPath,UUID.randomUUID().toString() + "String_Node_Str");
    _localDir=new ProgressableDirectory(FSDirectory.open(_localPath),getProgressable());
    _writer=new IndexWriter(_localDir,_conf.clone());
  }
 else {
    _localPath=null;
    _localDir=null;
    _writer=new IndexWriter(_finalDir,_conf.clone());
  }
}

Fixed version (ground truth):
public GenericBlurRecordWriter(Configuration configuration,int attemptId,String tmpDirName) throws IOException {
  _configuration=configuration;
  _indexLocally=BlurOutputFormat.isIndexLocally(_configuration);
  _optimizeInFlight=BlurOutputFormat.isOptimizeInFlight(_configuration);
  TableDescriptor tableDescriptor=BlurOutputFormat.getTableDescriptor(_configuration);
  int shardCount=tableDescriptor.getShardCount();
  int shardId=attemptId % shardCount;
  _maxDocumentBufferSize=BlurOutputFormat.getMaxDocumentBufferSize(_configuration);
  Path tableOutput=BlurOutputFormat.getOutputPath(_configuration);
  String shardName=BlurUtil.getShardName(BlurConstants.SHARD_PREFIX,shardId);
  Path indexPath=new Path(tableOutput,shardName);
  _newIndex=new Path(indexPath,tmpDirName);
  _finalDir=new ProgressableDirectory(new HdfsDirectory(_configuration,_newIndex),getProgressable());
  _finalDir.setLockFactory(NoLockFactory.getNoLockFactory());
  TableContext tableContext=TableContext.create(tableDescriptor);
  _fieldManager=tableContext.getFieldManager();
  Analyzer analyzer=_fieldManager.getAnalyzerForIndex();
  _conf=new IndexWriterConfig(LuceneVersionConstant.LUCENE_VERSION,analyzer);
  _conf.setCodec(new Blur022Codec());
  _conf.setSimilarity(tableContext.getSimilarity());
  TieredMergePolicy mergePolicy=(TieredMergePolicy)_conf.getMergePolicy();
  mergePolicy.setUseCompoundFile(false);
  _overFlowConf=_conf.clone();
  _overFlowConf.setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES);
  if (_indexLocally) {
    String localDirPath=System.getProperty(JAVA_IO_TMPDIR);
    _localPath=new File(localDirPath,UUID.randomUUID().toString() + "String_Node_Str");
    HdfsDirectory directory=new HdfsDirectory(_configuration,new Path(_localPath.toURI()));
    _localDir=new ProgressableDirectory(directory,getProgressable());
    _writer=new IndexWriter(_localDir,_conf.clone());
  }
 else {
    _localPath=null;
    _localDir=null;
    _writer=new IndexWriter(_finalDir,_conf.clone());
  }
}