Program: 68535
Project: 68535
Buggy source:
public void initializeEmployeeDescriptor(){
  MWRootEisDescriptor employeeDescriptor=getEmployeeDescriptor();
  MWXmlSchema employeeSchema=(MWXmlSchema)getProject().getSchemaRepository().schemas().next();
  MWElementDeclaration employeeElement=employeeSchema.element("String_Node_Str");
  MWClass employeeClass=employeeDescriptor.getMWClass();
  employeeDescriptor.setSchemaContext(employeeElement);
  MWEisPrimaryKeyPolicy primaryKeyPolicy=((MWEisTransactionalPolicy)employeeDescriptor.getTransactionalPolicy()).getPrimaryKeyPolicy();
  primaryKeyPolicy.addPrimaryKey("String_Node_Str");
  MWEisQueryManager queryManager=(MWEisQueryManager)employeeDescriptor.getQueryManager();
  MWEisInteraction readObjectInteraction=queryManager.getReadObjectInteraction();
  readObjectInteraction.setFunctionName("String_Node_Str");
  readObjectInteraction.addInputArgument("String_Node_Str","String_Node_Str");
  MWEisInteraction insertInteraction=queryManager.getInsertInteraction();
  insertInteraction.setFunctionName("String_Node_Str");
  insertInteraction.addInputArgument("String_Node_Str","String_Node_Str");
  MWEisInteraction updateInteraction=queryManager.getUpdateInteraction();
  updateInteraction.setFunctionName("String_Node_Str");
  updateInteraction.addInputArgument("String_Node_Str","String_Node_Str");
  MWXmlDirectMapping idMapping=(MWXmlDirectMapping)employeeDescriptor.addDirectMapping(employeeClass.attributeNamed("String_Node_Str"));
  idMapping.getXmlField().setXpath("String_Node_Str");
  MWXmlDirectMapping firstNameMapping=(MWXmlDirectMapping)employeeDescriptor.addDirectMapping(employeeClass.attributeNamed("String_Node_Str"));
  firstNameMapping.getXmlField().setXpath("String_Node_Str");
  MWXmlDirectMapping lastNameMapping=(MWXmlDirectMapping)employeeDescriptor.addDirectMapping(employeeClass.attributeNamed("String_Node_Str"));
  lastNameMapping.getXmlField().setXpath("String_Node_Str");
  MWXmlDirectCollectionMapping responsibilitiesMapping=(MWXmlDirectCollectionMapping)employeeDescriptor.addDirectCollectionMapping(employeeClass.attributeNamed("String_Node_Str"));
  responsibilitiesMapping.getXmlField().setXpath("String_Node_Str");
  responsibilitiesMapping.getContainerPolicy().getDefaultingContainerClass().usesDefaultContainerClass();
  MWXmlTransformationMapping normalHoursMapping=(MWXmlTransformationMapping)employeeDescriptor.addTransformationMapping(employeeClass.attributeNamed("String_Node_Str"));
  normalHoursMapping.setAttributeTransformer(normalHoursMapping.typeFor(NormalHoursTransformer.class));
  normalHoursMapping.addFieldTransformerAssociation("String_Node_Str",normalHoursMapping.typeFor(NormalHoursTransformer.class));
  normalHoursMapping.addFieldTransformerAssociation("String_Node_Str",normalHoursMapping.typeFor(NormalHoursTransformer.class));
  employeeDescriptor.addReturningPolicy();
  MWEisReturningPolicy returningPolicy=(MWEisReturningPolicy)employeeDescriptor.getReturningPolicy();
  returningPolicy.addInsertFieldReadOnlyFlag("String_Node_Str").setReturnOnly(true);
  returningPolicy.addUpdateField("String_Node_Str");
}

Fixed version (ground truth):
public void initializeEmployeeDescriptor(){
  MWRootEisDescriptor employeeDescriptor=getEmployeeDescriptor();
  MWXmlSchema employeeSchema=(MWXmlSchema)getProject().getSchemaRepository().schemas().next();
  MWElementDeclaration employeeElement=employeeSchema.element("String_Node_Str");
  MWClass employeeClass=employeeDescriptor.getMWClass();
  employeeDescriptor.setSchemaContext(employeeElement);
  MWXmlPrimaryKeyPolicy primaryKeyPolicy=((MWEisTransactionalPolicy)employeeDescriptor.getTransactionalPolicy()).getPrimaryKeyPolicy();
  primaryKeyPolicy.addPrimaryKey("String_Node_Str");
  MWEisQueryManager queryManager=(MWEisQueryManager)employeeDescriptor.getQueryManager();
  MWEisInteraction readObjectInteraction=queryManager.getReadObjectInteraction();
  readObjectInteraction.setFunctionName("String_Node_Str");
  readObjectInteraction.addInputArgument("String_Node_Str","String_Node_Str");
  MWEisInteraction insertInteraction=queryManager.getInsertInteraction();
  insertInteraction.setFunctionName("String_Node_Str");
  insertInteraction.addInputArgument("String_Node_Str","String_Node_Str");
  MWEisInteraction updateInteraction=queryManager.getUpdateInteraction();
  updateInteraction.setFunctionName("String_Node_Str");
  updateInteraction.addInputArgument("String_Node_Str","String_Node_Str");
  MWXmlDirectMapping idMapping=(MWXmlDirectMapping)employeeDescriptor.addDirectMapping(employeeClass.attributeNamed("String_Node_Str"));
  idMapping.getXmlField().setXpath("String_Node_Str");
  MWXmlDirectMapping firstNameMapping=(MWXmlDirectMapping)employeeDescriptor.addDirectMapping(employeeClass.attributeNamed("String_Node_Str"));
  firstNameMapping.getXmlField().setXpath("String_Node_Str");
  MWXmlDirectMapping lastNameMapping=(MWXmlDirectMapping)employeeDescriptor.addDirectMapping(employeeClass.attributeNamed("String_Node_Str"));
  lastNameMapping.getXmlField().setXpath("String_Node_Str");
  MWXmlDirectCollectionMapping responsibilitiesMapping=(MWXmlDirectCollectionMapping)employeeDescriptor.addDirectCollectionMapping(employeeClass.attributeNamed("String_Node_Str"));
  responsibilitiesMapping.getXmlField().setXpath("String_Node_Str");
  responsibilitiesMapping.getContainerPolicy().getDefaultingContainerClass().usesDefaultContainerClass();
  MWXmlTransformationMapping normalHoursMapping=(MWXmlTransformationMapping)employeeDescriptor.addTransformationMapping(employeeClass.attributeNamed("String_Node_Str"));
  normalHoursMapping.setAttributeTransformer(normalHoursMapping.typeFor(NormalHoursTransformer.class));
  normalHoursMapping.addFieldTransformerAssociation("String_Node_Str",normalHoursMapping.typeFor(NormalHoursTransformer.class));
  normalHoursMapping.addFieldTransformerAssociation("String_Node_Str",normalHoursMapping.typeFor(NormalHoursTransformer.class));
  employeeDescriptor.addReturningPolicy();
  MWEisReturningPolicy returningPolicy=(MWEisReturningPolicy)employeeDescriptor.getReturningPolicy();
  returningPolicy.addInsertFieldReadOnlyFlag("String_Node_Str").setReturnOnly(true);
  returningPolicy.addUpdateField("String_Node_Str");
}