package com.aware.plugin.term_collector;

import android.content.Context;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by wmb on 08.01.14.
 */
public class StopWords {
    private List<String> stopwords;

    public StopWords(Context context){
        this.stopwords = new ArrayList<String>();

        //GERMAN STOPWORDS by  Marco Götze, Steffen Geyer: http://solariz.de/649/deutsche-stopwords.htm;
        this.stopwords = new ArrayList<String>();

        InputStream buildinginfo = context.getResources().openRawResource(R.raw.stopwords);
        DataInputStream myDIS = new DataInputStream(buildinginfo);
        String myLine;

        //now loop through and check if we have input, if so append it to list
        try{
            while((myLine=myDIS.readLine())!=null) stopwords.add(myLine);
        } catch(IOException e){
            e.printStackTrace();
        }
    }

    public String[] filteredArray(String[] arrayToFilter) {
    ArrayList<String> resultList = new ArrayList<String>();
        for(String token : arrayToFilter ){
            if(!stopwords.contains(token.toLowerCase())){
                resultList.add(token);
            }
        }
    String[] result = new String[resultList.size()];
    return(resultList.toArray(result));
    }

    public boolean isStopWord(String token){
        return stopwords.contains(token.toLowerCase());
    }
}

@@ -201,19 +201,22 @@
 va.util.
-Lis
+HashSe
 t;%0A%0A/**%0A
@@ -287,19 +287,22 @@
 private 
-Lis
+HashSe
 t%3CString
@@ -358,59 +358,8 @@
 t)%7B%0A
-        this.stopwords = new ArrayList%3CString%3E();%0A%0A
     
@@ -484,32 +484,30 @@
 words = new 
-ArrayLis
+HashSe
 t%3CString%3E();

Use HashSet instead of List