Buggy code:
public static final String SORT_SEPARATOR = "!" ; public static final String INTENT_TITLE = "TITLE" ; public static final String INTENT_SORT_ORDER = "SORTS" ; public static final String INTENT_CONTEXTS_FILTER = "CONTEXTS" ; public static final String INTENT_PROJECTS_FILTER = "PROJECTS" ; public static final String INTENT_PRIORITIES_FILTER = "PRIORITIES" ; public static final String INTENT_CONTEXTS_FILTER_NOT = "CONTEXTSnot" ; public static final String INTENT_PROJECTS_FILTER_NOT = "PROJECTSnot" ; public static final String INTENT_PRIORITIES_FILTER_NOT = "PRIORITIESnot" ; public static final String INTENT_HIDE_COMPLETED_FILTER = "HIDECOMPLETED" ; public static final String INTENT_HIDE_FUTURE_FILTER = "HIDEFUTURE" ; public static final String INTENT_HIDE_LISTS_FILTER = "HIDELISTS" ; public static final String INTENT_HIDE_TAGS_FILTER = "HIDETAGS" ; public static final String INTENT_SCRIPT_FILTER = "LUASCRIPT" ; public static final String INTENT_SCRIPT_TEST_TASK_FILTER = "LUASCRIPT_TEST_TASK" ; public static final String INTENT_EXTRA_DELIMITERS = "\n|," ; @ NotNull private ArrayList < Priority > m_prios = new ArrayList < Priority > ( ) ; private ArrayList < String > m_contexts = new ArrayList < String > ( ) ; private ArrayList < String > m_projects = new ArrayList < String > ( ) ; private ArrayList < String > m_sorts = new ArrayList < String > ( ) ; private boolean m_projectsNot = false ; @ Nullable private String m_search ; private boolean m_priosNot = false ; private boolean m_contextsNot = false ; private boolean m_hideCompleted = false ; private boolean m_hideFuture = false ; private boolean m_hideLists = false ; private boolean m_hideTags = false ; private String m_script = null ; private String m_script_test_task = null ; public String getPrefName ( ) { } @ Override public String toString ( ) { } public void setPrefName ( String mPrefName ) { } private String mPrefName ; private String mName ; public ActiveFilter ( ) { } public void initFromIntent ( @ NotNull Intent intent ) { } public void initFromPrefs ( @ NotNull SharedPreferences prefs ) { } public boolean hasFilter ( ) { } public String getTitle ( int visible , int total , CharSequence prio , CharSequence tag , CharSequence list , CharSequence search , CharSequence script , CharSequence filterApplied , CharSequence noFilter ) { } public String getProposedName ( ) { } public ArrayList < String > getSort ( @ Nullable String [ ] defaultSort ) { } public void saveInIntent ( @ Nullable Intent target ) { } public void saveInPrefs ( @ Nullable SharedPreferences prefs ) { } public void clear ( ) { } public void setSearch ( String search ) { } public String getSearch ( ) { } public ArrayList < String > getContexts ( ) { } public boolean getContextsNot ( ) { } public void setContextsNot ( boolean state ) { } public ArrayList < String > getProjects ( ) { } public boolean getProjectsNot ( ) { } @ NotNull public ArrayList < Priority > getPriorities ( ) { } public void setProjectsNot ( boolean state ) { } public void setContexts ( ArrayList < String > contexts ) { } public void setProjects ( ArrayList < String > projects ) { } @ NotNull public ArrayList < Task > apply ( @ NotNull List < Task > tasks ) { ActiveFilter . AndFilter filter = new ActiveFilter . AndFilter ( ) ; ArrayList < Task > matched = new ArrayList < Task > ( ) ; try { String script = getScript ( ) ; if ( script == null ) script = "" ; InputStream input = new ByteArrayInputStream ( script . getBytes ( ) ) ; Prototype prototype = instance . compile ( input , "script" ) ; Globals globals = JsePlatform . standardGlobals ( ) ; for ( Task t : tasks ) { if ( "" . equals ( t . inFileFormat ( ) . trim ( ) ) ) { continue ; } if ( ( t . isCompleted ( ) ) && ( this . getHideCompleted ( ) ) ) { continue ; } if ( ( t . inFuture ( ) ) && ( this . getHideFuture ( ) ) ) { continue ; } if ( ! ( filter . apply ( t ) ) ) { continue ; } <START_BUG> if ( ( m_script ) != null ) { <END_BUG> Util . initGlobals ( globals , t ) ; LuaClosure closure = new LuaClosure ( prototype , globals ) ; LuaValue result = closure . call ( ) ; if ( ! ( result . toboolean ( ) ) ) { continue ; } } matched . add ( t ) ; } } catch ( LuaError e ) { Log . v ( ActiveFilter . TAG , ( "Lua<seq2seq4repair_space>execution<seq2seq4repair_space>failed<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } catch ( IOException e ) { Log . v ( ActiveFilter . TAG , ( "Execution<seq2seq4repair_space>failed<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } return matched ; } public boolean getPrioritiesNot ( ) { } public void setPriorities ( ArrayList < String > prios ) { } public void setPrioritiesNot ( boolean prioritiesNot ) { } public void setSort ( ArrayList < String > sort ) { } public void setName ( String name ) { } public String getName ( ) { } public boolean getHideCompleted ( ) { } public boolean getHideFuture ( ) { } public boolean getHideLists ( ) { } public boolean getHideTags ( ) { } public void setHideCompleted ( boolean hide ) { } public void setHideFuture ( boolean hide ) { } public void setHideLists ( boolean hide ) { } public void setHideTags ( boolean hide ) { } public String getScript ( ) { } public void setScript ( String script ) { } public String getScriptTestTask ( ) { } public void setScriptTestTask ( String task ) { } private class AndFilter { @ NotNull private ArrayList < TaskFilter > filters = new ArrayList < TaskFilter > ( ) ; private AndFilter ( ) { }

Fix:
if ( ( ( m_script ) != null ) && ( ! ( m_script . trim ( ) . isEmpty ( ) ) ) ) {