nus-yam/ex-repair huggingface dataset:
Program: 64043
Project: 64043
Buggy source:
/** 
 * Rest find attribute.
 * @param context the context
 * @param id the id
 * @param type the type
 * @param attribute the attribute
 * @param persistenceUnit the persistence unit
 * @param tenantId the tenant id
 * @param outputMediaType the output media type
 * @return the string
 * @throws RestCallFailedException the rest call failed exception
 * @throws URISyntaxException the uRI syntax exception
 */
public static String restFindAttribute(Object id,String type,String attribute,String persistenceUnit,Map<String,String> tenantId,MediaType outputMediaType) throws RestCallFailedException, URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type + "String_Node_Str"+ id+ "String_Node_Str"+ attribute);
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.accept(outputMediaType).get(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  String result=response.getEntity(String.class);
  return result;
}

Fixed version (ground truth):
/** 
 * Rest find attribute.
 * @param id the id
 * @param type the type
 * @param attribute the attribute
 * @param persistenceUnit the persistence unit
 * @param tenantId the tenant id
 * @param outputMediaType the output media type
 * @return the string
 * @throws RestCallFailedException the rest call failed exception
 * @throws URISyntaxException the uRI syntax exception
 */
public static String restFindAttribute(Object id,String type,String attribute,String persistenceUnit,Map<String,String> tenantId,MediaType outputMediaType) throws RestCallFailedException, URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type + "String_Node_Str"+ id+ "String_Node_Str"+ attribute);
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.accept(outputMediaType).get(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  String result=response.getEntity(String.class);
  return result;
}
Program: 64045
Project: 64045
Buggy source:
public static String restGetTypes(String persistenceUnit,MediaType mediaType) throws Exception {
  StringBuffer uri=new StringBuffer();
  uri.append(RestUtils.getServerURI() + persistenceUnit + "String_Node_Str");
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.accept(mediaType).get(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  String result=response.getEntity(String.class);
  return result;
}

Fixed version (ground truth):
/** 
 * Rest get types.
 * @param persistenceUnit the persistence unit
 * @param mediaType the media type
 * @return the string
 * @throws Exception the exception
 */
public static String restGetTypes(String persistenceUnit,MediaType mediaType) throws Exception {
  StringBuffer uri=new StringBuffer();
  uri.append(RestUtils.getServerURI() + persistenceUnit + "String_Node_Str");
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.accept(mediaType).get(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  String result=response.getEntity(String.class);
  return result;
}
Program: 64046
Project: 64046
Buggy source:
/** 
 * Test get contexts.
 * @return the string
 * @throws Exception the exception
 */
public static String restGetContexts(MediaType mediaType) throws Exception {
  StringBuffer uri=new StringBuffer();
  uri.append(RestUtils.getServerURI());
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.accept(mediaType).get(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  String result=response.getEntity(String.class);
  return result;
}

Fixed version (ground truth):
/** 
 * Test get contexts.
 * @param mediaType the media type
 * @return the string
 * @throws Exception the exception
 */
public static String restGetContexts(MediaType mediaType) throws Exception {
  StringBuffer uri=new StringBuffer();
  uri.append(RestUtils.getServerURI());
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.accept(mediaType).get(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  String result=response.getEntity(String.class);
  return result;
}
Program: 64047
Project: 64047
Buggy source:
/** 
 * Rest delete.
 * @param < T > the generic type
 * @param id the id
 * @param type the type
 * @param resultClass the result class
 * @param persistenceUnit the persistence unit
 * @param tenantId the tenant id
 * @param mediaType the media type
 * @throws RestCallFailedException the rest call failed exception
 * @throws URISyntaxException the uRI syntax exception
 */
public static <T>void restDelete(Object id,String type,Class<T> resultClass,String persistenceUnit,String attribute,Map<String,String> tenantId,MediaType mediaType) throws RestCallFailedException, URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type + "String_Node_Str"+ id);
  if (attribute != null) {
    uri.append("String_Node_Str" + attribute);
  }
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.type(mediaType).accept(mediaType).delete(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
}

Fixed version (ground truth):
/** 
 * Rest delete.
 * @param < T > the generic type
 * @param id the id
 * @param type the type
 * @param resultClass the result class
 * @param persistenceUnit the persistence unit
 * @param attribute the attribute
 * @param tenantId the tenant id
 * @param mediaType the media type
 * @throws RestCallFailedException the rest call failed exception
 * @throws URISyntaxException the uRI syntax exception
 */
public static <T>void restDelete(Object id,String type,Class<T> resultClass,String persistenceUnit,String attribute,Map<String,String> tenantId,MediaType mediaType) throws RestCallFailedException, URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type + "String_Node_Str"+ id);
  if (attribute != null) {
    uri.append("String_Node_Str" + attribute);
  }
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.type(mediaType).accept(mediaType).delete(ClientResponse.class);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
}
Program: 64048
Project: 64048
Buggy source:
/** 
 * Rest update.
 * @param object the object
 * @param type the type
 * @param persistenceUnit the persistence unit
 * @param tenantId the tenant id
 * @param mediaType the media type
 * @return the string
 * @throws RestCallFailedException the rest call failed exception
 * @throws URISyntaxException the uRI syntax exception
 */
public static String restUpdate(String message,String type,String persistenceUnit,Map<String,String> tenantId,MediaType mediaType) throws RestCallFailedException, URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type);
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.type(mediaType).accept(mediaType).post(ClientResponse.class,message);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  return response.getEntity(String.class);
}

