Buggy code:
public static final int CALLER_BIGWIDGET_EDIT = 3 ; public static final int CALLER_BIGWIDGET_ADD = 4 ; public static final int CALLER_CARDBROWSER_EDIT = 5 ; public static final int CALLER_CARDBROWSER_ADD = 6 ; public static final int CALLER_CARDEDITOR = 7 ; public static final int CALLER_CARDEDITOR_INTENT_ADD = 8 ; public static final int CALLER_INDICLASH = 9 ; public static final int REQUEST_ADD = 0 ; public static final int REQUEST_INTENT_ADD = 1 ; private BroadcastReceiver mUnmountReceiver = null ; private LinearLayout mFieldsLayoutContainer ; private HashMap < Long , Model > mModels ; private Button mSave ; private Button mCancel ; private Button mTags ; private LinearLayout mModelButtons ; private Button mModelButton ; private Button mSwapButton ; private Button mCardModelButton ; private StyledDialog mCardModelDialog ; private Fact mEditorFact ; private boolean mAddFact ; private boolean mAedictIntent ; private int mCaller ; private String mDeckPath ; private boolean mCardReset = false ; private Deck mDeck ; private Long mCurrentSelectedModelId ; private LinkedList < CardEditor . FieldEditText > mEditFields ; private LinkedHashMap < Long , CardModel > mCardModels ; private LinkedHashMap < Long , CardModel > mSelectedCardModels ; private LinkedHashMap < Long , CardModel > mNewSelectedCardModels ; private ArrayList < Long > cardModelIds = new ArrayList < Long > ( ) ; private int mCardItemBackground ; private ArrayList < HashMap < String , String > > mIntentInformation ; private SimpleAdapter mIntentInformationAdapter ; private StyledDialog mIntentInformationDialog ; private boolean mModified ; private String [ ] allTags ; private HashSet < String > mSelectedTags ; private String mFactTags ; private EditText mNewTagEditText ; private StyledDialog mTagsDialog ; private StyledProgressDialog mProgressDialog ; private String mSourceText ; private String mTargetText ; private int mSourcePosition = 0 ; private int mTargetPosition = 1 ; private boolean mCancelled = false ; private boolean mPrefFixArabic ; private int mFilledFields = 0 ; private TaskListener mSaveFactHandler = new DeckTask . TaskListener ( ) { @ Override public void onPreExecute ( ) { } @ Override public void onProgressUpdate ( DeckTask ... values ) { } @ Override public void onPostExecute ( DeckTask . TaskData result ) { } } ; @ Override protected void onCreate ( 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 ( ) { } private void loadContents ( ) { } private void prepareForIntentAddition ( ) { } private void finishNoStorageAvailable ( ) { } private void closeCardEditor ( ) { } @ Override protected Dialog onCreateDialog ( int id ) { } private StyledDialog createDialogTags ( Builder builder , Resources res ) { StyledDialog dialog = null ; builder . setTitle ( studyoptions_limit_select_tags ) ; builder . setPositiveButton ( res . getString ( select ) , new OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { String tags = mSelectedTags . toString ( ) ; mFactTags = tags . substring ( 1 , ( ( tags . length ( ) ) - 1 ) ) ; mTags . setText ( getResources ( ) . getString ( CardEditorTags , mFactTags ) ) ; } } ) ; builder . setNegativeButton ( res . getString ( cancel ) , null ) ; mNewTagEditText = ( ( EditText ) ( new EditText ( this ) ) ) ; mNewTagEditText . setHint ( add_new_tag ) ; InputFilter filter = new InputFilter ( ) { public CharSequence filter ( CharSequence source , int start , int end , Spanned dest , int dstart , int dend ) { for ( int i = start ; i < end ; i ++ ) { <START_BUG> if ( ! ( Character . isLetterOrDigit ( source . charAt ( i ) ) ) ) { <END_BUG> return "" ; } } return null ; } } ; mNewTagEditText . setFilters ( new InputFilter [ ] { filter } ) ; ImageView mAddTextButton = new ImageView ( this ) ; mAddTextButton . setImageResource ( ic_addtag ) ; mAddTextButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { String tag = mNewTagEditText . getText ( ) . toString ( ) ; if ( ( tag . length ( ) ) != 0 ) { for ( int i = 0 ; i < ( allTags . length ) ; i ++ ) { if ( allTags [ i ] . equalsIgnoreCase ( tag ) ) { mNewTagEditText . setText ( "" ) ; return ; } } mSelectedTags . add ( tag ) ; String [ ] oldTags = allTags ; allTags = new String [ ( oldTags . length ) + 1 ] ; allTags [ 0 ] = tag ; for ( int j = 1 ; j < ( allTags . length ) ; j ++ ) { allTags [ j ] = oldTags [ ( j - 1 ) ] ; } mTagsDialog . addMultiChoiceItems ( tag , true ) ; mNewTagEditText . setText ( "" ) ; } } } ) ; FrameLayout frame = new FrameLayout ( this ) ; FrameLayout . LayoutParams params = new FrameLayout . LayoutParams ( LayoutParams . WRAP_CONTENT , LayoutParams . WRAP_CONTENT , ( ( Gravity . RIGHT ) | ( Gravity . CENTER_VERTICAL ) ) ) ; params . rightMargin = 10 ; mAddTextButton . setLayoutParams ( params ) ; frame . addView ( mNewTagEditText ) ; frame . addView ( mAddTextButton ) ; builder . setView ( frame , false , true ) ; dialog = builder . create ( ) ; mTagsDialog = dialog ; return dialog ;

Fix:
if ( ( ( source . charAt ( i ) ) == '<seq2seq4repair_space>' ) || ( ( source . charAt ( i ) ) == ',' ) ) {