nus-yam/ex-repair huggingface dataset:
Program: 23217
Project: 23217
Buggy source:
public org.hl7.fhir.dstu2.model.ReferralRequest convertReferralRequest(org.hl7.fhir.r4.model.ReferralRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ReferralRequest tgt=new org.hl7.fhir.dstu2.model.ReferralRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertReferralStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setPriority(convertReferralPriorityCode(src.getPriority()));
  tgt.setPatient(convertReference(src.getSubject()));
  tgt.setFulfillmentTime(convertPeriod(src.getOccurrencePeriod()));
  tgt.setRequester(convertReference(src.getRequester().getAgent()));
  tgt.setSpecialty(convertCodeableConcept(src.getSpecialty()));
  for (  org.hl7.fhir.r4.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  for (  org.hl7.fhir.r4.model.CodeableConcept cc : src.getReasonCode())   tgt.setReason(convertCodeableConcept(cc));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceRequested())   tgt.addServiceRequested(convertCodeableConcept(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getSupportingInfo())   tgt.addSupportingInformation(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.r4.model.ProcedureRequest convertReferralRequest(org.hl7.fhir.dstu2.model.ReferralRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.r4.model.ProcedureRequest tgt=new org.hl7.fhir.r4.model.ProcedureRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertReferralStatus(src.getStatus()));
  tgt.setCode(convertCodeableConcept(src.getType()));
  tgt.setPriority(convertReferralPriorityCode(src.getPriority()));
  tgt.setSubject(convertReference(src.getPatient()));
  tgt.setOccurrence(convertPeriod(src.getFulfillmentTime()));
  tgt.getRequester().setAgent(convertReference(src.getRequester()));
  tgt.addReasonCode(convertCodeableConcept(src.getReason()));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInfo(convertReference(t));
  return tgt;
}
Program: 23218
Project: 23218
Buggy source:
public org.hl7.fhir.dstu2.model.MessageHeader convertMessageHeader(org.hl7.fhir.r4.model.MessageHeader src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MessageHeader tgt=new org.hl7.fhir.dstu2.model.MessageHeader();
  copyDomainResource(src,tgt);
  tgt.setTimestamp(src.getTimestamp());
  tgt.setEvent(convertCoding(src.getEvent()));
  tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse()));
  tgt.setSource(convertMessageSourceComponent(src.getSource()));
  for (  org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination())   tgt.addDestination(convertMessageDestinationComponent(t));
  tgt.setEnterer(convertReference(src.getEnterer()));
  tgt.setAuthor(convertReference(src.getAuthor()));
  tgt.setReceiver(convertReference(src.getReceiver()));
  tgt.setResponsible(convertReference(src.getResponsible()));
  tgt.setReason(convertCodeableConcept(src.getReason()));
  for (  org.hl7.fhir.r4.model.Reference t : src.getFocus())   tgt.addData(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MessageHeader convertMessageHeader(org.hl7.fhir.r4.model.MessageHeader src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MessageHeader tgt=new org.hl7.fhir.dstu2.model.MessageHeader();
  copyDomainResource(src,tgt);
  tgt.setTimestamp(src.getTimestamp());
  tgt.setEvent(convertCoding(src.getEvent()));
  tgt.setResponse(convertMessageHeaderResponseComponent(src.getResponse()));
  tgt.setSource(convertMessageSourceComponent(src.getSource()));
  for (  org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination())   tgt.addDestination(convertMessageDestinationComponent(t));
  tgt.setEnterer(convertReference(src.getEnterer()));
  tgt.setAuthor(convertReference(src.getAuthor()));
  tgt.setResponsible(convertReference(src.getResponsible()));
  tgt.setReason(convertCodeableConcept(src.getReason()));
  for (  org.hl7.fhir.r4.model.Reference t : src.getFocus())   tgt.addData(convertReference(t));
  return tgt;
}
Program: 23219
Project: 23219
Buggy source:
public org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus convertReferralStatus(org.hl7.fhir.r4.model.ReferralRequest.ReferralRequestStatus src) throws FHIRException {
  if (src == null)   return null;
switch (src) {
case DRAFT:
    return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.DRAFT;
case ACTIVE:
  return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.ACTIVE;
case CANCELLED:
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.CANCELLED;
case COMPLETED:
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.COMPLETED;
case ENTEREDINERROR:
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.REJECTED;
default :
return org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus.NULL;
}
}

Fixed version (ground truth):
public org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus convertReferralStatus(org.hl7.fhir.dstu2.model.ReferralRequest.ReferralStatus src) throws FHIRException {
  if (src == null)   return null;
switch (src) {
case DRAFT:
    return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.DRAFT;
case REQUESTED:
  return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.DRAFT;
case ACTIVE:
return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE;
case CANCELLED:
return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.CANCELLED;
case ACCEPTED:
return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ACTIVE;
case REJECTED:
return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.ENTEREDINERROR;
case COMPLETED:
return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.COMPLETED;
default :
return org.hl7.fhir.r4.model.ProcedureRequest.ProcedureRequestStatus.NULL;
}
}
Program: 23224
Project: 23224
Buggy source:
@Override protected void listChildren(List<org.hl7.fhir.r4.model.Property> childProps){
  if (children != null) {
    for (    Element c : children) {
      childProps.add(new org.hl7.fhir.r4.model.Property(c.getName(),c.fhirType(),c.getProperty().getDefinition().getDefinition(),c.getProperty().getDefinition().getMin(),maxToInt(c.getProperty().getDefinition().getMax()),c));
    }
  }
}

Fixed version (ground truth):
@Override protected void listChildren(List<org.hl7.fhir.r4.model.Property> childProps){
  if (children != null) {
    Map<String,org.hl7.fhir.r4.model.Property> map=new HashMap<String,org.hl7.fhir.r4.model.Property>();
    for (    Element c : children) {
      org.hl7.fhir.r4.model.Property p=map.get(c.getName());
      if (p == null) {
        p=new org.hl7.fhir.r4.model.Property(c.getName(),c.fhirType(),c.getProperty().getDefinition().getDefinition(),c.getProperty().getDefinition().getMin(),maxToInt(c.getProperty().getDefinition().getMax()),c);
        childProps.add(p);
        map.put(c.getName(),p);
      }
 else       p.getValues().add(c);
    }
  }
}
Program: 23225
Project: 23225
Buggy source:
public Coding castToCoding(Base b) throws FHIRException {
  if (b instanceof Coding)   return (Coding)b;
 else   throw new FHIRException("String_Node_Str" + b.getClass().getName() + "String_Node_Str");
}

Fixed version (ground truth):
public Coding castToCoding(Base b) throws FHIRException {
  if (b instanceof Coding)   return (Coding)b;
 else   if (b instanceof Element) {
    return ObjectConverter.readAsCoding((Element)b);
  }
 else   throw new FHIRException("String_Node_Str" + b.getClass().getName() + "String_Node_Str");
}
Program: 23226
Project: 23226
Buggy source:
public CodeableConcept castToCodeableConcept(Base b) throws FHIRException {
  if (b instanceof CodeableConcept)   return (CodeableConcept)b;
 else   if (b instanceof CodeType) {
    CodeableConcept cc=new CodeableConcept();
    cc.addCoding().setCode(((CodeType)b).asStringValue());
    return cc;
  }
 else   throw new FHIRException("String_Node_Str" + b.getClass().getName() + "String_Node_Str");
}

Fixed version (ground truth):
public CodeableConcept castToCodeableConcept(Base b) throws FHIRException {
  if (b instanceof CodeableConcept)   return (CodeableConcept)b;
 else   if (b instanceof Element) {
    return ObjectConverter.readAsCodeableConcept((Element)b);
  }
 else   if (b instanceof CodeType) {
    CodeableConcept cc=new CodeableConcept();
    cc.addCoding().setCode(((CodeType)b).asStringValue());
    return cc;
  }
 else   throw new FHIRException("String_Node_Str" + b.getClass().getName() + "String_Node_Str");
}
Program: 23227
Project: 23227
Buggy source:
public String toCode(){
switch (this) {
case Equals:
    return "String_Node_Str";
case Equivalent:
  return "String_Node_Str";
case NotEquals:
return "String_Node_Str";
case NotEquivalent:
return "String_Node_Str";
case Greater:
return "String_Node_Str";
case LessThen:
return "String_Node_Str";
case GreaterOrEqual:
return "String_Node_Str";
case LessOrEqual:
return "String_Node_Str";
case Union:
return "String_Node_Str";
case Or:
return "String_Node_Str";
case And:
return "String_Node_Str";
case Xor:
return "String_Node_Str";
case Times:
return "String_Node_Str";
case DivideBy:
return "String_Node_Str";
case Plus:
return "String_Node_Str";
case Minus:
return "String_Node_Str";
case Concatenate:
return "String_Node_Str";
case Implies:
return "String_Node_Str";
case Is:
return "String_Node_Str";
case As:
return "String_Node_Str";
case Div:
return "String_Node_Str";
case Mod:
return "String_Node_Str";
case In:
return "String_Node_Str";
case Contains:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}

Fixed version (ground truth):
public String toCode(){
switch (this) {
case Equals:
    return "String_Node_Str";
case Equivalent:
  return "String_Node_Str";
case NotEquals:
return "String_Node_Str";
case NotEquivalent:
return "String_Node_Str";
case Greater:
return "String_Node_Str";
case LessThen:
return "String_Node_Str";
case GreaterOrEqual:
return "String_Node_Str";
case LessOrEqual:
return "String_Node_Str";
case Union:
return "String_Node_Str";
case Or:
return "String_Node_Str";
case And:
return "String_Node_Str";
case Xor:
return "String_Node_Str";
case Times:
return "String_Node_Str";
case DivideBy:
return "String_Node_Str";
case Plus:
return "String_Node_Str";
case Minus:
return "String_Node_Str";
case Concatenate:
return "String_Node_Str";
case Implies:
return "String_Node_Str";
case Is:
return "String_Node_Str";
case As:
return "String_Node_Str";
case Div:
return "String_Node_Str";
case Mod:
return "String_Node_Str";
case In:
return "String_Node_Str";
case Contains:
return "String_Node_Str";
case MemberOf:
return "String_Node_Str";
default :
return "String_Node_Str";
}
}
Program: 23228
Project: 23228
Buggy source:
public String toString(){
  StringBuilder b=new StringBuilder();
switch (kind) {
case Name:
    b.append(name);
  break;
case Function:
if (function == Function.Item) b.append("String_Node_Str");
 else {
  b.append(name);
  b.append("String_Node_Str");
}
boolean first=true;
for (ExpressionNode n : parameters) {
if (first) first=false;
 else b.append("String_Node_Str");
b.append(n.toString());
}
if (function == Function.Item) b.append("String_Node_Str");
 else {
b.append("String_Node_Str");
}
break;
case Constant:
if (Utilities.isInteger(constant) || Utilities.existsInList(constant,"String_Node_Str","String_Node_Str")) b.append(Utilities.escapeJava(constant));
 else {
b.append("String_Node_Str");
b.append(Utilities.escapeJava(constant));
b.append("String_Node_Str");
}
break;
case Group:
b.append("String_Node_Str");
b.append(group.toString());
b.append("String_Node_Str");
}
if (inner != null) {
b.append("String_Node_Str");
b.append(inner.toString());
}
if (operation != null) {
b.append("String_Node_Str");
b.append(operation.toCode());
b.append("String_Node_Str");
b.append(opNext.toString());
}
return b.toString();
}

Fixed version (ground truth):
public String toString(){
  StringBuilder b=new StringBuilder();
switch (kind) {
case Name:
    b.append(name);
  break;
case Function:
if (function == Function.Item) b.append("String_Node_Str");
 else {
  b.append(name);
  b.append("String_Node_Str");
}
boolean first=true;
for (ExpressionNode n : parameters) {
if (first) first=false;
 else b.append("String_Node_Str");
b.append(n.toString());
}
if (function == Function.Item) b.append("String_Node_Str");
 else {
b.append("String_Node_Str");
}
break;
case Constant:
if (Utilities.isInteger(constant) || Utilities.existsInList(constant,"String_Node_Str","String_Node_Str")) b.append(Utilities.escapeJava(constant));
 else b.append(Utilities.escapeJava(constant));
break;
case Group:
b.append("String_Node_Str");
b.append(group.toString());
b.append("String_Node_Str");
}
if (inner != null) {
b.append("String_Node_Str");
b.append(inner.toString());
}
if (operation != null) {
b.append("String_Node_Str");
b.append(operation.toCode());
b.append("String_Node_Str");
b.append(opNext.toString());
}
return b.toString();
}
Program: 23231
Project: 23231
Buggy source:
private List<Base> operate(List<Base> left,Operation operation,List<Base> right) throws FHIRException {
switch (operation) {
case Equals:
    return opEquals(left,right);
case Equivalent:
  return opEquivalent(left,right);
case NotEquals:
return opNotEquals(left,right);
case NotEquivalent:
return opNotEquivalent(left,right);
case LessThen:
return opLessThen(left,right);
case Greater:
return opGreater(left,right);
case LessOrEqual:
return opLessOrEqual(left,right);
case GreaterOrEqual:
return opGreaterOrEqual(left,right);
case Union:
return opUnion(left,right);
case In:
return opIn(left,right);
case Contains:
return opContains(left,right);
case Or:
return opOr(left,right);
case And:
return opAnd(left,right);
case Xor:
return opXor(left,right);
case Implies:
return opImplies(left,right);
case Plus:
return opPlus(left,right);
case Times:
return opTimes(left,right);
case Minus:
return opMinus(left,right);
case Concatenate:
return opConcatenate(left,right);
case DivideBy:
return opDivideBy(left,right);
case Div:
return opDiv(left,right);
case Mod:
return opMod(left,right);
case Is:
return opIs(left,right);
case As:
return opAs(left,right);
default :
throw new Error("String_Node_Str" + operation.toCode());
}
}

Fixed version (ground truth):
private List<Base> operate(List<Base> left,Operation operation,List<Base> right) throws FHIRException {
switch (operation) {
case Equals:
    return opEquals(left,right);
case Equivalent:
  return opEquivalent(left,right);
case NotEquals:
return opNotEquals(left,right);
case NotEquivalent:
return opNotEquivalent(left,right);
case LessThen:
return opLessThen(left,right);
case Greater:
return opGreater(left,right);
case LessOrEqual:
return opLessOrEqual(left,right);
case GreaterOrEqual:
return opGreaterOrEqual(left,right);
case Union:
return opUnion(left,right);
case In:
return opIn(left,right);
case MemberOf:
return opMemberOf(left,right);
case Contains:
return opContains(left,right);
case Or:
return opOr(left,right);
case And:
return opAnd(left,right);
case Xor:
return opXor(left,right);
case Implies:
return opImplies(left,right);
case Plus:
return opPlus(left,right);
case Times:
return opTimes(left,right);
case Minus:
return opMinus(left,right);
case Concatenate:
return opConcatenate(left,right);
case DivideBy:
return opDivideBy(left,right);
case Div:
return opDiv(left,right);
case Mod:
return opMod(left,right);
case Is:
return opIs(left,right);
case As:
return opAs(left,right);
default :
throw new Error("String_Node_Str" + operation.toCode());
}
}
Program: 23232
Project: 23232
Buggy source:
private List<Base> funcResolve(ExecutionContext context,List<Base> focus,ExpressionNode exp){
  List<Base> result=new ArrayList<Base>();
  for (  Base item : focus) {
    if (hostServices != null) {
      String s=convertToString(item);
      if (item.fhirType().equals("String_Node_Str")) {
        Property p=item.getChildByName("String_Node_Str");
        if (p.hasValues())         s=convertToString(p.getValues().get(0));
      }
      Base res=null;
      if (s.startsWith("String_Node_Str")) {
        String id=s.substring(1);
        Property p=context.resource.getChildByName("String_Node_Str");
        for (        Base c : p.getValues()) {
          if (id.equals(c.getIdBase()))           res=c;
        }
      }
 else       res=hostServices.resolveReference(context.appInfo,s);
      if (res != null)       result.add(res);
    }
  }
  return result;
}

Fixed version (ground truth):
private List<Base> funcResolve(ExecutionContext context,List<Base> focus,ExpressionNode exp){
  List<Base> result=new ArrayList<Base>();
  for (  Base item : focus) {
    if (hostServices != null) {
      String s=convertToString(item);
      if (item.fhirType().equals("String_Node_Str")) {
        Property p=item.getChildByName("String_Node_Str");
        if (p.hasValues())         s=convertToString(p.getValues().get(0));
      }
      Base res=null;
      if (s.startsWith("String_Node_Str")) {
        String id=s.substring(1);
        Property p=context.resource.getChildByName("String_Node_Str");
        for (        Base c : p.getValues()) {
          if (id.equals(c.getIdBase())) {
            res=c;
            break;
          }
        }
      }
 else       res=hostServices.resolveReference(context.appInfo,s);
      if (res != null)       result.add(res);
    }
  }
  return result;
}
Program: 23233
Project: 23233
Buggy source:
private TypeDetails executeType(String type,ExpressionNode exp,boolean atEntry) throws PathEngineException, DefinitionException {
  if (atEntry && Character.isUpperCase(exp.getName().charAt(0)) && tail(type).equals(exp.getName()))   return new TypeDetails(CollectionStatus.SINGLETON,type);
  TypeDetails result=new TypeDetails(null);
  getChildTypesByName(type,exp.getName(),result);
  return result;
}

Fixed version (ground truth):
private TypeDetails executeType(String type,ExpressionNode exp,boolean atEntry) throws PathEngineException, DefinitionException {
  if (atEntry && Character.isUpperCase(exp.getName().charAt(0)) && hashTail(type).equals(exp.getName()))   return new TypeDetails(CollectionStatus.SINGLETON,type);
  TypeDetails result=new TypeDetails(null);
  getChildTypesByName(type,exp.getName(),result);
  return result;
}
Program: 23234
Project: 23234
Buggy source:
private List<Base> opIn(List<Base> left,List<Base> right){
  boolean ans=true;
  for (  Base l : left) {
    boolean f=false;
    for (    Base r : right)     if (doEquals(l,r)) {
      f=true;
      break;
    }
    if (!f) {
      ans=false;
      break;
    }
  }
  return makeBoolean(ans);
}

Fixed version (ground truth):
private List<Base> opIn(List<Base> left,List<Base> right) throws FHIRException {
  boolean ans=true;
  for (  Base l : left) {
    boolean f=false;
    for (    Base r : right)     if (doEquals(l,r)) {
      f=true;
      break;
    }
    if (!f) {
      ans=false;
      break;
    }
  }
  return makeBoolean(ans);
}
Program: 23236
Project: 23236
Buggy source:
private SpecificationPackage loadValidationPack() throws FileNotFoundException, IOException, FHIRException {
  String source;
  if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   throw new FHIRException("String_Node_Str" + version);
  String fn="String_Node_Str";
  if (new File("String_Node_Str").exists())   fn="String_Node_Str";
 else {
    log("String_Node_Str" + source);
    fn=grabToLocalCache(source);
  }
  log("String_Node_Str" + fn + "String_Node_Str"+ version);
  if ("String_Node_Str".equals(version)) {
    return SpecificationPackage.fromPath(fn,new R2ToR4Loader());
  }
 else   if ("String_Node_Str".equals(version)) {
    return SpecificationPackage.fromPath(fn,new R3ToR4Loader());
  }
 else   if ("String_Node_Str".equals(version)) {
    return SpecificationPackage.fromPath(fn,new R3ToR4Loader());
  }
 else   return SpecificationPackage.fromPath(fn);
}

Fixed version (ground truth):
private SpecificationPackage loadValidationPack() throws FileNotFoundException, IOException, FHIRException {
  String source;
  if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   throw new FHIRException("String_Node_Str" + version);
  String fn="String_Node_Str";
  if (new File("String_Node_Str").exists())   fn="String_Node_Str";
 else {
    log("String_Node_Str" + source);
    fn=grabToLocalCache(source);
  }
  log("String_Node_Str" + fn + "String_Node_Str"+ version);
  return loadPack(fn);
}
Program: 23242
Project: 23242
Buggy source:
public ValidationMessage(Source source,IssueType type,String message,IssueSeverity level){
  super();
  this.line=-1;
  this.col=-1;
  if (message == null)   throw new Error("String_Node_Str");
  this.message=message;
  this.level=level;
  this.source=source;
  this.type=type;
  if (type == null)   throw new Error("String_Node_Str");
}

Fixed version (ground truth):
public ValidationMessage(Source source,IssueType type,int line,int col,String path,String message,String html,IssueSeverity level){
  super();
  this.line=line;
  this.col=col;
  this.location=path;
  if (message == null)   throw new Error("String_Node_Str");
  this.message=message;
  this.html=html;
  this.level=level;
  this.source=source;
  this.type=type;
  if (level == IssueSeverity.NULL)   determineLevel(path);
  if (type == null)   throw new Error("String_Node_Str");
}
Program: 23243
Project: 23243
Buggy source:
public OperationOutcome validateString(String source,FhirFormat format,List<String> profiles) throws Exception {
  return validate(source.getBytes(),format,profiles);
}

Fixed version (ground truth):
public OperationOutcome validateString(String location,String source,FhirFormat format,List<String> profiles) throws Exception {
  return validate(location,source.getBytes(),format,profiles);
}
Program: 23244
Project: 23244
Buggy source:
public OperationOutcome validate(byte[] source,FhirFormat cntType,List<String> profiles) throws Exception {
  List<ValidationMessage> messages=new ArrayList<ValidationMessage>();
  if (doNative) {
    if (cntType == FhirFormat.JSON)     validateJsonSchema(messages);
    if (cntType == FhirFormat.XML)     validateXmlSchema(messages);
    if (cntType == FhirFormat.TURTLE)     validateSHEX(messages);
  }
  InstanceValidator validator=new InstanceValidator(this);
  validator.setNoInvariantChecks(isNoInvariantChecks());
  validator.validate(null,messages,new ByteArrayInputStream(source),cntType,new ValidationProfileSet(profiles,true));
  return messagesToOutcome(messages);
}

Fixed version (ground truth):
public OperationOutcome validate(String location,byte[] source,FhirFormat cntType,List<String> profiles) throws Exception {
  List<ValidationMessage> messages=new ArrayList<ValidationMessage>();
  if (doNative) {
    if (cntType == FhirFormat.JSON)     validateJsonSchema(location,messages);
    if (cntType == FhirFormat.XML)     validateXmlSchema(location,messages);
    if (cntType == FhirFormat.TURTLE)     validateSHEX(location,messages);
  }
  InstanceValidator validator=new InstanceValidator(this);
  validator.setNoInvariantChecks(isNoInvariantChecks());
  validator.validate(null,messages,new ByteArrayInputStream(source),cntType,new ValidationProfileSet(profiles,true));
  return messagesToOutcome(messages);
}
Program: 23245
Project: 23245
Buggy source:
private void validateXmlSchema(List<ValidationMessage> messages) throws FileNotFoundException, IOException, SAXException {
  XmlValidator xml=new XmlValidator(messages,loadSchemas(),loadTransforms());
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,"String_Node_Str",IssueSeverity.INFORMATION));
}

Fixed version (ground truth):
private void validateXmlSchema(String location,List<ValidationMessage> messages) throws FileNotFoundException, IOException, SAXException {
  XmlValidator xml=new XmlValidator(messages,loadSchemas(),loadTransforms());
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,location,"String_Node_Str",IssueSeverity.INFORMATION));
}
Program: 23246
Project: 23246
Buggy source:
private void validateJsonSchema(List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,"String_Node_Str",IssueSeverity.INFORMATION));
}

