Program: 60363
Project: 60363
Buggy source:
private void showNewFileDialog(final Activity context){
  Utils.showInputDialog(context,R.string.new_file,R.string.untitled,null,new Utils.InputCallback(){
    @Override public void onInput(    String newName){
      if (newName.isEmpty())       newName=getString(R.string.untitled);
      final File dir=mDirectory.isRemote() ? new CloudFile(context,(CloudFile)mDirectory,newName,false) : new LocalFile(context,mDirectory,newName);
      dir.exists(new File.BooleanCallback(){
        @Override public void onComplete(        boolean result){
          if (!result) {
            runOnUiThread(new Runnable(){
              @Override public void run(){
                dir.createFile(new SftpClient.CompletionCallback(){
                  @Override public void onComplete(){
                    runOnUiThread(new Runnable(){
                      @Override public void run(){
                        reload();
                      }
                    }
);
                  }
                  @Override public void onError(                  Exception e){
                    Utils.showErrorDialog(context,e.getMessage());
                  }
                }
);
              }
            }
);
          }
 else {
            CustomDialog.create(getActivity(),R.string.file_already_exists,getString(R.string.file_already_exists_warning),null);
          }
        }
        @Override public void onError(        Exception e){
          Utils.showErrorDialog(context,e.getMessage());
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
private void showNewFileDialog(final Activity context){
  Utils.showInputDialog(context,R.string.new_file,R.string.untitled,null,new Utils.InputCallback(){
    @Override public void onInput(    String newName){
      if (newName.isEmpty())       newName=getString(R.string.untitled);
      final File newFile=mDirectory.isRemote() ? new CloudFile(context,(CloudFile)mDirectory,newName,false) : new LocalFile(context,mDirectory,newName);
      newFile.exists(new File.BooleanCallback(){
        @Override public void onComplete(        boolean result){
          if (!result) {
            runOnUiThread(new Runnable(){
              @Override public void run(){
                newFile.createFile(new SftpClient.CompletionCallback(){
                  @Override public void onComplete(){
                    runOnUiThread(new Runnable(){
                      @Override public void run(){
                        reload();
                      }
                    }
);
                  }
                  @Override public void onError(                  final Exception e){
                    runOnUiThread(new Runnable(){
                      @Override public void run(){
                        Utils.showErrorDialog(context,e.getMessage());
                      }
                    }
);
                  }
                }
);
              }
            }
);
          }
 else {
            runOnUiThread(new Runnable(){
              @Override public void run(){
                CustomDialog.create(getActivity(),R.string.file_already_exists,getString(R.string.file_already_exists_warning),android.R.string.ok,0,android.R.string.cancel,new CustomDialog.SimpleClickListener(){
                  @Override public void onPositive(                  int which,                  View view){
                    createNewFileDuplicate(context,newFile);
                  }
                }
).show(getFragmentManager(),"String_Node_Str");
              }
            }
);
          }
        }
        @Override public void onError(        Exception e){
          Utils.showErrorDialog(context,e.getMessage());
        }
      }
);
    }
  }
);
}