nus-yam/ex-repair huggingface dataset:
Program: 64186
Project: 64186
Buggy source:
protected Response getContexts(String version,HttpHeaders hh,URI baseURI) throws JAXBException {
  if (!isValidVersion(version)) {
    JPARSLogger.fine("String_Node_Str",new Object[]{version});
    return Response.status(Status.BAD_REQUEST).build();
  }
  Set<String> contexts=getPersistenceFactory().getPersistenceContextNames();
  Iterator<String> contextIterator=contexts.iterator();
  List<Link> links=new ArrayList<Link>();
  String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
  while (contextIterator.hasNext()) {
    String context=contextIterator.next();
    if (version != null) {
      links.add(new Link(context,mediaType,baseURI + version + "String_Node_Str"+ context+ "String_Node_Str"));
    }
 else {
      links.add(new Link(context,mediaType,baseURI + context + "String_Node_Str"));
    }
  }
  String result=null;
  result=marshallMetadata(links,mediaType);
  return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
}

Fixed version (ground truth):
protected Response getContexts(String version,HttpHeaders hh,URI baseURI) throws JAXBException {
  if (!isValidVersion(version)) {
    JPARSLogger.fine("String_Node_Str",new Object[]{version});
    return Response.status(Status.BAD_REQUEST).build();
  }
  Set<String> contexts=getPersistenceFactory().getPersistenceContextNames();
  Iterator<String> contextIterator=contexts.iterator();
  List<Link> links=new ArrayList<Link>();
  String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
  while (contextIterator.hasNext()) {
    String context=contextIterator.next();
    if (version != null) {
      links.add(new Link(context,mediaType,baseURI + version + "String_Node_Str"+ context+ "String_Node_Str"));
    }
 else {
      links.add(new Link(context,mediaType,baseURI + context + "String_Node_Str"));
    }
  }
  LinkList linkList=new LinkList();
  linkList.setList(links);
  String result=null;
  if (mediaType.equals(MediaType.APPLICATION_JSON)) {
    result=marshallMetadata(linkList.getList(),mediaType);
  }
 else {
    result=marshallMetadata(linkList,mediaType);
  }
  return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
}
Program: 64187
Project: 64187
Buggy source:
protected Response getQueryMetadata(String version,String persistenceUnit,String queryName,HttpHeaders hh,URI baseURI){
  PersistenceContext app=getPersistenceContext(persistenceUnit,baseURI,version,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
 else {
    List<Query> returnQueries=new ArrayList<Query>();
    Map<String,List<DatabaseQuery>> queries=app.getJpaSession().getQueries();
    if (queries.get(queryName) != null) {
      for (      DatabaseQuery query : queries.get(queryName)) {
        returnQueries.add(getQuery(query,app));
      }
    }
    String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
    String result=null;
    try {
      result=marshallMetadata(returnQueries,mediaType);
    }
 catch (    JAXBException e) {
      JPARSLogger.fine("String_Node_Str",new Object[]{queryName,persistenceUnit,e.toString()});
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
    }
    return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
  }
}

Fixed version (ground truth):
protected Response getQueryMetadata(String version,String persistenceUnit,String queryName,HttpHeaders hh,URI baseURI){
  PersistenceContext app=getPersistenceContext(persistenceUnit,baseURI,version,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
 else {
    List<Query> returnQueries=new ArrayList<Query>();
    Map<String,List<DatabaseQuery>> queries=app.getJpaSession().getQueries();
    if (queries.get(queryName) != null) {
      for (      DatabaseQuery query : queries.get(queryName)) {
        returnQueries.add(getQuery(query,app));
      }
    }
    String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
    QueryList queryList=new QueryList();
    queryList.setList(returnQueries);
    String result=null;
    try {
      if (mediaType.equals(MediaType.APPLICATION_JSON)) {
        result=marshallMetadata(queryList.getList(),mediaType);
      }
 else {
        result=marshallMetadata(queryList,mediaType);
      }
    }
 catch (    JAXBException e) {
      JPARSLogger.fine("String_Node_Str",new Object[]{queryName,persistenceUnit,e.toString()});
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
    }
    return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
  }
}
Program: 64188
Project: 64188
Buggy source:
protected Response getQueriesMetadata(String version,String persistenceUnit,HttpHeaders hh,URI baseURI){
  PersistenceContext app=getPersistenceContext(persistenceUnit,baseURI,version,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
 else {
    List<Query> queries=new ArrayList<Query>();
    addQueries(queries,app,null);
    String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
    String result=null;
    try {
      result=marshallMetadata(queries,mediaType);
    }
 catch (    JAXBException e) {
      JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit,e.toString()});
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
    }
    return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
  }
}

Fixed version (ground truth):
protected Response getQueriesMetadata(String version,String persistenceUnit,HttpHeaders hh,URI baseURI){
  PersistenceContext app=getPersistenceContext(persistenceUnit,baseURI,version,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
 else {
    List<Query> queries=new ArrayList<Query>();
    addQueries(queries,app,null);
    String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
    QueryList queryList=new QueryList();
    queryList.setList(queries);
    String result=null;
    try {
      if (mediaType.equals(MediaType.APPLICATION_JSON)) {
        result=marshallMetadata(queryList.getList(),mediaType);
      }
 else {
        result=marshallMetadata(queryList,mediaType);
      }
    }
 catch (    JAXBException e) {
      JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit,e.toString()});
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
    }
    return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
  }
}
Program: 64192
Project: 64192
Buggy source:
/** 
 * Process an @XmlSeeAlso annotation. TypeInfo instances will be created for each class listed.
 * @param javaClass
 */
