Program: 70325
Project: 70325
Buggy source:
/** 
 * Executes the Command. This method should not be called if the Command is not executable.
 */
public void execute(){
  CommandStack stack=SessionHandleAdapter.getInstance().getCommandStack();
  stack.startTrans(TRANS_LABEL_SET_CONSTRAINT);
  try {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(model) + "String_Node_Str"+ newSize.width+ "String_Node_Str"+ newSize.height);
    }
    if (model instanceof TableHandle || model instanceof GridHandle) {
      HandleAdapterFactory.getInstance().getTableHandleAdapter(model).ajustSize(newSize);
    }
 else     if (model instanceof ImageHandle) {
      int width=newSize.width;
      int height=newSize.height;
      DimensionValue dimensionValue;
      if (width >= 0) {
        dimensionValue=new DimensionValue(width <= 0 ? 1 : width,DesignChoiceConstants.UNITS_PX);
        model.getWidth().setValue(dimensionValue);
      }
      if (height >= 0) {
        dimensionValue=new DimensionValue(height <= 0 ? 1 : height,DesignChoiceConstants.UNITS_PX);
        model.getHeight().setValue(dimensionValue);
      }
    }
 else {
      double width=MetricUtility.pixelToPixelInch(newSize.width);
      double height=MetricUtility.pixelToPixelInch(newSize.height);
      DimensionValue dimensionValue;
      if (width >= 0) {
        dimensionValue=new DimensionValue(width <= 0 ? 0.1 : width,DesignChoiceConstants.UNITS_IN);
        model.getWidth().setValue(dimensionValue);
      }
      if (height >= 0) {
        dimensionValue=new DimensionValue(height <= 0 ? 0.1 : height,DesignChoiceConstants.UNITS_IN);
        model.getHeight().setValue(dimensionValue);
      }
    }
    stack.commit();
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  SemanticException e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    logger.log(Level.SEVERE,e.getMessage(),e);
    stack.rollback();
  }
}

Fixed version (ground truth):
/** 
 * Executes the Command. This method should not be called if the Command is not executable.
 */
public void execute(){
  CommandStack stack=SessionHandleAdapter.getInstance().getCommandStack();
  stack.startTrans(TRANS_LABEL_SET_CONSTRAINT);
  try {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(model) + "String_Node_Str"+ newSize.width+ "String_Node_Str"+ newSize.height);
    }
    if (model instanceof TableHandle || model instanceof GridHandle) {
      HandleAdapterFactory.getInstance().getTableHandleAdapter(model).ajustSize(newSize);
    }
 else     if (isFixLayout()) {
      double width=MetricUtility.pixelToPixelInch(newSize.width);
      double height=MetricUtility.pixelToPixelInch(newSize.height);
      if (width >= 0) {
        DimensionValue value=DimensionUtil.convertTo(width,DesignChoiceConstants.UNITS_IN,getDefaultUnits());
        model.getWidth().setValue(value);
      }
      if (height >= 0) {
        DimensionValue value=DimensionUtil.convertTo(height,DesignChoiceConstants.UNITS_IN,getDefaultUnits());
        model.getHeight().setValue(value);
      }
    }
 else     if (model instanceof ImageHandle) {
      int width=newSize.width;
      int height=newSize.height;
      DimensionValue dimensionValue;
      if (width >= 0) {
        dimensionValue=new DimensionValue(width,DesignChoiceConstants.UNITS_PX);
        model.getWidth().setValue(dimensionValue);
      }
      if (height >= 0) {
        dimensionValue=new DimensionValue(height,DesignChoiceConstants.UNITS_PX);
        model.getHeight().setValue(dimensionValue);
      }
    }
 else {
      double width=MetricUtility.pixelToPixelInch(newSize.width);
      double height=MetricUtility.pixelToPixelInch(newSize.height);
      DimensionValue dimensionValue;
      if (width >= 0) {
        dimensionValue=new DimensionValue(width,DesignChoiceConstants.UNITS_IN);
        model.getWidth().setValue(dimensionValue);
      }
      if (height >= 0) {
        dimensionValue=new DimensionValue(height,DesignChoiceConstants.UNITS_IN);
        model.getHeight().setValue(dimensionValue);
      }
    }
    stack.commit();
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  SemanticException e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    logger.log(Level.SEVERE,e.getMessage(),e);
    stack.rollback();
  }
}