Reversing bitwise operations : I have a Java function written by another programmer, which uses bitwise manipulation.  I need a function that will reverse the process (if possible).  Perhaps some of you are more savvy than I with these operators.  Here's what needs to be reversed:

    public void someFunc(int[] msg, int[] newMsg) {
    	int i = SOME_LENGTH_CONSTANT;
    	for (int j = 0; j < newMsg.length; j++) {
    		// msg[i] Shift left by 8 bits bitwise or with next msg[i+1]
    		// then bitwise not (~) and bitwise and with $FFF
    		newMsg[j] = (~(((msg[i] & 0x0f) << 8) | (msg[i + 1]))) & 0xfff;
    		i += 2;
    	}
    }