private void processXmlSeeAlso(JavaClass javaClass,TypeInfo info){
  Class xmlSeeAlsoClass=null;
  Method valueMethod=null;
  try {
    xmlSeeAlsoClass=PrivilegedAccessHelper.getClassForName("String_Node_Str",false,helper.getClassLoader());
    valueMethod=PrivilegedAccessHelper.getDeclaredMethod(xmlSeeAlsoClass,"String_Node_Str",new Class[]{});
  }
 catch (  ClassNotFoundException ex) {
  }
catch (  NoSuchMethodException ex) {
  }
  if (xmlSeeAlsoClass != null && helper.isAnnotationPresent(javaClass,xmlSeeAlsoClass)) {
    Object seeAlso=helper.getAnnotation(javaClass,xmlSeeAlsoClass);
    Class[] values=null;
    try {
      values=(Class[])PrivilegedAccessHelper.invokeMethod(valueMethod,seeAlso,new Object[]{});
    }
 catch (    Exception ex) {
    }
    List<String> seeAlsoClassNames=new ArrayList<String>();
    for (    Class next : values) {
      seeAlsoClassNames.add(next.getName());
    }
    info.setXmlSeeAlso(seeAlsoClassNames);
  }
}

Fixed version (ground truth):
/** 
 * Process an @XmlSeeAlso annotation. TypeInfo instances will be created for each class listed.
 * @param javaClass
 */
private void processXmlSeeAlso(JavaClass javaClass,TypeInfo info){
  Class xmlSeeAlsoClass=null;
  Method valueMethod=null;
  try {
    xmlSeeAlsoClass=PrivilegedAccessHelper.getClassForName("String_Node_Str",false,helper.getClassLoader());
    valueMethod=PrivilegedAccessHelper.getDeclaredMethod(xmlSeeAlsoClass,"String_Node_Str",new Class[]{});
  }
 catch (  ClassNotFoundException ex) {
  }
catch (  NoSuchMethodException ex) {
  }
  if (xmlSeeAlsoClass != null && helper.isAnnotationPresent(javaClass,xmlSeeAlsoClass)) {
    Object seeAlso=helper.getAnnotation(javaClass,xmlSeeAlsoClass);
    Class[] values=null;
    try {
      values=(Class[])PrivilegedAccessHelper.invokeMethod(valueMethod,seeAlso,new Object[]{});
    }
 catch (    Exception ex) {
    }
    if (values != null) {
      List<String> seeAlsoClassNames=new ArrayList<String>();
      for (      Class next : values) {
        seeAlsoClassNames.add(next.getName());
      }
      info.setXmlSeeAlso(seeAlsoClassNames);
    }
  }
}
Program: 64193
Project: 64193
Buggy source:
/** 
 * Wrap the type in a type wrapper to handle XML conversion.
 */
public static DatabaseTypeWrapper wrapType(DatabaseType databaseType){
  if (databaseType.isComplexDatabaseType()) {
    ComplexDatabaseType complexType=(ComplexDatabaseType)databaseType;
    if (complexType.isJDBCType()) {
      if (complexType.isCollection()) {
        return new OracleArrayTypeWrapper(databaseType);
      }
      return new OracleObjectTypeWrapper(databaseType);
    }
    if (complexType.isRecord()) {
      return new PLSQLRecordWrapper(databaseType);
    }
    if (complexType.isCollection()) {
      return new PLSQLCollectionWrapper(databaseType);
    }
    if (complexType.isCursor()) {
      return new PLSQLCursorWrapper(databaseType);
    }
  }
 else   if (databaseType.isJDBCType()) {
    return new JDBCTypeWrapper(databaseType);
  }
 else {
    return new SimplePLSQLTypeWrapper(databaseType);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Wrap the type in a type wrapper to handle XML conversion.
 */
public static DatabaseTypeWrapper wrapType(DatabaseType databaseType){
  if (databaseType.isComplexDatabaseType()) {
    ComplexDatabaseType complexType=(ComplexDatabaseType)databaseType;
    if (complexType.isArray()) {
      return new OracleArrayTypeWrapper(databaseType);
    }
    if (complexType.isStruct()) {
      return new OracleObjectTypeWrapper(databaseType);
    }
    if (complexType.isRecord()) {
      return new PLSQLRecordWrapper(databaseType);
    }
    if (complexType.isCollection()) {
      return new PLSQLCollectionWrapper(databaseType);
    }
    if (complexType.isCursor()) {
      return new PLSQLCursorWrapper(databaseType);
    }
  }
 else   if (databaseType.isJDBCType()) {
    return new JDBCTypeWrapper(databaseType);
  }
 else {
    return new SimplePLSQLTypeWrapper(databaseType);
  }
  return null;
}
Program: 64194
Project: 64194
Buggy source:
private void initializeNodeValue(){
  Mapping xmlMapping=this.nestedMapping;
  if (xmlMapping instanceof BinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof DirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof CompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((CollectionReferenceMapping)xmlMapping,xmlField);
    choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping)xmlMapping);
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  Mapping xmlMapping=this.nestedMapping;
  if (xmlMapping instanceof BinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof DirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof CompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((CollectionReferenceMapping)xmlMapping,xmlField);
    CollectionReferenceMapping refMapping=((CollectionReferenceMapping)xmlMapping);
    if (refMapping.usesSingleNode() || refMapping.getFields().size() == 1) {
      choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingNodeValue(refMapping,xmlField);
    }
 else {
      choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping)xmlMapping);
    }
  }
}
Program: 64195
Project: 64195
Buggy source:
/** 
 * Return all of the <code>Annotations</code> for this <code>JavaField</code>.
 * @return A <code>Collection</code> containing this <code>JavaField's</code> <code>JavaAnnotations</code>.
 */
@SuppressWarnings("String_Node_Str") public Collection<JavaAnnotation> getAnnotations(){
  ArrayList<JavaAnnotation> annotationsList=new ArrayList<JavaAnnotation>();
  Collection<JAnnotationUse> annotations=null;
  try {
    annotations=(Collection<JAnnotationUse>)PrivilegedAccessHelper.getValueFromField(JVAR_ANNOTATIONS,xjcField);
  }
 catch (  Exception e) {
  }
  for (  JAnnotationUse annotationUse : annotations) {
    XJCJavaAnnotationImpl xjcAnnotation=new XJCJavaAnnotationImpl(annotationUse,dynamicClassLoader);
    annotationsList.add(xjcAnnotation);
  }
  return annotationsList;
}

