Program: 35561
Project: 35561
Buggy source:
@OnClick(R.id.call_control_microphone) public void onMicrophoneClick(){
  if (getActivity() != null && EffortlessPermissions.hasPermissions(getActivity(),PERMISSIONS_MICROPHONE)) {
    if (getActivity() != null && !appPreferences.getPushToTalkIntroShown()) {
      spotlightView=new SpotlightView.Builder(getActivity()).introAnimationDuration(300).enableRevealAnimation(true).performClick(false).fadeinTextDuration(400).headingTvColor(getResources().getColor(R.color.colorPrimary)).headingTvSize(20).headingTvText(getResources().getString(R.string.nc_push_to_talk)).subHeadingTvColor(getResources().getColor(R.color.white)).subHeadingTvSize(16).subHeadingTvText(getResources().getString(R.string.nc_push_to_talk_desc)).maskColor(Color.parseColor("String_Node_Str")).target(microphoneControlButton).lineAnimDuration(400).lineAndArcColor(getResources().getColor(R.color.colorPrimary)).enableDismissAfterShown(true).dismissOnBackPress(true).usageId("String_Node_Str").show();
      appPreferences.setPushToTalkIntroShown(true);
    }
    if (!isPTTActive) {
      audioOn=!audioOn;
      if (audioOn) {
        microphoneControlButton.getFrontImageView().setImageResource(R.drawable.ic_mic_white_24px);
      }
 else {
        microphoneControlButton.getFrontImageView().setImageResource(R.drawable.ic_mic_off_white_24px);
      }
      toggleMedia(audioOn,false);
    }
 else {
      microphoneControlButton.getFrontImageView().setImageResource(R.drawable.ic_mic_white_24px);
      pulseAnimation.start();
      toggleMedia(true,false);
    }
    if (isVoiceOnlyCall && !inCall) {
      startCall();
    }
  }
 else   if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),PERMISSIONS_MICROPHONE)) {
    OpenAppDetailsDialogFragment.show(R.string.nc_microphone_permission_permanently_denied,R.string.nc_permissions_settings,(AppCompatActivity)getActivity());
  }
 else {
    requestPermissions(PERMISSIONS_MICROPHONE,100);
  }
}

Fixed version (ground truth):
@OnClick(R.id.call_control_microphone) public void onMicrophoneClick(){
  if (getActivity() != null && EffortlessPermissions.hasPermissions(getActivity(),PERMISSIONS_MICROPHONE)) {
    if (getActivity() != null && !appPreferences.getPushToTalkIntroShown()) {
      spotlightView=new SpotlightView.Builder(getActivity()).introAnimationDuration(300).enableRevealAnimation(true).performClick(false).fadeinTextDuration(400).headingTvColor(getResources().getColor(R.color.colorPrimary)).headingTvSize(20).headingTvText(getResources().getString(R.string.nc_push_to_talk)).subHeadingTvColor(getResources().getColor(R.color.white)).subHeadingTvSize(16).subHeadingTvText(getResources().getString(R.string.nc_push_to_talk_desc)).maskColor(Color.parseColor("String_Node_Str")).target(microphoneControlButton).lineAnimDuration(400).lineAndArcColor(getResources().getColor(R.color.colorPrimary)).enableDismissAfterShown(true).dismissOnBackPress(true).usageId("String_Node_Str").show();
      appPreferences.setPushToTalkIntroShown(true);
    }
    if (!isPTTActive) {
      audioOn=!audioOn;
      if (audioOn) {
        microphoneControlButton.getFrontImageView().setImageResource(R.drawable.ic_mic_white_24px);
      }
 else {
        microphoneControlButton.getFrontImageView().setImageResource(R.drawable.ic_mic_off_white_24px);
      }
      toggleMedia(audioOn,false);
    }
 else {
      microphoneControlButton.getFrontImageView().setImageResource(R.drawable.ic_mic_white_24px);
      pulseAnimation.start();
      toggleMedia(true,false);
    }
    if (isVoiceOnlyCall && !inCall) {
      startCall();
    }
  }
 else   if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(),PERMISSIONS_MICROPHONE)) {
    OpenAppDetailsDialogFragment.show(R.string.nc_microphone_permission_permanently_denied,R.string.nc_permissions_settings,(AppCompatActivity)getActivity());
  }
 else {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
      requestPermissions(PERMISSIONS_MICROPHONE,100);
    }
 else {
      onRequestPermissionsResult(100,PERMISSIONS_MICROPHONE,new int[]{1});
    }
  }
}