[Demonstration 1]

[Buggy Method]
@Override
protected void poll() throws Exception {
    boolean is_gear_boss_up;
    double spool_speed;
    boolean in_action;
    is_gear_boss_up = Robot.getTable().getBoolean(com.snobot2017.SmartDashBoardNames.sGEAR_BOSS_SOLENOID, false);
    spool_speed = Robot.getTable().getNumber(com.snobot2017.SmartDashBoardNames.sROBOT_ROPE_MOTOR_SPEED, 0);
    in_action = Robot.getTable().getBoolean(com.snobot2017.SmartDashBoardNames.sSNOBOT_ACTION, false);
    if (mDrawer != null) {
        mDrawer.setGearBossPos(is_gear_boss_up);
        mDrawer.setSpoolMotorSpeed(spool_speed);
        mDrawer.setInAction(in_action);
    }
    repaint();
}

[Buggy Hunk]
in_action = Robot.getTable().getBoolean(com.snobot2017.SmartDashBoardNames.sSNOBOT_ACTION, false);

[Patch]
in_action = Robot.getTable().getBoolean(com.snobot2017.SmartDashBoardNames.sIN_ACTION, false);

[Demonstration 2]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //        Stetho.initializeWithDefaults(this);
    //        OkHttpClient client = new OkHttpClient();
    //        client.networkInterceptors().add(new StethoInterceptor());
    //        Stetho.initialize(
    //                Stetho.newInitializerBuilder(this)
    //                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
    //                        .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
    //                        .build());
    //
    //        client.networkInterceptors().add(new StethoInterceptor());
    setContentView(R.layout.drawer);
    Utility.setIsTabletPreference(this, findViewById(R.id.details_fragment) != null);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayShowTitleEnabled(false);
    if (savedInstanceState == null)
        Utility.setSortByPreference(this, 1);
    SyncAdapter.initializeSyncAdapter(this);
    mDrawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, mDrawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    mDrawer.setDrawerListener(toggle);
    toggle.syncState();
    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);
    navigationView.setItemIconTintList(null);
    navigationView.setItemTextColor(null);
    Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/RemachineScript_Personal_Use.ttf");
    TextView title = (TextView) findViewById(R.id.app_title);
    if (title != null)
        title.setTypeface(typeface);
}

[Buggy Hunk]
mDrawer.setDrawerListener(toggle);

[Patch]
mDrawer.addDrawerListener(toggle);

[Demonstration 3]

[Buggy Method]
@Test
public void testEqualsNullSafe() {
    assertFalse(new Goal().equals(null));
}

[Buggy Hunk]
assertFalse( new Goal().equals( null ) );

[Patch]
assertNotNull( new Goal() );