Program: 23385
Project: 23385
Buggy source:
@Override public ValueSetExpansionOutcome expand(ValueSet source,ExpansionProfile profile){
  if (profile == null)   profile=makeDefaultExpansion();
  try {
    focus=source.copy();
    focus.setExpansion(new ValueSet.ValueSetExpansionComponent());
    focus.getExpansion().setTimestampElement(DateTimeType.now());
    focus.getExpansion().setIdentifier(Factory.createUUID());
    if (!profile.getUrl().startsWith("String_Node_Str"))     focus.getExpansion().addParameter().setName("String_Node_Str").setValue(new UriType(profile.getUrl()));
    if (source.hasCompose())     handleCompose(source.getCompose(),focus.getExpansion().getParameter(),profile);
    if (canBeHeirarchy) {
      for (      ValueSetExpansionContainsComponent c : roots) {
        focus.getExpansion().getContains().add(c);
      }
    }
 else {
      for (      ValueSetExpansionContainsComponent c : codes) {
        if (map.containsKey(key(c)) && !c.getAbstract()) {
          focus.getExpansion().getContains().add(c);
          c.getContains().clear();
        }
      }
    }
    if (total > 0) {
      focus.getExpansion().setTotal(total);
    }
    return new ValueSetExpansionOutcome(focus);
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  NoTerminologyServiceException e) {
    return new ValueSetExpansionOutcome(new ValueSetCheckerSimple(source,factory,context),e.getMessage(),ExpansionErrorClass.NOSERVICE);
  }
catch (  Exception e) {
    return new ValueSetExpansionOutcome(new ValueSetCheckerSimple(source,factory,context),e.getMessage(),ExpansionErrorClass.UNKNOWN);
  }
}

Fixed version (ground truth):
@Override public ValueSetExpansionOutcome expand(ValueSet source,ExpansionProfile profile){
  if (profile == null)   profile=makeDefaultExpansion();
  try {
    focus=source.copy();
    focus.setExpansion(new ValueSet.ValueSetExpansionComponent());
    focus.getExpansion().setTimestampElement(DateTimeType.now());
    focus.getExpansion().setIdentifier(Factory.createUUID());
    if (!profile.getUrl().startsWith("String_Node_Str"))     focus.getExpansion().addParameter().setName("String_Node_Str").setValue(new UriType(profile.getUrl()));
    if (source.hasCompose())     handleCompose(source.getCompose(),focus.getExpansion().getParameter(),profile);
    if (canBeHeirarchy) {
      for (      ValueSetExpansionContainsComponent c : roots) {
        focus.getExpansion().getContains().add(c);
      }
    }
 else {
      for (      ValueSetExpansionContainsComponent c : codes) {
        if (map.containsKey(key(c)) && !c.getAbstract()) {
          focus.getExpansion().getContains().add(c);
          c.getContains().clear();
        }
      }
    }
    if (total > 0) {
      focus.getExpansion().setTotal(total);
    }
    return new ValueSetExpansionOutcome(focus);
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  NoTerminologyServiceException e) {
    return new ValueSetExpansionOutcome(new ValueSetCheckerSimple(source,factory,context),e.getMessage(),TerminologyServiceErrorClass.NOSERVICE);
  }
catch (  Exception e) {
    return new ValueSetExpansionOutcome(new ValueSetCheckerSimple(source,factory,context),e.getMessage(),TerminologyServiceErrorClass.UNKNOWN);
  }
}