auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testUnregisterNeverRegistered ( ) throws java.lang.Exception { android.support.test.espresso.IdlingResource r1 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r1" ) ; android.support.test.espresso.IdlingResource r2 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r2" ) ; registry.registerResources ( com.google.common.collect.Lists.newArrayList ( r1 ) ) ; registry.unregisterResources ( com.google.common.collect.Lists.newArrayList ( r2 ) ) ; java.util.concurrent.FutureTask < java.lang.Boolean > resourcesIdle = createIdleCheckTask ( registry ) ; handler.post ( resourcesIdle ) ; assertFalse ( resourcesIdle.get ( ) ) ; }

Target:
public void unregisterNeverRegistered ( ) throws java.lang.Exception { android.support.test.espresso.IdlingResource r1 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r1" ) ; android.support.test.espresso.IdlingResource r2 = new android.support.test.espresso.base.OnDemandIdlingResource ( "r2" ) ; registry.registerResources ( com.google.common.collect.Lists.newArrayList ( r1 ) ) ; registry.unregisterResources ( com.google.common.collect.Lists.newArrayList ( r2 ) ) ; java.util.concurrent.FutureTask < java.lang.Boolean > resourcesIdle = createIdleCheckTask ( registry ) ; handler.post ( resourcesIdle ) ; org.junit.Assert.assertFalse ( resourcesIdle.get ( ) ) ; }
Source:
private void init ( ) { if ( ( mMediaPlayerList ) != null ) { android.util.Log.wtfStack ( com.android.bluetooth.avrcp.AvrcpTargetService.TAG , "init: The service has already been initialized" ) ; return ; } mAudioManager = ( ( android.media.AudioManager ) ( getSystemService ( Context.AUDIO_SERVICE ) ) ) ; com.android.bluetooth.avrcp.AvrcpTargetService.sDeviceMaxVolume = mAudioManager.getStreamMaxVolume ( AudioManager.STREAM_MUSIC ) ; mMediaPlayerList = new com.android.bluetooth.avrcp.MediaPlayerList ( ) ; mMediaPlayerList.init ( android.os.Looper.myLooper ( ) , this , new com.android.bluetooth.avrcp.AvrcpTargetService.ListCallback ( ) ) ; mNativeInterface = com.android.bluetooth.avrcp.AvrcpNativeInterface.getInterface ( ) ; mNativeInterface.init ( this ) ; }

Target:
protected void setUserUnlocked ( int userId ) { android.util.Log.i ( com.android.bluetooth.avrcp.AvrcpTargetService.TAG , "User unlocked, initializing the service" ) ; if ( ! ( android.os.SystemProperties.getBoolean ( com.android.bluetooth.avrcp.AvrcpTargetService.AVRCP_ENABLE_PROPERTY , false ) ) ) { android.util.Log.w ( com.android.bluetooth.avrcp.AvrcpTargetService.TAG , "Skipping initialization of the new AVRCP Target Player List" ) ; com.android.bluetooth.avrcp.AvrcpTargetService.sInstance = null ; return ; } if ( ( mMediaPlayerList ) != null ) { mMediaPlayerList.init ( new com.android.bluetooth.avrcp.AvrcpTargetService.ListCallback ( ) ) ; } }
Source:
void moveUserToForeground ( com.android.server.am.UserState uss , int oldUserId , int newUserId ) { boolean homeInFront = mStackSupervisor.switchUserLocked ( newUserId , uss ) ; if ( homeInFront ) { startHomeActivityLocked ( newUserId , "moveUserToFroreground" ) ; } else { mStackSupervisor.resumeTopActivitiesLocked ( ) ; } com.android.server.am.EventLogTags.writeAmSwitchUser ( newUserId ) ; getUserManagerLocked ( ) . onUserForeground ( newUserId ) ; sendUserSwitchBroadcastsLocked ( oldUserId , newUserId ) ; }

Target:
public void resizePinnedStack ( android.graphics.Rect pinnedBounds , android.graphics.Rect tempPinnedTaskBounds ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "resizePinnedStack()" ) ; final long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { mStackSupervisor.resizePinnedStackLocked ( pinnedBounds , tempPinnedTaskBounds ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
public long skip ( long n ) throws java.io.IOException { synchronized ( lock ) { ensureOpen ( ) ; if ( ( ( pos ) + n ) > ( count ) ) { n = ( count ) - ( pos ) ; } if ( n < 0 ) { return 0 ; } pos += n ; return n ; } }

Target:
public long skip ( long n ) throws java.io.IOException { synchronized ( lock ) { ensureOpen ( ) ; long avail = ( count ) - ( pos ) ; if ( n > avail ) { n = avail ; } if ( n < 0 ) { return 0 ; } pos += n ; return n ; } }
Source:
public void testRequestIsimAuthentication ( ) throws java.lang.Exception { java.lang.String nonce = "nonce" ; mRILUnderTest.requestIsimAuthentication ( nonce , obtainMessage ( ) ) ; org.mockito.Mockito.verify ( mRadioProxy ) . requestIsimAuthentication ( mSerialNumberCaptor.capture ( ) , org.mockito.Matchers.eq ( nonce ) ) ; com.android.internal.telephony.RILTest.verifyRILResponse ( mRILUnderTest , mSerialNumberCaptor.getValue ( ) , com.android.internal.telephony.RILConstants.RIL_REQUEST_ISIM_AUTHENTICATION ) ; }

Target:
public void testInvokeOemRilRequestStrings ( ) throws java.lang.Exception { java.lang.String [ ] strings = new java.lang.String [ ] { "a" , "b" , "c" } ; mRILUnderTest.invokeOemRilRequestStrings ( strings , obtainMessage ( ) ) ; org.mockito.Mockito.verify ( mOemHookProxy ) . sendRequestStrings ( mSerialNumberCaptor.capture ( ) , org.mockito.Matchers.eq ( new java.util.ArrayList < > ( java.util.Arrays.asList ( strings ) ) ) ) ; }
Source:
public void setHighestPriority ( com.android.tv.dvr.ScheduledRecording schedule ) { if ( com.android.tv.common.SoftPreconditions.checkState ( mDataManager.isDvrScheduleLoadFinished ( ) ) ) { long newPriority = mScheduleManager.suggestHighestPriority ( schedule ) ; if ( newPriority != ( schedule.getPriority ( ) ) ) { mDataManager.updateScheduledRecording ( com.android.tv.dvr.ScheduledRecording.buildFrom ( schedule ) . setPriority ( newPriority ) . build ( ) ) ; } } }

Target:
public long suggestHighestPriority ( com.android.tv.dvr.data.ScheduledRecording schedule ) { if ( com.android.tv.common.SoftPreconditions.checkState ( mDataManager.isDvrScheduleLoadFinished ( ) ) ) { return mScheduleManager.suggestHighestPriority ( schedule ) ; } return DvrScheduleManager.DEFAULT_PRIORITY ; }
Source:
public boolean rejectIncomingConnect ( android.bluetooth.BluetoothDevice device ) { if ( android.bluetooth.BluetoothHeadset.DBG ) android.bluetooth.BluetoothHeadset.log ( "rejectIncomingConnect" ) ; if ( ( mService ) != null ) { try { return mService.rejectIncomingConnect ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }

Target:
public boolean rejectIncomingConnect ( android.bluetooth.BluetoothDevice device ) { if ( android.bluetooth.BluetoothHeadset.DBG ) android.bluetooth.BluetoothHeadset.log ( "rejectIncomingConnect" ) ; final android.bluetooth.IBluetoothHeadset service = mService ; if ( service != null ) { try { return service.rejectIncomingConnect ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }
Source:
private void setAndBroadcastNetworkSetTime ( long time ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( ( ( "setAndBroadcastNetworkSetTime: time=" + time ) + "ms" ) ) ; android.os.SystemClock.setCurrentTimeMillis ( time ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_NETWORK_SET_TIME ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time" , time ) ; mPhone.getContext ( ) . sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }

Target:
private void setAndBroadcastNetworkSetTime ( long time ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( ( ( "setAndBroadcastNetworkSetTime: time=" + time ) + "ms" ) ) ; android.os.SystemClock.setCurrentTimeMillis ( time ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_NETWORK_SET_TIME ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time" , time ) ; mPhone.getContext ( ) . sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; com.android.internal.telephony.metrics.TelephonyMetrics.getInstance ( ) . writeNITZEvent ( mPhone.getPhoneId ( ) , time ) ; }
Source:
private void writeAnnotationMethods ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn ) throws java.io.IOException { assert com.android.jill.frontend.java.AsmHelper.isAnnotation ( cn ) ; writer.writeOpenNodeList ( ) ; for ( org.objectweb.asm.tree.MethodNode mn : cn.methods ) { new com.android.jill.frontend.java.MethodBodyWriter ( writer , annotWriter , cn , mn , sourceInfoWriter ) . write ( ) ; } writer.writeCloseNodeList ( ) ; }

Target:
private void writeMethods ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn ) throws java.io.IOException { writer.writeOpenNodeList ( ) ; for ( org.objectweb.asm.tree.MethodNode mn : cn.methods ) { new com.android.jill.frontend.java.MethodBodyWriter ( writer , annotWriter , cn , mn , sourceInfoWriter , options ) . write ( ) ; } writer.writeCloseNodeList ( ) ; }
Source:
public void test_getManifest ( ) throws java.lang.Exception { java.net.URL u = new java.net.URL ( ( ( "jar:" + ( tests.api.java.net.JarURLConnectionTest.BASE ) ) + "!/plus.bmp" ) ) ; juc = ( ( java.net.JarURLConnection ) ( u.openConnection ( ) ) ) ; java.util.jar.Manifest mf = juc.getManifest ( ) ; assertNotNull ( mf ) ; assertEquals ( mf , juc.getManifest ( ) ) ; assertNotSame ( mf , juc.getManifest ( ) ) ; assertEquals ( juc.getMainAttributes ( ) , mf.getMainAttributes ( ) ) ; }

Target:
public void test_getManifest ( ) throws java.lang.Exception { java.net.URL u = copyAndOpenResourceStream ( "lf.jar" , "plus.bmp" ) ; juc = ( ( java.net.JarURLConnection ) ( u.openConnection ( ) ) ) ; java.util.jar.Manifest mf = juc.getManifest ( ) ; assertNotNull ( mf ) ; assertEquals ( mf , juc.getManifest ( ) ) ; assertNotSame ( mf , juc.getManifest ( ) ) ; assertEquals ( juc.getMainAttributes ( ) , mf.getMainAttributes ( ) ) ; }
Source:
public static void printHelpProperties ( @ javax.annotation.Nonnull java.io.PrintStream printStream , @ javax.annotation.Nonnull com.android.jack.Options options ) throws java.io.IOException { com.android.sched.util.config.GatherConfigBuilder builder = options.getDefaultConfigBuilder ( ) ; com.android.jack.CommandLine.printProperties ( printStream , builder , com.android.jack.config.id.Brest.class ) ; printStream.println ( ) ; printStream.println ( "Provisional properties (subject to change):" ) ; printStream.println ( ) ; com.android.jack.CommandLine.printProperties ( printStream , builder , null ) ; }

Target:
public static void printHelpProperties ( @ javax.annotation.Nonnull java.io.PrintStream printStream , @ javax.annotation.Nonnull com.android.jack.Options options ) throws java.io.IOException { com.android.sched.util.config.GatherConfigBuilder builder = options.getDefaultConfigBuilder ( ) ; com.android.jack.CommandLine.printProperties ( printStream , builder , com.android.jack.config.id.Carnac.class ) ; printStream.println ( ) ; printStream.println ( "Provisional properties (subject to change):" ) ; printStream.println ( ) ; com.android.jack.CommandLine.printProperties ( printStream , builder , null ) ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public boolean switchSlots ( int [ ] physicalSlots ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) { return false ; } return telephony.switchSlots ( physicalSlots ) ; } catch ( android.os.RemoteException e ) { return false ; } }
Source:
public void visitFrame ( int type , int nLocal , java.lang.Object [ ] local , int nStack , java.lang.Object [ ] stack ) { if ( isArrayNullOrEmpty ( local ) ) { nLocal = 0 ; } if ( isArrayNullOrEmpty ( stack ) ) { nStack = 0 ; } super . visitFrame ( type , nLocal , local , nStack , stack ) ; }

Target:
public void visitFrame ( int type , int nLocal , java.lang.Object [ ] local , int nStack , java.lang.Object [ ] stack ) { if ( ( this . mv ) != null ) { mv.visitFrame ( type , nLocal , remapEntriesWithBugfix ( nLocal , local ) , nStack , remapEntriesWithBugfix ( nStack , stack ) ) ; } }
Source:
public java.util.Optional < java.lang.String > getInternalName ( ) { java.lang.String descriptor = descriptor ( ) ; int length = descriptor.length ( ) ; if ( ( ( length > 0 ) && ( ( descriptor.charAt ( 0 ) ) == 'L' ) ) && ( ( descriptor.charAt ( ( length - 1 ) ) ) == ';' ) ) { return java.util.Optional.of ( descriptor.substring ( 1 , ( length - 1 ) ) ) ; } else { return java.util.Optional.empty ( ) ; } }

Target:
public java.lang.String getInternalNameOrThrow ( ) { java.lang.String descriptor = descriptor ( ) ; int length = descriptor.length ( ) ; com.google.common.base.Preconditions.checkState ( ( ( ( descriptor.charAt ( 0 ) ) == 'L' ) && ( ( descriptor.charAt ( ( length - 1 ) ) ) == ';' ) ) , "The type is expected to be either a class or an interface: %s" , descriptor ) ; return descriptor.substring ( 1 , ( length - 1 ) ) ; }
Source:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { return inflater.inflate ( R.layout.fragment_speed_dial , container , false ) ; }

Target:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { android.view.View view = inflater.inflate ( R.layout.fragment_speed_dial , container , false ) ; android.support.v7.widget.RecyclerView recyclerView = view.findViewById ( R.id.speed_dial_recycler_view ) ; adapter = new com.android.dialer.speeddial.SpeedDialAdapter ( getContext ( ) , favoritesListener , suggestedListener , headerListener ) ; recyclerView.setLayoutManager ( adapter.getLayoutManager ( getContext ( ) ) ) ; recyclerView.setAdapter ( adapter ) ; getLoaderManager ( ) . initLoader ( com.android.dialer.speeddial.SpeedDialFragment.STREQUENT_CONTACTS_LOADER_ID , null , loaderCallback ) ; return view ; }
Source:
public static org.conscrypt.OpenSSLECGroupContext getCurveByName ( java.lang.String curveName ) { if ( "secp256r1" . equals ( curveName ) ) { curveName = "prime256v1" ; } else if ( "secp192r1" . equals ( curveName ) ) { curveName = "prime192v1" ; } final long ctx = org.conscrypt.NativeCrypto.EC_GROUP_new_by_curve_name ( curveName ) ; if ( ctx == 0 ) { return null ; } org.conscrypt.NativeRef.EC_GROUP groupRef = new org.conscrypt.NativeRef.EC_GROUP ( ctx ) ; org.conscrypt.NativeCrypto.EC_GROUP_set_point_conversion_form ( groupRef , NativeCrypto.POINT_CONVERSION_UNCOMPRESSED ) ; org.conscrypt.NativeCrypto.EC_GROUP_set_asn1_flag ( groupRef , NativeCrypto.OPENSSL_EC_NAMED_CURVE ) ; return new org.conscrypt.OpenSSLECGroupContext ( groupRef ) ; }

Target:
public static org.conscrypt.OpenSSLECGroupContext getCurveByName ( java.lang.String curveName ) { if ( "secp256r1" . equals ( curveName ) ) { curveName = "prime256v1" ; } else if ( "secp192r1" . equals ( curveName ) ) { curveName = "prime192v1" ; } final long ctx = org.conscrypt.NativeCrypto.EC_GROUP_new_by_curve_name ( curveName ) ; if ( ctx == 0 ) { return null ; } org.conscrypt.NativeRef.EC_GROUP groupRef = new org.conscrypt.NativeRef.EC_GROUP ( ctx ) ; org.conscrypt.NativeCrypto.EC_GROUP_set_point_conversion_form ( groupRef , NativeConstants.POINT_CONVERSION_UNCOMPRESSED ) ; org.conscrypt.NativeCrypto.EC_GROUP_set_asn1_flag ( groupRef , NativeConstants.OPENSSL_EC_NAMED_CURVE ) ; return new org.conscrypt.OpenSSLECGroupContext ( groupRef ) ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState " + ( mState ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getState(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mState ; }

Target:
private com.android.bluetooth.pbap.BluetoothPbapService getService ( java.lang.String perm ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { mService.enforceCallingOrSelfPermission ( perm , ( ( "Need " + perm ) + " permission" ) ) ; return mService ; } return null ; }
Source:
public static java.lang.String getMethodSignatureWithoutName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPolymorphicMethodCall call ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( '(' ) ; for ( com.android.jack.ir.ast.JType p : call.getMethodIdWide ( ) . getParamTypes ( ) ) { sb.append ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( p ) ) ; } sb.append ( ')' ) ; sb.append ( com.android.jack.backend.dex.rop.RopHelper.formatter.getName ( call.getReturnTypeOfPolymorphicMethod ( ) ) ) ; return sb.toString ( ) ; }

Target:
public static com.android.jack.dx.rop.type.Prototype getPrototype ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId method ) { java.util.List < com.android.jack.ir.ast.JType > parameterTypes = method.getMethodIdWide ( ) . getParamTypes ( ) ; com.android.jack.dx.rop.type.StdTypeList stdTypeList = new com.android.jack.dx.rop.type.StdTypeList ( parameterTypes.size ( ) ) ; int idx = 0 ; for ( com.android.jack.ir.ast.JType parameterType : parameterTypes ) { stdTypeList.set ( ( idx ++ ) , com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( parameterType ) ) ; } return com.android.jack.dx.rop.type.Prototype.intern ( stdTypeList , com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( method.getType ( ) ) ) ; }
Source:
private com.android.sched.util.stream.ExtendedPrintWriter getExtendedPrintWriter ( @ javax.annotation.Nonnull java.io.OutputStream os ) { java.io.Writer tmp = new java.io.OutputStreamWriter ( os , charset ) ; if ( ( bufferSize ) > 0 ) { tmp = new java.io.BufferedWriter ( tmp , bufferSize ) ; } return new com.android.sched.util.stream.ExtendedPrintWriter ( tmp , lineSeparator.getLineSeparator ( ) ) ; }

Target:
private com.android.sched.util.stream.CustomPrintWriter getCustomPrintWriter ( @ javax.annotation.Nonnull java.io.OutputStream os ) { java.io.Writer tmp = new java.io.OutputStreamWriter ( os , charset ) ; if ( ( bufferSize ) > 0 ) { tmp = new java.io.BufferedWriter ( tmp , bufferSize ) ; } return new com.android.sched.util.stream.CustomPrintWriter ( tmp , lineSeparator.getLineSeparator ( ) ) ; }
Source:
public boolean hasFile ( final java.lang.String name ) { java.lang.String [ ] match = list ( new java.io.FilenameFilter ( ) { public boolean accept ( java.io.File dir , java.lang.String filename ) { return name.equals ( filename ) ; } } ) ; return ( match.length ) > 0 ; }

Target:
public boolean hasFile ( final java.lang.String name ) { java.lang.String [ ] match = list ( new com.android.sdklib.io.FilenameFilter ( ) { public boolean accept ( com.android.sdklib.io.IAbstractFolder dir , java.lang.String filename ) { return name.equals ( filename ) ; } } ) ; return ( match.length ) > 0 ; }
Source:
private void registerForScanModeChange ( ) { android.database.ContentObserver contentObserver = new android.database.ContentObserver ( null ) { @ java.lang.Override public void onChange ( boolean selfChange ) { mSettingsStore.handleWifiScanAlwaysAvailableToggled ( ) ; mWifiController.sendMessage ( com.android.server.wifi.WifiController.CMD_SCAN_ALWAYS_MODE_CHANGED ) ; } } ; mContext.getContentResolver ( ) . registerContentObserver ( Settings.Global.getUriFor ( Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE ) , false , contentObserver ) ; }

Target:
private void registerForScanModeChange ( ) { android.database.ContentObserver contentObserver = new android.database.ContentObserver ( null ) { @ java.lang.Override public void onChange ( boolean selfChange ) { mSettingsStore.handleWifiScanAlwaysAvailableToggled ( ) ; mWifiController.sendMessage ( com.android.server.wifi.WifiController.CMD_SCAN_ALWAYS_MODE_CHANGED ) ; } } ; mFrameworkFacade.registerContentObserver ( mContext , Settings.Global.getUriFor ( Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE ) , false , contentObserver ) ; }
Source:
private void waitForFrames ( int numFrameWait ) { if ( numFrameWait < 0 ) { throw new java.lang.IllegalArgumentException ( ( ( "numFrameWait " + numFrameWait ) + " should be non-negative" ) ) ; } if ( numFrameWait == 0 ) { waitForNumResults ( mZslResultListener , numFrameWait ) ; mCameraZslImageListener.drain ( ) ; } }

Target:
private void waitForFrames ( int numFrameWait ) throws java.lang.Exception { if ( numFrameWait < 0 ) { throw new java.lang.IllegalArgumentException ( ( ( "numFrameWait " + numFrameWait ) + " should be non-negative" ) ) ; } for ( int i = 0 ; i < numFrameWait ; i ++ ) { mCameraZslImageListener.getImage ( CameraTestUtils.CAPTURE_IMAGE_TIMEOUT_MS ) . close ( ) ; } }
Source:
public int getCdmaEriIconMode ( ) { return getCdmaEriIconMode ( android.telephony.TelephonyManager.getDefaultSubscription ( ) ) ; }

Target:
public java.lang.String getVisualVoicemailPackageName ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getVisualVoicemailPackageName ( mContext.getOpPackageName ( ) , getSubId ( ) ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }
Source:
public void rejectCall ( ) throws com.android.internal.telephony.CallStateException { synchronized ( com.android.internal.telephony.sip.SipPhone.class ) { if ( ringingCall.getState ( ) . isRinging ( ) ) { if ( com.android.internal.telephony.sip.SipPhone.DEBUG ) android.util.Log.d ( com.android.internal.telephony.sip.SipPhone.LOG_TAG , "rejectCall" ) ; ringingCall.rejectCall ( ) ; } else { throw new com.android.internal.telephony.CallStateException ( "phone not ringing" ) ; } } }

Target:
public void rejectCall ( ) throws com.android.internal.telephony.CallStateException { synchronized ( com.android.internal.telephony.sip.SipPhone.class ) { if ( ringingCall.getState ( ) . isRinging ( ) ) { if ( com.android.internal.telephony.sip.SipPhone.DEBUG ) android.telephony.Rlog.d ( com.android.internal.telephony.sip.SipPhone.LOG_TAG , "rejectCall" ) ; ringingCall.rejectCall ( ) ; } else { throw new com.android.internal.telephony.CallStateException ( "phone not ringing" ) ; } } }
Source:
private com.android.cts.verifier.TestListAdapter getStreamAdapter ( ) { com.android.cts.verifier.ArrayTestListAdapter adapter = new com.android.cts.verifier.ArrayTestListAdapter ( this ) ; adapter.add ( com.android.cts.verifier.TestListAdapter.TestListItem.newCategory ( "RTSP" ) ) ; for ( com.android.cts.verifier.streamquality.StreamingVideoActivity.Stream stream : com.android.cts.verifier.streamquality.StreamingVideoActivity.RTSP_STREAMS ) { addStreamToTests ( adapter , stream ) ; } adapter.add ( com.android.cts.verifier.TestListAdapter.TestListItem.newCategory ( "HTTP Progressive" ) ) ; for ( com.android.cts.verifier.streamquality.StreamingVideoActivity.Stream stream : com.android.cts.verifier.streamquality.StreamingVideoActivity.HTTP_STREAMS ) { addStreamToTests ( adapter , stream ) ; } adapter.registerDataSetObserver ( new android.database.DataSetObserver ( ) { @ java.lang.Override public void onChanged ( ) { updatePassButton ( ) ; } } ) ; return adapter ; }

Target:
private void addRtspStreamToTest ( com.android.cts.verifier.ArrayTestListAdapter adapter , java.lang.String name , java.lang.String code , int itag , java.lang.String signature ) { java.lang.String rtspUrl = lookupRtspUrl ( itag , signature ) ; if ( rtspUrl == null ) { showDialog ( com.android.cts.verifier.streamquality.StreamingVideoActivity.RTSP_URL_ERROR ) ; } com.android.cts.verifier.streamquality.StreamingVideoActivity.Stream stream = new com.android.cts.verifier.streamquality.StreamingVideoActivity.Stream ( name , code , rtspUrl ) ; addStreamToTests ( adapter , stream ) ; }
Source:
protected boolean cleanup ( ) { if ( ( mHandler ) != null ) { mHandler.removeCallbacksAndMessages ( null ) ; android.os.Looper looper = mHandler.getLooper ( ) ; if ( looper != null ) looper.quit ( ) ; } com.android.bluetooth.avrcp.AvrcpControllerService.clearAvrcpControllerService ( ) ; cleanupNative ( ) ; return true ; }

Target:
protected boolean cleanup ( ) { if ( ( mHandler ) != null ) { mHandler.removeCallbacksAndMessages ( null ) ; android.os.Looper looper = mHandler.getLooper ( ) ; if ( looper != null ) looper.quit ( ) ; } resetRemoteData ( ) ; com.android.bluetooth.avrcp.AvrcpControllerService.clearAvrcpControllerService ( ) ; cleanupNative ( ) ; return true ; }
Source:
public java.lang.String getUsage ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; boolean first = true ; sb.append ( '{' ) ; for ( com.android.sched.util.codec.KeyValueCodec.Entry < T > entry : entries ) { if ( first ) { first = false ; } else { sb.append ( ',' ) ; } sb.append ( entry.key ) ; } sb.append ( "} (case " ) ; sb.append ( ( ignoreCase ? "insensitive" : "sensitive" ) ) ; sb.append ( ')' ) ; return sb.toString ( ) ; }

Target:
public java.lang.String getUsage ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; boolean first = true ; sb.append ( '{' ) ; for ( com.android.sched.util.codec.KeyValueCodec.Entry < T > entry : entries ) { if ( ! ( entry.hidden ) ) { if ( first ) { first = false ; } else { sb.append ( ',' ) ; } sb.append ( entry.key ) ; } } sb.append ( "} (case " ) ; sb.append ( ( ignoreCase ? "insensitive" : "sensitive" ) ) ; sb.append ( ')' ) ; return sb.toString ( ) ; }
Source:
public void testStaging_uninstall_withCurrent ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; com.android.cts.tzdata.TzDataCheckTest.createStagedUninstallOnHost ( dataStagedDir ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }

Target:
public void testStaging_uninstall_withCurrent ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; com.android.cts.tzdata.TzDataCheckTest.createStagedUninstallOnHost ( dataStagedDir ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; byte [ ] distroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distroBytes ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }
Source:
protected synchronized native void bind0 ( int lport , java.net.InetAddress laddr ) throws java.net.SocketException ;

Target:
protected synchronized void bind0 ( int lport , java.net.InetAddress laddr ) throws java.net.SocketException { if ( isClosed ( ) ) { throw new java.net.SocketException ( "Socket closed" ) ; } libcore.io.IoBridge.bind ( fd , laddr , lport ) ; if ( lport == 0 ) { localPort = libcore.io.IoBridge.getLocalInetSocketAddress ( fd ) . getPort ( ) ; } else { localPort = lport ; } }
Source:
public void timeRelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV ( int reps ) throws java.lang.Exception { java.util.Locale l = java.util.Locale.US ; java.util.TimeZone utc = java.util.TimeZone.getTimeZone ( "UTC" ) ; int flags = libcore.icu.RelativeDateTimeFormatter.FORMAT_ABBREV_RELATIVE ; for ( int rep = 0 ; rep < reps ; ++ rep ) { libcore.icu.RelativeDateTimeFormatter.getRelativeTimeSpanString ( l , utc , 0L , 0L , 0L , flags ) ; } }

Target:
public void timeRelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV ( int reps ) throws java.lang.Exception { java.util.Locale l = java.util.Locale.US ; java.util.TimeZone utc = java.util.TimeZone.getTimeZone ( "UTC" ) ; int flags = libcore.icu.DateUtilsBridge.FORMAT_ABBREV_RELATIVE ; for ( int rep = 0 ; rep < reps ; ++ rep ) { libcore.icu.RelativeDateTimeFormatter.getRelativeTimeSpanString ( l , utc , 0L , 0L , 0L , flags ) ; } }
Source:
private static void printIsDefault ( java.lang.Class < ? > klass ) { java.lang.reflect.Method m ; try { m = klass.getMethod ( "sayHi" ) ; } catch ( java.lang.Throwable t ) { java.lang.System.out.println ( t ) ; return ; } boolean isDefault = m.isDefault ( ) ; java.lang.System.out.println ( ( ( ( klass.getName ( ) ) + " is default = " ) + ( isDefault ? "yes" : "no" ) ) ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { IsDefaultTest.test ( ) ; AnnotationTest.testAnnotationsByType ( ) ; AnnotationTest.testDeclaredAnnotation ( ) ; AnnotationTest.testDeclaredAnnotationsByType ( ) ; AnnotationTest.testMethodAnnotationsByType ( ) ; AnnotationTest.testMethodDeclaredAnnotations ( ) ; AnnotationTest.testMethodDeclaredAnnotationsByType ( ) ; }
Source:
public java.lang.String getOriginalUrl ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getOriginalUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getOriginalUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }

Target:
public java.lang.String getTitle ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getTitle ( ) ; } } ) ; return ret ; } return mAwContents.getTitle ( ) ; }
Source:
public boolean registerPreferredForegroundService ( android.content.ComponentName service , int callingUid ) { boolean success = false ; synchronized ( mLock ) { if ( isForegroundAllowedLocked ( service ) ) { if ( mForegroundUtils.registerUidToBackgroundCallback ( this , callingUid ) ) { mForegroundRequested = service ; mForegroundUid = callingUid ; success = true ; } else { android.util.Log.e ( com.android.nfc.cardemulation.PreferredServices.TAG , "Calling UID is not in the foreground, ignorning!" ) ; success = false ; } } else { android.util.Log.e ( com.android.nfc.cardemulation.PreferredServices.TAG , "Requested foreground service conflicts with default payment app." ) ; } } if ( success ) { computePreferredForegroundService ( ) ; } return success ; }

