nus-yam/ex-repair huggingface dataset:
Program: 23392
Project: 23392
Buggy source:
private void executeRuleProfile(String indent,TransformContext context,StructureMap map,Variables vars,StructureMapGroupComponent group,StructureMapGroupRuleComponent rule) throws Exception {
  log(indent + "String_Node_Str" + rule.getName());
  Variables srcVars=vars.copy();
  if (rule.getSource().size() != 1)   throw new Exception("String_Node_Str");
  List<Variables> source=analyseSource(context,srcVars,rule.getSource().get(0));
  if (source != null) {
    for (    Variables v : source) {
      for (      StructureMapGroupRuleTargetComponent t : rule.getTarget()) {
        processTarget(context,v,map,t);
      }
      if (rule.hasRule()) {
        for (        StructureMapGroupRuleComponent childrule : rule.getRule()) {
          executeRule(indent + "String_Node_Str",context,map,v,group,childrule);
        }
      }
 else       if (rule.hasDependent()) {
        for (        StructureMapGroupRuleDependentComponent dependent : rule.getDependent()) {
          executeDependency(indent + "String_Node_Str",context,map,v,group,dependent);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void executeRuleProfile(String indent,TransformContext context,StructureMap map,Variables vars,StructureMapGroupComponent group,StructureMapGroupRuleComponent rule) throws Exception {
  log(indent + "String_Node_Str" + rule.getName());
  Variables srcVars=vars.copy();
  if (rule.getSource().size() != 1)   throw new Exception("String_Node_Str");
  List<Variables> source=processSource(context,srcVars,rule.getSource().get(0));
  if (source != null) {
    for (    Variables v : source) {
      for (      StructureMapGroupRuleTargetComponent t : rule.getTarget()) {
        processTarget(context,v,map,t);
      }
      if (rule.hasRule()) {
        for (        StructureMapGroupRuleComponent childrule : rule.getRule()) {
          executeRule(indent + "String_Node_Str",context,map,v,group,childrule);
        }
      }
 else       if (rule.hasDependent()) {
        for (        StructureMapGroupRuleDependentComponent dependent : rule.getDependent()) {
          executeDependency(indent + "String_Node_Str",context,map,v,group,dependent);
        }
      }
    }
  }
}
Program: 23395
Project: 23395
Buggy source:
public Resource transform(byte[] source,FhirFormat cntType,String mapUri) throws Exception {
  StructureMapUtilities scu=new StructureMapUtilities(context,null);
  org.hl7.fhir.dstu3.elementmodel.Element src=Manager.parse(context,new ByteArrayInputStream(source),cntType);
  StructureMap map=scu.getLibrary().get(mapUri);
  if (map == null)   throw new Error("String_Node_Str" + mapUri);
  Resource dst=ResourceFactory.createResource("String_Node_Str");
  scu.transform(null,src,map,dst);
  return dst;
}

Fixed version (ground truth):
public Resource transform(byte[] source,FhirFormat cntType,String mapUri) throws Exception {
  StructureMapUtilities scu=new StructureMapUtilities(context);
  org.hl7.fhir.dstu3.elementmodel.Element src=Manager.parse(context,new ByteArrayInputStream(source),cntType);
  StructureMap map=scu.getLibrary().get(mapUri);
  if (map == null)   throw new Error("String_Node_Str" + mapUri);
  Resource dst=ResourceFactory.createResource("String_Node_Str");
  scu.transform(null,src,map,dst);
  return dst;
}
Program: 23396
Project: 23396
Buggy source:
private FhirFormat checkIsResource(String path){
  String ext=Utilities.getFileExtension(path);
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.XML;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.JSON;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.TURTLE;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.TEXT;
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.XML);
    return FhirFormat.XML;
  }
 catch (  Exception e) {
  }
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.JSON);
    return FhirFormat.JSON;
  }
 catch (  Exception e) {
  }
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.TURTLE);
    return FhirFormat.TURTLE;
  }
 catch (  Exception e) {
  }
  try {
    new StructureMapUtilities(context,null,null).parse(TextFile.fileToString(path));
    return FhirFormat.TEXT;
  }
 catch (  Exception e) {
  }
  return null;
}

Fixed version (ground truth):
private FhirFormat checkIsResource(String path){
  String ext=Utilities.getFileExtension(path);
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.XML;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.JSON;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.TURTLE;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.TEXT;
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.XML);
    return FhirFormat.XML;
  }
 catch (  Exception e) {
  }
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.JSON);
    return FhirFormat.JSON;
  }
 catch (  Exception e) {
  }
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.TURTLE);
    return FhirFormat.TURTLE;
  }
 catch (  Exception e) {
  }
  try {
    new StructureMapUtilities(context,null,null,null).parse(TextFile.fileToString(path));
    return FhirFormat.TEXT;
  }
 catch (  Exception e) {
  }
  return null;
}
Program: 23397
Project: 23397
Buggy source:
public ValueSetExpansionOutcome(String error,ExpansionErrorClass errorClass){
  this.valueset=null;
  this.service=null;
  this.error=error;
  this.errorClass=errorClass;
}

