Program: 70045
Project: 70045
Buggy source:
public RevisionListController(UserRequest ureq,WindowControl wControl,Versionable versionedFile,String title,String description){
  super(ureq,wControl);
  this.versionedFile=versionedFile;
  TableGuiConfiguration summaryTableConfig=new TableGuiConfiguration();
  summaryTableConfig.setDownloadOffered(true);
  summaryTableConfig.setTableEmptyMessage(getTranslator().translate("String_Node_Str"));
  revisionListTableCtr=new TableController(summaryTableConfig,ureq,getWindowControl(),getTranslator());
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",0,null,ureq.getLocale()){
    @Override public int compareTo(    int rowa,    int rowb){
      Object a=table.getTableDataModel().getValueAt(rowa,dataColumn);
      Object b=table.getTableDataModel().getValueAt(rowb,dataColumn);
      if (a == null || b == null) {
        boolean bb=(b == null);
        return (a == null) ? (bb ? 0 : -1) : (bb ? 1 : 0);
      }
      try {
        Long la=new Long((String)a);
        Long lb=new Long((String)b);
        return la.compareTo(lb);
      }
 catch (      NumberFormatException e) {
        return super.compareTo(rowa,rowb);
      }
    }
  }
);
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",1,null,ureq.getLocale()));
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",2,null,ureq.getLocale()));
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",3,null,ureq.getLocale()));
  revisionListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_DOWNLOAD,"String_Node_Str",getTranslator().translate("String_Node_Str")));
  revisionListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_RESTORE,"String_Node_Str",getTranslator().translate("String_Node_Str")));
  revisionListTableCtr.addMultiSelectAction("String_Node_Str",CMD_DELETE);
  revisionListTableCtr.addMultiSelectAction("String_Node_Str",CMD_CANCEL);
  revisionListTableCtr.setMultiSelect(true);
  List<VFSRevision> revisions=new ArrayList<VFSRevision>(versionedFile.getVersions().getRevisions());
  revisions.add(new CurrentRevision((VFSLeaf)versionedFile));
  revisionListTableCtr.setTableDataModel(new RevisionListDataModel(revisions,ureq.getLocale()));
  listenTo(revisionListTableCtr);
  mainVC=createVelocityContainer("String_Node_Str");
  mainVC.put("String_Node_Str",revisionListTableCtr.getInitialComponent());
  if (StringHelper.containsNonWhitespace(title)) {
    mainVC.contextPut("String_Node_Str",title);
  }
  if (StringHelper.containsNonWhitespace(description)) {
    mainVC.contextPut("String_Node_Str",description);
  }
  putInitialPanel(mainVC);
}

Fixed version (ground truth):
public RevisionListController(UserRequest ureq,WindowControl wControl,Versionable versionedFile,String title,String description){
  super(ureq,wControl);
  VFSLeaf versionedLeaf=null;
  if (versionedFile instanceof VFSLeaf) {
    versionedLeaf=(VFSLeaf)versionedFile;
  }
  if (versionedLeaf != null && versionedLeaf.getParentContainer() != null) {
    versionedLeaf=(VFSLeaf)versionedLeaf.getParentContainer().resolve(((VFSLeaf)versionedFile).getName());
    if (versionedLeaf instanceof Versionable) {
      versionedFile=(Versionable)versionedLeaf;
    }
  }
  this.versionedFile=versionedFile;
  TableGuiConfiguration summaryTableConfig=new TableGuiConfiguration();
  summaryTableConfig.setDownloadOffered(true);
  summaryTableConfig.setTableEmptyMessage(getTranslator().translate("String_Node_Str"));
  revisionListTableCtr=new TableController(summaryTableConfig,ureq,getWindowControl(),getTranslator());
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",0,null,ureq.getLocale()){
    @Override public int compareTo(    int rowa,    int rowb){
      Object a=table.getTableDataModel().getValueAt(rowa,dataColumn);
      Object b=table.getTableDataModel().getValueAt(rowb,dataColumn);
      if (a == null || b == null) {
        boolean bb=(b == null);
        return (a == null) ? (bb ? 0 : -1) : (bb ? 1 : 0);
      }
      try {
        Long la=new Long((String)a);
        Long lb=new Long((String)b);
        return la.compareTo(lb);
      }
 catch (      NumberFormatException e) {
        return super.compareTo(rowa,rowb);
      }
    }
  }
);
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",1,null,ureq.getLocale()));
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",2,null,ureq.getLocale()));
  revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("String_Node_Str",3,null,ureq.getLocale()));
  revisionListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_DOWNLOAD,"String_Node_Str",getTranslator().translate("String_Node_Str")));
  revisionListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_RESTORE,"String_Node_Str",getTranslator().translate("String_Node_Str")));
  revisionListTableCtr.addMultiSelectAction("String_Node_Str",CMD_DELETE);
  revisionListTableCtr.addMultiSelectAction("String_Node_Str",CMD_CANCEL);
  revisionListTableCtr.setMultiSelect(true);
  Versions versions=versionedFile.getVersions();
  List<VFSRevision> revisions=new ArrayList<VFSRevision>(versions.getRevisions());
  revisions.add(new CurrentRevision(versionedLeaf,versions));
  revisionListTableCtr.setTableDataModel(new RevisionListDataModel(revisions,ureq.getLocale()));
  listenTo(revisionListTableCtr);
  mainVC=createVelocityContainer("String_Node_Str");
  mainVC.put("String_Node_Str",revisionListTableCtr.getInitialComponent());
  if (StringHelper.containsNonWhitespace(title)) {
    mainVC.contextPut("String_Node_Str",title);
  }
  if (StringHelper.containsNonWhitespace(description)) {
    mainVC.contextPut("String_Node_Str",description);
  }
  putInitialPanel(mainVC);
}