Program: 153296
Project: 153296
Buggy source:
void run() throws CrawlException, ParseException, IOException {
  setupIndex();
  setupSession();
  organismMapper=session.getMapper(OrganismsMapper.class);
  featuresMapper=session.getMapper(FeaturesMapper.class);
  featureMapper=session.getMapper(FeatureMapper.class);
  regionsMapper=session.getMapper(RegionsMapper.class);
  termsMapper=session.getMapper(TermsMapper.class);
  esOrganismMapper=new ElasticSearchOrganismsMapper();
  esOrganismMapper.setConnection(connection);
  esFeatureMapper=new ElasticSearchFeatureMapper();
  esFeatureMapper.setConnection(connection);
  esRegionsMapper=new ElasticSearchRegionsMapper();
  esRegionsMapper.setConnection(connection);
  List<LocatedFeature> features=null;
  if (region != null) {
    makeRegion(region);
    int start=0;
    int end=regionsMapper.sequence(region).length;
    features=regionsMapper.locations(region,start,end,false,null);
    for (    LocatedFeature f : features) {
      f.region=region;
    }
  }
 else   if (since != null) {
    List<Feature> modifiedFeatures=null;
    if (organismCommonName != null) {
      Organism o=organismMapper.getByCommonName(organismCommonName);
      modifiedFeatures=featuresMapper.timelastmodified(getDate(since),o.ID);
    }
 else {
      modifiedFeatures=featuresMapper.timelastmodified(getDate(since),null);
    }
    List<String> modifiedFeatureNames=new ArrayList<String>();
    for (    Feature f : modifiedFeatures) {
      modifiedFeatureNames.add(f.uniqueName);
    }
    int chunk=20;
    features=new ArrayList<LocatedFeature>();
    for (int i=0; i <= modifiedFeatureNames.size(); i+=chunk) {
      int ii=i + chunk;
      if (ii > modifiedFeatureNames.size()) {
        ii=modifiedFeatureNames.size();
      }
      List<String> sublist=modifiedFeatureNames.subList(i,ii);
      List<Feature> featuresWithCoordinates=featuresMapper.coordinates(sublist,null);
      for (      Feature f : featuresWithCoordinates) {
        LocatedFeature lf=LocatedFeatureUtil.fromFeature(f);
        features.add(lf);
      }
    }
  }
 else {
    if (organismCommonName != null) {
      Organism o=organismMapper.getByCommonName(organismCommonName);
      createOrganism(o);
    }
 else {
      for (      Organism o : organismMapper.list()) {
        createOrganism(o);
      }
    }
    return;
  }
  FeatureFiller filler=new FeatureFiller(featureMapper,featuresMapper,termsMapper,features);
  filler.fill();
  generateAllOrganisms(features);
  generateAllSequences(features);
  for (  Feature f : features) {
    esFeatureMapper.createOrUpdate(f);
  }
}

Fixed version (ground truth):
void run() throws CrawlException, ParseException, IOException {
  setupIndex();
  setupSession();
  organismMapper=session.getMapper(OrganismsMapper.class);
  featuresMapper=session.getMapper(FeaturesMapper.class);
  featureMapper=session.getMapper(FeatureMapper.class);
  regionsMapper=session.getMapper(RegionsMapper.class);
  termsMapper=session.getMapper(TermsMapper.class);
  auditMapper=session.getMapper(AuditMapper.class);
  relationships.add(CvtermUtil.makeTerm(termsMapper,"String_Node_Str","String_Node_Str"));
  relationships.add(CvtermUtil.makeTerm(termsMapper,"String_Node_Str","String_Node_Str"));
  esOrganismMapper=new ElasticSearchOrganismsMapper();
  esOrganismMapper.setConnection(connection);
  esFeatureMapper=new ElasticSearchFeatureMapper();
  esFeatureMapper.setConnection(connection);
  esRegionsMapper=new ElasticSearchRegionsMapper();
  esRegionsMapper.setConnection(connection);
  SQLIndexer indexer=new SQLIndexer();
  indexer.featureMapper=featureMapper;
  indexer.featuresMapper=featuresMapper;
  indexer.regionsMapper=regionsMapper;
  indexer.organismMapper=organismMapper;
  indexer.termsMapper=termsMapper;
  indexer.esFeatureMapper=esFeatureMapper;
  indexer.esOrganismMapper=esOrganismMapper;
  indexer.esRegionsMapper=esRegionsMapper;
  indexer.relationships=relationships;
  indexer.auditMapper=auditMapper;
  indexer.types=types;
  indexer.exclude=exclude;
  logger.info(String.format("String_Node_Str",indexer.exclude,indexer.types));
  Organism o=null;
  if (organismCommonName != null) {
    o=organismMapper.getByCommonName(organismCommonName);
  }
  if (region != null) {
    if (features) {
      indexer.indexRegionContents(region);
    }
 else {
      indexer.indexRegion(region);
    }
  }
 else   if (since != null) {
    indexer.indexFeaturesSince(getDate(since),o);
  }
 else {
    if (o == null) {
      if (features) {
        throw new RuntimeException("String_Node_Str");
      }
 else {
        indexer.indexOrganisms();
      }
    }
 else {
      if (features) {
        indexer.indexOrganismContents(o);
      }
 else {
        indexer.indexOrganism(o);
      }
    }
  }
}