Fixed version (ground truth):
public ValueSetExpansionOutcome(String error,TerminologyServiceErrorClass errorClass){
  this.valueset=null;
  this.service=null;
  this.error=error;
  this.errorClass=errorClass;
}
Program: 23398
Project: 23398
Buggy source:
public ExpansionErrorClass getErrorClass(){
  return errorClass;
}

Fixed version (ground truth):
public TerminologyServiceErrorClass getErrorClass(){
  return errorClass;
}
Program: 23400
Project: 23400
Buggy source:
public void closeDifferential(StructureDefinition base,StructureDefinition derived){
}

Fixed version (ground truth):
public void closeDifferential(StructureDefinition base,StructureDefinition derived) throws FHIRException {
  for (  ElementDefinition edb : base.getSnapshot().getElement()) {
    if (isImmediateChild(edb) && !edb.getPath().endsWith("String_Node_Str")) {
      ElementDefinition edm=getMatchInDerived(edb,derived.getDifferential().getElement());
      if (edm == null) {
        ElementDefinition edd=derived.getDifferential().addElement();
        edd.setPath(edb.getPath());
        edd.setMax("String_Node_Str");
      }
 else {
        closeChildren(base,edb,derived,edm);
      }
    }
  }
  sortDifferential(base,derived,derived.getName(),new ArrayList<String>());
}
Program: 23402
Project: 23402
Buggy source:
private void saveToCache(ValidationResult res,String cacheName) throws IOException {
  if (cacheName == null)   return;
  if (res.getDisplay() != null)   TextFile.stringToFile(res.getDisplay(),cacheName);
 else   if (res.getSeverity() == IssueSeverity.WARNING)   TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
 else   TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
}

Fixed version (ground truth):
private void saveToCache(ValidationResult res,String cacheName) throws IOException {
  if (cacheName == null)   return;
  if (res.getDisplay() != null)   TextFile.stringToFile(res.getDisplay(),cacheName);
 else   if (res.getMessage() != null) {
    if (res.getSeverity() == IssueSeverity.WARNING)     TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
 else     TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
  }
}
Program: 23404
Project: 23404
Buggy source:
public ValidationResult(IssueSeverity error,String error2,TerminologyServiceErrorClass errorClass){
  this.severity=severity;
  this.message=message;
  this.errorClass=errorClass;
}

Fixed version (ground truth):
public ValidationResult(IssueSeverity severity,String message,TerminologyServiceErrorClass errorClass){
  this.severity=severity;
  this.message=message;
  this.errorClass=errorClass;
}
Program: 23405
Project: 23405
Buggy source:
public ValidationMessage(Source source,OperationOutcome.IssueType type,String message,IssueSeverity level){
  super();
  this.line=-1;
  this.col=-1;
  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,OperationOutcome.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");
}
Program: 23406
Project: 23406
Buggy source:
private void saveToCache(ValidationResult res,String cacheName) throws IOException {
  if (cacheName == null)   return;
  if (res.getDisplay() != null)   TextFile.stringToFile(res.getDisplay(),cacheName);
 else   if (res.getSeverity() == IssueSeverity.WARNING)   TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
 else   TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
}

Fixed version (ground truth):
private void saveToCache(ValidationResult res,String cacheName) throws IOException {
  if (cacheName == null)   return;
  if (res.getDisplay() != null)   TextFile.stringToFile(res.getDisplay(),cacheName);
 else   if (res.getMessage() != null) {
    if (res.getSeverity() == IssueSeverity.WARNING)     TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
 else     TextFile.stringToFile("String_Node_Str" + res.getMessage(),cacheName);
  }
}
Program: 23408
Project: 23408
Buggy source:
public ValidationResult(IssueSeverity error,String error2,TerminologyServiceErrorClass errorClass){
  this.severity=severity;
  this.message=message;
  this.errorClass=errorClass;
}

Fixed version (ground truth):
public ValidationResult(IssueSeverity severity,String message,TerminologyServiceErrorClass errorClass){
  this.severity=severity;
  this.message=message;
  this.errorClass=errorClass;
}
Program: 23409
Project: 23409
Buggy source:
public ValidationMessage(Source source,OperationOutcome.IssueType type,String message,IssueSeverity level){
  super();
  this.line=-1;
  this.col=-1;
  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,OperationOutcome.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");
}
Program: 23413
Project: 23413
Buggy source:
private void parseConceptMap(StructureMap result,FHIRLexer lexer) throws FHIRLexerException {
  lexer.token("String_Node_Str");
  ConceptMap map=new ConceptMap();
  String id=lexer.readConstant("String_Node_Str");
  if (!id.startsWith("String_Node_Str"))   lexer.error("String_Node_Str");
  map.setId(id.substring(1));
  result.getContained().add(map);
  lexer.token("String_Node_Str");
  lexer.skipComments();
  Map<String,String> prefixes=new HashMap<String,String>();
  while (lexer.hasToken("String_Node_Str")) {
    lexer.token("String_Node_Str");
    String n=lexer.take();
    lexer.token("String_Node_Str");
    String v=lexer.readConstant("String_Node_Str");
    prefixes.put(n,v);
  }
  while (!lexer.hasToken("String_Node_Str")) {
    String srcs=readPrefix(prefixes,lexer);
    lexer.token("String_Node_Str");
    String sc=lexer.take();
    ConceptMapEquivalence eq=readEquivalence(lexer);
    String tgts=(eq != ConceptMapEquivalence.UNMATCHED) ? readPrefix(prefixes,lexer) : "String_Node_Str";
    ConceptMapGroupComponent g=getGroup(map,srcs,tgts);
    SourceElementComponent e=g.addElement();
    e.setCode(sc);
    TargetElementComponent tgt=e.addTarget();
    if (eq != ConceptMapEquivalence.EQUIVALENT)     tgt.setEquivalence(eq);
    if (tgt.getEquivalence() != ConceptMapEquivalence.UNMATCHED) {
      lexer.token("String_Node_Str");
      tgt.setCode(lexer.take());
    }
    if (lexer.hasComment())     tgt.setComments(lexer.take().substring(2).trim());
  }
  lexer.token("String_Node_Str");
}