Fixed version (ground truth):
private void validateJsonSchema(String location,List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,location,"String_Node_Str",IssueSeverity.INFORMATION));
}
Program: 23247
Project: 23247
Buggy source:
private void validateSHEX(List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,"String_Node_Str",IssueSeverity.INFORMATION));
}

Fixed version (ground truth):
private void validateSHEX(String location,List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,location,"String_Node_Str",IssueSeverity.INFORMATION));
}
Program: 23248
Project: 23248
Buggy source:
public OperationOutcome validateString(String source,FhirFormat format,List<String> profiles) throws Exception {
  return validate(source.getBytes(),format,profiles);
}

Fixed version (ground truth):
public OperationOutcome validateString(String location,String source,FhirFormat format,List<String> profiles) throws Exception {
  return validate(location,source.getBytes(),format,profiles);
}
Program: 23249
Project: 23249
Buggy source:
public OperationOutcome validate(byte[] source,FhirFormat cntType,List<String> profiles) throws Exception {
  List<ValidationMessage> messages=new ArrayList<ValidationMessage>();
  if (doNative) {
    if (cntType == FhirFormat.JSON)     validateJsonSchema(messages);
    if (cntType == FhirFormat.XML)     validateXmlSchema(messages);
    if (cntType == FhirFormat.TURTLE)     validateSHEX(messages);
  }
  InstanceValidator validator=new InstanceValidator(this);
  validator.setNoInvariantChecks(isNoInvariantChecks());
  validator.validate(null,messages,new ByteArrayInputStream(source),cntType,new ValidationProfileSet(profiles,true));
  return messagesToOutcome(messages);
}

