Program: 7261
Project: 7261
Buggy source:
@Override public void perform(Arguments arguments,PrintStream printStream) throws Exception {
  String[] programIdParts=new String[0];
  if (arguments.hasArgument(type.getArgumentName().toString())) {
    programIdParts=arguments.get(type.getArgumentName().toString()).split("String_Node_Str");
  }
switch (type) {
case INSTANCE:
    if (programIdParts.length != 0) {
      throw new CommandInputError(this);
    }
  client.deleteInstancePreferences();
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case NAMESPACE:
if (programIdParts.length != 0) {
throw new CommandInputError(this);
}
client.deleteNamespacePreferences(cliConfig.getCurrentNamespace());
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case APP:
if (programIdParts.length != 1) {
throw new CommandInputError(this);
}
client.deleteApplicationPreferences(cliConfig.getCurrentNamespace(),programIdParts[0]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case FLOW:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case PROCEDURE:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case MAPREDUCE:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case WORKFLOW:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case SERVICE:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case SPARK:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
default :
throw new IllegalArgumentException("String_Node_Str" + type.getPrettyName());
}
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream printStream) throws Exception {
  String[] programIdParts=new String[0];
  if (arguments.hasArgument(type.getArgumentName().toString())) {
    programIdParts=arguments.get(type.getArgumentName().toString()).split("String_Node_Str");
  }
switch (type) {
case INSTANCE:
    if (programIdParts.length != 0) {
      throw new CommandInputError(this);
    }
  client.deleteInstancePreferences();
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case NAMESPACE:
if (programIdParts.length != 0) {
throw new CommandInputError(this);
}
client.deleteNamespacePreferences(cliConfig.getCurrentNamespace());
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case APP:
if (programIdParts.length != 1) {
throw new CommandInputError(this);
}
client.deleteApplicationPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]));
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case FLOW:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case PROCEDURE:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case MAPREDUCE:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case WORKFLOW:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case SERVICE:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
case SPARK:
if (programIdParts.length != 2) {
throw new CommandInputError(this);
}
client.deleteProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(),programIdParts[0]),type.getPluralName(),programIdParts[1]);
printStream.printf(SUCCESS + "String_Node_Str",type.getPrettyName());
break;
default :
throw new IllegalArgumentException("String_Node_Str" + type.getPrettyName());
}
}