Fixed version (ground truth):
private void parseConceptMap(StructureMap result,FHIRLexer lexer) throws FHIRLexerException {
  lexer.token("String_Node_Str");
  ConceptMap map=new ConceptMap();
  String id=lexer.readConstant("String_Node_Str");
  if (!id.startsWith("String_Node_Str"))   lexer.error("String_Node_Str");
  map.setId(id.substring(1));
  map.setStatus(ConformanceResourceStatus.DRAFT);
  result.getContained().add(map);
  lexer.token("String_Node_Str");
  lexer.skipComments();
  Map<String,String> prefixes=new HashMap<String,String>();
  while (lexer.hasToken("String_Node_Str")) {
    lexer.token("String_Node_Str");
    String n=lexer.take();
    lexer.token("String_Node_Str");
    String v=lexer.readConstant("String_Node_Str");
    prefixes.put(n,v);
  }
  while (!lexer.hasToken("String_Node_Str")) {
    String srcs=readPrefix(prefixes,lexer);
    lexer.token("String_Node_Str");
    String sc=lexer.take();
    ConceptMapEquivalence eq=readEquivalence(lexer);
    String tgts=(eq != ConceptMapEquivalence.UNMATCHED) ? readPrefix(prefixes,lexer) : "String_Node_Str";
    ConceptMapGroupComponent g=getGroup(map,srcs,tgts);
    SourceElementComponent e=g.addElement();
    e.setCode(sc);
    TargetElementComponent tgt=e.addTarget();
    if (eq != ConceptMapEquivalence.EQUIVALENT)     tgt.setEquivalence(eq);
    if (tgt.getEquivalence() != ConceptMapEquivalence.UNMATCHED) {
      lexer.token("String_Node_Str");
      tgt.setCode(lexer.take());
    }
    if (lexer.hasComment())     tgt.setComments(lexer.take().substring(2).trim());
  }
  lexer.token("String_Node_Str");
}
Program: 23414
Project: 23414
Buggy source:
public StructureMap generateMapFromMappings(StructureDefinition sd) throws IOException, FHIRException {
  String id=getLogicalMappingId(sd);
  if (id == null)   return null;
  String prefix=ToolingExtensions.readStringExtension(sd,ToolingExtensions.EXT_MAPPING_PREFIX);
  String suffix=ToolingExtensions.readStringExtension(sd,ToolingExtensions.EXT_MAPPING_SUFFIX);
  if (prefix == null || suffix == null)   return null;
  StringBuilder b=new StringBuilder();
  b.append(prefix);
  ElementDefinition root=sd.getSnapshot().getElementFirstRep();
  String m=getMapping(root,id);
  if (m != null)   b.append(m + "String_Node_Str");
  addChildMappings(b,id,"String_Node_Str",sd,root,false);
  b.append("String_Node_Str");
  b.append(suffix);
  b.append("String_Node_Str");
  TextFile.stringToFile(b.toString(),"String_Node_Str");
  StructureMap map=parse(b.toString());
  map.setId(tail(map.getUrl()));
  map.getText().setStatus(NarrativeStatus.GENERATED);
  map.getText().setDiv(new XhtmlNode(NodeType.Element));
  map.getText().getDiv().addTag("String_Node_Str").addText(render(map));
  return map;
}

