#vulnerable code 
                             @Override
	public Map<String, JSONObject> alert(JSONObject raw_message) {
		
		Map<String, JSONObject> alerts = new HashMap<String, JSONObject>();
		JSONObject content = (JSONObject) raw_message.get("message");

		JSONObject enrichment = null;
		if (raw_message.containsKey("enrichment"))
			enrichment = (JSONObject) raw_message.get("enrichment");

		for (String keyword : keywordList) {
			if (content.toString().contains(keyword)) {
				JSONObject alert = new JSONObject();

				String source = "unknown";
				String dest = "unknown";
				String host = "unknown";

				if (content.containsKey("ip_src_addr"))
				{
					source = content.get("ip_src_addr").toString();
					
					if(RangeChecker.checkRange(loaded_whitelist, source))
						host = source;				
				}

				if (content.containsKey("ip_dst_addr"))
				{
					dest = content.get("ip_dst_addr").toString();
					
					if(RangeChecker.checkRange(loaded_whitelist, dest))
						host = dest;	
				}

				alert.put("designated_host", host);
				alert.put("description", content.get("original_string").toString());
				alert.put("priority", "MED");	

				String alert_id = generateAlertId(source, dest, 0);

				alert.put("alert_id", alert_id);
				alerts.put(alert_id, alert);

				alert.put("enrichment", enrichment);

				return alerts;
			}
		}
		
		return null;
	} 
                            #location 36 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Override
	public Map<String, JSONObject> alert(JSONObject raw_message) {
		
		Map<String, JSONObject> alerts = new HashMap<String, JSONObject>();
		JSONObject content = (JSONObject) raw_message.get("message");

		JSONObject enrichment = null;
		if (raw_message.containsKey("enrichment"))
			enrichment = (JSONObject) raw_message.get("enrichment");

		for (String keyword : keywordList) {
			if (content.toString().contains(keyword)) {
				
				//check it doesn't have an "exception" keyword in it
				for (String exception : keywordExceptionList) {
					if (content.toString().contains(exception)) {
						return null;
					}
				}
				
				JSONObject alert = new JSONObject();

				String source = "unknown";
				String dest = "unknown";
				String host = "unknown";

				if (content.containsKey("ip_src_addr"))
				{
					source = content.get("ip_src_addr").toString();
					
					if(RangeChecker.checkRange(loaded_whitelist, source))
						host = source;				
				}

				if (content.containsKey("ip_dst_addr"))
				{
					dest = content.get("ip_dst_addr").toString();
					
					if(RangeChecker.checkRange(loaded_whitelist, dest))
						host = dest;	
				}

				alert.put("designated_host", host);
				alert.put("description", content.get("original_string").toString());
				alert.put("priority", "MED");	

				String alert_id = generateAlertId(source, dest, 0);

				alert.put("alert_id", alert_id);
				alerts.put(alert_id, alert);

				alert.put("enrichment", enrichment);

				return alerts;
			}
		}
		
		return null;
	}