Program: 65510
Project: 65510
Buggy source:
public ClassDescriptor buildDatasourceLoginDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(DatasourceLogin.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("String_Node_Str"));
  descriptor.getInheritancePolicy().addClassIndicator(DatabaseLogin.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(EISLogin.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(XMLLogin.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  XMLDirectMapping platformMapping=new XMLDirectMapping();
  platformMapping.setAttributeName("String_Node_Str");
  platformMapping.setGetMethodName("String_Node_Str");
  platformMapping.setSetMethodName("String_Node_Str");
  platformMapping.setConverter(new Converter(){
    protected DatabaseMapping mapping;
    private Map platformList;
    private String oldPrefix="String_Node_Str";
    private String newPrefix="String_Node_Str";
    public Object convertObjectValueToDataValue(    Object objectValue,    Session session){
      if (objectValue == null) {
        return null;
      }
      return objectValue.getClass().getName();
    }
    public Object convertDataValueToObjectValue(    Object fieldValue,    Session session){
      if (fieldValue == null) {
        return null;
      }
      if (((String)fieldValue).startsWith(oldPrefix)) {
        fieldValue=((String)fieldValue).replaceFirst(oldPrefix,newPrefix);
      }
      Object result=platformList.get(fieldValue);
      if (result != null) {
        fieldValue=result;
      }
      Object attributeValue;
      Class attributeClass=(Class)((AbstractSession)session).getDatasourcePlatform().convertObject(fieldValue,ClassConstants.CLASS);
      try {
        if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
          try {
            attributeValue=AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeClass));
          }
 catch (          PrivilegedActionException exception) {
            throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception.getException());
          }
        }
 else {
          attributeValue=PrivilegedAccessHelper.newInstanceFromClass(attributeClass);
        }
      }
 catch (      Exception exception) {
        throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception);
      }
      return attributeValue;
    }
    public boolean isMutable(){
      return false;
    }
    public void initialize(    DatabaseMapping mapping,    Session session){
      this.platformList=new HashMap();
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.mapping=mapping;
      if (this.mapping.isDirectToFieldMapping()) {
        AbstractDirectMapping directMapping=(AbstractDirectMapping)this.mapping;
        if (directMapping.getFieldClassification() == null) {
          directMapping.setFieldClassification(ClassConstants.STRING);
        }
      }
    }
  }
);
  platformMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(platformMapping);
  XMLDirectMapping userNameMapping=new XMLDirectMapping();
  userNameMapping.setAttributeName("String_Node_Str");
  userNameMapping.setGetMethodName("String_Node_Str");
  userNameMapping.setSetMethodName("String_Node_Str");
  userNameMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(userNameMapping);
  XMLDirectMapping passwordMapping=new XMLDirectMapping();
  passwordMapping.setAttributeName("String_Node_Str");
  passwordMapping.setGetMethodName("String_Node_Str");
  passwordMapping.setSetMethodName("String_Node_Str");
  passwordMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(passwordMapping);
  XMLDirectMapping usesExternalConnectionPoolingMapping=new XMLDirectMapping();
  usesExternalConnectionPoolingMapping.setAttributeName("String_Node_Str");
  usesExternalConnectionPoolingMapping.setGetMethodName("String_Node_Str");
  usesExternalConnectionPoolingMapping.setSetMethodName("String_Node_Str");
  usesExternalConnectionPoolingMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  usesExternalConnectionPoolingMapping.setNullValue(Boolean.FALSE);
  descriptor.addMapping(usesExternalConnectionPoolingMapping);
  XMLDirectMapping usesExternalTransactionControllerMapping=new XMLDirectMapping();
  usesExternalTransactionControllerMapping.setAttributeName("String_Node_Str");
  usesExternalTransactionControllerMapping.setGetMethodName("String_Node_Str");
  usesExternalTransactionControllerMapping.setSetMethodName("String_Node_Str");
  usesExternalTransactionControllerMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  usesExternalTransactionControllerMapping.setNullValue(Boolean.FALSE);
  descriptor.addMapping(usesExternalTransactionControllerMapping);
  XMLCompositeObjectMapping defaultSequenceMapping=new XMLCompositeObjectMapping();
  defaultSequenceMapping.setAttributeName("String_Node_Str");
  defaultSequenceMapping.setSetMethodName("String_Node_Str");
  defaultSequenceMapping.setGetMethodName("String_Node_Str");
  defaultSequenceMapping.setReferenceClass(Sequence.class);
  defaultSequenceMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str" + getPrimaryNamespaceXPath()+ "String_Node_Str");
  descriptor.addMapping(defaultSequenceMapping);
  XMLCompositeCollectionMapping sequencesMapping=new XMLCompositeCollectionMapping();
  MapContainerPolicy containerPolicy=new MapContainerPolicy(HashMap.class);
  containerPolicy.setKeyName("String_Node_Str",Sequence.class.getName());
  sequencesMapping.setContainerPolicy(containerPolicy);
  sequencesMapping.setAttributeName("String_Node_Str");
  sequencesMapping.setSetMethodName("String_Node_Str");
  sequencesMapping.setGetMethodName("String_Node_Str");
  sequencesMapping.setReferenceClass(Sequence.class);
  sequencesMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str" + getPrimaryNamespaceXPath()+ "String_Node_Str"+ getPrimaryNamespaceXPath()+ "String_Node_Str");
  descriptor.addMapping(sequencesMapping);
  return descriptor;
}

