Program: 64990
Project: 64990
Buggy source:
/** 
 * This test sets properties, writes the design file and compares it with golden file.
 * @throws Exception if opening or saving design file failed.
 */
public void testWriter() throws Exception {
  openDesign(fileName);
  DataItem data=(DataItem)design.findElement("String_Node_Str");
  DataItemHandle dataHandle=(DataItemHandle)data.getHandle(design);
  dataHandle.setHelpTextKey("String_Node_Str");
  dataHandle.setHelpText("String_Node_Str");
  ActionHandle action=dataHandle.getActionHandle();
  assertNotNull(action);
  dataHandle.setRole("String_Node_Str");
  dataHandle.setLanguage("String_Node_Str");
  dataHandle.setAltText("String_Node_Str");
  dataHandle.setOrder(2);
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  dataHandle.setHelpTextKey("String_Node_Str");
  dataHandle.setHelpText("String_Node_Str");
  action=dataHandle.getActionHandle();
  assertNotNull(action);
  Iterator columnBindings=dataHandle.columnBindingsIterator();
  ComputedColumnHandle column=(ComputedColumnHandle)columnBindings.next();
  column.setDisplayName("String_Node_Str");
  column.setDisplayNameID("String_Node_Str");
  column.setAggregateFunction(DesignChoiceConstants.MEASURE_FUNCTION_COUNT);
  data=(DataItem)design.findElement("String_Node_Str");
  columnBindings=dataHandle.columnBindingsIterator();
  column=(ComputedColumnHandle)columnBindings.next();
  AggregationArgumentHandle argumentHandle=(AggregationArgumentHandle)column.argumentsIterator().next();
  argumentHandle.setName("String_Node_Str" + argumentHandle.getName());
  argumentHandle.setValue("String_Node_Str" + argumentHandle.getValue());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  dataHandle.setAllowExport(true);
  save();
  assertTrue(compareFile(goldenFileName));
}

Fixed version (ground truth):
/** 
 * This test sets properties, writes the design file and compares it with golden file.
 * @throws Exception if opening or saving design file failed.
 */
public void testWriter() throws Exception {
  openDesign(fileName);
  DataItem data=(DataItem)design.findElement("String_Node_Str");
  DataItemHandle dataHandle=(DataItemHandle)data.getHandle(design);
  dataHandle.setHelpTextKey("String_Node_Str");
  dataHandle.setHelpText("String_Node_Str");
  ActionHandle action=dataHandle.getActionHandle();
  assertNotNull(action);
  dataHandle.setTagType("String_Node_Str");
  dataHandle.setLanguage("String_Node_Str");
  dataHandle.setAltText("String_Node_Str");
  dataHandle.setOrder(2);
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  dataHandle.setHelpTextKey("String_Node_Str");
  dataHandle.setHelpText("String_Node_Str");
  action=dataHandle.getActionHandle();
  assertNotNull(action);
  Iterator columnBindings=dataHandle.columnBindingsIterator();
  ComputedColumnHandle column=(ComputedColumnHandle)columnBindings.next();
  column.setDisplayName("String_Node_Str");
  column.setDisplayNameID("String_Node_Str");
  column.setAggregateFunction(DesignChoiceConstants.MEASURE_FUNCTION_COUNT);
  data=(DataItem)design.findElement("String_Node_Str");
  columnBindings=dataHandle.columnBindingsIterator();
  column=(ComputedColumnHandle)columnBindings.next();
  AggregationArgumentHandle argumentHandle=(AggregationArgumentHandle)column.argumentsIterator().next();
  argumentHandle.setName("String_Node_Str" + argumentHandle.getName());
  argumentHandle.setValue("String_Node_Str" + argumentHandle.getValue());
  dataHandle=(DataItemHandle)designHandle.findElement("String_Node_Str");
  dataHandle.setAllowExport(true);
  save();
  assertTrue(compareFile(goldenFileName));
}