Fixed version (ground truth):
/** 
 * Return all of the <code>Annotations</code> for this <code>JavaField</code>.
 * @return A <code>Collection</code> containing this <code>JavaField's</code> <code>JavaAnnotations</code>.
 */
@SuppressWarnings("String_Node_Str") public Collection<JavaAnnotation> getAnnotations(){
  ArrayList<JavaAnnotation> annotationsList=new ArrayList<JavaAnnotation>();
  Collection<JAnnotationUse> annotations=null;
  try {
    annotations=(Collection<JAnnotationUse>)PrivilegedAccessHelper.getValueFromField(JVAR_ANNOTATIONS,xjcField);
  }
 catch (  Exception e) {
  }
  if (annotations != null) {
    for (    JAnnotationUse annotationUse : annotations) {
      XJCJavaAnnotationImpl xjcAnnotation=new XJCJavaAnnotationImpl(annotationUse,dynamicClassLoader);
      annotationsList.add(xjcAnnotation);
    }
  }
  return annotationsList;
}
Program: 64196
Project: 64196
Buggy source:
/** 
 * Return interface providing access to utility methods for the persistence unit.
 * @return PersistenceUnitUtil interface
 * @throws IllegalStateException if the entity manager factory has been closed.
 */
public PersistenceUnitUtil getPersistenceUnitUtil(){
  return this;
}

Fixed version (ground truth):
/** 
 * Return interface providing access to utility methods for the persistence unit.
 * @return PersistenceUnitUtil interface
 * @throws IllegalStateException if the entity manager factory has been closed.
 */
public PersistenceUnitUtil getPersistenceUnitUtil(){
  if (!isOpen()) {
    throw new IllegalStateException(ExceptionLocalization.buildMessage("String_Node_Str"));
  }
  return this;
}
Program: 64197
Project: 64197
Buggy source:
/** 
 * Return interface providing access to utility methods for the persistence unit.
 * @return PersistenceUnitUtil interface
 * @throws IllegalStateException if the entity manager factory has been closed.
 */
public PersistenceUnitUtil getPersistenceUnitUtil(){
  if (!delegate.isOpen()) {
    throw new IllegalStateException(ExceptionLocalization.buildMessage("String_Node_Str"));
  }
  return delegate;
}

Fixed version (ground truth):
/** 
 * Return interface providing access to utility methods for the persistence unit.
 * @return PersistenceUnitUtil interface
 * @throws IllegalStateException if the entity manager factory has been closed.
 */
public PersistenceUnitUtil getPersistenceUnitUtil(){
  return delegate.getPersistenceUnitUtil();
}
Program: 64200
Project: 64200
Buggy source:
/** 
 * Determines whether the given   {@link Expression} is part of a subquery.
 * @param expression The {@link Expression} to start scanning its location
 * @return <code>true</code> if the given {@link Expression} is part of a subquery; <code>false</code>if it's part of the top-level query
 * @since 2.4
 */
protected boolean isSubquery(Expression expression){
  OwningStatementVisitor visitor=getOwningStatementVisitor();
  try {
    expression.accept(visitor);
    return visitor.simpleSelectStatement != null;
  }
  finally {
    visitor.dispose();
  }
}

Fixed version (ground truth):
/** 
 * Determines whether the given   {@link Expression} is a subquery.
 * @param expression The {@link Expression} to check its type
 * @return <code>true</code> if the given {@link Expression} is a subquery; <code>false</code> otherwise
 * @since 2.5
 */
