Program: 33223
Project: 33223
Buggy source:
public static @Bean SameAsRetriever createSameAsRetriever(){
  DomainBasedSameAsRetrieverManager retrieverManager=new DomainBasedSameAsRetrieverManager();
  retrieverManager.addStaticRetriever(new ErrorFixingSameAsRetriever());
  retrieverManager.addStaticRetriever(new UriEncodingHandlingSameAsRetriever());
  if (GerbilConfiguration.getInstance().containsKey(HTTP_SAME_AS_RETRIEVAL_DOMAIN_KEY)) {
    HTTPBasedSameAsRetriever httpRetriever=new HTTPBasedSameAsRetriever();
    for (    String domain : GerbilConfiguration.getInstance().getStringArray(HTTP_SAME_AS_RETRIEVAL_DOMAIN_KEY)) {
      retrieverManager.addDomainSpecificRetriever(domain,httpRetriever);
    }
  }
  SingleUriSameAsRetriever singleRetriever=new WikipediaApiBasedSingleUriSameAsRetriever();
  retrieverManager.addDomainSpecificRetriever("String_Node_Str",singleRetriever);
  (new WikiDbPediaBridgingSameAsRetriever()).addToManager(retrieverManager);
  SameAsRetriever sameAsRetriever=retrieverManager;
  sameAsRetriever=new CrawlingSameAsRetrieverDecorator(sameAsRetriever);
  SameAsRetriever decoratedRetriever=null;
  if (GerbilConfiguration.getInstance().containsKey(SAME_AS_CACHE_FILE_KEY)) {
    decoratedRetriever=FileBasedCachingSameAsRetriever.create(sameAsRetriever,false,new File(GerbilConfiguration.getInstance().getString(SAME_AS_CACHE_FILE_KEY)));
  }
  if (decoratedRetriever == null) {
    LOGGER.warn("String_Node_Str");
    if (GerbilConfiguration.getInstance().containsKey(SAME_AS_IN_MEMORY_CACHE_SIZE_KEY)) {
      try {
        int cacheSize=GerbilConfiguration.getInstance().getInt(SAME_AS_IN_MEMORY_CACHE_SIZE_KEY);
        decoratedRetriever=new InMemoryCachingSameAsRetriever(sameAsRetriever,cacheSize);
      }
 catch (      ConversionException e) {
        LOGGER.warn("String_Node_Str" + SAME_AS_IN_MEMORY_CACHE_SIZE_KEY + "String_Node_Str",e);
      }
    }
    if (decoratedRetriever == null) {
      LOGGER.info("String_Node_Str");
      sameAsRetriever=new InMemoryCachingSameAsRetriever(sameAsRetriever);
    }
 else {
      sameAsRetriever=decoratedRetriever;
      decoratedRetriever=null;
    }
  }
 else {
    sameAsRetriever=decoratedRetriever;
    decoratedRetriever=null;
  }
  return sameAsRetriever;
}

Fixed version (ground truth):
public static @Bean SameAsRetriever createSameAsRetriever(){
  DomainBasedSameAsRetrieverManager retrieverManager=new DomainBasedSameAsRetrieverManager();
  retrieverManager.addStaticRetriever(new ErrorFixingSameAsRetriever());
  retrieverManager.addStaticRetriever(new UriEncodingHandlingSameAsRetriever());
  if (GerbilConfiguration.getInstance().containsKey(HTTP_SAME_AS_RETRIEVAL_DOMAIN_KEY)) {
    HTTPBasedSameAsRetriever httpRetriever=new HTTPBasedSameAsRetriever();
    for (    String domain : GerbilConfiguration.getInstance().getStringArray(HTTP_SAME_AS_RETRIEVAL_DOMAIN_KEY)) {
      retrieverManager.addDomainSpecificRetriever(domain,httpRetriever);
    }
  }
  if (GerbilConfiguration.getInstance().containsKey(WIKIPEDIA_BASED_SAME_AS_RETRIEVAL_DOMAIN_KEY)) {
    SingleUriSameAsRetriever singleRetriever=new WikipediaApiBasedSingleUriSameAsRetriever();
    for (    String domain : GerbilConfiguration.getInstance().getStringArray(WIKIPEDIA_BASED_SAME_AS_RETRIEVAL_DOMAIN_KEY)) {
      retrieverManager.addDomainSpecificRetriever(domain,singleRetriever);
    }
  }
  (new WikiDbPediaBridgingSameAsRetriever()).addToManager(retrieverManager);
  SameAsRetriever sameAsRetriever=retrieverManager;
  if (GerbilConfiguration.getInstance().containsKey(SAME_AS_RETRIEVAL_DOMAIN_BLACKLIST_KEY)) {
    sameAsRetriever=new UriFilteringSameAsRetrieverDecorator(sameAsRetriever,GerbilConfiguration.getInstance().getStringArray(SAME_AS_RETRIEVAL_DOMAIN_BLACKLIST_KEY));
  }
  sameAsRetriever=new CrawlingSameAsRetrieverDecorator(sameAsRetriever);
  SameAsRetriever decoratedRetriever=null;
  if (GerbilConfiguration.getInstance().containsKey(SAME_AS_CACHE_FILE_KEY)) {
    decoratedRetriever=FileBasedCachingSameAsRetriever.create(sameAsRetriever,false,new File(GerbilConfiguration.getInstance().getString(SAME_AS_CACHE_FILE_KEY)));
  }
  if (decoratedRetriever == null) {
    LOGGER.warn("String_Node_Str");
    if (GerbilConfiguration.getInstance().containsKey(SAME_AS_IN_MEMORY_CACHE_SIZE_KEY)) {
      try {
        int cacheSize=GerbilConfiguration.getInstance().getInt(SAME_AS_IN_MEMORY_CACHE_SIZE_KEY);
        decoratedRetriever=new InMemoryCachingSameAsRetriever(sameAsRetriever,cacheSize);
      }
 catch (      ConversionException e) {
        LOGGER.warn("String_Node_Str" + SAME_AS_IN_MEMORY_CACHE_SIZE_KEY + "String_Node_Str",e);
      }
    }
    if (decoratedRetriever == null) {
      LOGGER.info("String_Node_Str");
      sameAsRetriever=new InMemoryCachingSameAsRetriever(sameAsRetriever);
    }
 else {
      sameAsRetriever=decoratedRetriever;
      decoratedRetriever=null;
    }
  }
 else {
    sameAsRetriever=decoratedRetriever;
    decoratedRetriever=null;
  }
  return sameAsRetriever;
}