nus-yam/ex-repair huggingface dataset:
Program: 66521
Project: 66521
Buggy source:
/** 
 * INTERNAL: Values to be included in the locking mechanism are added to the translation row. For changed fields the normal build row is ok as only changed fields matter.
 */
public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) throws DatabaseException {
  Object object;
  verifyUsage(query.getSession());
  if (query.isDeleteObjectQuery()) {
    object=query.getObject();
  }
 else {
    object=query.getBackupClone();
  }
  for (Iterator vectors=getLockFieldsByTable().values().iterator(); vectors.hasNext(); ) {
    for (Enumeration fields=((Vector)vectors.next()).elements(); fields.hasMoreElements(); ) {
      DatabaseField field=(DatabaseField)fields.nextElement();
      DatabaseMapping mapping=descriptor.getObjectBuilder().getMappingForField(field);
      if (mapping == null) {
        throw DatabaseException.specifiedLockingFieldsNotFoundInDatabase(field.getQualifiedName());
      }
 else {
        mapping.writeFromObjectIntoRow(object,query.getTranslationRow(),query.getSession());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Values to be included in the locking mechanism are added to the translation row. For changed fields the normal build row is ok as only changed fields matter.
 */
public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) throws DatabaseException {
  Object object;
  verifyUsage(query.getSession());
  if (query.isDeleteObjectQuery()) {
    object=query.getObject();
  }
 else {
    object=query.getBackupClone();
  }
  for (Iterator vectors=getLockFieldsByTable().values().iterator(); vectors.hasNext(); ) {
    for (Enumeration fields=((Vector)vectors.next()).elements(); fields.hasMoreElements(); ) {
      DatabaseField field=(DatabaseField)fields.nextElement();
      DatabaseMapping mapping=descriptor.getObjectBuilder().getMappingForField(field);
      if (mapping == null) {
        throw DatabaseException.specifiedLockingFieldsNotFoundInDatabase(field.getQualifiedName());
      }
 else {
        mapping.writeFromObjectIntoRow(object,query.getTranslationRow(),query.getSession(),WriteType.UNDEFINED);
      }
    }
  }
}
Program: 66522
Project: 66522
Buggy source:
protected AbstractRecord buildCompositeRow(Object attributeValue,AbstractSession session,AbstractRecord parentRow){
  if (((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) {
    XMLObjectBuilder objectBuilder=(XMLObjectBuilder)getReferenceDescriptor(attributeValue,session).getObjectBuilder();
    return objectBuilder.buildRow(attributeValue,session,getField(),(XMLRecord)parentRow);
  }
 else {
    return this.getObjectBuilder(attributeValue,session).buildRow(attributeValue,session);
  }
}

Fixed version (ground truth):
@Override protected AbstractRecord buildCompositeRow(Object attributeValue,AbstractSession session,AbstractRecord parentRow,WriteType writeType){
  if (((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) {
    XMLObjectBuilder objectBuilder=(XMLObjectBuilder)getReferenceDescriptor(attributeValue,session).getObjectBuilder();
    return objectBuilder.buildRow(attributeValue,session,getField(),(XMLRecord)parentRow);
  }
 else {
    return this.getObjectBuilder(attributeValue,session).buildRow(attributeValue,session,writeType);
  }
}
Program: 66523
Project: 66523
Buggy source:
/** 
 * INTERNAL: Build the value for the database field and put it in the specified database row.
 */
public void writeFromObjectIntoRow(Object object,AbstractRecord record,AbstractSession session) throws DescriptorException {
  if (this.isReadOnly()) {
    return;
  }
  Object attributeValue=this.getAttributeValueFromObject(object);
  if ((((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) && ((XMLField)getField()).isSelfField()) {
    XMLObjectBuilder objectBuilder=(XMLObjectBuilder)getReferenceDescriptor(attributeValue,session).getObjectBuilder();
    objectBuilder.buildIntoNestedRow(record,attributeValue,session);
  }
 else {
    Object fieldValue=null;
    if (attributeValue != null) {
      fieldValue=buildCompositeRow(attributeValue,session,record);
    }
    record.put(this.getField(),fieldValue);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Build the value for the database field and put it in the specified database row.
 */
@Override public void writeFromObjectIntoRow(Object object,AbstractRecord record,AbstractSession session,WriteType writeType) throws DescriptorException {
  if (this.isReadOnly()) {
    return;
  }
  Object attributeValue=this.getAttributeValueFromObject(object);
  if ((((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) && ((XMLField)getField()).isSelfField()) {
    XMLObjectBuilder objectBuilder=(XMLObjectBuilder)getReferenceDescriptor(attributeValue,session).getObjectBuilder();
    objectBuilder.buildIntoNestedRow(record,attributeValue,session);
  }
 else {
    Object fieldValue=null;
    if (attributeValue != null) {
      fieldValue=buildCompositeRow(attributeValue,session,record,writeType);
    }
    record.put(this.getField(),fieldValue);
  }
}
Program: 66524
Project: 66524
Buggy source:
protected Object buildCompositeRow(Object attributeValue,AbstractSession session,AbstractRecord record){
  if (((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) {
    XMLObjectBuilder objectBuilder=(XMLObjectBuilder)getReferenceDescriptor(attributeValue,session).getObjectBuilder();
    return objectBuilder.buildRow(attributeValue,session,getField(),(XMLRecord)record);
  }
 else {
    AbstractRecord nestedRow=this.getObjectBuilder(attributeValue,session).buildRow(attributeValue,session);
    return this.getReferenceDescriptor(attributeValue,session).buildFieldValueFromNestedRow(nestedRow,session);
  }
}

Fixed version (ground truth):
@Override protected Object buildCompositeRow(Object attributeValue,AbstractSession session,AbstractRecord record,WriteType writeType){
  if (((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) {
    XMLObjectBuilder objectBuilder=(XMLObjectBuilder)getReferenceDescriptor(attributeValue,session).getObjectBuilder();
    return objectBuilder.buildRow(attributeValue,session,getField(),(XMLRecord)record);
  }
 else {
    AbstractRecord nestedRow=this.getObjectBuilder(attributeValue,session).buildRow(attributeValue,session,writeType);
    return this.getReferenceDescriptor(attributeValue,session).buildFieldValueFromNestedRow(nestedRow,session);
  }
}
Program: 66525
Project: 66525
Buggy source:
/** 
 * INTERNAL: We override this method in order to set the session on the record if the data format is XML. Get a value from the object and set that in the respective field of the row.
 */
public void writeFromObjectIntoRow(Object object,AbstractRecord row,AbstractSession session){
  if (((EISDescriptor)this.getDescriptor()).getDataFormat() == EISDescriptor.XML) {
    ((XMLRecord)row).setSession(session);
  }
  super.writeFromObjectIntoRow(object,row,session);
}

Fixed version (ground truth):
/** 
 * INTERNAL: We override this method in order to set the session on the record if the data format is XML. Get a value from the object and set that in the respective field of the row.
 */
@Override public void writeFromObjectIntoRow(Object object,AbstractRecord row,AbstractSession session,WriteType writeType){
  if (((EISDescriptor)this.getDescriptor()).getDataFormat() == EISDescriptor.XML) {
    ((XMLRecord)row).setSession(session);
  }
  super.writeFromObjectIntoRow(object,row,session,writeType);
}
Program: 66526
Project: 66526
Buggy source:
/** 
 * INTERNAL: Get a value from the object and set that in the respective field of the row.
 */
@Override public void writeFromObjectIntoRow(Object object,AbstractRecord Record,AbstractSession session){
  if (isReadOnly() || (!isForeignKeyRelationship())) {
    return;
  }
  AbstractRecord referenceRow=getIndirectionPolicy().extractReferenceRow(getAttributeValueFromObject(object));
  if (referenceRow == null) {
    Object referenceObject=getRealAttributeValueFromObject(object,session);
    for (int i=0; i < getForeignKeyFields().size(); i++) {
      DatabaseField sourceKey=getForeignKeyFields().get(i);
      DatabaseField targetKey=getSourceToTargetKeyFields().get(sourceKey);
      Object referenceValue=null;
      if (referenceObject != null) {
        referenceValue=getReferenceDescriptor().getObjectBuilder().extractValueFromObjectForField(referenceObject,targetKey,session);
      }
      Record.add(sourceKey,referenceValue);
    }
  }
 else {
    for (int i=0; i < getForeignKeyFields().size(); i++) {
      DatabaseField sourceKey=getForeignKeyFields().get(i);
      Record.add(sourceKey,referenceRow.get(sourceKey));
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get a value from the object and set that in the respective field of the row.
 */
@Override public void writeFromObjectIntoRow(Object object,AbstractRecord Record,AbstractSession session,WriteType writeType){
  if (isReadOnly() || (!isForeignKeyRelationship())) {
    return;
  }
  AbstractRecord referenceRow=getIndirectionPolicy().extractReferenceRow(getAttributeValueFromObject(object));
  if (referenceRow == null) {
    Object referenceObject=getRealAttributeValueFromObject(object,session);
    for (int i=0; i < getForeignKeyFields().size(); i++) {
      DatabaseField sourceKey=getForeignKeyFields().get(i);
      DatabaseField targetKey=getSourceToTargetKeyFields().get(sourceKey);
      Object referenceValue=null;
      if (referenceObject != null) {
        referenceValue=getReferenceDescriptor().getObjectBuilder().extractValueFromObjectForField(referenceObject,targetKey,session);
      }
      Record.add(sourceKey,referenceValue);
    }
  }
 else {
    for (int i=0; i < getForeignKeyFields().size(); i++) {
      DatabaseField sourceKey=getForeignKeyFields().get(i);
      Record.add(sourceKey,referenceRow.get(sourceKey));
    }
  }
}
Program: 66527
Project: 66527
Buggy source:
/** 
 * INTERNAL: Perform a logical insert into the historical schema, creating a new version of an object. <p>Called by postInsert() and also postUpdate() (which first does a logicalDelete of the previous version).
 */
public void logicalInsert(ObjectLevelModifyQuery writeQuery,boolean isUpdate){
  ClassDescriptor descriptor=getDescriptor();
  AbstractRecord modifyRow=null;
  AbstractRecord originalModifyRow=writeQuery.getModifyRow();
  Object currentTime=null;
  if (isUpdate) {
    modifyRow=descriptor.getObjectBuilder().buildRow(writeQuery.getObject(),writeQuery.getSession());
    modifyRow.putAll(originalModifyRow);
  }
 else {
    modifyRow=originalModifyRow;
    currentTime=getCurrentTime(writeQuery.getSession());
  }
  StatementQueryMechanism insertMechanism=new StatementQueryMechanism(writeQuery);
  for (int i=0; i < getHistoricalTables().size(); i++) {
    DatabaseTable table=(DatabaseTable)getHistoricalTables().elementAt(i);
    if (isUpdate && !checkWastedVersioning(originalModifyRow,table)) {
      continue;
    }
    if (!isUpdate) {
      modifyRow.add(getStart(i),currentTime);
    }
    SQLInsertStatement insertStatement=new SQLInsertStatement();
    insertStatement.setTable(table);
    insertMechanism.getSQLStatements().add(insertStatement);
  }
  if (insertMechanism.hasMultipleStatements()) {
    writeQuery.setTranslationRow(modifyRow);
    writeQuery.setModifyRow(modifyRow);
    insertMechanism.insertObject();
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Perform a logical insert into the historical schema, creating a new version of an object. <p>Called by postInsert() and also postUpdate() (which first does a logicalDelete of the previous version).
 */
public void logicalInsert(ObjectLevelModifyQuery writeQuery,boolean isUpdate){
  ClassDescriptor descriptor=getDescriptor();
  AbstractRecord modifyRow=null;
  AbstractRecord originalModifyRow=writeQuery.getModifyRow();
  Object currentTime=null;
  if (isUpdate) {
    modifyRow=descriptor.getObjectBuilder().buildRow(writeQuery.getObject(),writeQuery.getSession(),WriteType.INSERT);
    modifyRow.putAll(originalModifyRow);
  }
 else {
    modifyRow=originalModifyRow;
    currentTime=getCurrentTime(writeQuery.getSession());
  }
  StatementQueryMechanism insertMechanism=new StatementQueryMechanism(writeQuery);
  for (int i=0; i < getHistoricalTables().size(); i++) {
    DatabaseTable table=(DatabaseTable)getHistoricalTables().elementAt(i);
    if (isUpdate && !checkWastedVersioning(originalModifyRow,table)) {
      continue;
    }
    if (!isUpdate) {
      modifyRow.add(getStart(i),currentTime);
    }
    SQLInsertStatement insertStatement=new SQLInsertStatement();
    insertStatement.setTable(table);
    insertMechanism.getSQLStatements().add(insertStatement);
  }
  if (insertMechanism.hasMultipleStatements()) {
    writeQuery.setTranslationRow(modifyRow);
    writeQuery.setModifyRow(modifyRow);
    insertMechanism.insertObject();
  }
}
Program: 66529
Project: 66529
Buggy source:
/** 
 * Convenience method that returns an array of Classes based on a map given XmlBindings and an array of existing classes. The resulting array will not contain duplicate entries.
 * @param xmlBindingMap
 * @param classLoader
 * @param existingClasses
 * @return
 */
private static ArrayList<Class> getXmlBindingsClassesFromMap(Map<String,XmlBindings> xmlBindingMap,ClassLoader classLoader,ArrayList<Class> existingClasses){
  ArrayList<Class> additionalClasses=existingClasses;
  for (  String packageName : xmlBindingMap.keySet()) {
    additionalClasses=getXmlBindingsClasses(xmlBindingMap.get(packageName),classLoader,additionalClasses);
  }
  return additionalClasses;
}

Fixed version (ground truth):
/** 
 * Convenience method that returns an array of Classes based on a map given XmlBindings and an array of existing classes. The resulting array will not contain duplicate entries.
 */
private static ArrayList<Class> getXmlBindingsClassesFromMap(Map<String,XmlBindings> xmlBindingMap,ClassLoader classLoader,ArrayList<Class> existingClasses){
  ArrayList<Class> additionalClasses=existingClasses;
  for (  String packageName : xmlBindingMap.keySet()) {
    additionalClasses=getXmlBindingsClasses(xmlBindingMap.get(packageName),classLoader,additionalClasses);
  }
  return additionalClasses;
}
Program: 66531
Project: 66531
Buggy source:
/** 
 * Convenience method that returns a list of Classes based on a given XmlBindings and an array of existing classes. The resulting array will not contain duplicate entries.
 * @param xmlBindings
 * @param classLoader
 * @param existingClasses
 * @return
 */
private static ArrayList<Class> getXmlBindingsClasses(XmlBindings xmlBindings,ClassLoader classLoader,ArrayList<Class> existingClasses){
  ArrayList<Class> additionalClasses=existingClasses;
  JavaTypes jTypes=xmlBindings.getJavaTypes();
  if (jTypes != null) {
    for (    JavaType javaType : jTypes.getJavaType()) {
      try {
        Class jClass=classLoader.loadClass(javaType.getName());
        if (!additionalClasses.contains(jClass)) {
          additionalClasses.add(jClass);
        }
      }
 catch (      ClassNotFoundException e) {
        throw org.eclipse.persistence.exceptions.JAXBException.couldNotLoadClassFromMetadata(javaType.getName());
      }
    }
  }
  return additionalClasses;
}

Fixed version (ground truth):
/** 
 * Convenience method that returns a list of Classes based on a given XmlBindings and an array of existing classes. The resulting array will not contain duplicate entries.
 */
private static ArrayList<Class> getXmlBindingsClasses(XmlBindings xmlBindings,ClassLoader classLoader,ArrayList<Class> existingClasses){
  ArrayList<Class> additionalClasses=existingClasses;
  JavaTypes jTypes=xmlBindings.getJavaTypes();
  if (jTypes != null) {
    for (    JavaType javaType : jTypes.getJavaType()) {
      try {
        Class jClass=classLoader.loadClass(javaType.getName());
        if (!additionalClasses.contains(jClass)) {
          additionalClasses.add(jClass);
        }
      }
 catch (      ClassNotFoundException e) {
        throw org.eclipse.persistence.exceptions.JAXBException.couldNotLoadClassFromMetadata(javaType.getName());
      }
    }
  }
  return additionalClasses;
}
Program: 66532
Project: 66532
Buggy source:
private static javax.xml.bind.JAXBContext createContext(Generator generator,java.util.Map properties,ClassLoader classLoader,JaxbClassLoader loader,TypeMappingInfo[] typesToBeBound) throws Exception {
  javax.xml.bind.JAXBContext jaxbContext=null;
  XMLContext xmlContext=null;
  Project proj=generator.generateProject();
  ConversionManager conversionManager=null;
  if (classLoader != null) {
    conversionManager=new ConversionManager();
    conversionManager.setLoader(loader);
  }
 else {
    conversionManager=ConversionManager.getDefaultManager();
  }
  proj.convertClassNamesToClasses(conversionManager.getLoader());
  for (Iterator<ClassDescriptor> descriptorIt=proj.getOrderedDescriptors().iterator(); descriptorIt.hasNext(); ) {
    ClassDescriptor descriptor=descriptorIt.next();
    if (descriptor.getJavaClass() == null) {
      descriptor.setJavaClass(conversionManager.convertClassNameToClass(descriptor.getJavaClassName()));
    }
  }
  SessionEventListener eventListener=new SessionEventListener();
  eventListener.setShouldValidateInstantiationPolicy(false);
  XMLPlatform platform=new SAXPlatform();
  platform.getConversionManager().setLoader(loader);
  xmlContext=new XMLContext(proj,loader,eventListener);
  if (generator.getAnnotationsProcessor().getPackageToNamespaceMappings().size() > 1) {
    ((XMLLogin)xmlContext.getSession(0).getDatasourceLogin()).setEqualNamespaceResolvers(false);
  }
  jaxbContext=new org.eclipse.persistence.jaxb.JAXBContext(xmlContext,generator,typesToBeBound);
  return jaxbContext;
}

Fixed version (ground truth):
private static JAXBContext createContext(Generator generator,Map properties,ClassLoader classLoader,JaxbClassLoader loader,TypeMappingInfo[] typesToBeBound) throws Exception {
  Project proj=generator.generateProject();
  ConversionManager conversionManager=null;
  if (classLoader != null) {
    conversionManager=new ConversionManager();
    conversionManager.setLoader(loader);
  }
 else {
    conversionManager=ConversionManager.getDefaultManager();
  }
  proj.convertClassNamesToClasses(conversionManager.getLoader());
  for (Iterator<ClassDescriptor> descriptorIt=proj.getOrderedDescriptors().iterator(); descriptorIt.hasNext(); ) {
    ClassDescriptor descriptor=descriptorIt.next();
    if (descriptor.getJavaClass() == null) {
      descriptor.setJavaClass(conversionManager.convertClassNameToClass(descriptor.getJavaClassName()));
    }
  }
  SessionEventListener eventListener=new SessionEventListener();
  eventListener.setShouldValidateInstantiationPolicy(false);
  XMLPlatform platform=new SAXPlatform();
  platform.getConversionManager().setLoader(loader);
  XMLContext xmlContext=new XMLContext(proj,loader,eventListener);
  if (generator.getAnnotationsProcessor().getPackageToNamespaceMappings().size() > 1) {
    ((XMLLogin)xmlContext.getSession(0).getDatasourceLogin()).setEqualNamespaceResolvers(false);
  }
  return new JAXBContext(xmlContext,generator,typesToBeBound);
}
Program: 66533
Project: 66533
Buggy source:
/** 
 * Convenience method for creating an XmlBindings object based on a given Source. The method will load the eclipselink metadata model and unmarshal the Source. This assumes that the Source represents the eclipselink-oxm.xml metadata file to be unmarshalled.
 * @param metadataSource
 * @param classLoader
 * @return
 */
private static XmlBindings getXmlBindings(Source metadataSource,ClassLoader classLoader){
  XmlBindings xmlBindings=null;
  Unmarshaller unmarshaller;
  JAXBContext jaxbContext=CompilerHelper.getXmlBindingsModelContext();
  try {
    unmarshaller=jaxbContext.createUnmarshaller();
    xmlBindings=(XmlBindings)unmarshaller.unmarshal(metadataSource);
  }
 catch (  JAXBException jaxbEx) {
    throw org.eclipse.persistence.exceptions.JAXBException.couldNotUnmarshalMetadata(jaxbEx);
  }
  return xmlBindings;
}

Fixed version (ground truth):
/** 
 * Convenience method for creating an XmlBindings object based on a given Source. The method will load the eclipselink metadata model and unmarshal the Source. This assumes that the Source represents the eclipselink-oxm.xml metadata file to be unmarshalled.
 */
private static XmlBindings getXmlBindings(Source metadataSource,ClassLoader classLoader){
  XmlBindings xmlBindings=null;
  Unmarshaller unmarshaller;
  JAXBContext jaxbContext=CompilerHelper.getXmlBindingsModelContext();
  try {
    unmarshaller=jaxbContext.createUnmarshaller();
    xmlBindings=(XmlBindings)unmarshaller.unmarshal(metadataSource);
  }
 catch (  JAXBException jaxbEx) {
    throw org.eclipse.persistence.exceptions.JAXBException.couldNotUnmarshalMetadata(jaxbEx);
  }
  return xmlBindings;
}
Program: 66535
Project: 66535
Buggy source:
private Map<TypeMappingInfo,JAXBContext.RootLevelXmlAdapter> createAdaptersForAdapterClasses(Map<TypeMappingInfo,Class> typeMappingInfoToAdapterClasses){
  Map<TypeMappingInfo,JAXBContext.RootLevelXmlAdapter> typeMappingInfoToAdapters=new HashMap<TypeMappingInfo,JAXBContext.RootLevelXmlAdapter>();
  for (  TypeMappingInfo tmi : typeMappingInfoToAdapterClasses.keySet()) {
    Class adapterClass=typeMappingInfoToAdapterClasses.get(tmi);
    if (adapterClass != null) {
      try {
        XmlAdapter adapter=(XmlAdapter)adapterClass.newInstance();
        Class boundType=getBoundTypeForXmlAdapterClass(adapterClass);
        RootLevelXmlAdapter rootLevelXmlAdapter=new RootLevelXmlAdapter(adapter,boundType);
        typeMappingInfoToAdapters.put(tmi,rootLevelXmlAdapter);
      }
 catch (      Exception ex) {
      }
    }
  }
  return typeMappingInfoToAdapters;
}

Fixed version (ground truth):
private Map<TypeMappingInfo,JAXBContext.RootLevelXmlAdapter> createAdaptersForAdapterClasses(Map<TypeMappingInfo,Class> typeMappingInfoToAdapterClasses){
  Map<TypeMappingInfo,JAXBContext.RootLevelXmlAdapter> typeMappingInfoToAdapters=new HashMap<TypeMappingInfo,JAXBContext.RootLevelXmlAdapter>();
  for (  Entry<TypeMappingInfo,Class> entry : typeMappingInfoToAdapterClasses.entrySet()) {
    Class adapterClass=entry.getValue();
    if (adapterClass != null) {
      try {
        XmlAdapter adapter=(XmlAdapter)adapterClass.newInstance();
        Class boundType=getBoundTypeForXmlAdapterClass(adapterClass);
        RootLevelXmlAdapter rootLevelXmlAdapter=new RootLevelXmlAdapter(adapter,boundType);
        typeMappingInfoToAdapters.put(entry.getKey(),rootLevelXmlAdapter);
      }
 catch (      Exception ex) {
      }
    }
  }
  return typeMappingInfoToAdapters;
}
Program: 66536
Project: 66536
Buggy source:
/** 
 * Convenience method that processes a given map of QName-Type entries.  For each an ElementDeclaration is created and added to the given AnnotationsProcessor instance's map of global elements. It is assumed that the map of QName-Type entries contains Type instances that are either a Class or a ParameterizedType.
 * @param additionalGlobalElements
 * @param annotationsProcessor
 */
private void processAdditionalElements(Map<QName,Type> additionalGlobalElements,AnnotationsProcessor annotationsProcessor){
  if (additionalGlobalElements != null) {
    ElementDeclaration declaration;
    for (Iterator<QName> keyIt=additionalGlobalElements.keySet().iterator(); keyIt.hasNext(); ) {
      QName key=keyIt.next();
      Type type=additionalGlobalElements.get(key);
      TypeMappingInfo tmi=null;
      if (this.typeToTypeMappingInfo != null) {
        tmi=this.typeToTypeMappingInfo.get(type);
      }
      if (tmi != null) {
        if (annotationsProcessor.getTypeMappingInfoToGeneratedClasses().get(tmi) != null) {
          type=annotationsProcessor.getTypeMappingInfoToGeneratedClasses().get(tmi);
        }
      }
      JavaClass jClass=null;
      if (type instanceof Class) {
        Class tClass=(Class)type;
        jClass=helper.getJavaClass(tClass);
      }
      if (jClass != null) {
        declaration=new ElementDeclaration(key,jClass,jClass.getQualifiedName(),false);
        annotationsProcessor.getGlobalElements().put(key,declaration);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Convenience method that processes a given map of QName-Type entries.  For each an ElementDeclaration is created and added to the given AnnotationsProcessor instance's map of global elements. It is assumed that the map of QName-Type entries contains Type instances that are either a Class or a ParameterizedType.
 * @param additionalGlobalElements
 * @param annotationsProcessor
 */
private void processAdditionalElements(Map<QName,Type> additionalGlobalElements,AnnotationsProcessor annotationsProcessor){
  if (additionalGlobalElements != null) {
    ElementDeclaration declaration;
    for (    Entry<QName,Type> entry : additionalGlobalElements.entrySet()) {
      QName key=entry.getKey();
      Type type=entry.getValue();
      TypeMappingInfo tmi=null;
      if (this.typeToTypeMappingInfo != null) {
        tmi=this.typeToTypeMappingInfo.get(type);
      }
      if (tmi != null) {
        if (annotationsProcessor.getTypeMappingInfoToGeneratedClasses().get(tmi) != null) {
          type=annotationsProcessor.getTypeMappingInfoToGeneratedClasses().get(tmi);
        }
      }
      JavaClass jClass=null;
      if (type instanceof Class) {
        Class tClass=(Class)type;
        jClass=helper.getJavaClass(tClass);
      }
      if (jClass != null) {
        declaration=new ElementDeclaration(key,jClass,jClass.getQualifiedName(),false);
        annotationsProcessor.getGlobalElements().put(key,declaration);
      }
    }
  }
}
Program: 66539
Project: 66539
Buggy source:
public Schema getSchema(){
  return saxParserFactory.getSchema();
}

Fixed version (ground truth):
public Schema getSchema(){
  Schema schema=null;
  try {
    schema=saxParserFactory.getSchema();
  }
 catch (  UnsupportedOperationException ex) {
  }
  return schema;
}
Program: 66544
Project: 66544
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(SingleAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyWithGroupingTestCases.class);
  suite.addTestSuite(SingleElementKeyUsingMapTestCases.class);
  suite.addTestSuite(NonStringKeyTypeTestCases.class);
  suite.addTestSuite(NestedAttributeKeyTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(SingleAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyWithGroupingTestCases.class);
  suite.addTestSuite(SingleElementKeyUsingMapTestCases.class);
  suite.addTestSuite(NonStringKeyTypeTestCases.class);
  suite.addTestSuite(NestedAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementNullReferenceClassTestCases.class);
  return suite;
}
Program: 66545
Project: 66545
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(SingleAttributeEmptyKeyTestCases.class);
  suite.addTestSuite(SingleAttributeInvalidKeyTestCases.class);
  suite.addTestSuite(SingleAttributeNullKeyTestCases.class);
  suite.addTestSuite(SingleAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementEmptyKeyTestCases.class);
  suite.addTestSuite(SingleElementInvalidKeyTestCases.class);
  suite.addTestSuite(SingleElementNullKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyTestCases.class);
  suite.addTestSuite(NonStringKeyTypeTestCases.class);
  suite.addTestSuite(MultipleSourceTestCases.class);
  suite.addTestSuite(NestedAttributeKeyTestCases.class);
  suite.addTestSuite(MultithreadedTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(SingleAttributeEmptyKeyTestCases.class);
  suite.addTestSuite(SingleAttributeInvalidKeyTestCases.class);
  suite.addTestSuite(SingleAttributeNullKeyTestCases.class);
  suite.addTestSuite(SingleAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementEmptyKeyTestCases.class);
  suite.addTestSuite(SingleElementInvalidKeyTestCases.class);
  suite.addTestSuite(SingleElementNullKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyTestCases.class);
  suite.addTestSuite(NonStringKeyTypeTestCases.class);
  suite.addTestSuite(MultipleSourceTestCases.class);
  suite.addTestSuite(NestedAttributeKeyTestCases.class);
  suite.addTestSuite(MultithreadedTestCases.class);
  suite.addTestSuite(SingleElementNullReferenceClassTestCases.class);
  return suite;
}
Program: 66546
Project: 66546
Buggy source:
public XMLContext getXMLContext(){
  return this.xmlContext;
}

Fixed version (ground truth):
/** 
 * Return the XMLContext associated with this JAXBContext. 
 */
public XMLContext getXMLContext(){
  return this.xmlContext;
}
Program: 66547
Project: 66547
Buggy source:
public void setQNamesToDeclaredClasses(HashMap<QName,Class> nameToDeclaredClasses){
  qNamesToDeclaredClasses=nameToDeclaredClasses;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set the map of which QName corresponds to which declared class.
 */
public void setQNamesToDeclaredClasses(HashMap<QName,Class> nameToDeclaredClasses){
  qNamesToDeclaredClasses=nameToDeclaredClasses;
}
Program: 66548
Project: 66548
Buggy source:
public JAXBContext(XMLContext context,Generator generator,TypeMappingInfo[] boundTypes){
  this(context);
  this.generator=generator;
  this.qNameToGeneratedClasses=generator.getMappingsGenerator().getQNamesToGeneratedClasses();
  this.classToGeneratedClasses=generator.getMappingsGenerator().getClassToGeneratedClasses();
  this.qNamesToDeclaredClasses=generator.getMappingsGenerator().getQNamesToDeclaredClasses();
  this.typeMappingInfoToGeneratedType=generator.getAnnotationsProcessor().getTypeMappingInfoToGeneratedClasses();
  this.setTypeMappingInfoToJavaTypeAdapaters(createAdaptersForAdapterClasses(generator.getAnnotationsProcessor().getTypeMappingInfoToAdapterClasses()));
  this.boundTypes=boundTypes;
}

Fixed version (ground truth):
/** 
 * Create a JAXBContext.  The XMLContext contains the metadata about the  Object to XML mappings.
 */
public JAXBContext(XMLContext context,Generator generator,TypeMappingInfo[] boundTypes){
  this(context);
  this.generator=generator;
  this.qNameToGeneratedClasses=generator.getMappingsGenerator().getQNamesToGeneratedClasses();
  this.classToGeneratedClasses=generator.getMappingsGenerator().getClassToGeneratedClasses();
  this.qNamesToDeclaredClasses=generator.getMappingsGenerator().getQNamesToDeclaredClasses();
  this.typeMappingInfoToGeneratedType=generator.getAnnotationsProcessor().getTypeMappingInfoToGeneratedClasses();
  this.setTypeMappingInfoToJavaTypeAdapaters(createAdaptersForAdapterClasses(generator.getAnnotationsProcessor().getTypeMappingInfoToAdapterClasses()));
  this.boundTypes=boundTypes;
}
Program: 66549
Project: 66549
Buggy source:
public HashMap<QName,Class> getQNamesToDeclaredClasses(){
  return qNamesToDeclaredClasses;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the map of which QName corresponds to which declared class.
 */
public HashMap<QName,Class> getQNamesToDeclaredClasses(){
  return qNamesToDeclaredClasses;
}
Program: 66550
Project: 66550
Buggy source:
public HashMap<java.lang.reflect.Type,QName> getTypeToSchemaType(){
  if (typeToSchemaType == null) {
    initTypeToSchemaType();
  }
  return typeToSchemaType;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the map of which Type corresponds to which QName. The keys should be all the boundTypes used to create the JAXBContext. If the JAXBContext was not created with the constructor that takes a Type[] then  this Map will be empty.
 */
public HashMap<java.lang.reflect.Type,QName> getTypeToSchemaType(){
  if (typeToSchemaType == null) {
    initTypeToSchemaType();
  }
  return typeToSchemaType;
}
Program: 66551
Project: 66551
Buggy source:
private QName getSchemaTypeForTypeMappingInfo(Type type){
  QName name=null;
  if (type instanceof Class) {
    name=this.generator.getAnnotationsProcessor().getUserDefinedSchemaTypes().get(((Class)type).getName());
    if (name == null) {
      Class theClass=(Class)type;
      if (type == ClassConstants.ABYTE || type == ClassConstants.APBYTE || type == Image.class || type == Source.class || theClass.getCanonicalName().equals("String_Node_Str")) {
        name=XMLConstants.BASE_64_BINARY_QNAME;
      }
 else       if (type == ClassConstants.OBJECT) {
        name=XMLConstants.ANY_TYPE_QNAME;
      }
 else {
        name=(QName)XMLConversionManager.getDefaultJavaTypes().get(type);
      }
    }
  }
  return name;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the QName which the given Type corresponds to. Valid types should be all the boundTypes used to create the JAXBContext. If the JAXBContext was not created with the construction that takes a Type[] then  this will be return null.
 */
private QName getSchemaTypeForTypeMappingInfo(Type type){
  QName name=null;
  if (type instanceof Class) {
    name=this.generator.getAnnotationsProcessor().getUserDefinedSchemaTypes().get(((Class)type).getName());
    if (name == null) {
      Class theClass=(Class)type;
      if (type == ClassConstants.ABYTE || type == ClassConstants.APBYTE || type == Image.class || type == Source.class || theClass.getCanonicalName().equals("String_Node_Str")) {
        name=XMLConstants.BASE_64_BINARY_QNAME;
      }
 else       if (type == ClassConstants.OBJECT) {
        name=XMLConstants.ANY_TYPE_QNAME;
      }
 else {
        name=(QName)XMLConversionManager.getDefaultJavaTypes().get(type);
      }
    }
  }
  return name;
}
Program: 66552
Project: 66552
Buggy source:
public Map<TypeMappingInfo,QName> getTypeMappingInfoToSchemaType(){
  if (typeToTypeMappingInfo != null && typeToTypeMappingInfo.size() > 0) {
    return new HashMap<TypeMappingInfo,QName>();
  }
  return generator.getAnnotationsProcessor().getTypeMappingInfoToSchemaType();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the map of which TypeMappingInfo corresponds to which QName. The keys should be all the boundTypes used to create the JAXBContext. If the JAXBContext was not created with the constructor that takes a TypeMappingInfo[]   this Map will be empty.
 */
public Map<TypeMappingInfo,QName> getTypeMappingInfoToSchemaType(){
  if (typeToTypeMappingInfo != null && typeToTypeMappingInfo.size() > 0) {
    return new HashMap<TypeMappingInfo,QName>();
  }
  return generator.getAnnotationsProcessor().getTypeMappingInfoToSchemaType();
}
Program: 66553
Project: 66553
Buggy source:
public void setClassToGeneratedClasses(HashMap<String,Class> classToClass){
  this.classToGeneratedClasses=classToClass;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set the map containing which Class (by name) corresponds to which generated class.
 */
public void setClassToGeneratedClasses(HashMap<String,Class> classToClass){
  this.classToGeneratedClasses=classToClass;
}
Program: 66554
Project: 66554
Buggy source:
public JAXBIntrospector createJAXBIntrospector(){
  return new JAXBIntrospector(xmlContext);
}

Fixed version (ground truth):
/** 
 * Creates a JAXBIntrospector object.  The JAXBIntrospector allows the user to  access certain pieces of metadata about an instance of a JAXB bound class.
 */
public JAXBIntrospector createJAXBIntrospector(){
  return new JAXBIntrospector(xmlContext);
}
Program: 66556
Project: 66556
Buggy source:
public void setQNameToGeneratedClasses(HashMap<QName,Class> qNameToClass){
  this.qNameToGeneratedClasses=qNameToClass;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set the map containing which QName corresponds to which generated class.
 */
public void setQNameToGeneratedClasses(HashMap<QName,Class> qNameToClass){
  this.qNameToGeneratedClasses=qNameToClass;
}
Program: 66557
Project: 66557
Buggy source:
public JAXBMarshaller createMarshaller(){
  JAXBMarshaller marshaller=new JAXBMarshaller(xmlContext.createMarshaller(),new JAXBIntrospector(xmlContext));
  if (generator != null && generator.hasMarshalCallbacks()) {
    for (Iterator callIt=generator.getMarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      MarshalCallback cb=(MarshalCallback)generator.getMarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    marshaller.setMarshalCallbacks(generator.getMarshalCallbacks());
  }
  marshaller.setQNameToGeneratedClasses(this.qNameToGeneratedClasses);
  marshaller.setJaxbContext(this);
  return marshaller;
}

Fixed version (ground truth):
/** 
 * Create a JAXBMarshaller.  The JAXBMarshaller is used to convert Java objects to XML.
 */
public JAXBMarshaller createMarshaller(){
  JAXBMarshaller marshaller=new JAXBMarshaller(xmlContext.createMarshaller(),new JAXBIntrospector(xmlContext));
  if (generator != null && generator.hasMarshalCallbacks()) {
    for (Iterator callIt=generator.getMarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      MarshalCallback cb=(MarshalCallback)generator.getMarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    marshaller.setMarshalCallbacks(generator.getMarshalCallbacks());
  }
  marshaller.setQNameToGeneratedClasses(this.qNameToGeneratedClasses);
  marshaller.setJaxbContext(this);
  return marshaller;
}
Program: 66558
Project: 66558
Buggy source:
public JAXBUnmarshaller createUnmarshaller(){
  JAXBUnmarshaller unmarshaller=new JAXBUnmarshaller(xmlContext.createUnmarshaller(PARSER_FEATURES));
  if (generator != null && generator.hasUnmarshalCallbacks()) {
    for (Iterator callIt=generator.getUnmarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      UnmarshalCallback cb=(UnmarshalCallback)generator.getUnmarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    unmarshaller.setUnmarshalCallbacks(generator.getUnmarshalCallbacks());
  }
  unmarshaller.setJaxbContext(this);
  return unmarshaller;
}

Fixed version (ground truth):
/** 
 * Create a JAXBUnmarshaller.  The JAXBUnmarshaller is used to convert XML into Java objects.    
 */
public JAXBUnmarshaller createUnmarshaller(){
  JAXBUnmarshaller unmarshaller=new JAXBUnmarshaller(xmlContext.createUnmarshaller(PARSER_FEATURES));
  if (generator != null && generator.hasUnmarshalCallbacks()) {
    for (Iterator callIt=generator.getUnmarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      UnmarshalCallback cb=(UnmarshalCallback)generator.getUnmarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    unmarshaller.setUnmarshalCallbacks(generator.getUnmarshalCallbacks());
  }
  unmarshaller.setJaxbContext(this);
  return unmarshaller;
}
Program: 66559
Project: 66559
Buggy source:
/** 
 * ADVANCED: Adjust the OXM metadata to take into accound ORM mapping metadata,
 */
public void applyORMMetadata(AbstractSession ormSession){
  this.xmlContext.applyORMMetadata(ormSession);
}

Fixed version (ground truth):
/** 
 * ADVANCED: Adjust the OXM metadata to take into accound ORM mapping metadata
 */
public void applyORMMetadata(AbstractSession ormSession){
  this.xmlContext.applyORMMetadata(ormSession);
}
Program: 66560
Project: 66560
Buggy source:
public <T>JAXBBinder createBinder(Class<T> nodeClass){
  if (nodeClass.getName().equals("String_Node_Str")) {
    return new JAXBBinder(this.xmlContext);
  }
 else {
    throw new UnsupportedOperationException(JAXBException.unsupportedNodeClass(nodeClass.getName()));
  }
}

Fixed version (ground truth):
/** 
 * Create a JAXBBinder.  The JAXBBinder is used to preserve unmapped XML Data.
 * @param nodeClass The DOM Node class to use     
 */
public <T>JAXBBinder createBinder(Class<T> nodeClass){
  if (nodeClass.getName().equals("String_Node_Str")) {
    return new JAXBBinder(this.xmlContext);
  }
 else {
    throw new UnsupportedOperationException(JAXBException.unsupportedNodeClass(nodeClass.getName()));
  }
}
Program: 66561
Project: 66561
Buggy source:
public Map<String,Class> getArrayClassesToGeneratedClasses(){
  return generator.getAnnotationsProcessor().getArrayClassesToGeneratedClasses();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the map for which array class (by name) corresponds to which generated class
 */
public Map<String,Class> getArrayClassesToGeneratedClasses(){
  return generator.getAnnotationsProcessor().getArrayClassesToGeneratedClasses();
}
Program: 66562
Project: 66562
Buggy source:
public JAXBValidator createValidator(){
  return new JAXBValidator(xmlContext.createValidator());
}

Fixed version (ground truth):
/** 
 * Create a JAXBValidator.  The JAXBValidator is used to validate Java objects against an XSD.   
 */
public JAXBValidator createValidator(){
  return new JAXBValidator(xmlContext.createValidator());
}
Program: 66563
Project: 66563
Buggy source:
public Map<Type,Class> getCollectionClassesToGeneratedClasses(){
  return generator.getAnnotationsProcessor().getCollectionClassesToGeneratedClasses();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the map for which collection class (by Type) corresponds to which generated class
 */
public Map<Type,Class> getCollectionClassesToGeneratedClasses(){
  return generator.getAnnotationsProcessor().getCollectionClassesToGeneratedClasses();
}
Program: 66564
Project: 66564
Buggy source:
public HashMap<String,Class> getClassToGeneratedClasses(){
  return classToGeneratedClasses;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Get the map containing which Class (by name) corresponds to which generated class.
 */
public HashMap<String,Class> getClassToGeneratedClasses(){
  return classToGeneratedClasses;
}
Program: 66565
Project: 66565
Buggy source:
public void testCreateEntityManagerFactory2(){
  EntityManagerFactory emf=null;
  PersistenceProvider provider=new PersistenceProvider();
  try {
    try {
      emf=provider.createEntityManagerFactory("String_Node_Str",null);
    }
 catch (    Exception e) {
      fail("String_Node_Str" + e);
    }
    assertNull(emf);
    try {
      emf=Persistence.createEntityManagerFactory("String_Node_Str");
      fail("String_Node_Str");
    }
 catch (    Exception e) {
      assertTrue("String_Node_Str",e instanceof PersistenceException);
    }
  }
  finally {
    if (emf != null) {
      emf.close();
    }
  }
}

Fixed version (ground truth):
public void testCreateEntityManagerFactory2(){
  if (getServerSession().getServerPlatform() != null && getServerSession().getServerPlatform() instanceof WebSphere_7_Platform) {
    warning("String_Node_Str");
    return;
  }
  EntityManagerFactory emf=null;
  PersistenceProvider provider=new PersistenceProvider();
  try {
    try {
      emf=provider.createEntityManagerFactory("String_Node_Str",null);
    }
 catch (    Exception e) {
      fail("String_Node_Str" + e);
    }
    assertNull(emf);
    try {
      emf=Persistence.createEntityManagerFactory("String_Node_Str");
      fail("String_Node_Str");
    }
 catch (    Exception e) {
      assertTrue("String_Node_Str",e instanceof PersistenceException);
    }
  }
  finally {
    if (emf != null) {
      emf.close();
    }
  }
}
Program: 66566
Project: 66566
Buggy source:
/** 
 * This exception should be used when XmlElements and XmlIDREF are set on a property,  but one or more of the XmlElement entries in the list has a type that does not  have an XmlID property.
 * @param propertyName
 * @param typeName
 * @param elementName
 * @return
 */
public static JAXBException invalidXmlElementInXmlElementsList(String propertyName,String elementName){
  Object[] args={propertyName,elementName};
  JAXBException exception=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,INVALID_XMLELEMENT_IN_XMLELEMENTS,args));
  exception.setErrorCode(INVALID_XMLELEMENT_IN_XMLELEMENTS);
  return exception;
}

Fixed version (ground truth):
/** 
 * This exception should be used when XmlElements and XmlIDREF are set on a property,  but one or more of the XmlElement entries in the list has a type that does not  have an XmlID property.
 * @param propertyName 
 * @param elementName
 * @return
 */
public static JAXBException invalidXmlElementInXmlElementsList(String propertyName,String elementName){
  Object[] args={propertyName,elementName};
  JAXBException exception=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,INVALID_XMLELEMENT_IN_XMLELEMENTS,args));
  exception.setErrorCode(INVALID_XMLELEMENT_IN_XMLELEMENTS);
  return exception;
}
Program: 66568
Project: 66568
Buggy source:
public JaxbClassLoader(ClassLoader nestedClassLoader,TypeMappingInfo[] types){
  this.nestedClassLoader=nestedClassLoader;
  this.generatedClasses=new HashMap();
  if (types != null) {
    for (int i=0; i < types.length; i++) {
      Type nextType=types[i].getType();
      if (nextType instanceof Class) {
        generatedClasses.put(((Class)nextType).getName(),nextType);
      }
    }
  }
}

Fixed version (ground truth):
public JaxbClassLoader(ClassLoader nestedClassLoader,TypeMappingInfo[] types){
  this.nestedClassLoader=nestedClassLoader;
  this.generatedClasses=new HashMap();
  if (types != null) {
    for (int i=0; i < types.length; i++) {
      TypeMappingInfo tmi=types[i];
      Type nextType=tmi.getType();
      if (nextType == null) {
        throw org.eclipse.persistence.exceptions.JAXBException.nullTypeOnTypeMappingInfo(tmi.getXmlTagName());
      }
      if (nextType instanceof Class) {
        generatedClasses.put(((Class)nextType).getName(),nextType);
      }
    }
  }
}
Program: 66571
Project: 66571
Buggy source:
public SkipBugzillaTestRunner(Class<?> klass) throws Throwable {
  super(klass);
  Properties properties=loadProperties();
  String databasePlatformClassName=properties.getProperty(JUnitTestCaseHelper.DB_PLATFORM_KEY);
  databasePlatformClass=(Class<? extends DatabasePlatform>)Class.forName(databasePlatformClassName);
  String testBugzillaRun=(String)properties.get("String_Node_Str");
  if ("String_Node_Str".equals(testBugzillaRun)) {
    runAllBugzilla=true;
    bugid=-1;
  }
 else {
    runAllBugzilla=false;
    if (testBugzillaRun != null) {
      bugid=Long.parseLong(testBugzillaRun);
    }
 else {
      bugid=-1;
    }
  }
  String testIssueRun=(String)properties.get("String_Node_Str");
  if ("String_Node_Str".equals(testIssueRun)) {
    runAllIssues=true;
    issueid=-1;
  }
 else {
    runAllIssues=false;
    if (testIssueRun != null) {
      issueid=Long.parseLong(testIssueRun);
    }
 else {
      issueid=-1;
    }
  }
  String testToBeInvestigatedRun=(String)properties.get("String_Node_Str");
  if ("String_Node_Str".equals(testToBeInvestigatedRun)) {
    runAllUnknown=true;
  }
 else {
    runAllUnknown=false;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public SkipBugzillaTestRunner(Class<?> klass) throws Throwable {
  super(klass);
  Map<String,String> properties=JUnitTestCaseHelper.getDatabaseProperties();
  String databasePlatformClassName=properties.get(PersistenceUnitProperties.TARGET_DATABASE);
  databasePlatformClass=(Class<? extends DatabasePlatform>)Class.forName(databasePlatformClassName);
  String testBugzillaRun=(String)properties.get("String_Node_Str");
  if ("String_Node_Str".equals(testBugzillaRun)) {
    runAllBugzilla=true;
    bugid=-1;
  }
 else {
    runAllBugzilla=false;
    if (testBugzillaRun != null) {
      bugid=Long.parseLong(testBugzillaRun);
    }
 else {
      bugid=-1;
    }
  }
  String testIssueRun=(String)properties.get("String_Node_Str");
  if ("String_Node_Str".equals(testIssueRun)) {
    runAllIssues=true;
    issueid=-1;
  }
 else {
    runAllIssues=false;
    if (testIssueRun != null) {
      issueid=Long.parseLong(testIssueRun);
    }
 else {
      issueid=-1;
    }
  }
  String testToBeInvestigatedRun=(String)properties.get("String_Node_Str");
  if ("String_Node_Str".equals(testToBeInvestigatedRun)) {
    runAllUnknown=true;
  }
 else {
    runAllUnknown=false;
  }
}