Program: 76649
Project: 76649
Buggy source:
/** 
 * Open up the input file, which could be stdin, a URL or a file. This code can be called from an application, which means that getDocumentBase() might fail.
 */
public void parseFile(String dataurl,URL documentBase){
  DataInputStream in;
  if (_debug > 2)   System.out.println("String_Node_Str" + dataurl + "String_Node_Str"+ documentBase+ "String_Node_Str"+ _dataurl+ "String_Node_Str"+ _documentBase);
  if (dataurl == null || dataurl.length() == 0) {
    in=new DataInputStream(System.in);
  }
 else {
    try {
      URL url;
      if (documentBase == null && _documentBase != null) {
        documentBase=_documentBase;
      }
      if (documentBase == null) {
        url=new URL(_dataurl);
      }
 else {
        try {
          url=new URL(documentBase,dataurl);
        }
 catch (        NullPointerException e) {
          url=new URL(_dataurl);
        }
      }
      in=new DataInputStream(url.openStream());
    }
 catch (    MalformedURLException e) {
      try {
        in=new DataInputStream(new FileInputStream(dataurl));
      }
 catch (      FileNotFoundException me) {
        _errorMsg=new String[2];
        _errorMsg[0]="String_Node_Str" + dataurl;
        _errorMsg[1]=e.getMessage();
        return;
      }
catch (      SecurityException me) {
        _errorMsg=new String[2];
        _errorMsg[0]="String_Node_Str" + dataurl;
        _errorMsg[1]=e.getMessage();
        return;
      }
    }
catch (    IOException ioe) {
      _errorMsg=new String[2];
      _errorMsg[0]="String_Node_Str" + dataurl;
      _errorMsg[1]=ioe.getMessage();
      return;
    }
  }
  _newFile();
  try {
    if (_binary) {
      _parseBinaryStream(in);
    }
 else {
      String line=in.readLine();
      while (line != null) {
        _parseLine(line);
        line=in.readLine();
      }
    }
  }
 catch (  MalformedURLException e) {
    _errorMsg=new String[2];
    _errorMsg[0]="String_Node_Str" + dataurl;
    _errorMsg[1]=e.getMessage();
    return;
  }
catch (  IOException e) {
    _errorMsg=new String[2];
    _errorMsg[0]="String_Node_Str" + dataurl;
    _errorMsg[1]=e.getMessage();
  }
catch (  PlotDataException e) {
    _errorMsg=new String[2];
    _errorMsg[0]="String_Node_Str" + dataurl;
    _errorMsg[1]=e.getMessage();
  }
 finally {
    try {
      in.close();
    }
 catch (    IOException me) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Open up the input file, which could be stdin, a URL or a file. This code can be called from an application, which means that getDocumentBase() might fail.
 */
public void parseFile(String dataurl,URL documentBase){
  DataInputStream in;
  if (_debug > 2)   System.out.println("String_Node_Str" + dataurl + "String_Node_Str"+ documentBase+ "String_Node_Str"+ _dataurl+ "String_Node_Str"+ _documentBase);
  if (dataurl == null || dataurl.length() == 0) {
    in=new DataInputStream(System.in);
  }
 else {
    try {
      URL url;
      if (documentBase == null && _documentBase != null) {
        documentBase=_documentBase;
      }
      if (documentBase == null) {
        url=new URL(_dataurl);
      }
 else {
        try {
          url=new URL(documentBase,dataurl);
        }
 catch (        NullPointerException e) {
          url=new URL(_dataurl);
        }
      }
      in=new DataInputStream(url.openStream());
    }
 catch (    MalformedURLException e) {
      try {
        in=new DataInputStream(new FileInputStream(dataurl));
      }
 catch (      FileNotFoundException me) {
        _errorMsg=new String[2];
        _errorMsg[0]="String_Node_Str" + dataurl;
        _errorMsg[1]=me.getMessage();
        return;
      }
catch (      SecurityException me) {
        _errorMsg=new String[2];
        _errorMsg[0]="String_Node_Str" + dataurl;
        _errorMsg[1]=me.getMessage();
        return;
      }
    }
catch (    IOException ioe) {
      _errorMsg=new String[2];
      _errorMsg[0]="String_Node_Str" + dataurl;
      _errorMsg[1]=ioe.getMessage();
      return;
    }
  }
  _newFile();
  try {
    if (_binary) {
      _parseBinaryStream(in);
    }
 else {
      String line=in.readLine();
      while (line != null) {
        _parseLine(line);
        line=in.readLine();
      }
    }
  }
 catch (  MalformedURLException e) {
    _errorMsg=new String[2];
    _errorMsg[0]="String_Node_Str" + dataurl;
    _errorMsg[1]=e.getMessage();
    return;
  }
catch (  IOException e) {
    _errorMsg=new String[2];
    _errorMsg[0]="String_Node_Str" + dataurl;
    _errorMsg[1]=e.getMessage();
  }
catch (  PlotDataException e) {
    _errorMsg=new String[2];
    _errorMsg[0]="String_Node_Str" + dataurl;
    _errorMsg[1]=e.getMessage();
  }
 finally {
    try {
      in.close();
    }
 catch (    IOException me) {
    }
  }
}