Program: 76598
Project: 76598
Buggy source:
/** 
 * Tests to read and set properties on a GroupElement.
 * @throws Exception if errors occur when opens the design file
 */
public void testProperties() throws Exception {
  openDesign("String_Node_Str");
  ListHandle list=(ListHandle)designHandle.findElement("String_Node_Str");
  assertNotNull(list);
  SlotHandle groupSlot=list.getGroups();
  GroupHandle group=(GroupHandle)groupSlot.get(0);
  group.setName("String_Node_Str");
  assertEquals("String_Node_Str",group.getDisplayLabel(DesignElement.FULL_LABEL));
  assertEquals("String_Node_Str",group.getGroupStart());
  group.setPageBreakAfter(DesignChoiceConstants.PAGE_BREAK_AFTER_AVOID);
  assertEquals(DesignChoiceConstants.PAGE_BREAK_AFTER_AVOID,group.getPageBreakAfter());
  assertEquals(DesignChoiceConstants.PAGE_BREAK_AFTER_AVOID,(String)group.getFactoryPropertyHandle(Style.PAGE_BREAK_AFTER_PROP).getValue());
  group.setPageBreakBefore(DesignChoiceConstants.PAGE_BREAK_BEFORE_ALWAYS_EXCLUDING_FIRST);
  assertEquals(DesignChoiceConstants.PAGE_BREAK_BEFORE_ALWAYS_EXCLUDING_FIRST,group.getPageBreakBefore());
  group.setRepeatHeader(false);
  assertFalse(group.repeatHeader());
  group.setHideDetail(true);
  assertTrue(group.hideDetail());
  try {
    group.setPageBreakAfter("String_Node_Str");
    fail();
  }
 catch (  PropertyValueException e) {
    assertEquals(PropertyValueException.DESIGN_EXCEPTION_CHOICE_NOT_FOUND,e.getErrorCode());
  }
  assertNull(group.getPropertyDefn(IStyleModel.BACKGROUND_ATTACHMENT_PROP));
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setInterval(DesignChoiceConstants.INTERVAL_PREFIX);
  assertEquals(DesignChoiceConstants.INTERVAL_PREFIX,group.getInterval());
  group.setIntervalRange(0.1234);
  assertTrue(0.1234 == group.getIntervalRange());
  group.setKeyExpr("String_Node_Str");
  assertEquals("String_Node_Str",group.getKeyExpr());
  group.setTocExpression("String_Node_Str");
  assertEquals("String_Node_Str",group.getTocExpression());
  group.setTocExpression(null);
  assertEquals("String_Node_Str",group.getKeyExpr());
  assertNull(group.getTocExpression());
  group.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_DESC);
  assertEquals(DesignChoiceConstants.SORT_DIRECTION_DESC,group.getSortDirection());
  group.setOnPrepare("String_Node_Str");
  assertEquals("String_Node_Str",group.getOnPrepare());
}

Fixed version (ground truth):
/** 
 * Tests to read and set properties on a GroupElement.
 * @throws Exception if errors occur when opens the design file
 */
public void testProperties() throws Exception {
  openDesign("String_Node_Str");
  ListHandle list=(ListHandle)designHandle.findElement("String_Node_Str");
  assertNotNull(list);
  SlotHandle groupSlot=list.getGroups();
  GroupHandle group=(GroupHandle)groupSlot.get(0);
  group.setName("String_Node_Str");
  assertEquals("String_Node_Str",group.getDisplayLabel(DesignElement.FULL_LABEL));
  assertEquals("String_Node_Str",group.getGroupStart());
  group.setPageBreakAfter(DesignChoiceConstants.PAGE_BREAK_AFTER_AVOID);
  assertEquals(DesignChoiceConstants.PAGE_BREAK_AFTER_AVOID,group.getPageBreakAfter());
  assertEquals(DesignChoiceConstants.PAGE_BREAK_AFTER_AVOID,(String)group.getFactoryPropertyHandle(Style.PAGE_BREAK_AFTER_PROP).getValue());
  group.setPageBreakBefore(DesignChoiceConstants.PAGE_BREAK_BEFORE_ALWAYS_EXCLUDING_FIRST);
  assertEquals(DesignChoiceConstants.PAGE_BREAK_BEFORE_ALWAYS_EXCLUDING_FIRST,group.getPageBreakBefore());
  group.setRepeatHeader(false);
  assertFalse(group.repeatHeader());
  group.setHideDetail(true);
  assertTrue(group.hideDetail());
  try {
    group.setPageBreakAfter("String_Node_Str");
    fail();
  }
 catch (  PropertyValueException e) {
    assertEquals(PropertyValueException.DESIGN_EXCEPTION_CHOICE_NOT_FOUND,e.getErrorCode());
  }
  assertNull(group.getPropertyDefn(IStyleModel.BACKGROUND_ATTACHMENT_PROP));
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setName("String_Node_Str");
  assertEquals(null,group.getDisplayLabel(DesignElement.USER_LABEL));
  group.setInterval(DesignChoiceConstants.INTERVAL_PREFIX);
  assertEquals(DesignChoiceConstants.INTERVAL_PREFIX,group.getInterval());
  group.setIntervalRange(0.1234);
  assertTrue(0.1234 == group.getIntervalRange());
  group.setKeyExpr("String_Node_Str");
  assertEquals("String_Node_Str",group.getKeyExpr());
  group.setTocExpression("String_Node_Str");
  assertEquals("String_Node_Str",group.getTocExpression());
  group.setTocExpression(null);
  assertEquals("String_Node_Str",group.getKeyExpr());
  assertNull(group.getTocExpression());
  group.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_DESC);
  assertEquals(DesignChoiceConstants.SORT_DIRECTION_DESC,group.getSortDirection());
  group.setOnPrepare("String_Node_Str");
  assertEquals("String_Node_Str",group.getOnPrepare());
  assertNull(group.getBookmark());
  group.setBookmark("String_Node_Str");
  assertEquals("String_Node_Str",group.getBookmark());
}