Program: 45053
Project: 45053
Buggy source:
/** 
 * Creates a new FileURL from the given URL string.
 */
public FileURL(String url) throws MalformedURLException {
  try {
    int pos;
    int protocolDelimPos=url.indexOf("String_Node_Str");
    int urlLen=url.length();
    if (protocolDelimPos == -1) {
      if ((!LocalFile.USES_ROOT_DRIVES && url.startsWith("String_Node_Str")) || (LocalFile.USES_ROOT_DRIVES && url.indexOf("String_Node_Str") == 1) || url.startsWith("String_Node_Str")) {
        protocol=FileProtocols.FILE;
        host=LOCALHOST;
        String pathSeparator=getPathSeparator(FileProtocols.FILE);
        path=canonizePath(url,pathSeparator,true);
        filename=getFilenameFromPath(path,pathSeparator);
        return;
      }
 else       if (url.startsWith("String_Node_Str") && urlLen > 2) {
        if (PlatformManager.WINDOWS.isCurrent()) {
          pos=url.indexOf('\\',2);
          if (pos == -1)           url=FileProtocols.FILE + "String_Node_Str" + url.substring(2);
 else           url=FileProtocols.FILE + "String_Node_Str" + url.substring(2,pos)+ "String_Node_Str"+ (pos == urlLen - 1 ? "String_Node_Str" : url.substring(pos + 1));
          protocolDelimPos=FileProtocols.FILE.length();
        }
 else {
          url=FileProtocols.SMB + "String_Node_Str" + url.substring(2).replace('\\','/');
          protocolDelimPos=FileProtocols.SMB.length();
        }
        urlLen=url.length();
      }
 else {
        throw new MalformedURLException("String_Node_Str" + url);
      }
    }
    protocol=url.substring(0,protocolDelimPos);
    pos=protocolDelimPos + 3;
    int separatorPos=url.indexOf('/',pos);
    int questionMarkPos=FileProtocols.HTTP.equals(protocol) || FileProtocols.HTTPS.equals(protocol) ? url.indexOf('?',pos) : -1;
    int hostEndPos;
    if (separatorPos != -1)     hostEndPos=separatorPos;
 else     if (questionMarkPos != -1)     hostEndPos=questionMarkPos;
 else     hostEndPos=urlLen;
    String urlBP=url.substring(pos,hostEndPos);
    pos=0;
    int atPos=urlBP.lastIndexOf('@');
    int colonPos;
    if (atPos != -1 && (separatorPos == -1 || atPos < separatorPos)) {
      colonPos=urlBP.indexOf(':');
      String login=urlBP.substring(0,colonPos == -1 ? atPos : colonPos);
      String password;
      if (colonPos != -1)       password=urlBP.substring(colonPos + 1,atPos);
 else       password=null;
      if (!"String_Node_Str".equals(login) || !(password == null || "String_Node_Str".equals(password)))       this.credentials=new Credentials(login,password);
      pos=atPos + 1;
    }
    colonPos=urlBP.indexOf(':',pos);
    if (colonPos != -1) {
      host=urlBP.substring(pos,colonPos);
      port=Integer.parseInt(urlBP.substring(colonPos + 1));
    }
 else {
      host=urlBP.substring(pos);
    }
    if (host.equals("String_Node_Str"))     host=null;
    pos=hostEndPos;
    path=url.substring(pos,questionMarkPos == -1 ? urlLen : questionMarkPos);
    if (path.equals("String_Node_Str"))     path="String_Node_Str";
    String pathSeparator=getPathSeparator(protocol);
    path=canonizePath(path,pathSeparator,protocol.equals(FileProtocols.FILE));
    if (Debug.ON && path.trim().equals("String_Node_Str"))     Debug.trace("String_Node_Str" + url);
    if (questionMarkPos != -1)     query=url.substring(questionMarkPos);
    filename=getFilenameFromPath(path,pathSeparator);
  }
 catch (  MalformedURLException e) {
    throw e;
  }
catch (  Exception e2) {
    if (com.mucommander.Debug.ON) {
      com.mucommander.Debug.trace("String_Node_Str" + url + "String_Node_Str"+ e2);
      e2.printStackTrace();
    }
    throw new MalformedURLException();
  }
}

