private IEntity getEntityEnd(StateDiagram system, String code) {
		if (code.startsWith("[*]")) {
			return system.getEnd();
		}
		if (code.endsWith("[H]")) {
			return system.getHistorical(Code.of(code.substring(0, code.length() - 3)));
		}
		if (code.startsWith("=") && code.endsWith("=")) {
			code = removeEquals(code);
			return system.getOrCreateLeaf(Code.of(code), LeafType.SYNCHRO_BAR, null);
		}
		if (system.checkConcurrentStateOk(Code.of(code)) == false) {
			return null;
		}
		return system.getOrCreateLeaf(Code.of(code), null, null);
	}