protected ExecutionResult readOlrunnerVerdict(final Path verdictFile)
			throws IOException, IllegalStateException, NumberFormatException {
		final String text = FileAccess.readUTF8String(verdictFile).trim();

		/*
		 * Capture one of the following: $1 $1($2) $1($2,$3,$4)
		 */

		final Pattern pattern = Pattern
				.compile("([A-Za-z_]+)(?:\\((\\d+)(?:,\\s*(\\d+),\\s*(\\d+))?\\))?");

		final Matcher matcher = pattern.matcher(text);
		if (!matcher.matches()) {
			throw new IllegalStateException(
					"The verdict file doesn't contain a vaildly formatted string! Got this: \""
							+ text + "\"");
		}
		final String resultTypeString = matcher.group(1);
		final long realTime = Integer.valueOf(matcher.group(2));
		final long cpuTime = Integer.valueOf(matcher.group(3));
		final long memoryTime = Integer.valueOf(matcher.group(4));

		switch (resultTypeString) {
		case "OK":
		case "MEMORY_LIMIT":
		case "OUTPUT_LIMIT":
		case "TIME_LIMIT":
		case "RUNTIME_ERROR":
		case "INTERNAL_ERROR":
		case "ABNORMAL_TERMINATION":
		case "SECURITY_VIOLATION":
			return new ExecutionResult(
					ExecutionResult.ExecutionResultType
							.valueOf(resultTypeString),
					realTime, cpuTime, memoryTime, -1);
		default:
			return new ExecutionResult(
					ExecutionResult.ExecutionResultType
							.valueOf(resultTypeString),
					-1, -1, -1, -1);
		}
	}