Program: 193203
Project: 193203
Buggy source:
/** 
 * Apply each user restriction. <p>Note this method is called by   {@link UserManagerService} while holding{@code mRestrictionLock}. Be aware when calling into other services, which could cause a deadlock.
 */
private static void applyUserRestrictionLR(Context context,int userId,String key,boolean newValue){
  if (UserManagerService.DBG) {
    Log.d(TAG,"String_Node_Str" + userId + "String_Node_Str"+ key+ "String_Node_Str"+ newValue);
  }
  final ContentResolver cr=context.getContentResolver();
  final long id=Binder.clearCallingIdentity();
  try {
switch (key) {
case UserManager.DISALLOW_CONFIG_WIFI:
      if (newValue) {
        android.provider.Settings.Secure.putIntForUser(cr,android.provider.Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,0,userId);
      }
    break;
case UserManager.DISALLOW_SHARE_LOCATION:
  if (newValue) {
    android.provider.Settings.Secure.putIntForUser(cr,android.provider.Settings.Secure.LOCATION_MODE,android.provider.Settings.Secure.LOCATION_MODE_OFF,userId);
    android.provider.Settings.Secure.putStringForUser(cr,android.provider.Settings.Secure.LOCATION_PROVIDERS_ALLOWED,"String_Node_Str",userId);
  }
final String property=android.provider.Settings.Secure.SYS_PROP_SETTING_VERSION;
long version=SystemProperties.getLong(property,0) + 1;
SystemProperties.set(property,Long.toString(version));
final String name=android.provider.Settings.Secure.LOCATION_PROVIDERS_ALLOWED;
final Uri url=Uri.withAppendedPath(android.provider.Settings.Secure.CONTENT_URI,name);
context.getContentResolver().notifyChange(url,null,true,userId);
break;
case UserManager.DISALLOW_DEBUGGING_FEATURES:
if (newValue) {
if (userId == UserHandle.USER_SYSTEM) {
android.provider.Settings.Global.putStringForUser(cr,android.provider.Settings.Global.ADB_ENABLED,"String_Node_Str",userId);
}
}
break;
case UserManager.ENSURE_VERIFY_APPS:
if (newValue) {
android.provider.Settings.Global.putStringForUser(context.getContentResolver(),android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE,"String_Node_Str",userId);
android.provider.Settings.Global.putStringForUser(context.getContentResolver(),android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB,"String_Node_Str",userId);
}
break;
case UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES:
if (newValue) {
android.provider.Settings.Secure.putIntForUser(cr,android.provider.Settings.Secure.INSTALL_NON_MARKET_APPS,0,userId);
}
break;
}
}
  finally {
Binder.restoreCallingIdentity(id);
}
}

Fixed version (ground truth):
/** 
 * Apply each user restriction. <p>Note this method is called by   {@link UserManagerService} while holding{@code mRestrictionLock}. Be aware when calling into other services, which could cause a deadlock. <p>See also   {@link com.android.providers.settings.SettingsProvider#isGlobalOrSecureSettingRestrictedForUser}, which should be in sync with this method.
 */
private static void applyUserRestrictionLR(Context context,int userId,String key,boolean newValue){
  if (UserManagerService.DBG) {
    Log.d(TAG,"String_Node_Str" + userId + "String_Node_Str"+ key+ "String_Node_Str"+ newValue);
  }
  final ContentResolver cr=context.getContentResolver();
  final long id=Binder.clearCallingIdentity();
  try {
switch (key) {
case UserManager.DISALLOW_CONFIG_WIFI:
      if (newValue) {
        android.provider.Settings.Secure.putIntForUser(cr,android.provider.Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,0,userId);
      }
    break;
case UserManager.DISALLOW_SHARE_LOCATION:
  if (newValue) {
    android.provider.Settings.Secure.putIntForUser(cr,android.provider.Settings.Secure.LOCATION_MODE,android.provider.Settings.Secure.LOCATION_MODE_OFF,userId);
  }
final String property=android.provider.Settings.Secure.SYS_PROP_SETTING_VERSION;
long version=SystemProperties.getLong(property,0) + 1;
SystemProperties.set(property,Long.toString(version));
final String name=android.provider.Settings.Secure.LOCATION_PROVIDERS_ALLOWED;
final Uri url=Uri.withAppendedPath(android.provider.Settings.Secure.CONTENT_URI,name);
context.getContentResolver().notifyChange(url,null,true,userId);
break;
case UserManager.DISALLOW_DEBUGGING_FEATURES:
if (newValue) {
if (userId == UserHandle.USER_SYSTEM) {
android.provider.Settings.Global.putStringForUser(cr,android.provider.Settings.Global.ADB_ENABLED,"String_Node_Str",userId);
}
}
break;
case UserManager.ENSURE_VERIFY_APPS:
if (newValue) {
android.provider.Settings.Global.putStringForUser(context.getContentResolver(),android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE,"String_Node_Str",userId);
android.provider.Settings.Global.putStringForUser(context.getContentResolver(),android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB,"String_Node_Str",userId);
}
break;
case UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES:
if (newValue) {
android.provider.Settings.Secure.putIntForUser(cr,android.provider.Settings.Secure.INSTALL_NON_MARKET_APPS,0,userId);
}
break;
}
}
  finally {
Binder.restoreCallingIdentity(id);
}
}