// Path: src/main/java/com/github/sunnybat/paxchecker/DataTracker.java
// public class DataTracker {
// 
// 	private static long dataUsed;
// 
// 	/**
// 	 * Adds an amount of data (in bytes) used by the program. This should be called whenever a network
// 	 * connection is made.
// 	 *
// 	 * @param data The amount of data (in bytes) to add to the total data used
// 	 */
// 	public static synchronized void addDataUsed(long data) {
// 		dataUsed += data;
// 	}
// 
// 	/**
// 	 * Gets the amount of data (in bytes) used by the program.
// 	 *
// 	 * @return The amount of data (in bytes) used by the program
// 	 */
// 	public static synchronized long getDataUsed() {
// 		return dataUsed;
// 	}
// 
// 	/**
// 	 * Gets the amount of data in megabytes used by the program. Note that the double only extends out
// 	 * two decimal places.
// 	 *
// 	 * @return The amount of data in megabytes used by the program
// 	 */
// 	public static synchronized double getDataUsedMB() {
// 		return (double) ((int) ((double) getDataUsed() / 1024 / 1024 * 100)) / 100; // *100 to make the double have two extra numbers, round with typecasting to integer, then divide that by 100 and typecast to double to get a double with two decimal places
// 	}
// }


import com.github.sunnybat.commoncode.error.ErrorBuilder;
import com.github.sunnybat.paxchecker.DataTracker;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
		anonymousStatistics = true;
	}

	public void setHeadless() {
		isHeadless = true;
	}

	/**
	 * This loads all new notifications. This method will block until complete.
	 */
	public void loadNotifications() {
		if (lastNotificationID.equals("DISABLE")) {
			return;
		}
		URLConnection inputConnection;
		InputStream textInputStream;
		BufferedReader myReader = null;
		try {
			URL notificationURL;
			if (anonymousStatistics) {
				notificationURL = new URL(NOTIFICATIONS_LINK_ANONYMOUS);
			} else {
				notificationURL = new URL(NOTIFICATIONS_LINK);
			}
			inputConnection = notificationURL.openConnection();
			textInputStream = inputConnection.getInputStream();
			myReader = new BufferedReader(new InputStreamReader(textInputStream));
			String line;
			Notification currNotification = null;
			while ((line = myReader.readLine()) != null) {
// Path: src/main/java/com/github/sunnybat/paxchecker/DataTracker.java
// public class DataTracker {
// 
// 	private static long dataUsed;
// 
// 	/**
// 	 * Adds an amount of data (in bytes) used by the program. This should be called whenever a network
// 	 * connection is made.
// 	 *
// 	 * @param data The amount of data (in bytes) to add to the total data used
// 	 */
// 	public static synchronized void addDataUsed(long data) {
// 		dataUsed += data;
// 	}
// 
// 	/**
// 	 * Gets the amount of data (in bytes) used by the program.
// 	 *
// 	 * @return The amount of data (in bytes) used by the program
// 	 */
// 	public static synchronized long getDataUsed() {
// 		return dataUsed;
// 	}
// 
// 	/**
// 	 * Gets the amount of data in megabytes used by the program. Note that the double only extends out
// 	 * two decimal places.
// 	 *
// 	 * @return The amount of data in megabytes used by the program
// 	 */
// 	public static synchronized double getDataUsedMB() {
// 		return (double) ((int) ((double) getDataUsed() / 1024 / 1024 * 100)) / 100; // *100 to make the double have two extra numbers, round with typecasting to integer, then divide that by 100 and typecast to double to get a double with two decimal places
// 	}
// }


// Path: src/main/java/com/github/sunnybat/paxchecker/notification/NotificationHandler.java
import com.github.sunnybat.commoncode.error.ErrorBuilder;
import com.github.sunnybat.paxchecker.DataTracker;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;

		anonymousStatistics = true;
	}

	public void setHeadless() {
		isHeadless = true;
	}

	/**
	 * This loads all new notifications. This method will block until complete.
	 */
	public void loadNotifications() {
		if (lastNotificationID.equals("DISABLE")) {
			return;
		}
		URLConnection inputConnection;
		InputStream textInputStream;
		BufferedReader myReader = null;
		try {
			URL notificationURL;
			if (anonymousStatistics) {
				notificationURL = new URL(NOTIFICATIONS_LINK_ANONYMOUS);
			} else {
				notificationURL = new URL(NOTIFICATIONS_LINK);
			}
			inputConnection = notificationURL.openConnection();
			textInputStream = inputConnection.getInputStream();
			myReader = new BufferedReader(new InputStreamReader(textInputStream));
			String line;
			Notification currNotification = null;
			while ((line = myReader.readLine()) != null) {
				DataTracker.addDataUsed(line.length());