Program: 189229
Project: 189229
Buggy source:
private void layout(){
  Object o=getDefaultModel().getObject();
  WebMarkupContainer commentTitle=new WebMarkupContainer("String_Node_Str");
  WebMarkupContainer workedTitle=new WebMarkupContainer("String_Node_Str");
  if (o instanceof Comment) {
    add(new Image("String_Node_Str",new ResourceReference(HeadsUpPage.class,"String_Node_Str")));
    Comment comment=(Comment)o;
    commentTitle.add(new Label("String_Node_Str",comment.getUser().getFullnameOrUsername()));
    commentTitle.add(new Label("String_Node_Str",new FormattedDateModel(comment.getCreated(),((HeadsUpSession)getSession()).getTimeZone())));
    add(new Label("String_Node_Str",new MarkedUpTextModel(comment.getComment(),project)).setEscapeModelStrings(false));
    workedTitle.setVisible(false);
  }
 else   if (o instanceof DurationWorked) {
    add(new Image("String_Node_Str",new ResourceReference(HeadsUpPage.class,"String_Node_Str")));
    DurationWorked worked=(DurationWorked)o;
    if (worked.getWorked() == null || worked.getWorked().getHours() == 0) {
      setVisible(false);
      return;
    }
    String time="String_Node_Str";
    if (worked.getWorked() != null) {
      time=worked.getWorked().toString();
    }
    workedTitle.add(new Label("String_Node_Str",time));
    workedTitle.add(new Label("String_Node_Str",worked.getUser().getFullnameOrUsername()));
    workedTitle.add(new Label("String_Node_Str",new FormattedDateModel(worked.getDay(),((HeadsUpSession)getSession()).getTimeZone())));
    add(new WebMarkupContainer("String_Node_Str").setVisible(false));
    commentTitle.setVisible(false);
  }
 else {
    commentTitle.setVisible(false);
    workedTitle.setVisible(false);
  }
  add(commentTitle);
  add(workedTitle);
}

Fixed version (ground truth):
private void layout(){
  Object o=getDefaultModel().getObject();
  WebMarkupContainer commentTitle=new WebMarkupContainer("String_Node_Str");
  WebMarkupContainer workedTitle=new WebMarkupContainer("String_Node_Str");
  if (o instanceof Comment) {
    add(new Image("String_Node_Str",new ResourceReference(HeadsUpPage.class,"String_Node_Str")));
    Comment comment=(Comment)o;
    commentTitle.add(new Label("String_Node_Str",comment.getUser().getFullnameOrUsername()));
    commentTitle.add(new Label("String_Node_Str",new FormattedDateModel(comment.getCreated(),((HeadsUpSession)getSession()).getTimeZone())));
    add(new Label("String_Node_Str",new MarkedUpTextModel(comment.getComment(),project)).setEscapeModelStrings(false));
    workedTitle.setVisible(false);
  }
 else   if (o instanceof DurationWorked) {
    add(new Image("String_Node_Str",new ResourceReference(HeadsUpPage.class,"String_Node_Str")));
    DurationWorked worked=(DurationWorked)o;
    if (worked.getWorked() == null || worked.getWorked().getHours() == 0) {
      setVisible(false);
      return;
    }
    String time="String_Node_Str";
    if (worked.getWorked() != null) {
      time=worked.getWorked().toString();
    }
    workedTitle.add(new Label("String_Node_Str",time));
    workedTitle.add(new Label("String_Node_Str",worked.getUser().getFullnameOrUsername()));
    workedTitle.add(new Label("String_Node_Str",new FormattedDateModel(worked.getDay(),((HeadsUpSession)getSession()).getTimeZone())));
    commentTitle.setVisible(false);
    Comment comment=worked.getComment();
    if (comment != null) {
      Label commentLabel=new Label("String_Node_Str",new MarkedUpTextModel(comment.getComment(),project));
      commentLabel.setEscapeModelStrings(false);
      add(commentLabel);
    }
 else {
      add(new WebMarkupContainer("String_Node_Str").setVisible(false));
    }
  }
 else {
    commentTitle.setVisible(false);
    workedTitle.setVisible(false);
    add(new WebMarkupContainer("String_Node_Str").setVisible(false));
  }
  add(commentTitle);
  add(workedTitle);
}