Program: 86994
Project: 86994
Buggy source:
@Override public void onInnerViewElementsSetUp(PassphraseCardHeader header){
  header.setTitle(getString(R.string.text_view_passphrase));
  passphraseTypeSpinner=header.getSpinner();
  passphraseAdapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_spinner_dropdown_item,Passphrase.passphraseTypes);
  passphraseTypeSpinner.setAdapter(passphraseAdapter);
  passphraseTypeSpinner.setSelection(Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD);
  selectedPassphrasetype=Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD;
  passphraseTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      passphraseEditText.setHint("String_Node_Str" + Passphrase.passphraseTypes[position]);
      passphraseConfirmationEditText.setHint("String_Node_Str" + Passphrase.passphraseTypes[position]);
      selectedPassphrasetype=position;
      if (position == Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD) {
        setPassphraseItemsEnabled(true);
        setPassphraseItemsVisible(true);
        setPatternTextViewVisible(false);
        passphraseEditText.setText("String_Node_Str");
        passphraseConfirmationEditText.setText("String_Node_Str");
        passphraseEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
        passphraseConfirmationEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
        passphraseEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        passphraseConfirmationEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        pattern=null;
        passphraseCard.doExpand();
      }
 else       if (position == Passphrase.INDEX_PASSPHRASE_TYPE_PIN) {
        setPassphraseItemsEnabled(true);
        setPassphraseItemsVisible(true);
        setPatternTextViewVisible(false);
        passphraseEditText.setText("String_Node_Str");
        passphraseConfirmationEditText.setText("String_Node_Str");
        passphraseEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD | InputType.TYPE_CLASS_NUMBER);
        passphraseConfirmationEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD | InputType.TYPE_CLASS_NUMBER);
        passphraseEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        passphraseConfirmationEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        pattern=null;
        passphraseCard.doExpand();
      }
 else       if (position == Passphrase.INDEX_PASSPHRASE_TYPE_PATTERN) {
        setPassphraseItemsEnabled(false);
        setPassphraseItemsVisible(false);
        setPatternTextViewVisible(true);
        passphraseCard.doExpand();
      }
 else       if (position == Passphrase.INDEX_PASSPHRASE_TYPE_NONE) {
        setPassphraseItemsEnabled(false);
        setPassphraseItemsVisible(false);
        setPatternTextViewVisible(false);
        pattern=null;
        passphraseCard.doCollapse();
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
      passphraseTypeSpinner.setSelection(Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD);
      selectedPassphrasetype=Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD;
      setPassphraseItemsEnabled(true);
      setPassphraseItemsVisible(true);
      passphraseEditText.setText("String_Node_Str");
      passphraseConfirmationEditText.setText("String_Node_Str");
      passphraseEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
      passphraseConfirmationEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
      passphraseEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
      passphraseConfirmationEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
      passphraseCard.doExpand();
    }
  }
);
}

Fixed version (ground truth):
@Override public void onInnerViewElementsSetUp(PassphraseCardHeader header){
  header.setTitle(getString(R.string.text_view_passphrase));
  passphraseTypeSpinner=header.getSpinner();
  passphraseAdapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_spinner_dropdown_item,Passphrase.masterPassphraseTypes);
  passphraseTypeSpinner.setAdapter(passphraseAdapter);
  passphraseTypeSpinner.setSelection(Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD);
  selectedPassphrasetype=Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD;
  passphraseTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      passphraseEditText.setHint("String_Node_Str" + Passphrase.passphraseTypes[position]);
      passphraseConfirmationEditText.setHint("String_Node_Str" + Passphrase.passphraseTypes[position]);
      selectedPassphrasetype=position;
      if (position == Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD) {
        setPassphraseItemsEnabled(true);
        setPassphraseItemsVisible(true);
        passphraseEditText.setText("String_Node_Str");
        passphraseConfirmationEditText.setText("String_Node_Str");
        passphraseEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
        passphraseConfirmationEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
        passphraseEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        passphraseConfirmationEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        passphraseCard.doExpand();
      }
 else       if (position == Passphrase.INDEX_PASSPHRASE_TYPE_PIN) {
        setPassphraseItemsEnabled(true);
        setPassphraseItemsVisible(true);
        passphraseEditText.setText("String_Node_Str");
        passphraseConfirmationEditText.setText("String_Node_Str");
        passphraseEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD | InputType.TYPE_CLASS_NUMBER);
        passphraseConfirmationEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD | InputType.TYPE_CLASS_NUMBER);
        passphraseEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        passphraseConfirmationEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        passphraseCard.doExpand();
      }
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
      passphraseTypeSpinner.setSelection(Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD);
      selectedPassphrasetype=Passphrase.INDEX_PASSPHRASE_TYPE_PASSWORD;
      setPassphraseItemsEnabled(true);
      setPassphraseItemsVisible(true);
      passphraseEditText.setText("String_Node_Str");
      passphraseConfirmationEditText.setText("String_Node_Str");
      passphraseEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
      passphraseConfirmationEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
      passphraseEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
      passphraseConfirmationEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
      passphraseCard.doExpand();
    }
  }
);
}