protected boolean isSubquery(Expression expression){
  SubqueryVisitor visitor=getSubqueryVisitor();
  try {
    expression.accept(visitor);
    return visitor.expression != null;
  }
  finally {
    visitor.expression=null;
  }
}
Program: 64201
Project: 64201
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void visit(UpdateStatement expression){
  updateStatement=expression;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void visit(SimpleSelectStatement expression){
  this.expression=expression;
}
Program: 64202
Project: 64202
Buggy source:
@DELETE @Path("String_Node_Str") public Response removeAttribute(@PathParam("String_Node_Str") String version,@PathParam("String_Node_Str") String persistenceUnit,@PathParam("String_Node_Str") String type,@PathParam("String_Node_Str") String key,@PathParam("String_Node_Str") String attribute,@Context HttpHeaders hh,@Context UriInfo ui){
  String partner=null;
  String listItemId=null;
  Map<String,String> matrixParams=getMatrixParameters(ui,attribute);
  if ((matrixParams != null) && (!matrixParams.isEmpty())) {
    partner=(String)matrixParams.get(MatrixParameters.JPARS_RELATIONSHIP_PARTNER);
  }
  Map<String,Object> queryParams=getQueryParameters(ui);
  if ((queryParams != null) && (!queryParams.isEmpty())) {
    listItemId=(String)queryParams.get(QueryParameters.JPARS_LIST_ITEM_ID);
  }
  return removeAttributeInternal(version,persistenceUnit,type,key,attribute,listItemId,partner,hh,ui);
}

Fixed version (ground truth):
@DELETE @Path("String_Node_Str") public Response removeAttribute(@PathParam("String_Node_Str") String version,@PathParam("String_Node_Str") String persistenceUnit,@PathParam("String_Node_Str") String type,@PathParam("String_Node_Str") String key,@PathParam("String_Node_Str") String attribute,@Context HttpHeaders hh,@Context UriInfo ui){
  return removeAttributeInternal(version,persistenceUnit,type,key,attribute,hh,ui);
}
Program: 64205
Project: 64205
Buggy source:
@DELETE @Path("String_Node_Str") public Response removeAttribute(@PathParam("String_Node_Str") String persistenceUnit,@PathParam("String_Node_Str") String type,@PathParam("String_Node_Str") String key,@PathParam("String_Node_Str") String attribute,@Context HttpHeaders hh,@Context UriInfo ui){
  String partner=null;
  String listItemId=null;
  Map<String,String> matrixParams=getMatrixParameters(ui,attribute);
  if ((matrixParams != null) && (!matrixParams.isEmpty())) {
    partner=(String)matrixParams.get(MatrixParameters.JPARS_RELATIONSHIP_PARTNER);
  }
  Map<String,Object> queryParams=getQueryParameters(ui);
  if ((queryParams != null) && (!queryParams.isEmpty())) {
    listItemId=(String)queryParams.get(QueryParameters.JPARS_LIST_ITEM_ID);
  }
  return removeAttributeInternal(null,persistenceUnit,type,key,attribute,listItemId,partner,hh,ui);
}

Fixed version (ground truth):
@DELETE @Path("String_Node_Str") public Response removeAttribute(@PathParam("String_Node_Str") String persistenceUnit,@PathParam("String_Node_Str") String type,@PathParam("String_Node_Str") String key,@PathParam("String_Node_Str") String attribute,@Context HttpHeaders hh,@Context UriInfo ui){
  return removeAttributeInternal(null,persistenceUnit,type,key,attribute,hh,ui);
}
Program: 64206
Project: 64206
Buggy source:
private static String restUpdateBidirectionalRelationship(String objectId,String type,String relationshipName,Object newValue,String persistenceUnit,MediaType inputMediaType,MediaType outputMediaType,String partner,boolean sendLinks) throws RestCallFailedException, JAXBException, URISyntaxException {
  String url=RestUtils.getServerURI() + persistenceUnit + "String_Node_Str"+ type+ "String_Node_Str"+ objectId+ "String_Node_Str"+ relationshipName;
  if (partner != null) {
    url+="String_Node_Str" + MatrixParameters.JPARS_RELATIONSHIP_PARTNER + "String_Node_Str"+ partner;
  }
  WebResource webResource=client.resource(url);
  ByteArrayOutputStream os=new ByteArrayOutputStream();
  context.marshallEntity(newValue,inputMediaType,os,sendLinks);
  ClientResponse response=webResource.type(inputMediaType).accept(outputMediaType).post(ClientResponse.class,os.toString());
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  return response.getEntity(String.class);
}

Fixed version (ground truth):
private static String restUpdateBidirectionalRelationship(String objectId,String type,String relationshipName,Object newValue,String persistenceUnit,MediaType inputMediaType,MediaType outputMediaType,String partner,boolean sendLinks) throws RestCallFailedException, JAXBException, URISyntaxException {
  String url=RestUtils.getServerURI() + persistenceUnit + "String_Node_Str"+ type+ "String_Node_Str"+ objectId+ "String_Node_Str"+ relationshipName;
  if (partner != null) {
    url+="String_Node_Str" + QueryParameters.JPARS_RELATIONSHIP_PARTNER + "String_Node_Str"+ partner;
  }
  WebResource webResource=client.resource(url);
  ByteArrayOutputStream os=new ByteArrayOutputStream();
  context.marshallEntity(newValue,inputMediaType,os,sendLinks);
  ClientResponse response=webResource.type(inputMediaType).accept(outputMediaType).post(ClientResponse.class,os.toString());
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  return response.getEntity(String.class);
}
Program: 64208
Project: 64208
Buggy source:
private Object createXMLRootForNode(Node node){
  Root xmlRoot=new XMLRoot();
  xmlRoot.setObject(node);
  if (node != null) {
    xmlRoot.setLocalName(node.getLocalName());
    xmlRoot.setNamespaceURI(node.getNamespaceURI());
  }
  return xmlRoot;
}

Fixed version (ground truth):
private Object createXMLRootForNode(Node node){
  Root xmlRoot=xmlUnmarshaller.createRoot();
  xmlRoot.setObject(node);
  if (node != null) {
    xmlRoot.setLocalName(node.getLocalName());
    xmlRoot.setNamespaceURI(node.getNamespaceURI());
  }
  return xmlRoot;
}
Program: 64210
Project: 64210
Buggy source:
public Object getObject(){
  if (object == null) {
    if (this.descriptor != null) {
      object=this.descriptor.wrapObjectInXMLRoot(this.rootRecord,this.unmarshaller.isResultAlwaysXMLRoot());
    }
 else     if (documentBuilder != null) {
      Node node=documentBuilder.getDocument().getDocumentElement();
      Root root=new XMLRoot();
      root.setLocalName(node.getLocalName());
      root.setNamespaceURI(node.getNamespaceURI());
      root.setObject(node);
      object=root;
    }
 else {
      if (rootRecord != null) {
        object=this.rootRecord.getCurrentObject();
      }
    }
  }
  return this.object;
}

Fixed version (ground truth):
public Object getObject(){
  if (object == null) {
    if (this.descriptor != null) {
      object=this.descriptor.wrapObjectInXMLRoot(this.rootRecord,this.unmarshaller.isResultAlwaysXMLRoot());
    }
 else     if (documentBuilder != null) {
      Node node=documentBuilder.getDocument().getDocumentElement();
      Root root=unmarshaller.createRoot();
      root.setLocalName(node.getLocalName());
      root.setNamespaceURI(node.getNamespaceURI());
      root.setObject(node);
      object=root;
    }
 else {
      if (rootRecord != null) {
        object=this.rootRecord.getCurrentObject();
      }
    }
  }
  return this.object;
}
Program: 64214
Project: 64214
Buggy source:
public void testLazyOneToOneFetchInitialization(){
  if (!isWeavingEnabled()) {
    return;
  }
  EntityManager em=createEntityManager();
  Room room=null;
  try {
    beginTransaction(em);
    room=new Room();
    room.setId(1);
    room.setLength(20);
    room.setHeight(10);
    room.setWidth(18);
    Door east=new Door();
    east.setId(100);
    east.setHeight(8);
    east.setWidth(5);
    east.setRoom(room);
    room.addDoor(east);
    em.persist(room);
    commitTransaction(em);
  }
 catch (  RuntimeException ex) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    fail("String_Node_Str");
  }
 finally {
    closeEntityManager(em);
  }
  em=createEntityManager();
  try {
    beginTransaction(em);
    Door d=em.find(Door.class,100);
    assertTrue("String_Node_Str",d.isRoomInstanceInitialized());
    Room r=d.getRoom();
    assertTrue("String_Node_Str",r != null);
    assertTrue("String_Node_Str",r.equals(room));
  }
 catch (  RuntimeException ex) {
    fail("String_Node_Str");
  }
 finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
  }
}

