Program: 112322
Project: 112322
Buggy source:
protected List<ResourceIndexedSearchParamString> extractSearchParamStrings(ResourceTable theEntity,IResource theResource){
  ArrayList<ResourceIndexedSearchParamString> retVal=new ArrayList<ResourceIndexedSearchParamString>();
  RuntimeResourceDefinition def=getContext().getResourceDefinition(theResource);
  FhirTerser t=getContext().newTerser();
  for (  RuntimeSearchParam nextSpDef : def.getSearchParams()) {
    if (nextSpDef.getParamType() != SearchParamTypeEnum.STRING) {
      continue;
    }
    if (nextSpDef.getPath().isEmpty()) {
      continue;
    }
    String nextPath=nextSpDef.getPath();
    List<Object> values=t.getValues(theResource,nextPath);
    for (    Object nextObject : values) {
      if (nextObject == null || ((IDatatype)nextObject).isEmpty()) {
        continue;
      }
      String resourceName=nextSpDef.getName();
      boolean multiType=false;
      if (nextPath.endsWith("String_Node_Str")) {
        multiType=true;
      }
      if (nextObject instanceof IPrimitiveDatatype<?>) {
        IPrimitiveDatatype<?> nextValue=(IPrimitiveDatatype<?>)nextObject;
        String searchTerm=nextValue.getValueAsString();
        if (searchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) {
          searchTerm=searchTerm.substring(0,ResourceIndexedSearchParamString.MAX_LENGTH);
        }
        ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(searchTerm),searchTerm);
        nextEntity.setResource(theEntity);
        retVal.add(nextEntity);
      }
 else {
        if (nextObject instanceof HumanNameDt) {
          ArrayList<StringDt> allNames=new ArrayList<StringDt>();
          HumanNameDt nextHumanName=(HumanNameDt)nextObject;
          allNames.addAll(nextHumanName.getFamily());
          allNames.addAll(nextHumanName.getGiven());
          for (          StringDt nextName : allNames) {
            if (nextName.isEmpty()) {
              continue;
            }
            ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(nextName.getValueAsString()),nextName.getValueAsString());
            nextEntity.setResource(theEntity);
            retVal.add(nextEntity);
          }
        }
 else         if (nextObject instanceof AddressDt) {
          ArrayList<StringDt> allNames=new ArrayList<StringDt>();
          AddressDt nextAddress=(AddressDt)nextObject;
          allNames.addAll(nextAddress.getLine());
          allNames.add(nextAddress.getCity());
          allNames.add(nextAddress.getState());
          allNames.add(nextAddress.getCountry());
          allNames.add(nextAddress.getZip());
          for (          StringDt nextName : allNames) {
            if (nextName.isEmpty()) {
              continue;
            }
            ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(nextName.getValueAsString()),nextName.getValueAsString());
            nextEntity.setResource(theEntity);
            retVal.add(nextEntity);
          }
        }
 else         if (nextObject instanceof ContactDt) {
          ContactDt nextContact=(ContactDt)nextObject;
          if (nextContact.getValue().isEmpty() == false) {
            ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(nextContact.getValue().getValueAsString()),nextContact.getValue().getValueAsString());
            nextEntity.setResource(theEntity);
            retVal.add(nextEntity);
          }
        }
 else {
          if (!multiType) {
            throw new ConfigurationException("String_Node_Str" + resourceName + "String_Node_Str"+ nextObject.getClass());
          }
        }
      }
    }
  }
  theEntity.setParamsStringPopulated(retVal.size() > 0);
  return retVal;
}

Fixed version (ground truth):
protected List<ResourceIndexedSearchParamString> extractSearchParamStrings(ResourceTable theEntity,IResource theResource){
  ArrayList<ResourceIndexedSearchParamString> retVal=new ArrayList<ResourceIndexedSearchParamString>();
  RuntimeResourceDefinition def=getContext().getResourceDefinition(theResource);
  FhirTerser t=getContext().newTerser();
  for (  RuntimeSearchParam nextSpDef : def.getSearchParams()) {
    if (nextSpDef.getParamType() != SearchParamTypeEnum.STRING) {
      continue;
    }
    String nextPath=nextSpDef.getPath();
    if (isBlank(nextPath)) {
      continue;
    }
    List<Object> values=t.getValues(theResource,nextPath);
    for (    Object nextObject : values) {
      if (nextObject == null || ((IDatatype)nextObject).isEmpty()) {
        continue;
      }
      String resourceName=nextSpDef.getName();
      boolean multiType=false;
      if (nextPath.endsWith("String_Node_Str")) {
        multiType=true;
      }
      if (nextObject instanceof IPrimitiveDatatype<?>) {
        IPrimitiveDatatype<?> nextValue=(IPrimitiveDatatype<?>)nextObject;
        String searchTerm=nextValue.getValueAsString();
        if (searchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) {
          searchTerm=searchTerm.substring(0,ResourceIndexedSearchParamString.MAX_LENGTH);
        }
        ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(searchTerm),searchTerm);
        nextEntity.setResource(theEntity);
        retVal.add(nextEntity);
      }
 else {
        if (nextObject instanceof HumanNameDt) {
          ArrayList<StringDt> allNames=new ArrayList<StringDt>();
          HumanNameDt nextHumanName=(HumanNameDt)nextObject;
          allNames.addAll(nextHumanName.getFamily());
          allNames.addAll(nextHumanName.getGiven());
          for (          StringDt nextName : allNames) {
            if (nextName.isEmpty()) {
              continue;
            }
            ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(nextName.getValueAsString()),nextName.getValueAsString());
            nextEntity.setResource(theEntity);
            retVal.add(nextEntity);
          }
        }
 else         if (nextObject instanceof AddressDt) {
          ArrayList<StringDt> allNames=new ArrayList<StringDt>();
          AddressDt nextAddress=(AddressDt)nextObject;
          allNames.addAll(nextAddress.getLine());
          allNames.add(nextAddress.getCity());
          allNames.add(nextAddress.getState());
          allNames.add(nextAddress.getCountry());
          allNames.add(nextAddress.getZip());
          for (          StringDt nextName : allNames) {
            if (nextName.isEmpty()) {
              continue;
            }
            ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(nextName.getValueAsString()),nextName.getValueAsString());
            nextEntity.setResource(theEntity);
            retVal.add(nextEntity);
          }
        }
 else         if (nextObject instanceof ContactDt) {
          ContactDt nextContact=(ContactDt)nextObject;
          if (nextContact.getValue().isEmpty() == false) {
            ResourceIndexedSearchParamString nextEntity=new ResourceIndexedSearchParamString(resourceName,normalizeString(nextContact.getValue().getValueAsString()),nextContact.getValue().getValueAsString());
            nextEntity.setResource(theEntity);
            retVal.add(nextEntity);
          }
        }
 else {
          if (!multiType) {
            throw new ConfigurationException("String_Node_Str" + resourceName + "String_Node_Str"+ nextObject.getClass());
          }
        }
      }
    }
  }
  theEntity.setParamsStringPopulated(retVal.size() > 0);
  return retVal;
}