Program: 170655
Project: 170655
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTitle(R.string.app_name);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,WindowManager.LayoutParams.FLAG_SECURE);
  setContentView(R.layout.activity_main);
  Toolbar toolbar=findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  PreferenceManager.setDefaultValues(this,R.xml.preferences,false);
  settings.registerPreferenceChangeListener(this);
  if (savedInstanceState == null)   requireAuthentication=true;
  setBroadcastCallback(new BroadcastReceivedCallback(){
    @Override public void onReceivedScreenOff(){
      requireAuthentication=true;
    }
  }
);
  if (!settings.getFirstTimeWarningShown()) {
    showFirstTimeWarning();
  }
  floatingActionMenu=new FloatingActionMenu(this,(ConstraintLayout)findViewById(R.id.fab_main_layout));
  floatingActionMenu.setFABHandler(new FloatingActionMenu.FABHandler(){
    @Override public void onQRFabClick(){
      scanQRCode();
    }
    @Override public void onManualFabClick(){
      enterDetails();
    }
  }
);
  final ProgressBar progressBar=findViewById(R.id.progressBar);
  RecyclerView recList=findViewById(R.id.cardList);
  recList.setHasFixedSize(true);
  LinearLayoutManager llm=new LinearLayoutManager(this);
  llm.setOrientation(LinearLayoutManager.VERTICAL);
  recList.setLayoutManager(llm);
  adapter=new EntriesCardAdapter(this);
  recList.setAdapter(adapter);
  recList.addOnScrollListener(new RecyclerView.OnScrollListener(){
    @Override public void onScrolled(    RecyclerView recyclerView,    int dx,    int dy){
      super.onScrolled(recyclerView,dx,dy);
      if (dy > 0) {
        floatingActionMenu.hide();
      }
 else {
        if (searchView == null || searchView.isIconified())         floatingActionMenu.show();
      }
    }
  }
);
  touchHelperCallback=new SimpleItemTouchHelperCallback(adapter);
  ItemTouchHelper touchHelper=new ItemTouchHelper(touchHelperCallback);
  touchHelper.attachToRecyclerView(recList);
  restoreSortMode();
  float durationScale=android.provider.Settings.Global.getFloat(this.getContentResolver(),android.provider.Settings.Global.ANIMATOR_DURATION_SCALE,0);
  final long animatorDuration=(long)(1000 / durationScale);
  adapter.setCallback(new EntriesCardAdapter.Callback(){
    @Override public void onMoveEventStart(){
      stopUpdater();
    }
    @Override public void onMoveEventStop(){
      startUpdater();
    }
  }
);
  handler=new Handler();
  handlerTask=new Runnable(){
    @Override public void run(){
      int progress=(int)(TokenCalculator.TOTP_DEFAULT_PERIOD - (System.currentTimeMillis() / 1000) % TokenCalculator.TOTP_DEFAULT_PERIOD);
      progressBar.setProgress(progress * 100);
      ObjectAnimator animation=ObjectAnimator.ofInt(progressBar,"String_Node_Str",(progress - 1) * 100);
      animation.setDuration(animatorDuration);
      animation.setInterpolator(new LinearInterpolator());
      animation.start();
      adapter.updateTokens();
      handler.postDelayed(this,1000);
    }
  }
;
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTitle(R.string.app_name);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,WindowManager.LayoutParams.FLAG_SECURE);
  setContentView(R.layout.activity_main);
  Toolbar toolbar=findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  PreferenceManager.setDefaultValues(this,R.xml.preferences,false);
  settings.registerPreferenceChangeListener(this);
  if (savedInstanceState == null)   requireAuthentication=true;
  setBroadcastCallback(new BroadcastReceivedCallback(){
    @Override public void onReceivedScreenOff(){
      requireAuthentication=true;
    }
  }
);
  if (!settings.getFirstTimeWarningShown()) {
    showFirstTimeWarning();
  }
  floatingActionMenu=new FloatingActionMenu(this,(ConstraintLayout)findViewById(R.id.fab_main_layout));
  floatingActionMenu.setFABHandler(new FloatingActionMenu.FABHandler(){
    @Override public void onQRFabClick(){
      scanQRCode();
    }
    @Override public void onManualFabClick(){
      enterDetails();
    }
  }
);
  final ProgressBar progressBar=findViewById(R.id.progressBar);
  RecyclerView recList=findViewById(R.id.cardList);
  recList.setHasFixedSize(true);
  LinearLayoutManager llm=new LinearLayoutManager(this);
  llm.setOrientation(LinearLayoutManager.VERTICAL);
  recList.setLayoutManager(llm);
  adapter=new EntriesCardAdapter(this);
  recList.setAdapter(adapter);
  recList.addOnScrollListener(new RecyclerView.OnScrollListener(){
    @Override public void onScrolled(    RecyclerView recyclerView,    int dx,    int dy){
      super.onScrolled(recyclerView,dx,dy);
      if (dy > 0) {
        floatingActionMenu.hide();
      }
 else {
        if (searchView == null || searchView.isIconified())         floatingActionMenu.show();
      }
    }
  }
);
  touchHelperCallback=new SimpleItemTouchHelperCallback(adapter);
  ItemTouchHelper touchHelper=new ItemTouchHelper(touchHelperCallback);
  touchHelper.attachToRecyclerView(recList);
  restoreSortMode();
  float durationScale=android.provider.Settings.Global.getFloat(this.getContentResolver(),android.provider.Settings.Global.ANIMATOR_DURATION_SCALE,0);
  if (durationScale == 0)   durationScale=1;
  final long animatorDuration=(long)(1000 / durationScale);
  adapter.setCallback(new EntriesCardAdapter.Callback(){
    @Override public void onMoveEventStart(){
      stopUpdater();
    }
    @Override public void onMoveEventStop(){
      startUpdater();
    }
  }
);
  handler=new Handler();
  handlerTask=new Runnable(){
    @Override public void run(){
      int progress=(int)(TokenCalculator.TOTP_DEFAULT_PERIOD - (System.currentTimeMillis() / 1000) % TokenCalculator.TOTP_DEFAULT_PERIOD);
      progressBar.setProgress(progress * 100);
      ObjectAnimator animation=ObjectAnimator.ofInt(progressBar,"String_Node_Str",(progress - 1) * 100);
      animation.setDuration(animatorDuration);
      animation.setInterpolator(new LinearInterpolator());
      animation.start();
      adapter.updateTokens();
      handler.postDelayed(this,1000);
    }
  }
;
}