Program: 77069
Project: 77069
Buggy source:
public void testImportLibrary() throws Exception {
  openDesign(fileName);
  designHandle.includeLibrary(inputLibraryName,"String_Node_Str");
  LibraryHandle libHandle=designHandle.getLibrary("String_Node_Str");
  TextItemHandle textLibHandle=(TextItemHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",textLibHandle);
  TableHandle tableLibHandle=(TableHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",tableLibHandle);
  StyleHandle styleLibHandle=(StyleHandle)libHandle.findStyle("String_Node_Str");
  assertNotNull("String_Node_Str",styleLibHandle);
  ParameterHandle parameterLibHandle=(ParameterHandle)libHandle.findParameter("String_Node_Str");
  assertNotNull("String_Node_Str",parameterLibHandle);
  LabelHandle labelLibHandle=(LabelHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",labelLibHandle);
  ImageHandle imageLibHandle=(ImageHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",imageLibHandle);
  DataItemHandle dataLibHandle=(DataItemHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",dataLibHandle);
  DataSourceHandle dataSourceLibHandle=(DataSourceHandle)libHandle.findDataSource("String_Node_Str");
  assertNotNull("String_Node_Str",dataSourceLibHandle);
  DataSetHandle dataSetLibHandle=(DataSetHandle)libHandle.findDataSet("String_Node_Str");
  assertNotNull("String_Node_Str",dataSetLibHandle);
  TextItemHandle textHandle=(TextItemHandle)designHandle.getElementFactory().newElementFrom(textLibHandle,"String_Node_Str");
  TableHandle tableHandle=(TableHandle)designHandle.getElementFactory().newElementFrom(tableLibHandle,"String_Node_Str");
  StyleHandle styleHandle=(StyleHandle)designHandle.getElementFactory().newStyle("String_Node_Str");
  ParameterHandle parameterHandle=(ParameterHandle)designHandle.getElementFactory().newElementFrom(parameterLibHandle,"String_Node_Str");
  LabelHandle labelHandle=(LabelHandle)designHandle.getElementFactory().newElementFrom(labelLibHandle,"String_Node_Str");
  ImageHandle imageHandle=(ImageHandle)designHandle.getElementFactory().newElementFrom(imageLibHandle,"String_Node_Str");
  DataItemHandle dataHandle=(DataItemHandle)designHandle.getElementFactory().newElementFrom(dataLibHandle,"String_Node_Str");
  DataSourceHandle dataSourceHandle=(DataSourceHandle)designHandle.getElementFactory().newOdaDataSource("String_Node_Str");
  DataSetHandle dataSetHandle=(DataSetHandle)designHandle.getElementFactory().newOdaDataSet("String_Node_Str");
  designHandle.getDataSources().add(dataSourceHandle);
  designHandle.getDataSets().add(dataSetHandle);
  designHandle.getStyles().add(styleHandle);
  designHandle.getBody().add(dataHandle);
  designHandle.getParameters().add(parameterHandle);
  designHandle.getBody().add(textHandle);
  designHandle.getBody().add(labelHandle);
  designHandle.getBody().add(tableHandle);
  designHandle.getBody().add(imageHandle);
  assertNotNull(designHandle);
  super.saveAs(outputFileName);
  assertTrue(compareTextFile(goldenFileName,outputFileName));
}

Fixed version (ground truth):
/** 
 * @throws Exception
 */
public void testImportLibrary() throws Exception {
  openDesign(fileName);
  designHandle.includeLibrary(inputLibraryName,"String_Node_Str");
  LibraryHandle libHandle=designHandle.getLibrary("String_Node_Str");
  TextItemHandle textLibHandle=(TextItemHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",textLibHandle);
  TableHandle tableLibHandle=(TableHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",tableLibHandle);
  StyleHandle styleLibHandle=libHandle.findStyle("String_Node_Str");
  assertNotNull("String_Node_Str",styleLibHandle);
  ParameterHandle parameterLibHandle=libHandle.findParameter("String_Node_Str");
  assertNotNull("String_Node_Str",parameterLibHandle);
  LabelHandle labelLibHandle=(LabelHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",labelLibHandle);
  ImageHandle imageLibHandle=(ImageHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",imageLibHandle);
  DataItemHandle dataLibHandle=(DataItemHandle)libHandle.findElement("String_Node_Str");
  assertNotNull("String_Node_Str",dataLibHandle);
  DataSourceHandle dataSourceLibHandle=libHandle.findDataSource("String_Node_Str");
  assertNotNull("String_Node_Str",dataSourceLibHandle);
  DataSetHandle dataSetLibHandle=libHandle.findDataSet("String_Node_Str");
  assertNotNull("String_Node_Str",dataSetLibHandle);
  TextItemHandle textHandle=(TextItemHandle)designHandle.getElementFactory().newElementFrom(textLibHandle,"String_Node_Str");
  TableHandle tableHandle=(TableHandle)designHandle.getElementFactory().newElementFrom(tableLibHandle,"String_Node_Str");
  StyleHandle styleHandle=designHandle.getElementFactory().newStyle("String_Node_Str");
  ParameterHandle parameterHandle=(ParameterHandle)designHandle.getElementFactory().newElementFrom(parameterLibHandle,"String_Node_Str");
  LabelHandle labelHandle=(LabelHandle)designHandle.getElementFactory().newElementFrom(labelLibHandle,"String_Node_Str");
  ImageHandle imageHandle=(ImageHandle)designHandle.getElementFactory().newElementFrom(imageLibHandle,"String_Node_Str");
  DataItemHandle dataHandle=(DataItemHandle)designHandle.getElementFactory().newElementFrom(dataLibHandle,"String_Node_Str");
  DataSourceHandle dataSourceHandle=designHandle.getElementFactory().newOdaDataSource("String_Node_Str");
  DataSetHandle dataSetHandle=designHandle.getElementFactory().newOdaDataSet("String_Node_Str");
  designHandle.getDataSources().add(dataSourceHandle);
  designHandle.getDataSets().add(dataSetHandle);
  designHandle.getStyles().add(styleHandle);
  designHandle.getBody().add(dataHandle);
  designHandle.getParameters().add(parameterHandle);
  designHandle.getBody().add(textHandle);
  designHandle.getBody().add(labelHandle);
  designHandle.getBody().add(tableHandle);
  designHandle.getBody().add(imageHandle);
  assertNotNull(designHandle);
  super.saveAs(outputFileName);
  assertTrue(compareTextFile(goldenFileName,outputFileName));
}