Program: 73863
Project: 73863
Buggy source:
/** 
 * Generate the assembly file associated for this PtidyOS program. Here we return an empty string, but the target specific adapter should overwrite it.
 * @return The generated assembly file code.
 * @exception IllegalActionException
 */
public StringBuffer generateAsseblyFile() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  Map devices=new HashMap<Actor,String>();
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)getComponent().getContainer()).deepEntityList()) {
    if (actor instanceof LuminarySensorInputDevice) {
      devices.put(actor,new String("String_Node_Str" + NamedProgramCodeGeneratorAdapter.generateName((NamedObj)actor)));
    }
  }
  List args=new LinkedList();
  StringBuffer externs=new StringBuffer();
  for (  Actor actor : (Set<Actor>)devices.keySet()) {
    externs.append("String_Node_Str" + devices.get(actor) + _eol);
  }
  args.add(externs.toString());
  int configurationSize=LuminarySensorInputDevice.numberOfSupportedInputDeviceConfigurations;
  String[] GPHandlers=new String[configurationSize];
  boolean foundConfig=false;
  for (  LuminarySensorInputDevice actor : (Set<LuminarySensorInputDevice>)devices.keySet()) {
    for (int i=0; i < actor.supportedConfigurations().size(); i++) {
      if (actor.configuration().compareTo(actor.supportedConfigurations().get(i)) == 0) {
        if (1 == 1) {
          throw new RuntimeException("String_Node_Str");
        }
        foundConfig=true;
        break;
      }
    }
    if (foundConfig == false) {
      throw new IllegalActionException(actor,"String_Node_Str" + "String_Node_Str");
    }
  }
  for (int i=0; i < configurationSize; i++) {
    if (GPHandlers[i] == null) {
      args.add("String_Node_Str");
    }
 else {
      args.add(GPHandlers[i]);
    }
  }
  code.append(_templateParser.getCodeStream().getCodeBlock("String_Node_Str",args));
  return code;
}

Fixed version (ground truth):
/** 
 * Generate the assembly file associated for this PtidyOS program. Here we return an empty string, but the target specific adapter should overwrite it.
 * @return The generated assembly file code.
 * @exception IllegalActionException
 */
public StringBuffer generateAsseblyFile() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  Map devices=new HashMap<Actor,String>();
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)getComponent().getContainer()).deepEntityList()) {
    if (actor instanceof LuminarySensorInputDevice) {
      devices.put(actor,new String("String_Node_Str" + NamedProgramCodeGeneratorAdapter.generateName((NamedObj)actor)));
    }
  }
  List args=new LinkedList();
  StringBuffer externs=new StringBuffer();
  for (  Actor actor : (Set<Actor>)devices.keySet()) {
    externs.append("String_Node_Str" + devices.get(actor) + _eol);
  }
  args.add(externs.toString());
  int configurationSize=LuminarySensorInputDevice.numberOfSupportedInputDeviceConfigurations;
  String[] GPHandlers=new String[configurationSize];
  boolean foundConfig=false;
  for (  LuminarySensorInputDevice actor : (Set<LuminarySensorInputDevice>)devices.keySet()) {
    for (int i=0; i < actor.supportedConfigurations().size(); i++) {
      if (actor.configuration().compareTo(actor.supportedConfigurations().get(i)) == 0) {
        GPHandlers[i + Integer.parseInt(actor.startingConfiguration())]=(String)devices.get(actor);
        foundConfig=true;
        break;
      }
    }
    if (foundConfig == false) {
      throw new IllegalActionException(actor,"String_Node_Str" + "String_Node_Str");
    }
  }
  for (int i=0; i < configurationSize; i++) {
    if (GPHandlers[i] == null) {
      args.add("String_Node_Str");
    }
 else {
      args.add(GPHandlers[i]);
    }
  }
  code.append(_templateParser.getCodeStream().getCodeBlock("String_Node_Str",args));
  return code;
}