Fixed version (ground truth):
/** 
 * Rest update.
 * @param message the message
 * @param type the type
 * @param persistenceUnit the persistence unit
 * @param tenantId the tenant id
 * @param mediaType the media type
 * @return the string
 * @throws RestCallFailedException the rest call failed exception
 * @throws URISyntaxException the uRI syntax exception
 */
public static String restUpdate(String message,String type,String persistenceUnit,Map<String,String> tenantId,MediaType mediaType) throws RestCallFailedException, URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type);
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.type(mediaType).accept(mediaType).post(ClientResponse.class,message);
  Status status=response.getClientResponseStatus();
  if (status != Status.OK) {
    throw new RestCallFailedException(status);
  }
  return response.getEntity(String.class);
}
Program: 64049
Project: 64049
Buggy source:
public static void restCreateWithSequence(String object,String type,String persistenceUnit,Map<String,String> tenantId,MediaType mediaType) throws URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type);
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.type(mediaType).accept(mediaType).put(ClientResponse.class,object.toString());
  Status status=response.getClientResponseStatus();
  if (status == Status.BAD_REQUEST) {
    throw new RestCallFailedException(status);
  }
 else {
    throw new IllegalArgumentException();
  }
}

Fixed version (ground truth):
/** 
 * Rest create with sequence.
 * @param object the object
 * @param type the type
 * @param persistenceUnit the persistence unit
 * @param tenantId the tenant id
 * @param mediaType the media type
 * @throws URISyntaxException the uRI syntax exception
 */
public static void restCreateWithSequence(String object,String type,String persistenceUnit,Map<String,String> tenantId,MediaType mediaType) throws URISyntaxException {
  StringBuilder uri=new StringBuilder();
  uri.append(RestUtils.getServerURI() + persistenceUnit);
  if (tenantId != null) {
    for (    String key : tenantId.keySet()) {
      uri.append("String_Node_Str" + key + "String_Node_Str"+ tenantId.get(key));
    }
  }
  uri.append("String_Node_Str" + type);
  WebResource webResource=client.resource(uri.toString());
  ClientResponse response=webResource.type(mediaType).accept(mediaType).put(ClientResponse.class,object.toString());
  Status status=response.getClientResponseStatus();
  if (status == Status.BAD_REQUEST) {
    throw new RestCallFailedException(status);
  }
 else {
    throw new IllegalArgumentException();
  }
}
Program: 64051
Project: 64051
Buggy source:
public void testMultipleCoalesce(){
  EntityManager em=createEntityManager();
  Query query=em.createQuery("String_Node_Str");
  List result=(List)query.getResultList();
  Assert.assertNotNull("String_Node_Str",result);
  Assert.assertFalse("String_Node_Str",result.isEmpty());
  Object[] aggregateResult=(Object[])result.get(0);
  Assert.assertFalse("String_Node_Str",((BigDecimal)aggregateResult[0]).equals((BigDecimal)aggregateResult[1]));
  closeEntityManager(em);
}

Fixed version (ground truth):
public void testMultipleCoalesce(){
  EntityManager em=createEntityManager();
  Query query=em.createQuery("String_Node_Str");
  List result=(List)query.getResultList();
  Assert.assertNotNull("String_Node_Str",result);
  Assert.assertFalse("String_Node_Str",result.isEmpty());
  Object[] aggregateResult=(Object[])result.get(0);
  Assert.assertFalse("String_Node_Str",aggregateResult[0].equals(aggregateResult[1]));
  closeEntityManager(em);
}
Program: 64052
Project: 64052
Buggy source:
public void testBeforeMarshalMapped() throws Exception {
  marshaller.marshal(getControlObjectMapped(),new ByteArrayOutputStream());
  assertEquals(Employee.class,mListener.beforeClass);
}

Fixed version (ground truth):
public void testBeforeMarshalMapped() throws Exception {
  marshaller.marshal(getControlObjectMapped(),new ByteArrayOutputStream());
  assertEquals(1,mListener.beforeClasses.size());
  assertEquals(Employee.class,mListener.beforeClasses.get(0));
}
Program: 64053
Project: 64053
Buggy source:
@Override public void beforeMarshal(Object source){
  beforeClass=source.getClass();
}

Fixed version (ground truth):
@Override public void beforeMarshal(Object source){
  beforeClasses.add(source.getClass());
}
Program: 64054
Project: 64054
Buggy source:
public void testAfterMarshalMapped() throws Exception {
  marshaller.marshal(getControlObjectMapped(),new ByteArrayOutputStream());
  assertEquals(Employee.class,mListener.afterClass);
}

Fixed version (ground truth):
public void testAfterMarshalMapped() throws Exception {
  marshaller.marshal(getControlObjectMapped(),new ByteArrayOutputStream());
  assertEquals(1,mListener.afterClasses.size());
  assertEquals(Employee.class,mListener.afterClasses.get(0));
}
Program: 64055
Project: 64055
Buggy source:
public void testBeforeMarshalUnmapped() throws Exception {
  marshaller.marshal(getControlObjectUnmapped(),new ByteArrayOutputStream());
  assertEquals(JAXBElement.class,mListener.beforeClass);
}

