Program: 104928
Project: 104928
Buggy source:
@Override public void onClick(View v){
  if (v.getTag() instanceof ContentView.AppForUrl) {
    ContentView.AppForUrl appForUrl=(ContentView.AppForUrl)v.getTag();
    if (MainApplication.loadIntent(getContext(),appForUrl.mResolveInfo.activityInfo.packageName,appForUrl.mResolveInfo.activityInfo.name,appForUrl.mUrl.toString(),-1,true)) {
      if (mOnOpenInAppClickListener != null) {
        mOnOpenInAppClickListener.onAppOpened();
      }
    }
  }
 else {
    if (mAppsForUrl != null && mAppsForUrl.size() > 1) {
      ArrayList<ResolveInfo> resolveInfos=new ArrayList<ResolveInfo>();
      for (      ContentView.AppForUrl item : mAppsForUrl) {
        resolveInfos.add(item.mResolveInfo);
      }
      AlertDialog dialog=ActionItem.getActionItemPickerAlert(getContext(),resolveInfos,R.string.pick_default_app,new ActionItem.OnActionItemDefaultSelectedListener(){
        @Override public void onSelected(        ActionItem actionItem,        boolean always){
          ContentView.AppForUrl appForUrl=getAppForUrl(actionItem.mPackageName,actionItem.mActivityClassName);
          if (appForUrl != null) {
            if (always) {
              Settings.get().setDefaultApp(appForUrl.mUrl.toString(),appForUrl.mResolveInfo);
            }
            if (MainApplication.loadIntent(getContext(),appForUrl.mResolveInfo.activityInfo.packageName,appForUrl.mResolveInfo.activityInfo.name,appForUrl.mUrl.toString(),-1,true)) {
              if (mOnOpenInAppClickListener != null) {
                mOnOpenInAppClickListener.onAppOpened();
              }
            }
          }
        }
      }
);
      dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
      Util.showThemedDialog(dialog);
    }
  }
}

Fixed version (ground truth):
@Override public void onClick(View v){
  if (v.getTag() instanceof ContentView.AppForUrl) {
    ContentView.AppForUrl appForUrl=(ContentView.AppForUrl)v.getTag();
    if (MainApplication.loadIntent(getContext(),appForUrl.mResolveInfo.activityInfo.packageName,appForUrl.mResolveInfo.activityInfo.name,appForUrl.mUrl.toString(),-1,true)) {
      if (mOnOpenInAppClickListener != null) {
        mOnOpenInAppClickListener.onAppOpened();
      }
    }
  }
 else {
    if (mAppsForUrl != null && mAppsForUrl.size() > 1) {
      ArrayList<ResolveInfo> resolveInfos=new ArrayList<ResolveInfo>();
      for (      ContentView.AppForUrl item : mAppsForUrl) {
        resolveInfos.add(item.mResolveInfo);
      }
      if (0 != resolveInfos.size()) {
        AlertDialog dialog=ActionItem.getActionItemPickerAlert(getContext(),resolveInfos,R.string.pick_default_app,new ActionItem.OnActionItemDefaultSelectedListener(){
          @Override public void onSelected(          ActionItem actionItem,          boolean always){
            ContentView.AppForUrl appForUrl=getAppForUrl(actionItem.mPackageName,actionItem.mActivityClassName);
            if (appForUrl != null) {
              if (always) {
                Settings.get().setDefaultApp(appForUrl.mUrl.toString(),appForUrl.mResolveInfo);
              }
              if (MainApplication.loadIntent(getContext(),appForUrl.mResolveInfo.activityInfo.packageName,appForUrl.mResolveInfo.activityInfo.name,appForUrl.mUrl.toString(),-1,true)) {
                if (mOnOpenInAppClickListener != null) {
                  mOnOpenInAppClickListener.onAppOpened();
                }
              }
            }
          }
        }
);
        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        Util.showThemedDialog(dialog);
      }
    }
  }
}