Program: 23393
Project: 23393
Buggy source:
private void checkCodeableConcept(List<ValidationMessage> errors,String path,Element element,StructureDefinition profile,ElementDefinition theElementCntext){
  if (theElementCntext != null && theElementCntext.hasBinding()) {
    ElementDefinitionBindingComponent binding=theElementCntext.getBinding();
    if (warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,binding != null,"String_Node_Str" + path + "String_Node_Str")) {
      if (binding.hasValueSet() && binding.getValueSet() instanceof Reference) {
        ValueSet valueset=resolveBindingReference(profile,binding.getValueSet(),profile.getUrl());
        if (warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,valueset != null,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str")) {
          try {
            CodeableConcept cc=readAsCodeableConcept(element);
            if (!cc.hasCoding()) {
              if (binding.getStrength() == BindingStrength.REQUIRED)               rule(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl());
 else               if (binding.getStrength() == BindingStrength.EXTENSIBLE)               warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl());
            }
 else {
              long t=System.nanoTime();
              boolean bindingsOk=true;
              if (binding.getStrength() != BindingStrength.EXAMPLE) {
                boolean atLeastOneSystemIsSupported=false;
                for (                Coding nextCoding : cc.getCoding()) {
                  String nextSystem=nextCoding.getSystem();
                  if (isNotBlank(nextSystem) && context.supportsSystem(nextSystem)) {
                    atLeastOneSystemIsSupported=true;
                    break;
                  }
                }
                if (!atLeastOneSystemIsSupported && binding.getStrength() == BindingStrength.EXAMPLE) {
                }
 else {
                  ValidationResult vr=context.validateCode(cc,valueset);
                  txTime=txTime + (System.nanoTime() - t);
                  if (!vr.isOk()) {
                    bindingsOk=false;
                    if (vr.getErrorClass() == ExpansionErrorClass.VALUESET_UNSUPPORTED || vr.getErrorClass() == ExpansionErrorClass.NOSERVICE) {
                      if (binding.getStrength() == BindingStrength.REQUIRED)                       warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.EXTENSIBLE)                       warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.PREFERRED)                       hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
                    }
 else {
                      if (binding.getStrength() == BindingStrength.REQUIRED)                       rule(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.EXTENSIBLE)                       warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.PREFERRED)                       hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
                    }
                  }
 else                   if (vr.getMessage() != null)                   warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,vr.getMessage());
                }
                if (bindingsOk) {
                  for (                  Coding nextCoding : cc.getCoding()) {
                    String nextCode=nextCoding.getCode();
                    String nextSystem=nextCoding.getSystem();
                    if (isNotBlank(nextCode) && isNotBlank(nextSystem) && context.supportsSystem(nextSystem)) {
                      ValidationResult vr=context.validateCode(nextSystem,nextCode,null);
                      if (!vr.isOk()) {
                        warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str",nextCode,nextSystem);
                      }
                    }
                  }
                }
                txTime=txTime + (System.nanoTime() - t);
              }
            }
          }
 catch (          Exception e) {
            warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + e.getMessage() + "String_Node_Str");
          }
        }
      }
 else       if (binding.hasValueSet()) {
        hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str");
      }
 else       if (!noBindingMsgSuppressed) {
        hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + path + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void checkCodeableConcept(List<ValidationMessage> errors,String path,Element element,StructureDefinition profile,ElementDefinition theElementCntext){
  if (theElementCntext != null && theElementCntext.hasBinding()) {
    ElementDefinitionBindingComponent binding=theElementCntext.getBinding();
    if (warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,binding != null,"String_Node_Str" + path + "String_Node_Str")) {
      if (binding.hasValueSet() && binding.getValueSet() instanceof Reference) {
        ValueSet valueset=resolveBindingReference(profile,binding.getValueSet(),profile.getUrl());
        if (warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,valueset != null,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str")) {
          try {
            CodeableConcept cc=readAsCodeableConcept(element);
            if (!cc.hasCoding()) {
              if (binding.getStrength() == BindingStrength.REQUIRED)               rule(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl());
 else               if (binding.getStrength() == BindingStrength.EXTENSIBLE)               warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl());
            }
 else {
              long t=System.nanoTime();
              boolean bindingsOk=true;
              if (binding.getStrength() != BindingStrength.EXAMPLE) {
                boolean atLeastOneSystemIsSupported=false;
                for (                Coding nextCoding : cc.getCoding()) {
                  String nextSystem=nextCoding.getSystem();
                  if (isNotBlank(nextSystem) && context.supportsSystem(nextSystem)) {
                    atLeastOneSystemIsSupported=true;
                    break;
                  }
                }
                if (!atLeastOneSystemIsSupported && binding.getStrength() == BindingStrength.EXAMPLE) {
                }
 else {
                  ValidationResult vr=context.validateCode(cc,valueset);
                  txTime=txTime + (System.nanoTime() - t);
                  if (!vr.isOk()) {
                    bindingsOk=false;
                    if (vr.getErrorClass() == TerminologyServiceErrorClass.VALUESET_UNSUPPORTED || vr.getErrorClass() == TerminologyServiceErrorClass.NOSERVICE) {
                      if (binding.getStrength() == BindingStrength.REQUIRED)                       warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.EXTENSIBLE)                       warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.PREFERRED)                       hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
                    }
 else {
                      if (binding.getStrength() == BindingStrength.REQUIRED)                       rule(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.EXTENSIBLE)                       warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
 else                       if (binding.getStrength() == BindingStrength.PREFERRED)                       hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + describeReference(binding.getValueSet()) + "String_Node_Str"+ valueset.getUrl()+ "String_Node_Str");
                    }
                  }
 else                   if (vr.getMessage() != null)                   warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,vr.getMessage());
                }
                if (bindingsOk) {
                  for (                  Coding nextCoding : cc.getCoding()) {
                    String nextCode=nextCoding.getCode();
                    String nextSystem=nextCoding.getSystem();
                    if (isNotBlank(nextCode) && isNotBlank(nextSystem) && context.supportsSystem(nextSystem)) {
                      ValidationResult vr=context.validateCode(nextSystem,nextCode,null);
                      if (!vr.isOk()) {
                        warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str",nextCode,nextSystem);
                      }
                    }
                  }
                }
                txTime=txTime + (System.nanoTime() - t);
              }
            }
          }
 catch (          Exception e) {
            warning(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + e.getMessage() + "String_Node_Str");
          }
        }
      }
 else       if (binding.hasValueSet()) {
        hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str");
      }
 else       if (!noBindingMsgSuppressed) {
        hint(errors,IssueType.CODEINVALID,element.line(),element.col(),path,false,"String_Node_Str" + path + "String_Node_Str");
      }
    }
  }
}