As long as you're not chaning the signature of a method you can change it's behavior to some degree as long as you honor the intent of the method. This "should" not cause other code to break, but it could, depending on the changes you make. A common setter change is to add validation to the value being passed in. This should not break code that calls it and any code that was passing bad values in previously should have been considered broken, but it just wasn't being dealt with.
Suhaas, as already mentioned, you have messed up the logic at line 55.
Some points to simplify your code:
'sum' can be a local variable, it doesn't need to be a parameter.
You can use an enhanced for() loop: for( Object o : array ), this eliminates the need for get(i).
You can start depth at 0 outside of productSum() and then increment it as soon as you get inside productSum(), in this way the depth is '1' the first time through. Of course doing this eliminates the need for the '+1' in the recursive call.