Program: 77801
Project: 77801
Buggy source:
/** 
 * compile simple column ref expression
 * @param refNode
 * @param rowName
 * @param columnExprList
 */
private void compileSimpleColumnRefExpr(Node refNode,Node rowName,List columnExprList){
  String str=rowName.getString();
  assert(str != null);
  if (!str.equals(ROW_INDICATOR))   return;
  Node rowColumn=rowName.getNext();
  assert(rowColumn != null);
  if (refNode.getType() == Token.GETPROP && rowColumn.getType() == Token.STRING) {
    int outer_count=0;
    if ("String_Node_Str".equals(rowColumn.getString()) || "String_Node_Str".equals(rowColumn.getString()))     return;
    if ("String_Node_Str".equals(rowColumn.getString())) {
      outer_count++;
      Node outer_Node=refNode.getNext();
      Node before_Node=outer_Node;
      while (outer_Node != null && outer_Node.getString() != null && "String_Node_Str".equals(outer_Node.getString())) {
        outer_count++;
        before_Node=outer_Node;
        outer_Node=outer_Node.getNext();
      }
      ColumnBinding info=new ColumnBinding(before_Node.getString(),"String_Node_Str",outer_count);
      columnExprList.add(info);
      return;
    }
    ColumnBinding binding=new ColumnBinding(rowColumn.getString(),DATASETROW_INDICATOR + "String_Node_Str" + rowColumn.getString()+ "String_Node_Str");
    columnExprList.add(binding);
  }
  if (refNode.getType() == Token.GETELEM) {
    if (rowColumn.getType() == Token.NUMBER) {
      if (0 == rowColumn.getDouble())       return;
    }
 else     if (rowColumn.getType() == Token.STRING) {
      if ("String_Node_Str".equals(rowColumn.getString()))       return;
      ColumnBinding binding=new ColumnBinding(rowColumn.getString(),DATASETROW_INDICATOR + "String_Node_Str" + rowColumn.getString()+ "String_Node_Str");
      columnExprList.add(binding);
    }
  }
}

Fixed version (ground truth):
/** 
 * compile simple column ref expression
 * @param refNode
 * @param rowName
 * @param columnExprList
 * @throws BirtException 
 */
private void compileSimpleColumnRefExpr(Node refNode,ScriptOrFnNode tree,List columnExprList) throws BirtException {
  Node rowName=refNode.getFirstChild();
  String str=rowName.getString();
  assert(str != null);
  Node rowColumn=rowName.getNext();
  assert(rowColumn != null);
  if (!str.equals(ROW_INDICATOR)) {
    if (rowColumn != null && rowColumn.getNext() != null)     processChild(rowColumn.getNext(),tree,columnExprList);
    return;
  }
  if ((refNode.getType() == Token.GETPROP || refNode.getType() == Token.SETPROP) && rowColumn.getType() == Token.STRING) {
    int outer_count=0;
    if ("String_Node_Str".equals(rowColumn.getString()) || "String_Node_Str".equals(rowColumn.getString()))     return;
    if ("String_Node_Str".equals(rowColumn.getString())) {
      outer_count++;
      Node outer_Node=refNode.getNext();
      Node before_Node=outer_Node;
      while (outer_Node != null && outer_Node.getString() != null && "String_Node_Str".equals(outer_Node.getString())) {
        outer_count++;
        before_Node=outer_Node;
        outer_Node=outer_Node.getNext();
      }
      ColumnBinding info=new ColumnBinding(before_Node.getString(),"String_Node_Str",outer_count);
      columnExprList.add(info);
      return;
    }
    ColumnBinding binding=new ColumnBinding(rowColumn.getString(),DATASETROW_INDICATOR + "String_Node_Str" + rowColumn.getString()+ "String_Node_Str");
    columnExprList.add(binding);
  }
  if (refNode.getType() == Token.GETELEM || refNode.getType() == Token.SETELEM) {
    if (rowColumn.getType() == Token.NUMBER) {
      if (0 == rowColumn.getDouble())       return;
    }
 else     if (rowColumn.getType() == Token.STRING) {
      if ("String_Node_Str".equals(rowColumn.getString()))       return;
      ColumnBinding binding=new ColumnBinding(rowColumn.getString(),DATASETROW_INDICATOR + "String_Node_Str" + rowColumn.getString()+ "String_Node_Str");
      columnExprList.add(binding);
    }
  }
  if (rowColumn != null && rowColumn.getNext() != null)   processChild(rowColumn.getNext(),tree,columnExprList);
}