Fixed version (ground truth):
public StructureMap generateMapFromMappings(StructureDefinition sd) throws IOException, FHIRException {
  String id=getLogicalMappingId(sd);
  if (id == null)   return null;
  String prefix=ToolingExtensions.readStringExtension(sd,ToolingExtensions.EXT_MAPPING_PREFIX);
  String suffix=ToolingExtensions.readStringExtension(sd,ToolingExtensions.EXT_MAPPING_SUFFIX);
  if (prefix == null || suffix == null)   return null;
  StringBuilder b=new StringBuilder();
  b.append(prefix);
  ElementDefinition root=sd.getSnapshot().getElementFirstRep();
  String m=getMapping(root,id);
  if (m != null)   b.append(m + "String_Node_Str");
  addChildMappings(b,id,"String_Node_Str",sd,root,false);
  b.append("String_Node_Str");
  b.append(suffix);
  b.append("String_Node_Str");
  TextFile.stringToFile(b.toString(),"String_Node_Str");
  StructureMap map=parse(b.toString());
  map.setId(tail(map.getUrl()));
  map.getText().setStatus(NarrativeStatus.GENERATED);
  map.getText().setDiv(new XhtmlNode(NodeType.Element,"String_Node_Str"));
  map.getText().getDiv().addTag("String_Node_Str").addText(render(map));
  return map;
}
Program: 23416
Project: 23416
Buggy source:
private void parseSource(StructureMapGroupRuleComponent rule,FHIRLexer lexer) throws FHIRException {
  StructureMapGroupRuleSourceComponent source=rule.addSource();
  if (lexer.hasToken("String_Node_Str"))   lexer.next();
 else   source.setRequired(true);
  source.setContext(lexer.take());
  if (lexer.hasToken("String_Node_Str")) {
    lexer.token("String_Node_Str");
    source.setElement(lexer.take());
  }
  if (lexer.hasToken("String_Node_Str")) {
    lexer.token("String_Node_Str");
    String type=lexer.takeDottedToken();
    String min=lexer.take();
    lexer.token("String_Node_Str");
    String max=lexer.take();
  }
  if (Utilities.existsInList(lexer.getCurrent(),"String_Node_Str","String_Node_Str","String_Node_Str"))   if (lexer.getCurrent().equals("String_Node_Str")) {
    source.setListMode(StructureMapListMode.SHARE);
    lexer.take();
  }
 else   source.setListMode(StructureMapListMode.fromCode(lexer.take()));
  if (lexer.hasToken("String_Node_Str")) {
    lexer.take();
    source.setVariable(lexer.take());
  }
  if (lexer.hasToken("String_Node_Str")) {
    lexer.take();
    ExpressionNode node=fpe.parse(lexer);
    source.setUserData(MAP_WHERE_EXPRESSION,node);
    source.setCondition(node.toString());
  }
  if (lexer.hasToken("String_Node_Str")) {
    lexer.take();
    ExpressionNode node=fpe.parse(lexer);
    source.setUserData(MAP_WHERE_CHECK,node);
    source.setCheck(node.toString());
  }
}

Fixed version (ground truth):
private void parseSource(StructureMapGroupRuleComponent rule,FHIRLexer lexer) throws FHIRException {
  StructureMapGroupRuleSourceComponent source=rule.addSource();
  if (lexer.hasToken("String_Node_Str"))   lexer.next();
 else   source.setRequired(true);
  source.setContext(lexer.take());
  source.setContextType(StructureMapContextType.VARIABLE);
  if (lexer.hasToken("String_Node_Str")) {
    lexer.token("String_Node_Str");
    source.setElement(lexer.take());
  }
  if (lexer.hasToken("String_Node_Str")) {
    lexer.token("String_Node_Str");
    String type=lexer.takeDottedToken();
    String min=lexer.take();
    lexer.token("String_Node_Str");
    String max=lexer.take();
  }
  if (Utilities.existsInList(lexer.getCurrent(),"String_Node_Str","String_Node_Str","String_Node_Str"))   if (lexer.getCurrent().equals("String_Node_Str")) {
    source.setListMode(StructureMapListMode.SHARE);
    lexer.take();
  }
 else   source.setListMode(StructureMapListMode.fromCode(lexer.take()));
  if (lexer.hasToken("String_Node_Str")) {
    lexer.take();
    source.setVariable(lexer.take());
  }
  if (lexer.hasToken("String_Node_Str")) {
    lexer.take();
    ExpressionNode node=fpe.parse(lexer);
    source.setUserData(MAP_WHERE_EXPRESSION,node);
    source.setCondition(node.toString());
  }
  if (lexer.hasToken("String_Node_Str")) {
    lexer.take();
    ExpressionNode node=fpe.parse(lexer);
    source.setUserData(MAP_WHERE_CHECK,node);
    source.setCheck(node.toString());
  }
}
Program: 23417
Project: 23417
Buggy source:
public static void execute() throws Exception {
  ValidationEngineTests self=new ValidationEngineTests();
  self.testTransform();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public static void execute() throws Exception {
  ValidationEngineTests self=new ValidationEngineTests();
  self.test140Telus();
  System.out.println("String_Node_Str");
}
Program: 23420
Project: 23420
Buggy source:
private String getInputName(StructureMapGroupComponent g,StructureMapInputMode mode,String def) throws DefinitionException {
  String name=null;
  for (  StructureMapGroupInputComponent inp : g.getInput()) {
    if (inp.getMode() == mode)     if (name == null)     throw new DefinitionException("String_Node_Str");
 else     name=g.getName();
  }
  return name == null ? def : name;
}

Fixed version (ground truth):
private String getInputName(StructureMapGroupComponent g,StructureMapInputMode mode,String def) throws DefinitionException {
  String name=null;
  for (  StructureMapGroupInputComponent inp : g.getInput()) {
    if (inp.getMode() == mode)     if (name != null)     throw new DefinitionException("String_Node_Str");
 else     name=inp.getName();
  }
  return name == null ? def : name;
}
Program: 23421
Project: 23421
Buggy source:
private ConceptMapGroupComponent getGroup(ConceptMap map,String srcs,String tgts){
  for (  ConceptMapGroupComponent grp : map.getGroup()) {
    if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts))     return grp;
  }
  ConceptMapGroupComponent grp=map.addGroup();
  grp.setSource(srcs);
  grp.setTarget(tgts);
  return grp;
}

