Buggy code:
public class EditTrailActivity extends Activity { private static final String FRAGMENT_TAG_CPEDIT = "cpedit" ; private static final String FRAGMENT_TAG_MAP = "map" ; public static final String INTENT_EXTRA_TRAILID = "trailId" ; public static class EditCheckpointFragment extends Fragment implements TextSpeaker . Listener { private static final int REQUEST_CODE_CAPTURE_IMAGE = 1 ; private static final int REQUEST_CODE_IMPORT_IMAGE = 2 ; private class AccuracyAdapter extends BaseAdapter { private int [ ] choices = new int [ ] { 5 , 10 , 20 , 50 } ; public int getSelection ( int accuracy ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } @ Override public View getDropDownView ( int position , View convertView , ViewGroup parent ) { } } private class ImageViewEx extends ImageView { EditTrailActivity . EditCheckpointFragment . ImageViewEx . ImageViewContextMenuInfo contextMenuInfo = null ; public ImageViewEx ( Context context ) { } public ImageViewEx ( Context context , AttributeSet attrs ) { } protected ContextMenuInfo getContextMenuInfo ( ) { } private class ImageViewContextMenuInfo implements ContextMenuInfo { protected ImageView imageView = null ; protected ImageViewContextMenuInfo ( ImageView imageView ) { } } } public interface Listener { public void onMoveBackwardClick ( ) { } public void onMoveForwardClick ( ) { } public void onDeleteCheckpointClick ( ) { } public void onShowLocationChanged ( boolean show ) { } } boolean loading = false ; private EditTrailActivity . EditCheckpointFragment . Listener listener ; private Checkpoint checkpoint ; private final EditTrailActivity . EditCheckpointFragment . AccuracyAdapter accuracyAdapter = new EditTrailActivity . EditCheckpointFragment . AccuracyAdapter ( ) ; private TextView textViewNo ; private ToggleButton toggleBtnShowOnMap ; private Spinner spinnerAccuracy ; private EditText editTextHint ; private LinearLayout layoutImages ; private ImageButton buttonNewImage ; private ImageButton buttonSpeak ; private ImageButton buttonMoveBackward ; private ImageButton buttonMoveForward ; private ImageButton buttonDeleteCheckpoint ; private File captureTmpFile ; private TextSpeaker textSpeaker ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } @ Override public void onCreateContextMenu ( ContextMenu menu , View v , ContextMenuInfo menuInfo ) { } @ Override public boolean onContextItemSelected ( MenuItem item ) { } @ Override public void onSpeakerInitialized ( boolean available ) { } public Checkpoint getCheckpoint ( ) { } public void setCheckpoint ( Checkpoint checkpoint ) { } public EditTrailActivity . EditCheckpointFragment . Listener getListener ( ) { } public void setListener ( EditTrailActivity . EditCheckpointFragment . Listener onButtonListener ) { } public void enableButtons ( ) { } public void updateIndex ( ) { } private void refreshImages ( ) { } private void save ( ) { } private void addImage ( ) { } private void captureImage ( ) { } private void importImage ( ) { } @ SuppressLint ( "NewApi" ) @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void deleteImage ( Image image ) { } } private class MapListener implements TrailMapFragment . MapListener { @ Override public void onClickedCheckpoint ( Checkpoint checkpoint ) { } @ Override public void onClickedMap ( LatLng position ) { } @ Override public void onStartPositioningCheckpoint ( Checkpoint checkpoint ) { } @ Override public void onPositionedCheckpoint ( Checkpoint checkpoint ) { } } private class EditListener implements EditTrailActivity . EditCheckpointFragment . Listener { @ Override public void onMoveBackwardClick ( ) { } @ Override public void onMoveForwardClick ( ) { } @ Override public void onDeleteCheckpointClick ( ) { } @ Override public void onShowLocationChanged ( boolean show ) { } } private Trail trail = null ; private TrailMapFragment map ; private EditTrailActivity . EditCheckpointFragment checkpointEdit ; private Checkpoint selectedCheckpoint ; private boolean addingCheckpoint = false ; public static void show ( Context context , Trail trail ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public void onStart ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void refresh ( ) { map . clear ( ) ; LatLngBounds . Builder boundsBuilder = new LatLngBounds . Builder ( ) ; List < LatLng > locations = new ArrayList < LatLng > ( ) ; for ( Checkpoint checkpoint : trail . getCheckpoints ( ) ) { LatLng location = new LatLng ( checkpoint . location . getLatitude ( ) , checkpoint . location . getLongitude ( ) ) ; boundsBuilder . include ( location ) ; locations . add ( location ) ; map . addCheckpoint ( checkpoint , false , false ) ; if ( checkpoint == ( selectedCheckpoint ) ) { map . selectCheckpoint ( checkpoint ) ; } } map . refresh ( ) ; if ( ( locations . size ( ) ) > 1 ) { map . setCamera ( locations ) ; } else if ( ( locations . size ( ) ) == 1 ) { <START_BUG> map . setCameraTarget ( locations . get ( 1 ) ) ; <END_BUG> map . setCameraZoom ( DEFAULT_ZOOM ) ; } else { } } private void addCheckpoint ( LatLng position ) { } private void selectCheckpoint ( Checkpoint checkpoint ) { } private void deleteSelectedCheckpoint ( ) { } private void moveSelectedCheckpointBackward ( ) { } private void moveSelectedCheckpointForward ( ) { } private void uploadTrail ( ) { } private void protectTrail ( boolean retry ) { } }

Fix:
map . setCameraTarget ( locations . get ( 0 ) ) ;