Program: 145601
Project: 145601
Buggy source:
private Component createLabel(Element aTag) throws Exception {
  final PlatypusLabel component=new PlatypusLabel();
  processEvents(component,aTag);
  Publisher.publish(component);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  if (aTag.hasAttribute("String_Node_Str"))   component.setIconTextGap(Utils.getIntegerAttribute(aTag,"String_Node_Str",4));
  if (aTag.hasAttribute("String_Node_Str"))   component.setHorizontalTextPosition(Utils.getIntegerAttribute(aTag,"String_Node_Str",PlatypusLabel.RIGHT));
  if (aTag.hasAttribute("String_Node_Str"))   component.setVerticalTextPosition(Utils.getIntegerAttribute(aTag,"String_Node_Str",PlatypusLabel.RIGHT));
  if (aTag.hasAttribute("String_Node_Str")) {
    component.setImage(AppClient.getInstance().getImageResource(aTag.getAttribute("String_Node_Str")).addCallback(new ImageResourceCallback(){
      @Override public void run(      ImageResource aResource){
        component.setImage(aResource);
        if (component.getParent() instanceof ResizeContainer) {
          ResizeContainer c=(ResizeContainer)component.getParent();
          Size s=XElement.as(c.getElement().getParentElement()).getSize(true);
          c.setPixelSize(s.getWidth() + 1,s.getHeight());
          c.setPixelSize(s.getWidth() - 1,s.getHeight());
        }
 else         if (component.getParent() instanceof HasLayout) {
          ((HasLayout)component.getParent()).forceLayout();
        }
      }
    }
));
  }
  if (aTag.hasAttribute("String_Node_Str"))   component.setVerticalAlignment(Utils.getIntegerAttribute(aTag,"String_Node_Str",0));
  if (aTag.hasAttribute("String_Node_Str"))   component.setHorizontalAlignment(Utils.getIntegerAttribute(aTag,"String_Node_Str",0));
  checkBorders(component,aTag);
  PublishedComponent publishedComp=(PublishedComponent)component.getData(Form.PUBLISHED_DATA_KEY);
  processGeneralProperties(component,aTag,false,publishedComp);
  return component;
}

Fixed version (ground truth):
private Component createLabel(Element aTag) throws Exception {
  final PlatypusLabel component=new PlatypusLabel();
  processEvents(component,aTag);
  Publisher.publish(component);
  if (aTag.hasAttribute("String_Node_Str"))   component.setText(aTag.getAttribute("String_Node_Str"));
  if (aTag.hasAttribute("String_Node_Str"))   component.setIconTextGap(Utils.getIntegerAttribute(aTag,"String_Node_Str",4));
  if (aTag.hasAttribute("String_Node_Str"))   component.setHorizontalTextPosition(Utils.getIntegerAttribute(aTag,"String_Node_Str",PlatypusLabel.RIGHT));
  if (aTag.hasAttribute("String_Node_Str"))   component.setVerticalTextPosition(Utils.getIntegerAttribute(aTag,"String_Node_Str",PlatypusLabel.RIGHT));
  if (aTag.hasAttribute("String_Node_Str")) {
    component.setImage(AppClient.getInstance().getImageResource(aTag.getAttribute("String_Node_Str")).addCallback(new ImageResourceCallback(){
      @Override public void run(      ImageResource aResource){
        component.setImage(aResource);
        if (component.isAttached()) {
          if (component.getParent() instanceof ResizeContainer) {
            ResizeContainer c=(ResizeContainer)component.getParent();
            Size s=XElement.as(c.getElement()).getSize(false);
            c.setPixelSize(s.getWidth() - 1,s.getHeight());
            c.setPixelSize(s.getWidth() + 1,s.getHeight());
          }
 else           if (component.getParent() instanceof RequiresResize) {
            ((RequiresResize)component.getParent()).onResize();
          }
        }
      }
    }
));
  }
  if (aTag.hasAttribute("String_Node_Str"))   component.setVerticalAlignment(Utils.getIntegerAttribute(aTag,"String_Node_Str",0));
  if (aTag.hasAttribute("String_Node_Str"))   component.setHorizontalAlignment(Utils.getIntegerAttribute(aTag,"String_Node_Str",0));
  checkBorders(component,aTag);
  PublishedComponent publishedComp=(PublishedComponent)component.getData(Form.PUBLISHED_DATA_KEY);
  processGeneralProperties(component,aTag,false,publishedComp);
  return component;
}