Buggy code:
public final class TaskEditFragment extends Fragment implements ViewPager . OnPageChangeListener , EditNoteActivity . UpdatesChangedListener { public static final String TAG_TASKEDIT_FRAGMENT = "taskedit_fragment" ; public static final String TOKEN_ID = "id" ; public static final String TOKEN_VALUES = "v" ; private static final String TASK_IN_PROGRESS = "task_in_progress" ; private static final String TASK_REMOTE_ID = "task_remote_id" ; public static final String TOKEN_TAB = "tab" ; public static final int REQUEST_LOG_IN = 0 ; private static final int REQUEST_VOICE_RECOG = 1 ; private static final int MENU_SAVE_ID = string . TEA_menu_save ; private static final int MENU_DISCARD_ID = string . TEA_menu_discard ; private static final int MENU_DELETE_ID = string . TEA_menu_delete ; private static final int MENU_COMMENTS_REFRESH_ID = string . TEA_menu_comments ; public static final int RESULT_CODE_SAVED = Activity . RESULT_FIRST_USER ; public static final int RESULT_CODE_DISCARDED = ( Activity . RESULT_FIRST_USER ) + 1 ; public static final int RESULT_CODE_DELETED = ( Activity . RESULT_FIRST_USER ) + 2 ; public static final String OVERRIDE_FINISH_ANIM = "finishAnim" ; public static final String TOKEN_TASK_WAS_ASSIGNED = "task_assigned" ; public static final String TOKEN_ASSIGNED_TO = "task_assigned_to" ; public static final String TOKEN_TAGS_CHANGED = "tags_changed" ; public static final String TOKEN_NEW_REPEATING_TASK = "new_repeating" ; public static final int TAB_VIEW_UPDATES = 0 ; public static final int TAB_VIEW_MORE = 1 ; public static final int TAB_VIEW_WEB_SERVICES = 2 ; @ Autowired private ExceptionService exceptionService ; @ Autowired private TaskService taskService ; @ Autowired private MetadataService metadataService ; @ Autowired private AddOnService addOnService ; @ Autowired private ActFmPreferenceService actFmPreferenceService ; private ImageButton voiceAddNoteButton ; private EditPeopleControlSet peopleControlSet = null ; private TaskRabbitControlSet taskRabbitControl = null ; private EditNotesControlSet notesControlSet = null ; private HideUntilControlSet hideUntilControls = null ; private TagsControlSet tagsControlSet = null ; private TimerActionControlSet timerAction ; private EditText title ; private TaskEditMoreControls moreControls ; private EditNoteActivity editNotes ; private NestableViewPager mPager ; private TaskEditViewPager mAdapter ; private TabPageIndicator mIndicator ; private final Runnable refreshActivity = new Runnable ( ) { @ Override public void run ( ) { } } ; private final List < TaskEditControlSet > controls = Collections . synchronizedList ( new ArrayList < TaskEditControlSet > ( ) ) ; boolean isNewTask = false ; Task model = null ; private boolean shouldSaveState = true ; private VoiceInputAssistant voiceNoteAssistant ; private EditText notesEditText ; private Dialog whenDialog ; private boolean overrideFinishAnim ; TaskEditFragment . OnTaskEditDetailsClickedListener mListener ; private long remoteId = 0 ; private WebServicesView webServices = null ; public static final int TAB_STYLE_NONE = 0 ; public static final int TAB_STYLE_ACTIVITY = 1 ; public static final int TAB_STYLE_ACTIVITY_WEB = 2 ; public static final int TAB_STYLE_WEB = 3 ; private int tabStyle = TaskEditFragment . TAB_STYLE_NONE ; public interface OnTaskEditDetailsClickedListener { public void onTaskEditDetailsClicked ( int category , int position ) { } } @ Override public void onAttach ( SupportActivity activity ) { } public TaskEditFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { } private void loadMoreContainer ( ) { } private void setCurrentTab ( int position ) { } private void setUpUIComponents ( ) { } private void removeTeaSeparator ( View view ) { } private void constructWhenDialog ( View whenDialogView ) { } private class TaskEditBackgroundLoader extends Thread { public void onUiThread ( ) { } @ Override public void run ( ) { } } @ SuppressWarnings ( "nls" ) protected void loadItem ( Intent intent ) { } public void repopulateFromScratch ( Intent intent ) { } public void populateFields ( Intent intent ) { } private void populateFields ( ) { } public void save ( boolean onPause ) { } public boolean onKeyDown ( int keyCode ) { if ( keyCode == ( KeyEvent . KEYCODE_BACK ) ) { <START_BUG> if ( ( title . getText ( ) . length ( ) ) == 0 ) <END_BUG> discardButtonClick ( ) ; else saveButtonClick ( ) ; return true ; } return false ; } @ Override public void onDetach ( ) { } protected void saveButtonClick ( ) { } private String addDueTimeToToast ( String additionalMessage ) { } protected void discardButtonClick ( ) { } private void showCancelToast ( ) { } protected void deleteButtonClick ( ) { } private void showDeleteToast ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public void onPrepareOptionsMenu ( Menu menu ) { } @ Override public void onPause ( ) { } @ Override public void onResume ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onStart ( ) { } @ Override public void onStop ( ) { } private void adjustInfoPopovers ( ) { } @ SuppressWarnings ( "nls" ) public int getTabForPosition ( int position ) { } public View getPageView ( int position ) { } private void setPagerHeightForPosition ( int position ) { } public static void setViewHeightBasedOnChildren ( LinearLayout view ) { } @ Override public void onPageScrolled ( int position , float positionOffset , int positionOffsetPixels ) { } @ Override public void onPageSelected ( final int position ) { } @ Override public void onPageScrollStateChanged ( int state ) { } @ Override public void updatesChanged ( ) { } @ Override public void commentAdded ( ) { } public void scrollToView ( View v ) { } }

Fix:
if ( ( ( title . getText ( ) . length ( ) ) == 0 ) || ( ! ( peopleControlSet . hasLoadedUI ( ) ) ) )