Fixed version (ground truth):
private ConceptMapGroupComponent getGroup(ConceptMap map,String srcs,String tgts){
  for (  ConceptMapGroupComponent grp : map.getGroup()) {
    if (grp.getSource().equals(srcs))     if ((tgts == null && !grp.hasTarget()) || (tgts != null && tgts.equals(grp.getTarget())))     return grp;
  }
  ConceptMapGroupComponent grp=map.addGroup();
  grp.setSource(srcs);
  grp.setTarget(tgts);
  return grp;
}
Program: 23422
Project: 23422
Buggy source:
private FhirFormat checkIsResource(String path){
  String ext=Utilities.getFileExtension(path);
  if (!Utilities.existsInList(ext,"String_Node_Str","String_Node_Str","String_Node_Str")) {
    try {
      Manager.parse(context,new FileInputStream(path),FhirFormat.XML);
      return FhirFormat.XML;
    }
 catch (    Exception e) {
    }
  }
  if (!Utilities.existsInList(ext,"String_Node_Str","String_Node_Str","String_Node_Str")) {
    try {
      Manager.parse(context,new FileInputStream(path),FhirFormat.JSON);
      return FhirFormat.JSON;
    }
 catch (    Exception e) {
    }
  }
  if (!Utilities.existsInList(ext,"String_Node_Str","String_Node_Str","String_Node_Str")) {
    try {
      Manager.parse(context,new FileInputStream(path),FhirFormat.TURTLE);
      return FhirFormat.TURTLE;
    }
 catch (    Exception e) {
    }
  }
  if (!Utilities.existsInList(ext,"String_Node_Str","String_Node_Str","String_Node_Str")) {
    try {
      new StructureMapUtilities(context,null,null).parse(TextFile.fileToString(path));
      return FhirFormat.TEXT;
    }
 catch (    Exception e) {
    }
  }
  return null;
}

Fixed version (ground truth):
private FhirFormat checkIsResource(String path){
  String ext=Utilities.getFileExtension(path);
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.XML;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.JSON;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.TURTLE;
  if (Utilities.existsInList(ext,"String_Node_Str"))   return FhirFormat.TEXT;
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.XML);
    return FhirFormat.XML;
  }
 catch (  Exception e) {
  }
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.JSON);
    return FhirFormat.JSON;
  }
 catch (  Exception e) {
  }
  try {
    Manager.parse(context,new FileInputStream(path),FhirFormat.TURTLE);
    return FhirFormat.TURTLE;
  }
 catch (  Exception e) {
  }
  try {
    new StructureMapUtilities(context,null,null).parse(TextFile.fileToString(path));
    return FhirFormat.TEXT;
  }
 catch (  Exception e) {
  }
  return null;
}
Program: 23423
Project: 23423
Buggy source:
public void loadIg(String src) throws IOException, FHIRException, Exception {
  String canonical=null;
  Map<String,byte[]> source=loadSource(src,"String_Node_Str");
  for (  Entry<String,byte[]> t : source.entrySet()) {
    String fn=t.getKey();
    Resource res=null;
    if (fn.endsWith("String_Node_Str"))     res=new XmlParser().parse(t.getValue());
 else     if (fn.endsWith("String_Node_Str"))     res=new JsonParser().parse(t.getValue());
 else     if (fn.endsWith("String_Node_Str"))     res=new StructureMapUtilities(context,null,null).parse(TextFile.bytesToString(t.getValue()));
    if (res != null && res instanceof BaseConformance) {
      context.seeResource(((BaseConformance)res).getUrl(),res);
    }
 else     if (res != null && res instanceof Questionnaire) {
      context.seeResource(((Questionnaire)res).getUrl(),res);
    }
    if (res instanceof ImplementationGuide)     canonical=((ImplementationGuide)res).getUrl();
  }
  if (canonical != null)   grabNatives(source,canonical);
}