Fixed version (ground truth):
/** 
 * Creates a new FileURL from the given URL string.
 * @param url the string to parse as <code>FileURL</code>.
 * @throws MalformedURLException if the specified string isn't a valid URL.
 */
public FileURL(String url) throws MalformedURLException {
  try {
    int pos;
    int protocolDelimPos=url.indexOf("String_Node_Str");
    int urlLen=url.length();
    if (protocolDelimPos == -1) {
      if ((!LocalFile.USES_ROOT_DRIVES && url.startsWith("String_Node_Str")) || (LocalFile.USES_ROOT_DRIVES && url.indexOf("String_Node_Str") == 1) || url.startsWith("String_Node_Str")) {
        protocol=FileProtocols.FILE;
        host=LOCALHOST;
        String pathSeparator=getPathSeparator(FileProtocols.FILE);
        path=canonizePath(url,pathSeparator,true);
        filename=getFilenameFromPath(path,pathSeparator);
        return;
      }
 else       if (url.startsWith("String_Node_Str") && urlLen > 2) {
        if (PlatformManager.WINDOWS.isCurrent()) {
          pos=url.indexOf('\\',2);
          if (pos == -1)           url=FileProtocols.FILE + "String_Node_Str" + url.substring(2);
 else           url=FileProtocols.FILE + "String_Node_Str" + url.substring(2,pos)+ "String_Node_Str"+ (pos == urlLen - 1 ? "String_Node_Str" : url.substring(pos + 1));
          protocolDelimPos=FileProtocols.FILE.length();
        }
 else {
          url=FileProtocols.SMB + "String_Node_Str" + url.substring(2).replace('\\','/');
          protocolDelimPos=FileProtocols.SMB.length();
        }
        urlLen=url.length();
      }
 else {
        throw new MalformedURLException("String_Node_Str" + url);
      }
    }
    protocol=url.substring(0,protocolDelimPos);
    pos=protocolDelimPos + 3;
    int separatorPos=url.indexOf('/',pos);
    int questionMarkPos=FileProtocols.HTTP.equals(protocol) || FileProtocols.HTTPS.equals(protocol) ? url.indexOf('?',pos) : -1;
    int hostEndPos;
    if (separatorPos != -1)     hostEndPos=separatorPos;
 else     if (questionMarkPos != -1)     hostEndPos=questionMarkPos;
 else     hostEndPos=urlLen;
    String urlBP=url.substring(pos,hostEndPos);
    pos=0;
    int atPos=urlBP.lastIndexOf('@');
    int colonPos;
    if (atPos != -1 && (separatorPos == -1 || atPos < separatorPos)) {
      colonPos=urlBP.indexOf(':');
      String login=urlBP.substring(0,colonPos == -1 ? atPos : colonPos);
      String password;
      if (colonPos != -1)       password=urlBP.substring(colonPos + 1,atPos);
 else       password=null;
      if (!"String_Node_Str".equals(login) || !(password == null || "String_Node_Str".equals(password)))       this.credentials=new Credentials(login,password);
      pos=atPos + 1;
    }
    colonPos=urlBP.indexOf(':',pos);
    if (colonPos != -1) {
      host=urlBP.substring(pos,colonPos);
      port=Integer.parseInt(urlBP.substring(colonPos + 1));
    }
 else {
      host=urlBP.substring(pos);
    }
    if (host.equals("String_Node_Str"))     host=null;
    pos=hostEndPos;
    path=url.substring(pos,questionMarkPos == -1 ? urlLen : questionMarkPos);
    if (path.equals("String_Node_Str"))     path="String_Node_Str";
    String pathSeparator=getPathSeparator(protocol);
    path=canonizePath(path,pathSeparator,protocol.equals(FileProtocols.FILE));
    if (Debug.ON && path.trim().equals("String_Node_Str"))     Debug.trace("String_Node_Str" + url);
    if (questionMarkPos != -1)     query=url.substring(questionMarkPos);
    filename=getFilenameFromPath(path,pathSeparator);
  }
 catch (  MalformedURLException e) {
    throw e;
  }
catch (  Exception e2) {
    if (com.mucommander.Debug.ON) {
      com.mucommander.Debug.trace("String_Node_Str" + url + "String_Node_Str"+ e2);
      e2.printStackTrace();
    }
    throw new MalformedURLException();
  }
}