Program: 143593
Project: 143593
Buggy source:
private void fillPartStyle(TextualStyle partStyle,Part part){
  Pair<IStyleSheet,IStyleRule> pairStyle=ComponentFactory.getStyleForBasicComponent(sp,part,f);
  if (pairStyle != null) {
    addBackgroundImageAttributeIfExists(pairStyle.getRight(),partStyle);
  }
  fillPartBackground(partStyle,part);
  if (part.getPartType() == Part.BODY) {
    final int scrollBars=f.getScrollbars();
    String overflowX="String_Node_Str";
    if ((scrollBars & ISupportScrollbars.HORIZONTAL_SCROLLBAR_NEVER) == ISupportScrollbars.HORIZONTAL_SCROLLBAR_NEVER)     overflowX="String_Node_Str";
 else     if ((scrollBars & ISupportScrollbars.HORIZONTAL_SCROLLBAR_ALWAYS) == ISupportScrollbars.HORIZONTAL_SCROLLBAR_ALWAYS)     overflowX="String_Node_Str";
    partStyle.setProperty("String_Node_Str",overflowX);
    String overflowY="String_Node_Str";
    if ((scrollBars & ISupportScrollbars.VERTICAL_SCROLLBAR_NEVER) == ISupportScrollbars.VERTICAL_SCROLLBAR_NEVER)     overflowY="String_Node_Str";
 else     if ((scrollBars & ISupportScrollbars.VERTICAL_SCROLLBAR_ALWAYS) == ISupportScrollbars.VERTICAL_SCROLLBAR_ALWAYS)     overflowY="String_Node_Str";
    partStyle.setProperty("String_Node_Str",overflowY);
  }
 else {
    partStyle.setProperty("String_Node_Str","String_Node_Str");
  }
  int spaceUsedOnlyInPrintAbove=0;
  int spaceUsedOnlyInPrintBelow=0;
  Iterator<Part> allParts=f.getParts();
  while (allParts.hasNext()) {
    Part otherPart=allParts.next();
    if (Part.rendersOnlyInPrint(otherPart.getPartType())) {
      int otherPartHeight=otherPart.getHeight() - f.getPartStartYPos(otherPart.getID());
      if (part.getPartType() > otherPart.getPartType())       spaceUsedOnlyInPrintAbove+=otherPartHeight;
      if (part.getPartType() < otherPart.getPartType())       spaceUsedOnlyInPrintBelow+=otherPartHeight;
    }
  }
  partStyle.setProperty("String_Node_Str","String_Node_Str");
  fillPartLayoutCSS(partStyle,part,spaceUsedOnlyInPrintAbove,spaceUsedOnlyInPrintBelow);
  if (pairStyle != null && pairStyle.getLeft() != null && pairStyle.getRight() != null) {
    copyBorderAttributes(pairStyle.getRight(),partStyle);
  }
}

Fixed version (ground truth):
private void fillPartStyle(TextualStyle partStyle,Part part){
  Pair<IStyleSheet,IStyleRule> pairStyle=ComponentFactory.getStyleForBasicComponent(sp,part,f);
  if (pairStyle != null) {
    addBackgroundImageAttributeIfExists(pairStyle.getRight(),partStyle);
  }
  fillPartBackground(partStyle,part);
  int spaceUsedOnlyInPrintAbove=0;
  int spaceUsedOnlyInPrintBelow=0;
  Iterator<Part> allParts=f.getParts();
  while (allParts.hasNext()) {
    Part otherPart=allParts.next();
    if (Part.rendersOnlyInPrint(otherPart.getPartType())) {
      int otherPartHeight=otherPart.getHeight() - f.getPartStartYPos(otherPart.getID());
      if (part.getPartType() > otherPart.getPartType())       spaceUsedOnlyInPrintAbove+=otherPartHeight;
      if (part.getPartType() < otherPart.getPartType())       spaceUsedOnlyInPrintBelow+=otherPartHeight;
    }
  }
  partStyle.setProperty("String_Node_Str","String_Node_Str");
  fillPartLayoutCSS(partStyle,part,spaceUsedOnlyInPrintAbove,spaceUsedOnlyInPrintBelow);
  if (pairStyle != null && pairStyle.getLeft() != null && pairStyle.getRight() != null) {
    copyBorderAttributes(pairStyle.getRight(),partStyle);
  }
}