Fixed version (ground truth):
public ClassDescriptor buildDatasourceLoginDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(DatasourceLogin.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("String_Node_Str"));
  descriptor.getInheritancePolicy().addClassIndicator(DatabaseLogin.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(EISLogin.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(XMLLogin.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  XMLDirectMapping platformMapping=new XMLDirectMapping();
  platformMapping.setAttributeName("String_Node_Str");
  platformMapping.setGetMethodName("String_Node_Str");
  platformMapping.setSetMethodName("String_Node_Str");
  platformMapping.setConverter(new Converter(){
    protected DatabaseMapping mapping;
    private Map platformList;
    private String oldPrefix="String_Node_Str";
    private String newPrefix="String_Node_Str";
    private String oldOxmPrefix=oldPrefix + "String_Node_Str";
    private String newOxmPrefix=newPrefix + "String_Node_Str";
    public Object convertObjectValueToDataValue(    Object objectValue,    Session session){
      if (objectValue == null) {
        return null;
      }
      return objectValue.getClass().getName();
    }
    public Object convertDataValueToObjectValue(    Object fieldValue,    Session session){
      if (fieldValue == null) {
        return null;
      }
      if (((String)fieldValue).startsWith(oldPrefix)) {
        if (((String)fieldValue).startsWith(oldOxmPrefix)) {
          fieldValue=((String)fieldValue).replaceFirst(oldOxmPrefix,newOxmPrefix);
        }
 else {
          fieldValue=((String)fieldValue).replaceFirst(oldPrefix,newPrefix);
        }
      }
      Object result=platformList.get(fieldValue);
      if (result != null) {
        fieldValue=result;
      }
      Object attributeValue;
      Class attributeClass=(Class)((AbstractSession)session).getDatasourcePlatform().convertObject(fieldValue,ClassConstants.CLASS);
      try {
        if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
          try {
            attributeValue=AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeClass));
          }
 catch (          PrivilegedActionException exception) {
            throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception.getException());
          }
        }
 else {
          attributeValue=PrivilegedAccessHelper.newInstanceFromClass(attributeClass);
        }
      }
 catch (      Exception exception) {
        throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception);
      }
      return attributeValue;
    }
    public boolean isMutable(){
      return false;
    }
    public void initialize(    DatabaseMapping mapping,    Session session){
      this.platformList=new HashMap();
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.platformList.put("String_Node_Str","String_Node_Str");
      this.mapping=mapping;
      if (this.mapping.isDirectToFieldMapping()) {
        AbstractDirectMapping directMapping=(AbstractDirectMapping)this.mapping;
        if (directMapping.getFieldClassification() == null) {
          directMapping.setFieldClassification(ClassConstants.STRING);
        }
      }
    }
  }
);
  platformMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(platformMapping);
  XMLDirectMapping userNameMapping=new XMLDirectMapping();
  userNameMapping.setAttributeName("String_Node_Str");
  userNameMapping.setGetMethodName("String_Node_Str");
  userNameMapping.setSetMethodName("String_Node_Str");
  userNameMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(userNameMapping);
  XMLDirectMapping passwordMapping=new XMLDirectMapping();
  passwordMapping.setAttributeName("String_Node_Str");
  passwordMapping.setGetMethodName("String_Node_Str");
  passwordMapping.setSetMethodName("String_Node_Str");
  passwordMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(passwordMapping);
  XMLDirectMapping usesExternalConnectionPoolingMapping=new XMLDirectMapping();
  usesExternalConnectionPoolingMapping.setAttributeName("String_Node_Str");
  usesExternalConnectionPoolingMapping.setGetMethodName("String_Node_Str");
  usesExternalConnectionPoolingMapping.setSetMethodName("String_Node_Str");
  usesExternalConnectionPoolingMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  usesExternalConnectionPoolingMapping.setNullValue(Boolean.FALSE);
  descriptor.addMapping(usesExternalConnectionPoolingMapping);
  XMLDirectMapping usesExternalTransactionControllerMapping=new XMLDirectMapping();
  usesExternalTransactionControllerMapping.setAttributeName("String_Node_Str");
  usesExternalTransactionControllerMapping.setGetMethodName("String_Node_Str");
  usesExternalTransactionControllerMapping.setSetMethodName("String_Node_Str");
  usesExternalTransactionControllerMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  usesExternalTransactionControllerMapping.setNullValue(Boolean.FALSE);
  descriptor.addMapping(usesExternalTransactionControllerMapping);
  XMLCompositeObjectMapping defaultSequenceMapping=new XMLCompositeObjectMapping();
  defaultSequenceMapping.setAttributeName("String_Node_Str");
  defaultSequenceMapping.setSetMethodName("String_Node_Str");
  defaultSequenceMapping.setGetMethodName("String_Node_Str");
  defaultSequenceMapping.setReferenceClass(Sequence.class);
  defaultSequenceMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str" + getPrimaryNamespaceXPath()+ "String_Node_Str");
  descriptor.addMapping(defaultSequenceMapping);
  XMLCompositeCollectionMapping sequencesMapping=new XMLCompositeCollectionMapping();
  MapContainerPolicy containerPolicy=new MapContainerPolicy(HashMap.class);
  containerPolicy.setKeyName("String_Node_Str",Sequence.class.getName());
  sequencesMapping.setContainerPolicy(containerPolicy);
  sequencesMapping.setAttributeName("String_Node_Str");
  sequencesMapping.setSetMethodName("String_Node_Str");
  sequencesMapping.setGetMethodName("String_Node_Str");
  sequencesMapping.setReferenceClass(Sequence.class);
  sequencesMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str" + getPrimaryNamespaceXPath()+ "String_Node_Str"+ getPrimaryNamespaceXPath()+ "String_Node_Str");
  descriptor.addMapping(sequencesMapping);
  return descriptor;
}