Source:
<code>public TripRequest execute(Activity activity) { String from = getAddressString(getFrom()); String to = getAddressString(getTo()); if (TextUtils.isEmpty(from) || TextUtils.isEmpty(to)) { throw new IllegalArgumentException("Must supply start and end to route between."); } Request request = new Request(); request.setArriveBy(getArriveBy()); request.setFrom(from); request.setTo(to); request.setOptimize(getOptimizeType()); request.setWheelchair(getWheelchairAccessible()); Double maxWalkDistance = getMaxWalkDistance(); if (maxWalkDistance != null) { request.setMaxWalkDistance(maxWalkDistance); } Date d = getDateTime(); String date = getFormattedDate(OTPConstants.FORMAT_OTP_SERVER_DATE_REQUEST, d); String time = getFormattedDate(OTPConstants.FORMAT_OTP_SERVER_TIME_REQUEST, d); request.setDateTime(date, time); String modeString = mBundle.getString(MODE_SET); if (modeString != null) { request.getParameters().put("mode", modeString); } request.setShowIntermediateStops(true); String otpBaseUrl; <START> Application application = Application.get(); <END> if (!TextUtils.isEmpty(application.getCustomOtpApiUrl())) { otpBaseUrl = application.getCustomOtpApiUrl(); Log.d(TAG, "Using custom OTP API URL set by user '" + otpBaseUrl + "'."); if (!TextUtils.isEmpty(otpBaseUrl)) { try { URL url = new URL(otpBaseUrl); } catch (MalformedURLException e) { otpBaseUrl = activity.getString(R.string.http_prefix) + otpBaseUrl; } } } else { otpBaseUrl = application.getCurrentRegion().getOtpBaseUrl(); } String fmtOtpBaseUrl = otpBaseUrl != null ? RegionUtils.formatOtpBaseUrl(otpBaseUrl) : null; TripRequest tripRequest; if (activity == null) { tripRequest = new TripRequest(fmtOtpBaseUrl, mListener); } else { WeakReference<Activity> ref = new WeakReference<Activity>(activity); tripRequest = new TripRequest(fmtOtpBaseUrl, mListener); } tripRequest.execute(request); return tripRequest; }</code><technical_language>Small tweak - shorten variable name app</technical_language>

Target:
public TripRequest execute(Activity activity) { String from = getAddressString(getFrom()); String to = getAddressString(getTo()); if (TextUtils.isEmpty(from) || TextUtils.isEmpty(to)) { throw new IllegalArgumentException("Must supply start and end to route between."); } Request request = new Request(); request.setArriveBy(getArriveBy()); request.setFrom(from); request.setTo(to); request.setOptimize(getOptimizeType()); request.setWheelchair(getWheelchairAccessible()); Double maxWalkDistance = getMaxWalkDistance(); if (maxWalkDistance != null) { request.setMaxWalkDistance(maxWalkDistance); } Date d = getDateTime(); String date = getFormattedDate(OTPConstants.FORMAT_OTP_SERVER_DATE_REQUEST, d); String time = getFormattedDate(OTPConstants.FORMAT_OTP_SERVER_TIME_REQUEST, d); request.setDateTime(date, time); String modeString = mBundle.getString(MODE_SET); if (modeString != null) { request.getParameters().put("mode", modeString); } request.setShowIntermediateStops(true); String otpBaseUrl; Application app = Application.get(); if (!TextUtils.isEmpty(app.getCustomOtpApiUrl())) { otpBaseUrl = app.getCustomOtpApiUrl(); Log.d(TAG, "Using custom OTP API URL set by user '" + otpBaseUrl + "'."); if (!TextUtils.isEmpty(otpBaseUrl)) { try { URL url = new URL(otpBaseUrl); } catch (MalformedURLException e) { otpBaseUrl = activity.getString(R.string.http_prefix) + otpBaseUrl; } } } else { otpBaseUrl = app.getCurrentRegion().getOtpBaseUrl(); } String fmtOtpBaseUrl = otpBaseUrl != null ? RegionUtils.formatOtpBaseUrl(otpBaseUrl) : null; TripRequest tripRequest; if (activity == null) { tripRequest = new TripRequest(fmtOtpBaseUrl, mListener); } else { WeakReference<Activity> ref = new WeakReference<Activity>(activity); tripRequest = new TripRequest(fmtOtpBaseUrl, mListener); } tripRequest.execute(request); return tripRequest; }