Buggy code:
public class DocumentFragment extends ContentFragment < Document > { protected AttachmentArrayAdapter attachmentAdapter ; protected FolderArrayAdapter folderAdapter ; public static boolean updateCurrentDocument = false ; private AsyncHttpClient asyncHttpClient ; private int content = 0 ; private int currentListPosition = 0 ; private Dialog folderDialog ; private ProgressDialog updateProgressDialog ; private Dialog attachmentDialog ; private boolean openAttachment = true ; private static String EXTRA_CONTENT = "content" ; private static final int INTENT_OPEN_ATTACHMENT_CONTENT = 0 ; private static final int INTENT_ID_PORTEN_WEBVIEW_LOGIN = 1 ; public static DocumentFragment newInstance ( int content ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public int getContent ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onResume ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void showMoveToFolderDialog ( ) { } private ArrayList < Folder > getMoveFolders ( ) { } private void showAttachmentDialog ( final Document document ) { } private void openListItem ( final Document document ) { } private void handleHighAuthenticationLevelDocument ( Document document ) { } private void openHighAuthenticationLevelDialog ( final Document document ) { } private void openHighAuthenticationWebView ( Document document ) { } private void findDocumentAttachments ( final Document document ) { } private void sendOpeningReceipt ( final Document document , final Attachment attachment , int attachmentPosition ) { } private void showOpeningReceiptDialog ( final Document document , final Attachment attachment , final int attachmentPosition ) { } private void showUserKeyEncryptedDialog ( ) { } private void openAttachmentContent ( final Attachment attachment ) { } protected class OpenUpdatedDocumentTask extends AsyncTask < Void , Void , Boolean > { private Document document ; public OpenUpdatedDocumentTask ( final Document document ) { } @ Override protected void onPreExecute ( ) { } @ Override protected Boolean doInBackground ( final Void ... params ) { } @ Override protected void onPostExecute ( Boolean success ) { } } protected void showUpdateProgressDialog ( ) { } private void dismissUpdateProgressDialogIfExisting ( ) { } private void getAttachmentContent ( final Document parentDocument , final int attachmentListPosition , final Attachment attachment ) { } @ Override public void updateAccountMeta ( ) { } private void setEmptyViewText ( ) { } protected void executeDocumentMoveTask ( Document document , String toLocation , String folderId ) { } protected void moveDocument ( String toLocation , String folderId ) { } protected void deleteDocument ( Document document ) { } private void updateAdapterDocument ( Document document ) { } private class MultiChoiceModeListener extends ContentMultiChoiceModeListener { @ Override public boolean onCreateActionMode ( ActionMode actionMode , Menu menu ) { } @ Override public boolean onActionItemClicked ( ActionMode actionMode , MenuItem menuItem ) { } } private class DocumentListOnItemClickListener implements AdapterView . OnItemClickListener { public void onItemClick ( final AdapterView < ? > arg0 , final View view , final int position , final long arg3 ) { } } private void openUpdatedDocument ( int position ) { } private class MoveToFolderListOnItemClickListener implements AdapterView . OnItemClickListener { public MoveToFolderListOnItemClickListener ( ) { } public void onItemClick ( final AdapterView < ? > arg0 , final View arg1 , final int position , final long arg3 ) { } } private class AttachmentListOnItemClickListener implements AdapterView . OnItemClickListener { private Document parentDocument ; public AttachmentListOnItemClickListener ( Document parentDocument ) { } public void onItemClick ( final AdapterView < ? > arg0 , final View arg1 , final int position , final long arg3 ) { } } protected class GetDocumentMetaTask extends AsyncTask < Void , Void , Documents > { private final int content ; private String errorMessage ; private boolean invalidToken ; public GetDocumentMetaTask ( final int content ) { } @ Override protected void onPreExecute ( ) { } @ Override protected Documents doInBackground ( final Void ... params ) { } @ Override protected void onPostExecute ( final Documents documents ) { super . onPostExecute ( documents ) ; if ( isAdded ( ) ) { DocumentFragment . super . taskIsRunning = false ; if ( documents != null ) { ArrayList < Document > docs = documents . getDocument ( ) ; DocumentFragment . super . listAdapter . replaceAll ( docs ) ; <START_BUG> if ( ! ( docs . isEmpty ( ) ) ) { <END_BUG> DocumentFragment . super . setListEmptyViewNoNetwork ( false ) ; } else { if ( ! ( isDetached ( ) ) ) { setEmptyViewText ( ) ; } } } else { if ( invalidToken ) { activityCommunicator . requestLogOut ( ) ; } else if ( listAdapter . isEmpty ( ) ) { DocumentFragment . super . setListEmptyViewNoNetwork ( true ) ; } DialogUtitities . showToast ( DocumentFragment . this . context , errorMessage ) ; } activityCommunicator . onUpdateAccountMeta ( ) ; activityCommunicator . onEndRefreshContent ( ) ; } } @ Override protected void onCancelled ( ) { } } private class DocumentMoveTask extends AsyncTask < Void , Document , String > { private List < Document > documents ; private String toLocation ; private String folderId ; private boolean invalidToken ; private int progress ; public DocumentMoveTask ( List < Document > documents , String toLocation , String folderId ) { } @ Override protected void onPreExecute ( ) { } @ Override protected String doInBackground ( Void ... voids ) { } @ Override protected void onProgressUpdate ( Document ... values ) { } @ Override protected void onCancelled ( ) { } @ Override protected void onPostExecute ( String result ) { } } protected class SendOpeningReceiptTask extends AsyncTask < Void , Void , Boolean > { private String errorMessage ; private Document document ; private Attachment attachment ; private boolean invalidToken ; private int attachmentPosition ; public SendOpeningReceiptTask ( final Document document , final Attachment attachment , int attachmentPosition ) { } @ Override protected void onPreExecute ( ) { }

Fix:
if ( ( docs != null ) && ( ! ( docs . isEmpty ( ) ) ) ) {