Program: 68356
Project: 68356
Buggy source:
public void layout() throws BirtException {
  init();
  boolean isEmptyLine=true;
  boolean innerTextInserted=false;
  if ("String_Node_Str".equalsIgnoreCase(context.getFormat()) && objectType == TYPE_FLASH_OBJECT) {
    innerTextInserted=true;
    innerText=createInnerTextLayout();
    innerText.content.getStyle().setProperty(IStyle.STYLE_TEXT_ALIGN,IStyle.CENTER_VALUE);
    innerText.setVerticalAlign(IStyle.MIDDLE_VALUE);
    if (PropertyUtil.isInlineElement(image)) {
      InlineStackingArea lineParent=(InlineStackingArea)parent;
      isEmptyLine=lineParent.isEmptyLine();
    }
    int lastIP=root.currentIP;
    int lastBP=root.currentBP;
    innerText.layout();
    innerText.setAllocatedPosition(0,0);
    root.currentIP=lastIP;
    root.currentBP=lastBP;
  }
  if (PropertyUtil.isInlineElement(image)) {
    assert(parent instanceof InlineStackingArea);
    InlineStackingArea lineParent=(InlineStackingArea)parent;
    if (root.getAllocatedWidth() > parent.getCurrentMaxContentWidth()) {
      if ((innerTextInserted && !isEmptyLine) || (!innerTextInserted && !lineParent.isEmptyLine())) {
        lineParent.endLine(false);
        layout();
      }
 else {
        parent.add(root);
        root.finished=true;
        parent.update(root);
        return;
      }
    }
 else {
      parent.add(root);
      root.finished=true;
      parent.update(root);
      return;
    }
  }
 else {
    parent.add(root);
    if (!parent.isInInlineStacking && context.isAutoPageBreak()) {
      int aHeight=root.getAllocatedHeight();
      if (aHeight + parent.getAbsoluteBP() > context.getMaxBP()) {
        parent.autoPageBreak();
      }
    }
    root.finished=true;
    parent.update(root);
  }
}

Fixed version (ground truth):
public void layout() throws BirtException {
  init();
  boolean isEmptyLine=true;
  boolean innerTextInserted=false;
  if ("String_Node_Str".equalsIgnoreCase(context.getFormat()) && objectType == TYPE_FLASH_OBJECT) {
    innerTextInserted=true;
    innerText=createInnerTextLayout();
    innerText.content.getStyle().setProperty(IStyle.STYLE_TEXT_ALIGN,IStyle.CENTER_VALUE);
    innerText.setVerticalAlign(IStyle.MIDDLE_VALUE);
    innerText.setIgnoreReordering(true);
    if (PropertyUtil.isInlineElement(image)) {
      InlineStackingArea lineParent=(InlineStackingArea)parent;
      isEmptyLine=lineParent.isEmptyLine();
    }
    int lastIP=root.currentIP;
    int lastBP=root.currentBP;
    innerText.layout();
    innerText.setAllocatedPosition(0,0);
    root.currentIP=lastIP;
    root.currentBP=lastBP;
  }
  if (PropertyUtil.isInlineElement(image)) {
    assert(parent instanceof InlineStackingArea);
    InlineStackingArea lineParent=(InlineStackingArea)parent;
    if (root.getAllocatedWidth() > parent.getCurrentMaxContentWidth()) {
      if ((innerTextInserted && !isEmptyLine) || (!innerTextInserted && !lineParent.isEmptyLine())) {
        lineParent.endLine(false);
        layout();
      }
 else {
        parent.add(root);
        root.finished=true;
        parent.update(root);
        return;
      }
    }
 else {
      parent.add(root);
      root.finished=true;
      parent.update(root);
      return;
    }
  }
 else {
    parent.add(root);
    if (!parent.isInInlineStacking && context.isAutoPageBreak()) {
      int aHeight=root.getAllocatedHeight();
      if (aHeight + parent.getAbsoluteBP() > context.getMaxBP()) {
        parent.autoPageBreak();
      }
    }
    root.finished=true;
    parent.update(root);
  }
}