Program: 10995
Project: 10995
Buggy source:
@Override public Object visitTimeLiteral(@NotNull cqlParser.TimeLiteralContext ctx){
  String input=ctx.getText();
  if (input.startsWith("String_Node_Str")) {
    input=input.substring(1);
  }
  Pattern dateTimePattern=Pattern.compile("String_Node_Str");
  Matcher matcher=dateTimePattern.matcher(input);
  if (matcher.matches()) {
    try {
      Time result=of.createTime();
      int hour=Integer.parseInt(matcher.group(2));
      int minute=-1;
      int second=-1;
      int millisecond=-1;
      if (hour < 0 || hour > 24) {
        throw new IllegalArgumentException(String.format("String_Node_Str",input));
      }
      result.setHour(libraryBuilder.createLiteral(hour));
      if (matcher.group(4) != null) {
        minute=Integer.parseInt(matcher.group(4));
        if (minute < 0 || minute >= 60 || (hour == 24 && minute > 0)) {
          throw new IllegalArgumentException(String.format("String_Node_Str",input));
        }
        result.setMinute(libraryBuilder.createLiteral(minute));
      }
      if (matcher.group(6) != null) {
        second=Integer.parseInt(matcher.group(6));
        if (second < 0 || second >= 60 || (hour == 24 && second > 0)) {
          throw new IllegalArgumentException(String.format("String_Node_Str",input));
        }
        result.setSecond(libraryBuilder.createLiteral(second));
      }
      if (matcher.group(8) != null) {
        millisecond=Integer.parseInt(matcher.group(8));
        if (millisecond < 0 || (hour == 24 && millisecond > 0)) {
          throw new IllegalArgumentException(String.format("String_Node_Str",input));
        }
        result.setMillisecond(libraryBuilder.createLiteral(millisecond));
      }
      if (matcher.group(10) != null && matcher.group(10).equals("String_Node_Str")) {
        result.setTimezoneOffset(libraryBuilder.createLiteral(0.0));
      }
      if (matcher.group(12) != null) {
        int offsetPolarity=matcher.group(12).equals("String_Node_Str") ? 1 : 0;
        if (matcher.group(15) != null) {
          int hourOffset=Integer.parseInt(matcher.group(13));
          if (hourOffset < 0 || hourOffset > 14) {
            throw new IllegalArgumentException(String.format("String_Node_Str",input));
          }
          int minuteOffset=Integer.parseInt(matcher.group(15));
          if (minuteOffset < 0 || minuteOffset >= 60 || (hourOffset == 14 && minuteOffset > 0)) {
            throw new IllegalArgumentException(String.format("String_Node_Str",input));
          }
          result.setTimezoneOffset(libraryBuilder.createLiteral((double)(hourOffset + (minuteOffset / 60)) * offsetPolarity));
        }
 else {
          if (matcher.group(13) != null) {
            int hourOffset=Integer.parseInt(matcher.group(13));
            if (hourOffset < 0 || hourOffset > 14) {
              throw new IllegalArgumentException(String.format("String_Node_Str",input));
            }
            result.setTimezoneOffset(libraryBuilder.createLiteral((double)(hourOffset * offsetPolarity)));
          }
        }
      }
      result.setResultType(libraryBuilder.resolveTypeName("String_Node_Str","String_Node_Str"));
      return result;
    }
 catch (    RuntimeException e) {
      throw new IllegalArgumentException(String.format("String_Node_Str",input),e);
    }
  }
 else {
    throw new IllegalArgumentException(String.format("String_Node_Str",input));
  }
}

Fixed version (ground truth):
@Override public Object visitTimeLiteral(@NotNull cqlParser.TimeLiteralContext ctx){
  String input=ctx.getText();
  if (input.startsWith("String_Node_Str")) {
    input=input.substring(1);
  }
  Pattern dateTimePattern=Pattern.compile("String_Node_Str");
  Matcher matcher=dateTimePattern.matcher(input);
  if (matcher.matches()) {
    try {
      Time result=of.createTime();
      int hour=Integer.parseInt(matcher.group(2));
      int minute=-1;
      int second=-1;
      int millisecond=-1;
      if (hour < 0 || hour > 24) {
        throw new IllegalArgumentException(String.format("String_Node_Str",input));
      }
      result.setHour(libraryBuilder.createLiteral(hour));
      if (matcher.group(4) != null) {
        minute=Integer.parseInt(matcher.group(4));
        if (minute < 0 || minute >= 60 || (hour == 24 && minute > 0)) {
          throw new IllegalArgumentException(String.format("String_Node_Str",input));
        }
        result.setMinute(libraryBuilder.createLiteral(minute));
      }
      if (matcher.group(6) != null) {
        second=Integer.parseInt(matcher.group(6));
        if (second < 0 || second >= 60 || (hour == 24 && second > 0)) {
          throw new IllegalArgumentException(String.format("String_Node_Str",input));
        }
        result.setSecond(libraryBuilder.createLiteral(second));
      }
      if (matcher.group(8) != null) {
        millisecond=Integer.parseInt(matcher.group(8));
        if (millisecond < 0 || (hour == 24 && millisecond > 0)) {
          throw new IllegalArgumentException(String.format("String_Node_Str",input));
        }
        result.setMillisecond(libraryBuilder.createLiteral(millisecond));
      }
      if (matcher.group(10) != null && matcher.group(10).equals("String_Node_Str")) {
        result.setTimezoneOffset(libraryBuilder.createLiteral(0.0));
      }
      if (matcher.group(12) != null) {
        int offsetPolarity=matcher.group(12).equals("String_Node_Str") ? 1 : -1;
        if (matcher.group(15) != null) {
          int hourOffset=Integer.parseInt(matcher.group(13));
          if (hourOffset < 0 || hourOffset > 14) {
            throw new IllegalArgumentException(String.format("String_Node_Str",input));
          }
          int minuteOffset=Integer.parseInt(matcher.group(15));
          if (minuteOffset < 0 || minuteOffset >= 60 || (hourOffset == 14 && minuteOffset > 0)) {
            throw new IllegalArgumentException(String.format("String_Node_Str",input));
          }
          result.setTimezoneOffset(libraryBuilder.createLiteral((double)(hourOffset + (minuteOffset / 60)) * offsetPolarity));
        }
 else {
          if (matcher.group(13) != null) {
            int hourOffset=Integer.parseInt(matcher.group(13));
            if (hourOffset < 0 || hourOffset > 14) {
              throw new IllegalArgumentException(String.format("String_Node_Str",input));
            }
            result.setTimezoneOffset(libraryBuilder.createLiteral((double)(hourOffset * offsetPolarity)));
          }
        }
      }
      result.setResultType(libraryBuilder.resolveTypeName("String_Node_Str","String_Node_Str"));
      return result;
    }
 catch (    RuntimeException e) {
      throw new IllegalArgumentException(String.format("String_Node_Str",input),e);
    }
  }
 else {
    throw new IllegalArgumentException(String.format("String_Node_Str",input));
  }
}