public static int[] getArrayDiff(int[] source, int[] result) {
		List<Integer> diff = new ArrayList<Integer>();

		if (source.length != result.length) {
			throw new IllegalArgumentException(
					"The arrays need to have the same length");
		}
		boolean[] diffs = new boolean[source.length];
		Arrays.fill(diffs, false);
		boolean somethingChanged = false;
		for (int i = 0; i < source.length; i++) {
			if (source[i] != result[i]) {
				diffs[i] = true;
				somethingChanged = true;
			}
		}
		if (somethingChanged) {
			for (int i = 0; i < diffs.length; i++) {
				if (diffs[i]) {
					int diffValue = source[i];
					for (int j = 0; j < diffs.length; j++) {
						if (diffs[j] && diffValue == result[j]) {
							diff.add(i);
							diff.add(j);
							diffs[i] = false;
							diffs[j] = false;
						}
					}
				}
			}

			return convertIntegers(diff);
		}
		return null;

	}