The problem is that you're adding a string to the container twice for each string in the input.
When you encounter a '(', you enter the string to the container, and reset the 'leftBraceFound' flag.
Immediately after that, you encounter a ',' while the flag is reset, so you enter the 'if' statement block. By this time there's nothing on the stack except the comma character, which you pop out, and then you create an empty string and add it to the container.
You should change the "if(array[i] == ',')" block to not add a new string, or if you anticipate strings between commas not wrapped in parentheses, you'll need to alter the loop to check between commas and ignore parentheses altogether.