nus-yam/ex-repair huggingface dataset:
Program: 112216
Project: 112216
Buggy source:
/** 
 * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use   {@link #getIdPart()} toget just the ID portion.
 * @see #getIdPart()
 */
@Override public String getValue(){
  String retVal=super.getValue();
  if (retVal == null && myHaveComponentParts) {
    if (isLocal() || isUrn()) {
      return myUnqualifiedId;
    }
    StringBuilder b=new StringBuilder();
    if (isNotBlank(myBaseUrl)) {
      b.append(myBaseUrl);
      if (myBaseUrl.charAt(myBaseUrl.length() - 1) != '/') {
        b.append('/');
      }
    }
    if (isNotBlank(myResourceType)) {
      b.append(myResourceType);
    }
    if (b.length() > 0) {
      b.append('/');
    }
    b.append(myUnqualifiedId);
    if (isNotBlank(myUnqualifiedVersionId)) {
      b.append('/');
      b.append("String_Node_Str");
      b.append('/');
      b.append(myUnqualifiedVersionId);
    }
    retVal=b.toString();
    super.setValue(retVal);
  }
  return retVal;
}

Fixed version (ground truth):
/** 
 * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use   {@link #getIdPart()} toget just the ID portion.
 * @see #getIdPart()
 */
@Override public String getValue(){
  String retVal=super.getValue();
  if (retVal == null && myHaveComponentParts) {
    if (isLocal() || isUrn()) {
      return myUnqualifiedId;
    }
    StringBuilder b=new StringBuilder();
    if (isNotBlank(myBaseUrl)) {
      b.append(myBaseUrl);
      if (myBaseUrl.charAt(myBaseUrl.length() - 1) != '/') {
        b.append('/');
      }
    }
    if (isNotBlank(myResourceType)) {
      b.append(myResourceType);
    }
    if (b.length() > 0 && isNotBlank(myUnqualifiedId)) {
      b.append('/');
    }
    if (isNotBlank(myUnqualifiedId)) {
      b.append(myUnqualifiedId);
    }
 else     if (isNotBlank(myUnqualifiedVersionId)) {
      b.append('/');
    }
    if (isNotBlank(myUnqualifiedVersionId)) {
      b.append('/');
      b.append("String_Node_Str");
      b.append('/');
      b.append(myUnqualifiedVersionId);
    }
    retVal=b.toString();
    super.setValue(retVal);
  }
  return retVal;
}
Program: 112218
Project: 112218
Buggy source:
/** 
 * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use   {@link #getIdPart()} toget just the ID portion.
 * @see #getIdPart()
 */
@Override public String getValue(){
  String retVal=super.getValue();
  if (retVal == null && myHaveComponentParts) {
    if (isLocal() || isUrn()) {
      return myUnqualifiedId;
    }
    StringBuilder b=new StringBuilder();
    if (isNotBlank(myBaseUrl)) {
      b.append(myBaseUrl);
      if (myBaseUrl.charAt(myBaseUrl.length() - 1) != '/') {
        b.append('/');
      }
    }
    if (isNotBlank(myResourceType)) {
      b.append(myResourceType);
    }
    if (b.length() > 0) {
      b.append('/');
    }
    b.append(myUnqualifiedId);
    if (isNotBlank(myUnqualifiedVersionId)) {
      b.append('/');
      b.append("String_Node_Str");
      b.append('/');
      b.append(myUnqualifiedVersionId);
    }
    retVal=b.toString();
    super.setValue(retVal);
  }
  return retVal;
}

Fixed version (ground truth):
/** 
 * Returns the value of this ID. Note that this value may be a fully qualified URL, a relative/partial URL, or a simple ID. Use   {@link #getIdPart()} toget just the ID portion.
 * @see #getIdPart()
 */
