Program: 74196
Project: 74196
Buggy source:
/** 
 * Get the code generator helper associated with the given object.
 * @param object The given object.
 * @return The code generator helper.
 * @throws IllegalActionException If the helper class cannot be found.
 */
protected Object _getHelper(Object object) throws IllegalActionException {
  if (_helperStore.containsKey(object)) {
    return _helperStore.get(object);
  }
  String packageName=generatorPackage.stringValue();
  String className=object.getClass().getName();
  ActorCodeGenerator helperObject=null;
  String helperClassName=className.replaceFirst("String_Node_Str",packageName);
  String targetValue=target.getExpression();
  if (!targetValue.equals(_DEFAULT_TARGET)) {
    String targetSubDirectory="String_Node_Str" + targetValue;
    try {
      helperObject=_instantiateHelper(object,helperClassName);
      _helperStore.put(object,helperObject);
      return helperObject;
    }
 catch (    Exception ex) {
    }
  }
  if (helperClassName.equals(className)) {
    try {
      helperClassName=packageName + "String_Node_Str" + className;
      helperObject=_instantiateHelper(object,helperClassName);
    }
 catch (    Exception ex) {
      throw new IllegalActionException("String_Node_Str" + className + "String_Node_Str"+ helperClassName+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ packageName+ "String_Node_Str");
    }
    if (helperObject != null) {
      _helperStore.put(object,helperObject);
      return helperObject;
    }
  }
  try {
    helperObject=_instantiateHelper(object,helperClassName);
  }
 catch (  Exception ex) {
    helperClassName=className.replaceFirst("String_Node_Str","String_Node_Str");
    helperObject=_instantiateHelper(object,helperClassName);
  }
  _helperStore.put(object,helperObject);
  return helperObject;
}

Fixed version (ground truth):
/** 
 * Get the code generator helper associated with the given object.
 * @param object The given object.
 * @return The code generator helper.
 * @throws IllegalActionException If the helper class cannot be found.
 */
protected Object _getHelper(Object object) throws IllegalActionException {
  if (_helperStore.containsKey(object)) {
    return _helperStore.get(object);
  }
  String packageName=generatorPackage.stringValue();
  String className=object.getClass().getName();
  ActorCodeGenerator helperObject=null;
  String helperClassName=className.replaceFirst("String_Node_Str",packageName);
  String targetValue=target.getExpression();
  if (!targetValue.equals(_DEFAULT_TARGET)) {
    String targetSubDirectory="String_Node_Str" + targetValue;
    try {
      helperClassName=className.replaceFirst("String_Node_Str",packageName + targetSubDirectory);
      helperObject=_instantiateHelper(object,helperClassName);
      _helperStore.put(object,helperObject);
      return helperObject;
    }
 catch (    Exception ex) {
    }
  }
  if (helperClassName.equals(className)) {
    try {
      helperClassName=packageName + "String_Node_Str" + className;
      helperObject=_instantiateHelper(object,helperClassName);
    }
 catch (    Exception ex) {
      throw new IllegalActionException("String_Node_Str" + className + "String_Node_Str"+ helperClassName+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ packageName+ "String_Node_Str");
    }
    if (helperObject != null) {
      _helperStore.put(object,helperObject);
      return helperObject;
    }
  }
  try {
    helperClassName=className.replaceFirst("String_Node_Str",packageName);
    helperObject=_instantiateHelper(object,helperClassName);
  }
 catch (  Exception ex) {
    helperClassName=className.replaceFirst("String_Node_Str","String_Node_Str");
    helperObject=_instantiateHelper(object,helperClassName);
  }
  _helperStore.put(object,helperObject);
  return helperObject;
}