Buggy code:
private static final String ITEM_CODE_TAG_NAME = "code" ; private static final String ITEM_DESCR_TAG_NAME = "descr" ; private static final String ITEM_DESCR_FULL_TAG_NAME = "descr_full" ; private static final String ITEM_USE_SPECIF_TAG_NAME = "use_specif" ; private static final String SPECIF_TAG_NAME = "specif" ; private static final String SPECIF_CODE_TAG_NAME = "code" ; private static final String SPECIF_DESCR_TAG_NAME = "descr" ; private static final String MEASUR_TAG_NAME = "measur" ; private static final String MEASUR_DESCR_TAG_NAME = "descr" ; private static final String PRICE_TAG_NAME = "price" ; private static final String QUANT_ACC_TAG_NAME = "quant_acc" ; private static final String QUANT_TAG_NAME = "quant" ; private static WeakReference < ItemsListLoader > WEAK_REF_ACTIVITY ; private static class ProgressHandler extends Handler { private WeakReference < ItemsListLoader > wrActivity ; public ProgressHandler ( WeakReference < ItemsListLoader > wrActivity ) { } public void setActivity ( WeakReference < ItemsListLoader > wrActivity ) { } @ Override public void handleMessage ( Message msg ) { } } public ItemsListLoader ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public Loader < Void > onCreateLoader ( int id , Bundle bndl ) { } @ Override public void onLoadFinished ( Loader < Void > loader , Void data ) { } @ Override public void onLoaderReset ( Loader < Void > loader ) { } private static class ItemsAsyncTaskLoader extends AsyncTaskLoader < Void > { private Context context ; private MediaPlayer mp ; private DBase dBase ; public ItemsAsyncTaskLoader ( Context context ) { } @ Override public void onStartLoading ( ) { } @ Override public Void loadInBackground ( ) { Message . show ( this ) ; if ( Main . isDemoMode ( ) ) { Cursor cursor = dBase . getAllRows ( TABLE_ITEMS_DEMO_NAME ) ; ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . setRowsTotal ( cursor . getCount ( ) ) ; ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . setRowsCounter ( 0 ) ; cursor . moveToFirst ( ) ; if ( cursor . isFirst ( ) ) { if ( ( ( ! ( isStarted ( ) ) ) || ( isAbandoned ( ) ) ) || ( isReset ( ) ) ) return null ; ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . incrementRowsCounter ( 1 ) ; dBase . copyItemRow ( TABLE_ITEMS_NAME , cursor ) ; Message . show ( ( ( ( ( "[hashCode<seq2seq4repair_space>=<seq2seq4repair_space>" + ( this . hashCode ( ) ) ) + "],<seq2seq4repair_space>copyItemRow(" ) + ( ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getRowsCounter ( ) ) ) + ")" ) ) ; setProgress ( ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getProgressHandler ( ) , ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getRowsCounter ( ) , ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getRowsTotal ( ) , 0 ) ; while ( cursor . moveToNext ( ) ) { try { TimeUnit . MILLISECONDS . sleep ( ItemsListLoader . DEMO_MODE_SLEEP_TIME ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } if ( ( ( ! ( isStarted ( ) ) ) || ( isAbandoned ( ) ) ) || ( isReset ( ) ) ) break ; ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . incrementRowsCounter ( 1 ) ; dBase . copyItemRow ( TABLE_ITEMS_NAME , cursor ) ; Message . show ( ( ( ( ( "[hashCode<seq2seq4repair_space>=<seq2seq4repair_space>" + ( this . hashCode ( ) ) ) + "],<seq2seq4repair_space>copyItemRow(" ) + ( ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getRowsCounter ( ) ) ) + ")" ) ) ; setProgress ( ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getProgressHandler ( ) , ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getRowsCounter ( ) , ItemsListLoader . WEAK_REF_ACTIVITY . get ( ) . getRowsTotal ( ) , 0 ) ; } } } else { TelephonyManager tm = ( ( TelephonyManager ) ( context . getSystemService ( TELEPHONY_SERVICE ) ) ) ; String deviceId = tm . getDeviceId ( ) ; <START_BUG> SimpleDateFormat dateFormatter = new SimpleDateFormat ( "yyyyMMddHms" , Locale . getDefault ( ) ) ; <END_BUG> Long docDateEpoch = Long . parseLong ( ItemsListLoader . docDate ) ; String dateURIFormattedString = dateFormatter . format ( docDateEpoch ) ; String query = ( ( ( "?deviceid=" + deviceId ) + "&docdate=" ) + dateURIFormattedString ) + "&docnum='" ; try { query = ( query + ( URLEncoder . encode ( ItemsListLoader . docNum , UTF_8 ) ) ) + "'" ; } catch ( UnsupportedEncodingException e1 ) { e1 . printStackTrace ( ) ; } String uriString = ( ItemsListLoader . connectionString ) + query ; try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder dBuilder = dbFactory . newDocumentBuilder ( ) ; Document domDoc = dBuilder . parse ( uriString ) ; domDoc . getDocumentElement ( ) . normalize ( ) ; NodeList docNodes = domDoc . getElementsByTagName ( ItemsListLoader . DOC_TAG_NAME ) ; String docNumValue = "" ; String docDateTimeValue = "" ; int docsTotal = docNodes . getLength ( ) ; if ( docsTotal > 0 ) { Node docNode = docNodes . item ( 0 ) ; NamedNodeMap docAttr = docNode . getAttributes ( ) ; Node docNumNode = docAttr . getNamedItem ( ItemsListLoader . DOC_NUM_TAG_NAME ) ; Node docDateTimeNode = docAttr . getNamedItem ( ItemsListLoader . DOC_DATE_TAG_NAME ) ; if ( docNumNode != null ) docNumValue = docNumNode . getTextContent ( ) ; if ( docDateTimeNode != null ) docDateTimeValue = docDateTimeNode . getTextContent ( ) ; } NodeList rowNodes = domDoc . getElementsByTagName ( ItemsListLoader . ROW_TAG_NAME ) ; ItemsListLoader . rowsTotal = rowNodes . getLength ( ) ; ItemsListLoader . rowsCounter = 0 ; SQLiteDatabase sqliteDb = dBase . getSQLiteDatabase ( ) ; for ( int rowIdx = 0 ;

Fix:
SimpleDateFormat dateFormatter = new SimpleDateFormat ( "yyyyMMddHHmmss" , Locale . getDefault ( ) ) ;