Program: 69621
Project: 69621
Buggy source:
private void addMessageToCurrentMessagesAndVC(UserRequest ureq,Message m,VelocityContainer vcContainer,List<Map<String,Object>> allList,int msgCount,Map<String,Mark> marks,Map<String,MarkResourceStat> stats){
  Map<String,Object> map=new HashMap<String,Object>();
  map.put("String_Node_Str",m.getKey());
  map.put("String_Node_Str",Boolean.FALSE);
  Date creationDate=m.getCreationDate();
  Identity modifier=m.getModifier();
  if (modifier != null) {
    map.put("String_Node_Str",Boolean.TRUE);
    map.put("String_Node_Str",modifier.getUser().getProperty(UserConstants.FIRSTNAME,ureq.getLocale()));
    map.put("String_Node_Str",modifier.getUser().getProperty(UserConstants.LASTNAME,ureq.getLocale()));
  }
 else {
    map.put("String_Node_Str",Boolean.FALSE);
  }
  map.put("String_Node_Str",m.getTitle());
  map.put("String_Node_Str",m.getBody());
  map.put("String_Node_Str",dateFormat.format(creationDate));
  Identity creator=m.getCreator();
  map.put("String_Node_Str",Formatter.truncate(creator.getUser().getProperty(UserConstants.FIRSTNAME,ureq.getLocale()),18));
  map.put("String_Node_Str",Formatter.truncate(creator.getUser().getProperty(UserConstants.LASTNAME,ureq.getLocale()),18));
  String subPath=m.getKey().toString();
  Mark currentMark=marks.get(subPath);
  MarkResourceStat stat=stats.get(subPath);
  MarkingService markingService=(MarkingService)CoreSpringFactory.getBean(MarkingService.class);
  if (!ureq.getUserSession().getRoles().isGuestOnly()) {
    String businessPath=currentMark == null ? getWindowControl().getBusinessControl().getAsString() + "String_Node_Str" + m.getKey()+ "String_Node_Str" : currentMark.getBusinessPath();
    Controller markCtrl=markingService.getMarkController(ureq,getWindowControl(),currentMark,stat,forumOres,subPath,businessPath);
    vcThreadView.put("String_Node_Str" + msgCount,markCtrl.getInitialComponent());
  }
  map.put("String_Node_Str",dateFormat.format(m.getLastModified()));
  ForumManager fm=ForumManager.getInstance();
  OlatRootFolderImpl msgContainer=fm.getMessageContainer(forum.getKey(),m.getKey());
  map.put("String_Node_Str",msgContainer);
  List<VFSItem> attachments=new ArrayList<VFSItem>(msgContainer.getItems(new VFSItemExcludePrefixFilter(MessageEditController.ATTACHMENT_EXCLUDE_PREFIXES)));
  map.put("String_Node_Str",attachments);
  if (attachments == null || attachments.size() == 0)   map.put("String_Node_Str",Boolean.FALSE);
 else   map.put("String_Node_Str",Boolean.TRUE);
  map.put("String_Node_Str",new Integer(1));
  boolean userIsMsgCreator=ureq.getIdentity().getKey().equals(creator.getKey());
  Boolean uIsMsgC=new Boolean(userIsMsgCreator);
  map.put("String_Node_Str",uIsMsgC);
  boolean isThreadtop=m.getThreadtop() == null;
  map.put("String_Node_Str",Boolean.valueOf(isThreadtop));
  boolean isThreadClosed=Status.getStatus(m.getStatusCode()).isClosed();
  if (!isThreadtop) {
    isThreadClosed=Status.getStatus(m.getThreadtop().getStatusCode()).isClosed();
  }
  map.put("String_Node_Str",isThreadClosed);
  DisplayPortraitController portrait=new DisplayPortraitController(ureq,getWindowControl(),m.getCreator(),true,true);
  map.put("String_Node_Str",portrait);
  String portraitComponentVCName=m.getKey().toString();
  map.put("String_Node_Str",portraitComponentVCName);
  vcContainer.put(portraitComponentVCName,portrait.getInitialComponent());
  allList.add(map);
  LinkFactory.createCustomLink("String_Node_Str" + msgCount,"String_Node_Str" + msgCount,"String_Node_Str",Link.BUTTON_SMALL,vcThreadView,this);
}

