<BUG>editor.commit();}</BUG><CONTEXT>public void put(String id, DetectedActivity activity) {SharedPreferences.Editor editor = preferences.edit();editor.putInt(getFieldKey(id, ACTIVITY_ID), activity.getType());editor.putInt(getFieldKey(id, CONFIDENCE_ID), activity.getConfidence());editor.putInt(getFieldKey(id, VERSION_CODE_ID), activity.getVersionCode());<extra_id_0>public DetectedActivity get(String id) {if (preferences != null && preferences.contains(getFieldKey(id, ACTIVITY_ID)) && preferences.contains(getFieldKey(id, CONFIDENCE_ID))) {int activity = preferences.getInt(getFieldKey(id, ACTIVITY_ID), DetectedActivity.UNKNOWN);</CONTEXT>
editor.apply();}