public Set<AndroidMethod> parse() throws IOException {
		Set<AndroidMethod> methods = new HashSet<AndroidMethod>();
		
		BufferedReader rdr = readFile();
		
		String line = null;
		Pattern p = Pattern.compile(regex);
		
		while ((line = rdr.readLine()) != null) {
			Matcher m = p.matcher(line);
			if(m.find()) {
				CATEGORY cat = CATEGORY.valueOf(m.group(5));
				
				if(categories.contains(CATEGORY.ALL) || categories.contains(cat)){
					AndroidMethod method = parseMethod(m);
					method.setCategory(cat);
					
					if(isSources)
						method.setSource(true);
					else if(isSinks)
						method.setSink(true);
					else
						throw new RuntimeException("Oops, something went all wonky!");
					
					methods.add(method);
				}
			}
		}
		
		try {
			if (rdr != null)
				rdr.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		return methods;
	}