Program: 171181
Project: 171181
Buggy source:
public static Typeface findFont(Context context,String fontName,String defaultFont){
  if (cachedFontMap.containsKey(fontName)) {
    return cachedFontMap.get(fontName);
  }
 else {
    try {
      AssetManager assets=context.getResources().getAssets();
      if (Arrays.asList(assets.list("String_Node_Str")).contains(fontName)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),String.format("String_Node_Str",fontName));
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else       if (Arrays.asList(assets.list("String_Node_Str")).contains(fontName)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),String.format("String_Node_Str",fontName));
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else       if (Arrays.asList(assets.list("String_Node_Str")).contains(fontName)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),String.format("String_Node_Str",fontName));
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else {
        throw new Exception("String_Node_Str");
      }
    }
 catch (    Exception e) {
      if (!TextUtils.isEmpty(defaultFont)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),String.format("String_Node_Str",defaultFont));
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else {
        return Typeface.DEFAULT;
      }
    }
  }
}

Fixed version (ground truth):
public static Typeface findFont(Context context,String fonPath,String defaultFontPath){
  String fontName=new File(fonPath).getName();
  String defaultFontName="String_Node_Str";
  if (!TextUtils.isEmpty(defaultFontPath)) {
    defaultFontName=new File(defaultFontPath).getName();
  }
  if (cachedFontMap.containsKey(fontName)) {
    return cachedFontMap.get(fontName);
  }
 else {
    try {
      AssetManager assets=context.getResources().getAssets();
      if (Arrays.asList(assets.list("String_Node_Str")).contains(fonPath)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),fontName);
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else       if (Arrays.asList(assets.list("String_Node_Str")).contains(fontName)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),String.format("String_Node_Str",fontName));
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else       if (Arrays.asList(assets.list("String_Node_Str")).contains(fontName)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),String.format("String_Node_Str",fontName));
        cachedFontMap.put(fontName,typeface);
        return typeface;
      }
 else       if (!TextUtils.isEmpty(defaultFontPath) && Arrays.asList(assets.list("String_Node_Str")).contains(defaultFontPath)) {
        Typeface typeface=Typeface.createFromAsset(context.getAssets(),defaultFontPath);
        cachedFontMap.put(defaultFontName,typeface);
        return typeface;
      }
 else {
        throw new Exception("String_Node_Str");
      }
    }
 catch (    Exception e) {
      return Typeface.DEFAULT;
    }
  }
}