Fixed version (ground truth):
public OperationOutcome validate(String location,byte[] source,FhirFormat cntType,List<String> profiles) throws Exception {
  List<ValidationMessage> messages=new ArrayList<ValidationMessage>();
  if (doNative) {
    if (cntType == FhirFormat.JSON)     validateJsonSchema(location,messages);
    if (cntType == FhirFormat.XML)     validateXmlSchema(location,messages);
    if (cntType == FhirFormat.TURTLE)     validateSHEX(location,messages);
  }
  InstanceValidator validator=new InstanceValidator(this);
  validator.setNoInvariantChecks(isNoInvariantChecks());
  validator.validate(null,messages,new ByteArrayInputStream(source),cntType,new ValidationProfileSet(profiles,true));
  return messagesToOutcome(messages);
}
Program: 23250
Project: 23250
Buggy source:
private void validateXmlSchema(List<ValidationMessage> messages) throws FileNotFoundException, IOException, SAXException {
  XmlValidator xml=new XmlValidator(messages,loadSchemas(),loadTransforms());
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,"String_Node_Str",IssueSeverity.INFORMATION));
}

Fixed version (ground truth):
private void validateXmlSchema(String location,List<ValidationMessage> messages) throws FileNotFoundException, IOException, SAXException {
  XmlValidator xml=new XmlValidator(messages,loadSchemas(),loadTransforms());
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,location,"String_Node_Str",IssueSeverity.INFORMATION));
}
Program: 23251
Project: 23251
Buggy source:
private void validateJsonSchema(List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,"String_Node_Str",IssueSeverity.INFORMATION));
}