Fixed version (ground truth):
private void addMessageToCurrentMessagesAndVC(UserRequest ureq,Message m,VelocityContainer vcContainer,List<Map<String,Object>> allList,int msgCount,Map<String,Mark> marks,Map<String,MarkResourceStat> stats){
  Map<String,Object> map=new HashMap<String,Object>();
  map.put("String_Node_Str",m.getKey());
  map.put("String_Node_Str",Boolean.FALSE);
  Date creationDate=m.getCreationDate();
  Identity modifier=m.getModifier();
  if (modifier != null) {
    map.put("String_Node_Str",Boolean.TRUE);
    map.put("String_Node_Str",modifier.getUser().getProperty(UserConstants.FIRSTNAME,ureq.getLocale()));
    map.put("String_Node_Str",modifier.getUser().getProperty(UserConstants.LASTNAME,ureq.getLocale()));
  }
 else {
    map.put("String_Node_Str",Boolean.FALSE);
  }
  map.put("String_Node_Str",m.getTitle());
  map.put("String_Node_Str",m.getBody());
  map.put("String_Node_Str",dateFormat.format(creationDate));
  Identity creator=m.getCreator();
  map.put("String_Node_Str",Formatter.truncate(creator.getUser().getProperty(UserConstants.FIRSTNAME,ureq.getLocale()),18));
  map.put("String_Node_Str",Formatter.truncate(creator.getUser().getProperty(UserConstants.LASTNAME,ureq.getLocale()),18));
  String subPath=m.getKey().toString();
  Mark currentMark=marks.get(subPath);
  MarkResourceStat stat=stats.get(subPath);
  MarkingService markingService=(MarkingService)CoreSpringFactory.getBean(MarkingService.class);
  if (!ureq.getUserSession().getRoles().isGuestOnly()) {
    String businessPath=currentMark == null ? getWindowControl().getBusinessControl().getAsString() + "String_Node_Str" + m.getKey()+ "String_Node_Str" : currentMark.getBusinessPath();
    Controller markCtrl=markingService.getMarkController(ureq,getWindowControl(),currentMark,stat,forumOres,subPath,businessPath);
    vcThreadView.put("String_Node_Str" + msgCount,markCtrl.getInitialComponent());
  }
  map.put("String_Node_Str",dateFormat.format(m.getLastModified()));
  ForumManager fm=ForumManager.getInstance();
  OlatRootFolderImpl msgContainer=fm.getMessageContainer(forum.getKey(),m.getKey());
  map.put("String_Node_Str",msgContainer);
  List<VFSItem> attachments=new ArrayList<VFSItem>(msgContainer.getItems(new VFSItemExcludePrefixFilter(MessageEditController.ATTACHMENT_EXCLUDE_PREFIXES)));
  map.put("String_Node_Str",attachments);
  if (attachments == null || attachments.size() == 0)   map.put("String_Node_Str",Boolean.FALSE);
 else   map.put("String_Node_Str",Boolean.TRUE);
  map.put("String_Node_Str",new Integer(1));
  boolean userIsMsgCreator=ureq.getIdentity().getKey().equals(creator.getKey());
  Boolean uIsMsgC=new Boolean(userIsMsgCreator);
  map.put("String_Node_Str",uIsMsgC);
  boolean isThreadtop=m.getThreadtop() == null;
  map.put("String_Node_Str",Boolean.valueOf(isThreadtop));
  boolean isThreadClosed=Status.getStatus(m.getStatusCode()).isClosed();
  if (!isThreadtop) {
    isThreadClosed=Status.getStatus(m.getThreadtop().getStatusCode()).isClosed();
  }
  map.put("String_Node_Str",isThreadClosed);
  DisplayPortraitController portrait=new DisplayPortraitController(ureq,getWindowControl(),m.getCreator(),true,true);
  map.put("String_Node_Str",portrait);
  String portraitComponentVCName=m.getKey().toString();
  map.put("String_Node_Str",portraitComponentVCName);
  vcContainer.put(portraitComponentVCName,portrait.getInitialComponent());
  Link vcLink=LinkFactory.createCustomLink("String_Node_Str" + msgCount,"String_Node_Str" + msgCount,UserManager.getInstance().getUserDisplayName(creator),Link.LINK_CUSTOM_CSS + Link.NONTRANSLATED,vcThreadView,this);
  vcLink.setUserObject(msgCount);
  LinkPopupSettings settings=new LinkPopupSettings(800,600,"String_Node_Str");
  vcLink.setPopup(settings);
  allList.add(map);
  Link link=LinkFactory.createCustomLink("String_Node_Str" + msgCount,"String_Node_Str" + msgCount,"String_Node_Str",Link.BUTTON_SMALL,vcThreadView,this);
  link.setIconRightCSS("String_Node_Str");
}