Fixed version (ground truth):
public void testLazyOneToOneFetchInitialization(){
  if (!isWeavingEnabled()) {
    return;
  }
  EntityManager em=createEntityManager();
  Room room=null;
  try {
    beginTransaction(em);
    room=new Room();
    room.setId(1);
    room.setLength(20);
    room.setHeight(10);
    room.setWidth(18);
    Door east=new Door();
    east.setId(100);
    east.setHeight(8);
    east.setWidth(5);
    int year=2013;
    int month=1;
    int day=30;
    east.setSaleDate(Helper.dateFromYearMonthDate(year,month - 1,day));
    east.setRoom(room);
    room.addDoor(east);
    em.persist(room);
    commitTransaction(em);
  }
 catch (  RuntimeException ex) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    fail("String_Node_Str");
  }
 finally {
    closeEntityManager(em);
  }
  em=createEntityManager();
  try {
    beginTransaction(em);
    Door d=em.find(Door.class,100);
    assertTrue("String_Node_Str",d.isRoomInstanceInitialized());
    Room r=d.getRoom();
    assertTrue("String_Node_Str",r != null);
    assertTrue("String_Node_Str",r.equals(room));
  }
 catch (  RuntimeException ex) {
    fail("String_Node_Str");
  }
 finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
  }
}
Program: 64215
Project: 64215
Buggy source:
/** 
 * INTERNAL: Used for annotation loading.
 */