Fixed version (ground truth):
private void validateJsonSchema(String location,List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,location,"String_Node_Str",IssueSeverity.INFORMATION));
}
Program: 23252
Project: 23252
Buggy source:
private void validateSHEX(List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,"String_Node_Str",IssueSeverity.INFORMATION));
}

Fixed version (ground truth):
private void validateSHEX(String location,List<ValidationMessage> messages){
  messages.add(new ValidationMessage(Source.InstanceValidator,IssueType.INFORMATIONAL,location,"String_Node_Str",IssueSeverity.INFORMATION));
}
Program: 23257
Project: 23257
Buggy source:
private void generateZips() throws Exception {
  SpecMapManager map=new SpecMapManager(Constants.VERSION,Constants.REVISION,execTime,igpkp.getCanonical());
  for (  FetchedFile f : fileList) {
    for (    FetchedResource r : f.getResources()) {
      String u=igpkp.getCanonical() + r.getUrlTail();
      if (r.getResource() != null && r.getResource() instanceof MetadataResource) {
        String uc=((MetadataResource)r.getResource()).getUrl();
        if (uc != null && !u.equals(uc) && !isListedURLExemption(uc))         throw new Exception("String_Node_Str" + u + "String_Node_Str"+ uc);
        if (uc != null && !uc.startsWith(igpkp.getCanonical()))         map.path(uc,igpkp.getLinkFor(r));
      }
      map.path(u,igpkp.getLinkFor(r));
    }
  }
  for (  String s : new File(outputDir).list()) {
    if (s.endsWith("String_Node_Str")) {
      map.target(s);
    }
  }
  File df=File.createTempFile("String_Node_Str","String_Node_Str");
  df.deleteOnExit();
  map.save(df.getCanonicalPath());
  if (generateExampleZip(FhirFormat.XML))   generateDefinitions(FhirFormat.XML,df.getCanonicalPath());
  if (generateExampleZip(FhirFormat.JSON))   generateDefinitions(FhirFormat.JSON,df.getCanonicalPath());
  if (generateExampleZip(FhirFormat.TURTLE))   generateDefinitions(FhirFormat.TURTLE,df.getCanonicalPath());
  generateValidationPack();
}

