Program: 188212
Project: 188212
Buggy source:
@Override protected void configureDisplay(CellTable<RiskIncidence> display){
  objectColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      if (incidence != null) {
        if (incidence.getFileId() != null) {
          return incidence.getFileId();
        }
 else         if (incidence.getRepresentationId() != null) {
          return incidence.getRepresentationId();
        }
 else         if (incidence.getAipId() != null) {
          return incidence.getAipId();
        }
      }
      return null;
    }
  }
;
  objectTypeColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      return incidence != null ? incidence.getObjectClass() : null;
    }
  }
;
  riskColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      return incidence.getRiskId();
    }
  }
;
  detectedOnColumn=new Column<RiskIncidence,Date>(new DateCell(DateTimeFormat.getFormat(PredefinedFormat.DATE_LONG))){
    @Override public Date getValue(    RiskIncidence incidence){
      return incidence != null ? incidence.getDetectedOn() : null;
    }
  }
;
  detectedByColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      return incidence != null ? incidence.getDetectedBy() : null;
    }
  }
;
  statusColumn=new Column<RiskIncidence,SafeHtml>(new SafeHtmlCell()){
    @Override public SafeHtml getValue(    RiskIncidence incidence){
      SafeHtml ret=null;
      if (incidence != null) {
        ret=HtmlSnippetUtils.getStatusDefinition(incidence.getStatus());
      }
      return ret;
    }
  }
;
  objectColumn.setSortable(true);
  objectTypeColumn.setSortable(true);
  riskColumn.setSortable(true);
  detectedOnColumn.setSortable(true);
  detectedByColumn.setSortable(true);
  statusColumn.setSortable(true);
  addColumn(objectTypeColumn,messages.riskIncidenceObjectType(),true,false,8);
  addColumn(objectColumn,messages.riskIncidenceObjectId(),false,false);
  addColumn(riskColumn,messages.riskIncidenceRisk(),false,false);
  addColumn(detectedOnColumn,messages.riskIncidenceDetectedOn(),false,false);
  addColumn(detectedByColumn,messages.riskIncidenceDetectedBy(),false,false);
  addColumn(statusColumn,messages.riskIncidenceStatus(),false,false,7);
  display.getColumnSortList().push(new ColumnSortInfo(objectTypeColumn,true));
  addStyleName("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void configureDisplay(CellTable<RiskIncidence> display){
  objectColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      if (incidence != null) {
        if (incidence.getFileId() != null) {
          return incidence.getFileId();
        }
 else         if (incidence.getRepresentationId() != null) {
          return incidence.getRepresentationId();
        }
 else         if (incidence.getAipId() != null) {
          return incidence.getAipId();
        }
      }
      return null;
    }
  }
;
  objectTypeColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      return incidence != null ? incidence.getObjectClass() : null;
    }
  }
;
  riskColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      return incidence.getRiskId();
    }
  }
;
  detectedOnColumn=new Column<RiskIncidence,Date>(new DateCell(DateTimeFormat.getFormat(RodaConstants.DEFAULT_DATETIME_FORMAT))){
    @Override public Date getValue(    RiskIncidence incidence){
      return incidence != null ? incidence.getDetectedOn() : null;
    }
  }
;
  detectedByColumn=new TextColumn<RiskIncidence>(){
    @Override public String getValue(    RiskIncidence incidence){
      return incidence != null ? incidence.getDetectedBy() : null;
    }
  }
;
  statusColumn=new Column<RiskIncidence,SafeHtml>(new SafeHtmlCell()){
    @Override public SafeHtml getValue(    RiskIncidence incidence){
      SafeHtml ret=null;
      if (incidence != null) {
        ret=HtmlSnippetUtils.getStatusDefinition(incidence.getStatus());
      }
      return ret;
    }
  }
;
  objectColumn.setSortable(true);
  objectTypeColumn.setSortable(true);
  riskColumn.setSortable(true);
  detectedOnColumn.setSortable(true);
  detectedByColumn.setSortable(true);
  statusColumn.setSortable(true);
  addColumn(objectTypeColumn,messages.riskIncidenceObjectType(),true,false,8);
  addColumn(objectColumn,messages.riskIncidenceObjectId(),false,false);
  addColumn(riskColumn,messages.riskIncidenceRisk(),false,false);
  addColumn(detectedOnColumn,messages.riskIncidenceDetectedOn(),false,false);
  addColumn(detectedByColumn,messages.riskIncidenceDetectedBy(),false,false);
  addColumn(statusColumn,messages.riskIncidenceStatus(),false,false,7);
  display.getColumnSortList().push(new ColumnSortInfo(objectTypeColumn,true));
  addStyleName("String_Node_Str");
}