Program: 189215
Project: 189215
Buggy source:
public void layout(){
  super.layout();
  if (getProject().equals(StoredProject.getDefault())) {
    requirePermission(new ProjectListPermission());
  }
  add(CSSPackageResource.getHeaderContribution(getClass(),"String_Node_Str"));
  final MilestoneFilterPanel filter=new MilestoneFilterPanel("String_Node_Str",getSession().getUser());
  add(filter);
  final boolean hideProject=!getProject().equals(StoredProject.getDefault());
  List<MilestoneGroup> groups=MilestonesApplication.getMilestoneGroups(getProject());
  boolean hasGroups=groups.size() > 0;
  add(new ListView<MilestoneGroup>("String_Node_Str",groups){
    @Override protected void populateItem(    ListItem<MilestoneGroup> listItem){
      MilestoneGroup group=listItem.getModelObject();
      PageParameters params=getProjectPageParameters();
      params.add("String_Node_Str",group.getName());
      BookmarkablePageLink nameLink=new BookmarkablePageLink<ViewMilestoneGroup>("String_Node_Str",ViewMilestoneGroup.class,params);
      nameLink.add(new Label("String_Node_Str",group.getName()));
      listItem.add(nameLink);
      double part=DurationWorkedUtil.getMilestoneGroupCompleteness(group);
      int percent=(int)(part * 100);
      Panel panel=new PercentagePanel("String_Node_Str",percent);
      listItem.add(panel);
      SortableEntityProvider<Milestone> provider=new GroupedMilestoneProvider(group,filter);
      listItem.add(new MilestoneListPanel("String_Node_Str",provider,Milestones.this,hideProject));
    }
  }
);
  final SortableEntityProvider<Milestone> provider;
  if (getProject().equals(StoredProject.getDefault())) {
    provider=new GroupedMilestoneProvider(null,filter);
  }
 else {
    provider=new GroupedMilestoneProvider(null,getProject(),filter);
  }
  boolean hasUngrouped=provider.size() > 0;
  add(new WebMarkupContainer("String_Node_Str").setVisible(hasUngrouped && hasGroups));
  add(new MilestoneListPanel("String_Node_Str",provider,this,hideProject).setVisible(hasUngrouped));
}

Fixed version (ground truth):
public void layout(){
  super.layout();
  if (getProject().equals(StoredProject.getDefault())) {
    requirePermission(new ProjectListPermission());
  }
  add(CSSPackageResource.getHeaderContribution(getClass(),"String_Node_Str"));
  final MilestoneFilterPanel filter=new MilestoneFilterPanel("String_Node_Str",getSession().getUser());
  add(filter);
  final boolean hideProject=!getProject().equals(StoredProject.getDefault());
  List<MilestoneGroup> groups=MilestonesApplication.getMilestoneGroups(getProject());
  boolean hasGroups=groups.size() > 0;
  add(new ListView<MilestoneGroup>("String_Node_Str",groups){
    @Override protected void populateItem(    ListItem<MilestoneGroup> listItem){
      MilestoneGroup group=listItem.getModelObject();
      PageParameters params=getProjectPageParameters();
      params.add("String_Node_Str",group.getName());
      BookmarkablePageLink nameLink=new BookmarkablePageLink("String_Node_Str",getPageClass("String_Node_Str"),params);
      nameLink.add(new Label("String_Node_Str",group.getName()));
      listItem.add(nameLink);
      double part=DurationWorkedUtil.getMilestoneGroupCompleteness(group);
      int percent=(int)(part * 100);
      Panel panel=new PercentagePanel("String_Node_Str",percent);
      listItem.add(panel);
      SortableEntityProvider<Milestone> provider=new GroupedMilestoneProvider(group,filter);
      listItem.add(new MilestoneListPanel("String_Node_Str",provider,Milestones.this,hideProject));
    }
  }
);
  final SortableEntityProvider<Milestone> provider;
  if (getProject().equals(StoredProject.getDefault())) {
    provider=new GroupedMilestoneProvider(null,filter);
  }
 else {
    provider=new GroupedMilestoneProvider(null,getProject(),filter);
  }
  boolean hasUngrouped=provider.size() > 0;
  add(new WebMarkupContainer("String_Node_Str").setVisible(hasUngrouped && hasGroups));
  add(new MilestoneListPanel("String_Node_Str",provider,this,hideProject).setVisible(hasUngrouped));
}