Fixed version (ground truth):
private void generateZips() throws Exception {
  SpecMapManager map=new SpecMapManager(Constants.VERSION,Constants.REVISION,execTime,igpkp.getCanonical());
  for (  FetchedFile f : fileList) {
    for (    FetchedResource r : f.getResources()) {
      String u=igpkp.getCanonical() + r.getUrlTail();
      if (r.getResource() != null && r.getResource() instanceof MetadataResource) {
        String uc=((MetadataResource)r.getResource()).getUrl();
        if (uc != null && !u.equals(uc) && !isListedURLExemption(uc))         throw new Exception("String_Node_Str" + u + "String_Node_Str"+ uc);
        if (uc != null && !u.equals(uc))         map.path(uc,igpkp.getLinkFor(r));
      }
      map.path(u,igpkp.getLinkFor(r));
    }
  }
  for (  String s : new File(outputDir).list()) {
    if (s.endsWith("String_Node_Str")) {
      map.target(s);
    }
  }
  File df=File.createTempFile("String_Node_Str","String_Node_Str");
  df.deleteOnExit();
  map.save(df.getCanonicalPath());
  if (generateExampleZip(FhirFormat.XML))   generateDefinitions(FhirFormat.XML,df.getCanonicalPath());
  if (generateExampleZip(FhirFormat.JSON))   generateDefinitions(FhirFormat.JSON,df.getCanonicalPath());
  if (generateExampleZip(FhirFormat.TURTLE))   generateDefinitions(FhirFormat.TURTLE,df.getCanonicalPath());
  generateValidationPack();
}
Program: 23258
Project: 23258
Buggy source:
public XhtmlNode renderBundle(org.hl7.fhir.r4.elementmodel.Element element) throws FHIRException {
  XhtmlNode root=new XhtmlNode(NodeType.Element,"String_Node_Str");
  for (  Base b : element.listChildrenByName("String_Node_Str")) {
    XhtmlNode c=getHtmlForResource(((org.hl7.fhir.r4.elementmodel.Element)b).getNamedChild("String_Node_Str"));
    if (c != null)     root.getChildNodes().addAll(c.getChildNodes());
    root.hr();
  }
  return root;
}

