[Demonstration 1]

[Buggy Method]
public java.util.List<ws.monopoly.PlayerDetails> getPlayersDetails(java.lang.String gameName) throws ws.monopoly.GameDoesNotExists_Exception {
    if (engine.getGameName().equals(gameName))
        return engine.getPlayersDetails();
    throw new GameDoesNotExists_Exception("Game does not exists", new GameDoesNotExists());
}

[Buggy Hunk]
if (engine.getGameName().equals(gameName))

[Patch]
if (engine != null && engine.getGameName().equals(gameName))

[Demonstration 2]

[Buggy Method]
@Override
public void onDestroy() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
        //workaround - we need to delete subfragments manually
        if (!getActivity().isFinishing()) {
            //delete subfragment
            Fragment subfragment = getFragmentManager().findFragmentById(R.id.subfragment_container);
            if (subfragment != null) {
                FragmentTransaction transaction = getFragmentManager().beginTransaction();
                try {
                    transaction.detach(subfragment);
                } finally {
                    transaction.commitAllowingStateLoss();
                }
            }
        }
    }
    super.onDestroy();
}

[Buggy Hunk]
transaction.detach(subfragment);

[Patch]
transaction.remove(subfragment);