Program: 71742
Project: 71742
Buggy source:
IOdaDataSourceDesign newOdaDataSource(OdaDataSourceHandle source) throws BirtException {
  if (dteSession.getDataSessionContext().getAppContext() == null) {
    dteSession.getDataSessionContext().setAppContext(new HashMap());
  }
  dteSession.getDataSessionContext().getAppContext().put(ResourceIdentifiers.ODA_APP_CONTEXT_KEY_CONSUMER_RESOURCE_IDS,createResourceIdentifiers(source.getModuleHandle()));
  OdaDataSourceDesign dteSource=new OdaDataSourceDesign(source.getQualifiedName());
  IBaseDataSourceEventHandler eventHandler=new DataSourceScriptExecutor(source,context);
  dteSource.setEventHandler(eventHandler);
  adaptBaseDataSource(source,dteSource);
  String driverName=source.getExtensionID();
  if (driverName == null || driverName.length() == 0) {
    throw new EngineException(MessageConstants.EXTENTION_ID_MISSING_ERROR,source.getName());
  }
  dteSource.setExtensionID(driverName);
  Map staticProps=getExtensionProperties(source,source.getExtensionPropertyDefinitionList());
  if (staticProps != null && !staticProps.isEmpty()) {
    Iterator propNamesItr=staticProps.keySet().iterator();
    while (propNamesItr.hasNext()) {
      String propName=(String)propNamesItr.next();
      assert(propName != null);
      String propValue;
      String bindingExpr=source.getPropertyBinding(propName);
      if (needPropertyBinding() && bindingExpr != null && bindingExpr.length() > 0 && context.getDataEngine() instanceof DteDataEngine) {
        propValue=evaluatePropertyBindingExpr(bindingExpr);
      }
 else {
        propValue=(String)staticProps.get(propName);
      }
      dteSource.addPublicProperty(propName,propValue);
    }
  }
  Iterator elmtIter=source.privateDriverPropertiesIterator();
  if (elmtIter != null) {
    while (elmtIter.hasNext()) {
      ExtendedPropertyHandle modelProp=(ExtendedPropertyHandle)elmtIter.next();
      dteSource.addPrivateProperty(modelProp.getName(),modelProp.getValue());
    }
  }
  addPropertyConfigurationId(dteSource);
  return dteSource;
}

Fixed version (ground truth):
IOdaDataSourceDesign newOdaDataSource(OdaDataSourceHandle source) throws BirtException {
  setResourceIDtoDataSourceHandle(source);
  OdaDataSourceDesign dteSource=new OdaDataSourceDesign(source.getQualifiedName());
  IBaseDataSourceEventHandler eventHandler=new DataSourceScriptExecutor(source,context);
  dteSource.setEventHandler(eventHandler);
  adaptBaseDataSource(source,dteSource);
  String driverName=source.getExtensionID();
  if (driverName == null || driverName.length() == 0) {
    throw new EngineException(MessageConstants.EXTENTION_ID_MISSING_ERROR,source.getName());
  }
  dteSource.setExtensionID(driverName);
  Map staticProps=getExtensionProperties(source,source.getExtensionPropertyDefinitionList());
  if (staticProps != null && !staticProps.isEmpty()) {
    Iterator propNamesItr=staticProps.keySet().iterator();
    while (propNamesItr.hasNext()) {
      String propName=(String)propNamesItr.next();
      assert(propName != null);
      String propValue;
      String bindingExpr=source.getPropertyBinding(propName);
      if (needPropertyBinding() && bindingExpr != null && bindingExpr.length() > 0 && context.getDataEngine() instanceof DteDataEngine) {
        propValue=evaluatePropertyBindingExpr(bindingExpr);
      }
 else {
        propValue=(String)staticProps.get(propName);
      }
      dteSource.addPublicProperty(propName,propValue);
    }
  }
  Iterator elmtIter=source.privateDriverPropertiesIterator();
  if (elmtIter != null) {
    while (elmtIter.hasNext()) {
      ExtendedPropertyHandle modelProp=(ExtendedPropertyHandle)elmtIter.next();
      dteSource.addPrivateProperty(modelProp.getName(),modelProp.getValue());
    }
  }
  addPropertyConfigurationId(dteSource);
  return dteSource;
}