String title = tab.getTitleAt(tab.getSelectedIndex());
String update = title + "*";
The problem is here.
What if title currently has an "*" at the end? This code will always add another "*".
You need to save the original title in a variable. Then either use the original or the original + "*" when you setTitle