Fixed version (ground truth):
public XhtmlNode renderBundle(org.hl7.fhir.r4.elementmodel.Element element) throws FHIRException {
  XhtmlNode root=new XhtmlNode(NodeType.Element,"String_Node_Str");
  for (  Base b : element.listChildrenByName("String_Node_Str")) {
    org.hl7.fhir.r4.elementmodel.Element r=((org.hl7.fhir.r4.elementmodel.Element)b).getNamedChild("String_Node_Str");
    if (r != null) {
      XhtmlNode c=getHtmlForResource(r);
      if (c != null)       root.getChildNodes().addAll(c.getChildNodes());
      root.hr();
    }
  }
  return root;
}
Program: 23259
Project: 23259
Buggy source:
protected void copy(SimpleWorkerContext other){
  structures.putAll(other.structures);
  systems.addAll(other.systems);
  questionnaire=other.questionnaire;
  binaries.putAll(other.binaries);
  allowLoadingDuplicates=other.allowLoadingDuplicates;
  version=other.version;
  revision=other.revision;
  date=other.date;
  validatorFactory=other.validatorFactory;
}

Fixed version (ground truth):
protected void copy(SimpleWorkerContext other){
  super.copy(other);
  structures.putAll(other.structures);
  systems.addAll(other.systems);
  questionnaire=other.questionnaire;
  binaries.putAll(other.binaries);
  allowLoadingDuplicates=other.allowLoadingDuplicates;
  version=other.version;
  revision=other.revision;
  date=other.date;
  validatorFactory=other.validatorFactory;
}
Program: 23263
Project: 23263
Buggy source:
public static List<ElementDefinition> getChildList(StructureDefinition structure,ElementDefinition element){
  return getChildList(structure,element.getPath());
}

Fixed version (ground truth):
public static List<ElementDefinition> getChildList(StructureDefinition structure,ElementDefinition element){
  return getChildList(structure,element.getPath(),element.getId());
}
Program: 23264
Project: 23264
Buggy source:
/** 
 * Generate a definition for a referenced element
 * @param sd Containing structure definition
 * @param ed Inner element
 * @return ShEx representation of element reference
 */
private String genInnerTypeDef(StructureDefinition sd,ElementDefinition ed){
  String path=ed.hasBase() ? ed.getBase().getPath() : ed.getPath();
  ;
  ST element_reference=tmplt(SHAPE_DEFINITION_TEMPLATE);
  element_reference.add("String_Node_Str","String_Node_Str");
  element_reference.add("String_Node_Str",path);
  String comment=ed.getShort();
  element_reference.add("String_Node_Str",comment == null ? "String_Node_Str" : "String_Node_Str" + comment);
  List<String> elements=new ArrayList<String>();
  for (  ElementDefinition child : ProfileUtilities.getChildList(sd,path))   elements.add(genElementDefinition(sd,child));
  element_reference.add("String_Node_Str",StringUtils.join(elements,"String_Node_Str"));
  return element_reference.render();
}

Fixed version (ground truth):
/** 
 * Generate a definition for a referenced element
 * @param sd Containing structure definition
 * @param ed Inner element
 * @return ShEx representation of element reference
 */
