DecimalSeparator.StringToDouble(number);
The method called here returns a value but your code doesn't use it, so the value of number won't be changed. Change your code to receive the value returned:
double numberVal = DecimalSeparator.StringToDouble(number);
If you are not sure what is happening to the values of variables, add System.out.println() statements to see.