Fixed version (ground truth):
public void loadIg(String src) throws IOException, FHIRException, Exception {
  String canonical=null;
  Map<String,byte[]> source=loadSource(src,"String_Node_Str");
  for (  Entry<String,byte[]> t : source.entrySet()) {
    String fn=t.getKey();
    Resource res=null;
    try {
      if (fn.endsWith("String_Node_Str"))       res=new XmlParser().parse(t.getValue());
 else       if (fn.endsWith("String_Node_Str"))       res=new JsonParser().parse(t.getValue());
 else       if (fn.endsWith("String_Node_Str"))       res=new StructureMapUtilities(context,null,null).parse(TextFile.bytesToString(t.getValue()));
    }
 catch (    Exception e) {
      throw new Exception("String_Node_Str" + fn + "String_Node_Str"+ e.getMessage(),e);
    }
    if (res != null && res instanceof BaseConformance) {
      context.seeResource(((BaseConformance)res).getUrl(),res);
    }
 else     if (res != null && res instanceof Questionnaire) {
      context.seeResource(((Questionnaire)res).getUrl(),res);
    }
    if (res instanceof ImplementationGuide)     canonical=((ImplementationGuide)res).getUrl();
  }
  if (canonical != null)   grabNatives(source,canonical);
}
Program: 23426
Project: 23426
Buggy source:
private void start(List<ValidationMessage> errors,Element resource,Element element,StructureDefinition defn,NodeStack stack) throws FHIRException, FHIRException {
  ResourceProfiles resourceProfiles=getResourceProfiles(resource);
  if (!resourceProfiles.isProcessed())   checkDeclaredProfiles(resourceProfiles,errors,resource,element,stack);
  if (!resourceProfiles.isProcessed()) {
    resourceProfiles.setProcessed();
    if (!resourceProfiles.hasProfiles() && (rule(errors,IssueType.STRUCTURE,element.line(),element.col(),stack.getLiteralPath(),defn.hasSnapshot(),"String_Node_Str"))) {
      validateElement(errors,defn,defn.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    }
    if (element.getType().equals("String_Node_Str"))     validateBundle(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateObservation(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateQuestionannaireResponse(errors,element,stack);
  }
 else {
    for (    ProfileUsage profileUsage : resourceProfiles.uncheckedProfiles()) {
      profileUsage.setChecked();
      validateElement(errors,profileUsage.getProfile(),profileUsage.getProfile().getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    }
  }
}

Fixed version (ground truth):
private void start(List<ValidationMessage> errors,Element resource,Element element,StructureDefinition defn,NodeStack stack) throws FHIRException, FHIRException {
  ResourceProfiles resourceProfiles=getResourceProfiles(resource);
  if (!resourceProfiles.isProcessed())   checkDeclaredProfiles(resourceProfiles,errors,resource,element,stack);
  if (!resourceProfiles.isProcessed()) {
    resourceProfiles.setProcessed();
    if (!resourceProfiles.hasProfiles() && (rule(errors,IssueType.STRUCTURE,element.line(),element.col(),stack.getLiteralPath(),defn.hasSnapshot(),"String_Node_Str"))) {
      validateElement(errors,defn,defn.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    }
    if (element.getType().equals("String_Node_Str"))     validateBundle(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateObservation(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateQuestionannaireResponse(errors,element,stack);
  }
  for (  ProfileUsage profileUsage : resourceProfiles.uncheckedProfiles()) {
    profileUsage.setChecked();
    validateElement(errors,profileUsage.getProfile(),profileUsage.getProfile().getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
  }
}
Program: 23430
Project: 23430
Buggy source:
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('\\');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}

Fixed version (ground truth):
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}
Program: 23431
Project: 23431
Buggy source:
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('\\');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}

Fixed version (ground truth):
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}
Program: 23432
Project: 23432
Buggy source:
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('\\');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}

Fixed version (ground truth):
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}
Program: 23433
Project: 23433
Buggy source:
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}

Fixed version (ground truth):
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
i++;
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}
Program: 23435
Project: 23435
Buggy source:
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}

Fixed version (ground truth):
private String processConstantString(String s) throws PathEngineException {
  StringBuilder b=new StringBuilder();
  int i=1;
  while (i < s.length() - 1) {
    char ch=s.charAt(i);
    if (ch == '\\') {
      i++;
switch (s.charAt(i)) {
case 't':
        b.append('\t');
      break;
case 'r':
    b.append('\r');
  break;
case 'n':
b.append('\n');
break;
case 'f':
b.append('\f');
break;
case '\'':
b.append('\'');
break;
case '\\':
b.append('\\');
break;
case '/':
b.append('/');
break;
case 'u':
i++;
int uc=Integer.parseInt(s.substring(i,i + 4),16);
b.append((char)uc);
i=i + 4;
break;
default :
throw new PathEngineException("String_Node_Str" + s.charAt(i));
}
i++;
}
 else {
b.append(ch);
i++;
}
}
return b.toString();
}
Program: 23437
Project: 23437
Buggy source:
private String makePathLink(ElementDefinition element){
  if (!element.hasName())   return element.getPath();
  if (!element.getPath().contains("String_Node_Str"))   return element.getName();
  return element.getPath().substring(0,element.getPath().lastIndexOf("String_Node_Str")) + "String_Node_Str" + element.getName();
}