private String genInnerTypeDef(StructureDefinition sd,ElementDefinition ed){
  String path=ed.hasBase() ? ed.getBase().getPath() : ed.getPath();
  ;
  ST element_reference=tmplt(SHAPE_DEFINITION_TEMPLATE);
  element_reference.add("String_Node_Str","String_Node_Str");
  element_reference.add("String_Node_Str",path);
  String comment=ed.getShort();
  element_reference.add("String_Node_Str",comment == null ? "String_Node_Str" : "String_Node_Str" + comment);
  List<String> elements=new ArrayList<String>();
  for (  ElementDefinition child : ProfileUtilities.getChildList(sd,path,null))   elements.add(genElementDefinition(sd,child));
  element_reference.add("String_Node_Str",StringUtils.join(elements,"String_Node_Str"));
  return element_reference.render();
}
Program: 23266
Project: 23266
Buggy source:
private void updateImplementationGuide() throws Exception {
  for (  ImplementationGuidePackageComponent pck : pubIg.getPackage()) {
    for (    ImplementationGuidePackageResourceComponent res : pck.getResource()) {
      FetchedResource r=null;
      for (      FetchedFile tf : fileList) {
        for (        FetchedResource tr : tf.getResources()) {
          if (tr.getLocalRef().equals(res.getSourceReference().getReference())) {
            r=tr;
          }
        }
      }
      if (r != null) {
        String path=igpkp.doReplacements(igpkp.getLinkFor(r),r,null,null);
        res.addExtension().setUrl("String_Node_Str").setValue(new UriType(path));
        inspector.addLinkToCheck("String_Node_Str",path);
      }
    }
  }
  FetchedResource r=altMap.get(IG_NAME).getResources().get(0);
  r.setResource(pubIg);
  r.setElement(convertToElement(pubIg));
}

