Program: 69985
Project: 69985
Buggy source:
/** 
 * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int,int)
 */
public Object getValueAt(int row,int col){
  BusinessGroup businessGroup=(BusinessGroup)objects.get(row);
  Integer numbParts=(Integer)members.get(row);
  Integer max=businessGroup.getMaxParticipants();
switch (col) {
case 0:
    return businessGroup.getName();
case 1:
  String description=businessGroup.getDescription();
description=FilterFactory.getHtmlTagsFilter().filter(description);
description=Formatter.truncate(description,256);
return description;
case 2:
if (max == null) {
return numbParts;
}
StringBuilder buf=new StringBuilder();
buf.append(numbParts);
buf.append(trans.translate("String_Node_Str"));
buf.append(businessGroup.getMaxParticipants());
if (numbParts > businessGroup.getMaxParticipants()) {
Tracing.logInfo("String_Node_Str" + businessGroup + "String_Node_Str"+ numbParts+ "String_Node_Str"+ businessGroup.getMaxParticipants(),BusinessGroupTableModelWithMaxSize.class);
}
return buf.toString();
case 3:
if (businessGroup.getWaitingListEnabled().booleanValue()) {
int intValue=securityManager.countIdentitiesOfSecurityGroup(businessGroup.getWaitingGroup());
return new Integer(intValue);
}
return trans.translate("String_Node_Str");
case 4:
if (securityManager.isIdentityInSecurityGroup(this.identity,businessGroup.getPartipiciantGroup())) {
return trans.translate("String_Node_Str");
}
 else if (securityManager.isIdentityInSecurityGroup(this.identity,businessGroup.getWaitingGroup())) {
int pos=businessGroupService.getPositionInWaitingListFor(identity,businessGroup);
String[] onWaitingListArgs=new String[]{Integer.toString(pos)};
return trans.translate("String_Node_Str",onWaitingListArgs);
}
 else if (max != null && !businessGroup.getWaitingListEnabled().booleanValue() && (numbParts.intValue() >= max.intValue())) {
return trans.translate("String_Node_Str");
}
 else if (max != null && businessGroup.getWaitingListEnabled().booleanValue() && (numbParts.intValue() >= max.intValue())) {
return trans.translate("String_Node_Str");
}
return trans.translate("String_Node_Str");
case 5:
if (isEnrolledInAnyGroup(identity)) {
return Boolean.FALSE;
}
if (max != null && !businessGroup.getWaitingListEnabled().booleanValue() && (numbParts.intValue() >= max.intValue())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
case 6:
if (isEnrolledIn(businessGroup,identity)) {
if (securityManager.isIdentityInSecurityGroup(this.identity,businessGroup.getWaitingGroup())) {
return Boolean.TRUE;
}
if (cancelEnrollEnabled) {
return Boolean.TRUE;
}
}
return Boolean.FALSE;
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int,int)
 */
public Object getValueAt(int row,int col){
  BusinessGroup businessGroup=(BusinessGroup)objects.get(row);
  Integer numbParts=members.get(row);
  Integer max=businessGroup.getMaxParticipants();
switch (col) {
case 0:
    return businessGroup.getName();
case 1:
  String description=businessGroup.getDescription();
description=FilterFactory.getHtmlTagsFilter().filter(description);
description=Formatter.truncate(description,256);
return description;
case 2:
if (max == null) {
return numbParts;
}
StringBuilder buf=new StringBuilder();
buf.append(numbParts);
buf.append(trans.translate("String_Node_Str"));
buf.append(businessGroup.getMaxParticipants());
if (numbParts > businessGroup.getMaxParticipants()) {
Tracing.logInfo("String_Node_Str" + businessGroup + "String_Node_Str"+ numbParts+ "String_Node_Str"+ businessGroup.getMaxParticipants(),BusinessGroupTableModelWithMaxSize.class);
}
return buf.toString();
case 3:
if (businessGroup.getWaitingListEnabled().booleanValue()) {
int intValue=securityManager.countIdentitiesOfSecurityGroup(businessGroup.getWaitingGroup());
return new Integer(intValue);
}
return trans.translate("String_Node_Str");
case 4:
if (securityManager.isIdentityInSecurityGroup(identity,businessGroup.getPartipiciantGroup())) {
return trans.translate("String_Node_Str");
}
 else if (securityManager.isIdentityInSecurityGroup(identity,businessGroup.getWaitingGroup())) {
int pos=businessGroupService.getPositionInWaitingListFor(identity,businessGroup);
String[] onWaitingListArgs=new String[]{Integer.toString(pos)};
return trans.translate("String_Node_Str",onWaitingListArgs);
}
 else if (max != null && !businessGroup.getWaitingListEnabled().booleanValue() && (numbParts.intValue() >= max.intValue())) {
return trans.translate("String_Node_Str");
}
 else if (max != null && businessGroup.getWaitingListEnabled().booleanValue() && (numbParts.intValue() >= max.intValue())) {
return trans.translate("String_Node_Str");
}
return trans.translate("String_Node_Str");
case 5:
if (isEnrolledInAnyGroup(identity)) {
return Boolean.FALSE;
}
if (max != null && !businessGroup.getWaitingListEnabled().booleanValue() && (numbParts.intValue() >= max.intValue())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
case 6:
if (isEnrolledIn(businessGroup,identity)) {
if (securityManager.isIdentityInSecurityGroup(this.identity,businessGroup.getWaitingGroup())) {
return Boolean.TRUE;
}
if (cancelEnrollEnabled) {
return Boolean.TRUE;
}
}
return Boolean.FALSE;
default :
return "String_Node_Str";
}
}