Program: 4668
Project: 4668
Buggy source:
private static void checkParts(EntityType entityType,List<String> parts,int index,Map<EntityType,String> entityParts){
switch (entityType) {
case INSTANCE:
case NAMESPACE:
    entityParts.put(entityType,parts.get(index));
  break;
case KERBEROSPRINCIPAL:
entityParts.put(entityType,parts.get(index));
break;
case ARTIFACT:
case APPLICATION:
if (parts.size() > 2 && index == (parts.size() - 1)) {
throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str" + parts);
}
checkParts(EntityType.NAMESPACE,parts,index - 1,entityParts);
entityParts.put(entityType,parts.get(index));
break;
case DATASET:
case DATASET_MODULE:
case DATASET_TYPE:
case STREAM:
case SECUREKEY:
checkParts(EntityType.NAMESPACE,parts,index - 1,entityParts);
entityParts.put(entityType,parts.get(index));
break;
case PROGRAM:
if (parts.size() > 4 && index == (parts.size() - 1)) {
throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str" + parts);
}
if (parts.size() == 3 && index == (parts.size() - 1)) {
String program=parts.get(index);
if (!"String_Node_Str".equals(program)) {
throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
}
checkParts(EntityType.APPLICATION,parts,index - 1,entityParts);
entityParts.put(entityType,parts.get(index));
}
 else {
checkParts(EntityType.APPLICATION,parts,index - 2,entityParts);
entityParts.put(entityType,parts.get(index - 1) + "String_Node_Str" + parts.get(index));
}
break;
default :
throw new IllegalArgumentException(String.format("String_Node_Str",entityType));
}
}

Fixed version (ground truth):
private static void checkParts(EntityType entityType,List<String> parts,int index,Map<EntityType,String> entityParts){
switch (entityType) {
case INSTANCE:
case NAMESPACE:
case KERBEROSPRINCIPAL:
    if (parts.size() != 1 && index == (parts.size() - 1)) {
      throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + parts);
    }
  entityParts.put(entityType,parts.get(index));
break;
case ARTIFACT:
case APPLICATION:
if (parts.size() > 2 && index == (parts.size() - 1)) {
throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str" + parts);
}
if (parts.size() < 2 && index == (parts.size() - 1)) {
throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + parts);
}
checkParts(EntityType.NAMESPACE,parts,index - 1,entityParts);
entityParts.put(entityType,parts.get(index));
break;
case DATASET:
case DATASET_MODULE:
case DATASET_TYPE:
case STREAM:
case SECUREKEY:
if (parts.size() != 2 && index == (parts.size() - 1)) {
throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + parts);
}
checkParts(EntityType.NAMESPACE,parts,index - 1,entityParts);
entityParts.put(entityType,parts.get(index));
break;
case PROGRAM:
if (parts.size() > 4 && index == (parts.size() - 1)) {
throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str" + parts);
}
if (parts.size() < 3 && index == (parts.size() - 1)) {
throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ parts);
}
if (parts.size() == 3 && index == (parts.size() - 1)) {
String program=parts.get(index);
if (!"String_Node_Str".equals(program)) {
throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
}
checkParts(EntityType.APPLICATION,parts,index - 1,entityParts);
entityParts.put(entityType,parts.get(index));
}
 else {
checkParts(EntityType.APPLICATION,parts,index - 2,entityParts);
entityParts.put(entityType,parts.get(index - 1) + "String_Node_Str" + parts.get(index));
}
break;
default :
throw new IllegalArgumentException(String.format("String_Node_Str",entityType));
}
}