Source:
<code>public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); res = this.getResources(); activity = this.getActivity(); final MapProvider mapProvider = Settings.getMapProvider(); mapItemFactory = mapProvider.getMapItemFactory(); final Bundle extras = activity.getIntent().getExtras(); mapOptions = new MapOptions(activity, extras); final ArrayList<Location> trailHistory; if (savedInstanceState != null) { currentSourceId = savedInstanceState.getInt(BUNDLE_MAP_SOURCE, Settings.getMapSource().getNumericalId()); mapOptions.mapState = savedInstanceState.getParcelable(BUNDLE_MAP_STATE); mapOptions.isLiveEnabled = savedInstanceState.getBoolean(BUNDLE_LIVE_ENABLED, false); trailHistory = savedInstanceState.getParcelableArrayList(BUNDLE_TRAIL_HISTORY); proximityNotification = savedInstanceState.getParcelable(BUNDLE_PROXIMITY_NOTIFICATION); } else { currentSourceId = Settings.getMapSource().getNumericalId(); proximityNotification = Settings.isGeneralProximityNotificationActive() ? new ProximityNotification(true, false) : null; trailHistory = null; } if (changeMapSource(Settings.getMapSource())) { return; } noMapTokenShowed = false; ActivityMixin.onCreate(activity, true); ActivityMixin.setTheme(activity); getActionBar().setDisplayHomeAsUpEnabled(true); activity.setContentView(mapProvider.getMapLayoutId()); setTitle(); <START> mapView = activity.findViewById(mapProvider.getMapViewId()); <END> if (savedInstanceState != null) { savedInstanceState.remove(BUNDLE_MAP_SOURCE); savedInstanceState.remove(BUNDLE_MAP_STATE); savedInstanceState.remove(BUNDLE_TRAIL_HISTORY); } mapView.onCreate(savedInstanceState); mapView.onMapReady(new MapReadyCallback() { @Override public void mapReady() { initializeMap(trailHistory); } }); prepareFilterBar(); AndroidBeam.disable(activity); }</code><technical_language>compile</technical_language>

Target:
public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); res = this.getResources(); activity = this.getActivity(); final MapProvider mapProvider = Settings.getMapProvider(); mapItemFactory = mapProvider.getMapItemFactory(); final Bundle extras = activity.getIntent().getExtras(); mapOptions = new MapOptions(activity, extras); final ArrayList<Location> trailHistory; if (savedInstanceState != null) { currentSourceId = savedInstanceState.getInt(BUNDLE_MAP_SOURCE, Settings.getMapSource().getNumericalId()); mapOptions.mapState = savedInstanceState.getParcelable(BUNDLE_MAP_STATE); mapOptions.isLiveEnabled = savedInstanceState.getBoolean(BUNDLE_LIVE_ENABLED, false); trailHistory = savedInstanceState.getParcelableArrayList(BUNDLE_TRAIL_HISTORY); proximityNotification = savedInstanceState.getParcelable(BUNDLE_PROXIMITY_NOTIFICATION); } else { currentSourceId = Settings.getMapSource().getNumericalId(); proximityNotification = Settings.isGeneralProximityNotificationActive() ? new ProximityNotification(true, false) : null; trailHistory = null; } if (changeMapSource(Settings.getMapSource())) { return; } noMapTokenShowed = false; ActivityMixin.onCreate(activity, true); ActivityMixin.setTheme(activity); getActionBar().setDisplayHomeAsUpEnabled(true); activity.setContentView(mapProvider.getMapLayoutId()); setTitle(); mapView = (MapViewImpl) activity.findViewById(mapProvider.getMapViewId()); if (savedInstanceState != null) { savedInstanceState.remove(BUNDLE_MAP_SOURCE); savedInstanceState.remove(BUNDLE_MAP_STATE); savedInstanceState.remove(BUNDLE_TRAIL_HISTORY); } mapView.onCreate(savedInstanceState); mapView.onMapReady(new MapReadyCallback() { @Override public void mapReady() { initializeMap(trailHistory); } }); prepareFilterBar(); AndroidBeam.disable(activity); }