class Main{
public static String addSpacesToCSVString(final String in) {
StringBuilder sb = new StringBuilder();
if (in != null) {
if (in.contains(",")) {
String[] authorsArray = in.split(",\\s*");
for (int i = 0; i < authorsArray.length; i++) {
if (i == 0) {
sb.append(authorsArray[i]);
} else {
sb.append(", " + authorsArray[i]);
}
}
} else {
return in;
}
}
return sb.toString();
}
}