nus-yam/ex-repair huggingface dataset:
Program: 59561
Project: 59561
Buggy source:
@Override public AtomFeed parse(Reader reader){
  return parseFeed(InternalUtil.newXMLEventReader(reader),getEntitySet());
}

Fixed version (ground truth):
@Override public AtomFeed parse(Reader reader){
  return parseFeed(StaxUtil.newXMLEventReader(reader),getEntitySet());
}
Program: 59562
Project: 59562
Buggy source:
@Override public OSimpleObject<?> parse(Reader reader){
  XMLEventReader2 xmlReader=InternalUtil.newXMLEventReader(reader);
  xmlReader.nextEvent();
  xmlReader.nextEvent();
  String text=xmlReader.getElementText();
  EdmSimpleType<?> type=EdmSimpleType.STRING;
  if (settings != null && settings.parseType != null && settings.parseType.isSimple())   type=(EdmSimpleType<?>)settings.parseType;
  return OSimpleObjects.parse(type,text);
}

Fixed version (ground truth):
@Override public OSimpleObject<?> parse(Reader reader){
  XMLEventReader2 xmlReader=StaxUtil.newXMLEventReader(reader);
  xmlReader.nextEvent();
  xmlReader.nextEvent();
  String text=xmlReader.getElementText();
  EdmSimpleType<?> type=EdmSimpleType.STRING;
  if (settings != null && settings.parseType != null && settings.parseType.isSimple())   type=(EdmSimpleType<?>)settings.parseType;
  return OSimpleObjects.parse(type,text);
}
Program: 59563
Project: 59563
Buggy source:
@Override public SingleLink parse(Reader reader){
  return parseLinks(InternalUtil.newXMLEventReader(reader)).iterator().next();
}

Fixed version (ground truth):
@Override public SingleLink parse(Reader reader){
  return parseLinks(StaxUtil.newXMLEventReader(reader)).iterator().next();
}
Program: 59564
Project: 59564
Buggy source:
private IterationResult<XMLEvent2> startElement2(){
  Object o=new DomStartElement2(current);
  XMLEvent2 event=new DomXMLEvent2(o);
  return IterationResult.next(event);
}

Fixed version (ground truth):
private IterationResult<XMLEvent2> startElement2(){
  DomStartElement2 start=new DomStartElement2(current);
  XMLEvent2 event=new InMemoryXMLEvent2(start,null,null);
  return IterationResult.next(event);
}
Program: 59565
Project: 59565
Buggy source:
private IterationResult<XMLEvent2> endElement2(){
  Object o=new DomEndElement2(current);
  XMLEvent2 event=new DomXMLEvent2(o);
  return IterationResult.next(event);
}

Fixed version (ground truth):
private IterationResult<XMLEvent2> endElement2(){
  DomEndElement2 end=new DomEndElement2(current);
  XMLEvent2 event=new InMemoryXMLEvent2(null,end,null);
  return IterationResult.next(event);
}
Program: 59566
Project: 59566
Buggy source:
@Override public String toString(){
  return event.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + getName() + "String_Node_Str"+ AndroidCompat.getTextContent(element);
}
Program: 59567
Project: 59567
Buggy source:
@Override public Entry parse(Reader reader){
  JsonStreamReader jsr=JsonStreamReaderFactory.createJsonStreamReader(reader);
  try {
    ensureNext(jsr);
    ensureStartObject(jsr.nextEvent());
    if (isResponse) {
      ensureNext(jsr);
      ensureStartProperty(jsr.nextEvent(),DATA_PROPERTY);
      ensureStartObject(jsr.nextEvent());
    }
    if (version.compareTo(ODataVersion.V1) > 0) {
      ensureNext(jsr);
      ensureStartObject(jsr.nextEvent());
      ensureNext(jsr);
      ensureStartProperty(jsr.nextEvent(),RESULTS_PROPERTY);
      ensureStartObject(jsr.nextEvent());
    }
    return parseEntry(metadata.getEdmEntitySet(entitySetName),jsr);
  }
  finally {
    jsr.close();
  }
}

Fixed version (ground truth):
@Override public Entry parse(Reader reader){
  JsonStreamReader jsr=JsonStreamReaderFactory.createJsonStreamReader(reader);
  try {
    ensureNext(jsr);
    ensureStartObject(jsr.nextEvent());
    if (isResponse) {
      ensureNext(jsr);
      ensureStartProperty(jsr.nextEvent(),DATA_PROPERTY);
      ensureStartObject(jsr.nextEvent());
    }
    return parseEntry(metadata.getEdmEntitySet(entitySetName),jsr);
  }
  finally {
    jsr.close();
  }
}
Program: 59568
Project: 59568
Buggy source:
@Test public void callMetaData() throws SAXException, IOException, ParserConfigurationException {
  String metadataByService=this.rtFacade.getWebResource(endpointUri + "String_Node_Str");
  assertEquals(200,this.rtFacade.getLastStatusCode());
  assertXMLEqual(this.metadata,metadataByService);
}

Fixed version (ground truth):
@Test public void callMetaData() throws SAXException, IOException, ParserConfigurationException {
  String metadata=this.rtFacade.getWebResource(endpointUri + "String_Node_Str");
  assertEquals(200,this.rtFacade.getLastStatusCode());
  assertNotNull(metadata);
}
Program: 59569
Project: 59569
Buggy source:
@Before public void before(){
  this.initializeXmlUnit();
  this.mockProducer=new FunctionImportProducerMock();
  DefaultODataProducerProvider.setInstance(this.mockProducer);
  this.server=this.rtFacade.startODataServer(FunctionImportTest.endpointUri);
  this.metadata=MetadataUtil.readMetadataFromFile();
}

Fixed version (ground truth):
@Before public void before(){
  this.initializeXmlUnit();
  this.mockProducer=new FunctionImportProducerMock();
  DefaultODataProducerProvider.setInstance(this.mockProducer);
  this.server=this.rtFacade.startODataServer(FunctionImportTest.endpointUri);
}
Program: 59570
Project: 59570
Buggy source:
public static String readMetadataFromFile(){
  EdmDataServices eds=MetadataUtil.readMetadataServiceFromFile();
  StringWriter writer=new StringWriter();
  EdmxFormatWriter.write(eds,writer);
  return writer.toString();
}