Fixed version (ground truth):
public void testBeforeMarshalUnmapped() throws Exception {
  marshaller.marshal(getControlObjectUnmapped(),new ByteArrayOutputStream());
  assertEquals(1,mListener.beforeClasses.size());
  assertEquals(JAXBElement.class,mListener.beforeClasses.get(0));
}
Program: 64056
Project: 64056
Buggy source:
@Override public void afterMarshal(Object source){
  afterClass=source.getClass();
}

Fixed version (ground truth):
@Override public void afterMarshal(Object source){
  afterClasses.add(source.getClass());
}
Program: 64057
Project: 64057
Buggy source:
public void testAfterMarshalUnmapped() throws Exception {
  marshaller.marshal(getControlObjectUnmapped(),new ByteArrayOutputStream());
  assertEquals(JAXBElement.class,mListener.afterClass);
}

Fixed version (ground truth):
public void testAfterMarshalUnmapped() throws Exception {
  marshaller.marshal(getControlObjectUnmapped(),new ByteArrayOutputStream());
  assertEquals(1,mListener.afterClasses.size());
  assertEquals(JAXBElement.class,mListener.afterClasses.get(0));
}
Program: 64058
Project: 64058
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String contextPath="String_Node_Str";
  System.setProperty("String_Node_Str",contextPath);
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=true;
  suite.addTestSuite(MarshallerTestCases.class);
  suite.addTestSuite(UnmarshallerTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(ValidatorTestCases.class);
  }
  suite.addTestSuite(UnmarshallValidationTestCases.class);
  suite.addTestSuite(MarshallerPropertiesTestCases.class);
  suite.addTestSuite(CharacterEscapeHandlerTestCases.class);
  suite.addTestSuite(MarshallerFormattingTestCases.class);
  suite.addTest(MarshallerEncodingTestCases.suite());
  suite.addTestSuite(MarshallerFragmentTestCases.class);
  suite.addTestSuite(XMLDeclarationTestCases.class);
  suite.addTestSuite(NonELCharacterEscapeHandlerTestCases.class);
  suite.addTestSuite(FlushTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String contextPath="String_Node_Str";
  System.setProperty("String_Node_Str",contextPath);
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=true;
  suite.addTestSuite(MarshallerTestCases.class);
  suite.addTestSuite(UnmarshallerTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(ValidatorTestCases.class);
  }
  suite.addTestSuite(UnmarshallValidationTestCases.class);
  suite.addTestSuite(MarshallerPropertiesTestCases.class);
  suite.addTestSuite(CharacterEscapeHandlerTestCases.class);
  suite.addTestSuite(MarshallerFormattingTestCases.class);
  suite.addTest(MarshallerEncodingTestCases.suite());
  suite.addTestSuite(MarshallerFragmentTestCases.class);
  suite.addTestSuite(XMLDeclarationTestCases.class);
  suite.addTestSuite(NonELCharacterEscapeHandlerTestCases.class);
  suite.addTestSuite(ListenerTestCases.class);
  suite.addTestSuite(FlushTestCases.class);
  return suite;
}
Program: 64061
Project: 64061
Buggy source:
@Override public void setCurrentObject(Object object){
  this.unmarshalRecord.setCurrentObject(object);
}

Fixed version (ground truth):
@Override public void setCurrentObject(Object object){
  this.currentObject=object;
  this.unmarshalRecord.setCurrentObject(object);
}
Program: 64063
Project: 64063
Buggy source:
/** 
 * @return true indicating that <i>MOXyJsonProvider</i> willbe used for the JSON binding if the media type is of the following  patterns *&#47;json or *&#47;*+json, and the type is not assignable from  any of (or a Collection or JAXBElement of) the the following: <ul> <li>byte[]</li> <li>java.io.File</li> <li>java.lang.Object</li> <li>java.lang.String</li> <li>javax.activation.DataSource</li> <li>javax.ws.rs.core.StreamingOutput</li> </ul>
 */
