Program: 15346
Project: 15346
Buggy source:
public static PostCommentListingURL parse(final Uri uri){
  final String[] pathSegments;
{
    final List<String> pathSegmentsList=uri.getPathSegments();
    final ArrayList<String> pathSegmentsFiltered=new ArrayList<>(pathSegmentsList.size());
    for (    String segment : pathSegmentsList) {
      while (segment.toLowerCase().endsWith("String_Node_Str") || segment.toLowerCase().endsWith("String_Node_Str")) {
        segment=segment.substring(0,segment.lastIndexOf('.'));
      }
      pathSegmentsFiltered.add(segment);
    }
    pathSegments=pathSegmentsFiltered.toArray(new String[pathSegmentsFiltered.size()]);
  }
  if (pathSegments.length == 1 && uri.getHost().equals("String_Node_Str")) {
    return new PostCommentListingURL(null,pathSegments[0],null,null,null,null);
  }
  if (pathSegments.length < 2) {
    return null;
  }
  int offset=0;
  if (pathSegments[0].equalsIgnoreCase("String_Node_Str")) {
    offset=2;
    if (pathSegments.length - offset < 2) {
      return null;
    }
  }
  if (!pathSegments[offset].equalsIgnoreCase("String_Node_Str")) {
    return null;
  }
  final String postId;
  String commentId=null;
  postId=pathSegments[offset + 1];
  offset+=2;
  if (pathSegments.length - offset >= 2) {
    commentId=pathSegments[offset + 1];
  }
  String after=null;
  Integer limit=null;
  Integer context=null;
  Sort order=null;
  for (  final String parameterKey : General.getUriQueryParameterNames(uri)) {
    if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      after=uri.getQueryParameter(parameterKey);
    }
 else     if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      try {
        limit=Integer.parseInt(uri.getQueryParameter(parameterKey));
      }
 catch (      Throwable ignored) {
      }
    }
 else     if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      try {
        context=Integer.parseInt(uri.getQueryParameter(parameterKey));
      }
 catch (      Throwable ignored) {
      }
    }
 else     if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      order=Sort.lookup(uri.getQueryParameter(parameterKey));
    }
  }
  return new PostCommentListingURL(after,postId,commentId,context,limit,order);
}

Fixed version (ground truth):
public static PostCommentListingURL parse(final Uri uri){
  final String[] pathSegments;
{
    final List<String> pathSegmentsList=uri.getPathSegments();
    final ArrayList<String> pathSegmentsFiltered=new ArrayList<>(pathSegmentsList.size());
    for (    String segment : pathSegmentsList) {
      while (General.asciiLowercase(segment).endsWith("String_Node_Str") || General.asciiLowercase(segment).endsWith("String_Node_Str")) {
        segment=segment.substring(0,segment.lastIndexOf('.'));
      }
      pathSegmentsFiltered.add(segment);
    }
    pathSegments=pathSegmentsFiltered.toArray(new String[pathSegmentsFiltered.size()]);
  }
  if (pathSegments.length == 1 && uri.getHost().equals("String_Node_Str")) {
    return new PostCommentListingURL(null,pathSegments[0],null,null,null,null);
  }
  if (pathSegments.length < 2) {
    return null;
  }
  int offset=0;
  if (pathSegments[0].equalsIgnoreCase("String_Node_Str")) {
    offset=2;
    if (pathSegments.length - offset < 2) {
      return null;
    }
  }
  if (!pathSegments[offset].equalsIgnoreCase("String_Node_Str")) {
    return null;
  }
  final String postId;
  String commentId=null;
  postId=pathSegments[offset + 1];
  offset+=2;
  if (pathSegments.length - offset >= 2) {
    commentId=pathSegments[offset + 1];
  }
  String after=null;
  Integer limit=null;
  Integer context=null;
  Sort order=null;
  for (  final String parameterKey : General.getUriQueryParameterNames(uri)) {
    if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      after=uri.getQueryParameter(parameterKey);
    }
 else     if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      try {
        limit=Integer.parseInt(uri.getQueryParameter(parameterKey));
      }
 catch (      Throwable ignored) {
      }
    }
 else     if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      try {
        context=Integer.parseInt(uri.getQueryParameter(parameterKey));
      }
 catch (      Throwable ignored) {
      }
    }
 else     if (parameterKey.equalsIgnoreCase("String_Node_Str")) {
      order=Sort.lookup(uri.getQueryParameter(parameterKey));
    }
  }
  return new PostCommentListingURL(after,postId,commentId,context,limit,order);
}