Fixed version (ground truth):
public static String readMetadataFromFile(){
  try {
    InputStream inputStream=MetadataUtil.class.getResourceAsStream(MetadataUtil.REF_SCENARIO_EDMX);
    BufferedReader reader=new BufferedReader(new InputStreamReader(inputStream));
    String line=null;
    StringBuilder stringBuilder=new StringBuilder();
    String ls=System.getProperty("String_Node_Str");
    while ((line=reader.readLine()) != null) {
      stringBuilder.append(line);
      stringBuilder.append(ls);
    }
    return stringBuilder.toString();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 59572
Project: 59572
Buggy source:
@Override public EdmEntityType apply(){
  return (EdmEntityType)build();
}

Fixed version (ground truth):
@Override public String apply(Builder input){
  return input.getFullyQualifiedTypeName();
}
Program: 59575
Project: 59575
Buggy source:
@Test(expected=IllegalArgumentException.class) public void illegalDateTime() throws Exception {
  formatParser.parse(buildJson("String_Node_Str"));
}

Fixed version (ground truth):
@Ignore("String_Node_Str") @Test(expected=IllegalArgumentException.class) public void illegalDateTime() throws Exception {
  formatParser.parse(buildJson("String_Node_Str"));
}
Program: 59576
Project: 59576
Buggy source:
@Test(expected=IllegalArgumentException.class) public void illegalDateTime() throws Exception {
  formatParser.parse(buildAtom("String_Node_Str"));
}

Fixed version (ground truth):
@Ignore("String_Node_Str") @Test(expected=IllegalArgumentException.class) public void illegalDateTime() throws Exception {
  formatParser.parse(buildAtom("String_Node_Str"));
}
Program: 59577
Project: 59577
Buggy source:
private static void writeProperties(Iterable<EdmProperty> properties,XMLWriter2 writer){
  for (  EdmProperty prop : properties) {
    writer.startElement(new QName2("String_Node_Str"));
    writer.writeAttribute("String_Node_Str",prop.getName());
    writer.writeAttribute("String_Node_Str",prop.getType().getFullyQualifiedTypeName());
    writer.writeAttribute("String_Node_Str",Boolean.toString(prop.isNullable()));
    if (prop.getMaxLength() != null) {
      writer.writeAttribute("String_Node_Str",Integer.toString(prop.getMaxLength()));
    }
    if (!prop.getCollectionKind().equals(CollectionKind.NONE)) {
      writer.writeAttribute("String_Node_Str",prop.getCollectionKind().toString());
    }
    if (prop.getDefaultValue() != null) {
      writer.writeAttribute("String_Node_Str",prop.getDefaultValue());
    }
    if (prop.getPrecision() != null) {
      writer.writeAttribute("String_Node_Str",Integer.toString(prop.getPrecision()));
    }
    if (prop.getScale() != null) {
      writer.writeAttribute("String_Node_Str",Integer.toString(prop.getPrecision()));
    }
    writeAnnotationAttributes(prop,writer);
    writeAnnotationElements(prop,writer);
    writer.endElement("String_Node_Str");
  }
}

Fixed version (ground truth):
private static void writeProperties(Iterable<EdmProperty> properties,XMLWriter2 writer){
  for (  EdmProperty prop : properties) {
    writer.startElement(new QName2("String_Node_Str"));
    writer.writeAttribute("String_Node_Str",prop.getName());
    writer.writeAttribute("String_Node_Str",prop.getType().getFullyQualifiedTypeName());
    writer.writeAttribute("String_Node_Str",Boolean.toString(prop.isNullable()));
    if (prop.getMaxLength() != null) {
      writer.writeAttribute("String_Node_Str",Integer.toString(prop.getMaxLength()));
    }
    if (!prop.getCollectionKind().equals(CollectionKind.NONE)) {
      writer.writeAttribute("String_Node_Str",prop.getCollectionKind().toString());
    }
    if (prop.getDefaultValue() != null) {
      writer.writeAttribute("String_Node_Str",prop.getDefaultValue());
    }
    if (prop.getPrecision() != null) {
      writer.writeAttribute("String_Node_Str",Integer.toString(prop.getPrecision()));
    }
    if (prop.getScale() != null) {
      writer.writeAttribute("String_Node_Str",Integer.toString(prop.getScale()));
    }
    writeAnnotationAttributes(prop,writer);
    writeAnnotationElements(prop,writer);
    writer.endElement("String_Node_Str");
  }
}
Program: 59579
Project: 59579
Buggy source:
public Builder addEntityTypes(List<EdmEntityType.Builder> entityTypes){
  this.entityTypes.addAll(entityTypes);
  return this;
}

Fixed version (ground truth):
public Builder addEntityTypes(EdmEntityType.Builder... entityTypes){
  this.entityTypes.addAll(Arrays.asList(entityTypes));
  return this;
}
Program: 59581
Project: 59581
Buggy source:
public InMemoryEdmGenerator(String namespace,InMemoryTypeMapping typeMapping,String idPropertyName,Map<String,InMemoryEntityInfo<?,?>> eis){
  this.namespace=namespace;
  this.typeMapping=typeMapping;
  this.eis=eis;
}

Fixed version (ground truth):
public InMemoryEdmGenerator(String namespace,InMemoryTypeMapping typeMapping,String idPropertyName,Map<String,InMemoryEntityInfo<?>> eis){
  this.namespace=namespace;
  this.typeMapping=typeMapping;
  this.eis=eis;
}
Program: 59584
Project: 59584
Buggy source:
private void createNavigationProperties(List<EdmAssociation.Builder> associations,List<EdmAssociationSet.Builder> associationSets,Map<String,EdmEntityType.Builder> entityTypesByName,Map<String,EdmEntitySet.Builder> entitySetByName,Map<Class<?>,String> entityNameByClass){
  for (  String entitySetName : eis.keySet()) {
    InMemoryEntityInfo<?,?> ei=eis.get(entitySetName);
    Class<?> clazz1=ei.entityClass;
    generateToOneNavProperties(associations,associationSets,entityTypesByName,entitySetByName,entityNameByClass,ei.entityTypeName,ei);
    generateToManyNavProperties(associations,associationSets,entityTypesByName,entitySetByName,entityNameByClass,ei.entityTypeName,ei,clazz1);
  }
}

Fixed version (ground truth):
private void createNavigationProperties(List<EdmAssociation.Builder> associations,List<EdmAssociationSet.Builder> associationSets,Map<String,EdmEntityType.Builder> entityTypesByName,Map<String,EdmEntitySet.Builder> entitySetByName,Map<Class<?>,String> entityNameByClass){
  for (  String entitySetName : eis.keySet()) {
    InMemoryEntityInfo<?> ei=eis.get(entitySetName);
    Class<?> clazz1=ei.entityClass;
    generateToOneNavProperties(associations,associationSets,entityTypesByName,entitySetByName,entityNameByClass,ei.entityTypeName,ei);
    generateToManyNavProperties(associations,associationSets,entityTypesByName,entitySetByName,entityNameByClass,ei.entityTypeName,ei,clazz1);
  }
}
Program: 59586
Project: 59586
Buggy source:
private void createStructuralEntities(EdmDecorator decorator,List<EdmEntitySet.Builder> entitySets,List<EdmEntityType.Builder> entityTypes){
  for (  String entitySetName : eis.keySet()) {
    InMemoryEntityInfo<?,?> entityInfo=eis.get(entitySetName);
    List<EdmProperty.Builder> properties=new ArrayList<EdmProperty.Builder>();
    properties.addAll(toEdmProperties(decorator,entityInfo.properties,entitySetName));
    EdmEntityType.Builder eet=EdmEntityType.newBuilder().setNamespace(namespace).setName(entityInfo.entityTypeName).addKeys(entityInfo.keys).setHasStream(entityInfo.hasStream).addProperties(properties);
    if (decorator != null) {
      eet.setDocumentation(decorator.getDocumentationForEntityType(namespace,entitySetName));
      eet.setAnnotations(decorator.getAnnotationsForEntityType(namespace,entitySetName));
    }
    EdmEntitySet.Builder ees=EdmEntitySet.newBuilder().setName(entitySetName).setEntityType(eet);
    entitySets.add(ees);
    entityTypes.add(eet);
  }
}

Fixed version (ground truth):
private void createStructuralEntities(EdmDecorator decorator,List<EdmEntitySet.Builder> entitySets,List<EdmEntityType.Builder> entityTypes){
  for (  String entitySetName : eis.keySet()) {
    InMemoryEntityInfo<?> entityInfo=eis.get(entitySetName);
    List<EdmProperty.Builder> properties=new ArrayList<EdmProperty.Builder>();
    properties.addAll(toEdmProperties(decorator,entityInfo.properties,entitySetName));
    EdmEntityType.Builder eet=EdmEntityType.newBuilder().setNamespace(namespace).setName(entityInfo.entityTypeName).addKeys(entityInfo.keys).setHasStream(entityInfo.hasStream).addProperties(properties);
    if (decorator != null) {
      eet.setDocumentation(decorator.getDocumentationForEntityType(namespace,entitySetName));
      eet.setAnnotations(decorator.getAnnotationsForEntityType(namespace,entitySetName));
    }
    EdmEntitySet.Builder ees=EdmEntitySet.newBuilder().setName(entitySetName).setEntityType(eet);
    entitySets.add(ees);
    entityTypes.add(eet);
  }
}
Program: 59588
Project: 59588
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public EntityResponse getEntity(String entitySetName,final OEntityKey entityKey,QueryInfo queryInfo){
  final EdmEntitySet ees=getMetadata().getEdmEntitySet(entitySetName);
  final InMemoryEntityInfo<?,?> ei=eis.get(entitySetName);
  final String[] keyList=ei.keys;
  Iterable<Object> iter=(Iterable<Object>)ei.get.apply();
  final Object rt=Enumerable.create(iter).firstOrNull(new Predicate1<Object>(){
    public boolean apply(    Object input){
      HashMap<String,Object> idObjectMap=ei.id.apply(input);
      if (keyList.length == 1) {
        Object idValue=entityKey.asSingleValue();
        return idObjectMap.get(keyList[0]).equals(idValue);
      }
 else       if (keyList.length > 1) {
        for (        String key : keyList) {
          Object curValue=null;
          Iterator<OProperty<?>> keyProps=entityKey.asComplexProperties().iterator();
          while (keyProps.hasNext()) {
            OProperty<?> keyProp=keyProps.next();
            if (keyProp.getName().equalsIgnoreCase(key)) {
              curValue=keyProp.getValue();
            }
          }
          if (curValue == null) {
            return false;
          }
 else           if (!idObjectMap.get(key).equals(curValue)) {
            return false;
          }
        }
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  if (rt == null)   throw new NotFoundException();
  OEntity oe=toOEntity(ees,rt,queryInfo.expand);
  return Responses.entity(oe);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public EntityResponse getEntity(String entitySetName,final OEntityKey entityKey,QueryInfo queryInfo){
  final EdmEntitySet ees=getMetadata().getEdmEntitySet(entitySetName);
  final InMemoryEntityInfo<?> ei=eis.get(entitySetName);
  final String[] keyList=ei.keys;
  Iterable<Object> iter=(Iterable<Object>)ei.get.apply();
  final Object rt=Enumerable.create(iter).firstOrNull(new Predicate1<Object>(){
    public boolean apply(    Object input){
      HashMap<String,Object> idObjectMap=ei.id.apply(input);
      if (keyList.length == 1) {
        Object idValue=entityKey.asSingleValue();
        return idObjectMap.get(keyList[0]).equals(idValue);
      }
 else       if (keyList.length > 1) {
        for (        String key : keyList) {
          Object curValue=null;
          Iterator<OProperty<?>> keyProps=entityKey.asComplexProperties().iterator();
          while (keyProps.hasNext()) {
            OProperty<?> keyProp=keyProps.next();
            if (keyProp.getName().equalsIgnoreCase(key)) {
              curValue=keyProp.getValue();
            }
          }
          if (curValue == null) {
            return false;
          }
 else           if (!idObjectMap.get(key).equals(curValue)) {
            return false;
          }
        }
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  if (rt == null)   throw new NotFoundException();
  OEntity oe=toOEntity(ees,rt,queryInfo.expand);
  return Responses.entity(oe);
}
Program: 59590
Project: 59590
Buggy source:
protected InMemoryEdmGenerator newEdmGenerator(String namespace,InMemoryTypeMapping typeMapping,String idPropName,Map<String,InMemoryEntityInfo<?,?>> eis){
  return new InMemoryEdmGenerator(namespace,typeMapping,ID_PROPNAME,eis);
}

Fixed version (ground truth):
protected InMemoryEdmGenerator newEdmGenerator(String namespace,InMemoryTypeMapping typeMapping,String idPropName,Map<String,InMemoryEntityInfo<?>> eis){
  return new InMemoryEdmGenerator(namespace,typeMapping,ID_PROPNAME,eis);
}
Program: 59591
Project: 59591
Buggy source:
public <TEntity,TKey>void register(final Class<TEntity> entityClass,final PropertyModel propertyModel,final String entitySetName,final String entityTypeName,final Func<Iterable<TEntity>> get,final String... keys){
  InMemoryEntityInfo<TEntity,TKey> ei=new InMemoryEntityInfo<TEntity,TKey>();
  ei.entitySetName=entitySetName;
  ei.entityTypeName=entityTypeName;
  ei.properties=propertyModel;
  ei.get=get;
  ei.keys=keys;
  ei.entityClass=entityClass;
  ei.hasStream=OAtomStreamEntity.class.isAssignableFrom(entityClass);
  ei.id=new Func1<Object,HashMap<String,Object>>(){
    @Override public HashMap<String,Object> apply(    Object input){
      HashMap<String,Object> values=new HashMap<String,Object>();
      for (      String key : keys) {
        values.put(key,eis.get(entitySetName).properties.getPropertyValue(input,key));
      }
      return values;
    }
  }
;
  eis.put(entitySetName,ei);
  metadata=null;
}

Fixed version (ground truth):
public <TEntity>void register(final Class<TEntity> entityClass,final PropertyModel propertyModel,final String entitySetName,final String entityTypeName,final Func<Iterable<TEntity>> get,final String... keys){
  InMemoryEntityInfo<TEntity> ei=new InMemoryEntityInfo<TEntity>();
  ei.entitySetName=entitySetName;
  ei.entityTypeName=entityTypeName;
  ei.properties=propertyModel;
  ei.get=get;
  ei.keys=keys;
  ei.entityClass=entityClass;
  ei.hasStream=OAtomStreamEntity.class.isAssignableFrom(entityClass);
  ei.id=new Func1<Object,HashMap<String,Object>>(){
    @Override public HashMap<String,Object> apply(    Object input){
      HashMap<String,Object> values=new HashMap<String,Object>();
      for (      String key : keys) {
        values.put(key,eis.get(entitySetName).properties.getPropertyValue(input,key));
      }
      return values;
    }
  }
;
  eis.put(entitySetName,ei);
  metadata=null;
}
Program: 59595
Project: 59595
Buggy source:
public ServerErrorException(String message){
  super(Response.status(501).entity(message).build());
}

Fixed version (ground truth):
public ServerErrorException(String message){
  super(Response.status(500).entity(message).build());
}
Program: 59596
Project: 59596
Buggy source:
@Override public EntitiesResponse getNavProperty(String entitySetName,OEntityKey entityKey,String navProp,QueryInfo queryInfo){
  throw new NotImplementedException();
}

Fixed version (ground truth):
@Override public BaseResponse getNavProperty(String entitySetName,OEntityKey entityKey,String navProp,QueryInfo queryInfo){
  throw new NotImplementedException();
}
Program: 59602
Project: 59602
Buggy source:
protected OCollection<? extends OObject> parseCollection(JsonStreamReader jsr){
  ensureNext(jsr);
  ensureStartArray(jsr.nextEvent());
  OCollection.Builder<OObject> c=newCollectionBuilder();
  FormatParser<? extends OObject> parser=createItemParser(this.returnType.getCollectionType());
  while (jsr.hasNext()) {
    if (parser instanceof JsonComplexObjectFormatParser) {
      OComplexObject obj=((JsonComplexObjectFormatParser)parser).parseSingleObject(jsr);
      if (null != obj) {
        c=c.add(obj);
      }
 else {
        break;
      }
    }
 else {
      throw new NotImplementedException("String_Node_Str" + this.returnType.getCollectionType().getFullyQualifiedTypeName() + "String_Node_Str");
    }
  }
  ensureEndArray(jsr.previousEvent());
  return c.build();
}

Fixed version (ground truth):
protected OCollection<? extends OObject> parseCollection(JsonStreamReader jsr){
  ensureNext(jsr);
  ensureStartArray(jsr.nextEvent());
  OCollection.Builder<OObject> c=newCollectionBuilder();
  if (this.returnType.getCollectionType().isSimple()) {
    parseCollectionOfSimple(c,jsr);
  }
 else {
    FormatParser<? extends OObject> parser=createItemParser(this.returnType.getCollectionType());
    while (jsr.hasNext()) {
      if (parser instanceof JsonComplexObjectFormatParser) {
        OComplexObject obj=((JsonComplexObjectFormatParser)parser).parseSingleObject(jsr);
        if (null != obj) {
          c=c.add(obj);
        }
 else {
          break;
        }
      }
 else {
        throw new NotImplementedException("String_Node_Str" + this.returnType.getCollectionType().getFullyQualifiedTypeName() + "String_Node_Str");
      }
    }
  }
  ensureEndArray(jsr.previousEvent());
  return c.build();
}
Program: 59603
Project: 59603
Buggy source:
protected FormatParser<? extends OObject> createItemParser(EdmType edmType){
  Settings s=new Settings(this.version,this.metadata,this.entitySetName,this.entityKey,null,false,edmType);
  return FormatParserFactory.getParser(OFunctionParameters.getResultClass(edmType),FormatType.JSON,s);
}

Fixed version (ground truth):
protected FormatParser<? extends OObject> createItemParser(EdmType edmType){
  if (edmType instanceof EdmNonSimpleType) {
    edmType=metadata.findEdmComplexType(edmType.getFullyQualifiedTypeName());
  }
  Settings s=new Settings(this.version,this.metadata,this.entitySetName,this.entityKey,null,false,edmType);
  return FormatParserFactory.getParser(OFunctionParameters.getResultClass(edmType),FormatType.JSON,s);
}
Program: 59604
Project: 59604
Buggy source:
protected OCollection.Builder<OObject> newCollectionBuilder(){
  if (this.returnType.getCollectionType() instanceof EdmComplexType) {
    return OCollections.<OObject>newBuilder(this.returnType.getCollectionType());
  }
  throw new NotImplementedException("String_Node_Str" + this.returnType.getCollectionType().getFullyQualifiedTypeName());
}

Fixed version (ground truth):
protected OCollection.Builder<OObject> newCollectionBuilder(){
  return OCollections.<OObject>newBuilder(this.returnType.getCollectionType());
}
Program: 59605
Project: 59605
Buggy source:
public JsonCollectionFormatParser(Settings s){
  super(s);
  returnType=(EdmCollectionType)(null == s ? null : s.parseType);
}

Fixed version (ground truth):
public JsonCollectionFormatParser(EdmCollectionType collectionType,EdmDataServices md){
  super(null);
  this.metadata=md;
  returnType=collectionType;
}
Program: 59606
Project: 59606
Buggy source:
public JsonComplexObjectFormatParser(Settings s){
  super(s);
  returnType=(EdmComplexType)(null == s ? null : s.parseType);
}

Fixed version (ground truth):
public JsonComplexObjectFormatParser(EdmComplexType type){
  super(null);
  returnType=type;
}
Program: 59607
Project: 59607
Buggy source:
public OComplexObject parseSingleObject(JsonStreamReader jsr){
  ensureNext(jsr);
  JsonEvent event=jsr.nextEvent();
  if (event.isStartObject()) {
    List<OProperty<?>> props=new ArrayList<OProperty<?>>();
    while (jsr.hasNext()) {
      event=jsr.nextEvent();
      if (event.isStartProperty()) {
        addProperty(props,event.asStartProperty().getName(),jsr);
      }
 else       if (event.isEndObject()) {
        break;
      }
 else {
        throw new JsonParseException("String_Node_Str" + event.toString());
      }
    }
    return OComplexObjects.create(returnType,props);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public OComplexObject parseSingleObject(JsonStreamReader jsr,JsonEvent startPropertyEvent){
  List<OProperty<?>> props=new ArrayList<OProperty<?>>();
  addProperty(props,startPropertyEvent.asStartProperty().getName(),jsr);
  return eatProps(props,jsr);
}
Program: 59608
Project: 59608
Buggy source:
public void setDeclaredNavigationProperties(Collection<EdmNavigationProperty> navProperties){
  this.navigationProperties.clear();
  this.navigationProperties.addAll(navProperties);
}

Fixed version (ground truth):
public void setDeclaredNavigationProperties(Enumerable<EdmNavigationProperty> navProperties){
  this.navigationProperties.clear();
  this.navigationProperties.addAll(navProperties.toList());
}
Program: 59610
Project: 59610
Buggy source:
private static Map<String,Class<?>> computeTypes(Map<String,Method> getters,Map<String,Method> setters){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  String propertyName : getters.keySet()) {
    Class<?> getterType=getters.get(propertyName).getReturnType();
    if (!isCollection(getterType))     rt.put(propertyName,getterType);
  }
  for (  String propertyName : setters.keySet()) {
    Class<?> getterType=rt.get(propertyName);
    if (getterType != null) {
      Class<?> setterType=setters.get(propertyName).getParameterTypes()[0];
      if (getterType != null && !getterType.equals(setterType))       throw new RuntimeException(String.format("String_Node_Str",propertyName,getterType.getName(),setterType.getName()));
      rt.put(propertyName,setterType);
    }
  }
  return rt;
}

Fixed version (ground truth):
private static Map<String,Class<?>> computeTypes(Map<String,Method> getters,Map<String,Method> setters){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  String propertyName : getters.keySet()) {
    Class<?> getterType=getters.get(propertyName).getReturnType();
    if (!isIterable(getterType))     rt.put(propertyName,getterType);
  }
  for (  String propertyName : setters.keySet()) {
    Class<?> getterType=rt.get(propertyName);
    if (getterType != null) {
      Class<?> setterType=setters.get(propertyName).getParameterTypes()[0];
      if (getterType != null && !getterType.equals(setterType))       throw new RuntimeException(String.format("String_Node_Str",setters.get(propertyName).getDeclaringClass().getName(),propertyName,getterType.getName(),setterType.getName()));
      rt.put(propertyName,setterType);
    }
  }
  return rt;
}
Program: 59611
Project: 59611
Buggy source:
private Map<String,Class<?>> computeCollections(Map<String,Method> getters2,Map<String,Method> setters2){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  String propertyName : getters.keySet()) {
    Class<?> getterType=getters.get(propertyName).getReturnType();
    if (isCollection(getterType)) {
      Class<?> setterType=setters.containsKey(propertyName) ? setters.get(propertyName).getParameterTypes()[0] : null;
      if (setterType != null) {
        if (!getterType.equals(setterType))         throw new RuntimeException(String.format("String_Node_Str",propertyName,getterType.getName(),setterType.getName()));
        Class<?> elementClass;
        Type type=getters.get(propertyName).getGenericReturnType();
        if (type instanceof ParameterizedType) {
          Type[] actualTypes=((ParameterizedType)type).getActualTypeArguments();
          elementClass=actualTypes.length > 0 ? (Class<?>)actualTypes[0] : Object.class;
        }
 else         elementClass=Object.class;
        rt.put(propertyName,elementClass);
      }
    }
  }
  return rt;
}

Fixed version (ground truth):
private Map<String,Class<?>> computeCollections(Map<String,Method> getters2,Map<String,Method> setters2){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  String propertyName : getters.keySet()) {
    Class<?> getterType=getters.get(propertyName).getReturnType();
    if (isIterable(getterType)) {
      Class<?> setterType=setters.containsKey(propertyName) ? setters.get(propertyName).getParameterTypes()[0] : null;
      if (setterType != null) {
        if (!getterType.equals(setterType))         throw new RuntimeException(String.format("String_Node_Str",setters.get(propertyName).getDeclaringClass().getName(),propertyName,getterType.getName(),setterType.getName()));
        Class<?> elementClass;
        Type type=getters.get(propertyName).getGenericReturnType();
        if (type instanceof ParameterizedType) {
          Type[] actualTypes=((ParameterizedType)type).getActualTypeArguments();
          elementClass=actualTypes.length > 0 ? (Class<?>)actualTypes[0] : Object.class;
        }
 else         elementClass=Object.class;
        rt.put(propertyName,elementClass);
      }
    }
  }
  return rt;
}
Program: 59614
Project: 59614
Buggy source:
private void createStructuralEntities(List<EdmEntitySet> entitySets,List<EdmEntityType> entityTypes){
  for (  String entitySetName : eis.keySet()) {
    EntityInfo<?,?> entityInfo=eis.get(entitySetName);
    List<EdmProperty> properties=new ArrayList<EdmProperty>();
    properties.add(new EdmProperty(ID_PROPNAME,getEdmType(entityInfo.keyClass),false,null,null,null,null,null,null,null,null,null,CollectionKind.None,null == this.decorator ? null : this.decorator.getDocumentationForProperty(namespace,entitySetName,ID_PROPNAME),null == this.decorator ? null : this.decorator.getAnnotationsForProperty(namespace,entitySetName,ID_PROPNAME)));
    properties.addAll(toEdmProperties(entityInfo.properties,entitySetName));
    EdmEntityType eet=new EdmEntityType(namespace,null,entitySetName,null,Enumerable.create(ID_PROPNAME).toList(),null,properties,null,null == this.decorator ? null : this.decorator.getDocumentationForEntityType(namespace,entitySetName),null == this.decorator ? null : this.decorator.getAnnotationsForEntityType(namespace,entitySetName));
    EdmEntitySet ees=new EdmEntitySet(entitySetName,eet);
    entitySets.add(ees);
    entityTypes.add(eet);
  }
}

Fixed version (ground truth):
private void createStructuralEntities(List<EdmEntitySet> entitySets,List<EdmEntityType> entityTypes){
  for (  String entitySetName : eis.keySet()) {
    EntityInfo<?,?> entityInfo=eis.get(entitySetName);
    List<EdmProperty> properties=new ArrayList<EdmProperty>();
    properties.addAll(toEdmProperties(entityInfo.properties,entitySetName));
    EdmEntityType eet=new EdmEntityType(namespace,null,entitySetName,null,Enumerable.create(ID_PROPNAME).toList(),null,properties,null,null == this.decorator ? null : this.decorator.getDocumentationForEntityType(namespace,entitySetName),null == this.decorator ? null : this.decorator.getAnnotationsForEntityType(namespace,entitySetName));
    EdmEntitySet ees=new EdmEntitySet(entitySetName,eet);
    entitySets.add(ees);
    entityTypes.add(eet);
  }
}
Program: 59616
Project: 59616
Buggy source:
/** 
 * Creates a new OFunctionParameter, inferring the edm-type from the value provided, which cannot be null.
 * @param < T >  the property value's java-type
 * @param name  the property name
 * @param value  the property value
 * @return a new OData property instance
 */
public static <T>OFunctionParameter create(String name,T value){
  if (value == null)   throw new IllegalArgumentException("String_Node_Str");
  if (value instanceof OObject) {
    return new FunctionParameterImpl(name,(OObject)value);
  }
  EdmType type=EdmSimpleType.forJavaType(value.getClass());
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str" + value.getClass().getName());
  }
  if (type instanceof EdmSimpleType) {
    return new FunctionParameterImpl(name,OSimpleObjects.create(value,(EdmSimpleType)type));
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + type.getFullyQualifiedTypeName());
  }
}

Fixed version (ground truth):
/** 
 * Creates a new OFunctionParameter, inferring the edm-type from the value provided, which cannot be null.
 * @param < T >  the property value's java-type
 * @param name  the property name
 * @param value  the property value
 * @return a new OData property instance
 */
public static <T>OFunctionParameter create(String name,T value){
  if (value == null)   throw new IllegalArgumentException("String_Node_Str");
  if (value instanceof OObject) {
    return new FunctionParameterImpl(name,(OObject)value);
  }
  EdmType type=EdmSimpleType.forJavaType(value.getClass());
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str" + value.getClass().getName());
  }
  return new FunctionParameterImpl(name,OSimpleObjects.create(value,(EdmSimpleType)type));
}
Program: 59617
Project: 59617
Buggy source:
@Override public String toString(){
  Object value=this.getValue();
  if (value instanceof byte[]) {
    value="String_Node_Str" + Hex.encodeHexString((byte[])value);
  }
  return String.format("String_Node_Str",getName(),getType(),value);
}

Fixed version (ground truth):
@Override public String toString(){
  Object value=this.getValue();
  if (value instanceof OSimpleObject<?>) {
    Object simpleValue=((OSimpleObject<?>)value).getValue();
    if (simpleValue instanceof byte[])     value="String_Node_Str" + Hex.encodeHexString((byte[])simpleValue);
  }
  return String.format("String_Node_Str",getName(),getType(),value);
}
Program: 59618
Project: 59618
Buggy source:
private static Object convert(Object val,EdmSimpleType type){
  Object v=val;
  if (type.equals(EdmSimpleType.INT16) && (!(val instanceof Short))) {
    v=new Short(((Number)val).shortValue());
  }
 else   if (type.equals(EdmSimpleType.SINGLE) && (!(val instanceof Float))) {
    v=new Float(((Number)val).floatValue());
  }
 else   if (type.equals(EdmSimpleType.BYTE) && (!(val instanceof Byte))) {
    v=new Byte(((Number)val).byteValue());
  }
  return v;
}

Fixed version (ground truth):
private static Object convert(Object val,EdmSimpleType type){
  Object v=val;
  if (type.equals(EdmSimpleType.INT16) && (!(val instanceof Short))) {
    v=Short.valueOf(((Number)val).shortValue());
  }
 else   if (type.equals(EdmSimpleType.SINGLE) && (!(val instanceof Float))) {
    v=new Float(((Number)val).floatValue());
  }
 else   if (type.equals(EdmSimpleType.BYTE) && (!(val instanceof Byte))) {
    v=Byte.valueOf(((Number)val).byteValue());
  }
  return v;
}
Program: 59620
Project: 59620
Buggy source:
@Override public boolean equals(Object rhso){
  if (!rhso.getClass().equals(Path.class)) {
    return false;
  }
  Path rhs=(Path)rhso;
  return spath.equals(rhs.spath);
}

Fixed version (ground truth):
@Override public boolean equals(Object rhso){
  if (rhso == null || !(rhso instanceof Path)) {
    return false;
  }
  Path rhs=(Path)rhso;
  return spath.equals(rhs.spath);
}
Program: 59621
Project: 59621
Buggy source:
private static Map<String,Class<?>> computeTypes(Map<String,Method> getters,Map<String,Method> setters){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  String propertyName : getters.keySet()) {
    Class<?> getterType=getters.get(propertyName).getReturnType();
    if (!isIterable(getterType))     rt.put(propertyName,getterType);
  }
  for (  String propertyName : setters.keySet()) {
    Class<?> getterType=rt.get(propertyName);
    if (getterType != null) {
      Class<?> setterType=setters.get(propertyName).getParameterTypes()[0];
      if (getterType != null && !getterType.equals(setterType))       throw new RuntimeException(String.format("String_Node_Str",setters.get(propertyName).getDeclaringClass().getName(),propertyName,getterType.getName(),setterType.getName()));
      rt.put(propertyName,setterType);
    }
  }
  return rt;
}

Fixed version (ground truth):
private static Map<String,Class<?>> computeTypes(Map<String,Method> getters,Map<String,Method> setters){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  Entry<String,Method> getter : getters.entrySet()) {
    Class<?> getterType=getter.getValue().getReturnType();
    if (!isIterable(getterType))     rt.put(getter.getKey(),getterType);
  }
  for (  Entry<String,Method> setter : setters.entrySet()) {
    String propertyName=setter.getKey();
    Class<?> getterType=rt.get(propertyName);
    if (getterType != null) {
      Class<?> setterType=setter.getValue().getParameterTypes()[0];
      if (getterType != null && !getterType.equals(setterType))       throw new RuntimeException(String.format("String_Node_Str",setters.get(propertyName).getDeclaringClass().getName(),propertyName,getterType.getName(),setterType.getName()));
      rt.put(propertyName,setterType);
    }
  }
  return rt;
}
Program: 59622
Project: 59622
Buggy source:
private Map<String,Class<?>> computeCollections(Map<String,Method> getters2,Map<String,Method> setters2){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  String propertyName : getters.keySet()) {
    Class<?> getterType=getters.get(propertyName).getReturnType();
    if (isIterable(getterType)) {
      Class<?> setterType=setters.containsKey(propertyName) ? setters.get(propertyName).getParameterTypes()[0] : null;
      if (setterType != null) {
        if (!getterType.equals(setterType))         throw new RuntimeException(String.format("String_Node_Str",setters.get(propertyName).getDeclaringClass().getName(),propertyName,getterType.getName(),setterType.getName()));
        Class<?> elementClass;
        Type type=getters.get(propertyName).getGenericReturnType();
        if (type instanceof ParameterizedType) {
          Type[] actualTypes=((ParameterizedType)type).getActualTypeArguments();
          elementClass=actualTypes.length > 0 ? (Class<?>)actualTypes[0] : Object.class;
        }
 else         elementClass=Object.class;
        rt.put(propertyName,elementClass);
      }
    }
  }
  return rt;
}

Fixed version (ground truth):
private Map<String,Class<?>> computeCollections(Map<String,Method> getters2,Map<String,Method> setters2){
  Map<String,Class<?>> rt=new HashMap<String,Class<?>>();
  for (  Entry<String,Method> getter : getters.entrySet()) {
    String propertyName=getter.getKey();
    Method method=getter.getValue();
    Class<?> getterType=method.getReturnType();
    if (isIterable(getterType)) {
      Class<?> setterType=setters.containsKey(propertyName) ? setters.get(propertyName).getParameterTypes()[0] : null;
      if (setterType != null) {
        if (!getterType.equals(setterType))         throw new RuntimeException(String.format("String_Node_Str",setters.get(propertyName).getDeclaringClass().getName(),propertyName,getterType.getName(),setterType.getName()));
        Class<?> elementClass;
        Type type=method.getGenericReturnType();
        if (type instanceof ParameterizedType) {
          Type[] actualTypes=((ParameterizedType)type).getActualTypeArguments();
          elementClass=actualTypes.length > 0 ? (Class<?>)actualTypes[0] : Object.class;
        }
 else         elementClass=Object.class;
        rt.put(propertyName,elementClass);
      }
    }
  }
  return rt;
}
Program: 59624
Project: 59624
Buggy source:
private static BatchBodyPart validateBodyPart(BatchBodyPart block){
  if (block.getHttpMethod() == null ? "String_Node_Str" == null : block.getHttpMethod().equals("String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (block.getUri() == null ? "String_Node_Str" == null : block.getUri().equals("String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return block;
}

Fixed version (ground truth):
private static BatchBodyPart validateBodyPart(BatchBodyPart block){
  if (block.getHttpMethod() == null ? "String_Node_Str" == null : block.getHttpMethod().toString().equals("String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (block.getUri() == null ? "String_Node_Str" == null : block.getUri().equals("String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return block;
}
Program: 59625
Project: 59625
Buggy source:
protected TemporalType getTemporalType(SingularAttribute<?,?> sa){
  Member member=sa.getJavaMember();
  Temporal temporal=null;
  if (member instanceof Field) {
    temporal=((Field)member).getAnnotation(Temporal.class);
  }
 else   if (member instanceof Method) {
    temporal=((Method)member).getAnnotation(Temporal.class);
  }
  return temporal.value();
}

Fixed version (ground truth):
protected TemporalType getTemporalType(SingularAttribute<?,?> sa){
  Member member=sa.getJavaMember();
  Temporal temporal=null;
  if (member instanceof Field) {
    temporal=((Field)member).getAnnotation(Temporal.class);
  }
 else   if (member instanceof Method) {
    temporal=((Method)member).getAnnotation(Temporal.class);
  }
  return temporal == null ? null : temporal.value();
}
Program: 59629
Project: 59629
Buggy source:
public static EdmDataServices parseMetadata(XMLEventReader2 reader){
  List<EdmSchema> schemas=new ArrayList<EdmSchema>();
  ODataVersion version=null;
  boolean foundDataServices=false;
  while (reader.hasNext()) {
    XMLEvent2 event=reader.nextEvent();
    boolean shouldReturn=false;
    if (isStartElement(event,EDMX_DATASERVICES)) {
      foundDataServices=true;
      String str=getAttributeValueIfExists(event.asStartElement(),new QName2(NS_METADATA,"String_Node_Str"));
      version=str != null ? ODataVersion.valueOf(str) : null;
    }
    if (isStartElement(event,EDM2006_SCHEMA,EDM2007_SCHEMA,EDM2008_SCHEMA,EDM2009_SCHEMA)) {
      schemas.add(parseEdmSchema(reader,event.asStartElement()));
      if (!foundDataServices)       shouldReturn=true;
    }
    if (isEndElement(event,EDMX_DATASERVICES))     shouldReturn=true;
    if (shouldReturn) {
      EdmDataServices rt=new EdmDataServices(version,schemas);
      resolve(rt);
      return rt;
    }
  }
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
public static EdmDataServices parseMetadata(XMLEventReader2 reader){
  List<EdmSchema> schemas=new ArrayList<EdmSchema>();
  ODataVersion version=null;
  boolean foundDataServices=false;
  while (reader.hasNext()) {
    XMLEvent2 event=reader.nextEvent();
    boolean shouldReturn=false;
    if (isStartElement(event,EDMX_DATASERVICES)) {
      foundDataServices=true;
      String str=getAttributeValueIfExists(event.asStartElement(),new QName2(NS_METADATA,"String_Node_Str"));
      version=str != null ? ODataVersion.parse(str) : null;
    }
    if (isStartElement(event,EDM2006_SCHEMA,EDM2007_SCHEMA,EDM2008_SCHEMA,EDM2009_SCHEMA)) {
      schemas.add(parseEdmSchema(reader,event.asStartElement()));
      if (!foundDataServices)       shouldReturn=true;
    }
    if (isEndElement(event,EDMX_DATASERVICES))     shouldReturn=true;
    if (shouldReturn) {
      EdmDataServices rt=new EdmDataServices(version,schemas);
      resolve(rt);
      return rt;
    }
  }
  throw new UnsupportedOperationException();
}
Program: 59633
Project: 59633
Buggy source:
public void insertEntityWithInlinedEntityJson(){
  insertEntityWithInlinedEntity(ODataConsumer.create(FormatType.JSON,endpointUri));
}

Fixed version (ground truth):
@Test public void insertEntityWithInlinedEntityJson(){
  insertEntityWithInlinedEntity(ODataConsumer.create(FormatType.JSON,endpointUri));
}
Program: 59634
Project: 59634
Buggy source:
public ODataClient(FormatType type,Class<F> feedClass,Class<E> entryClass,OClientBehavior... behaviors){
  this.feedClass=feedClass;
  this.entryClass=entryClass;
  this.behaviors=Enumerable.create(requiredBehaviors).concat(Enumerable.create(behaviors)).toArray(OClientBehavior.class);
  this.type=type;
  this.client=ClientUtil.newClient(behaviors);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public ODataClient(FormatType type,Class<?> feedClass,Class<?> entryClass,OClientBehavior... behaviors){
  this.feedClass=(Class<F>)feedClass;
  this.entryClass=(Class<E>)entryClass;
  this.behaviors=Enumerable.create(requiredBehaviors).concat(Enumerable.create(behaviors)).toArray(OClientBehavior.class);
  this.type=type;
  this.client=ClientUtil.newClient(behaviors);
}
Program: 59635
Project: 59635
Buggy source:
public OEntityRef<Void> deleteEntity(String entitySetName,Object... key){
  return createDeleteOEntityRefImpl(entitySetName,key);
}

Fixed version (ground truth):
public OEntityRef<Void> deleteEntity(String entitySetName,Object... key){
  FeedCustomizationMapping mapping=getFeedCustomizationMapping(entitySetName);
  return new OEntityRefImpl<Void,Feed<Entry>,Entry>(true,client,null,serviceRootUri,getMetadata(),entitySetName,key,mapping);
}
Program: 59636
Project: 59636
Buggy source:
public <T>OEntityRef<T> getEntity(Class<T> entityType,String entitySetName,Object... key){
  return createGetOEntityRefImpl(entityType,entitySetName,key);
}

Fixed version (ground truth):
public <T>OEntityRef<T> getEntity(Class<T> entityType,String entitySetName,Object... key){
  FeedCustomizationMapping mapping=getFeedCustomizationMapping(entitySetName);
  return new OEntityRefImpl<T,Feed<Entry>,Entry>(false,client,entityType,serviceRootUri,getMetadata(),entitySetName,key,mapping);
}
Program: 59637
Project: 59637
Buggy source:
public OCreate<OEntity> createEntity(String entitySetName){
  return createOCreateImpl(entitySetName);
}

Fixed version (ground truth):
public OCreate<OEntity> createEntity(String entitySetName){
  FeedCustomizationMapping mapping=getFeedCustomizationMapping(entitySetName);
  return new OCreateImpl<OEntity,Feed<Entry>,Entry>(client,serviceRootUri,getMetadata(),entitySetName,mapping);
}
Program: 59638
Project: 59638
Buggy source:
public OModify<OEntity> updateEntity(OEntity entity,String entitySetName,Object... key){
  return createOModifyImpl(entity,entitySetName,key);
}

Fixed version (ground truth):
public OModify<OEntity> updateEntity(OEntity entity,String entitySetName,Object... key){
  return new OModifyImpl<OEntity,Feed<Entry>,Entry>(entity,client,serviceRootUri,entitySetName,key);
}
Program: 59639
Project: 59639
Buggy source:
public <T>OQuery<T> getEntities(Class<T> entityType,String entitySetName){
  return createOQueryImpl(entityType,entitySetName);
}

Fixed version (ground truth):
public <T>OQuery<T> getEntities(Class<T> entityType,String entitySetName){
  FeedCustomizationMapping mapping=getFeedCustomizationMapping(entitySetName);
  return new OQueryImpl<T,Feed<Entry>,Entry>(client,entityType,serviceRootUri,getMetadata(),entitySetName,mapping);
}
Program: 59640
Project: 59640
Buggy source:
public OModify<OEntity> mergeEntity(String entitySetName,Object... key){
  return createOModifyImpl(null,entitySetName,key);
}

Fixed version (ground truth):
public OModify<OEntity> mergeEntity(String entitySetName,Object... key){
  return new OModifyImpl<OEntity,Feed<Entry>,Entry>(null,client,serviceRootUri,entitySetName,key);
}
Program: 59642
Project: 59642
Buggy source:
public static void main(String... args){
  ODataConsumer c=ODataConsumer.create(ODataEndpoints.NETFLIX);
  ODataConsumer.dump.all(true);
  int morganSpurlockId=c.getEntities("String_Node_Str").filter("String_Node_Str").execute().first().getProperty("String_Node_Str",Integer.class).getValue();
  List<OEntity> titlesActedIn=c.getEntities("String_Node_Str").nav(morganSpurlockId,"String_Node_Str").execute().toList();
  for (  OEntity title : titlesActedIn) {
    for (    OProperty<?> p : title.getProperties()) {
      report("String_Node_Str",p.getName(),p.getValue());
    }
    report("String_Node_Str");
    for (    OLink link : title.getLinks()) {
      System.out.println("String_Node_Str" + link);
    }
  }
  report("String_Node_Str" + titlesActedIn.size());
}

Fixed version (ground truth):
public static void main(String... args){
  ODataConsumer c=ODataConsumer.create(ODataEndpoints.NETFLIX);
  int morganSpurlockId=c.getEntities("String_Node_Str").filter("String_Node_Str").execute().first().getProperty("String_Node_Str",Integer.class).getValue();
  List<OEntity> titlesActedIn=c.getEntities("String_Node_Str").nav(morganSpurlockId,"String_Node_Str").execute().toList();
  for (  OEntity title : titlesActedIn) {
    for (    OProperty<?> p : title.getProperties()) {
      report("String_Node_Str",p.getName(),p.getValue());
    }
    report("String_Node_Str");
  }
  report("String_Node_Str" + titlesActedIn.size());
}