Program: 75338
Project: 75338
Buggy source:
/** 
 * Parse a command-line argument.
 * @return True if the argument is understood, false otherwise.
 * @exception Exception If something goes wrong.
 */
protected boolean _parseArg(String arg) throws Exception {
  if (arg.equals("String_Node_Str")) {
    _expectingClass=true;
  }
 else   if (arg.equals("String_Node_Str")) {
    System.out.println(_usage());
    System.exit(0);
  }
 else   if (arg.equals("String_Node_Str")) {
    _test=true;
  }
 else   if (arg.equals("String_Node_Str")) {
    System.out.println("String_Node_Str" + VersionAttribute.CURRENT_VERSION + "String_Node_Str");
    System.exit(0);
  }
 else   if (arg.equals("String_Node_Str")) {
  }
 else {
    if (_expectingClass) {
      _expectingClass=false;
      Class newClass=Class.forName(arg);
      Workspace workspace=new Workspace();
      Class[] argTypes=new Class[1];
      argTypes[0]=workspace.getClass();
      Constructor constructor=newClass.getConstructor(argTypes);
      Object args[]=new Object[1];
      args[0]=workspace;
      NamedObj newModel=(NamedObj)constructor.newInstance(args);
      if (_config != null) {
        PtolemyEffigy effigy=new PtolemyEffigy(_config.workspace());
        effigy.setModel(newModel);
        ModelDirectory directory=(ModelDirectory)_config.getEntity("String_Node_Str");
        effigy.setName(arg);
        if (directory != null) {
          if (directory.getEntity(arg) != null) {
            int count=2;
            String newName=arg + "String_Node_Str" + count;
            while (directory.getEntity(newName) != null) {
              count++;
            }
            effigy.setName(newName);
          }
        }
        effigy.setContainer(directory);
      }
    }
 else {
      if (!arg.startsWith("String_Node_Str")) {
        URL inURL=specToURL(arg);
        URL base=inURL;
        if (_config != null) {
          ModelDirectory directory=(ModelDirectory)_config.getEntity("String_Node_Str");
          if (directory == null) {
            throw new InternalErrorException("String_Node_Str");
          }
          String key=inURL.toExternalForm();
          _config.openModel(base,inURL,key);
        }
 else {
          _parser.reset();
          try {
            NamedObj toplevel=_parser.parse(base,inURL.openStream());
            if (toplevel instanceof Configuration) {
              _config=(Configuration)toplevel;
            }
          }
 catch (          Exception ex) {
            String detailMessage="String_Node_Str";
            try {
              if (inURL.toString().indexOf("String_Node_Str") != -1 && inURL.toString().indexOf("String_Node_Str") != -1) {
                detailMessage="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
              }
            }
 catch (            Exception ex2) {
            }
            throw new Exception("String_Node_Str" + inURL + "String_Node_Str"+ detailMessage,ex);
          }
        }
      }
 else {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Parse a command-line argument.
 * @return True if the argument is understood, false otherwise.
 * @exception Exception If something goes wrong.
 */
protected boolean _parseArg(String arg) throws Exception {
  if (arg.equals("String_Node_Str")) {
    _expectingClass=true;
  }
 else   if (arg.equals("String_Node_Str")) {
    System.out.println(_usage());
    System.exit(0);
  }
 else   if (arg.equals("String_Node_Str")) {
    _test=true;
  }
 else   if (arg.equals("String_Node_Str")) {
    System.out.println("String_Node_Str" + VersionAttribute.CURRENT_VERSION + "String_Node_Str");
    System.exit(0);
  }
 else   if (arg.equals("String_Node_Str")) {
  }
 else {
    if (_expectingClass) {
      _expectingClass=false;
      Class newClass=Class.forName(arg);
      Workspace workspace=new Workspace();
      Class[] argTypes=new Class[1];
      argTypes[0]=workspace.getClass();
      Constructor constructor=newClass.getConstructor(argTypes);
      Object args[]=new Object[1];
      args[0]=workspace;
      NamedObj newModel=(NamedObj)constructor.newInstance(args);
      if (_config != null) {
        PtolemyEffigy effigy=new PtolemyEffigy(_config.workspace());
        effigy.setModel(newModel);
        ModelDirectory directory=(ModelDirectory)_config.getEntity("String_Node_Str");
        effigy.setName(arg);
        if (directory != null) {
          if (directory.getEntity(arg) != null) {
            int count=2;
            String newName=arg + "String_Node_Str" + count;
            while (directory.getEntity(newName) != null) {
              count++;
            }
            effigy.setName(newName);
          }
        }
        effigy.setContainer(directory);
      }
    }
 else {
      if (!arg.startsWith("String_Node_Str")) {
        URL inURL=specToURL(arg);
        URL base=inURL;
        if (_config != null) {
          ModelDirectory directory=(ModelDirectory)_config.getEntity("String_Node_Str");
          if (directory == null) {
            throw new InternalErrorException("String_Node_Str");
          }
          String key=inURL.toExternalForm();
          _config.openModel(base,inURL,key);
        }
 else {
          _parser.reset();
          try {
            NamedObj toplevel=_parser.parse(base,inURL);
            if (toplevel instanceof Configuration) {
              _config=(Configuration)toplevel;
            }
          }
 catch (          Exception ex) {
            String detailMessage="String_Node_Str";
            try {
              if (inURL.toString().indexOf("String_Node_Str") != -1 && inURL.toString().indexOf("String_Node_Str") != -1) {
                detailMessage="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
              }
            }
 catch (            Exception ex2) {
            }
            throw new Exception("String_Node_Str" + inURL + "String_Node_Str"+ detailMessage,ex);
          }
        }
      }
 else {
        return false;
      }
    }
  }
  return true;
}