Buggy code:
if ( CardEditor . ACTION_CREATE_FLASHCARD . equals ( intent . getAction ( ) ) ) { mSourceText = extras . getString ( CardEditor . SOURCE_TEXT ) ; mTargetText = extras . getString ( CardEditor . TARGET_TEXT ) ; } else { Pair < String , String > messages = new Pair < String , String > ( extras . getString ( EXTRA_SUBJECT ) , extras . getString ( EXTRA_TEXT ) ) ; Pair < String , String > cleanMessages = new com . ichi2 . filters . FilterFacade ( getBaseContext ( ) ) . filter ( messages ) ; mSourceText = cleanMessages . first ; mTargetText = cleanMessages . second ; } if ( ( ( mSourceText ) == null ) && ( ( mTargetText ) == null ) ) { finish ( ) ; return ; } if ( ( mSourceText . equals ( "Aedict<seq2seq4repair_space>Notepad" ) ) && ( addFromAedict ( mTargetText ) ) ) { finish ( ) ; return ; } mAddNote = true ; break ; } setNote ( mEditorNote ) ; if ( mAddNote ) { setTitle ( cardeditor_title_add_note ) ; String contents = null ; if ( ( mSourceText ) != null ) { if ( ( ( mAedictIntent ) && ( ( mEditFields . size ( ) ) == 3 ) ) && ( mTargetText . contains ( "[" ) ) ) { contents = mTargetText . replaceFirst ( "\\[" , "<seq2seq4repair_space>" ) ; contents = contents . substring ( 0 , ( ( contents . length ( ) ) - 1 ) ) ; } else { mEditFields . get ( 0 ) . setText ( mSourceText ) ; mEditFields . get ( 1 ) . setText ( mTargetText ) ; } } else { contents = intent . getStringExtra ( CardEditor . EXTRA_CONTENTS ) ; } if ( contents != null ) { setEditFieldTexts ( contents ) ; } LinearLayout modelButton = ( ( LinearLayout ) ( findViewById ( CardEditorModelButton ) ) ) ; modelButton . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { showDialog ( CardEditor . DIALOG_MODEL_SELECT ) ; } } ) ; modelButton . setVisibility ( VISIBLE ) ; mSave . setText ( getResources ( ) . getString ( add ) ) ; mCancel . setText ( getResources ( ) . getString ( close ) ) ; mLater . setVisibility ( VISIBLE ) ; mLater . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { String content = getFieldsText ( ) ; if ( ( content . length ( ) ) > ( ( mEditFields . size ( ) ) - 1 ) ) { MetaDB . saveIntentInformation ( CardEditor . this , content ) ; populateEditFields ( ) ; mSourceText = null ; mTargetText = null ; if ( ( ( mCaller ) == ( CardEditor . CALLER_INDICLASH ) ) || ( ( mCaller ) == ( CardEditor . CALLER_CARDEDITOR_INTENT_ADD ) ) ) { closeCardEditor ( ) ; } } } } ) ; } else { setTitle ( cardeditor_title_edit_card ) ; } ( ( LinearLayout ) ( findViewById ( R . id . CardEditorDeckButton ) ) ) . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { showDialog ( CardEditor . DIALOG_DECK_SELECT ) ; } } ) ; SharedPreferences preferences = PrefSettings . getSharedPrefs ( getBaseContext ( ) ) ; mPrefFixArabic = preferences . getBoolean ( "fixArabicText" , false ) ; if ( ( mPrefFixArabic ) && ( ! ( mAddNote ) ) ) { mSave . setEnabled ( false ) ; } ( ( LinearLayout ) ( findViewById ( R . id . CardEditorTagButton ) ) ) . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { showDialog ( CardEditor . DIALOG_TAGS_SELECT ) ; } } ) ; mSave . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( duplicateCheck ( true ) ) { return ; } boolean modified = false ; for ( CardEditor . FieldEditText f : mEditFields ) { <START_BUG> modified = modified || ( f . updateField ( ) ) ; <END_BUG> } if ( mAddNote ) { DeckTask . launchDeckTask ( TASK_TYPE_ADD_FACT , mSaveFactHandler , new DeckTask . TaskData ( mEditorNote ) ) ; } else { for ( String t : mCurrentTags ) { modified = modified || ( ! ( mEditorNote . hasTag ( t ) ) ) ; } modified = modified || ( ( mEditorNote . getTags ( ) . size ( ) ) > ( mCurrentTags . size ( ) ) ) ; boolean changedDid = ( mCurrentEditedCard . getDid ( ) ) != ( mCurrentDid ) ; modified = modified || changedDid ; if ( modified ) { mEditorNote . setTags ( mCurrentTags ) ; if ( changedDid ) { mCurrentEditedCard . setDid ( mCurrentDid ) ; if ( mMoveNoteTooToggle . isChecked ( ) ) { mEditorNote . setDid ( mCurrentDid ) ; } } CardEditor . mChanged = true ; } closeCardEditor ( ) ; } } } ) ; mCancel . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { closeCardEditor ( ) ; } } ) ; } private void reloadCollection ( final Bundle savedInstanceState ) { } private boolean addFromAedict ( String extra_text ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } @ Override protected void onDestroy ( ) { } @ Override protected void onSaveInstanceState ( Bundle outState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void registerExternalStorageListener ( ) { }

Fix:
modified = modified | ( f . updateField ( ) ) ;