The inner part hashes the number, the & and / turns this hash into a number between 0 and 2 so when you do 1 - (..) you get a number between -1 and 1. A Java way to get a random number between -1 and 1 is return Math.random()...

Without seeing your rendering code it's hard to be sure, but I would bet good money that you have forgotten that Y coordinates in Java start at the top of the screen and go down.

Documentation of ?simplex for argument b2 states that A vector of length m2 giving the right hand side of the >= constraints. This argument is required if A2 is given and ignored otherwise. All values in b2 must be non-negative. Note that the constraints x >= 0 are included automatically...