@Override public String getValue(){
  String retVal=super.getValue();
  if (retVal == null && myHaveComponentParts) {
    if (isLocal() || isUrn()) {
      return myUnqualifiedId;
    }
    StringBuilder b=new StringBuilder();
    if (isNotBlank(myBaseUrl)) {
      b.append(myBaseUrl);
      if (myBaseUrl.charAt(myBaseUrl.length() - 1) != '/') {
        b.append('/');
      }
    }
    if (isNotBlank(myResourceType)) {
      b.append(myResourceType);
    }
    if (b.length() > 0 && isNotBlank(myUnqualifiedId)) {
      b.append('/');
    }
    if (isNotBlank(myUnqualifiedId)) {
      b.append(myUnqualifiedId);
    }
 else     if (isNotBlank(myUnqualifiedVersionId)) {
      b.append('/');
    }
    if (isNotBlank(myUnqualifiedVersionId)) {
      b.append('/');
      b.append("String_Node_Str");
      b.append('/');
      b.append(myUnqualifiedVersionId);
    }
    retVal=b.toString();
    super.setValue(retVal);
  }
  return retVal;
}
Program: 112221
Project: 112221
Buggy source:
@Test public void testUpdateFails(){
  Subscription subs=new Subscription();
  subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
  subs.setStatus(SubscriptionStatus.REQUESTED);
  subs.setCriteria("String_Node_Str");
  IIdType id=ourClient.create().resource(subs).execute().getId().toUnqualifiedVersionless();
  subs.setId(id);
  try {
    subs.setStatus(SubscriptionStatus.ACTIVE);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  try {
    subs.setStatus((SubscriptionStatus)null);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setStatus(SubscriptionStatus.OFF);
}

Fixed version (ground truth):
@Test public void testUpdateFails(){
  Subscription subs=new Subscription();
  subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
  subs.getChannel().setPayload("String_Node_Str");
  subs.getChannel().setEndpoint("String_Node_Str");
  subs.setStatus(SubscriptionStatus.REQUESTED);
  subs.setCriteria("String_Node_Str");
  IIdType id=ourClient.create().resource(subs).execute().getId().toUnqualifiedVersionless();
  subs.setId(id);
  try {
    subs.setStatus(SubscriptionStatus.ACTIVE);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  try {
    subs.setStatus((SubscriptionStatus)null);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setStatus(SubscriptionStatus.OFF);
}
Program: 112222
Project: 112222
Buggy source:
@Test public void testUpdateToInvalidStatus(){
  Subscription subs=new Subscription();
  subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
  subs.setCriteria("String_Node_Str");
  subs.setStatus(SubscriptionStatus.REQUESTED);
  IIdType id=ourClient.create().resource(subs).execute().getId();
  subs.setId(id);
  try {
    subs.setStatus(SubscriptionStatus.ACTIVE);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  try {
    subs.setStatus((SubscriptionStatus)null);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setStatus(SubscriptionStatus.OFF);
  ourClient.update().resource(subs).execute();
}

Fixed version (ground truth):
@Test public void testUpdateToInvalidStatus(){
  Subscription subs=new Subscription();
  subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
  subs.getChannel().setPayload("String_Node_Str");
  subs.getChannel().setEndpoint("String_Node_Str");
  subs.setCriteria("String_Node_Str");
  subs.setStatus(SubscriptionStatus.REQUESTED);
  IIdType id=ourClient.create().resource(subs).execute().getId();
  subs.setId(id);
  try {
    subs.setStatus(SubscriptionStatus.ACTIVE);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  try {
    subs.setStatus((SubscriptionStatus)null);
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setStatus(SubscriptionStatus.OFF);
  ourClient.update().resource(subs).execute();
}
Program: 112223
Project: 112223
Buggy source:
@Test public void testCreateInvalidNoStatus(){
  Subscription subs=new Subscription();
  subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
  subs.setCriteria("String_Node_Str");
  try {
    ourClient.create().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setId("String_Node_Str");
  try {
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setStatus(SubscriptionStatus.REQUESTED);
  ourClient.update().resource(subs).execute();
}

Fixed version (ground truth):
@Test public void testCreateInvalidNoStatus(){
  Subscription subs=new Subscription();
  subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
  subs.getChannel().setPayload("String_Node_Str");
  subs.getChannel().setEndpoint("String_Node_Str");
  subs.setCriteria("String_Node_Str");
  try {
    ourClient.create().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setId("String_Node_Str");
  try {
    ourClient.update().resource(subs).execute();
    fail();
  }
 catch (  UnprocessableEntityException e) {
    assertEquals("String_Node_Str",e.getMessage());
  }
  subs.setStatus(SubscriptionStatus.REQUESTED);
  ourClient.update().resource(subs).execute();
}
Program: 112225
Project: 112225
Buggy source:
@Override public Options getOptions(){
  Options options=new Options();
  addFhirVersionOption(options);
  options.addOption(OPTION_P,"String_Node_Str",true,"String_Node_Str" + DEFAULT_PORT + "String_Node_Str");
  options.addOption(null,OPTION_LOWMEM,false,"String_Node_Str");
  options.addOption(null,OPTION_ALLOW_EXTERNAL_REFS,false,"String_Node_Str");
  options.addOption(null,DISABLE_REFERENTIAL_INTEGRITY,false,"String_Node_Str");
  return options;
}

Fixed version (ground truth):
@Override public Options getOptions(){
  Options options=new Options();
  addFhirVersionOption(options);
  options.addOption(OPTION_P,"String_Node_Str",true,"String_Node_Str" + DEFAULT_PORT + "String_Node_Str");
  options.addOption(null,OPTION_LOWMEM,false,"String_Node_Str");
  options.addOption(null,OPTION_ALLOW_EXTERNAL_REFS,false,"String_Node_Str");
  options.addOption(null,OPTION_DISABLE_REFERENTIAL_INTEGRITY,false,"String_Node_Str");
  return options;
}
Program: 112228
Project: 112228
Buggy source:
@Override protected void validateSealed(){
  if (!mySealed) {
synchronized (myContext) {
      sealAndInitialize(myContext,myClassToElementDefinitions);
    }
  }
}

Fixed version (ground truth):
@Override protected void validateSealed(){
  if (!mySealed) {
synchronized (myContext) {
      if (!mySealed) {
        sealAndInitialize(myContext,myClassToElementDefinitions);
      }
    }
  }
}
Program: 112229
Project: 112229
Buggy source:
@Override public boolean elementIsRepeating(String theChildName){
  try {
    BaseRuntimeChildDefinition child=myDefinition.getChildByNameOrThrowDataFormatException(theChildName);
    return child.getMax() > 1 || child.getMax() == Child.MAX_UNLIMITED;
  }
 catch (  DataFormatException e) {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean elementIsRepeating(String theChildName){
  BaseRuntimeChildDefinition child=myDefinition.getChildByName(theChildName);
  if (child == null) {
    return false;
  }
  return child.getMax() > 1 || child.getMax() == Child.MAX_UNLIMITED;
}
Program: 112230
Project: 112230
Buggy source:
@Override protected void validateSealed(){
  if (!mySealed) {
synchronized (myContext) {
      sealAndInitialize(myContext,myClassToElementDefinitions);
    }
  }
}

Fixed version (ground truth):
@Override protected void validateSealed(){
  if (!mySealed) {
synchronized (myContext) {
      if (!mySealed) {
        sealAndInitialize(myContext,myClassToElementDefinitions);
      }
    }
  }
}
Program: 112231
Project: 112231
Buggy source:
@Override protected void doInTransactionWithoutResult(TransactionStatus theArg0){
  if (mySearch.getId() == null) {
    doSaveSearch();
  }
  List<SearchResult> resultsToSave=Lists.newArrayList();
  for (  Long nextPid : myUnsyncedPids) {
    SearchResult nextResult=new SearchResult(mySearch);
    nextResult.setResourcePid(nextPid);
    nextResult.setOrder(myCountSaved++);
    resultsToSave.add(nextResult);
  }
  mySearchResultDao.save(resultsToSave);
synchronized (mySyncedPids) {
    int numSyncedThisPass=myUnsyncedPids.size();
    ourLog.info("String_Node_Str",numSyncedThisPass);
    mySyncedPids.addAll(myUnsyncedPids);
    myUnsyncedPids.clear();
    if (theResultIter.hasNext() == false) {
      mySearch.setStatus(SearchStatusEnum.FINISHED);
      mySearch.setTotalCount(myCountSaved);
      for (      CountDownLatch next : myResultSizeLatch) {
        while (next.getCount() > 0) {
          next.countDown();
        }
      }
    }
 else {
      if (myResultSizeLatch.isEmpty() == false) {
        for (        CountDownLatch next : myResultSizeLatch) {
          for (int i=0; i < numSyncedThisPass; i++) {
            next.countDown();
          }
        }
      }
    }
  }
  mySearch.setNumFound(myCountSaved);
  doSaveSearch();
}

Fixed version (ground truth):
@Override protected void doInTransactionWithoutResult(TransactionStatus theArg0){
  if (mySearch.getId() == null) {
    doSaveSearch();
  }
  List<SearchResult> resultsToSave=Lists.newArrayList();
  for (  Long nextPid : myUnsyncedPids) {
    SearchResult nextResult=new SearchResult(mySearch);
    nextResult.setResourcePid(nextPid);
    nextResult.setOrder(myCountSaved++);
    resultsToSave.add(nextResult);
  }
  mySearchResultDao.save(resultsToSave);
synchronized (mySyncedPids) {
    int numSyncedThisPass=myUnsyncedPids.size();
    ourLog.trace("String_Node_Str",numSyncedThisPass);
    mySyncedPids.addAll(myUnsyncedPids);
    myUnsyncedPids.clear();
    if (theResultIter.hasNext() == false) {
      mySearch.setStatus(SearchStatusEnum.FINISHED);
      mySearch.setTotalCount(myCountSaved);
      for (      CountDownLatch next : myResultSizeLatch) {
        while (next.getCount() > 0) {
          next.countDown();
        }
      }
    }
 else {
      if (myResultSizeLatch.isEmpty() == false) {
        for (        CountDownLatch next : myResultSizeLatch) {
          for (int i=0; i < numSyncedThisPass; i++) {
            next.countDown();
          }
        }
      }
    }
  }
  mySearch.setNumFound(myCountSaved);
  doSaveSearch();
}
Program: 112234
Project: 112234
Buggy source:
public List<Long> getResourcePids(int theFromIndex,int theToIndex){
  ourLog.info("String_Node_Str",theFromIndex,theToIndex);
  CountDownLatch latch=null;
synchronized (mySyncedPids) {
    if (mySyncedPids.size() < theToIndex && mySearch.getStatus() == SearchStatusEnum.LOADING) {
      int latchSize=theToIndex - mySyncedPids.size();
      ourLog.info("String_Node_Str",latchSize,theToIndex);
      latch=new CountDownLatch(latchSize);
      myResultSizeLatch.add(latch);
    }
  }
  if (latch != null) {
    while (latch.getCount() > 0 && mySearch.getStatus() == SearchStatusEnum.LOADING) {
      try {
        ourLog.trace("String_Node_Str",latch.getCount());
        latch.await(500,TimeUnit.MILLISECONDS);
      }
 catch (      InterruptedException e) {
      }
    }
  }
  ArrayList<Long> retVal=new ArrayList<Long>();
synchronized (mySyncedPids) {
    verifySearchHasntFailedOrThrowInternalErrorException(mySearch);
    int toIndex=theToIndex;
    if (mySyncedPids.size() < toIndex) {
      toIndex=mySyncedPids.size();
    }
    for (int i=theFromIndex; i < toIndex; i++) {
      retVal.add(mySyncedPids.get(i));
    }
  }
  return retVal;
}

Fixed version (ground truth):
public List<Long> getResourcePids(int theFromIndex,int theToIndex){
  ourLog.info("String_Node_Str",theFromIndex,theToIndex);
  CountDownLatch latch=null;
synchronized (mySyncedPids) {
    if (mySyncedPids.size() < theToIndex && mySearch.getStatus() == SearchStatusEnum.LOADING) {
      int latchSize=theToIndex - mySyncedPids.size();
      ourLog.trace("String_Node_Str",latchSize,theToIndex);
      latch=new CountDownLatch(latchSize);
      myResultSizeLatch.add(latch);
    }
  }
  if (latch != null) {
    while (latch.getCount() > 0 && mySearch.getStatus() == SearchStatusEnum.LOADING) {
      try {
        ourLog.trace("String_Node_Str",latch.getCount());
        latch.await(500,TimeUnit.MILLISECONDS);
      }
 catch (      InterruptedException e) {
      }
    }
  }
  ArrayList<Long> retVal=new ArrayList<Long>();
synchronized (mySyncedPids) {
    verifySearchHasntFailedOrThrowInternalErrorException(mySearch);
    int toIndex=theToIndex;
    if (mySyncedPids.size() < toIndex) {
      toIndex=mySyncedPids.size();
    }
    for (int i=theFromIndex; i < toIndex; i++) {
      retVal.add(mySyncedPids.get(i));
    }
  }
  return retVal;
}
Program: 112235
Project: 112235
Buggy source:
@Override public Search doInTransaction(TransactionStatus theStatus){
  return mySearchDao.findByUuid(theUuid);
}

Fixed version (ground truth):
@Override public List<Long> doInTransaction(TransactionStatus theStatus){
  final List<Long> resultPids=new ArrayList<Long>();
  Page<SearchResult> searchResults=mySearchResultDao.findWithSearchUuid(foundSearch,page);
  for (  SearchResult next : searchResults) {
    resultPids.add(next.getResourcePid());
  }
  return resultPids;
}
Program: 112236
Project: 112236
Buggy source:
public void awaitInitialSync(){
  ourLog.info("String_Node_Str");
  do {
    try {
      if (myInitialCollectionLatch.await(250,TimeUnit.MILLISECONDS)) {
        break;
      }
    }
 catch (    InterruptedException e) {
      throw new InternalErrorException(e);
    }
  }
 while (mySearch.getStatus() == SearchStatusEnum.LOADING);
  ourLog.info("String_Node_Str");
}

Fixed version (ground truth):
public void awaitInitialSync(){
  ourLog.trace("String_Node_Str");
  do {
    try {
      if (myInitialCollectionLatch.await(250,TimeUnit.MILLISECONDS)) {
        break;
      }
    }
 catch (    InterruptedException e) {
      throw new InternalErrorException(e);
    }
  }
 while (mySearch.getStatus() == SearchStatusEnum.LOADING);
  ourLog.trace("String_Node_Str");
}
Program: 112237
Project: 112237
Buggy source:
public static ParserBase makeParser(IWorkerContext context,FhirFormat format){
switch (format) {
case JSON:
    return new JsonParser(context);
case XML:
  return new XmlParser(context);
}
return null;
}

Fixed version (ground truth):
public static ParserBase makeParser(IWorkerContext context,FhirFormat format){
switch (format) {
case JSON:
    return new JsonParser(context);
case XML:
  return new XmlParser(context);
default :
throw new IllegalArgumentException("String_Node_Str" + format);
}
}
Program: 112240
Project: 112240
Buggy source:
public static Integer findParamAnnotationIndex(Method theMethod,Class<?> toFind){
  int paramIndex=0;
  for (  Annotation[] annotations : theMethod.getParameterAnnotations()) {
    for (int annotationIndex=0; annotationIndex < annotations.length; annotationIndex++) {
      Annotation nextAnnotation=annotations[annotationIndex];
      Class<? extends Annotation> class1=nextAnnotation.getClass();
      if (toFind.isAssignableFrom(class1)) {
        return paramIndex;
      }
    }
    paramIndex++;
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static Integer findParamAnnotationIndex(Method theMethod,Class<?> toFind){
  int paramIndex=0;
  for (  Annotation[] annotations : theMethod.getParameterAnnotations()) {
    for (int annotationIndex=0; annotationIndex < annotations.length; annotationIndex++) {
      Annotation nextAnnotation=annotations[annotationIndex];
      Class<? extends Annotation> class1=nextAnnotation.getClass();
      if (toFind.isAssignableFrom(class1)) {
        return paramIndex;
      }
    }
    paramIndex++;
  }
  return null;
}
Program: 112242
Project: 112242
Buggy source:
public Date getLowerBoundAsInstant(){
  if (myLowerBound == null) {
    return null;
  }
  Date retVal=myLowerBound.getValue();
  if (myLowerBound.getPrefix() != null) {
switch (myLowerBound.getPrefix()) {
case GREATERTHAN:
      retVal=myLowerBound.getPrecision().add(retVal,1);
    break;
case EQUAL:
case GREATERTHAN_OR_EQUALS:
  break;
case LESSTHAN:
case LESSTHAN_OR_EQUALS:
throw new IllegalStateException("String_Node_Str" + myLowerBound.getPrefix());
}
}
return retVal;
}

Fixed version (ground truth):
public Date getLowerBoundAsInstant(){
  if (myLowerBound == null) {
    return null;
  }
  Date retVal=myLowerBound.getValue();
  if (myLowerBound.getPrefix() != null) {
switch (myLowerBound.getPrefix()) {
case GREATERTHAN:
      retVal=myLowerBound.getPrecision().add(retVal,1);
    break;
case EQUAL:
case GREATERTHAN_OR_EQUALS:
  break;
case LESSTHAN:
case APPROXIMATE:
case LESSTHAN_OR_EQUALS:
case ENDS_BEFORE:
case NOT_EQUAL:
case STARTS_AFTER:
throw new IllegalStateException("String_Node_Str" + myLowerBound.getPrefix());
}
}
return retVal;
}
Program: 112243
Project: 112243
Buggy source:
public Date getUpperBoundAsInstant(){
  if (myUpperBound == null) {
    return null;
  }
  Date retVal=myUpperBound.getValue();
  if (myUpperBound.getPrefix() != null) {
switch (myUpperBound.getPrefix()) {
case LESSTHAN:
      retVal=new Date(retVal.getTime() - 1L);
    break;
case EQUAL:
case LESSTHAN_OR_EQUALS:
  retVal=myUpperBound.getPrecision().add(retVal,1);
retVal=new Date(retVal.getTime() - 1L);
break;
case GREATERTHAN_OR_EQUALS:
case GREATERTHAN:
throw new IllegalStateException("String_Node_Str" + myUpperBound.getPrefix());
}
}
return retVal;
}

Fixed version (ground truth):
public Date getUpperBoundAsInstant(){
  if (myUpperBound == null) {
    return null;
  }
  Date retVal=myUpperBound.getValue();
  if (myUpperBound.getPrefix() != null) {
switch (myUpperBound.getPrefix()) {
case LESSTHAN:
      retVal=new Date(retVal.getTime() - 1L);
    break;
case EQUAL:
case LESSTHAN_OR_EQUALS:
  retVal=myUpperBound.getPrecision().add(retVal,1);
retVal=new Date(retVal.getTime() - 1L);
break;
case GREATERTHAN_OR_EQUALS:
case GREATERTHAN:
case APPROXIMATE:
case ENDS_BEFORE:
case NOT_EQUAL:
case STARTS_AFTER:
throw new IllegalStateException("String_Node_Str" + myUpperBound.getPrefix());
}
}
return retVal;
}
Program: 112245
Project: 112245
Buggy source:
@Override public Verdict applyRule(RestOperationTypeEnum theOperation,RequestDetails theRequestDetails,IBaseResource theInputResource,IIdType theInputResourceId,IBaseResource theOutputResource,IRuleApplier theRuleApplier){
  if (theInputResourceId != null) {
    return null;
  }
  if (theOperation == myOperationType) {
switch (myAppliesTo) {
case ALL_RESOURCES:
      break;
case TYPES:
    if (theInputResource == null || !myAppliesToTypes.contains(theInputResource.getClass())) {
      return null;
    }
  break;
}
if (theRequestDetails.getConditionalUrl(myOperationType) == null) {
return null;
}
return newVerdict();
}
return null;
}

Fixed version (ground truth):
@Override public Verdict applyRule(RestOperationTypeEnum theOperation,RequestDetails theRequestDetails,IBaseResource theInputResource,IIdType theInputResourceId,IBaseResource theOutputResource,IRuleApplier theRuleApplier){
  if (theInputResourceId != null) {
    return null;
  }
  if (theOperation == myOperationType) {
switch (myAppliesTo) {
case ALL_RESOURCES:
case INSTANCES:
      break;
case TYPES:
    if (theInputResource == null || !myAppliesToTypes.contains(theInputResource.getClass())) {
      return null;
    }
  break;
}
if (theRequestDetails.getConditionalUrl(myOperationType) == null) {
return null;
}
return newVerdict();
}
return null;
}
Program: 112246
Project: 112246
Buggy source:
@Override public void contextInitialized(ServletContextEvent theSce){
  theSce.getServletContext().setInitParameter(ContextLoader.CONTEXT_CLASS_PARAM,AnnotationConfigWebApplicationContext.class.getName());
switch (ContextHolder.getCtx().getVersion().getVersion()) {
case DSTU2:
    theSce.getServletContext().setInitParameter(ContextLoader.CONFIG_LOCATION_PARAM,FhirServerConfig.class.getName());
  break;
case DSTU3:
theSce.getServletContext().setInitParameter(ContextLoader.CONFIG_LOCATION_PARAM,FhirServerConfigDstu3.class.getName());
break;
}
cll.contextInitialized(theSce);
}

Fixed version (ground truth):
@Override public void contextInitialized(ServletContextEvent theSce){
  theSce.getServletContext().setInitParameter(ContextLoader.CONTEXT_CLASS_PARAM,AnnotationConfigWebApplicationContext.class.getName());
switch (ContextHolder.getCtx().getVersion().getVersion()) {
case DSTU2:
    theSce.getServletContext().setInitParameter(ContextLoader.CONFIG_LOCATION_PARAM,FhirServerConfig.class.getName());
  break;
case DSTU3:
theSce.getServletContext().setInitParameter(ContextLoader.CONFIG_LOCATION_PARAM,FhirServerConfigDstu3.class.getName());
break;
case DSTU1:
case DSTU2_1:
case DSTU2_HL7ORG:
break;
}
cll.contextInitialized(theSce);
}
Program: 112250
Project: 112250
Buggy source:
private Predicate createCompositeParamPart(CriteriaBuilder builder,Root<ResourceTable> from,RuntimeSearchParam left,IQueryParameterType leftValue){
  Predicate retVal=null;
switch (left.getParamType()) {
case STRING:
{
      From<ResourceIndexedSearchParamString,ResourceIndexedSearchParamString> stringJoin=from.join("String_Node_Str",JoinType.INNER);
      retVal=createPredicateString(leftValue,left.getName(),builder,stringJoin);
      break;
    }
case TOKEN:
{
    From<ResourceIndexedSearchParamToken,ResourceIndexedSearchParamToken> tokenJoin=from.join("String_Node_Str",JoinType.INNER);
    retVal=createPredicateToken(leftValue,left.getName(),builder,tokenJoin);
    break;
  }
case DATE:
{
  From<ResourceIndexedSearchParamDate,ResourceIndexedSearchParamDate> dateJoin=from.join("String_Node_Str",JoinType.INNER);
  retVal=createPredicateDate(builder,dateJoin,leftValue);
  break;
}
case QUANTITY:
{
From<ResourceIndexedSearchParamQuantity,ResourceIndexedSearchParamQuantity> dateJoin=from.join("String_Node_Str",JoinType.INNER);
retVal=createPredicateQuantity(builder,dateJoin,leftValue);
break;
}
}
if (retVal == null) {
throw new InvalidRequestException("String_Node_Str" + left.getParamType());
}
return retVal;
}

Fixed version (ground truth):
private Predicate createCompositeParamPart(CriteriaBuilder builder,Root<ResourceTable> from,RuntimeSearchParam left,IQueryParameterType leftValue){
  Predicate retVal=null;
switch (left.getParamType()) {
case STRING:
{
      From<ResourceIndexedSearchParamString,ResourceIndexedSearchParamString> stringJoin=from.join("String_Node_Str",JoinType.INNER);
      retVal=createPredicateString(leftValue,left.getName(),builder,stringJoin);
      break;
    }
case TOKEN:
{
    From<ResourceIndexedSearchParamToken,ResourceIndexedSearchParamToken> tokenJoin=from.join("String_Node_Str",JoinType.INNER);
    retVal=createPredicateToken(leftValue,left.getName(),builder,tokenJoin);
    break;
  }
case DATE:
{
  From<ResourceIndexedSearchParamDate,ResourceIndexedSearchParamDate> dateJoin=from.join("String_Node_Str",JoinType.INNER);
  retVal=createPredicateDate(builder,dateJoin,leftValue);
  break;
}
case QUANTITY:
{
From<ResourceIndexedSearchParamQuantity,ResourceIndexedSearchParamQuantity> dateJoin=from.join("String_Node_Str",JoinType.INNER);
retVal=createPredicateQuantity(builder,dateJoin,leftValue);
break;
}
case COMPOSITE:
case HAS:
case NUMBER:
case REFERENCE:
case URI:
break;
}
if (retVal == null) {
throw new InvalidRequestException("String_Node_Str" + left.getParamType());
}
return retVal;
}
Program: 112252
Project: 112252
Buggy source:
private IBaseResource loadAndAddConf(HttpServletRequest theServletRequest,final HomeRequest theRequest,final ModelMap theModel){
switch (theRequest.getFhirVersion(myConfig)) {
case DSTU1:
    return loadAndAddConfDstu1(theServletRequest,theRequest,theModel);
case DSTU2:
  return loadAndAddConfDstu2(theServletRequest,theRequest,theModel);
case DSTU3:
return loadAndAddConfDstu3(theServletRequest,theRequest,theModel);
}
throw new IllegalStateException("String_Node_Str" + theRequest.getFhirVersion(myConfig));
}

Fixed version (ground truth):
private IBaseResource loadAndAddConf(HttpServletRequest theServletRequest,final HomeRequest theRequest,final ModelMap theModel){
switch (theRequest.getFhirVersion(myConfig)) {
case DSTU1:
    return loadAndAddConfDstu1(theServletRequest,theRequest,theModel);
case DSTU2:
  return loadAndAddConfDstu2(theServletRequest,theRequest,theModel);
case DSTU3:
return loadAndAddConfDstu3(theServletRequest,theRequest,theModel);
case DSTU2_1:
case DSTU2_HL7ORG:
break;
}
throw new IllegalStateException("String_Node_Str" + theRequest.getFhirVersion(myConfig));
}
Program: 112254
Project: 112254
Buggy source:
protected StructureDefinition getDefinition(int line,int col,String name) throws FHIRFormatError {
  if (name == null) {
    logError(line,col,name,IssueType.STRUCTURE,"String_Node_Str",IssueSeverity.FATAL);
    return null;
  }
  for (  StructureDefinition sd : context.allStructures()) {
    if (name.equals(sd.getId())) {
      return sd;
    }
  }
  logError(line,col,name,IssueType.STRUCTURE,"String_Node_Str" + name + "String_Node_Str",IssueSeverity.FATAL);
  return null;
}

Fixed version (ground truth):
protected StructureDefinition getDefinition(int line,int col,String name) throws FHIRFormatError {
  if (name == null) {
    logError(line,col,name,IssueType.STRUCTURE,"String_Node_Str",IssueSeverity.FATAL);
    return null;
  }
  for (  StructureDefinition sd : context.allStructures()) {
    if (name.equals(sd.getIdElement().getIdPart())) {
      return sd;
    }
  }
  logError(line,col,name,IssueType.STRUCTURE,"String_Node_Str" + name + "String_Node_Str",IssueSeverity.FATAL);
  return null;
}
Program: 112255
Project: 112255
Buggy source:
/** 
 * Search for Patient resources matching a given family name
 */
@Search public IBundleProvider search(@RequiredParam(name=Patient.SP_FAMILY) StringParam theFamily){
  final InstantDt searchTime=InstantDt.withCurrentTime();
  final List<Long> matchingResourceIds=null;
  return new IBundleProvider(){
    @Override public int size(){
      return matchingResourceIds.size();
    }
    @Override public List<IBaseResource> getResources(    int theFromIndex,    int theToIndex){
      int end=Math.max(theToIndex,matchingResourceIds.size() - 1);
      List<Long> idsToReturn=matchingResourceIds.subList(theFromIndex,end);
      return loadResourcesByIds(idsToReturn);
    }
    @Override public InstantDt getPublished(){
      return searchTime;
    }
    @Override public Integer preferredPageSize(){
      return null;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Search for Patient resources matching a given family name
 */
@Search public IBundleProvider search(@RequiredParam(name=Patient.SP_FAMILY) StringParam theFamily){
  final InstantDt searchTime=InstantDt.withCurrentTime();
  final List<Long> matchingResourceIds=null;
  return new IBundleProvider(){
    @Override public int size(){
      return matchingResourceIds.size();
    }
    @Override public List<IBaseResource> getResources(    int theFromIndex,    int theToIndex){
      int end=Math.max(theToIndex,matchingResourceIds.size() - 1);
      List<Long> idsToReturn=matchingResourceIds.subList(theFromIndex,end);
      return loadResourcesByIds(idsToReturn);
    }
    @Override public InstantDt getPublished(){
      return searchTime;
    }
    @Override public Integer preferredPageSize(){
      return null;
    }
    @Override public String getUuid(){
      return null;
    }
  }
;
}
Program: 112256
Project: 112256
Buggy source:
@Override public InstantDt getPublished(){
  return resources.getPublished();
}

Fixed version (ground truth):
@Override public IPrimitiveType<Date> getPublished(){
  return resources.getPublished();
}
Program: 112258
Project: 112258
Buggy source:
/** 
 * Load the given collection of resources by index, plus any additional resources per the server's processing rules (e.g. _include'd resources, OperationOutcome, etc.). For example, if the method is invoked with index 0,10 the method might return 10 search results, plus an  additional 20 resources which matched a client's _include specification.
 * @param theFromIndex The low index (inclusive) to return
 * @param theToIndex The high index (exclusive) to return
 * @return A list of resources. The size of this list must be at least <code>theToIndex - theFromIndex</code>.
 */
List<IBaseResource> getResources(int theFromIndex,int theToIndex);

Fixed version (ground truth):
/** 
 * Load the given collection of resources by index, plus any additional resources per the server's processing rules (e.g. _include'd resources, OperationOutcome, etc.). For example, if the method is invoked with index 0,10 the method might return 10 search results, plus an additional 20 resources which matched a client's _include specification.
 * @param theFromIndex The low index (inclusive) to return
 * @param theToIndex The high index (exclusive) to return
 * @return A list of resources. The size of this list must be at least <code>theToIndex - theFromIndex</code>.
 */
List<IBaseResource> getResources(int theFromIndex,int theToIndex);
Program: 112259
Project: 112259
Buggy source:
/** 
 * Returns the UUID associated with this search. Note that this does not need to return a non-null value unless it a  {@link IPagingProvider} is being used that requires UUIDsbeing returned. <p> Otherwise you may simply return  {@code null}</p>
 */
public String getUuid();

Fixed version (ground truth):
/** 
 * Returns the UUID associated with this search. Note that this does not need to return a non-null value unless it a  {@link IPagingProvider} is being used that requires UUIDsbeing returned. <p> In other words, if you are using the default  {@link FifoMemoryPagingProvider} inyour server, it is fine for this method to simply return  {@code null} since {@link FifoMemoryPagingProvider}does not use the value anyhow. On the other hand, if you are creating a custom [@code IPagingProvider} implementation you might use this method to communicate the search ID back to the provider. </p>
 */
public String getUuid();
Program: 112260
Project: 112260
Buggy source:
/** 
 * Returns the instant as of which this result was valid
 */
InstantDt getPublished();

Fixed version (ground truth):
/** 
 * Returns the instant as of which this result was valid
 */
IPrimitiveType<Date> getPublished();
Program: 112261
Project: 112261
Buggy source:
@Search(queryName="String_Node_Str") public IBundleProvider searchWithBundleProvider(){
  return new IBundleProvider(){
    @Override public InstantDt getPublished(){
      return ourReturnPublished;
    }
    @Override public List<IBaseResource> getResources(    int theFromIndex,    int theToIndex){
      throw new IllegalStateException();
    }
    @Override public Integer preferredPageSize(){
      return null;
    }
    @Override public int size(){
      return 0;
    }
  }
;
}

Fixed version (ground truth):
@Search(queryName="String_Node_Str") public IBundleProvider searchWithBundleProvider(){
  return new IBundleProvider(){
    @Override public InstantDt getPublished(){
      return ourReturnPublished;
    }
    @Override public List<IBaseResource> getResources(    int theFromIndex,    int theToIndex){
      throw new IllegalStateException();
    }
    @Override public Integer preferredPageSize(){
      return null;
    }
    @Override public int size(){
      return 0;
    }
    @Override public String getUuid(){
      return null;
    }
  }
;
}
Program: 112263
Project: 112263
Buggy source:
public void setRestfulServer(RestfulServer theRestfulServer){
  myServerConfiguration=theRestfulServer.createConfiguration();
}

Fixed version (ground truth):
@Override public void setRestfulServer(RestfulServer theRestfulServer){
  myServerConfiguration=theRestfulServer.createConfiguration();
}
Program: 112264
Project: 112264
Buggy source:
@Test public void testSearchReferenceParameterWithList() throws Exception {
  RestfulServer rsNoType=new RestfulServer(ourCtx);
  rsNoType.registerProvider(new SearchProviderWithListNoType());
  ServerConformanceProvider sc=new ServerConformanceProvider(rsNoType);
  rsNoType.setServerConformanceProvider(sc);
  rsNoType.init(createServletConfig());
  Conformance conformance=sc.getServerConformance(createHttpServletRequest());
  String confNoType=ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance);
  ourLog.info(confNoType);
  RestfulServer rsWithType=new RestfulServer(ourCtx);
  rsWithType.registerProvider(new SearchProviderWithListWithType());
  ServerConformanceProvider scWithType=new ServerConformanceProvider(rsWithType);
  rsWithType.setServerConformanceProvider(scWithType);
  rsWithType.init(createServletConfig());
  Conformance conformanceWithType=scWithType.getServerConformance(createHttpServletRequest());
  String confWithType=ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformanceWithType);
  ourLog.info(confWithType);
  assertEquals(confNoType,confWithType);
}

Fixed version (ground truth):
@Test public void testSearchReferenceParameterWithList() throws Exception {
  RestfulServer rsNoType=new RestfulServer(ourCtx);
  rsNoType.registerProvider(new SearchProviderWithListNoType());
  ServerConformanceProvider scNoType=new ServerConformanceProvider(rsNoType);
  rsNoType.setServerConformanceProvider(scNoType);
  rsNoType.init(createServletConfig());
  scNoType.getServerConfiguration().setConformanceDate("String_Node_Str");
  Conformance conformance=scNoType.getServerConformance(createHttpServletRequest());
  String confNoType=ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance);
  ourLog.info(confNoType);
  RestfulServer rsWithType=new RestfulServer(ourCtx);
  rsWithType.registerProvider(new SearchProviderWithListWithType());
  ServerConformanceProvider scWithType=new ServerConformanceProvider(rsWithType);
  rsWithType.setServerConformanceProvider(scWithType);
  rsWithType.init(createServletConfig());
  scWithType.getServerConfiguration().setConformanceDate("String_Node_Str");
  Conformance conformanceWithType=scWithType.getServerConformance(createHttpServletRequest());
  String confWithType=ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformanceWithType);
  ourLog.info(confWithType);
  assertEquals(confNoType,confWithType);
}
Program: 112266
Project: 112266
Buggy source:
private Pageable toPage(int theFromIndex,int theToIndex){
  int pageSize=theToIndex - theFromIndex;
  if (pageSize < 1) {
    return null;
  }
  int pageIndex=theFromIndex / pageSize;
  Pageable page=new PageRequest(pageIndex,pageSize);
  return page;
}

Fixed version (ground truth):
public static Pageable toPage(final int theFromIndex,int theToIndex){
  int pageSize=theToIndex - theFromIndex;
  if (pageSize < 1) {
    return null;
  }
  int pageIndex=theFromIndex / pageSize;
  Pageable page=new PageRequest(pageIndex,pageSize){
    private static final long serialVersionUID=1L;
    @Override public int getOffset(){
      return theFromIndex;
    }
  }
;
  return page;
}
Program: 112269
Project: 112269
Buggy source:
@Test public void testParseWithTrailingContent() throws Exception {
  String bundle="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  Bundle b=ourCtx.newJsonParser().parseResource(Bundle.class,bundle);
}

Fixed version (ground truth):
@Test(expected=DataFormatException.class) public void testParseWithTrailingContent() throws Exception {
  String bundle="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  Bundle b=ourCtx.newJsonParser().parseResource(Bundle.class,bundle);
}
Program: 112270
Project: 112270
Buggy source:
@Override public CodeValidationResult validateCode(FhirContext theContext,String theCodeSystem,String theCode,String theDisplay){
  CodeSystem cs=fetchCodeSystem(theContext,theCodeSystem);
  if (cs != null) {
    for (    ConceptDefinitionComponent next : cs.getConcept()) {
      if (next.getCode().equals(theCode)) {
        return new CodeValidationResult(next);
      }
    }
  }
  return new CodeValidationResult(IssueSeverity.INFORMATION,"String_Node_Str" + theCodeSystem + "String_Node_Str"+ theCode);
}

Fixed version (ground truth):
@Override public CodeValidationResult validateCode(FhirContext theContext,String theCodeSystem,String theCode,String theDisplay){
  CodeSystem cs=fetchCodeSystem(theContext,theCodeSystem);
  if (cs != null) {
    CodeValidationResult retVal=testIfConceptIsInList(theCode,cs.getConcept());
    if (retVal != null) {
      return retVal;
    }
  }
  return new CodeValidationResult(IssueSeverity.INFORMATION,"String_Node_Str" + theCodeSystem + "String_Node_Str"+ theCode);
}
Program: 112271
Project: 112271
Buggy source:
public boolean isEmpty(){
  return super.isEmpty() && (use == null || use.isEmpty()) && (text == null || text.isEmpty())&& (family == null || family.isEmpty())&& (given == null || given.isEmpty())&& (prefix == null || prefix.isEmpty())&& (suffix == null || suffix.isEmpty())&& (period == null || period.isEmpty());
}

Fixed version (ground truth):
public boolean isEmpty(){
  return super.isEmpty() && ElementUtil.isEmpty(use,text,family,given,prefix,suffix,period);
}
Program: 112275
Project: 112275
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public <R extends IBaseResource>R toResource(Class<R> theResourceType,BaseHasResource theEntity,boolean theForHistoryOperation){
  String resourceText=null;
switch (theEntity.getEncoding()) {
case JSON:
    try {
      resourceText=new String(theEntity.getResource(),"String_Node_Str");
    }
 catch (    UnsupportedEncodingException e) {
      throw new Error("String_Node_Str",e);
    }
  break;
case JSONC:
resourceText=GZipUtil.decompress(theEntity.getResource());
break;
}
IParser parser=theEntity.getEncoding().newParser(getContext(theEntity.getFhirVersion()));
R retVal;
try {
retVal=parser.parseResource(theResourceType,resourceText);
}
 catch (Exception e) {
StringBuilder b=new StringBuilder();
b.append("String_Node_Str");
b.append(theResourceType);
b.append("String_Node_Str");
b.append(theEntity.getIdDt().getIdPart());
b.append("String_Node_Str");
b.append(theEntity.getId());
b.append("String_Node_Str");
b.append(myContext.getVersion().getVersion());
b.append("String_Node_Str");
b.append(e.getMessage());
String msg=b.toString();
ourLog.error(msg,e);
throw new DataFormatException(msg,e);
}
if (retVal instanceof IResource) {
IResource res=(IResource)retVal;
retVal=populateResourceMetadataHapi(theResourceType,theEntity,theForHistoryOperation,res);
}
 else {
IAnyResource res=(IAnyResource)retVal;
retVal=populateResourceMetadataRi(theResourceType,theEntity,theForHistoryOperation,res);
}
return retVal;
}

Fixed version (ground truth):
@Override public <R extends IBaseResource>R toResource(Class<R> theResourceType,BaseHasResource theEntity,boolean theForHistoryOperation){
  String resourceText=null;
switch (theEntity.getEncoding()) {
case JSON:
    try {
      resourceText=new String(theEntity.getResource(),"String_Node_Str");
    }
 catch (    UnsupportedEncodingException e) {
      throw new Error("String_Node_Str",e);
    }
  break;
case JSONC:
resourceText=GZipUtil.decompress(theEntity.getResource());
break;
}
IParser parser=theEntity.getEncoding().newParser(getContext(theEntity.getFhirVersion()));
R retVal;
try {
retVal=parser.parseResource(theResourceType,resourceText);
}
 catch (Exception e) {
StringBuilder b=new StringBuilder();
b.append("String_Node_Str");
b.append(theResourceType);
b.append("String_Node_Str");
b.append(theEntity.getIdDt().getIdPart());
b.append("String_Node_Str");
b.append(theEntity.getId());
b.append("String_Node_Str");
b.append(myContext.getVersion().getVersion());
b.append("String_Node_Str");
b.append(e.getMessage());
String msg=b.toString();
ourLog.error(msg,e);
throw new DataFormatException(msg,e);
}
if (retVal instanceof IResource) {
IResource res=(IResource)retVal;
retVal=populateResourceMetadataHapi(theResourceType,theEntity,theForHistoryOperation,res);
}
 else {
IAnyResource res=(IAnyResource)retVal;
retVal=populateResourceMetadataRi(theResourceType,theEntity,theForHistoryOperation,res);
}
return retVal;
}
Program: 112276
Project: 112276
Buggy source:
/** 
 * Subclasses may override to provide behaviour. Called when a resource has been inserved into the database for the first time.
 * @param theEntity The entity being updated (Do not modify the entity! Undefined behaviour will occur!)
 * @param theTag The tag
 * @return Returns <code>true</code> if the tag should be removed
 * @see <a href="http://hl7.org/fhir/2015Sep/resource.html#1.11.3.7">Updates to Tags, Profiles, and Security Labels</a> for a description of the logic that the default behaviour folows.
 */
protected void postPersist(ResourceTable theEntity,T theResource){
}

Fixed version (ground truth):
/** 
 * Subclasses may override to provide behaviour. Called when a resource has been inserved into the database for the first time.
 * @param theEntity The entity being updated (Do not modify the entity! Undefined behaviour will occur!)
 * @param theTag The tag
 * @return Returns <code>true</code> if the tag should be removed
 * @see <a href="http://hl7.org/fhir/2015Sep/resource.html#1.11.3.7">Updates to Tags, Profiles, and Security Labels</a> for a description of the logic that the default behaviour folows.
 */
@SuppressWarnings("String_Node_Str") protected void postPersist(ResourceTable theEntity,T theResource){
}
Program: 112277
Project: 112277
Buggy source:
public BaseHasResource readEntity(IIdType theValueId){
  throw new NotImplementedException("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @CoverageIgnore public BaseHasResource readEntity(IIdType theValueId){
  throw new NotImplementedException("String_Node_Str");
}
Program: 112278
Project: 112278
Buggy source:
@Test public void testIndexContained(){
  Patient p=new Patient();
  p.setId("String_Node_Str");
  p.addName().addFamily("String_Node_Str").addGiven("String_Node_Str");
  Observation o1=new Observation();
  o1.getCode().setText("String_Node_Str");
  o1.setSubject(new Reference(p));
  IIdType oid1=myObservationDao.create(o1).getId().toUnqualifiedVersionless();
  Observation o2=new Observation();
  o2.getCode().setText("String_Node_Str");
  o2.setSubject(new Reference(p));
  IIdType oid2=myObservationDao.create(o2).getId().toUnqualifiedVersionless();
  Patient p2=new Patient();
  p2.addName().addFamily("String_Node_Str").addGiven("String_Node_Str");
  IIdType pid2=myPatientDao.create(p2).getId().toUnqualifiedVersionless();
  ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(o2));
  SearchParameterMap map;
}

Fixed version (ground truth):
@Test public void testIndexContained(){
  Patient p=new Patient();
  p.setId("String_Node_Str");
  p.addName().addFamily("String_Node_Str").addGiven("String_Node_Str");
  Observation o1=new Observation();
  o1.getCode().setText("String_Node_Str");
  o1.setSubject(new Reference(p));
  IIdType oid1=myObservationDao.create(o1,new ServletRequestDetails()).getId().toUnqualifiedVersionless();
  Observation o2=new Observation();
  o2.getCode().setText("String_Node_Str");
  o2.setSubject(new Reference(p));
  IIdType oid2=myObservationDao.create(o2,new ServletRequestDetails()).getId().toUnqualifiedVersionless();
  Patient p2=new Patient();
  p2.addName().addFamily("String_Node_Str").addGiven("String_Node_Str");
  IIdType pid2=myPatientDao.create(p2,new ServletRequestDetails()).getId().toUnqualifiedVersionless();
  ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(o2));
  SearchParameterMap map;
}