Source:
<code>public Set<String> loadBatchOfStoredGeocodes(final boolean detailedOnly, final Geopoint coords, final CacheType cacheType, final int listId) { if (cacheType == null) { throw new IllegalArgumentException("cacheType must not be null"); } init(); Set<String> geocodes = new HashSet<String>(); StringBuilder specifySql = new StringBuilder(); if (listId != StoredList.ALL_LIST_ID) { specifySql.append("reason = "); specifySql.append(Math.max(listId, 1)); } else { specifySql.append("reason >= "); specifySql.append(StoredList.STANDARD_LIST_ID); } if (detailedOnly) { specifySql.append(" and detailed = 1 "); } if (cacheType != CacheType.ALL) { <START> specifySql.append("and type = \""); <END> specifySql.append(cacheType.id); specifySql.append('"'); } try { Cursor cursor; if (coords != null) { cursor = databaseRO.query( dbTableCaches, new String[] { "geocode", "(abs(latitude-" + String.format((Locale) null, "%.6f", coords.getLatitude()) + ") + abs(longitude-" + String.format((Locale) null, "%.6f", coords.getLongitude()) + ")) as dif" }, specifySql.toString(), null, null, null, "dif", null); } else { cursor = databaseRO.query( dbTableCaches, new String[] { "geocode" }, specifySql.toString(), null, null, null, "geocode"); } if (cursor.moveToFirst()) { final int index = cursor.getColumnIndex("geocode"); do { geocodes.add(cursor.getString(index)); } while (cursor.moveToNext()); } cursor.close(); } catch (Exception e) { Log.e("cgData.loadBatchOfStoredGeocodes: " + e.toString()); } return geocodes; }</code><technical_language>space need here? If detailedOnly is false, appended list id, a space end. (This is a question; I SQL)</technical_language>

Target:
public Set<String> loadBatchOfStoredGeocodes(final boolean detailedOnly, final Geopoint coords, final CacheType cacheType, final int listId) { if (cacheType == null) { throw new IllegalArgumentException("cacheType must not be null"); } init(); Set<String> geocodes = new HashSet<String>(); StringBuilder specifySql = new StringBuilder(); if (listId != StoredList.STANDARD_LIST_ID || !Settings.getStoredListShowsAll()) { specifySql.append("reason = "); specifySql.append(Math.max(listId, 1)); } else { specifySql.append("reason >= "); specifySql.append(StoredList.STANDARD_LIST_ID); } if (detailedOnly) { specifySql.append(" and detailed = 1 "); } if (cacheType != CacheType.ALL) { specifySql.append(" and type = \""); specifySql.append(cacheType.id); specifySql.append('"'); } try { Cursor cursor; if (coords != null) { cursor = databaseRO.query( dbTableCaches, new String[] { "geocode", "(abs(latitude-" + String.format((Locale) null, "%.6f", coords.getLatitude()) + ") + abs(longitude-" + String.format((Locale) null, "%.6f", coords.getLongitude()) + ")) as dif" }, specifySql.toString(), null, null, null, "dif", null); } else { cursor = databaseRO.query( dbTableCaches, new String[] { "geocode" }, specifySql.toString(), null, null, null, "geocode"); } if (cursor.moveToFirst()) { final int index = cursor.getColumnIndex("geocode"); do { geocodes.add(cursor.getString(index)); } while (cursor.moveToNext()); } cursor.close(); } catch (Exception e) { Log.e("cgData.loadBatchOfStoredGeocodes: " + e.toString()); } return geocodes; }