Program: 82178
Project: 82178
Buggy source:
private BlurIndex openShard(String table,String shard) throws IOException {
  LOG.info("String_Node_Str",shard,table);
  TableContext tableContext=getTableContext(table);
  Path tablePath=tableContext.getTablePath();
  Path hdfsDirPath=new Path(tablePath,shard);
  BlurLockFactory lockFactory=new BlurLockFactory(_configuration,hdfsDirPath,_nodeName,BlurUtil.getPid());
  HdfsDirectory longTermStorage=new HdfsDirectory(_configuration,hdfsDirPath);
  longTermStorage.setLockFactory(lockFactory);
  Directory directory;
  URI uri=hdfsDirPath.toUri();
  String scheme=uri.getScheme();
  if (scheme != null && scheme.equals("String_Node_Str")) {
    LOG.info("String_Node_Str",shard,table);
    FastHdfsKeyValueDirectory shortTermStorage=new FastHdfsKeyValueDirectory(_hdfsKeyValueTimer,_configuration,new Path(hdfsDirPath,"String_Node_Str"));
    directory=new JoinDirectory(longTermStorage,shortTermStorage);
  }
 else {
    directory=longTermStorage;
  }
  ShardContext shardContext=ShardContext.create(tableContext,shard);
  TableDescriptor descriptor=tableContext.getDescriptor();
  boolean blockCacheEnabled=descriptor.isBlockCaching();
  if (blockCacheEnabled) {
    Set<String> blockCacheFileTypes=descriptor.getBlockCachingFileTypes();
    directory=_blockCacheDirectoryFactory.newDirectory(table,shard,directory,blockCacheFileTypes);
  }
  BlurIndex index=tableContext.newInstanceBlurIndex(shardContext,directory,_mergeScheduler,_searchExecutor,_indexCloser,_indexImporterTimer);
  if (_clusterStatus.isReadOnly(true,_cluster,table)) {
    index=new BlurIndexReadOnly(index);
  }
  _filterCache.opening(table,shard,index);
  return index;
}

Fixed version (ground truth):
private BlurIndex openShard(String table,String shard) throws IOException {
  LOG.info("String_Node_Str",shard,table);
  TableContext tableContext=getTableContext(table);
  Path tablePath=tableContext.getTablePath();
  Path hdfsDirPath=new Path(tablePath,shard);
  BlurLockFactory lockFactory=new BlurLockFactory(_configuration,hdfsDirPath,_nodeName,BlurUtil.getPid());
  HdfsDirectory longTermStorage=new HdfsDirectory(_configuration,hdfsDirPath);
  longTermStorage.setLockFactory(lockFactory);
  Directory directory;
  URI uri=hdfsDirPath.toUri();
  String scheme=uri.getScheme();
  if (scheme != null && scheme.equals("String_Node_Str")) {
    LOG.info("String_Node_Str",shard,table);
    FastHdfsKeyValueDirectory shortTermStorage=new FastHdfsKeyValueDirectory(_hdfsKeyValueTimer,_configuration,new Path(hdfsDirPath,"String_Node_Str"));
    directory=new JoinDirectory(longTermStorage,shortTermStorage);
  }
 else {
    directory=longTermStorage;
  }
  ShardContext shardContext=ShardContext.create(tableContext,shard);
  TableDescriptor descriptor=tableContext.getDescriptor();
  boolean blockCacheEnabled=descriptor.isBlockCaching();
  if (blockCacheEnabled) {
    Set<String> blockCacheFileTypes=descriptor.getBlockCachingFileTypes();
    directory=_blockCacheDirectoryFactory.newDirectory(table,shard,directory,blockCacheFileTypes);
  }
  BlurIndex index=tableContext.newInstanceBlurIndex(shardContext,directory,_mergeScheduler,_searchExecutor,_indexCloser,_indexImporterTimer,_indexBulkTimer);
  if (_clusterStatus.isReadOnly(true,_cluster,table)) {
    index=new BlurIndexReadOnly(index);
  }
  _filterCache.opening(table,shard,index);
  return index;
}