Are you sure this is the exact code? Try putting braces around the statement after the if. Have you also checked with stringParts with the debugger because it might just be that there are simply two lines alike.
Also, you might want to consider using a stringbuilder to do this because your code will be getting slower and slower if more lines are added. You set the Text over and over again which will create a new string object each time and needs to copy everything from that with the additional string into that.
if(stringParts[i] !=String.Empty) {
rtbData_Back.Text = rtbData_Back.Text + stringParts[i].Trim() + "," + '\n';
}
Good luck!