Buggy code:
public class CalendarFragment extends Fragment { private TextView textViewServiceApp ; private TextView textViewWeekCalender ; private TextView textViewPrevDate ; private TextView textViewDate ; private TextView textViewNextDate ; private TextView textViewSun ; private TextView textViewMon ; private TextView textViewTue ; private TextView textViewWed ; private TextView textViewThu ; private TextView textViewFri ; private TextView textViewSat ; private TextView textView12am ; private TextView textView1am ; private TextView textView2am ; private TextView textView3am ; private TextView textView4am ; private TextView textView5am ; private TextView textView6am ; private TextView textView7am ; private TextView textView8am ; private TextView textView9am ; private TextView textView10am ; private TextView textView11am ; private TextView textView12pm ; private TextView textView1pm ; private TextView textView2pm ; private TextView textView3pm ; private TextView textView4pm ; private TextView textView5pm ; private TextView textView6pm ; private TextView textView7pm ; private TextView textView8pm ; private TextView textView9pm ; private TextView textView10pm ; private TextView textView11pm ; private RelativeLayout relativeLayoutSunday ; private RelativeLayout relativeLayoutMonDay ; private RelativeLayout relativeLayoutTueDay ; private RelativeLayout relativeLayoutWedDay ; private RelativeLayout relativeLayoutThuDay ; private RelativeLayout relativeLayoutFriDay ; private RelativeLayout relativeLayoutSatDay ; private ImageView buttonBack ; private ImageView buttonHome ; private Typeface typface ; public String dateFormat ; public String logInID ; public String [ ] weekDays ; public String [ ] NextPreWeekday ; public String dateFormate ; public String firstDayOfWeek ; public String lastDayOfWeek ; public static ArrayList < Entity > arrayListEntity = new ArrayList < Entity > ( ) ; public static ArrayList < Entity > arrayListEButtonId = new ArrayList < Entity > ( ) ; public static final String [ ] colorWheel = new String [ ] { "#f0aa7b" , "#e4d9f1" , "#00ffb8" , "#00dfff" , "#41c4dc" , "#990000" , "#8cc63f" , "#008fc5" , "#c7d6eb" , "#f0d17b" } ; public int weekDaysCount = 0 ; public ArrayList < WeekSets > weekDatas ; String tapMargin ; String buttonHeight ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } public void update ( Group temp ) { try { List < String > records = new ArrayList < String > ( ) ; String record = "" ; for ( Person p : temp . returnStorage ( ) ) { record += ( p . getNetID ( ) ) + "<seq2seq4repair_space>" ; record += CalendarFragment . colorWheel [ ( ( temp . returnStorage ( ) . indexOf ( p ) ) % 10 ) ] ; for ( Event e : p . getEvents ( ) ) { switch ( e . getDay ( ) . toUpperCase ( ) ) { case "M" : record = "1<seq2seq4repair_space>" ; break ; case "T" : record = "2<seq2seq4repair_space>" ; break ; case "W" : record = "3<seq2seq4repair_space>" ; break ; case "R" : record = "4<seq2seq4repair_space>" ; break ; case "F" : record = "5<seq2seq4repair_space>" ; break ; case "S" : record = "6<seq2seq4repair_space>" ; break ; case "U" : record = "0<seq2seq4repair_space>" ; break ; default : Toast toast = Toast . makeText ( getActivity ( ) . getApplicationContext ( ) , ( "DATE<seq2seq4repair_space>PARSING<seq2seq4repair_space>ERROR:<seq2seq4repair_space>Malformed<seq2seq4repair_space>date<seq2seq4repair_space>code<seq2seq4repair_space>detected.<seq2seq4repair_space>Received=" + record ) , LENGTH_LONG ) ; toast . show ( ) ; } Integer start = e . getStartTime ( ) ; Double proc = start . doubleValue ( ) ; proc //= 50 ; start = ( ( int ) ( Math . round ( proc ) ) ) ; record += start + "<seq2seq4repair_space>" ; Integer end = e . getEndTime ( ) ; <START_BUG> proc = start . doubleValue ( ) ; <END_BUG> proc //= 50 ; end = ( ( int ) ( Math . round ( proc ) ) ) ; record += end + "<seq2seq4repair_space>" ; } } Toast toast = Toast . makeText ( getActivity ( ) . getApplicationContext ( ) , ( "DEBUG:<seq2seq4repair_space>" + record ) , LENGTH_LONG ) ; toast . show ( ) ; new CalendarFragment . LoadViewsInToWeekView ( ) . execute ( record ) ; } catch ( Exception e ) { Log . getStackTraceString ( e ) ; } } public String [ ] getWeekDay ( ) { } @ SuppressLint ( "SimpleDateFormat" ) public String [ ] getWeekDayNext ( ) { } @ SuppressLint ( "SimpleDateFormat" ) public String [ ] getWeekDayPrev ( ) { } public Button getButtonToLayout ( int height , int marginTop , String buttonText , String jobID , int buttonID ) { } public Button getButtonToLayout ( int height , int marginTop , String buttonText , String jobID , String color , int buttonID ) { } public OnClickListener buttonOnclickForAllWeekButton = new OnClickListener ( ) { @ Override public void onClick ( View v ) { } } ; public static Entity getEntity ( String jobID , String jobRefID ) { } public static Entity getButton ( int layoutView , int buttonTag ) { } public static WeekSets getWeekValues ( String weekDay , String jobId , String jobRefId , String tapMarginA , String buttonHeightA ) { } public static WeekSets getWeekValues ( String weekDay , String jobId , String jobRefId , String colorCode , String tapMarginA , String buttonHeightA ) { } public String getWidthAndHeightToButton ( int startTime ) { } public String getHeightOfButton ( int startTime , int endTime ) { } public class LoadViewsInToWeekView extends AsyncTask < String , Void , String > { @ Override protected String doInBackground ( String ... params ) { } @ Override protected void onPostExecute ( String str ) { } ProgressDialog dialog ; @ Override protected void onPreExecute ( ) { } } }

Fix:
proc = end . doubleValue ( ) ;