Target:
public boolean registerPreferredForegroundService ( android.content.ComponentName service , int callingUid ) { boolean success = false ; synchronized ( mLock ) { if ( isForegroundAllowedLocked ( service ) ) { if ( mForegroundUtils.registerUidToBackgroundCallback ( this , callingUid ) ) { mForegroundRequested = service ; mForegroundUid = callingUid ; success = true ; } else { android.util.Log.e ( com.android.nfc.cardemulation.PreferredServices.TAG , "Calling UID is not in the foreground, ignorning!" ) ; success = false ; } } else { android.util.Log.e ( com.android.nfc.cardemulation.PreferredServices.TAG , "Requested foreground service conflicts or was removed." ) ; } } if ( success ) { computePreferredForegroundService ( ) ; } return success ; }
Source:
public void trackingEnabled_dataAppConfigMissing ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureUpdateAppPackageOk ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME ) ; configureDataAppPackageNameMissing ( ) ; try { mPackageTracker.start ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } mFakeIntentHelper.assertNotInitialized ( ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; }

Target:
public void trackingEnabled_dataAppConfigMissing ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; configureUpdateAppPackageOk ( com.android.server.timezone.PackageTrackerTest.UPDATE_APP_PACKAGE_NAME ) ; configureDataAppPackageNameMissing ( ) ; try { mPackageTracker.start ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } mFakeIntentHelper.assertNotInitialized ( ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; }
Source:
public void test_getMainAttributes ( ) throws java.lang.Exception { java.net.URL u = new java.net.URL ( ( ( "jar:" + ( tests.api.java.net.JarURLConnectionTest.BASE ) ) + "!/swt.dll" ) ) ; juc = ( ( java.net.JarURLConnection ) ( u.openConnection ( ) ) ) ; java.util.jar.Attributes a = juc.getMainAttributes ( ) ; assertEquals ( "Returned incorrect Attributes" , "1.0" , a.get ( java.util.jar.Attributes.Name.MANIFEST_VERSION ) ) ; }

