Program: 64997
Project: 64997
Buggy source:
/** 
 * Test the slots of List item.
 * @throws Exception if any exception
 */
public void testParser() throws Exception {
  ListItem list=(ListItem)design.findElement("String_Node_Str");
  assertNotNull(list);
  ListHandle listHandle=list.handle(design);
  assertEquals("String_Node_Str",listHandle.getOnCreate());
  assertEquals("String_Node_Str",listHandle.getOnPrepare());
  assertEquals("String_Node_Str",listHandle.getOnRender());
  assertEquals("String_Node_Str",listHandle.getOnPageBreak());
  assertEquals("String_Node_Str",listHandle.getRole());
  assertEquals("String_Node_Str",listHandle.getLanguage());
  assertEquals("String_Node_Str",listHandle.getAltText());
  assertEquals(120,listHandle.getPageBreakInterval());
  Iterator sortKeys=listHandle.sortsIterator();
  SortKeyHandle sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  assertNull(sortKeys.next());
  Iterator filters=listHandle.filtersIterator();
  FilterConditionHandle filterHandle=(FilterConditionHandle)filters.next();
  assertEquals("String_Node_Str",filterHandle.getOperator());
  assertEquals("String_Node_Str",filterHandle.getExpr());
  assertEquals("String_Node_Str",filterHandle.getValue1());
  assertEquals("String_Node_Str",filterHandle.getValue2());
  MultiElementSlot header=(MultiElementSlot)list.getSlot(ListItem.HEADER_SLOT);
  FreeForm form=(FreeForm)header.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  MultiElementSlot detail=(MultiElementSlot)list.getSlot(ListItem.DETAIL_SLOT);
  form=(FreeForm)detail.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  MultiElementSlot footer=(MultiElementSlot)list.getSlot(ListItem.FOOTER_SLOT);
  form=(FreeForm)footer.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  MultiElementSlot groupSlot=(MultiElementSlot)list.getSlot(ListItem.GROUP_SLOT);
  ListGroup group=(ListGroup)groupSlot.getContent(0);
  ListGroupHandle groupHandle=(ListGroupHandle)group.getHandle(design);
  assertEquals("String_Node_Str",groupHandle.getGroupStart());
  assertEquals("String_Node_Str",groupHandle.getTocExpression());
  assertTrue(groupHandle.hideDetail());
  assertFalse(groupHandle.showDetailFilter());
  filters=groupHandle.filtersIterator();
  filterHandle=(FilterConditionHandle)filters.next();
  assertEquals("String_Node_Str",filterHandle.getOperator());
  assertEquals("String_Node_Str",filterHandle.getExpr());
  assertEquals("String_Node_Str",filterHandle.getValue1());
  assertEquals("String_Node_Str",filterHandle.getValue2());
  header=(MultiElementSlot)group.getSlot(ListGroup.HEADER_SLOT);
  form=(FreeForm)header.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  footer=(MultiElementSlot)group.getSlot(ListGroup.FOOTER_SLOT);
  form=(FreeForm)footer.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  assertEquals("String_Node_Str",groupHandle.getInterval());
  assertTrue(3.0 == groupHandle.getIntervalRange());
  assertEquals("String_Node_Str",groupHandle.getSortDirection());
  assertEquals("String_Node_Str",groupHandle.getSortType());
  assertEquals("String_Node_Str",groupHandle.getKeyExpr());
  assertEquals("String_Node_Str",groupHandle.getName());
  assertEquals("String_Node_Str",groupHandle.getOnCreate());
  assertEquals("String_Node_Str",groupHandle.getOnPrepare());
  assertEquals("String_Node_Str",groupHandle.getOnRender());
  assertEquals("String_Node_Str",groupHandle.getOnPageBreak());
  sortKeys=groupHandle.sortsIterator();
  sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  assertEquals("String_Node_Str",groupHandle.getBookmark());
  ListItem list2=(ListItem)design.findElement("String_Node_Str");
  ListHandle list2Handle=list2.handle(design);
  assertEquals("String_Node_Str",list2Handle.getRole());
}

Fixed version (ground truth):
/** 
 * Test the slots of List item.
 * @throws Exception if any exception
 */