Fixed version (ground truth):
private String makePathLink(ElementDefinition element){
  return element.getId();
}
Program: 23438
Project: 23438
Buggy source:
private void start(List<ValidationMessage> errors,Element resource,Element element,StructureDefinition defn,ValidationProfileSet profiles,NodeStack stack) throws FHIRException, FHIRException {
  if (rule(errors,IssueType.STRUCTURE,element.line(),element.col(),stack.getLiteralPath(),defn.hasSnapshot(),"String_Node_Str")) {
    validateElement(errors,defn,defn.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    if (profiles != null)     for (    StructureDefinition profile : profiles.getDefinitions())     validateElement(errors,profile,profile.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    checkDeclaredProfiles(errors,resource,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateBundle(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateObservation(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateQuestionannaireResponse(errors,element,stack);
  }
}

Fixed version (ground truth):
private void start(List<ValidationMessage> errors,Element resource,Element element,StructureDefinition defn,ValidationProfileSet profiles,NodeStack stack) throws FHIRException, FHIRException {
  if (rule(errors,IssueType.STRUCTURE,element.line(),element.col(),stack.getLiteralPath(),defn.hasSnapshot(),"String_Node_Str")) {
    if (profiles == null || profiles.empty())     validateElement(errors,defn,defn.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    if (profiles != null)     for (    StructureDefinition profile : profiles.getDefinitions())     validateElement(errors,profile,profile.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    checkDeclaredProfiles(errors,resource,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateBundle(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateObservation(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateQuestionannaireResponse(errors,element,stack);
  }
}
Program: 23439
Project: 23439
Buggy source:
private String makePathLink(ElementDefinition element){
  if (!element.hasName())   return element.getPath();
  if (!element.getPath().contains("String_Node_Str"))   return element.getName();
  return element.getPath().substring(0,element.getPath().lastIndexOf("String_Node_Str")) + "String_Node_Str" + element.getName();
}

Fixed version (ground truth):
private String makePathLink(ElementDefinition element){
  return element.getId();
}
Program: 23440
Project: 23440
Buggy source:
private void start(List<ValidationMessage> errors,Element resource,Element element,StructureDefinition defn,ValidationProfileSet profiles,NodeStack stack) throws FHIRException, FHIRException {
  if (rule(errors,IssueType.STRUCTURE,element.line(),element.col(),stack.getLiteralPath(),defn.hasSnapshot(),"String_Node_Str")) {
    if (profiles == null)     validateElement(errors,defn,defn.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    if (profiles != null)     for (    StructureDefinition profile : profiles.getDefinitions())     validateElement(errors,profile,profile.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    checkDeclaredProfiles(errors,resource,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateBundle(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateObservation(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateQuestionannaireResponse(errors,element,stack);
  }
}

Fixed version (ground truth):
private void start(List<ValidationMessage> errors,Element resource,Element element,StructureDefinition defn,ValidationProfileSet profiles,NodeStack stack) throws FHIRException, FHIRException {
  if (rule(errors,IssueType.STRUCTURE,element.line(),element.col(),stack.getLiteralPath(),defn.hasSnapshot(),"String_Node_Str")) {
    if (profiles == null || profiles.empty())     validateElement(errors,defn,defn.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    if (profiles != null)     for (    StructureDefinition profile : profiles.getDefinitions())     validateElement(errors,profile,profile.getSnapshot().getElement().get(0),null,null,resource,element,element.getName(),stack,false);
    checkDeclaredProfiles(errors,resource,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateBundle(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateObservation(errors,element,stack);
    if (element.getType().equals("String_Node_Str"))     validateQuestionannaireResponse(errors,element,stack);
  }
}
Program: 23441
Project: 23441
Buggy source:
private String makePathLink(ElementDefinition element){
  if (!element.hasName())   return element.getPath();
  if (!element.getPath().contains("String_Node_Str"))   return element.getName();
  return element.getPath().substring(0,element.getPath().lastIndexOf("String_Node_Str")) + "String_Node_Str" + element.getName();
}

Fixed version (ground truth):
private String makePathLink(ElementDefinition element){
  return element.getId();
}
Program: 23442
Project: 23442
Buggy source:
private String makePathLink(ElementDefinition element){
  if (!element.hasName())   return element.getPath();
  if (!element.getPath().contains("String_Node_Str"))   return element.getName();
  return element.getPath().substring(0,element.getPath().lastIndexOf("String_Node_Str")) + "String_Node_Str" + element.getName();
}

Fixed version (ground truth):
private String makePathLink(ElementDefinition element){
  return element.getId();
}
Program: 23443
Project: 23443
Buggy source:
public ExecutionTypeContext(Object appInfo,String resource,String context,TypeDetails thisItem){
  super();
  this.appInfo=appInfo;
  this.resource=resource;
  this.context=context;
}

Fixed version (ground truth):
public ExecutionTypeContext(Object appInfo,String resource,String context,TypeDetails thisItem){
  super();
  this.appInfo=appInfo;
  this.resource=resource;
  this.context=context;
  this.thisItem=thisItem;
}
Program: 23444
Project: 23444
Buggy source:
public ExecutionTypeContext(Object appInfo,String resource,String context,TypeDetails thisItem){
  super();
  this.appInfo=appInfo;
  this.resource=resource;
  this.context=context;
}

Fixed version (ground truth):
public ExecutionTypeContext(Object appInfo,String resource,String context,TypeDetails thisItem){
  super();
  this.appInfo=appInfo;
  this.resource=resource;
  this.context=context;
  this.thisItem=thisItem;
}
Program: 23445
Project: 23445
Buggy source:
public static void main(String[] args) throws Exception {
  CKMImporter self=new CKMImporter();
  for (  String s : new File("String_Node_Str").list()) {
    if (s.endsWith("String_Node_Str") && !s.contains("String_Node_Str")) {
      System.out.println("String_Node_Str" + s);
      org.hl7.fhir.dstu2016may.formats.XmlParser xp=new org.hl7.fhir.dstu2016may.formats.XmlParser();
      org.hl7.fhir.dstu2016may.model.Resource r14=xp.parse(new FileInputStream("String_Node_Str" + s));
      org.hl7.fhir.dstu3.model.Resource r17=VersionConvertor_14_20.convertResource(r14);
      org.hl7.fhir.dstu3.formats.XmlParser xc=new org.hl7.fhir.dstu3.formats.XmlParser();
      xc.setOutputStyle(OutputStyle.PRETTY);
      xc.compose(new FileOutputStream("String_Node_Str" + s),r17);
    }
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  CKMImporter self=new CKMImporter();
  for (  String s : new File("String_Node_Str").list()) {
    if (s.equals("String_Node_Str")) {
      System.out.println("String_Node_Str" + s);
      org.hl7.fhir.dstu2016may.formats.XmlParser xp=new org.hl7.fhir.dstu2016may.formats.XmlParser();
      org.hl7.fhir.dstu2016may.model.Resource r14=xp.parse(new FileInputStream("String_Node_Str" + s));
      org.hl7.fhir.dstu3.model.Resource r17=VersionConvertor_14_20.convertResource(r14);
      org.hl7.fhir.dstu3.formats.XmlParser xc=new org.hl7.fhir.dstu3.formats.XmlParser();
      xc.setOutputStyle(OutputStyle.PRETTY);
      xc.compose(new FileOutputStream("String_Node_Str" + s),r17);
    }
  }
  System.out.println("String_Node_Str");
}
Program: 23446
Project: 23446
Buggy source:
public static boolean isAbsoluteUrl(String ref){
  return ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str")|| ref.startsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isAbsoluteUrl(String ref){
  return ref != null && ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str") || ref.startsWith("String_Node_Str");
}
Program: 23447
Project: 23447
Buggy source:
/** 
 * @param element - the candidate that might be in the slice
 * @param path - for reporting any errors. the XPath for the element
 * @param slice - the definition of how slicing is determined
 * @param ed - the slice for which to test membership
 * @return
 * @throws DefinitionException 
 * @throws DefinitionException 
 * @throws Exception
 */
private boolean sliceMatches(Element element,String path,ElementDefinition slice,ElementDefinition ed,StructureDefinition profile) throws DefinitionException, FHIRException {
  if (!slice.getSlicing().hasDiscriminator())   return false;
  for (  StringType s : slice.getSlicing().getDiscriminator()) {
    String discriminator=s.getValue();
    ElementDefinition criteria=getCriteriaForDiscriminator(path,ed,discriminator,profile);
    if (discriminator.equals("String_Node_Str") && criteria.getPath().equals("String_Node_Str")) {
      if (!element.getNamedChildValue("String_Node_Str").equals(((UriType)criteria.getFixed()).asStringValue()))       return false;
    }
 else {
      Element value=getValueForDiscriminator(element,discriminator,criteria);
      if (!valueMatchesCriteria(value,criteria))       return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param element - the candidate that might be in the slice
 * @param path - for reporting any errors. the XPath for the element
 * @param slice - the definition of how slicing is determined
 * @param ed - the slice for which to test membership
 * @return
 * @throws DefinitionException 
 * @throws DefinitionException 
 * @throws Exception
 */
private boolean sliceMatches(Element element,String path,ElementDefinition slice,ElementDefinition ed,StructureDefinition profile) throws DefinitionException, FHIRException {
  if (!slice.getSlicing().hasDiscriminator())   return false;
  for (  StringType s : slice.getSlicing().getDiscriminator()) {
    String discriminator=s.getValue();
    ElementDefinition criteria=getCriteriaForDiscriminator(path,ed,discriminator,profile);
    if (discriminator.equals("String_Node_Str") && criteria.getPath().equals("String_Node_Str")) {
      if (criteria.getFixed() == null)       return false;
 else       if (!element.getNamedChildValue("String_Node_Str").equals(((UriType)criteria.getFixed()).asStringValue()))       return false;
    }
 else {
      Element value=getValueForDiscriminator(element,discriminator,criteria);
      if (!valueMatchesCriteria(value,criteria))       return false;
    }
  }
  return true;
}
Program: 23448
Project: 23448
Buggy source:
public String getDisplay(){
  return definition == null ? "String_Node_Str" : definition.getDisplay();
}

Fixed version (ground truth):
public String getDisplay(){
  return definition == null ? null : definition.getDisplay();
}