Program: 64989
Project: 64989
Buggy source:
/** 
 * Test all properties.
 * @throws Exception if opening design file failed.
 */
public void testParser() throws Exception {
  openDesign(fileName);
  DataItem data=(DataItem)design.findElement("String_Node_Str");
  DataItemHandle dataHandle=(DataItemHandle)data.getHandle(design);
  assertTrue(dataHandle.allowExport());
  assertEquals("String_Node_Str",dataHandle.getResultSetColumn());
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  assertEquals("String_Node_Str",dataHandle.getHelpText());
  assertEquals("String_Node_Str",dataHandle.getHelpTextKey());
  ActionHandle actionHandle=dataHandle.getActionHandle();
  assertNotNull(actionHandle);
  assertEquals(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK,actionHandle.getLinkType());
  assertEquals("String_Node_Str",actionHandle.getURI());
  assertEquals("String_Node_Str",dataHandle.getRole());
  assertEquals("String_Node_Str",dataHandle.getLanguage());
  assertEquals("String_Node_Str",dataHandle.getAltText());
  assertEquals(1,dataHandle.getOrder());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertEquals("String_Node_Str",dataHandle.getRole());
  assertEquals(ReportDesign.BODY_SLOT,dataHandle.getContainer().findContentSlot(dataHandle));
  assertEquals("String_Node_Str",dataHandle.getResultSetColumn());
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  assertEquals("String_Node_Str",dataHandle.getHelpText());
  assertEquals("String_Node_Str",dataHandle.getHelpTextKey());
  actionHandle=dataHandle.getActionHandle();
  assertNotNull(actionHandle);
  assertEquals(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK,actionHandle.getLinkType());
  assertEquals("String_Node_Str",actionHandle.getURI());
  Iterator columnBindings=dataHandle.columnBindingsIterator();
  ComputedColumnHandle column=(ComputedColumnHandle)columnBindings.next();
  assertEquals("String_Node_Str",column.getName());
  assertEquals("String_Node_Str",column.getExpression());
  assertEquals("String_Node_Str",column.getDisplayName());
  assertEquals("String_Node_Str",column.getDisplayNameID());
  assertEquals("String_Node_Str",column.getDisplayText());
  assertEquals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER,column.getDataType());
  assertEquals("String_Node_Str",column.getAggregateOn());
  assertEquals("String_Node_Str",serializeStringList(column.getAggregateOnList()));
  Iterator iter=column.argumentsIterator();
  AggregationArgumentHandle argument=(AggregationArgumentHandle)iter.next();
  assertEquals("String_Node_Str",argument.getName());
  assertEquals("String_Node_Str",argument.getValue());
  argument=(AggregationArgumentHandle)iter.next();
  assertEquals("String_Node_Str",argument.getName());
  assertEquals("String_Node_Str",argument.getValue());
  assertEquals(DesignChoiceConstants.MEASURE_FUNCTION_SUM,column.getAggregateFunction());
  assertEquals("String_Node_Str",column.getFilterExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  columnBindings=dataHandle.columnBindingsIterator();
  column=(ComputedColumnHandle)columnBindings.next();
  assertEquals("String_Node_Str",column.getName());
  assertEquals("String_Node_Str",column.getExpression());
  assertEquals("String_Node_Str",column.getDisplayName());
  assertEquals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER,column.getDataType());
  assertEquals("String_Node_Str",column.getAggregateOn());
  assertEquals("String_Node_Str",serializeStringList(column.getAggregateOnList()));
  assertFalse(dataHandle.allowExport());
}

Fixed version (ground truth):
/** 
 * Test all properties.
 * @throws Exception if opening design file failed.
 */
public void testParser() throws Exception {
  openDesign(fileName);
  DataItem data=(DataItem)design.findElement("String_Node_Str");
  DataItemHandle dataHandle=(DataItemHandle)data.getHandle(design);
  assertTrue(dataHandle.allowExport());
  assertEquals("String_Node_Str",dataHandle.getResultSetColumn());
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  assertEquals("String_Node_Str",dataHandle.getHelpText());
  assertEquals("String_Node_Str",dataHandle.getHelpTextKey());
  ActionHandle actionHandle=dataHandle.getActionHandle();
  assertNotNull(actionHandle);
  assertEquals(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK,actionHandle.getLinkType());
  assertEquals("String_Node_Str",actionHandle.getURI());
  assertEquals("String_Node_Str",dataHandle.getTagType());
  assertEquals("String_Node_Str",dataHandle.getLanguage());
  assertEquals("String_Node_Str",dataHandle.getAltText());
  assertEquals(1,dataHandle.getOrder());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertEquals("String_Node_Str",dataHandle.getTagType());
  assertEquals(ReportDesign.BODY_SLOT,dataHandle.getContainer().findContentSlot(dataHandle));
  assertEquals("String_Node_Str",dataHandle.getResultSetColumn());
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  assertEquals("String_Node_Str",dataHandle.getHelpText());
  assertEquals("String_Node_Str",dataHandle.getHelpTextKey());
  actionHandle=dataHandle.getActionHandle();
  assertNotNull(actionHandle);
  assertEquals(DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK,actionHandle.getLinkType());
  assertEquals("String_Node_Str",actionHandle.getURI());
  Iterator columnBindings=dataHandle.columnBindingsIterator();
  ComputedColumnHandle column=(ComputedColumnHandle)columnBindings.next();
  assertEquals("String_Node_Str",column.getName());
  assertEquals("String_Node_Str",column.getExpression());
  assertEquals("String_Node_Str",column.getDisplayName());
  assertEquals("String_Node_Str",column.getDisplayNameID());
  assertEquals("String_Node_Str",column.getDisplayText());
  assertEquals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER,column.getDataType());
  assertEquals("String_Node_Str",column.getAggregateOn());
  assertEquals("String_Node_Str",serializeStringList(column.getAggregateOnList()));
  Iterator iter=column.argumentsIterator();
  AggregationArgumentHandle argument=(AggregationArgumentHandle)iter.next();
  assertEquals("String_Node_Str",argument.getName());
  assertEquals("String_Node_Str",argument.getValue());
  argument=(AggregationArgumentHandle)iter.next();
  assertEquals("String_Node_Str",argument.getName());
  assertEquals("String_Node_Str",argument.getValue());
  assertEquals(DesignChoiceConstants.MEASURE_FUNCTION_SUM,column.getAggregateFunction());
  assertEquals("String_Node_Str",column.getFilterExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  assertNull(dataHandle.getValueExpr());
  assertEquals("String_Node_Str",dataHandle.getResultSetExpression());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  columnBindings=dataHandle.columnBindingsIterator();
  column=(ComputedColumnHandle)columnBindings.next();
  assertEquals("String_Node_Str",column.getName());
  assertEquals("String_Node_Str",column.getExpression());
  assertEquals("String_Node_Str",column.getDisplayName());
  assertEquals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER,column.getDataType());
  assertEquals("String_Node_Str",column.getAggregateOn());
  assertEquals("String_Node_Str",serializeStringList(column.getAggregateOnList()));
  assertFalse(dataHandle.allowExport());
}