public WriteTransformerMetadata(MetadataAnnotation writeTransformer,MetadataAccessor accessor){
  super(writeTransformer,accessor);
  m_column=new ColumnMetadata((MetadataAnnotation)writeTransformer.getAttribute("String_Node_Str"),accessor);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Used for annotation loading.
 */
public WriteTransformerMetadata(MetadataAnnotation writeTransformer,MetadataAccessor accessor){
  super(writeTransformer,accessor);
  Object column=writeTransformer.getAttribute("String_Node_Str");
  if (column != null) {
    m_column=new ColumnMetadata((MetadataAnnotation)column,accessor);
  }
 else {
    m_column=new ColumnMetadata(accessor.getAccessibleObject().getAnnotation(MetadataConstants.JPA_COLUMN),accessor);
  }
}
Program: 64216
Project: 64216
Buggy source:
/** 
 * INTERNAL:
 */
public void prepareInternal(AbstractSession session){
  if (session.getPlatform().supportsStoredFunctions()) {
    super.prepareInternal(session);
  }
 else {
    throw ValidationException.platformDoesNotSupportStoredFunctions(Helper.getShortClassName(session.getPlatform()));
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void prepareInternal(AbstractSession session){
  if (session.getPlatform().supportsStoredFunctions()) {
    super.prepareInternal(session);
  }
 else {
    throw ValidationException.platformDoesNotSupportStoredFunctions(getShortClassName(session.getPlatform()));
  }
}
Program: 64217
Project: 64217
Buggy source:
/** 
 * INTERNAL:
 */
protected boolean hasJdbcType(){
  return m_jdbcType != null && m_jdbcType.equals(-1);
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
protected boolean hasJdbcType(){
  return m_jdbcType != null && !m_jdbcType.equals(-1);
}
Program: 64219
Project: 64219
Buggy source:
/** 
 * INTERNAL:
 */
public void processResult(StoredFunctionCall call,int index){
  process(call,index);
  if (hasType()) {
    call.setResult(m_name,getJavaClass(m_type));
  }
 else   if (hasJdbcType() && hasJdbcTypeName()) {
    call.setResult(m_name,m_jdbcType,m_jdbcTypeName);
  }
 else   if (hasJdbcType()) {
    call.setResult(m_name,m_jdbcType);
  }
 else {
    call.setResult(m_name);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void processResult(StoredFunctionCall call,int index){
  process(call,index);
  if (hasType()) {
    if (hasJdbcType() && hasJdbcTypeName()) {
      OracleArrayTypeMetadata aType=null;
      if (hasTypeName() && (aType=getArrayTypeMetadata(m_typeName)) != null) {
        call.setResult(m_jdbcType,m_jdbcTypeName,getJavaClass(m_type),buildNestedField(aType));
      }
 else {
        call.setResult(m_jdbcType,m_jdbcTypeName,getJavaClass(m_type));
      }
    }
 else {
      call.setResult(m_name,getJavaClass(m_type));
    }
  }
 else   if (hasJdbcType() && hasJdbcTypeName()) {
    call.setResult(m_name,m_jdbcType,m_jdbcTypeName);
  }
 else   if (hasJdbcType()) {
    call.setResult(m_name,m_jdbcType);
  }
 else {
    call.setResult(m_name);
  }
}
Program: 64220
Project: 64220
Buggy source:
/** 
 * Return the String that will be used to perform indenting in marshalled documents. Default is &quot;   &quot; (three spaces).
 */
public abstract String getIndentString();

Fixed version (ground truth):
/** 
 * Return the String that will be used to perform indenting in marshalled documents.  Default is &quot;   &quot; (three spaces).
 */
public String getIndentString(){
  return indentString;
}
Program: 64221
Project: 64221
Buggy source:
public Marshaller(CONTEXT context){
  this.context=context;
}

Fixed version (ground truth):
/** 
 * Copy constructor
 */
protected Marshaller(Marshaller marshaller){
  this.charEscapeHandler=marshaller.getCharacterEscapeHandler();
  this.context=(CONTEXT)marshaller.getContext();
  this.encoding=marshaller.getEncoding();
  this.equalUsingIdenity=marshaller.isEqualUsingIdenity();
  this.formattedOutput=marshaller.isFormattedOutput();
  this.indentString=marshaller.getIndentString();
  this.mapper=(NAMESPACE_PREFIX_MAPPER)marshaller.getNamespacePrefixMapper();
  this.marshalListener=marshaller.getMarshalListener();
  if (marshaller.marshalProperties != null) {
    marshalProperties=new Properties();
    for (    Entry entry : marshalProperties.entrySet()) {
      marshalProperties.put(entry.getKey(),entry.getValue());
    }
  }
}
Program: 64222
Project: 64222
Buggy source:
/** 
 * NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
 */
public abstract NAMESPACE_PREFIX_MAPPER getNamespacePrefixMapper();

Fixed version (ground truth):
/** 
 * NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
 */
public NAMESPACE_PREFIX_MAPPER getNamespacePrefixMapper(){
  return mapper;
}
Program: 64223
Project: 64223
Buggy source:
/** 
 * Return the property for a given key, if one exists.
 */
public abstract Object getProperty(Object key);

Fixed version (ground truth):
/** 
 * Return the property for a given key, if one exists.
 */
public Object getProperty(Object key){
  if (null == marshalProperties) {
    return null;
  }
  return marshalProperties.get(key);
}
Program: 64224
Project: 64224
Buggy source:
/** 
 * INTERNAL
 * @return the transformer instance for this marshaller
 */
public abstract XMLTransformer getTransformer();

Fixed version (ground truth):
/** 
 * INTERNAL
 * @return the transformer instance for this Marshaller
 */
public abstract XMLTransformer getTransformer();
Program: 64225
Project: 64225
Buggy source:
/** 
 * INTERNAL
 */
public abstract boolean isEqualUsingIdenity();

Fixed version (ground truth):
/** 
 * INTERNAL
 */
public boolean isEqualUsingIdenity(){
  return equalUsingIdenity;
}
Program: 64226
Project: 64226
Buggy source:
/** 
 * Property to determine if size 1 any collections should be treated as collections Ignored marshalling XML.
 */
public abstract boolean isReduceAnyArrays();

Fixed version (ground truth):
/** 
 * Property to determine if size 1 any collections should be treated as  collections.
 */
public abstract boolean isReduceAnyArrays();
Program: 64227
Project: 64227
Buggy source:
/** 
 * Get the MediaType for this xmlMarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @return MediaType
 */
public abstract MEDIA_TYPE getMediaType();

Fixed version (ground truth):
/** 
 * Get the media type for this Marshaller.
 */
public abstract MEDIA_TYPE getMediaType();
Program: 64228
Project: 64228
Buggy source:
public abstract XMLMarshalListener getMarshalListener();

Fixed version (ground truth):
public XMLMarshalListener getMarshalListener(){
  return this.marshalListener;
}
Program: 64229
Project: 64229
Buggy source:
/** 
 * Get the encoding set on this Marshaller If the encoding has not been set the default UTF-8 will be used
 */
public abstract String getEncoding();

Fixed version (ground truth):
/** 
 * Get the encoding set on this Marshaller.  If the encoding has not been  set the default UTF-8 will be used
 */
public String getEncoding(){
  return encoding;
}
Program: 64230
Project: 64230
Buggy source:
/** 
 * Return this Marshaller's CharacterEscapeHandler.
 */
public abstract CharacterEscapeHandler getCharacterEscapeHandler();

Fixed version (ground truth):
/** 
 * Return this Marshaller's CharacterEscapeHandler.
 * @since 2.3.3
 */
public CharacterEscapeHandler getCharacterEscapeHandler(){
  return this.charEscapeHandler;
}
Program: 64231
Project: 64231
Buggy source:
/** 
 * Determine if the @XMLRootElement should be marshalled when present.   Ignored marshalling XML.   
 */
public abstract boolean isIncludeRoot();

Fixed version (ground truth):
/** 
 * Determine if the root not should be marshalled.  This property may  ignored for media types that require a root node such as XML. 
 */
public abstract boolean isIncludeRoot();
Program: 64232
Project: 64232
Buggy source:
public String getDefaultNamespaceURI(){
  return defaultNamespaceURI;
}

Fixed version (ground truth):
public String getDefaultNamespaceURI(){
  if (null != defaultNamespaceURI) {
    return defaultNamespaceURI;
  }
 else   if (dom != null) {
    return XMLPlatformFactory.getInstance().getXMLPlatform().resolveNamespacePrefix(dom,null);
  }
  return null;
}
Program: 64237
Project: 64237
Buggy source:
/** 
 * Build an XMLInverseMapping based on a particular mapping and replace that mapping with the newly created XMLInverseMapping in jaxbDescriptor
 * @param jaxbDescriptor
 * @param mapping
 * @param mappedBy
 */
protected static void convertMappingToXMLInverseReferenceMapping(ClassDescriptor jaxbDescriptor,DatabaseMapping mapping,String mappedBy){
  if (!(mapping.isXMLMapping() && (mapping.isAbstractCompositeCollectionMapping() || mapping.isAbstractCompositeObjectMapping()))) {
    return;
  }
  XMLInverseReferenceMapping jaxbInverseMapping=new XMLInverseReferenceMapping();
  copyAccessorToMapping(mapping,jaxbInverseMapping);
  jaxbInverseMapping.setProperties(mapping.getProperties());
  jaxbInverseMapping.setIsReadOnly(mapping.isReadOnly());
  jaxbInverseMapping.setMappedBy(mappedBy);
  if (mapping.isAbstractCompositeCollectionMapping()) {
    jaxbInverseMapping.setContainerPolicy(mapping.getContainerPolicy());
    jaxbInverseMapping.setReferenceClass(((XMLCompositeCollectionMapping)mapping).getReferenceClass());
  }
 else   if (mapping.isAbstractCompositeObjectMapping()) {
    jaxbInverseMapping.setReferenceClass(((XMLCompositeObjectMapping)mapping).getReferenceClass());
  }
  jaxbDescriptor.removeMappingForAttributeName(mapping.getAttributeName());
  jaxbDescriptor.addMapping(jaxbInverseMapping);
}

Fixed version (ground truth):
/** 
 * Build an XMLInverseMapping based on a particular mapping and replace that mapping with the newly created XMLInverseMapping in jaxbDescriptor
 * @param jaxbDescriptor
 * @param mapping
 * @param mappedBy
 */
private static void convertMappingToXMLInverseReferenceMapping(ClassDescriptor jaxbDescriptor,DatabaseMapping mapping,String mappedBy){
  if (!(mapping.isXMLMapping())) {
    return;
  }
  XMLInverseReferenceMapping jaxbInverseMapping=new XMLInverseReferenceMapping();
  copyAccessorToMapping(mapping,jaxbInverseMapping);
  jaxbInverseMapping.setProperties(mapping.getProperties());
  jaxbInverseMapping.setIsReadOnly(mapping.isReadOnly());
  jaxbInverseMapping.setMappedBy(mappedBy);
  if (mapping.isAbstractCompositeCollectionMapping()) {
    jaxbInverseMapping.setContainerPolicy(mapping.getContainerPolicy());
    jaxbInverseMapping.setReferenceClass(((XMLCompositeCollectionMapping)mapping).getReferenceClass());
  }
 else   if (mapping.isAbstractCompositeObjectMapping()) {
    jaxbInverseMapping.setReferenceClass(((XMLCompositeObjectMapping)mapping).getReferenceClass());
  }
  jaxbDescriptor.removeMappingForAttributeName(mapping.getAttributeName());
  jaxbDescriptor.addMapping(jaxbInverseMapping);
}
Program: 64239
Project: 64239
Buggy source:
/** 
 * Update the targetMapping to have the same accessor as the originMapping
 * @param originMapping
 * @param targetMapping
 */
public static void copyAccessorToMapping(DatabaseMapping originMapping,DatabaseMapping targetMapping){
  if (originMapping.getAttributeAccessor().isVirtualAttributeAccessor()) {
    VirtualAttributeAccessor accessor=new VirtualAttributeAccessor();
    accessor.setGetMethodName(originMapping.getGetMethodName());
    accessor.setSetMethodName(originMapping.getSetMethodName());
    targetMapping.setAttributeAccessor(accessor);
  }
  if (originMapping.getAttributeAccessor().isValuesAccessor()) {
    ValuesAccessor accessor=new ValuesAccessor(originMapping);
    accessor.setAttributeName(originMapping.getAttributeAccessor().getAttributeName());
    targetMapping.setAttributeAccessor(accessor);
  }
 else {
    targetMapping.setAttributeName(originMapping.getAttributeName());
    targetMapping.setGetMethodName(originMapping.getGetMethodName());
    targetMapping.setSetMethodName(originMapping.getSetMethodName());
  }
}

Fixed version (ground truth):
/** 
 * Update the targetMapping to have the same accessor as the originMapping
 * @param originMapping
 * @param targetMapping
 */
private static void copyAccessorToMapping(DatabaseMapping originMapping,DatabaseMapping targetMapping){
  if (originMapping.getAttributeAccessor().isVirtualAttributeAccessor()) {
    VirtualAttributeAccessor accessor=new VirtualAttributeAccessor();
    accessor.setGetMethodName(originMapping.getGetMethodName());
    accessor.setSetMethodName(originMapping.getSetMethodName());
    targetMapping.setAttributeAccessor(accessor);
  }
  if (originMapping.getAttributeAccessor().isValuesAccessor()) {
    ValuesAccessor accessor=new ValuesAccessor(originMapping);
    accessor.setAttributeName(originMapping.getAttributeAccessor().getAttributeName());
    targetMapping.setAttributeAccessor(accessor);
  }
 else {
    targetMapping.setAttributeName(originMapping.getAttributeName());
    targetMapping.setGetMethodName(originMapping.getGetMethodName());
    targetMapping.setSetMethodName(originMapping.getSetMethodName());
  }
}
Program: 64242
Project: 64242
Buggy source:
/** 
 * This method is used to help construct a JAXBContext from an existing EntityManagerFactory. For each package in the EntityManagerFactory, a MetadataSource that is capable of building a JAXBContext that creates the same mappings in JAXB is created.  These MetadataSources are used to constuct the JAXContext that is used for JSON and XML translation
 * @param metadataSources
 * @param persistenceUnitName
 * @param session
 */
@SuppressWarnings("String_Node_Str") protected void addDynamicXMLMetadataSources(List<Object> metadataSources,DatabaseSession session){
  Set<String> packages=new HashSet<String>();
  Iterator<Class> i=session.getDescriptors().keySet().iterator();
  while (i.hasNext()) {
    Class<?> descriptorClass=i.next();
    String packageName="String_Node_Str";
    if (descriptorClass.getName().lastIndexOf('.') > 0) {
      packageName=descriptorClass.getName().substring(0,descriptorClass.getName().lastIndexOf('.'));
    }
    if (!packages.contains(packageName)) {
      packages.add(packageName);
    }
  }
  for (  String packageName : packages) {
    metadataSources.add(new DynamicXMLMetadataSource(session,packageName));
  }
}

Fixed version (ground truth):
/** 
 * This method is used to help construct a JAXBContext from an existing EntityManagerFactory. For each package in the EntityManagerFactory, a MetadataSource that is capable of building a JAXBContext that creates the same mappings in JAXB is created.  These MetadataSources are used to constuct the JAXContext that is used for JSON and XML translation
 * @param metadataSources
 * @param persistenceUnitName
 * @param session
 */
@SuppressWarnings("String_Node_Str") protected void addDynamicXMLMetadataSources(List<Object> metadataSources,AbstractSession session){
  Set<String> packages=new HashSet<String>();
  Iterator<Class> i=session.getDescriptors().keySet().iterator();
  while (i.hasNext()) {
    Class<?> descriptorClass=i.next();
    String packageName="String_Node_Str";
    if (descriptorClass.getName().lastIndexOf('.') > 0) {
      packageName=descriptorClass.getName().substring(0,descriptorClass.getName().lastIndexOf('.'));
    }
    if (!packages.contains(packageName)) {
      packages.add(packageName);
    }
  }
  for (  String packageName : packages) {
    metadataSources.add(new DynamicXMLMetadataSource(session,packageName));
  }
}
Program: 64244
Project: 64244
Buggy source:
/** 
 * Create a JAXBContext based on the EntityManagerFactory for this PersistenceContext
 * @param session
 * @return
 */
protected JAXBContext createDynamicJAXBContext(DatabaseSession session) throws JAXBException, IOException {
  JAXBContext jaxbContext=(JAXBContext)session.getProperty(JAXBContext.class.getName());
  if (jaxbContext != null) {
    return jaxbContext;
  }
  Map<String,Object> properties=createJAXBProperties(session);
  ClassLoader cl=session.getPlatform().getConversionManager().getLoader();
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(cl,properties);
  session.setProperty(JAXBContext.class.getName(),jaxbContext);
  return jaxbContext;
}

Fixed version (ground truth):
/** 
 * Create a JAXBContext based on the EntityManagerFactory for this PersistenceContext
 * @param session
 * @return
 */
protected JAXBContext createDynamicJAXBContext(AbstractSession session) throws JAXBException, IOException {
  JAXBContext jaxbContext=(JAXBContext)session.getProperty(JAXBContext.class.getName());
  if (jaxbContext != null) {
    return jaxbContext;
  }
  Map<String,Object> properties=createJAXBProperties(session);
  ClassLoader cl=session.getDatasourcePlatform().getConversionManager().getLoader();
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(cl,properties);
  session.setProperty(JAXBContext.class.getName(),jaxbContext);
  return jaxbContext;
}
Program: 64246
Project: 64246
Buggy source:
public DynamicXMLMetadataSource(DatabaseSession session,String packageName){
  ObjectFactory objectFactory=new ObjectFactory();
  xmlBindings=new XmlBindings();
  xmlBindings.setPackageName(packageName);
  JavaTypes javaTypes=new JavaTypes();
  xmlBindings.setJavaTypes(javaTypes);
  for (  ClassDescriptor ormDescriptor : session.getProject().getOrderedDescriptors()) {
    String descriptorPackageName="String_Node_Str";
    if (ormDescriptor.getJavaClassName().lastIndexOf('.') > 0) {
      descriptorPackageName=ormDescriptor.getJavaClassName().substring(0,ormDescriptor.getJavaClassName().lastIndexOf('.'));
    }
    if (descriptorPackageName.equals(packageName)) {
      javaTypes.getJavaType().add(createJAXBType(ormDescriptor,objectFactory));
    }
  }
}

Fixed version (ground truth):
public DynamicXMLMetadataSource(AbstractSession session,String packageName){
  ObjectFactory objectFactory=new ObjectFactory();
  xmlBindings=new XmlBindings();
  xmlBindings.setPackageName(packageName);
  JavaTypes javaTypes=new JavaTypes();
  xmlBindings.setJavaTypes(javaTypes);
  for (  ClassDescriptor ormDescriptor : session.getProject().getOrderedDescriptors()) {
    String descriptorPackageName="String_Node_Str";
    if (ormDescriptor.getJavaClassName().lastIndexOf('.') > 0) {
      descriptorPackageName=ormDescriptor.getJavaClassName().substring(0,ormDescriptor.getJavaClassName().lastIndexOf('.'));
    }
    if (descriptorPackageName.equals(packageName)) {
      javaTypes.getJavaType().add(createJAXBType(ormDescriptor,objectFactory));
    }
  }
}
Program: 64249
Project: 64249
Buggy source:
protected Response update(@SuppressWarnings("String_Node_Str") String version,String persistenceUnit,String type,HttpHeaders hh,UriInfo uriInfo,URI baseURI,InputStream in){
  PersistenceContext app=getPersistenceFactory().get(persistenceUnit,baseURI,null);
  if (app == null || app.getClass(type) == null) {
    if (app == null) {
      JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    }
 else {
      JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
    }
    return Response.status(Status.NOT_FOUND).build();
  }
  MediaType contentType=mediaType(hh.getRequestHeader(HttpHeaders.CONTENT_TYPE));
  Object entity=null;
  try {
    entity=app.unmarshalEntity(type,contentType,in);
  }
 catch (  JAXBException e) {
    JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit,e.toString()});
    return Response.status(Status.BAD_REQUEST).build();
  }
  entity=app.merge(getMatrixParameters(uriInfo,persistenceUnit),entity);
  return Response.ok(new StreamingOutputMarshaller(app,entity,hh.getAcceptableMediaTypes())).build();
}

Fixed version (ground truth):
protected Response update(@SuppressWarnings("String_Node_Str") String version,String persistenceUnit,String type,HttpHeaders hh,UriInfo uriInfo,URI baseURI,InputStream in){
  PersistenceContext app=getPersistenceFactory().get(persistenceUnit,baseURI,null);
  if (app == null || app.getClass(type) == null) {
    if (app == null) {
      JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    }
 else {
      JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
    }
    return Response.status(Status.NOT_FOUND).build();
  }
  Object entity=null;
  try {
    entity=app.unmarshalEntity(type,mediaType(hh.getAcceptableMediaTypes()),in);
  }
 catch (  JAXBException e) {
    JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit,e.toString()});
    return Response.status(Status.BAD_REQUEST).build();
  }
  entity=app.merge(getMatrixParameters(uriInfo,persistenceUnit),entity);
  return Response.ok(new StreamingOutputMarshaller(app,entity,hh.getAcceptableMediaTypes())).build();
}