Program: 64887
Project: 64887
Buggy source:
/** 
 * Tests <code>MasterPageSizeValidator</code>.
 * @throws Exception if any exception
 */
public void testTriggers() throws Exception {
  createDesign();
  MetaDataDictionary.getInstance().setUseValidationTrigger(true);
  SimpleMasterPageHandle pageHandle=designHandle.getElementFactory().newSimpleMasterPage("String_Node_Str");
  designHandle.getMasterPages().add(pageHandle);
  designHandle.addValidationListener(listener);
  DimensionHandle marginLeft=pageHandle.getLeftMargin();
  marginLeft.setStringValue("String_Node_Str");
  assertTrue(listener.hasError(pageHandle,MasterPageSizeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_INVALID_PAGE_MARGINS));
  marginLeft.setStringValue("String_Node_Str");
  assertFalse(listener.hasError(pageHandle,MasterPageSizeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_INVALID_PAGE_MARGINS));
  pageHandle.setPageType(DesignChoiceConstants.PAGE_SIZE_CUSTOM);
  assertTrue(listener.hasError(pageHandle,MasterPageTypeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_MISSING_PAGE_SIZE));
  DimensionHandle height=pageHandle.getHeight();
  height.setStringValue("String_Node_Str");
  assertTrue(listener.hasError(pageHandle,MasterPageTypeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_MISSING_PAGE_SIZE));
  DimensionHandle width=pageHandle.getWidth();
  width.setStringValue("String_Node_Str");
  assertFalse(listener.hasError(pageHandle,MasterPageTypeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_MISSING_PAGE_SIZE));
  DimensionHandle marginBottom=pageHandle.getBottomMargin();
  marginBottom.setStringValue("String_Node_Str");
  assertTrue(listener.hasError(pageHandle,MasterPageSizeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_INVALID_PAGE_MARGINS));
}

Fixed version (ground truth):
/** 
 * Tests <code>MasterPageSizeValidator</code>.
 * @throws Exception if any exception
 */
public void testTriggers() throws Exception {
  createDesign();
  MetaDataDictionary.getInstance().setUseValidationTrigger(true);
  SimpleMasterPageHandle pageHandle=designHandle.getElementFactory().newSimpleMasterPage("String_Node_Str");
  designHandle.getMasterPages().add(pageHandle);
  designHandle.addValidationListener(listener);
  DimensionHandle marginLeft=pageHandle.getLeftMargin();
  marginLeft.setStringValue("String_Node_Str");
  assertTrue(listener.hasError(pageHandle,MasterPageSizeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_INVALID_PAGE_MARGINS));
  marginLeft.setStringValue("String_Node_Str");
  assertFalse(listener.hasError(pageHandle,MasterPageSizeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_INVALID_PAGE_MARGINS));
  pageHandle.setPageType(DesignChoiceConstants.PAGE_SIZE_CUSTOM);
  assertTrue(listener.hasError(pageHandle,MasterPageTypeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_MISSING_PAGE_SIZE));
  DimensionHandle height=pageHandle.getHeight();
  height.setStringValue("String_Node_Str");
  DimensionHandle width=pageHandle.getWidth();
  width.setStringValue("String_Node_Str");
  DimensionHandle marginBottom=pageHandle.getBottomMargin();
  marginBottom.setStringValue("String_Node_Str");
  assertTrue(listener.hasError(pageHandle,MasterPageSizeValidator.getInstance().getName(),SemanticError.DESIGN_EXCEPTION_INVALID_PAGE_MARGINS));
}