[Demonstration 1]

[Buggy Method]
private void initView(Context context, AttributeSet attrs) {
    mContext = context;
    //helper initialization
    viewHelper = new ViewHelper(context);
    animationHelper = new AnimationHelper(viewHelper);
    if (attrs != null) {
        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FABRevealMenu, 0, 0);
        //background
        mMenuBackground = a.getColor(R.styleable.FABRevealMenu_menuBackgroundColor, getColor(R.color.colorWhite));
        mOverlayBackground = a.getColor(R.styleable.FABRevealMenu_overlayBackground, getColor(R.color.colorOverlayDark));
        //menu
        mMenuRes = a.getResourceId(R.styleable.FABRevealMenu_menuRes, -1);
        //custom view
        int customView = a.getResourceId(R.styleable.FABRevealMenu_menuCustomView, -1);
        if (customView != -1) {
            mCustomView = LayoutInflater.from(context).inflate(customView, this, true);
        }
        //direction
        mDirection = Direction.fromId(a.getInt(R.styleable.FABRevealMenu_menuDirection, 0));
        //title
        mTitleTextColor = a.getColor(R.styleable.FABRevealMenu_menuTitleTextColor, getColor(android.R.color.white));
        mShowTitle = a.getBoolean(R.styleable.FABRevealMenu_showTitle, true);
        mShowOverlay = a.getBoolean(R.styleable.FABRevealMenu_showOverlay, true);
        //animation
        animateItems = a.getBoolean(R.styleable.FABRevealMenu_animateItems, true);
        a.recycle();
        //initialization
        if (mMenuRes != -1) {
            setMenu(mMenuRes);
        } else if (mCustomView != null) {
            setCustomView(mCustomView);
        }
    }
}

[Buggy Hunk]
mCustomView = LayoutInflater.from(context).inflate(customView, this, true);

[Patch]
mCustomView = LayoutInflater.from(context).inflate(customView, null);

[Demonstration 2]

[Buggy Method]
private void init(AttributeSet attrs) {
    if (!isInEditMode()) {
        int dropdownLayout = android.R.layout.simple_spinner_dropdown_item;
        int itemLayout = android.R.layout.simple_spinner_item;
        if (attrs != null) {
            TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.SpinnerCF);
            if (a.hasValue(R.styleable.SpinnerCF_spinner_item_resource)) {
                itemLayout = a.getResourceId(R.styleable.SpinnerCF_spinner_item_resource, itemLayout);
            }
            if (a.hasValue(R.styleable.SpinnerCF_spinner_dropdown_item_resource)) {
                itemLayout = a.getResourceId(R.styleable.SpinnerCF_spinner_dropdown_item_resource, dropdownLayout);
            }
            a.recycle();
        }
        Activity activity;
        if (getContext() instanceof Activity) {
            activity = (Activity) getContext();
        } else {
            ContextThemeWrapper ctw = (ContextThemeWrapper) getContext();
            activity = (Activity) ctw.getBaseContext();
        }
        adapterCF = new SpinnerAdapterCF(activity, itemLayout, dropdownLayout);
        this.setAdapter(adapterCF);
    }
}

[Buggy Hunk]
itemLayout = a.getResourceId(R.styleable.SpinnerCF_spinner_dropdown_item_resource, dropdownLayout);

[Patch]
dropdownLayout = a.getResourceId(R.styleable.SpinnerCF_spinner_dropdown_item_resource, dropdownLayout);

[Demonstration 3]

[Buggy Method]
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view;
    Intent intent = getActivity().getIntent();
    if (intent != null && ((intent.getBooleanExtra(Constants.KEY_STATION_NO_DATA, false)) || failed == true)) {
        view = inflater.inflate(R.layout.fragment_station_overview_no_data, container, false);
        Typeface font = Typeface.createFromAsset(getActivity().getAssets(), "fonts/fontawesome-webfont.ttf");
        TextView icon = (TextView) view.findViewById(R.id.error_icon);
        icon.setTypeface(font);
    } else {
        view = inflater.inflate(R.layout.fragment_station_overview, container, false);
        // TextView declaration
        temp = (TextView) view.findViewById(R.id.temp);
        windSpeed = (TextView) view.findViewById(R.id.windSpeed);
        airP = (TextView) view.findViewById(R.id.airP);
        humidity = (TextView) view.findViewById(R.id.humidity);
        updated = (TextView) view.findViewById(R.id.updated);
        spinner = (ProgressBar) view.findViewById(R.id.spinner);
        // setting spinner visible and loading text
        loadedView();
        // initiates asynctask and cancels it after 15 sec if it hasn't finished
        loadData();
        // ImageView declaration
        weatherWindow = (ImageView) view.findViewById(R.id.weatherWindow);
        // TableLayout declaration
        tableLayout = (TableLayout) view.findViewById(R.id.tableLayoutt);
    }
    return view;
}

[Buggy Hunk]
if(intent != null && ((intent.getBooleanExtra(Constants.KEY_STATION_NO_DATA, false)) || failed == true))

[Patch]
if(intent != null && ((intent.getBooleanExtra(Constants.KEY_STATION_NO_DATA, false)) || failed))