Fixed version (ground truth):
private void updateImplementationGuide() throws Exception {
  for (  ImplementationGuidePackageComponent pck : pubIg.getPackage()) {
    for (    ImplementationGuidePackageResourceComponent res : pck.getResource()) {
      FetchedResource r=null;
      for (      FetchedFile tf : fileList) {
        for (        FetchedResource tr : tf.getResources()) {
          if (tr.getLocalRef().equals(res.getSourceReference().getReference())) {
            r=tr;
          }
        }
      }
      if (r != null) {
        String path=igpkp.doReplacements(igpkp.getLinkFor(r),r,null,null);
        res.addExtension().setUrl("String_Node_Str").setValue(new UriType(path));
        inspector.addLinkToCheck("String_Node_Str",path);
      }
    }
  }
  FetchedResource r=altMap.get(IG_NAME).getResources().get(0);
  if (!pubIg.hasText() || !pubIg.getText().hasDiv())   pubIg.setText(((ImplementationGuide)r.getResource()).getText());
  r.setResource(pubIg);
  r.setElement(convertToElement(pubIg));
}
Program: 23268
Project: 23268
Buggy source:
@Override public void logMessage(String msg){
  System.out.println(msg);
  if (!autoBuildMode)   filelog.append(msg + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void logMessage(String msg){
  System.out.println(msg);
  if (!autoBuildMode) {
    try {
      String logPath=Utilities.path(System.getProperty("String_Node_Str"),"String_Node_Str");
      if (filelog == null) {
        filelog=new StringBuilder();
        System.out.println("String_Node_Str" + logPath);
      }
      filelog.append(msg + "String_Node_Str");
      TextFile.stringToFile(filelog.toString(),logPath);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 23269
Project: 23269
Buggy source:
@Override public void logDebugMessage(LogCategory category,String msg){
  if (logOptions.contains(category.toString().toLowerCase()))   System.out.println(msg);
  if (!autoBuildMode) {
    try {
      String logPath=Utilities.path(System.getProperty("String_Node_Str"),"String_Node_Str");
      if (filelog == null) {
        filelog=new StringBuilder();
        System.out.println("String_Node_Str" + logPath);
      }
      filelog.append(msg + "String_Node_Str");
      TextFile.stringToFile(filelog.toString(),logPath);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void logDebugMessage(LogCategory category,String msg){
  if (logOptions.contains(category.toString().toLowerCase()))   logMessage(msg);
}
Program: 23271
Project: 23271
Buggy source:
protected XhtmlNode parseXhtml(String value) throws IOException, FHIRFormatError {
  XhtmlParser prsr=new XhtmlParser();
  try {
    return prsr.parse(value,"String_Node_Str").getChildNodes().get(0);
  }
 catch (  org.hl7.fhir.exceptions.FHIRFormatError e) {
    throw new FHIRFormatError(e.getMessage() + "String_Node_Str" + value,e);
  }
}

Fixed version (ground truth):
protected XhtmlNode parseXhtml(String value) throws IOException, FHIRFormatError {
  XhtmlParser prsr=new XhtmlParser();
  try {
    return prsr.parse(value,"String_Node_Str").getChildNodes().get(0);
  }
 catch (  org.hl7.fhir.exceptions.FHIRFormatError e) {
    throw new FHIRFormatError(e.getMessage(),e);
  }
}
Program: 23272
Project: 23272
Buggy source:
/** 
 * parse xml that is known to be a resource, and that has already been read into a JSON object
 * @throws IOException
 * @throws FHIRFormatError
 */
public Resource parse(JsonObject json) throws FHIRFormatError, IOException {
  return parseResource(json);
}

Fixed version (ground truth):
/** 
 * parse xml that is known to be a resource, and that has already been read into a JSON object  
 * @throws IOException 
 * @throws FHIRFormatError 
 */
public Resource parse(JsonObject json) throws FHIRFormatError, IOException {
  return parseResource(json);
}
Program: 23273
Project: 23273
Buggy source:
@Override public void logDebugMessage(LogCategory category,String msg){
  if (logOptions.contains(category.toString().toLowerCase()))   System.out.println(msg);
  if (!autoBuildMode) {
    filelog.append(msg + "String_Node_Str");
    try {
      TextFile.stringToFile(filelog.toString(),Utilities.path(System.getProperty("String_Node_Str"),"String_Node_Str"));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void logDebugMessage(LogCategory category,String msg){
  if (logOptions.contains(category.toString().toLowerCase()))   System.out.println(msg);
  if (!autoBuildMode) {
    if (filelog == null)     filelog=new StringBuilder();
    filelog.append(msg + "String_Node_Str");
    try {
      TextFile.stringToFile(filelog.toString(),Utilities.path(System.getProperty("String_Node_Str"),"String_Node_Str"));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 23275
Project: 23275
Buggy source:
private void AddVsRef(ResourceContext rcontext,String value,XhtmlNode li){
  Resource res=rcontext == null ? null : rcontext.resolve(value);
  if (res != null && !(res instanceof MetadataResource)) {
    li.addText(value);
    return;
  }
  MetadataResource vs=(MetadataResource)res;
  if (vs == null)   context.fetchResource(ValueSet.class,value);
  if (vs == null)   context.fetchResource(StructureDefinition.class,value);
  if (vs == null)   context.fetchResource(Questionnaire.class,value);
  if (vs != null) {
    String ref=(String)vs.getUserData("String_Node_Str");
    ref=adjustForPath(ref);
    XhtmlNode a=li.ah(ref == null ? "String_Node_Str" : ref.replace("String_Node_Str","String_Node_Str"));
    a.addText(value);
  }
 else {
    CodeSystem cs=context.fetchCodeSystem(value);
    if (cs != null) {
      String ref=(String)cs.getUserData("String_Node_Str");
      ref=adjustForPath(ref);
      XhtmlNode a=li.ah(ref == null ? "String_Node_Str" : ref.replace("String_Node_Str","String_Node_Str"));
      a.addText(value);
    }
 else     if (value.equals("String_Node_Str") || value.equals("String_Node_Str")) {
      XhtmlNode a=li.ah(value);
      a.tx("String_Node_Str");
    }
 else {
      if (value.startsWith("String_Node_Str") && !Utilities.existsInList(value,"String_Node_Str"))       System.out.println("String_Node_Str" + value);
      li.addText(value);
    }
  }
}

Fixed version (ground truth):
private void AddVsRef(ResourceContext rcontext,String value,XhtmlNode li){
  Resource res=rcontext == null ? null : rcontext.resolve(value);
  if (res != null && !(res instanceof MetadataResource)) {
    li.addText(value);
    return;
  }
  MetadataResource vs=(MetadataResource)res;
  if (vs == null)   vs=context.fetchResource(ValueSet.class,value);
  if (vs == null)   vs=context.fetchResource(StructureDefinition.class,value);
  if (vs == null)   vs=context.fetchResource(Questionnaire.class,value);
  if (vs != null) {
    String ref=(String)vs.getUserData("String_Node_Str");
    ref=adjustForPath(ref);
    XhtmlNode a=li.ah(ref == null ? "String_Node_Str" : ref.replace("String_Node_Str","String_Node_Str"));
    a.addText(value);
  }
 else {
    CodeSystem cs=context.fetchCodeSystem(value);
    if (cs != null) {
      String ref=(String)cs.getUserData("String_Node_Str");
      ref=adjustForPath(ref);
      XhtmlNode a=li.ah(ref == null ? "String_Node_Str" : ref.replace("String_Node_Str","String_Node_Str"));
      a.addText(value);
    }
 else     if (value.equals("String_Node_Str") || value.equals("String_Node_Str")) {
      XhtmlNode a=li.ah(value);
      a.tx("String_Node_Str");
    }
 else {
      if (value.startsWith("String_Node_Str") && !Utilities.existsInList(value,"String_Node_Str"))       System.out.println("String_Node_Str" + value);
      li.addText(value);
    }
  }
}
Program: 23276
Project: 23276
Buggy source:
public ValidationResult validateCode(String system,String code,String display){
  try {
    if (system.equals("String_Node_Str"))     return verifySnomed(code,display);
  }
 catch (  Exception e) {
    return new ValidationResult(IssueSeverity.WARNING,"String_Node_Str" + code + "String_Node_Str"+ e.getMessage());
  }
  try {
    if (system.equals("String_Node_Str"))     return verifyLoinc(code,display);
    if (system.equals("String_Node_Str"))     return verifyUcum(code,display);
    if (codeSystems.containsKey(system) && codeSystems.get(system) != null) {
      return verifyCode(codeSystems.get(system),code,display);
    }
    if (system.startsWith("String_Node_Str"))     return new ValidationResult(new ConceptDefinitionComponent());
  }
 catch (  Exception e) {
    return new ValidationResult(IssueSeverity.ERROR,"String_Node_Str" + code + "String_Node_Str"+ system+ "String_Node_Str"+ e.getMessage());
  }
  return new ValidationResult(IssueSeverity.WARNING,"String_Node_Str" + system);
}

Fixed version (ground truth):
public ValidationResult validateCode(String system,String code,String display){
  try {
    if (system.equals("String_Node_Str"))     return verifySnomed(code,display);
  }
 catch (  Exception e) {
    return new ValidationResult(IssueSeverity.WARNING,"String_Node_Str" + code + "String_Node_Str"+ e.getMessage());
  }
  try {
    if (system.equals("String_Node_Str"))     return verifyLoinc(code,display);
    if (system.equals("String_Node_Str"))     return verifyUcum(code,display);
    if (codeSystems.containsKey(system) && codeSystems.get(system) != null) {
      return verifyCode(codeSystems.get(system),code,display);
    }
    if (system.startsWith("String_Node_Str"))     return new ValidationResult(new ConceptDefinitionComponent());
  }
 catch (  Exception e) {
    return new ValidationResult(IssueSeverity.ERROR,"String_Node_Str" + code + "String_Node_Str"+ system+ "String_Node_Str"+ e.getMessage());
  }
  return super.validateCode(system,code,display);
}
Program: 23277
Project: 23277
Buggy source:
private ValidationResult verifyUcum(String code,String display){
  String s=ucum.validate(code);
  ConceptDefinitionComponent def=new ConceptDefinitionComponent();
  def.setCode(code);
  def.setDisplay(ucum.getCommonDisplay(code));
  return new ValidationResult(def);
}

Fixed version (ground truth):
private ValidationResult verifyUcum(String code,String display){
  String s=ucum.validate(code);
  if (s != null)   return new ValidationResult(IssueSeverity.ERROR,s);
 else {
    ConceptDefinitionComponent def=new ConceptDefinitionComponent();
    def.setCode(code);
    def.setDisplay(ucum.getCommonDisplay(code));
    return new ValidationResult(def);
  }
}