private final Parameterization[] getParameterizations(
			String serializedParameters, final IParameter[] parameters)
			throws SerializationException {

		if (serializedParameters == null
				|| (serializedParameters.length() == 0)) {
			return null;
		}

		if ((parameters == null) || (parameters.length == 0)) {
			return null;
		}

		final ArrayList paramList = new ArrayList();

		int commaPosition; // split off each param by looking for ','
		do {
			commaPosition = unescapedIndexOf(serializedParameters, ',');

			final String idEqualsValue;
			if (commaPosition == -1) {
				// no more parameters after this
				idEqualsValue = serializedParameters;
			} else {
				// take the first parameter...
				idEqualsValue = serializedParameters
						.substring(0, commaPosition);

				// ... and put the rest back into serializedParameters
				serializedParameters = serializedParameters
						.substring(commaPosition + 1);
			}

			final int equalsPosition = unescapedIndexOf(idEqualsValue, '=');

			final String parameterId;
			final String parameterValue;
			if (equalsPosition == -1) {
				// missing values are null
				parameterId = unescape(idEqualsValue);
				parameterValue = null;
			} else {
				parameterId = unescape(idEqualsValue.substring(0,
						equalsPosition));
				parameterValue = unescape(idEqualsValue
						.substring(equalsPosition + 1));
			}

			for (int i = 0; i < parameters.length; i++) {
				final IParameter parameter = parameters[i];
				if (parameter.getId().equals(parameterId)) {
					paramList.add(new Parameterization(parameter,
							parameterValue));
					break;
				}
			}

		} while (commaPosition != -1);

		return (Parameterization[]) paramList
				.toArray(new Parameterization[paramList.size()]);
	}