Program: 65505
Project: 65505
Buggy source:
protected static void insertToCell(DataSetHandle model,TableHandle tableHandle,SlotHandle slot,ResultSetColumnHandle[] columns,boolean isLabel){
  for (int i=0; i < slot.getCount(); i++) {
    SlotHandle cells=((RowHandle)slot.get(i)).getCells();
    for (int j=0; j < cells.getCount(); j++) {
      CellHandle cell=(CellHandle)cells.get(j);
      try {
        if (isLabel) {
          LabelHandle labelItemHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newLabel(null);
          String labelText=UIUtil.getColumnDisplayName(columns[j]);
          if (labelText != null) {
            labelItemHandle.setText(labelText);
          }
          String displayKey=UIUtil.getColumnDisplayNameKey(columns[j]);
          if (displayKey != null) {
            labelItemHandle.setTextKey(displayKey);
          }
          cell.addElement(labelItemHandle,cells.getSlotID());
        }
 else {
          DataItemHandle dataHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newDataItem(null);
          dataHandle.setResultSetColumn(columns[j].getColumnName());
          formatDataHandle(dataHandle,columns[j]);
          cell.addElement(dataHandle,cells.getSlotID());
          ComputedColumn bindingColumn=StructureFactory.newComputedColumn(tableHandle,columns[j].getColumnName());
          bindingColumn.setDataType(columns[j].getDataType());
          ExpressionUtility.setBindingColumnExpression(columns[j],bindingColumn);
          bindingColumn.setDisplayName(UIUtil.getColumnDisplayName(columns[j]));
          String displayKey=UIUtil.getColumnDisplayNameKey(columns[j]);
          if (displayKey != null)           bindingColumn.setDisplayNameID(displayKey);
          tableHandle.addColumnBinding(bindingColumn,false);
          ActionHandle actionHandle=UIUtil.getColumnAction(columns[j]);
          if (actionHandle != null) {
            List source=new ArrayList();
            source.add(actionHandle.getStructure());
            List newAction=ModelUtil.cloneStructList(source);
            dataHandle.setAction((Action)newAction.get(0));
          }
        }
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
}

Fixed version (ground truth):
protected static void insertToCell(DataSetHandle model,TableHandle tableHandle,SlotHandle slot,ResultSetColumnHandle[] columns,boolean isLabel){
  for (int i=0; i < slot.getCount(); i++) {
    SlotHandle cells=((RowHandle)slot.get(i)).getCells();
    for (int j=0; j < cells.getCount(); j++) {
      CellHandle cell=(CellHandle)cells.get(j);
      try {
        if (isLabel) {
          LabelHandle labelItemHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newLabel(null);
          String labelText=UIUtil.getColumnDisplayName(columns[j]);
          if (labelText != null) {
            labelItemHandle.setText(labelText);
          }
          String displayKey=UIUtil.getColumnHeaderDisplayNameKey(columns[j]);
          if (displayKey == null) {
            displayKey=UIUtil.getColumnDisplayNameKey(columns[j]);
          }
          if (displayKey != null) {
            labelItemHandle.setTextKey(displayKey);
          }
          cell.addElement(labelItemHandle,cells.getSlotID());
        }
 else {
          DataItemHandle dataHandle=SessionHandleAdapter.getInstance().getReportDesignHandle().getElementFactory().newDataItem(null);
          dataHandle.setResultSetColumn(columns[j].getColumnName());
          formatDataHandle(dataHandle,columns[j]);
          cell.addElement(dataHandle,cells.getSlotID());
          ComputedColumn bindingColumn=StructureFactory.newComputedColumn(tableHandle,columns[j].getColumnName());
          bindingColumn.setDataType(columns[j].getDataType());
          ExpressionUtility.setBindingColumnExpression(columns[j],bindingColumn);
          bindingColumn.setDisplayName(UIUtil.getColumnDisplayName(columns[j]));
          String displayKey=UIUtil.getColumnDisplayNameKey(columns[j]);
          if (displayKey != null)           bindingColumn.setDisplayNameID(displayKey);
          tableHandle.addColumnBinding(bindingColumn,false);
          ActionHandle actionHandle=UIUtil.getColumnAction(columns[j]);
          if (actionHandle != null) {
            List source=new ArrayList();
            source.add(actionHandle.getStructure());
            List newAction=ModelUtil.cloneStructList(source);
            dataHandle.setAction((Action)newAction.get(0));
          }
        }
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
}