private ArrayList<Integer> parseASsetCAIDA(String str) {

		ArrayList<Integer> ases = new ArrayList<Integer>();

		str = str.replaceAll("_", ","); // treat multi-homed ASs like AS sets
										// and
		// vice versa

		// parse AS set
		while (str.contains(",")) {
			try {
				// parse AS from AS set or set of multi-homed ASs
				int as = Integer.parseInt(str.substring(0, str.indexOf(",")));
				if (as < 65536 && as > 0) {
					ases.add(as);
				} else {
					logger.error("Logical error reading map file - AS number > 65536 or < 0. AS will be ignored.");
				}
			} catch (NumberFormatException e) {
				logger.error("Cannot parse AS number. AS will be ignored.", e);
				str = str.substring(str.indexOf(",") + 1); // delete part of the
															// string which
															// cannot be parsed
				continue;
			}
			// delete parsed part of the string
			str = str.substring(str.indexOf(",") + 1);
		}

		// parse the rest of the string
		try {
			int as = Integer.parseInt(str);
			if (as < 65536 && as > 0) {
				ases.add(as);
			} else {
				logger.error("Logical error reading map file - AS number > 65536 or < 0. AS will be ignored.");
			}
		} catch (NumberFormatException e) {
			logger.error(
					"Cannot parse AS number. AS will be ignored. If this AS is not part of AS set or not multi-homed, the line will be ignored too.",
					e);
		}

		return ases;
	}