Program: 165205
Project: 165205
Buggy source:
/** 
 * Some basic sanitization of URLs, so that two URLs which have the same semantic meaning are represented by the exact same string by F-Droid. This will help to make sure that, e.g. "http://10.0.1.50" and "http://10.0.1.50/" are not two different repositories. <p> Currently it normalizes the path so that "/./" are removed and "test/../" is collapsed. This is done using   {@link URI#normalize()}. It also removes multiple consecutive forward slashes in the path and replaces them with one. Finally, it removes trailing slashes. <p>  {@code content://} URLs used for repos stored on removable storage get messed up by{@link URI}.
 */
private String normalizeUrl(String urlString) throws URISyntaxException {
  if (urlString == null) {
    return null;
  }
  Uri uri=Uri.parse(urlString);
  if (!uri.isAbsolute()) {
    throw new URISyntaxException(urlString,"String_Node_Str");
  }
  if (!uri.isHierarchical()) {
    throw new URISyntaxException(urlString,"String_Node_Str");
  }
  if ("String_Node_Str".equals(uri.getScheme())) {
    return uri.toString();
  }
  String path=uri.getPath();
  if (path != null) {
    path=path.replaceAll("String_Node_Str","String_Node_Str");
    if (path.length() > 0 && path.charAt(path.length() - 1) == '/') {
      path=path.substring(0,path.length() - 1);
    }
  }
  return new URI(uri.getScheme().toLowerCase(Locale.ENGLISH),uri.getUserInfo(),uri.getHost().toLowerCase(Locale.ENGLISH),uri.getPort(),path,uri.getQuery(),uri.getFragment()).normalize().toString();
}

Fixed version (ground truth):
/** 
 * Some basic sanitization of URLs, so that two URLs which have the same semantic meaning are represented by the exact same string by F-Droid. This will help to make sure that, e.g. "http://10.0.1.50" and "http://10.0.1.50/" are not two different repositories. <p> Currently it normalizes the path so that "/./" are removed and "test/../" is collapsed. This is done using   {@link URI#normalize()}. It also removes multiple consecutive forward slashes in the path and replaces them with one. Finally, it removes trailing slashes. <p>  {@code content://} URLs used for repos stored on removable storage get messed up by{@link URI}.
 */
private String normalizeUrl(String urlString) throws URISyntaxException {
  if (urlString == null) {
    return null;
  }
  Uri uri=Uri.parse(urlString);
  if (!uri.isAbsolute()) {
    throw new URISyntaxException(urlString,"String_Node_Str");
  }
  if (!uri.isHierarchical()) {
    throw new URISyntaxException(urlString,"String_Node_Str");
  }
  if ("String_Node_Str".equals(uri.getScheme())) {
    return uri.toString();
  }
  String path=uri.getPath();
  if (path != null) {
    path=path.replaceAll("String_Node_Str","String_Node_Str");
    if (path.length() > 0 && path.charAt(path.length() - 1) == '/') {
      path=path.substring(0,path.length() - 1);
    }
  }
  String scheme=uri.getScheme();
  String host=uri.getHost();
  if (TextUtils.isEmpty(scheme) || TextUtils.isEmpty(host)) {
    return urlString;
  }
  return new URI(scheme.toLowerCase(Locale.ENGLISH),uri.getUserInfo(),host.toLowerCase(Locale.ENGLISH),uri.getPort(),path,uri.getQuery(),uri.getFragment()).normalize().toString();
}