Program: 35323
Project: 35323
Buggy source:
private void migrateCategories(OldConfig oldConfig){
  CategoriesConfig newCategories=configProvider.getBaseConfig().getCategoriesConfig();
  Categories oldCategories=oldConfig.getCategories();
  newCategories.setEnableCategorySizes(oldCategories.isEnableCategorySizes());
  for (  Category newCategory : newCategories.getCategories()) {
    if (oldCategories.getCategories().containsKey(newCategory.getName())) {
      org.nzbhydra.migration.configmapping.Category oldCat=oldCategories.getCategories().get(newCategory.getName());
switch (oldCat.getApplyRestrictions()) {
case "String_Node_Str":
        newCategory.setApplyRestrictionsType(SearchSourceRestriction.INTERNAL);
      break;
case "String_Node_Str":
    newCategory.setApplyRestrictionsType(SearchSourceRestriction.API);
  break;
case "String_Node_Str":
newCategory.setApplyRestrictionsType(SearchSourceRestriction.BOTH);
break;
}
newCategory.setForbiddenRegex(oldCat.getForbiddenRegex());
newCategory.setForbiddenWords(oldCat.getForbiddenWords());
newCategory.setMinSizePreset(oldCat.getMin());
newCategory.setMaxSizePreset(oldCat.getMax());
newCategory.setNewznabCategories(oldCat.getNewznabCategories());
newCategory.setRequiredRegex(oldCat.getRequiredRegex());
newCategory.setRequiredWords(oldCat.getRequiredWords());
switch (oldCat.getIgnoreResults()) {
case "String_Node_Str":
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.INTERNAL);
break;
case "String_Node_Str":
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.API);
break;
case "String_Node_Str":
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.BOTH);
break;
default :
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.NONE);
break;
}
}
}
}

Fixed version (ground truth):
private List<String> migrateCategories(OldConfig oldConfig,BaseConfig newConfig){
  CategoriesConfig newCategories=newConfig.getCategoriesConfig();
  Categories oldCategories=oldConfig.getCategories();
  newCategories.setEnableCategorySizes(oldCategories.isEnableCategorySizes());
  for (  Category newCategory : newCategories.getCategories()) {
    if (oldCategories.getCategories().containsKey(newCategory.getName().replace("String_Node_Str","String_Node_Str").toLowerCase())) {
      org.nzbhydra.migration.configmapping.Category oldCat=oldCategories.getCategories().get(newCategory.getName().replace("String_Node_Str","String_Node_Str").toLowerCase());
switch (oldCat.getApplyRestrictions()) {
case "String_Node_Str":
        newCategory.setApplyRestrictionsType(SearchSourceRestriction.INTERNAL);
      break;
case "String_Node_Str":
    newCategory.setApplyRestrictionsType(SearchSourceRestriction.API);
  break;
case "String_Node_Str":
newCategory.setApplyRestrictionsType(SearchSourceRestriction.BOTH);
break;
default :
newCategory.setApplyRestrictionsType(SearchSourceRestriction.NONE);
break;
}
newCategory.setForbiddenRegex(oldCat.getForbiddenRegex());
newCategory.setForbiddenWords(Strings.isNullOrEmpty(oldCat.getForbiddenWords()) ? Collections.emptyList() : Arrays.asList(oldCat.getForbiddenWords().replace("String_Node_Str","String_Node_Str").split("String_Node_Str")));
newCategory.setMinSizePreset(oldCat.getMin());
newCategory.setMaxSizePreset(oldCat.getMax());
newCategory.setNewznabCategories(oldCat.getNewznabCategories());
newCategory.setRequiredRegex(oldCat.getRequiredRegex());
newCategory.setRequiredWords(Strings.isNullOrEmpty(oldCat.getRequiredWords()) ? Collections.emptyList() : Arrays.asList(oldCat.getRequiredWords().replace("String_Node_Str","String_Node_Str").split("String_Node_Str")));
switch (oldCat.getIgnoreResults()) {
case "String_Node_Str":
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.INTERNAL);
break;
case "String_Node_Str":
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.API);
break;
case "String_Node_Str":
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.BOTH);
break;
default :
newCategory.setIgnoreResultsFrom(SearchSourceRestriction.NONE);
break;
}
}
}
return Collections.emptyList();
}