Program: 69290
Project: 69290
Buggy source:
/** 
 * Test case: <br> To read a design file, uses adapter to create a data source design. Checks values of the created data source design.
 * @throws Exception
 */
public void testROMDataSetToODADataSet() throws Exception {
  openDesign(INPUT_FILE);
  OdaDataSetHandle setHandle=(OdaDataSetHandle)designHandle.findDataSet("String_Node_Str");
  DataSetDesign setDesign=new ModelOdaAdapter().createDataSetDesign(setHandle);
  assertEquals("String_Node_Str",setDesign.getName());
  assertEquals(DATA_SET_EXTENSIONID,setDesign.getOdaExtensionDataSetId());
  assertEquals("String_Node_Str",setDesign.getDisplayName());
  Properties props=setDesign.getPublicProperties();
  assertEquals(1,props.getProperties().size());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  props=setDesign.getPrivateProperties();
  assertEquals(1,props.getProperties().size());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  DataSetParameters params=setDesign.getParameters();
  ParameterDefinition paramDefn=(ParameterDefinition)params.getParameterDefinitions().get(0);
  DataElementAttributes dataAttrs=paramDefn.getAttributes();
  assertEquals(ElementNullability.NULLABLE,dataAttrs.getNullability().getValue());
  assertEquals(1,dataAttrs.getPosition());
  assertEquals(0,dataAttrs.getNativeDataTypeCode());
  assertEquals(ParameterMode.IN,paramDefn.getInOutMode().getValue());
  InputParameterAttributes inParamAttrs=paramDefn.getInputAttributes();
  InputElementAttributes inElementAttrs=inParamAttrs.getElementAttributes();
  assertTrue(inElementAttrs.isOptional());
  assertEquals("String_Node_Str",inElementAttrs.getDefaultScalarValue());
  assertNull(setDesign.getResultSets());
  assertEquals(0,dataAttrs.getNativeDataTypeCode());
  assertEquals("String_Node_Str",setDesign.getPrimaryResultSetName());
  assertEquals("String_Node_Str",setDesign.getQueryText());
  DataSourceDesign sourceDesign=setDesign.getDataSourceDesign();
  assertNotNull(sourceDesign);
  assertEquals("String_Node_Str",sourceDesign.getName());
  assertEquals(DATA_SOURCE_EXTENSIONID,sourceDesign.getOdaExtensionId());
  assertEquals("String_Node_Str",sourceDesign.getDisplayName());
  props=sourceDesign.getPublicProperties();
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  assertNull(props.findProperty("String_Node_Str").getValue());
  assertNull(props.findProperty("String_Node_Str").getValue());
  props=sourceDesign.getPrivateProperties();
  assertEquals(2,props.getProperties().size());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
}

Fixed version (ground truth):
/** 
 * Test case: <br> To read a design file, uses adapter to create a data source design. Checks values of the created data source design.
 * @throws Exception
 */
public void testROMDataSetToODADataSet() throws Exception {
  openDesign(INPUT_FILE);
  OdaDataSetHandle setHandle=(OdaDataSetHandle)designHandle.findDataSet("String_Node_Str");
  DataSetDesign setDesign=new ModelOdaAdapter().createDataSetDesign(setHandle);
  assertEquals("String_Node_Str",setDesign.getName());
  assertEquals(DATA_SET_EXTENSIONID,setDesign.getOdaExtensionDataSetId());
  assertEquals("String_Node_Str",setDesign.getDisplayName());
  Properties props=setDesign.getPublicProperties();
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  props=setDesign.getPrivateProperties();
  assertEquals(1,props.getProperties().size());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  DataSetParameters params=setDesign.getParameters();
  ParameterDefinition paramDefn=(ParameterDefinition)params.getParameterDefinitions().get(0);
  DataElementAttributes dataAttrs=paramDefn.getAttributes();
  assertEquals(ElementNullability.NULLABLE,dataAttrs.getNullability().getValue());
  assertEquals(1,dataAttrs.getPosition());
  assertEquals(0,dataAttrs.getNativeDataTypeCode());
  assertEquals(ParameterMode.IN,paramDefn.getInOutMode().getValue());
  InputParameterAttributes inParamAttrs=paramDefn.getInputAttributes();
  InputElementAttributes inElementAttrs=inParamAttrs.getElementAttributes();
  assertTrue(inElementAttrs.isOptional());
  assertEquals("String_Node_Str",inElementAttrs.getDefaultScalarValue());
  assertNull(setDesign.getResultSets());
  assertEquals(0,dataAttrs.getNativeDataTypeCode());
  assertEquals("String_Node_Str",setDesign.getPrimaryResultSetName());
  assertEquals("String_Node_Str",setDesign.getQueryText());
  DataSourceDesign sourceDesign=setDesign.getDataSourceDesign();
  assertNotNull(sourceDesign);
  assertEquals("String_Node_Str",sourceDesign.getName());
  assertEquals(DATA_SOURCE_EXTENSIONID,sourceDesign.getOdaExtensionId());
  assertEquals("String_Node_Str",sourceDesign.getDisplayName());
  props=sourceDesign.getPublicProperties();
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  assertNull(props.findProperty("String_Node_Str").getValue());
  assertNull(props.findProperty("String_Node_Str").getValue());
  props=sourceDesign.getPrivateProperties();
  assertEquals(2,props.getProperties().size());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
  assertEquals("String_Node_Str",props.findProperty("String_Node_Str").getValue());
}