Program: 60184
Project: 60184
Buggy source:
/** 
 * Process script.
 */
protected final void processScript(){
  UserAgentContext bcontext=this.getUserAgentContext();
  if (bcontext == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (bcontext.isScriptingEnabled()) {
    String text;
    final String scriptURI;
    int baseLineNumber;
    String src=this.getSrc();
    Document doc=this.document;
    if (!(doc instanceof HTMLDocumentImpl)) {
      throw new IllegalStateException("String_Node_Str");
    }
    boolean liflag=loggableInfo;
    if (src == null) {
      text=this.getText();
      scriptURI=doc.getBaseURI();
      baseLineNumber=1;
    }
 else {
      this.informExternalScriptLoading();
      URL scriptURL=((HTMLDocumentImpl)doc).getFullURL(src);
      scriptURI=scriptURL == null ? src : scriptURL.toExternalForm();
      long time1=liflag ? System.currentTimeMillis() : 0;
      try {
        final HttpRequest request=bcontext.createHttpRequest();
        SecurityManager sm=System.getSecurityManager();
        if (sm == null) {
          try {
            request.open("String_Node_Str",scriptURI,false);
            request.send(null);
          }
 catch (          IOException thrown) {
            logger.log(Level.WARNING,"String_Node_Str",thrown);
          }
        }
 else {
          AccessController.doPrivileged(new PrivilegedAction<Object>(){
            @Override public Object run(){
              try {
                request.open("String_Node_Str",scriptURI,false);
                request.send(null);
              }
 catch (              IOException thrown) {
                logger.log(Level.WARNING,"String_Node_Str",thrown);
              }
              return null;
            }
          }
);
        }
        int status=request.getStatus();
        if ((status != 200) && (status != 0)) {
          text=httpURLConnection(scriptURI);
        }
 else {
          text=request.getResponseText();
        }
      }
  finally {
        if (liflag) {
          long time2=System.currentTimeMillis();
          logger.info("String_Node_Str" + scriptURI + "String_Node_Str"+ (time2 - time1)+ "String_Node_Str");
        }
      }
      baseLineNumber=1;
    }
    Context ctx=Executor.createContext(this.getDocumentURL(),bcontext);
    try {
      Scriptable scope=(Scriptable)doc.getUserData(Executor.SCOPE_KEY);
      if (scope == null) {
        throw new IllegalStateException("String_Node_Str" + Executor.SCOPE_KEY);
      }
      try {
        long time1=liflag ? System.currentTimeMillis() : 0;
        if (text == null) {
          throw new IllegalStateException("String_Node_Str" + this + "String_Node_Str");
        }
        ctx.evaluateString(scope,text,scriptURI,baseLineNumber,null);
        if (liflag) {
          long time2=System.currentTimeMillis();
          logger.info("String_Node_Str" + (time2 - time1) + "String_Node_Str");
        }
      }
 catch (      EcmaError ecmaError) {
        logger.log(Level.WARNING,"String_Node_Str" + ecmaError.sourceName() + "String_Node_Str"+ ecmaError.columnNumber()+ "String_Node_Str"+ ecmaError.getMessage(),ecmaError);
      }
catch (      MissingResourceException err) {
        logger.log(Level.WARNING,"String_Node_Str");
      }
catch (      Throwable err) {
        logger.log(Level.WARNING,"String_Node_Str",err);
      }
    }
  finally {
      Context.exit();
    }
  }
}

Fixed version (ground truth):
/** 
 * Process script.
 */
protected final void processScript(){
  UserAgentContext bcontext=this.getUserAgentContext();
  if (bcontext != null && bcontext.isScriptingEnabled()) {
    String text;
    final String scriptURI;
    int baseLineNumber;
    String src=this.getSrc();
    Document doc=this.document;
    if (doc instanceof HTMLDocumentImpl) {
      boolean liflag=loggableInfo;
      if (src == null) {
        text=this.getText();
        scriptURI=doc.getBaseURI();
        baseLineNumber=1;
      }
 else {
        this.informExternalScriptLoading();
        URL scriptURL=((HTMLDocumentImpl)doc).getFullURL(src);
        scriptURI=scriptURL == null ? src : scriptURL.toExternalForm();
        long time1=liflag ? System.currentTimeMillis() : 0;
        try {
          final HttpRequest request=bcontext.createHttpRequest();
          SecurityManager sm=System.getSecurityManager();
          if (sm == null) {
            try {
              request.open("String_Node_Str",scriptURI,false);
              request.send(null);
            }
 catch (            IOException thrown) {
              logger.log(Level.WARNING,"String_Node_Str",thrown);
            }
          }
 else {
            AccessController.doPrivileged(new PrivilegedAction<Object>(){
              @Override public Object run(){
                try {
                  request.open("String_Node_Str",scriptURI,false);
                  request.send(null);
                }
 catch (                IOException thrown) {
                  logger.log(Level.WARNING,"String_Node_Str",thrown);
                }
                return null;
              }
            }
);
          }
          int status=request.getStatus();
          if ((status != 200) && (status != 0)) {
            text=httpURLConnection(scriptURI);
          }
 else {
            text=request.getResponseText();
          }
        }
  finally {
          if (liflag) {
            long time2=System.currentTimeMillis();
            logger.info("String_Node_Str" + scriptURI + "String_Node_Str"+ (time2 - time1)+ "String_Node_Str");
          }
        }
        baseLineNumber=1;
      }
      Context ctx=Executor.createContext(this.getDocumentURL(),bcontext);
      try {
        Scriptable scope=(Scriptable)doc.getUserData(Executor.SCOPE_KEY);
        if (scope != null) {
          long time1=liflag ? System.currentTimeMillis() : 0;
          if (text != null) {
            ctx.evaluateString(scope,text,scriptURI,baseLineNumber,null);
            if (liflag) {
              long time2=System.currentTimeMillis();
              logger.info("String_Node_Str" + (time2 - time1) + "String_Node_Str");
            }
          }
 else {
            logger.severe("String_Node_Str" + scriptURI);
          }
        }
 else {
          logger.severe("String_Node_Str");
        }
      }
 catch (      EcmaError ecmaError) {
        logger.log(Level.WARNING,"String_Node_Str" + ecmaError.sourceName() + "String_Node_Str"+ ecmaError.columnNumber()+ "String_Node_Str"+ ecmaError.getMessage(),ecmaError);
      }
catch (      MissingResourceException err) {
        logger.log(Level.WARNING,"String_Node_Str");
      }
catch (      Exception err) {
        logger.severe("String_Node_Str" + scriptURI);
        logger.log(Level.WARNING,"String_Node_Str",err);
      }
 finally {
        Context.exit();
      }
    }
  }
 else {
    logger.severe("String_Node_Str");
  }
}