Program: 112326
Project: 112326
Buggy source:
protected ArrayList<ResourceIndexedSearchParamNumber> extractSearchParamNumber(ResourceTable theEntity,IResource theResource){
  ArrayList<ResourceIndexedSearchParamNumber> retVal=new ArrayList<ResourceIndexedSearchParamNumber>();
  RuntimeResourceDefinition def=getContext().getResourceDefinition(theResource);
  FhirTerser t=getContext().newTerser();
  for (  RuntimeSearchParam nextSpDef : def.getSearchParams()) {
    if (nextSpDef.getParamType() != SearchParamTypeEnum.NUMBER) {
      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 DurationDt) {
        DurationDt nextValue=(DurationDt)nextObject;
        if (nextValue.getValue().isEmpty()) {
          continue;
        }
        if (new UriDt(UCUM_NS).equals(nextValue.getSystem())) {
          if (isNotBlank(nextValue.getCode().getValue())) {
            Unit<? extends Quantity> unit=Unit.valueOf(nextValue.getCode().getValue());
            javax.measure.converter.UnitConverter dayConverter=unit.getConverterTo(NonSI.DAY);
            double dayValue=dayConverter.convert(nextValue.getValue().getValue().doubleValue());
            DurationDt newValue=new DurationDt();
            newValue.setSystem(UCUM_NS);
            newValue.setCode(NonSI.DAY.toString());
            newValue.setValue(dayValue);
            nextValue=newValue;
          }
        }
        ResourceIndexedSearchParamNumber nextEntity=new ResourceIndexedSearchParamNumber(resourceName,nextValue.getValue().getValue());
        nextEntity.setResource(theEntity);
        retVal.add(nextEntity);
      }
 else       if (nextObject instanceof QuantityDt) {
        QuantityDt nextValue=(QuantityDt)nextObject;
        if (nextValue.getValue().isEmpty()) {
          continue;
        }
        ResourceIndexedSearchParamNumber nextEntity=new ResourceIndexedSearchParamNumber(resourceName,nextValue.getValue().getValue());
        nextEntity.setResource(theEntity);
        retVal.add(nextEntity);
      }
 else {
        if (!multiType) {
          throw new ConfigurationException("String_Node_Str" + resourceName + "String_Node_Str"+ nextObject.getClass());
        }
 else {
          continue;
        }
      }
    }
  }
  theEntity.setParamsNumberPopulated(retVal.size() > 0);
  return retVal;
}

Fixed version (ground truth):
protected ArrayList<ResourceIndexedSearchParamNumber> extractSearchParamNumber(ResourceTable theEntity,IResource theResource){
  ArrayList<ResourceIndexedSearchParamNumber> retVal=new ArrayList<ResourceIndexedSearchParamNumber>();
  RuntimeResourceDefinition def=getContext().getResourceDefinition(theResource);
  FhirTerser t=getContext().newTerser();
  for (  RuntimeSearchParam nextSpDef : def.getSearchParams()) {
    if (nextSpDef.getParamType() != SearchParamTypeEnum.NUMBER) {
      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 DurationDt) {
        DurationDt nextValue=(DurationDt)nextObject;
        if (nextValue.getValue().isEmpty()) {
          continue;
        }
        if (new UriDt(UCUM_NS).equals(nextValue.getSystem())) {
          if (isNotBlank(nextValue.getCode().getValue())) {
            Unit<? extends Quantity> unit=Unit.valueOf(nextValue.getCode().getValue());
            javax.measure.converter.UnitConverter dayConverter=unit.getConverterTo(NonSI.DAY);
            double dayValue=dayConverter.convert(nextValue.getValue().getValue().doubleValue());
            DurationDt newValue=new DurationDt();
            newValue.setSystem(UCUM_NS);
            newValue.setCode(NonSI.DAY.toString());
            newValue.setValue(dayValue);
            nextValue=newValue;
          }
        }
        ResourceIndexedSearchParamNumber nextEntity=new ResourceIndexedSearchParamNumber(resourceName,nextValue.getValue().getValue());
        nextEntity.setResource(theEntity);
        retVal.add(nextEntity);
      }
 else       if (nextObject instanceof QuantityDt) {
        QuantityDt nextValue=(QuantityDt)nextObject;
        if (nextValue.getValue().isEmpty()) {
          continue;
        }
        ResourceIndexedSearchParamNumber nextEntity=new ResourceIndexedSearchParamNumber(resourceName,nextValue.getValue().getValue());
        nextEntity.setResource(theEntity);
        retVal.add(nextEntity);
      }
 else {
        if (!multiType) {
          throw new ConfigurationException("String_Node_Str" + resourceName + "String_Node_Str"+ nextObject.getClass());
        }
 else {
          continue;
        }
      }
    }
  }
  theEntity.setParamsNumberPopulated(retVal.size() > 0);
  return retVal;
}