Program: 51696
Project: 51696
Buggy source:
/** 
 * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException, java.io.IOException {
  String queryName=request.getParameter("String_Node_Str");
  request.setAttribute("String_Node_Str",queryName);
  if (queryName != null) {
    processTransform(request,response);
    return;
  }
  String queryString=request.getParameter("String_Node_Str");
  request.setAttribute("String_Node_Str",queryString);
  String resultString="String_Node_Str";
  mondrian.olap.Connection mdxConnection=null;
  StringBuffer html=new StringBuffer();
  try {
    mdxConnection=DriverManager.getConnection(connectString,null,false);
    Query q=mdxConnection.parseQuery(queryString);
    Result result=mdxConnection.execute(q);
    Position slicers[]=result.getSlicerAxis().positions;
    html.append("String_Node_Str");
    for (int i=0; i < slicers.length; i++) {
      Position position=slicers[i];
      for (int j=0; j < position.members.length; j++) {
        Member member=position.members[j];
        html.append(member.getUniqueName());
      }
    }
    html.append("String_Node_Str");
    Position columns[]=result.getAxes()[0].positions;
    for (int i=0; i < columns.length; i++) {
      Position position=columns[i];
      for (int j=0; j < position.members.length; j++) {
        Member member=position.members[j];
        html.append("String_Node_Str" + member.getUniqueName() + "String_Node_Str");
      }
    }
    html.append("String_Node_Str");
    if (result.getAxes().length > 1) {
      for (int i=0; i < result.getAxes()[1].positions.length; i++) {
        Member m=result.getAxes()[1].positions[i].members[0];
        html.append("String_Node_Str" + m.getUniqueName() + "String_Node_Str");
        for (int j=0; j < result.getAxes()[0].positions.length; j++) {
          Cell cell=result.getCell(new int[]{j,i});
          html.append("String_Node_Str" + cell.getFormattedValue() + "String_Node_Str");
        }
        html.append("String_Node_Str");
      }
    }
 else {
      for (int i=0; i < result.getAxes()[0].positions.length; i++) {
        Cell cell=result.getCell(new int[]{i});
        html.append("String_Node_Str" + cell.getFormattedValue() + "String_Node_Str");
      }
    }
    html.append("String_Node_Str");
  }
 catch (  Throwable e) {
    html.append("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
 finally {
    if (mdxConnection != null) {
      mdxConnection.close();
    }
  }
  request.setAttribute("String_Node_Str",html.toString());
  getServletContext().getRequestDispatcher("String_Node_Str").include(request,response);
}

Fixed version (ground truth):
/** 
 * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException, java.io.IOException {
  String queryName=request.getParameter("String_Node_Str");
  request.setAttribute("String_Node_Str",queryName);
  if (queryName != null) {
    processTransform(request,response);
    return;
  }
  String queryString=request.getParameter("String_Node_Str");
  request.setAttribute("String_Node_Str",queryString);
  String resultString="String_Node_Str";
  mondrian.olap.Connection mdxConnection=null;
  StringBuffer html=new StringBuffer();
  try {
    mdxConnection=DriverManager.getConnection(connectString,null,false);
    Query q=mdxConnection.parseQuery(queryString);
    Result result=mdxConnection.execute(q);
    Position slicers[]=result.getSlicerAxis().positions;
    html.append("String_Node_Str");
    final String nl=System.getProperty("String_Node_Str");
    html.append(nl);
    final Position[] columns=result.getAxes()[0].positions, rows=result.getAxes()[1].positions;
    final int columnWidth=columns.length == 1 ? 0 : columns[0].members.length, rowWidth=rows.length == 1 ? 0 : rows[0].members.length;
    for (int j=0; j < columnWidth; j++) {
      if (j == 0) {
        html.append("String_Node_Str" + columnWidth + "String_Node_Str"+ rowWidth+ "String_Node_Str");
        for (int i=0; i < slicers.length; i++) {
          Position position=slicers[i];
          for (int k=0; k < position.members.length; k++) {
            if (k > 0) {
              html.append("String_Node_Str");
            }
            Member member=position.members[k];
            html.append(member.getUniqueName());
          }
        }
        html.append("String_Node_Str" + nl);
      }
 else {
        html.append("String_Node_Str");
      }
      for (int i=0; i < columns.length; i++) {
        Member member=columns[i].members[j];
        int width=1;
        while ((i + 1) < columns.length && columns[i + 1].members[j] == member) {
          i++;
          width++;
        }
        html.append("String_Node_Str" + width + "String_Node_Str"+ member.getUniqueName()+ "String_Node_Str");
      }
      html.append("String_Node_Str" + nl);
    }
    if (result.getAxes().length > 1) {
      for (int i=0; i < rows.length; i++) {
        html.append("String_Node_Str");
        final Position row=rows[i];
        for (int j=0; j < row.members.length; j++) {
          Member member=row.members[j];
          html.append("String_Node_Str" + member.getUniqueName() + "String_Node_Str");
        }
        for (int j=0; j < columns.length; j++) {
          Cell cell=result.getCell(new int[]{j,i});
          html.append("String_Node_Str" + cell.getFormattedValue() + "String_Node_Str");
        }
        html.append("String_Node_Str");
      }
    }
 else {
      for (int i=0; i < columns.length; i++) {
        Cell cell=result.getCell(new int[]{i});
        html.append("String_Node_Str" + cell.getFormattedValue() + "String_Node_Str");
      }
    }
    html.append("String_Node_Str");
  }
 catch (  Throwable e) {
    html.append("String_Node_Str" + e.getMessage());
    e.printStackTrace();
  }
 finally {
    if (mdxConnection != null) {
      mdxConnection.close();
    }
  }
  request.setAttribute("String_Node_Str",html.toString());
  getServletContext().getRequestDispatcher("String_Node_Str").include(request,response);
}