nus-yam/ex-repair huggingface dataset:
Program: 1425
Project: 1425
Buggy source:
/** 
 * Adjusts the master volume for the device's audio amplifier. <p>
 * @param steps The number of volume steps to adjust. A positivevalue will raise the volume.
 * @param flags One or more flags.
 * @hide
 */
public void adjustMasterVolume(int steps,int flags){
  IAudioService service=getService();
  try {
    service.adjustMasterVolume(steps,flags,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the master volume for the device's audio amplifier. <p>
 * @param steps The number of volume steps to adjust. A positivevalue will raise the volume.
 * @param flags One or more flags.
 * @hide
 */
public void adjustMasterVolume(int steps,int flags){
  IAudioService service=getService();
  try {
    service.adjustMasterVolume(steps,flags,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1426
Project: 1426
Buggy source:
/** 
 * @hide Used internally by telephony package to request audio focus. Will cause the focus request to be associated with the "voice communication" identifier only used in AudioService to identify this use case.
 * @param streamType use STREAM_RING for focus requests when ringing, VOICE_CALL forthe establishment of the call
 * @param durationHint the type of focus request. AUDIOFOCUS_GAIN_TRANSIENT is recommended somedia applications resume after a call
 */
public void requestAudioFocusForCall(int streamType,int durationHint){
  IAudioService service=getService();
  try {
    service.requestAudioFocus(streamType,durationHint,mICallBack,null,MediaFocusControl.IN_VOICE_COMM_FOCUS_ID,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * @hide Used internally by telephony package to request audio focus. Will cause the focus request to be associated with the "voice communication" identifier only used in AudioService to identify this use case.
 * @param streamType use STREAM_RING for focus requests when ringing, VOICE_CALL forthe establishment of the call
 * @param durationHint the type of focus request. AUDIOFOCUS_GAIN_TRANSIENT is recommended somedia applications resume after a call
 */
public void requestAudioFocusForCall(int streamType,int durationHint){
  IAudioService service=getService();
  try {
    service.requestAudioFocus(streamType,durationHint,mICallBack,null,MediaFocusControl.IN_VOICE_COMM_FOCUS_ID,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str" + e);
  }
}
Program: 1428
Project: 1428
Buggy source:
/** 
 * Adjusts the volume of a particular stream by one step in a direction. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param streamType The stream type to adjust. One of {@link #STREAM_VOICE_CALL},  {@link #STREAM_SYSTEM},   {@link #STREAM_RING},   {@link #STREAM_MUSIC} or{@link #STREAM_ALARM}
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustStreamVolume(int streamType,int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getBasePackageName());
    }
 else {
      service.adjustStreamVolume(streamType,direction,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the volume of a particular stream by one step in a direction. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param streamType The stream type to adjust. One of {@link #STREAM_VOICE_CALL},  {@link #STREAM_SYSTEM},   {@link #STREAM_RING},   {@link #STREAM_MUSIC} or{@link #STREAM_ALARM}
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustStreamVolume(int streamType,int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getOpPackageName());
    }
 else {
      service.adjustStreamVolume(streamType,direction,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1429
Project: 1429
Buggy source:
/** 
 * Adjusts the volume of the most relevant stream, or the given fallback stream. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param suggestedStreamType The stream type that will be used if thereisn't a relevant stream.  {@link #USE_DEFAULT_STREAM_TYPE} is valid here.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustSuggestedStreamVolume(int direction,int suggestedStreamType,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getBasePackageName());
    }
 else {
      service.adjustSuggestedStreamVolume(direction,suggestedStreamType,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the volume of the most relevant stream, or the given fallback stream. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param suggestedStreamType The stream type that will be used if thereisn't a relevant stream.  {@link #USE_DEFAULT_STREAM_TYPE} is valid here.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustSuggestedStreamVolume(int direction,int suggestedStreamType,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getOpPackageName());
    }
 else {
      service.adjustSuggestedStreamVolume(direction,suggestedStreamType,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1430
Project: 1430
Buggy source:
/** 
 * Adjusts the volume of the most relevant stream. For example, if a call is active, it will have the highest priority regardless of if the in-call screen is showing. Another example, if music is playing in the background and a call is not active, the music stream will be adjusted. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustSuggestedStreamVolume(int,int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustVolume(int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getBasePackageName());
    }
 else {
      service.adjustVolume(direction,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the volume of the most relevant stream. For example, if a call is active, it will have the highest priority regardless of if the in-call screen is showing. Another example, if music is playing in the background and a call is not active, the music stream will be adjusted. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustSuggestedStreamVolume(int,int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustVolume(int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getOpPackageName());
    }
 else {
      service.adjustVolume(direction,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1431
Project: 1431
Buggy source:
/** 
 * Sets the volume index for master volume.
 * @param index The volume index to set. See{@link #getMasterMaxVolume()} for the largest valid value.
 * @param flags One or more flags.
 * @see #getMasterMaxVolume()
 * @see #getMasterVolume()
 * @hide
 */
public void setMasterVolume(int index,int flags){
  IAudioService service=getService();
  try {
    service.setMasterVolume(index,flags,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sets the volume index for master volume.
 * @param index The volume index to set. See{@link #getMasterMaxVolume()} for the largest valid value.
 * @param flags One or more flags.
 * @see #getMasterMaxVolume()
 * @see #getMasterVolume()
 * @hide
 */
public void setMasterVolume(int index,int flags){
  IAudioService service=getService();
  try {
    service.setMasterVolume(index,flags,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1432
Project: 1432
Buggy source:
/** 
 * Sets the volume index for a particular stream.
 * @param streamType The stream whose volume index should be set.
 * @param index The volume index to set. See{@link #getStreamMaxVolume(int)} for the largest valid value.
 * @param flags One or more flags.
 * @see #getStreamMaxVolume(int)
 * @see #getStreamVolume(int)
 */
public void setStreamVolume(int streamType,int index,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.setMasterVolume(index,flags,mContext.getBasePackageName());
    }
 else {
      service.setStreamVolume(streamType,index,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sets the volume index for a particular stream.
 * @param streamType The stream whose volume index should be set.
 * @param index The volume index to set. See{@link #getStreamMaxVolume(int)} for the largest valid value.
 * @param flags One or more flags.
 * @see #getStreamMaxVolume(int)
 * @see #getStreamVolume(int)
 */
public void setStreamVolume(int streamType,int index,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.setMasterVolume(index,flags,mContext.getOpPackageName());
    }
 else {
      service.setStreamVolume(streamType,index,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1433
Project: 1433
Buggy source:
/** 
 * @hide If the stream is active locally or remotely, adjust its volume according to the enforced priority rules. Note: only AudioManager.STREAM_MUSIC is supported at the moment
 */
public void adjustLocalOrRemoteStreamVolume(int streamType,int direction){
  if (streamType != STREAM_MUSIC) {
    Log.w(TAG,"String_Node_Str" + streamType);
  }
  IAudioService service=getService();
  try {
    service.adjustLocalOrRemoteStreamVolume(streamType,direction,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * @hide If the stream is active locally or remotely, adjust its volume according to the enforced priority rules. Note: only AudioManager.STREAM_MUSIC is supported at the moment
 */
public void adjustLocalOrRemoteStreamVolume(int streamType,int direction){
  if (streamType != STREAM_MUSIC) {
    Log.w(TAG,"String_Node_Str" + streamType);
  }
  IAudioService service=getService();
  try {
    service.adjustLocalOrRemoteStreamVolume(streamType,direction,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1434
Project: 1434
Buggy source:
/** 
 * Tell the audio service to adjust the volume appropriate to the event.
 * @param keycode
 */
void handleVolumeKey(int stream,int keycode){
  IAudioService audioService=getAudioService();
  if (audioService == null) {
    return;
  }
  try {
    mBroadcastWakeLock.acquire();
    audioService.adjustStreamVolume(stream,keycode == KeyEvent.KEYCODE_VOLUME_UP ? AudioManager.ADJUST_RAISE : AudioManager.ADJUST_LOWER,0,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.w(TAG,"String_Node_Str" + e);
  }
 finally {
    mBroadcastWakeLock.release();
  }
}

Fixed version (ground truth):
/** 
 * Tell the audio service to adjust the volume appropriate to the event.
 * @param keycode
 */
void handleVolumeKey(int stream,int keycode){
  IAudioService audioService=getAudioService();
  if (audioService == null) {
    return;
  }
  try {
    mBroadcastWakeLock.acquire();
    audioService.adjustStreamVolume(stream,keycode == KeyEvent.KEYCODE_VOLUME_UP ? AudioManager.ADJUST_RAISE : AudioManager.ADJUST_LOWER,0,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.w(TAG,"String_Node_Str" + e);
  }
 finally {
    mBroadcastWakeLock.release();
  }
}
Program: 1435
Project: 1435
Buggy source:
@Override public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  if (!mVibrator.hasVibrator()) {
    return false;
  }
  final boolean hapticsDisabled=Settings.System.getIntForUser(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0,UserHandle.USER_CURRENT) == 0;
  if (!always && (hapticsDisabled || mKeyguardDelegate.isShowingAndNotHidden())) {
    return false;
  }
  long[] pattern=null;
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    pattern=mLongPressVibePattern;
  break;
case HapticFeedbackConstants.VIRTUAL_KEY:
pattern=mVirtualKeyVibePattern;
break;
case HapticFeedbackConstants.KEYBOARD_TAP:
pattern=mKeyboardTapVibePattern;
break;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
pattern=mSafeModeDisabledVibePattern;
break;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
pattern=mSafeModeEnabledVibePattern;
break;
default :
return false;
}
int owningUid;
String owningPackage;
if (win != null) {
owningUid=win.getOwningUid();
owningPackage=win.getOwningPackage();
}
 else {
owningUid=android.os.Process.myUid();
owningPackage=mContext.getBasePackageName();
}
if (pattern.length == 1) {
mVibrator.vibrate(owningUid,owningPackage,pattern[0]);
}
 else {
mVibrator.vibrate(owningUid,owningPackage,pattern,-1);
}
return true;
}

Fixed version (ground truth):
@Override public boolean performHapticFeedbackLw(WindowState win,int effectId,boolean always){
  if (!mVibrator.hasVibrator()) {
    return false;
  }
  final boolean hapticsDisabled=Settings.System.getIntForUser(mContext.getContentResolver(),Settings.System.HAPTIC_FEEDBACK_ENABLED,0,UserHandle.USER_CURRENT) == 0;
  if (!always && (hapticsDisabled || mKeyguardDelegate.isShowingAndNotHidden())) {
    return false;
  }
  long[] pattern=null;
switch (effectId) {
case HapticFeedbackConstants.LONG_PRESS:
    pattern=mLongPressVibePattern;
  break;
case HapticFeedbackConstants.VIRTUAL_KEY:
pattern=mVirtualKeyVibePattern;
break;
case HapticFeedbackConstants.KEYBOARD_TAP:
pattern=mKeyboardTapVibePattern;
break;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
pattern=mSafeModeDisabledVibePattern;
break;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
pattern=mSafeModeEnabledVibePattern;
break;
default :
return false;
}
int owningUid;
String owningPackage;
if (win != null) {
owningUid=win.getOwningUid();
owningPackage=win.getOwningPackage();
}
 else {
owningUid=android.os.Process.myUid();
owningPackage=mContext.getOpPackageName();
}
if (pattern.length == 1) {
mVibrator.vibrate(owningUid,owningPackage,pattern[0]);
}
 else {
mVibrator.vibrate(owningUid,owningPackage,pattern,-1);
}
return true;
}
Program: 1436
Project: 1436
Buggy source:
/** 
 * Returns the neighboring cell information of the device. The getAllCellInfo is preferred and use this only if getAllCellInfo return nulls or an empty list. <p> In the future this call will be deprecated. <p>
 * @return List of NeighboringCellInfo or null if info unavailable.<p>Requires Permission: (@link android.Manifest.permission#ACCESS_COARSE_UPDATES}
 */
public List<NeighboringCellInfo> getNeighboringCellInfo(){
  try {
    return getITelephony().getNeighboringCellInfo(mContext.getBasePackageName());
  }
 catch (  RemoteException ex) {
    return null;
  }
catch (  NullPointerException ex) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Returns the neighboring cell information of the device. The getAllCellInfo is preferred and use this only if getAllCellInfo return nulls or an empty list. <p> In the future this call will be deprecated. <p>
 * @return List of NeighboringCellInfo or null if info unavailable.<p>Requires Permission: (@link android.Manifest.permission#ACCESS_COARSE_UPDATES}
 */
public List<NeighboringCellInfo> getNeighboringCellInfo(){
  try {
    return getITelephony().getNeighboringCellInfo(mContext.getOpPackageName());
  }
 catch (  RemoteException ex) {
    return null;
  }
catch (  NullPointerException ex) {
    return null;
  }
}
Program: 1437
Project: 1437
Buggy source:
/** 
 * @hide 
 */
public int startOp(int op){
  return startOp(op,Process.myUid(),mContext.getBasePackageName());
}

Fixed version (ground truth):
/** 
 * @hide 
 */
public int startOp(int op){
  return startOp(op,Process.myUid(),mContext.getOpPackageName());
}
Program: 1438
Project: 1438
Buggy source:
public void finishOp(int op){
  finishOp(op,Process.myUid(),mContext.getBasePackageName());
}

Fixed version (ground truth):
public void finishOp(int op){
  finishOp(op,Process.myUid(),mContext.getOpPackageName());
}
Program: 1439
Project: 1439
Buggy source:
/** 
 * @hide 
 */
public int noteOp(int op){
  return noteOp(op,Process.myUid(),mContext.getBasePackageName());
}

Fixed version (ground truth):
/** 
 * @hide 
 */
public int noteOp(int op){
  return noteOp(op,Process.myUid(),mContext.getOpPackageName());
}
Program: 1440
Project: 1440
Buggy source:
/** 
 * Do a quick check for whether an application might be able to perform an operation. This is <em>not</em> a security check; you must use   {@link #noteOp(int,int,String)}or   {@link #startOp(int,int,String)} for your actual security checks, which alsoensure that the given uid and package name are consistent.  This function can just be used for a quick check to see if an operation has been disabled for the application, as an early reject of some work.  This does not modify the time stamp or other data about the operation.
 * @param op The operation to check.  One of the OP_* constants.
 * @param uid The user id of the application attempting to perform the operation.
 * @param packageName The name of the application attempting to perform the operation.
 * @return Returns {@link #MODE_ALLOWED} if the operation is allowed, or{@link #MODE_IGNORED} if it is not allowed and should be silently ignored (withoutcausing the app to crash).
 * @throws SecurityException If the app has been configured to crash on this op.
 */
public int checkOp(int op,int uid,String packageName){
  try {
    int mode=mService.checkOperation(op,uid,packageName);
    if (mode == MODE_ERRORED) {
      throw new SecurityException("String_Node_Str");
    }
    return mode;
  }
 catch (  RemoteException e) {
  }
  return MODE_IGNORED;
}

Fixed version (ground truth):
/** 
 * Do a quick check for whether an application might be able to perform an operation. This is <em>not</em> a security check; you must use   {@link #noteOp(int,int,String)}or   {@link #startOp(int,int,String)} for your actual security checks, which alsoensure that the given uid and package name are consistent.  This function can just be used for a quick check to see if an operation has been disabled for the application, as an early reject of some work.  This does not modify the time stamp or other data about the operation.
 * @param op The operation to check.  One of the OP_* constants.
 * @param uid The user id of the application attempting to perform the operation.
 * @param packageName The name of the application attempting to perform the operation.
 * @return Returns {@link #MODE_ALLOWED} if the operation is allowed, or{@link #MODE_IGNORED} if it is not allowed and should be silently ignored (withoutcausing the app to crash).
 * @throws SecurityException If the app has been configured to crash on this op.
 */
public int checkOp(int op,int uid,String packageName){
  try {
    int mode=mService.checkOperation(op,uid,packageName);
    if (mode == MODE_ERRORED) {
      throw new SecurityException(buildSecurityExceptionMsg(op,uid,packageName));
    }
    return mode;
  }
 catch (  RemoteException e) {
  }
  return MODE_IGNORED;
}
Program: 1441
Project: 1441
Buggy source:
@Override public void setApplicationEnabledSetting(String packageName,int newState,int flags){
  try {
    mPM.setApplicationEnabledSetting(packageName,newState,flags,mContext.getUserId(),mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
@Override public void setApplicationEnabledSetting(String packageName,int newState,int flags){
  try {
    mPM.setApplicationEnabledSetting(packageName,newState,flags,mContext.getUserId(),mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
  }
}
Program: 1442
Project: 1442
Buggy source:
/** 
 * Create a new ApplicationContext from an existing one.  The new one works and operates the same as the one it is copying.
 * @param context Existing application context.
 */
public ContextImpl(ContextImpl context){
  mPackageInfo=context.mPackageInfo;
  mBasePackageName=context.mBasePackageName;
  mResources=context.mResources;
  mMainThread=context.mMainThread;
  mContentResolver=context.mContentResolver;
  mUser=context.mUser;
  mDisplay=context.mDisplay;
  mOuterContext=this;
  mDisplayAdjustments.setCompatibilityInfo(mPackageInfo.getCompatibilityInfo());
}

Fixed version (ground truth):
/** 
 * Create a new ApplicationContext from an existing one.  The new one works and operates the same as the one it is copying.
 * @param context Existing application context.
 */
public ContextImpl(ContextImpl context){
  mPackageInfo=context.mPackageInfo;
  mBasePackageName=context.mBasePackageName;
  mOpPackageName=context.mOpPackageName;
  mResources=context.mResources;
  mMainThread=context.mMainThread;
  mContentResolver=context.mContentResolver;
  mUser=context.mUser;
  mDisplay=context.mDisplay;
  mOuterContext=this;
  mDisplayAdjustments.setCompatibilityInfo(mPackageInfo.getCompatibilityInfo());
}
Program: 1443
Project: 1443
Buggy source:
final void init(Resources resources,ActivityThread mainThread,UserHandle user){
  mPackageInfo=null;
  mBasePackageName=null;
  mResources=resources;
  mMainThread=mainThread;
  mContentResolver=new ApplicationContentResolver(this,mainThread,user);
  mUser=user;
}

Fixed version (ground truth):
final void init(Resources resources,ActivityThread mainThread,UserHandle user){
  mPackageInfo=null;
  mBasePackageName=null;
  mOpPackageName=null;
  mResources=resources;
  mMainThread=mainThread;
  mContentResolver=new ApplicationContentResolver(this,mainThread,user);
  mUser=user;
}
Program: 1444
Project: 1444
Buggy source:
/** 
 * Post a notification to be shown in the status bar. If a notification with the same tag and id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.
 * @param tag A string identifier for this notification.  May be {@code null}.
 * @param id An identifier for this notification.  The pair (tag, id) must be uniquewithin your application.
 * @param notification A {@link Notification} object describing what toshow the user. Must not be null.
 */
public void notify(String tag,int id,Notification notification){
  int[] idOut=new int[1];
  INotificationManager service=getService();
  String pkg=mContext.getPackageName();
  if (notification.sound != null) {
    notification.sound=notification.sound.getCanonicalUri();
    if (StrictMode.vmFileUriExposureEnabled()) {
      notification.sound.checkFileUriExposed("String_Node_Str");
    }
  }
  if (localLOGV)   Log.v(TAG,pkg + "String_Node_Str" + id+ "String_Node_Str"+ notification+ "String_Node_Str");
  try {
    service.enqueueNotificationWithTag(pkg,mContext.getBasePackageName(),tag,id,notification,idOut,UserHandle.myUserId());
    if (id != idOut[0]) {
      Log.w(TAG,"String_Node_Str" + id + "String_Node_Str"+ idOut[0]);
    }
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Post a notification to be shown in the status bar. If a notification with the same tag and id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.
 * @param tag A string identifier for this notification.  May be {@code null}.
 * @param id An identifier for this notification.  The pair (tag, id) must be uniquewithin your application.
 * @param notification A {@link Notification} object describing what toshow the user. Must not be null.
 */
public void notify(String tag,int id,Notification notification){
  int[] idOut=new int[1];
  INotificationManager service=getService();
  String pkg=mContext.getPackageName();
  if (notification.sound != null) {
    notification.sound=notification.sound.getCanonicalUri();
    if (StrictMode.vmFileUriExposureEnabled()) {
      notification.sound.checkFileUriExposed("String_Node_Str");
    }
  }
  if (localLOGV)   Log.v(TAG,pkg + "String_Node_Str" + id+ "String_Node_Str"+ notification+ "String_Node_Str");
  try {
    service.enqueueNotificationWithTag(pkg,mContext.getOpPackageName(),tag,id,notification,idOut,UserHandle.myUserId());
    if (id != idOut[0]) {
      Log.w(TAG,"String_Node_Str" + id + "String_Node_Str"+ idOut[0]);
    }
  }
 catch (  RemoteException e) {
  }
}
Program: 1445
Project: 1445
Buggy source:
/** 
 * @hide
 */
public void notifyAsUser(String tag,int id,Notification notification,UserHandle user){
  int[] idOut=new int[1];
  INotificationManager service=getService();
  String pkg=mContext.getPackageName();
  if (notification.sound != null) {
    notification.sound=notification.sound.getCanonicalUri();
    if (StrictMode.vmFileUriExposureEnabled()) {
      notification.sound.checkFileUriExposed("String_Node_Str");
    }
  }
  if (localLOGV)   Log.v(TAG,pkg + "String_Node_Str" + id+ "String_Node_Str"+ notification+ "String_Node_Str");
  try {
    service.enqueueNotificationWithTag(pkg,mContext.getBasePackageName(),tag,id,notification,idOut,user.getIdentifier());
    if (id != idOut[0]) {
      Log.w(TAG,"String_Node_Str" + id + "String_Node_Str"+ idOut[0]);
    }
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * @hide
 */
public void notifyAsUser(String tag,int id,Notification notification,UserHandle user){
  int[] idOut=new int[1];
  INotificationManager service=getService();
  String pkg=mContext.getPackageName();
  if (notification.sound != null) {
    notification.sound=notification.sound.getCanonicalUri();
    if (StrictMode.vmFileUriExposureEnabled()) {
      notification.sound.checkFileUriExposed("String_Node_Str");
    }
  }
  if (localLOGV)   Log.v(TAG,pkg + "String_Node_Str" + id+ "String_Node_Str"+ notification+ "String_Node_Str");
  try {
    service.enqueueNotificationWithTag(pkg,mContext.getOpPackageName(),tag,id,notification,idOut,user.getIdentifier());
    if (id != idOut[0]) {
      Log.w(TAG,"String_Node_Str" + id + "String_Node_Str"+ idOut[0]);
    }
  }
 catch (  RemoteException e) {
  }
}
Program: 1446
Project: 1446
Buggy source:
/** 
 * Returns true if there is currently a primary clip on the clipboard.
 */
public boolean hasPrimaryClip(){
  try {
    return getService().hasPrimaryClip(mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Returns true if there is currently a primary clip on the clipboard.
 */
public boolean hasPrimaryClip(){
  try {
    return getService().hasPrimaryClip(mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    return false;
  }
}
Program: 1447
Project: 1447
Buggy source:
/** 
 * Returns the current primary clip on the clipboard.
 */
public ClipData getPrimaryClip(){
  try {
    return getService().getPrimaryClip(mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Returns the current primary clip on the clipboard.
 */
public ClipData getPrimaryClip(){
  try {
    return getService().getPrimaryClip(mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    return null;
  }
}
Program: 1448
Project: 1448
Buggy source:
/** 
 * Returns a description of the current primary clip on the clipboard but not a copy of its data.
 */
public ClipDescription getPrimaryClipDescription(){
  try {
    return getService().getPrimaryClipDescription(mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Returns a description of the current primary clip on the clipboard but not a copy of its data.
 */
public ClipDescription getPrimaryClipDescription(){
  try {
    return getService().getPrimaryClipDescription(mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    return null;
  }
}
Program: 1449
Project: 1449
Buggy source:
public void addPrimaryClipChangedListener(OnPrimaryClipChangedListener what){
synchronized (mPrimaryClipChangedListeners) {
    if (mPrimaryClipChangedListeners.size() == 0) {
      try {
        getService().addPrimaryClipChangedListener(mPrimaryClipChangedServiceListener,mContext.getBasePackageName());
      }
 catch (      RemoteException e) {
      }
    }
    mPrimaryClipChangedListeners.add(what);
  }
}

Fixed version (ground truth):
public void addPrimaryClipChangedListener(OnPrimaryClipChangedListener what){
synchronized (mPrimaryClipChangedListeners) {
    if (mPrimaryClipChangedListeners.size() == 0) {
      try {
        getService().addPrimaryClipChangedListener(mPrimaryClipChangedServiceListener,mContext.getOpPackageName());
      }
 catch (      RemoteException e) {
      }
    }
    mPrimaryClipChangedListeners.add(what);
  }
}
Program: 1450
Project: 1450
Buggy source:
/** 
 * @deprecated Use {@link #hasPrimaryClip()} instead.
 */
public boolean hasText(){
  try {
    return getService().hasClipboardText(mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @deprecated Use {@link #hasPrimaryClip()} instead.
 */
public boolean hasText(){
  try {
    return getService().hasClipboardText(mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    return false;
  }
}
Program: 1451
Project: 1451
Buggy source:
/** 
 * Sets the current primary clip on the clipboard.  This is the clip that is involved in normal cut and paste operations.
 * @param clip The clipped data item to set.
 */
public void setPrimaryClip(ClipData clip){
  try {
    if (clip != null) {
      clip.prepareToLeaveProcess();
    }
    getService().setPrimaryClip(clip,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Sets the current primary clip on the clipboard.  This is the clip that is involved in normal cut and paste operations.
 * @param clip The clipped data item to set.
 */
public void setPrimaryClip(ClipData clip){
  try {
    if (clip != null) {
      clip.prepareToLeaveProcess();
    }
    getService().setPrimaryClip(clip,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
  }
}
Program: 1452
Project: 1452
Buggy source:
public ContentResolver(Context context){
  mContext=context != null ? context : ActivityThread.currentApplication();
  mPackageName=mContext.getBasePackageName();
}

Fixed version (ground truth):
public ContentResolver(Context context){
  mContext=context != null ? context : ActivityThread.currentApplication();
  mPackageName=mContext.getOpPackageName();
}
Program: 1454
Project: 1454
Buggy source:
public SystemVibrator(Context context){
  mPackageName=context.getBasePackageName();
  mService=IVibratorService.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
}

Fixed version (ground truth):
public SystemVibrator(Context context){
  mPackageName=context.getOpPackageName();
  mService=IVibratorService.Stub.asInterface(ServiceManager.getService("String_Node_Str"));
}
Program: 1455
Project: 1455
Buggy source:
/** 
 * Adjusts the master volume for the device's audio amplifier. <p>
 * @param steps The number of volume steps to adjust. A positivevalue will raise the volume.
 * @param flags One or more flags.
 * @hide
 */
public void adjustMasterVolume(int steps,int flags){
  IAudioService service=getService();
  try {
    service.adjustMasterVolume(steps,flags,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the master volume for the device's audio amplifier. <p>
 * @param steps The number of volume steps to adjust. A positivevalue will raise the volume.
 * @param flags One or more flags.
 * @hide
 */
public void adjustMasterVolume(int steps,int flags){
  IAudioService service=getService();
  try {
    service.adjustMasterVolume(steps,flags,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1456
Project: 1456
Buggy source:
/** 
 * @hide Used internally by telephony package to request audio focus. Will cause the focus request to be associated with the "voice communication" identifier only used in AudioService to identify this use case.
 * @param streamType use STREAM_RING for focus requests when ringing, VOICE_CALL forthe establishment of the call
 * @param durationHint the type of focus request. AUDIOFOCUS_GAIN_TRANSIENT is recommended somedia applications resume after a call
 */
public void requestAudioFocusForCall(int streamType,int durationHint){
  IAudioService service=getService();
  try {
    service.requestAudioFocus(streamType,durationHint,mICallBack,null,MediaFocusControl.IN_VOICE_COMM_FOCUS_ID,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * @hide Used internally by telephony package to request audio focus. Will cause the focus request to be associated with the "voice communication" identifier only used in AudioService to identify this use case.
 * @param streamType use STREAM_RING for focus requests when ringing, VOICE_CALL forthe establishment of the call
 * @param durationHint the type of focus request. AUDIOFOCUS_GAIN_TRANSIENT is recommended somedia applications resume after a call
 */
public void requestAudioFocusForCall(int streamType,int durationHint){
  IAudioService service=getService();
  try {
    service.requestAudioFocus(streamType,durationHint,mICallBack,null,MediaFocusControl.IN_VOICE_COMM_FOCUS_ID,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str" + e);
  }
}
Program: 1458
Project: 1458
Buggy source:
/** 
 * Adjusts the volume of a particular stream by one step in a direction. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param streamType The stream type to adjust. One of {@link #STREAM_VOICE_CALL},  {@link #STREAM_SYSTEM},   {@link #STREAM_RING},   {@link #STREAM_MUSIC} or{@link #STREAM_ALARM}
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustStreamVolume(int streamType,int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getBasePackageName());
    }
 else {
      service.adjustStreamVolume(streamType,direction,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the volume of a particular stream by one step in a direction. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param streamType The stream type to adjust. One of {@link #STREAM_VOICE_CALL},  {@link #STREAM_SYSTEM},   {@link #STREAM_RING},   {@link #STREAM_MUSIC} or{@link #STREAM_ALARM}
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustStreamVolume(int streamType,int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getOpPackageName());
    }
 else {
      service.adjustStreamVolume(streamType,direction,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1459
Project: 1459
Buggy source:
/** 
 * Adjusts the volume of the most relevant stream, or the given fallback stream. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param suggestedStreamType The stream type that will be used if thereisn't a relevant stream.  {@link #USE_DEFAULT_STREAM_TYPE} is valid here.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustSuggestedStreamVolume(int direction,int suggestedStreamType,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getBasePackageName());
    }
 else {
      service.adjustSuggestedStreamVolume(direction,suggestedStreamType,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the volume of the most relevant stream, or the given fallback stream. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param suggestedStreamType The stream type that will be used if thereisn't a relevant stream.  {@link #USE_DEFAULT_STREAM_TYPE} is valid here.
 * @param flags One or more flags.
 * @see #adjustVolume(int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustSuggestedStreamVolume(int direction,int suggestedStreamType,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getOpPackageName());
    }
 else {
      service.adjustSuggestedStreamVolume(direction,suggestedStreamType,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1460
Project: 1460
Buggy source:
/** 
 * Adjusts the volume of the most relevant stream. For example, if a call is active, it will have the highest priority regardless of if the in-call screen is showing. Another example, if music is playing in the background and a call is not active, the music stream will be adjusted. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustSuggestedStreamVolume(int,int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustVolume(int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getBasePackageName());
    }
 else {
      service.adjustVolume(direction,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Adjusts the volume of the most relevant stream. For example, if a call is active, it will have the highest priority regardless of if the in-call screen is showing. Another example, if music is playing in the background and a call is not active, the music stream will be adjusted. <p> This method should only be used by applications that replace the platform-wide management of audio settings or the main telephony application.
 * @param direction The direction to adjust the volume. One of{@link #ADJUST_LOWER},   {@link #ADJUST_RAISE}, or  {@link #ADJUST_SAME}.
 * @param flags One or more flags.
 * @see #adjustSuggestedStreamVolume(int,int,int)
 * @see #adjustStreamVolume(int,int,int)
 * @see #setStreamVolume(int,int,int)
 */
public void adjustVolume(int direction,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.adjustMasterVolume(direction,flags,mContext.getOpPackageName());
    }
 else {
      service.adjustVolume(direction,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1461
Project: 1461
Buggy source:
/** 
 * Sets the volume index for master volume.
 * @param index The volume index to set. See{@link #getMasterMaxVolume()} for the largest valid value.
 * @param flags One or more flags.
 * @see #getMasterMaxVolume()
 * @see #getMasterVolume()
 * @hide
 */
public void setMasterVolume(int index,int flags){
  IAudioService service=getService();
  try {
    service.setMasterVolume(index,flags,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sets the volume index for master volume.
 * @param index The volume index to set. See{@link #getMasterMaxVolume()} for the largest valid value.
 * @param flags One or more flags.
 * @see #getMasterMaxVolume()
 * @see #getMasterVolume()
 * @hide
 */
public void setMasterVolume(int index,int flags){
  IAudioService service=getService();
  try {
    service.setMasterVolume(index,flags,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1462
Project: 1462
Buggy source:
/** 
 * Sets the volume index for a particular stream.
 * @param streamType The stream whose volume index should be set.
 * @param index The volume index to set. See{@link #getStreamMaxVolume(int)} for the largest valid value.
 * @param flags One or more flags.
 * @see #getStreamMaxVolume(int)
 * @see #getStreamVolume(int)
 */
public void setStreamVolume(int streamType,int index,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.setMasterVolume(index,flags,mContext.getBasePackageName());
    }
 else {
      service.setStreamVolume(streamType,index,flags,mContext.getBasePackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sets the volume index for a particular stream.
 * @param streamType The stream whose volume index should be set.
 * @param index The volume index to set. See{@link #getStreamMaxVolume(int)} for the largest valid value.
 * @param flags One or more flags.
 * @see #getStreamMaxVolume(int)
 * @see #getStreamVolume(int)
 */
public void setStreamVolume(int streamType,int index,int flags){
  IAudioService service=getService();
  try {
    if (mUseMasterVolume) {
      service.setMasterVolume(index,flags,mContext.getOpPackageName());
    }
 else {
      service.setStreamVolume(streamType,index,flags,mContext.getOpPackageName());
    }
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1463
Project: 1463
Buggy source:
/** 
 * @hide If the stream is active locally or remotely, adjust its volume according to the enforced priority rules. Note: only AudioManager.STREAM_MUSIC is supported at the moment
 */
public void adjustLocalOrRemoteStreamVolume(int streamType,int direction){
  if (streamType != STREAM_MUSIC) {
    Log.w(TAG,"String_Node_Str" + streamType);
  }
  IAudioService service=getService();
  try {
    service.adjustLocalOrRemoteStreamVolume(streamType,direction,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * @hide If the stream is active locally or remotely, adjust its volume according to the enforced priority rules. Note: only AudioManager.STREAM_MUSIC is supported at the moment
 */
public void adjustLocalOrRemoteStreamVolume(int streamType,int direction){
  if (streamType != STREAM_MUSIC) {
    Log.w(TAG,"String_Node_Str" + streamType);
  }
  IAudioService service=getService();
  try {
    service.adjustLocalOrRemoteStreamVolume(streamType,direction,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 1464
Project: 1464
Buggy source:
/** 
 * Tell the audio service to adjust the volume appropriate to the event.
 * @param keycode
 */
void handleVolumeKey(int stream,int keycode){
  IAudioService audioService=getAudioService();
  if (audioService == null) {
    return;
  }
  try {
    mBroadcastWakeLock.acquire();
    audioService.adjustStreamVolume(stream,keycode == KeyEvent.KEYCODE_VOLUME_UP ? AudioManager.ADJUST_RAISE : AudioManager.ADJUST_LOWER,0,mContext.getBasePackageName());
  }
 catch (  RemoteException e) {
    Log.w(TAG,"String_Node_Str" + e);
  }
 finally {
    mBroadcastWakeLock.release();
  }
}

Fixed version (ground truth):
/** 
 * Tell the audio service to adjust the volume appropriate to the event.
 * @param keycode
 */
void handleVolumeKey(int stream,int keycode){
  IAudioService audioService=getAudioService();
  if (audioService == null) {
    return;
  }
  try {
    mBroadcastWakeLock.acquire();
    audioService.adjustStreamVolume(stream,keycode == KeyEvent.KEYCODE_VOLUME_UP ? AudioManager.ADJUST_RAISE : AudioManager.ADJUST_LOWER,0,mContext.getOpPackageName());
  }
 catch (  RemoteException e) {
    Log.w(TAG,"String_Node_Str" + e);
  }
 finally {
    mBroadcastWakeLock.release();
  }
}