Program: 42296
Project: 42296
Buggy source:
@Override protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  OutputStream out=null;
  Shell shell=null;
  try {
    String spath=request.getServletPath();
    String path=spath.substring(1);
    if (Util.isBlank(path) || path.equals("String_Node_Str"))     path="String_Node_Str";
    XVariable xp=parseParams(request);
    XVariable headers=parseHeaders(request);
    List<XValue> vargs=new ArrayList<XValue>();
    shell=new Shell(false);
    shell.setCurdir(new File(mRoot));
    ICommand script=CommandFactory.getInstance().getScript(shell,path,true,null);
    if (script != null) {
      ByteArrayOutputStream bos=new ByteArrayOutputStream();
      XEnvironment env=shell.getEnv();
      env.setStdout(new StreamOutputPort(bos,false));
      env.setStderr(new StreamOutputPort(new NullOutputStream(),false));
      env.setStdin(new NullInputStream());
      if (xp != null)       env.setVar(xp,false);
      if (headers != null)       env.setVar(headers,false);
      ManagedHttpSession mhs=new ManagedHttpSession(request.getSession());
      shell.getSession().setVar("String_Node_Str",mhs);
      mhs.release();
      int ret=script.run(shell,path,vargs);
      String ct=shell.getSerializeOpts().getContent_type() + "String_Node_Str" + shell.getSerializeOpts().getEncoding();
      response.setContentType(ct);
      OutputStream os=response.getOutputStream();
      Util.copyStream(new ByteArrayInputStream(bos.toByteArray()),os);
    }
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
 finally {
    if (shell != null)     shell.close();
  }
}

Fixed version (ground truth):
@Override protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  OutputStream out=null;
  Shell shell=null;
  try {
    String spath=request.getServletPath();
    String path=spath.substring(1);
    if (Util.isBlank(path) || path.equals("String_Node_Str"))     path="String_Node_Str";
    XVariable xp=parseParams(request);
    XVariable headers=parseHeaders(request);
    List<XValue> vargs=new ArrayList<XValue>();
    shell=new Shell(false);
    shell.setCurdir(new File(mRoot));
    ICommand script=CommandFactory.getInstance().getScript(shell,path,true,null);
    if (script != null) {
      ByteArrayOutputStream bos=new ByteArrayOutputStream();
      XEnvironment env=shell.getEnv();
      env.setStdout(new StreamOutputPort(bos,false));
      env.setStderr(new StreamOutputPort(new NullOutputStream(),false));
      env.setStdin(new NullInputStream());
      if (xp != null)       env.setVar(xp,false);
      if (headers != null)       env.setVar(headers,false);
      ManagedHttpSession mhs=new ManagedHttpSession(request.getSession());
      shell.getSession().setVar("String_Node_Str",mhs);
      mhs.release();
      @SuppressWarnings("String_Node_Str") int ret=script.run(shell,path,vargs);
      String ct=shell.getSerializeOpts().getContent_type() + "String_Node_Str" + shell.getSerializeOpts().getEncoding();
      response.setContentType(ct);
      OutputStream os=response.getOutputStream();
      Util.copyStream(new ByteArrayInputStream(bos.toByteArray()),os);
    }
  }
 catch (  Exception e) {
    throw new ServletException(e);
  }
 finally {
    if (shell != null)     shell.close();
  }
}