Program: 9782
Project: 9782
Buggy source:
/** 
 * Sets the necessary height for all bands in the report, to hold their children
 */
protected void setBandsFinalHeight(){
  log.debug("String_Node_Str");
  List<JRBand> bands=new ArrayList<JRBand>();
  Utils.addNotNull(bands,(JRDesignBand)design.getPageHeader());
  Utils.addNotNull(bands,(JRDesignBand)design.getPageFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getColumnHeader());
  Utils.addNotNull(bands,(JRDesignBand)design.getColumnFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getSummary());
  Utils.addNotNull(bands,(JRDesignBand)design.getBackground());
  bands.addAll(((JRDesignSection)design.getDetailSection()).getBandsList());
  Utils.addNotNull(bands,(JRDesignBand)design.getLastPageFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getTitle());
  Utils.addNotNull(bands,(JRDesignBand)design.getPageFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getNoData());
  for (Iterator iter=design.getGroupsList().iterator(); iter.hasNext(); ) {
    JRGroup jrgroup=(JRGroup)iter.next();
    DJGroup djGroup=(DJGroup)getReferencesMap().get(jrgroup.getName());
    JRDesignSection headerSection=(JRDesignSection)jrgroup.getGroupHeaderSection();
    JRDesignSection footerSection=(JRDesignSection)jrgroup.getGroupFooterSection();
    if (djGroup != null) {
      for (      JRBand headerBand : (List<JRBand>)headerSection.getBandsList()) {
        setBandFinalHeight((JRDesignBand)headerBand,djGroup.getHeaderHeight(),djGroup.isFitHeaderHeightToContent());
      }
      for (      JRBand footerBand : (List<JRBand>)footerSection.getBandsList()) {
        setBandFinalHeight((JRDesignBand)footerBand,djGroup.getFooterHeight(),djGroup.isFitHeaderHeightToContent());
      }
    }
 else {
      bands.addAll(headerSection.getBandsList());
      bands.addAll(footerSection.getBandsList());
    }
  }
  for (  JRBand jrDesignBand : bands) {
    setBandFinalHeight((JRDesignBand)jrDesignBand);
  }
}

Fixed version (ground truth):
/** 
 * Sets the necessary height for all bands in the report, to hold their children
 */
protected void setBandsFinalHeight(){
  log.debug("String_Node_Str");
  List<JRBand> bands=new ArrayList<JRBand>();
  Utils.addNotNull(bands,(JRDesignBand)design.getPageHeader());
  Utils.addNotNull(bands,(JRDesignBand)design.getPageFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getColumnHeader());
  Utils.addNotNull(bands,(JRDesignBand)design.getColumnFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getSummary());
  Utils.addNotNull(bands,(JRDesignBand)design.getBackground());
  bands.addAll(((JRDesignSection)design.getDetailSection()).getBandsList());
  Utils.addNotNull(bands,(JRDesignBand)design.getLastPageFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getTitle());
  Utils.addNotNull(bands,(JRDesignBand)design.getPageFooter());
  Utils.addNotNull(bands,(JRDesignBand)design.getNoData());
  for (Iterator iter=design.getGroupsList().iterator(); iter.hasNext(); ) {
    JRGroup jrgroup=(JRGroup)iter.next();
    DJGroup djGroup=(DJGroup)getReferencesMap().get(jrgroup.getName());
    JRDesignSection headerSection=(JRDesignSection)jrgroup.getGroupHeaderSection();
    JRDesignSection footerSection=(JRDesignSection)jrgroup.getGroupFooterSection();
    if (djGroup != null) {
      for (      JRBand headerBand : (List<JRBand>)headerSection.getBandsList()) {
        setBandFinalHeight((JRDesignBand)headerBand,djGroup.getHeaderHeight(),djGroup.isFitHeaderHeightToContent());
      }
      for (      JRBand footerBand : (List<JRBand>)footerSection.getBandsList()) {
        setBandFinalHeight((JRDesignBand)footerBand,djGroup.getFooterHeight(),djGroup.isFitFooterHeightToContent());
      }
    }
 else {
      bands.addAll(headerSection.getBandsList());
      bands.addAll(footerSection.getBandsList());
    }
  }
  for (  JRBand jrDesignBand : bands) {
    setBandFinalHeight((JRDesignBand)jrDesignBand);
  }
}