Buggy code:
private app ; private boolean updateEnable ; private AvailableGPXFragment . GpxInfo currentRecording ; private boolean showOnMapMode ; @ Override public void onAttach ( Activity activity ) { } private void startHandler ( ) { } public List < AvailableGPXFragment . GpxInfo > getSelectedItems ( ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } public void updateCurrentTrack ( ) { } public static void updateCurrentTrack ( View v , final Activity ctx , OsmandApplication app ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public static void openTrack ( Activity a , final File f ) { } public static void createCurrentTrackView ( View v , final OsmandApplication app ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } public void doAction ( int actionResId ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void showProgressBar ( ) { } public void hideProgressBar ( ) { } private void updateSelectionMode ( ActionMode m ) { } private void enableSelectionMode ( boolean selectionMode ) { } private void openShowOnMapMode ( ) { } public void openSelectionMode ( final int actionResId , int darkIcon , int lightIcon , final DialogInterface . OnClickListener listener ) { } private void showGpxOnMap ( AvailableGPXFragment . GpxInfo info ) { } public class LoadGpxTask extends AsyncTask < Activity , AvailableGPXFragment . GpxInfo , List < AvailableGPXFragment . GpxInfo > > { private List < AvailableGPXFragment . GpxInfo > result ; @ Override protected List < AvailableGPXFragment . GpxInfo > doInBackground ( Activity ... params ) { } public void loadFile ( AvailableGPXFragment . GpxInfo ... loaded ) { } @ Override protected void onPreExecute ( ) { } @ Override protected void onProgressUpdate ( AvailableGPXFragment . GpxInfo ... values ) { } public void setResult ( List < AvailableGPXFragment . GpxInfo > result ) { } @ Override protected void onPostExecute ( List < AvailableGPXFragment . GpxInfo > result ) { } private File [ ] listFilesSorted ( File dir ) { } private void loadGPXData ( File mapPath , List < AvailableGPXFragment . GpxInfo > result , AvailableGPXFragment . LoadGpxTask loadTask ) { } private void loadGPXFolder ( File mapPath , List < AvailableGPXFragment . GpxInfo > result , AvailableGPXFragment . LoadGpxTask loadTask , List < AvailableGPXFragment . GpxInfo > progress , String gpxSubfolder ) { } public List < AvailableGPXFragment . GpxInfo > getResult ( ) { } } protected class GpxIndexesAdapter extends OsmandBaseExpandableListAdapter implements Filterable { Map < String , List < AvailableGPXFragment . GpxInfo > > data = new LinkedHashMap < > ( ) ; List < String > category = new ArrayList < > ( ) ; List < AvailableGPXFragment . GpxInfo > selected = new ArrayList < > ( ) ; int warningColor ; int defaultColor ; int corruptedColor ; private AvailableGPXFragment . SearchFilter filter ; public GpxIndexesAdapter ( Context ctx ) { } public void refreshSelected ( ) { } public Set < AvailableGPXFragment . GpxInfo > getSelectedGpx ( ) { } public void clear ( ) { } public void addLocalIndexInfo ( AvailableGPXFragment . GpxInfo info ) { } @ Override public AvailableGPXFragment . GpxInfo getChild ( int groupPosition , int childPosition ) { } @ Override public long getChildId ( int groupPosition , int childPosition ) { } @ Override public View getChildView ( final int groupPosition , final int childPosition , boolean isLastChild , View convertView , ViewGroup parent ) { } @ Override public View getGroupView ( int groupPosition , boolean isExpanded , View convertView , ViewGroup parent ) { } @ Override public int getChildrenCount ( int groupPosition ) { } private int getGroupPosition ( int groupPosition ) { } private boolean isSelectedGroup ( int groupPosition ) { } public boolean isShowingSelection ( ) { } @ Override public String getGroup ( int groupPosition ) { } @ Override public int getGroupCount ( ) { } @ Override public long getGroupId ( int groupPosition ) { } @ Override public boolean hasStableIds ( ) { } @ Override public boolean isChildSelectable ( int groupPosition , int childPosition ) { } @ Override public Filter getFilter ( ) { } public void delete ( AvailableGPXFragment . GpxInfo g ) { } } private void openPopUpMenu ( View v , final AvailableGPXFragment . GpxInfo gpxInfo ) { } public class DeleteGpxTask extends AsyncTask < AvailableGPXFragment . GpxInfo , AvailableGPXFragment . GpxInfo , String > { @ Override protected String doInBackground ( AvailableGPXFragment . GpxInfo ... params ) { } @ Override protected void onProgressUpdate ( AvailableGPXFragment . GpxInfo ... values ) { } @ Override protected void onPreExecute ( ) { } @ Override protected void onPostExecute ( String result ) { } } public class SelectGpxTask extends AsyncTask < AvailableGPXFragment . GpxInfo , AvailableGPXFragment . GpxInfo , String > { private boolean showOnMap ; private WptPt toShow ; public SelectGpxTask ( boolean showOnMap ) { } @ Override protected String doInBackground ( AvailableGPXFragment . GpxInfo ... params ) { } @ Override protected void onProgressUpdate ( AvailableGPXFragment . GpxInfo ... values ) { } @ Override protected void onPreExecute ( ) { } @ Override protected void onPostExecute ( String result ) { } } private class SearchFilter extends Filter { @ Override protected FilterResults performFiltering ( CharSequence constraint ) { } @ SuppressWarnings ( "unchecked" ) @ Override protected void publishResults ( CharSequence constraint , FilterResults results ) { } } @ Override public void onDestroy ( ) { } @ Override public boolean onChildClick ( ExpandableListView parent , View v , int groupPosition , int childPosition , long id ) { } public static class GpxInfo { public boolean currentlyRecordingTrack ; public GPXFile gpx ; public File file ; public String subfolder ; private String name = null ; private int sz = - 1 ; private String fileName = null ; private boolean corrupted ; public GpxInfo ( ) { } public GpxInfo ( GPXFile file , String name ) { } public String getName ( ) { } private String formatName ( String name ) { } public boolean isCorrupted ( ) { } public int getSize ( ) { if ( ( sz ) == ( - 1 ) ) { if ( ( file ) == null ) { return - 1 ; } <START_BUG> sz = ( ( int ) ( ( file . length ( ) ) > > 10 ) ) ; <END_BUG>

Fix:
sz = ( ( int ) ( ( ( file . length ( ) ) + 512 ) > > 10 ) ) ;