Target:
public void test_getMainAttributes ( ) throws java.lang.Exception { java.net.URL u = copyAndOpenResourceStream ( "lf.jar" , "swt.dll" ) ; juc = ( ( java.net.JarURLConnection ) ( u.openConnection ( ) ) ) ; java.util.jar.Attributes a = juc.getMainAttributes ( ) ; assertEquals ( "Returned incorrect Attributes" , "1.0" , a.get ( java.util.jar.Attributes.Name.MANIFEST_VERSION ) ) ; }
Source:
public java.net.Socket createSocket ( java.net.Socket k , java.lang.String host , int port , boolean close ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( k , host , port , close ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }

Target:
public java.net.Socket createSocket ( java.net.Socket k , java.lang.String host , int port , boolean close ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( k , host , port , close ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setAlpnProtocols ( mAlpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; if ( mSecure ) { android.net.SSLCertificateSocketFactory.verifyHostname ( s , host ) ; } return s ; }
Source:
public void testI18NameParsing ( ) { for ( com.android.server.wifi.hotspot2.anqp.I18NameTest.I18NameTestMapping testMapping : com.android.server.wifi.hotspot2.anqp.I18NameTest.I18_NAME_MAPPINGS ) { try { com.android.server.wifi.hotspot2.anqp.I18Name i18Name = new com.android.server.wifi.hotspot2.anqp.I18Name ( java.nio.ByteBuffer.wrap ( testMapping.mBytes ) . order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ) ; assertEquals ( testMapping.mExpectedLanguage , i18Name.getLanguage ( ) ) ; assertEquals ( testMapping.mExpectedLocale , i18Name.getLocale ( ) ) ; assertEquals ( testMapping.mExpectedText , i18Name.getText ( ) ) ; } catch ( java.net.ProtocolException e ) { fail ( ( "Exception encountered during parsing: " + e ) ) ; } } }

Target:
public void parseBufferWithFrenchData ( ) throws java.lang.Exception { java.lang.String language = "fr" ; java.lang.String text = "Hello World" ; byte [ ] data = getTestData ( language , text ) ; com.android.server.wifi.hotspot2.anqp.I18Name actualName = com.android.server.wifi.hotspot2.anqp.I18Name.parse ( getTestBuffer ( data , data.length ) ) ; com.android.server.wifi.hotspot2.anqp.I18Name expectedName = new com.android.server.wifi.hotspot2.anqp.I18Name ( language , java.util.Locale.forLanguageTag ( language ) , text ) ; org.junit.Assert.assertEquals ( expectedName , actualName ) ; }
Source:
public void testProcessChldReleaseActiveHold ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call heldCall = createHeldCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . unholdCall ( org.mockito.Matchers.eq ( heldCall ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldReleaseActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public void testBinderDeath ( ) throws java.lang.Exception { org.mockito.ArgumentCaptor < android.os.IBinder.DeathRecipient > deathRecipient = org.mockito.ArgumentCaptor.forClass ( IBinder.DeathRecipient.class ) ; int clientId = doConnect ( ) ; org.mockito.Mockito.verify ( mBinderMock ) . linkToDeath ( deathRecipient.capture ( ) , org.mockito.Matchers.eq ( 0 ) ) ; deathRecipient.getValue ( ) . binderDied ( ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . disconnect ( clientId ) ; validateInternalStateCleanedUp ( clientId ) ; }

Target:
public void testBinderDeath ( ) throws java.lang.Exception { org.mockito.ArgumentCaptor < android.os.IBinder.DeathRecipient > deathRecipient = org.mockito.ArgumentCaptor.forClass ( IBinder.DeathRecipient.class ) ; int clientId = doConnect ( ) ; org.mockito.Mockito.verify ( mBinderMock ) . linkToDeath ( deathRecipient.capture ( ) , org.mockito.ArgumentMatchers.eq ( 0 ) ) ; deathRecipient.getValue ( ) . binderDied ( ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . disconnect ( clientId ) ; validateInternalStateCleanedUp ( clientId ) ; }
Source:
private static boolean isShowTransactionMethodCall ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.MethodInvocation call ) { java.lang.String methodName = call.astName ( ) . astValue ( ) ; return ( com.android.tools.lint.checks.CleanupDetector.SHOW.equals ( methodName ) ) && ( com.android.tools.lint.checks.CleanupDetector.isMethodOnFragmentClass ( context , call , com.android.tools.lint.checks.CleanupDetector.DIALOG_FRAGMENT , com.android.tools.lint.checks.CleanupDetector.DIALOG_V4_FRAGMENT ) ) ; }

Target:
private static boolean isShowFragmentMethodCall ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.MethodInvocation call ) { java.lang.String methodName = call.astName ( ) . astValue ( ) ; return ( com.android.tools.lint.checks.CleanupDetector.SHOW.equals ( methodName ) ) && ( com.android.tools.lint.checks.CleanupDetector.isMethodOnFragmentClass ( context , call , com.android.tools.lint.checks.CleanupDetector.DIALOG_FRAGMENT , com.android.tools.lint.checks.CleanupDetector.DIALOG_V4_FRAGMENT ) ) ; }
Source:
void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; props.setProperty ( com.android.sdklib.internal.repository.ExtraPackage.PROP_PATH , mPath ) ; if ( ( getMinApiLevel ( ) ) != ( MIN_API_LEVEL_NOT_SPECIFIED ) ) { props.setProperty ( com.android.sdklib.internal.repository.ExtraPackage.PROP_MIN_API_LEVEL , java.lang.Integer.toString ( getMinApiLevel ( ) ) ) ; } }

Target:
void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; props.setProperty ( com.android.sdklib.internal.repository.ExtraPackage.PROP_PATH , mPath ) ; if ( ( mVendor ) != null ) { props.setProperty ( com.android.sdklib.internal.repository.ExtraPackage.PROP_PATH , mVendor ) ; } if ( ( getMinApiLevel ( ) ) != ( MIN_API_LEVEL_NOT_SPECIFIED ) ) { props.setProperty ( com.android.sdklib.internal.repository.ExtraPackage.PROP_MIN_API_LEVEL , java.lang.Integer.toString ( getMinApiLevel ( ) ) ) ; } }
Source:
protected com.android.internal.telephony.SMSDispatcher.SmsTracker getSmsTracker ( java.util.HashMap < java.lang.String , java.lang.Object > data , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , java.lang.String format , android.net.Uri messageUri , boolean expectMore , java.lang.String fullMessageText , boolean isText , boolean persistMessage ) { return getSmsTracker ( data , sentIntent , deliveryIntent , format , null , null , messageUri , null , expectMore , fullMessageText , isText , persistMessage , com.android.internal.telephony.IccSmsInterfaceManager.SMS_MESSAGE_PRIORITY_NOT_SPECIFIED , com.android.internal.telephony.IccSmsInterfaceManager.SMS_MESSAGE_PERIOD_NOT_SPECIFIED ) ; }

Target:
protected com.android.internal.telephony.SMSDispatcher.SmsTracker getSmsTracker ( java.util.HashMap < java.lang.String , java.lang.Object > data , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , java.lang.String format , android.net.Uri messageUri , boolean isExpectMore , java.lang.String fullMessageText , boolean isText , boolean persistMessage ) { return getSmsTracker ( data , sentIntent , deliveryIntent , format , null , null , messageUri , null , isExpectMore , fullMessageText , isText , persistMessage ) ; }
Source:
public void testDisableWifiFromSoftApModeState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mWifiStateMachinePrime.disableWifi ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "WifiDisabled" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testConfigIsPassedToWifiInjector ( ) throws java.lang.Exception { android.net.wifi.WifiConfiguration config = new android.net.wifi.WifiConfiguration ( ) ; config.SSID = "ThisIsAConfig" ; enterSoftApActiveMode ( config ) ; }
Source:
private void handleEnterEmergencyCallbackMode ( android.os.Message msg ) { if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( "handleEnterEmergencyCallbackMode,mIsPhoneInEcmState= " + ( mIsPhoneInEcmState ) ) ) ; } if ( ! ( mIsPhoneInEcmState ) ) { setIsInEcm ( true ) ; sendEmergencyCallbackModeChange ( ) ; long delayInMillis = android.os.SystemProperties.getLong ( TelephonyProperties.PROPERTY_ECM_EXIT_TIMER , com.android.internal.telephony.GsmCdmaPhone.DEFAULT_ECM_EXIT_TIMER_VALUE ) ; postDelayed ( mExitEcmRunnable , delayInMillis ) ; mWakeLock.acquire ( ) ; } }

Target:
public void exitEmergencyCallbackMode ( ) { if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( ( ( "exitEmergencyCallbackMode: mImsPhone=" + ( mImsPhone ) ) + " isPhoneTypeGsm=" ) + ( isPhoneTypeGsm ( ) ) ) ) ; } if ( isPhoneTypeGsm ( ) ) { if ( ( mImsPhone ) != null ) { mImsPhone.exitEmergencyCallbackMode ( ) ; } } else { if ( mWakeLock.isHeld ( ) ) { mWakeLock.release ( ) ; } mCi.exitEmergencyCallbackMode ( obtainMessage ( com.android.internal.telephony.EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE ) ) ; } }
Source:
public int getMaxPageRange ( ) { if ( ( this . getPage ( ) ) < ( com.android.vts.util.Pagination.DEFAULT_PAGE_WINDOW ) ) { return com.android.vts.util.Pagination.DEFAULT_PAGE_WINDOW ; } else { if ( ( this . getMaxPages ( ) ) > ( com.android.vts.util.Pagination.DEFAULT_PAGE_WINDOW ) ) { return ( ( ( this . getPage ( ) ) / ( com.android.vts.util.Pagination.DEFAULT_PAGE_WINDOW ) ) * ( com.android.vts.util.Pagination.DEFAULT_PAGE_WINDOW ) ) + ( this . pageSize ) ; } else { return ( this . getMinPageRange ( ) ) + ( this . getMaxPages ( ) ) ; } } }

Target:
public int getMaxPageRange ( ) { if ( ( this . getMaxPages ( ) ) > ( this . getPageSize ( ) ) ) { return ( ( getMinPageRange ( ) ) + ( this . getPageSize ( ) ) ) - 1 ; } else { return ( ( this . getMinPageRange ( ) ) + ( this . getMaxPages ( ) ) ) - 1 ; } }
Source:
public org.eclipse.swt.graphics.Font getFont ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) { if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) != ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.INSTALLED ) ) { return mTreeFontItalic ; } } else if ( element instanceof java.lang.Package ) { return mTreeFontItalic ; } return super . getFont ( element ) ; }

Target:
public org.eclipse.swt.graphics.Color getBackground ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) { if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.HAS_UPDATE ) ) { return mColorUpdate ; } } return null ; }
Source:
public void run ( long sslSession ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.SSL_shutdown ( sslSession , org.conscrypt.NativeCryptoTest.INVALID_FD , null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] id = org.conscrypt.NativeCrypto.SSL_SESSION_session_id ( session ) ; assertNotNull ( id ) ; assertEquals ( 32 , id.length ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }