public static List<FunctionTrace> extractRelevantSequence(
			List<List<FunctionTrace>> llft) {
		List<FunctionTrace> relevantSequence = null;

		Iterator it = llft.iterator();
		List<FunctionTrace> lft = null;
		List<FunctionTrace> finalFunctionTrace = new ArrayList<FunctionTrace>();
		boolean foundErrorTrace = false;
		while (it.hasNext()) {
			lft = (List<FunctionTrace>) it.next();
			Iterator it_trace = lft.iterator();
			while (it_trace.hasNext()) {
				FunctionTrace ft = (FunctionTrace) it_trace.next();

				int index_from_colons = ft.f_decl.ppt_decl.indexOf(":::");
				if (ft.f_decl.ppt_decl.substring(index_from_colons).equals(
						":::ERROR")) {
					foundErrorTrace = true;
					break;
				}
			}
			if (foundErrorTrace) {
				break;
			}
		}

		// Return last sequence if no error trace is found
		relevantSequence = lft;
		if (lft == null) {
			System.out.println("Error: Empty list of sequences");
			System.exit(-1);
		} else if (foundErrorTrace) {
			// Remove the "ERROR" trace(s)
			Iterator relevantSequence_it = lft.iterator();
			while (relevantSequence_it.hasNext()) {
				FunctionTrace ft = (FunctionTrace) relevantSequence_it.next();

				int index_from_colons = ft.f_decl.ppt_decl.indexOf(":::");
				if (ft.f_decl.ppt_decl.substring(index_from_colons).equals(
						":::ERROR")) {
					break;
				} else {
					finalFunctionTrace.add(ft);
				}
			}
		} else {
			finalFunctionTrace = lft;
		}

		if (finalFunctionTrace.isEmpty()) {
			System.out.println("Error: Empty list of sequences");
			System.exit(-1);
		}

		return finalFunctionTrace;
	}