Fix parseInt method call and convert StringBuilder to string for method return value.