You are using a smaller Array....
do this
String[] userInfo = new String[4];
I would suggest you to use Arraylist
as this does not require any size to declare and can accomodate any number of items.
ArrayList<String> userInfo = new ArrayList<>();
userInfo.add(sourceTextField.getText());
userInfo.add(usernameTextField.getText());
userInfo.add(passwordTextField.getText());
userInfo. dd(emailTextField.getText());
for (String userInfo1 : userInfo) {
try
{.......
............
And the rest of the code proccessed accordingly....