Buggy code:
public class InterpreterFragment extends Fragment implements RecognitionListener { private InterpreterFragment . OnFragmentInteractionListener mListener ; private View mRootView ; private ListView mListView ; private ImageView mBtnRecord ; private ImageView mBtnStop ; private SpeechRecognizer mSpeechRecognizer ; private Boolean mIsListening = false ; private ArrayList < String > mSpeechList = new ArrayList < String > ( ) ; private InterpreterFragment . SpeechBubbleAdapter mSpeechBubbleAdapter ; private Object mRecognizerLock = new Object ( ) ; private ConversationRepository mConversationRepository ; byte [ ] mBuffer ; private ImageView mAvatar_a ; private ImageView mAvatar_b ; private ImageView mAvatar_c ; private ImageView mAvatar_d ; private ArrayList < ImageView > avatar_List = new ArrayList < > ( ) ; public static InterpreterFragment newInstance ( ) { } public InterpreterFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void findViews ( ) { } public void onButtonPressed ( Uri uri ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void onReadyForSpeech ( Bundle params ) { } @ Override public void onBeginningOfSpeech ( ) { } @ Override public void onRmsChanged ( float rmsdB ) { } @ Override public void onBufferReceived ( byte [ ] buffer ) { } @ Override public void onEndOfSpeech ( ) { } @ Override public void onError ( int error ) { } @ Override public void onResults ( Bundle results ) { } private void saveSrc ( byte [ ] mBuffer , String filePath ) { } @ Override public void onPartialResults ( Bundle partialResults ) { } @ Override public void onEvent ( int eventType , Bundle params ) { } public interface OnFragmentInteractionListener { public void onFragmentInteraction ( Uri uri ) { } } @ Override public void onStart ( ) { super . onStart ( ) ; boolean isSupport = SpeechRecognizer . isRecognitionAvailable ( getActivity ( ) ) ; if ( isSupport ) { mSpeechRecognizer = SpeechRecognizer . createSpeechRecognizer ( getActivity ( ) . getApplicationContext ( ) ) ; mSpeechRecognizer . setRecognitionListener ( this ) ; } setupListView ( ) ; mBtnRecord . setEnabled ( isSupport ) ; mBtnRecord . setOnClickListener ( mOnClickListener ) ; mBtnStop . setEnabled ( isSupport ) ; <START_BUG> mBtnRecord . setOnClickListener ( mOnClickListener ) ; <END_BUG> mConversationRepository = ConversationRepository . getInstance ( getActivity ( ) ) ; mConversationRepository . load ( ) ; } private OnClickListener mOnClickListener = new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; private void startListening ( ) { } private void stopListening ( ) { } @ Override public void onStop ( ) { } @ Override public void setUserVisibleHint ( boolean isVisibleToUser ) { } private void resetRecognizer ( ) { } private void setupListView ( ) { } private class SpeechBubbleAdapter extends BaseAdapter { private Context mContext = null ; private LayoutInflater mInflater = null ; private ArrayList < String > mAdapterList ; public class ViewHolder { public TextView mTitleView ; } public SpeechBubbleAdapter ( Context context , ArrayList < String > list ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } } private void show_next_avatar ( ) { } }

Fix:
mBtnStop . setOnClickListener ( mOnClickListener ) ;