Program: 94324
Project: 94324
Buggy source:
/** 
 * Create views and add them to the view group
 */
private void addViews(){
  for (int i=0; i < digits; i++) {
    DigitView digitView=new DigitView(getContext());
    digitView.setWidth(digitWidth);
    digitView.setHeight(digitHeight);
    digitView.setBackgroundResource(digitBackground);
    digitView.setTextColor(digitTextColor);
    digitView.setTextSize(digitTextSize);
    digitView.setGravity(Gravity.CENTER);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      digitView.setElevation(digitElevation);
    }
    addView(digitView);
  }
  editText=new EditText(getContext());
  editText.setBackgroundColor(getResources().getColor(android.R.color.transparent));
  editText.setTextColor(getResources().getColor(android.R.color.transparent));
  editText.setCursorVisible(false);
  editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(digits)});
  editText.setInputType(inputType);
  editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
  editText.setOnFocusChangeListener(new OnFocusChangeListener(){
    @Override public void onFocusChange(    View v,    boolean hasFocus){
      int length=editText.getText().length();
      for (int i=0; i < digits; i++) {
        getChildAt(i).setSelected(hasFocus && (accentType == ACCENT_ALL || (accentType == ACCENT_CHARACTER && (i == length || (i == digits - 1 && length == digits)))));
      }
      editText.setSelection(length);
      if (onFocusChangeListener != null) {
        onFocusChangeListener.onFocusChange(PinEntryView.this,hasFocus);
      }
    }
  }
);
  editText.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 < digits; i++) {
        if (s.length() > i) {
          String mask=PinEntryView.this.mask == null || PinEntryView.this.mask.length() == 0 ? String.valueOf(s.charAt(i)) : PinEntryView.this.mask;
          ((TextView)getChildAt(i)).setText(mask);
        }
 else {
          ((TextView)getChildAt(i)).setText("String_Node_Str");
        }
        if (editText.hasFocus()) {
          getChildAt(i).setSelected(accentType == ACCENT_ALL || (accentType == ACCENT_CHARACTER && (i == length || (i == digits - 1 && length == digits))));
        }
      }
      if (length == digits && onPinEnteredListener != null) {
        onPinEnteredListener.onPinEntered(s.toString());
      }
    }
  }
);
  addView(editText);
}

Fixed version (ground truth):
/** 
 * Create views and add them to the view group
 */
private void addViews(){
  for (int i=0; i < digits; i++) {
    DigitView digitView=new DigitView(getContext());
    digitView.setWidth(digitWidth);
    digitView.setHeight(digitHeight);
    digitView.setBackgroundResource(digitBackground);
    digitView.setTextColor(digitTextColor);
    digitView.setTextSize(TypedValue.COMPLEX_UNIT_PX,digitTextSize);
    digitView.setGravity(Gravity.CENTER);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      digitView.setElevation(digitElevation);
    }
    addView(digitView);
  }
  editText=new EditText(getContext());
  editText.setBackgroundColor(getResources().getColor(android.R.color.transparent));
  editText.setTextColor(getResources().getColor(android.R.color.transparent));
  editText.setCursorVisible(false);
  editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(digits)});
  editText.setInputType(inputType);
  editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
  editText.setOnFocusChangeListener(new OnFocusChangeListener(){
    @Override public void onFocusChange(    View v,    boolean hasFocus){
      int length=editText.getText().length();
      for (int i=0; i < digits; i++) {
        getChildAt(i).setSelected(hasFocus && (accentType == ACCENT_ALL || (accentType == ACCENT_CHARACTER && (i == length || (i == digits - 1 && length == digits)))));
      }
      editText.setSelection(length);
      if (onFocusChangeListener != null) {
        onFocusChangeListener.onFocusChange(PinEntryView.this,hasFocus);
      }
    }
  }
);
  editText.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 < digits; i++) {
        if (s.length() > i) {
          String mask=PinEntryView.this.mask == null || PinEntryView.this.mask.length() == 0 ? String.valueOf(s.charAt(i)) : PinEntryView.this.mask;
          ((TextView)getChildAt(i)).setText(mask);
        }
 else {
          ((TextView)getChildAt(i)).setText("String_Node_Str");
        }
        if (editText.hasFocus()) {
          getChildAt(i).setSelected(accentType == ACCENT_ALL || (accentType == ACCENT_CHARACTER && (i == length || (i == digits - 1 && length == digits))));
        }
      }
      if (length == digits && onPinEnteredListener != null) {
        onPinEnteredListener.onPinEntered(s.toString());
      }
    }
  }
);
  addView(editText);
}