public boolean isWriteable(Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType){
  if (type == JSONWithPadding.class && APPLICATION_XJAVASCRIPT.equals(mediaType.toString())) {
    return true;
  }
  if (!supportsMediaType(mediaType)) {
    return false;
  }
 else   if (CoreClassConstants.APBYTE == type || CoreClassConstants.STRING == type) {
    return false;
  }
 else   if (File.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (DataSource.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (StreamingOutput.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Object.class == type) {
    return false;
  }
 else   if (JAXBElement.class.isAssignableFrom(type)) {
    return isReadable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else   if (Collection.class.isAssignableFrom(type)) {
    return isWriteable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
/** 
 * @return true indicating that <i>MOXyJsonProvider</i> willbe used for the JSON binding if the media type is of the following  patterns *&#47;json or *&#47;*+json, and the type is not assignable from  any of (or a Collection or JAXBElement of) the the following: <ul> <li>byte[]</li> <li>java.io.File</li> <li>java.lang.Object</li> <li>java.lang.String</li> <li>javax.activation.DataSource</li> <li>javax.ws.rs.core.StreamingOutput</li> </ul>
 */
public boolean isWriteable(Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType){
  if (type == JSONWithPadding.class && APPLICATION_XJAVASCRIPT.equals(mediaType.toString())) {
    return true;
  }
  if (!supportsMediaType(mediaType)) {
    return false;
  }
 else   if (CoreClassConstants.APBYTE == type || CoreClassConstants.STRING == type) {
    return false;
  }
 else   if (File.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (DataSource.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (StreamingOutput.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Object.class == type) {
    return false;
  }
 else   if (JAXBElement.class.isAssignableFrom(type)) {
    Class domainClass=getDomainClass(genericType);
    return isWriteable(domainClass,null,annotations,mediaType) || domainClass == String.class;
  }
 else   if (Collection.class.isAssignableFrom(type)) {
    Class domainClass=getDomainClass(genericType);
    return isWriteable(domainClass,null,annotations,mediaType) || domainClass == String.class;
  }
 else {
    return true;
  }
}
Program: 64064
Project: 64064
Buggy source:
/** 
 * @return true indicating that <i>MOXyJsonProvider</i> willbe used for the JSON binding if the media type is of the following  patterns *&#47;json or *&#47;*+json, and the type is not assignable from  any of (or a Collection or JAXBElement of) the following: <ul> <li>byte[]</li> <li>java.io.File</li> <li>java.io.InputStream</li> <li>java.io.Reader</li> <li>java.lang.Object</li> <li>java.lang.String</li> <li>javax.activation.DataSource</li> </ul>
 */
public boolean isReadable(Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType){
  if (!supportsMediaType(mediaType)) {
    return false;
  }
 else   if (CoreClassConstants.APBYTE == type || CoreClassConstants.STRING == type) {
    return false;
  }
 else   if (File.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (DataSource.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (InputStream.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Reader.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Object.class == type) {
    return false;
  }
 else   if (JAXBElement.class.isAssignableFrom(type)) {
    return isReadable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else   if (Collection.class.isAssignableFrom(type)) {
    return isReadable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
/** 
 * @return true indicating that <i>MOXyJsonProvider</i> willbe used for the JSON binding if the media type is of the following  patterns *&#47;json or *&#47;*+json, and the type is not assignable from  any of (or a Collection or JAXBElement of) the following: <ul> <li>byte[]</li> <li>java.io.File</li> <li>java.io.InputStream</li> <li>java.io.Reader</li> <li>java.lang.Object</li> <li>java.lang.String</li> <li>javax.activation.DataSource</li> </ul>
 */
public boolean isReadable(Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType){
  if (!supportsMediaType(mediaType)) {
    return false;
  }
 else   if (CoreClassConstants.APBYTE == type || CoreClassConstants.STRING == type) {
    return false;
  }
 else   if (File.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (DataSource.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (InputStream.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Reader.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Object.class == type) {
    return false;
  }
 else   if (JAXBElement.class.isAssignableFrom(type)) {
    Class domainClass=getDomainClass(genericType);
    return isReadable(domainClass,null,annotations,mediaType) || String.class == domainClass;
  }
 else   if (Collection.class.isAssignableFrom(type)) {
    Class domainClass=getDomainClass(genericType);
    return isReadable(domainClass,null,annotations,mediaType) || String.class == domainClass;
  }
 else {
    return true;
  }
}
Program: 64065
Project: 64065
Buggy source:
private static TestSuite buildEncodingSuite(String encoding,String controlHeader){
  TestSuite suite=new TestSuite(encoding);
  String controlString;
  if ("String_Node_Str".equals(encoding) || "String_Node_Str".equals(encoding)) {
    controlString=controlHeader + Helper.cr() + XML_BODY_ONE_BYTE;
  }
 else {
    controlString=controlHeader + Helper.cr() + XML_BODY;
  }
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  return suite;
}

Fixed version (ground truth):
private static TestSuite buildEncodingSuite(String encoding,String controlHeader){
  TestSuite suite=new TestSuite(encoding);
  String controlString;
  if ("String_Node_Str".equals(encoding) || "String_Node_Str".equals(encoding)) {
    controlString=controlHeader + XML_BODY_ONE_BYTE;
  }
 else {
    controlString=controlHeader + XML_BODY;
  }
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  suite.addTest(new MarshallerEncodingTest("String_Node_Str",encoding,controlString));
  return suite;
}
Program: 64066
Project: 64066
Buggy source:
public void testFormattingTrue() throws Exception {
  formatTest(true,XML_HEADER + XML_BODY_FORMATTED);
}

Fixed version (ground truth):
public void testFormattingTrue() throws Exception {
  formatTest(true,XML_HEADER + CRLF + XML_BODY_FORMATTED);
}
Program: 64069
Project: 64069
Buggy source:
/** 
 * @return true indicating that <i>MOXyJsonProvider</i> willbe used for the JSON binding if the media type is of the following  patterns *&#47;json or *&#47;*+json, and the type is not assignable from  any of (or a Collection or JAXBElement of) the the following: <ul> <li>byte[]</li> <li>java.io.File</li> <li>java.lang.Object</li> <li>java.lang.String</li> <li>javax.activation.DataSource</li> <li>javax.ws.rs.core.StreamingOutput</li> </ul>
 */
public boolean isWriteable(Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType){
  if (!supportsMediaType(mediaType)) {
    return false;
  }
 else   if (CoreClassConstants.APBYTE == type || CoreClassConstants.STRING == type) {
    return false;
  }
 else   if (File.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (DataSource.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (StreamingOutput.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Object.class == type) {
    return false;
  }
 else   if (JAXBElement.class.isAssignableFrom(type)) {
    return isReadable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else   if (Collection.class.isAssignableFrom(type)) {
    return isWriteable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
/** 
 * @return true indicating that <i>MOXyJsonProvider</i> willbe used for the JSON binding if the media type is of the following  patterns *&#47;json or *&#47;*+json, and the type is not assignable from  any of (or a Collection or JAXBElement of) the the following: <ul> <li>byte[]</li> <li>java.io.File</li> <li>java.lang.Object</li> <li>java.lang.String</li> <li>javax.activation.DataSource</li> <li>javax.ws.rs.core.StreamingOutput</li> </ul>
 */
public boolean isWriteable(Class<?> type,Type genericType,Annotation[] annotations,MediaType mediaType){
  if (type == JSONWithPadding.class && APPLICATION_XJAVASCRIPT.equals(mediaType.toString())) {
    return true;
  }
  if (!supportsMediaType(mediaType)) {
    return false;
  }
 else   if (CoreClassConstants.APBYTE == type || CoreClassConstants.STRING == type) {
    return false;
  }
 else   if (File.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (DataSource.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (StreamingOutput.class.isAssignableFrom(type)) {
    return false;
  }
 else   if (Object.class == type) {
    return false;
  }
 else   if (JAXBElement.class.isAssignableFrom(type)) {
    return isReadable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else   if (Collection.class.isAssignableFrom(type)) {
    return isWriteable(getDomainClass(genericType),null,annotations,mediaType);
  }
 else {
    return true;
  }
}
Program: 64070
Project: 64070
Buggy source:
/** 
 * INTERNAL: Return the message for the given exception class and error number. Based on the state of the translate flag - look up translation for the key:value message
 * @param localizationClassName
 * @param key
 * @param arguments
 * @param translate
 * @return
 */
public static String buildMessage(String localizationClassName,String key,Object[] arguments,boolean translate){
  String message=key;
  ResourceBundle bundle=null;
  if (arguments != null) {
    for (int i=0; i < arguments.length; i++) {
      if (arguments[i] == null) {
        arguments[i]="String_Node_Str";
      }
    }
  }
  bundle=ResourceBundle.getBundle("String_Node_Str" + localizationClassName + "String_Node_Str",Locale.getDefault());
  try {
    message=bundle.getString(key);
  }
 catch (  java.util.MissingResourceException mre) {
    bundle=ResourceBundle.getBundle("String_Node_Str",Locale.getDefault());
    String noTranslationMessage=bundle.getString("String_Node_Str");
    if (translate) {
      return MessageFormat.format(message,arguments) + noTranslationMessage;
    }
 else {
      return MessageFormat.format(message,arguments);
    }
  }
  return MessageFormat.format(message,arguments);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the message for the given exception class and error number. Based on the state of the translate flag - look up translation for the key:value message
 * @param localizationClassName
 * @param key
 * @param arguments
 * @param translate
 * @return
 */
public static String buildMessage(String localizationClassName,String key,Object[] arguments,boolean translate){
  String message=key;
  ResourceBundle bundle=null;
  if (arguments != null) {
    for (int i=0; i < arguments.length; i++) {
      if (arguments[i] == null) {
        arguments[i]="String_Node_Str";
      }
    }
  }
  try {
    bundle=ResourceBundle.getBundle("String_Node_Str" + localizationClassName + "String_Node_Str",Locale.getDefault());
    message=bundle.getString(key);
  }
 catch (  java.util.MissingResourceException mre) {
    if (translate) {
      bundle=ResourceBundle.getBundle("String_Node_Str",Locale.getDefault());
      String noTranslationMessage=bundle.getString("String_Node_Str");
      return MessageFormat.format(message,arguments) + noTranslationMessage;
    }
  }
  return MessageFormat.format(message,arguments);
}
Program: 64071
Project: 64071
Buggy source:
/** 
 * Return the formatted message based on the information from the given SessionLogEntry. The message will either be translated and formatted or formatted only depending on if the shouldTranslate flag is set to true of false.
 */
protected String formatMessage(SessionLogEntry entry){
  String message=entry.getMessage();
  if (entry.shouldTranslate()) {
    if (entry.getLevel() > FINE) {
      message=LoggingLocalization.buildMessage(message,entry.getParameters());
    }
 else {
      message=TraceLocalization.buildMessage(message,entry.getParameters(),true);
    }
  }
 else {
    if (entry.getParameters() != null && entry.getParameters().length > 0 && message.indexOf("String_Node_Str") >= 0) {
      message=java.text.MessageFormat.format(message,entry.getParameters());
    }
 else {
      if (message.indexOf("String_Node_Str") == -1) {
        message=TraceLocalization.buildMessage(message,false);
      }
    }
  }
  return message;
}

Fixed version (ground truth):
/** 
 * Return the formatted message based on the information from the given SessionLogEntry. The message will either be translated and formatted or formatted only depending on if the shouldTranslate flag is set to true of false.
 */
protected String formatMessage(SessionLogEntry entry){
  String message=entry.getMessage();
  if (entry.shouldTranslate()) {
    if (entry.getLevel() > FINE) {
      message=LoggingLocalization.buildMessage(message,entry.getParameters());
    }
 else {
      message=TraceLocalization.buildMessage(message,entry.getParameters(),true);
    }
  }
 else {
    if (entry.getParameters() != null && entry.getParameters().length > 0 && message.indexOf("String_Node_Str") >= 0) {
      message=java.text.MessageFormat.format(message,entry.getParameters());
    }
  }
  return message;
}
Program: 64073
Project: 64073
Buggy source:
private void setRelationshipInfo(Object entity){
  if ((entity != null) && (entity instanceof PersistenceWeavedRest)) {
    ClassDescriptor descriptor=getJpaSession().getClassDescriptor(entity.getClass());
    if (descriptor != null) {
      ((PersistenceWeavedRest)entity)._persistence_setRelationships(new ArrayList<RelationshipInfo>());
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping.isForeignReferenceMapping()) {
          ForeignReferenceMapping frMapping=(ForeignReferenceMapping)mapping;
          RelationshipInfo info=new RelationshipInfo();
          info.setAttributeName(frMapping.getAttributeName());
          info.setOwningEntity(entity);
          info.setOwningEntityAlias(descriptor.getAlias());
          info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity,(AbstractSession)getJpaSession()));
          ((PersistenceWeavedRest)entity)._persistence_getRelationships().add(info);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void setRelationshipInfo(Object entity){
  if ((entity != null) && (entity instanceof PersistenceWeavedRest)) {
    ClassDescriptor descriptor=getJpaSession().getClassDescriptor(entity.getClass());
    if (descriptor != null) {
      ((PersistenceWeavedRest)entity)._persistence_setRelationships(new ArrayList<RelationshipInfo>());
      for (      DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping.isForeignReferenceMapping()) {
          ForeignReferenceMapping frMapping=(ForeignReferenceMapping)mapping;
          RelationshipInfo info=new RelationshipInfo();
          info.setAttributeName(frMapping.getAttributeName());
          info.setOwningEntity(entity);
          info.setOwningEntityAlias(descriptor.getAlias());
          info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity,(AbstractSession)getJpaSession()));
          ((PersistenceWeavedRest)entity)._persistence_getRelationships().add(info);
        }
 else         if (mapping.isEISMapping()) {
          if (mapping instanceof EISCompositeCollectionMapping) {
            EISCompositeCollectionMapping eisMapping=(EISCompositeCollectionMapping)mapping;
            RelationshipInfo info=new RelationshipInfo();
            info.setAttributeName(eisMapping.getAttributeName());
            info.setOwningEntity(entity);
            info.setOwningEntityAlias(descriptor.getAlias());
            info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity,(AbstractSession)getJpaSession()));
            ((PersistenceWeavedRest)entity)._persistence_getRelationships().add(info);
          }
        }
      }
    }
  }
}
Program: 64075
Project: 64075
Buggy source:
protected Response getDescriptorMetadata(String version,String persistenceUnit,String descriptorAlias,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).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
  }
 else {
    ClassDescriptor descriptor=app.getJpaSession().getDescriptorForAlias(descriptorAlias);
    if (descriptor == null) {
      JPARSLogger.fine("String_Node_Str",new Object[]{descriptorAlias,persistenceUnit});
      return Response.status(Status.NOT_FOUND).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
    }
 else {
      String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
      Descriptor returnDescriptor=buildDescriptor(app,persistenceUnit,descriptor,baseURI.toString(),version);
      String result=null;
      try {
        result=marshallMetadata(returnDescriptor,mediaType);
      }
 catch (      JAXBException e) {
        JPARSLogger.fine("String_Node_Str",new Object[]{descriptorAlias,persistenceUnit,e.toString()});
        return Response.status(Status.INTERNAL_SERVER_ERROR).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
      }
      return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
    }
  }
}

Fixed version (ground truth):
protected Response getDescriptorMetadata(String version,String persistenceUnit,String descriptorAlias,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).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
  }
 else {
    ClassDescriptor descriptor=app.getJpaSession().getDescriptorForAlias(descriptorAlias);
    if (descriptor == null) {
      JPARSLogger.fine("String_Node_Str",new Object[]{descriptorAlias,persistenceUnit});
      return Response.status(Status.NOT_FOUND).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
    }
 else {
      String mediaType=StreamingOutputMarshaller.mediaType(hh.getAcceptableMediaTypes()).toString();
      Descriptor returnDescriptor=buildDescriptor(app,persistenceUnit,descriptor,baseURI.toString());
      String result=null;
      try {
        result=marshallMetadata(returnDescriptor,mediaType);
      }
 catch (      JAXBException e) {
        JPARSLogger.fine("String_Node_Str",new Object[]{descriptorAlias,persistenceUnit,e.toString()});
        return Response.status(Status.INTERNAL_SERVER_ERROR).type(StreamingOutputMarshaller.getResponseMediaType(hh)).build();
      }
      return Response.ok(new StreamingOutputMarshaller(null,result,hh.getAcceptableMediaTypes())).build();
    }
  }
}
Program: 64078
Project: 64078
Buggy source:
/** 
 * If Bean Validation is enabled, bootstraps Bean Validation on descriptors.
 * @param puProperties merged properties for this persistence unit
 */
private void addBeanValidationListeners(Map puProperties,ClassLoader appClassLoader){
  ValidationMode validationMode=getValidationMode(persistenceUnitInfo,puProperties);
  if (validationMode == ValidationMode.AUTO || validationMode == ValidationMode.CALLBACK) {
    String helperClassName="String_Node_Str";
    ClassLoader eclipseLinkClassLoader=EntityManagerSetupImpl.class.getClassLoader();
    Class helperClass;
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        helperClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(helperClassName,true,eclipseLinkClassLoader));
      }
 else {
        helperClass=PrivilegedAccessHelper.getClassForName(helperClassName,true,eclipseLinkClassLoader);
      }
      BeanValidationInitializationHelper beanValidationInitializationHelper=(BeanValidationInitializationHelper)helperClass.newInstance();
      beanValidationInitializationHelper.bootstrapBeanValidation(puProperties,session,appClassLoader);
    }
 catch (    Throwable e) {
      if (validationMode == ValidationMode.CALLBACK) {
        throw PersistenceUnitLoadingException.exceptionObtainingRequiredBeanValidatorFactory(e);
      }
      session.logMessage("String_Node_Str" + e);
    }
  }
}

Fixed version (ground truth):
/** 
 * If Bean Validation is enabled, bootstraps Bean Validation on descriptors.
 * @param puProperties merged properties for this persistence unit
 */
private void addBeanValidationListeners(Map puProperties,ClassLoader appClassLoader){
  ValidationMode validationMode=getValidationMode(persistenceUnitInfo,puProperties);
  if (validationMode == ValidationMode.AUTO || validationMode == ValidationMode.CALLBACK) {
    String helperClassName="String_Node_Str";
    ClassLoader eclipseLinkClassLoader=EntityManagerSetupImpl.class.getClassLoader();
    Class helperClass;
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        helperClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(helperClassName,true,eclipseLinkClassLoader));
      }
 else {
        helperClass=PrivilegedAccessHelper.getClassForName(helperClassName,true,eclipseLinkClassLoader);
      }
      BeanValidationInitializationHelper beanValidationInitializationHelper=(BeanValidationInitializationHelper)helperClass.newInstance();
      beanValidationInitializationHelper.bootstrapBeanValidation(puProperties,session,appClassLoader);
    }
 catch (    Throwable e) {
      if (validationMode == ValidationMode.CALLBACK) {
        throw PersistenceUnitLoadingException.exceptionObtainingRequiredBeanValidatorFactory(e);
      }
      this.session.log(SessionLog.FINEST,SessionLog.JPA,"String_Node_Str",new Object[]{e.getMessage()});
    }
  }
}
Program: 64079
Project: 64079
Buggy source:
/** 
 * INTERNAL:
 */
protected void loadSpecifiedMappingFiles(boolean throwExceptionOnFail){
  PersistenceUnitInfo puInfo=m_project.getPersistenceUnitInfo();
  for (  String mappingFileName : puInfo.getMappingFileNames()) {
    try {
      Enumeration<URL> mappingFileURLs=m_loader.getResources(mappingFileName);
      if (!mappingFileURLs.hasMoreElements()) {
        mappingFileURLs=m_loader.getResources("String_Node_Str" + mappingFileName);
      }
      if (mappingFileURLs.hasMoreElements()) {
        URL nextURL=mappingFileURLs.nextElement();
        if (nextURL == null) {
          nextURL=mappingFileURLs.nextElement();
        }
        if (mappingFileURLs.hasMoreElements()) {
          logThrowable(ValidationException.nonUniqueMappingFileName(puInfo.getPersistenceUnitName(),mappingFileName));
        }
        m_project.addEntityMappings(XMLEntityMappingsReader.read(nextURL,m_loader,m_project.getPersistenceUnitInfo().getProperties()));
      }
 else {
        handleORMException(ValidationException.mappingFileNotFound(puInfo.getPersistenceUnitName(),mappingFileName),mappingFileName,throwExceptionOnFail);
      }
    }
 catch (    IOException e) {
      handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(mappingFileName,e),mappingFileName,throwExceptionOnFail);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
protected void loadSpecifiedMappingFiles(boolean throwExceptionOnFail){
  PersistenceUnitInfo puInfo=m_project.getPersistenceUnitInfo();
  for (  String mappingFileName : puInfo.getMappingFileNames()) {
    try {
      Enumeration<URL> mappingFileURLs=m_loader.getResources(mappingFileName);
      if (!mappingFileURLs.hasMoreElements()) {
        mappingFileURLs=m_loader.getResources("String_Node_Str" + mappingFileName);
      }
      if (mappingFileURLs.hasMoreElements()) {
        URL nextURL=mappingFileURLs.nextElement();
        if (nextURL == null) {
          nextURL=mappingFileURLs.nextElement();
        }
        if (mappingFileURLs.hasMoreElements()) {
          Throwable throwable=ValidationException.nonUniqueMappingFileName(puInfo.getPersistenceUnitName(),mappingFileName);
          getSessionLog().logThrowable(SessionLog.FINER,SessionLog.METADATA,throwable);
        }
        m_project.addEntityMappings(XMLEntityMappingsReader.read(nextURL,m_loader,m_project.getPersistenceUnitInfo().getProperties()));
      }
 else {
        handleORMException(ValidationException.mappingFileNotFound(puInfo.getPersistenceUnitName(),mappingFileName),mappingFileName,throwExceptionOnFail);
      }
    }
 catch (    IOException e) {
      handleORMException(PersistenceUnitLoadingException.exceptionLoadingORMXML(mappingFileName,e),mappingFileName,throwExceptionOnFail);
    }
  }
}
Program: 64080
Project: 64080
Buggy source:
/** 
 * INTERNAL:  Process the customizer for those entities and embeddables that have one defined. This must be the last thing called on this processor before cleanup.
 */
public void processCustomizers(){
  for (  ClassAccessor classAccessor : m_project.getAccessorsWithCustomizer()) {
    DescriptorCustomizer customizer=(DescriptorCustomizer)MetadataHelper.getClassInstance(classAccessor.getCustomizerClass().getName(),m_loader);
    try {
      customizer.customize(classAccessor.getDescriptor().getClassDescriptor());
    }
 catch (    Exception e) {
      logThrowable(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:  Process the customizer for those entities and embeddables that have one defined. This must be the last thing called on this processor before cleanup.
 */
public void processCustomizers(){
  for (  ClassAccessor classAccessor : m_project.getAccessorsWithCustomizer()) {
    DescriptorCustomizer customizer=(DescriptorCustomizer)MetadataHelper.getClassInstance(classAccessor.getCustomizerClass().getName(),m_loader);
    try {
      customizer.customize(classAccessor.getDescriptor().getClassDescriptor());
    }
 catch (    Exception e) {
      getSessionLog().logThrowable(SessionLog.FINER,SessionLog.METADATA,e);
    }
  }
}
Program: 64081
Project: 64081
Buggy source:
/** 
 * INTERNAL:
 */
protected void loadStandardMappingFiles(String ormXMLFile){
  PersistenceUnitInfo puInfo=m_project.getPersistenceUnitInfo();
  Collection<URL> rootUrls=new HashSet<URL>(puInfo.getJarFileUrls());
  rootUrls.add(puInfo.getPersistenceUnitRootUrl());
  for (  URL rootURL : rootUrls) {
    logMessage("String_Node_Str" + rootURL);
    URL ormURL=null;
    Archive par=null;
    try {
      par=PersistenceUnitProcessor.getArchiveFactory(m_loader).createArchive(rootURL,null);
      if (par != null) {
        ormURL=par.getEntryAsURL(ormXMLFile);
        if (ormURL != null) {
          logMessage("String_Node_Str" + ormURL + "String_Node_Str"+ rootURL);
          XMLEntityMappings entityMappings=XMLEntityMappingsReader.read(ormURL,m_loader,m_project.getPersistenceUnitInfo().getProperties());
          entityMappings.setIsEclipseLinkORMFile(ormXMLFile.equals(MetadataHelper.ECLIPSELINK_ORM_FILE));
          m_project.addEntityMappings(entityMappings);
        }
      }
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
catch (    URISyntaxException e) {
      throw new RuntimeException(e);
    }
 finally {
      if (par != null) {
        par.close();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
protected void loadStandardMappingFiles(String ormXMLFile){
  PersistenceUnitInfo puInfo=m_project.getPersistenceUnitInfo();
  Collection<URL> rootUrls=new HashSet<URL>(puInfo.getJarFileUrls());
  rootUrls.add(puInfo.getPersistenceUnitRootUrl());
  for (  URL rootURL : rootUrls) {
    getSessionLog().log(SessionLog.FINER,SessionLog.METADATA,"String_Node_Str",new Object[]{ormXMLFile,rootURL},true);
    URL ormURL=null;
    Archive par=null;
    try {
      par=PersistenceUnitProcessor.getArchiveFactory(m_loader).createArchive(rootURL,null);
      if (par != null) {
        ormURL=par.getEntryAsURL(ormXMLFile);
        if (ormURL != null) {
          getSessionLog().log(SessionLog.FINER,SessionLog.METADATA,"String_Node_Str",new Object[]{ormURL,rootURL},true);
          XMLEntityMappings entityMappings=XMLEntityMappingsReader.read(ormURL,m_loader,m_project.getPersistenceUnitInfo().getProperties());
          entityMappings.setIsEclipseLinkORMFile(ormXMLFile.equals(MetadataHelper.ECLIPSELINK_ORM_FILE));
          m_project.addEntityMappings(entityMappings);
        }
      }
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
catch (    URISyntaxException e) {
      throw new RuntimeException(e);
    }
 finally {
      if (par != null) {
        par.close();
      }
    }
  }
}