Program: 94323
Project: 94323
Buggy source:
/** 
 * Create views and add them to the view group
 */
private void addViews(){
  for (int i=0; i < mDigits; i++) {
    DigitView digitView=new DigitView(getContext());
    digitView.setWidth(mDigitWidth);
    digitView.setHeight(mDigitHeight);
    digitView.setBackgroundResource(mDigitBackground);
    digitView.setTextColor(mDigitTextColor);
    digitView.setTextSize(mDigitTextSize);
    digitView.setGravity(Gravity.CENTER);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      digitView.setElevation(mDigitElevation);
    }
    addView(digitView);
  }
  mEditText=new EditText(getContext());
  mEditText.setBackgroundColor(getResources().getColor(android.R.color.transparent));
  mEditText.setTextColor(getResources().getColor(android.R.color.transparent));
  mEditText.setCursorVisible(false);
  mEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mDigits)});
  mEditText.setInputType(InputType.TYPE_CLASS_NUMBER);
  mEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
  mEditText.setOnFocusChangeListener(new OnFocusChangeListener(){
    @Override public void onFocusChange(    View v,    boolean hasFocus){
      int length=mEditText.getText().length();
      for (int i=0; i < mDigits; i++) {
        getChildAt(i).setSelected(hasFocus && (mAccentType == ACCENT_ALL || (mAccentType == ACCENT_CHARACTER && (i == length || (i == mDigits - 1 && length == mDigits)))));
      }
      mEditText.setSelection(length);
      if (mOnFocusChangeListener != null) {
        mOnFocusChangeListener.onFocusChange(PinEntryView.this,hasFocus);
      }
    }
  }
);
  mEditText.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      int length=s.length();
      for (int i=0; i < mDigits; i++) {
        if (s.length() > i) {
          String mask=mMask == null || mMask.length() == 0 ? String.valueOf(s.charAt(i)) : mMask;
          ((TextView)getChildAt(i)).setText(mask);
        }
 else {
          ((TextView)getChildAt(i)).setText("String_Node_Str");
        }
        if (mEditText.hasFocus()) {
          getChildAt(i).setSelected(mAccentType == ACCENT_ALL || (mAccentType == ACCENT_CHARACTER && (i == length || (i == mDigits - 1 && length == mDigits))));
        }
      }
    }
  }
);
  addView(mEditText);
}

Fixed version (ground truth):
/** 
 * Create views and add them to the view group
 */
@TargetApi(21) private void addViews(){
  for (int i=0; i < mDigits; i++) {
    DigitView digitView=new DigitView(getContext());
    digitView.setWidth(mDigitWidth);
    digitView.setHeight(mDigitHeight);
    digitView.setBackgroundResource(mDigitBackground);
    digitView.setTextColor(mDigitTextColor);
    digitView.setTextSize(mDigitTextSize);
    digitView.setGravity(Gravity.CENTER);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      digitView.setElevation(mDigitElevation);
    }
    addView(digitView);
  }
  mEditText=new EditText(getContext());
  mEditText.setBackgroundColor(getResources().getColor(android.R.color.transparent));
  mEditText.setTextColor(getResources().getColor(android.R.color.transparent));
  mEditText.setCursorVisible(false);
  mEditText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mDigits)});
  mEditText.setInputType(InputType.TYPE_CLASS_NUMBER);
  mEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
  mEditText.setOnFocusChangeListener(new OnFocusChangeListener(){
    @Override public void onFocusChange(    View v,    boolean hasFocus){
      int length=mEditText.getText().length();
      for (int i=0; i < mDigits; i++) {
        getChildAt(i).setSelected(hasFocus && (mAccentType == ACCENT_ALL || (mAccentType == ACCENT_CHARACTER && (i == length || (i == mDigits - 1 && length == mDigits)))));
      }
      mEditText.setSelection(length);
      if (mOnFocusChangeListener != null) {
        mOnFocusChangeListener.onFocusChange(PinEntryView.this,hasFocus);
      }
    }
  }
);
  mEditText.addTextChangedListener(new TextWatcher(){
    @Override public void beforeTextChanged(    CharSequence s,    int start,    int count,    int after){
    }
    @Override public void onTextChanged(    CharSequence s,    int start,    int before,    int count){
    }
    @Override public void afterTextChanged(    Editable s){
      int length=s.length();
      for (int i=0; i < mDigits; i++) {
        if (s.length() > i) {
          String mask=mMask == null || mMask.length() == 0 ? String.valueOf(s.charAt(i)) : mMask;
          ((TextView)getChildAt(i)).setText(mask);
        }
 else {
          ((TextView)getChildAt(i)).setText("String_Node_Str");
        }
        if (mEditText.hasFocus()) {
          getChildAt(i).setSelected(mAccentType == ACCENT_ALL || (mAccentType == ACCENT_CHARACTER && (i == length || (i == mDigits - 1 && length == mDigits))));
        }
      }
    }
  }
);
  addView(mEditText);
}