Program: 66423
Project: 66423
Buggy source:
/** 
 * INTERNAL: Initialize and validate the mapping properties.
 */
@Override public void initialize(AbstractSession session) throws DescriptorException {
  if (isKeyForSourceSpecified()) {
    initializeSourceKeys(session);
  }
 else {
    initializeSourceKeysWithDefaults(session);
  }
  initializeReferenceTable(session);
  initializeReferenceKeys(session);
  initializeDirectField(session);
  if (getReferenceTable().getName().indexOf(' ') != -1) {
    String beginQuote=((DatasourcePlatform)session.getDatasourcePlatform()).getStartDelimiter();
    String endQuote=((DatasourcePlatform)session.getDatasourcePlatform()).getEndDelimiter();
    if (getReferenceTable().getName().indexOf(beginQuote) == -1) {
      getReferenceTable().setName(beginQuote + getReferenceTable().getName() + endQuote);
    }
  }
  if (this.listOrderField != null) {
    this.initializeListOrderField(session);
  }
  getContainerPolicy().initialize(session,referenceTable);
  if (!hasCustomSelectionQuery()) {
    initOrRebuildSelectQuery();
    selectionQuery.setName(getAttributeName());
    if (shouldInitializeSelectionCriteria()) {
      initializeSelectionCriteria(session);
      initializeSelectionStatement(session);
    }
    if (!getSelectionQuery().hasSessionName()) {
      getSelectionQuery().setSessionName(session.getName());
    }
  }
  if ((getValueConverter() != null) && (getSelectionQuery() instanceof DirectReadQuery)) {
    ((DirectReadQuery)getSelectionQuery()).setValueConverter(getValueConverter());
  }
  initializeDeleteAllQuery(session);
  initializeDeleteQuery(session);
  initializeInsertQuery(session);
  initializeDeleteAtIndexQuery(session);
  initializeUpdateAtIndexQuery(session);
  if (getHistoryPolicy() != null) {
    getHistoryPolicy().initialize(session);
  }
  if (getValueConverter() != null) {
    getValueConverter().initialize(this,session);
  }
  super.initialize(session);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Initialize and validate the mapping properties.
 */
@Override public void initialize(AbstractSession session) throws DescriptorException {
  if (isKeyForSourceSpecified()) {
    initializeSourceKeys(session);
  }
 else {
    initializeSourceKeysWithDefaults(session);
  }
  initializeReferenceTable(session);
  initializeReferenceKeys(session);
  initializeDirectField(session);
  if (getReferenceTable().getName().indexOf(' ') != -1) {
    String beginQuote=((DatasourcePlatform)session.getDatasourcePlatform()).getStartDelimiter();
    String endQuote=((DatasourcePlatform)session.getDatasourcePlatform()).getEndDelimiter();
    if (getReferenceTable().getName().indexOf(beginQuote) == -1) {
      getReferenceTable().setName(beginQuote + getReferenceTable().getName() + endQuote);
    }
  }
  if (this.listOrderField != null) {
    this.initializeListOrderField(session);
  }
  getContainerPolicy().initialize(session,referenceTable);
  if (!hasCustomSelectionQuery()) {
    initOrRebuildSelectQuery();
    selectionQuery.setName(getAttributeName());
    if (shouldInitializeSelectionCriteria()) {
      initializeSelectionCriteria(session);
      initializeSelectionStatement(session);
    }
    if (!getSelectionQuery().hasSessionName()) {
      getSelectionQuery().setSessionName(session.getName());
    }
  }
  if ((getValueConverter() != null) && (getSelectionQuery() instanceof DirectReadQuery)) {
    ((DirectReadQuery)getSelectionQuery()).setValueConverter(getValueConverter());
  }
  initializeDeleteAllQuery(session);
  initializeDeleteQuery(session);
  initializeDeleteNullQuery(session);
  initializeInsertQuery(session);
  initializeDeleteAtIndexQuery(session);
  initializeUpdateAtIndexQuery(session);
  if (getHistoryPolicy() != null) {
    getHistoryPolicy().initialize(session);
  }
  if (getValueConverter() != null) {
    getValueConverter().initialize(this,session);
  }
  super.initialize(session);
}