[Demonstration 1]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_nav_drawer);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    //pass user details from Main here
    basics = Basics.newInstance(user_details);
    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();
    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);
}

[Buggy Hunk]
basics=Basics.newInstance(user_details);//pass user details from Main here

[Patch]
Basics.current_balance.setText(user_details.getCurrent_balance());

[Demonstration 2]

[Buggy Method]
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
    FirebaseUser user = firebaseAuth.getCurrentUser();
    if (user != null) {
        // User is signed in
        Log.d("FIREBASE_AUTH", "onAuthStateChanged:signed_in:" + user.getUid());
    } else {
        // User is signed out
        Log.d("FIREBASE_AUTH", "onAuthStateChanged:signed_out");
    }
}

[Buggy Hunk]
FirebaseUser user = firebaseAuth.getCurrentUser();

[Patch]
user = firebaseAuth.getCurrentUser();

[Demonstration 3]

[Buggy Method]
public void unRegister() {
    if (locationManager == null)
        return;
    locationManager.removeGpsStatusListener(listener);
    locationManager = null;
}

[Buggy Hunk]
public void unRegister() {

[Patch]
public synchronized void unRegister() {