Buggy code:
public class EditLocaleAction extends BaseIntentionAction implements Iconable { private static final String ERROR_TITLE = "Edit<seq2seq4repair_space>Localization<seq2seq4repair_space>Error" ; private static final String INVALID_KEY = "Invalid<seq2seq4repair_space>localization<seq2seq4repair_space>key" ; private static final String INVALID_FILE = "Not<seq2seq4repair_space>a<seq2seq4repair_space>localization<seq2seq4repair_space>file" ; private static final String INVALID_TAG = "Tag<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>file.<seq2seq4repair_space>Synchronize<seq2seq4repair_space>you<seq2seq4repair_space>project<seq2seq4repair_space>and<seq2seq4repair_space>retry." ; private final VirtualFile localeFile ; private final String localeKey ; public EditLocaleAction ( String localeKey , VirtualFile localeFile ) { } @ Override public Icon getIcon ( @ IconFlags int flags ) { } @ NotNull @ Override public String getFamilyName ( ) { } @ Override public boolean isAvailable ( @ NotNull Project project , Editor editor , PsiFile file ) { } @ NotNull @ Override public String getText ( ) { } @ Override public void invoke ( @ NotNull final Project project , Editor editor , PsiFile file ) throws IncorrectOperationException { if ( ! ( EazeLocaleUtil . isValidKey ( localeKey ) ) ) { Messages . showErrorDialog ( project , EditLocaleAction . INVALID_KEY , EditLocaleAction . ERROR_TITLE ) ; return ; } <START_BUG> if ( EazeLocaleUtil . isLocaleFile ( localeFile , project ) ) { <END_BUG> Messages . showErrorDialog ( project , EditLocaleAction . INVALID_FILE , EditLocaleAction . ERROR_TITLE ) ; return ; } final PsiFile psiFile = PsiManager . getInstance ( project ) . findFile ( localeFile ) ; if ( psiFile == null ) { Messages . showErrorDialog ( project , EditLocaleAction . INVALID_FILE , EditLocaleAction . ERROR_TITLE ) ; return ; } final PsiDocumentManager manager = PsiDocumentManager . getInstance ( psiFile . getProject ( ) ) ; final Document document = manager . getDocument ( psiFile ) ; if ( document == null ) { Messages . showErrorDialog ( project , EditLocaleAction . INVALID_FILE , EditLocaleAction . ERROR_TITLE ) ; return ; } manager . doPostponedOperationsAndUnblockDocument ( document ) ; ApplicationManager . getApplication ( ) . runWriteAction ( new Runnable ( ) { @ Override public void run ( ) { XmlTag root = ( ( XmlFile ) ( psiFile ) ) . getRootTag ( ) ; if ( root == null ) { Messages . showErrorDialog ( project , EditLocaleAction . INVALID_FILE , EditLocaleAction . ERROR_TITLE ) ; return ; } XmlTag tag = EazeLocaleUtil . findTagForKey ( ( ( XmlFile ) ( psiFile ) ) , localeKey ) ; if ( ( tag == null ) || ( ! ( tag . isValid ( ) ) ) ) { Messages . showErrorDialog ( project , EditLocaleAction . INVALID_TAG , EditLocaleAction . ERROR_TITLE ) ; return ; } String originalText = EazeLocaleUtil . extractTagValue ( tag ) ; String text = Messages . showInputDialog ( project , ( "Enter<seq2seq4repair_space>text<seq2seq4repair_space>for<seq2seq4repair_space>key<seq2seq4repair_space>" + ( localeKey ) ) , EditLocaleAction . this . getText ( ) , null , originalText , new InputValidator ( ) { @ Override public boolean checkInput ( String inputString ) { return ( inputString != null ) && ( ! ( inputString . isEmpty ( ) ) ) ; } @ Override public boolean canClose ( String inputString ) { return ( inputString != null ) && ( ! ( inputString . isEmpty ( ) ) ) ; } } ) ; if ( ( text == null ) || ( text . isEmpty ( ) ) ) { return ; } tag . getValue ( ) . setText ( text ) ; manager . doPostponedOperationsAndUnblockDocument ( document ) ; manager . commitDocument ( document ) ; } } ) ; } }

Fix:
if ( ! ( EazeLocaleUtil . isLocaleFile ( localeFile , project ) ) ) {