public void testParser() throws Exception {
  ListItem list=(ListItem)design.findElement("String_Node_Str");
  assertNotNull(list);
  ListHandle listHandle=list.handle(design);
  assertEquals("String_Node_Str",listHandle.getOnCreate());
  assertEquals("String_Node_Str",listHandle.getOnPrepare());
  assertEquals("String_Node_Str",listHandle.getOnRender());
  assertEquals("String_Node_Str",listHandle.getOnPageBreak());
  assertEquals("String_Node_Str",listHandle.getTagType());
  assertEquals("String_Node_Str",listHandle.getLanguage());
  assertEquals("String_Node_Str",listHandle.getAltText());
  assertEquals(120,listHandle.getPageBreakInterval());
  Iterator sortKeys=listHandle.sortsIterator();
  SortKeyHandle sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  assertNull(sortKeys.next());
  Iterator filters=listHandle.filtersIterator();
  FilterConditionHandle filterHandle=(FilterConditionHandle)filters.next();
  assertEquals("String_Node_Str",filterHandle.getOperator());
  assertEquals("String_Node_Str",filterHandle.getExpr());
  assertEquals("String_Node_Str",filterHandle.getValue1());
  assertEquals("String_Node_Str",filterHandle.getValue2());
  MultiElementSlot header=(MultiElementSlot)list.getSlot(ListItem.HEADER_SLOT);
  FreeForm form=(FreeForm)header.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  MultiElementSlot detail=(MultiElementSlot)list.getSlot(ListItem.DETAIL_SLOT);
  form=(FreeForm)detail.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  MultiElementSlot footer=(MultiElementSlot)list.getSlot(ListItem.FOOTER_SLOT);
  form=(FreeForm)footer.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  MultiElementSlot groupSlot=(MultiElementSlot)list.getSlot(ListItem.GROUP_SLOT);
  ListGroup group=(ListGroup)groupSlot.getContent(0);
  ListGroupHandle groupHandle=(ListGroupHandle)group.getHandle(design);
  assertEquals("String_Node_Str",groupHandle.getGroupStart());
  assertEquals("String_Node_Str",groupHandle.getTocExpression());
  assertTrue(groupHandle.hideDetail());
  assertFalse(groupHandle.showDetailFilter());
  filters=groupHandle.filtersIterator();
  filterHandle=(FilterConditionHandle)filters.next();
  assertEquals("String_Node_Str",filterHandle.getOperator());
  assertEquals("String_Node_Str",filterHandle.getExpr());
  assertEquals("String_Node_Str",filterHandle.getValue1());
  assertEquals("String_Node_Str",filterHandle.getValue2());
  header=(MultiElementSlot)group.getSlot(ListGroup.HEADER_SLOT);
  form=(FreeForm)header.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  footer=(MultiElementSlot)group.getSlot(ListGroup.FOOTER_SLOT);
  form=(FreeForm)footer.getContent(0);
  assertEquals("String_Node_Str",form.getStringProperty(design,FreeForm.COMMENTS_PROP));
  assertEquals("String_Node_Str",groupHandle.getInterval());
  assertTrue(3.0 == groupHandle.getIntervalRange());
  assertEquals("String_Node_Str",groupHandle.getSortDirection());
  assertEquals("String_Node_Str",groupHandle.getSortType());
  assertEquals("String_Node_Str",groupHandle.getKeyExpr());
  assertEquals("String_Node_Str",groupHandle.getName());
  assertEquals("String_Node_Str",groupHandle.getOnCreate());
  assertEquals("String_Node_Str",groupHandle.getOnPrepare());
  assertEquals("String_Node_Str",groupHandle.getOnRender());
  assertEquals("String_Node_Str",groupHandle.getOnPageBreak());
  sortKeys=groupHandle.sortsIterator();
  sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  sortKeyHandle=(SortKeyHandle)sortKeys.next();
  assertEquals("String_Node_Str",sortKeyHandle.getKey());
  assertEquals("String_Node_Str",sortKeyHandle.getDirection());
  assertEquals("String_Node_Str",groupHandle.getBookmark());
  ListItem list2=(ListItem)design.findElement("String_Node_Str");
  ListHandle list2Handle=list2.handle(design);
  assertEquals("String_Node_Str",list2Handle.getTagType());
}