Buggy code:
public class GoalDisplayFragment extends Fragment { private static final String ARG_PARAM1 = "param1" ; private static final String ARG_PARAM2 = "param2" ; private DBConnection dataSource ; private ArrayList < Goal > goalSet ; private ListView mListView ; private GoalDisplayFragment . GoalProgressListAdapter mAdapter ; private String mParam1 ; private String mParam2 ; private String [ ] types = new String [ ] { "(Distance)" , "(Time)" , "(Rate)" , "Reps" } ; private String [ ] units = new String [ ] { "<seq2seq4repair_space>miles<seq2seq4repair_space>per<seq2seq4repair_space>week<seq2seq4repair_space>" , "<seq2seq4repair_space>hours<seq2seq4repair_space>per<seq2seq4repair_space>week<seq2seq4repair_space>" , "<seq2seq4repair_space>min//mile<seq2seq4repair_space>average<seq2seq4repair_space>" , "<seq2seq4repair_space>reps<seq2seq4repair_space>per<seq2seq4repair_space>week<seq2seq4repair_space>" } ; private String [ ] curUnits = new String [ ] { "<seq2seq4repair_space>miles" , "<seq2seq4repair_space>hours" , "<seq2seq4repair_space>min//mile<seq2seq4repair_space>average" , "<seq2seq4repair_space>reps" } ; public static GoalDisplayFragment newInstance ( String param1 , String param2 ) { } public GoalDisplayFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private class GoalProgressListAdapter extends ArrayAdapter < Goal > { private ArrayList < Goal > goalSet ; private Context context ; public GoalProgressListAdapter ( Context Context , int resource , ArrayList < Goal > goals ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { LayoutInflater inflater = LayoutInflater . from ( context ) ; convertView = inflater . inflate ( goal_display_row , parent , false ) ; TextView nameTextview = ( ( TextView ) ( convertView . findViewById ( nameTextView ) ) ) ; TextView weeklyGoalTextView = ( ( TextView ) ( convertView . findViewById ( weeklygoalTextView ) ) ) ; TextView finalGoalTextView = ( ( TextView ) ( convertView . findViewById ( finalgoalTextView ) ) ) ; TextView weeklyProgressTextView = ( ( TextView ) ( convertView . findViewById ( progressText ) ) ) ; Goal g = goalSet . get ( position ) ; String name = g . name ; String t = g . type ; String type ; String unit ; String curU ; if ( ( t . equals ( "DTA-T" ) ) | ( t . equals ( "TIM" ) ) ) { type = types [ 1 ] ; unit = units [ 1 ] ; curU = curUnits [ 1 ] ; } else if ( t . equals ( "DTA-R" ) ) { type = types [ 2 ] ; unit = units [ 2 ] ; curU = curUnits [ 2 ] ; } else if ( t . equals ( "DTA-D" ) ) { type = types [ 0 ] ; unit = units [ 0 ] ; curU = curUnits [ 0 ] ; } else { type = types [ 3 ] ; unit = units [ 3 ] ; curU = curUnits [ 3 ] ; } name = ( name + "<seq2seq4repair_space>" ) + type ; nameTextview . setText ( name ) ; String f = this . getContext ( ) . getString ( finalgoalstring ) ; String w = this . getContext ( ) . getString ( weeklygoalstring ) ; double finalGoal = g . goalUnit ; double weeklyGoal = g . calculateCurrentGoal ( ) ; SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd" , Locale . US ) ; Date d = null ; try { d = sdf . parse ( g . startDate ) ; } catch ( ParseException e ) { System . out . println ( "You<seq2seq4repair_space>broke<seq2seq4repair_space>the<seq2seq4repair_space>date" ) ; } GregorianCalendar weeklyDate = new GregorianCalendar ( ) ; GregorianCalendar finalDate = new GregorianCalendar ( ) ; weeklyDate . setTime ( d ) ; finalDate . setTime ( d ) ; weeklyDate . add ( Calendar . DAY_OF_MONTH , ( 7 * ( g . currentWeek ) ) ) ; finalDate . add ( Calendar . DAY_OF_MONTH , ( 7 * ( g . duration ) ) ) ; String wg = ( ( ( ( w + "<seq2seq4repair_space>" ) + ( Double . toString ( weeklyGoal ) ) ) + unit ) + "by<seq2seq4repair_space>" ) + ( sdf . format ( weeklyDate . getTime ( ) ) ) ; String fg = ( ( ( ( f + "<seq2seq4repair_space>" ) + ( Double . toString ( finalGoal ) ) ) + unit ) + "by<seq2seq4repair_space>" ) + ( sdf . format ( finalDate . getTime ( ) ) ) ; dataSource . open ( ) ; double progress = dataSource . checkGoalProgress ( g ) ; dataSource . close ( ) ; <START_BUG> String ps = ( ( "Progress<seq2seq4repair_space>This<seq2seq4repair_space>Week:<seq2seq4repair_space>" + ( Double . toString ( progress ) ) ) + "<seq2seq4repair_space>" ) + curU ; <END_BUG> weeklyProgressTextView . setText ( ps ) ; weeklyGoalTextView . setText ( wg ) ; finalGoalTextView . setText ( fg ) ; return convertView ; } } }

Fix:
String ps = ( "Progress<seq2seq4repair_space>This<seq2seq4repair_space>Week:<seq2seq4repair_space>" + ( Double . toString ( progress ) ) ) + curU ;