auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void dispatchMediaKeyWithWakeLockToAudioService ( android.view.KeyEvent event ) { if ( android.app.ActivityManagerNative.isSystemReady ( ) ) { android.media.IAudioService audioService = com.android.internal.policy.impl.PhoneWindowManager.getAudioService ( ) ; if ( audioService != null ) { try { audioService.dispatchMediaKeyEventUnderWakelock ( event ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.policy.impl.PhoneWindowManager.TAG , ( "dispatchMediaKeyEvent threw exception " + e ) ) ; } } } }

Target:
void dispatchMediaKeyWithWakeLockToAudioService ( android.view.KeyEvent event ) { if ( android.app.ActivityManagerNative.isSystemReady ( ) ) { android.media.session.MediaSessionLegacyHelper.getHelper ( mContext ) . sendMediaButtonEvent ( event , true ) ; } }
Source:
public static void computeAcosh ( android.renderscript.cts.TestAcosh.ArgumentsFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 4 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.sqrt ( ( ( x - 1.0 ) / 2.0 ) ) ) ) ; }

Target:
public static void computeAtanh ( android.renderscript.cts.TestAtanh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 128 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( ( java.lang.StrictMath.log ( ( ( x + 1.0 ) / ( x - 1.0 ) ) ) ) / 2.0 ) ) ; }
Source:
private void assertParentPathToGc ( int node , int ... parents ) { for ( int parent : parents ) { com.android.tools.perflib.heap.Instance parentInstance = mSnapshot.findReference ( node ) . getNextInstanceToGcRoot ( ) ; if ( ( parentInstance != null ) && ( ( parentInstance.getId ( ) ) == parent ) ) { return ; } } fail ( ) ; }

Target:
private void assertParentPathToGc ( int node , int ... parents ) { for ( int parent : parents ) { com.android.tools.perflib.heap.analysis.Instance parentInstance = mSnapshot.findReference ( node ) . getNextInstanceToGcRoot ( ) ; if ( ( parentInstance != null ) && ( ( parentInstance.getId ( ) ) == parent ) ) { return ; } } fail ( ) ; }
Source:
public final short getCNibble ( ) { int c = getC ( ) ; if ( ( c & ( ~ 15 ) ) != 0 ) { throw new com.android.jack.dx.util.DexException ( ( "Register C out of range: " + ( com.android.jack.dx.util.Hex.u8 ( c ) ) ) ) ; } return ( ( short ) ( c ) ) ; }

Target:
public final int getSecondIndex ( ) { assert ( secondIndexType ) != ( com.android.jack.dx.io.IndexType.NONE ) ; return secondIndex ; }
Source:
private void addMetaToOutputJackLib ( com.android.jack.meta.Meta meta , com.android.jack.library.OutputJackLibrary ojl ) throws java.io.IOException { com.android.sched.vfs.InputVFile inputFile = meta.getVFile ( ) ; com.android.sched.vfs.VPath path = meta.getPath ( ) ; com.android.sched.vfs.OutputVFile outputFile = ojl.createFile ( FileType.JPP , path ) ; java.io.InputStream is = null ; try { is = inputFile.openRead ( ) ; com.android.sched.util.stream.ByteStreamSucker sucker = new com.android.sched.util.stream.ByteStreamSucker ( is , outputFile.openWrite ( ) , true ) ; sucker.suck ( ) ; } finally { if ( is != null ) { is.close ( ) ; } } }

Target:
private void addMetaToOutputJackLib ( com.android.jack.meta.Meta meta , com.android.jack.library.OutputJackLibrary ojl ) throws java.io.IOException { com.android.sched.vfs.InputVFile inputFile = meta.getVFile ( ) ; com.android.sched.vfs.VPath path = meta.getPath ( ) ; com.android.sched.vfs.OutputVFile outputFile = ojl.createFile ( FileType.JPP , path ) ; java.io.InputStream is = null ; try { is = inputFile.getInputStream ( ) ; com.android.sched.util.stream.ByteStreamSucker sucker = new com.android.sched.util.stream.ByteStreamSucker ( is , outputFile.getOutputStream ( ) , true ) ; sucker.suck ( ) ; } finally { if ( is != null ) { is.close ( ) ; } } }
Source:
public void onDownloadStart ( java.lang.String url , java.lang.String userAgent , java.lang.String contentDisposition , java.lang.String mimeType , long contentLength ) { if ( ( mDownloadListener ) != null ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onDownloadStart" ) ; mDownloadListener.onDownloadStart ( url , userAgent , contentDisposition , mimeType , contentLength ) ; org.chromium.base.TraceEvent.end ( ) ; } }

Target:
public void onDownloadStart ( java.lang.String url , java.lang.String userAgent , java.lang.String contentDisposition , java.lang.String mimeType , long contentLength ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onDownloadStart" ) ; if ( ( mDownloadListener ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onDownloadStart" ) ; mDownloadListener.onDownloadStart ( url , userAgent , contentDisposition , mimeType , contentLength ) ; } } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onDownloadStart" ) ; } }
Source:
protected java.util.Set < java.lang.String > provideZoneIds ( ) { java.util.Set < java.lang.String > zoneIds = android.icu.impl.ZoneMeta.getAvailableIDs ( TimeZone.SystemTimeZoneType.ANY , null , null ) ; zoneIds = new java.util.HashSet < > ( zoneIds ) ; zoneIds.remove ( "GMT+0" ) ; zoneIds.remove ( "GMT-0" ) ; return zoneIds ; }

Target:
protected java.util.Set < java.lang.String > provideZoneIds ( ) { java.util.Set < java.lang.String > zoneIds = android.icu.util.TimeZone.getAvailableIDs ( TimeZone.SystemTimeZoneType.ANY , null , null ) ; zoneIds = new java.util.HashSet < > ( zoneIds ) ; zoneIds.remove ( "GMT+0" ) ; zoneIds.remove ( "GMT-0" ) ; return zoneIds ; }
Source:
public final void testLocalSdkTest_getPkgInfo_PlatformTools ( ) { assertNull ( mLS.getPkgInfo ( PkgType.PKG_PLATFORM_TOOLS ) ) ; mLS.clearLocalPkg ( PkgType.PKG_ALL ) ; mFOp.recordExistingFolder ( "/sdk/platform-tools" ) ; mFOp.recordExistingFile ( "/sdk/platform-tools/source.properties" , ( "Pkg.License=Terms and Conditions\n" + ( ( ( ( "Archive.Os=WINDOWS\n" + "Pkg.Revision=18.19.20\n" ) + "Pkg.LicenseRef=android-sdk-license\n" ) + "Archive.Arch=ANY\n" ) + "Pkg.SourceUrl=https\\://dl-ssl.google.com/android/repository/repository-8.xml" ) ) ) ; com.android.sdklib.repository.local.LocalPkgInfo pi = mLS.getPkgInfo ( PkgType.PKG_PLATFORM_TOOLS ) ; assertNotNull ( pi ) ; assertTrue ( ( pi instanceof com.android.sdklib.repository.local.LocalPlatformToolPkgInfo ) ) ; assertEquals ( new java.io.File ( "/sdk/platform-tools" ) , pi.getLocalDir ( ) ) ; assertSame ( mLS , pi.getLocalSdk ( ) ) ; assertEquals ( null , pi.getLoadError ( ) ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 18 , 19 , 20 ) , pi.getDesc ( ) . getFullRevision ( ) ) ; assertEquals ( "<LocalPlatformToolPkgInfo:PkgDesc FullRev=18.19.20>" , pi.toString ( ) ) ; java.lang.Package pkg = pi.getPackage ( ) ; assertNotNull ( pkg ) ; }

Target:
public final void testLocalSdkTest_getPkgInfo_PlatformTools ( ) { assertNull ( mLS.getPkgInfo ( PkgType.PKG_PLATFORM_TOOLS ) ) ; mLS.clearLocalPkg ( PkgType.PKG_ALL ) ; mFOp.recordExistingFolder ( "/sdk/platform-tools" ) ; mFOp.recordExistingFile ( "/sdk/platform-tools/source.properties" , ( "Pkg.License=Terms and Conditions\n" + ( ( ( ( "Archive.Os=WINDOWS\n" + "Pkg.Revision=18.19.20\n" ) + "Pkg.LicenseRef=android-sdk-license\n" ) + "Archive.Arch=ANY\n" ) + "Pkg.SourceUrl=https\\://example.com/repository-8.xml" ) ) ) ; com.android.sdklib.repository.local.LocalPkgInfo pi = mLS.getPkgInfo ( PkgType.PKG_PLATFORM_TOOLS ) ; assertNotNull ( pi ) ; assertTrue ( ( pi instanceof com.android.sdklib.repository.local.LocalPlatformToolPkgInfo ) ) ; assertEquals ( new java.io.File ( "/sdk/platform-tools" ) , pi.getLocalDir ( ) ) ; assertSame ( mLS , pi.getLocalSdk ( ) ) ; assertEquals ( null , pi.getLoadError ( ) ) ; assertEquals ( new com.android.sdklib.repository.FullRevision ( 18 , 19 , 20 ) , pi.getDesc ( ) . getFullRevision ( ) ) ; assertEquals ( "<LocalPlatformToolPkgInfo <PkgDesc Type=platform_tools FullRev=18.19.20>>" , pi.toString ( ) ) ; java.lang.Package pkg = pi.getPackage ( ) ; assertNotNull ( pkg ) ; }
Source:
public void TestAliasFallback ( ) { try { android.icu.util.ULocale loc = new android.icu.util.ULocale ( "en_US" ) ; android.icu.impl.ICUResourceBundle b = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , loc ) ) ) ; android.icu.impl.ICUResourceBundle b1 = ( ( android.icu.impl.ICUResourceBundle ) ( b.getWithFallback ( "calendar/hebrew/monthNames/format/abbreviated" ) ) ) ; if ( b1 != null ) { logln ( ( "loaded data for abbreviated month names: " + ( b1.getKey ( ) ) ) ) ; } } catch ( java.util.MissingResourceException ex ) { warnln ( "Failed to load data for abbreviated month names" ) ; } }

Target:
public void TestAliasFallback ( ) { try { android.icu.util.ULocale loc = new android.icu.util.ULocale ( "en_US" ) ; android.icu.impl.ICUResourceBundle b = ( ( android.icu.impl.ICUResourceBundle ) ( android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , loc ) ) ) ; android.icu.impl.ICUResourceBundle b1 = b.getWithFallback ( "calendar/hebrew/monthNames/format/abbreviated" ) ; if ( b1 != null ) { logln ( ( "loaded data for abbreviated month names: " + ( b1.getKey ( ) ) ) ) ; } } catch ( java.util.MissingResourceException ex ) { warnln ( "Failed to load data for abbreviated month names" ) ; } }
Source:
public static android.icu.impl.LocaleDisplayNamesImpl.DataTables load ( java.lang.String className ) { try { return ( ( android.icu.impl.LocaleDisplayNamesImpl.DataTables ) ( java.lang.Class.forName ( className ) . newInstance ( ) ) ) ; } catch ( java.lang.Throwable t ) { final android.icu.impl.LocaleDisplayNamesImpl.DataTable NO_OP = new android.icu.impl.LocaleDisplayNamesImpl.DataTable ( ) ; return new android.icu.impl.LocaleDisplayNamesImpl.DataTables ( ) { public android.icu.impl.LocaleDisplayNamesImpl.DataTable get ( android.icu.util.ULocale locale ) { return NO_OP ; } } ; } }

Target:
public static android.icu.impl.LocaleDisplayNamesImpl.DataTables load ( java.lang.String className ) { try { return ( ( android.icu.impl.LocaleDisplayNamesImpl.DataTables ) ( java.lang.Class.forName ( className ) . newInstance ( ) ) ) ; } catch ( java.lang.Throwable t ) { return new android.icu.impl.LocaleDisplayNamesImpl.DataTables ( ) { @ java.lang.Override public android.icu.impl.LocaleDisplayNamesImpl.DataTable get ( android.icu.util.ULocale locale , boolean nullIfNotFound ) { return new android.icu.impl.LocaleDisplayNamesImpl.DataTable ( nullIfNotFound ) ; } } ; } }
Source:
private void emitAdvancePc ( int deltaAddress ) throws java.io.IOException { int mark = output.getCursor ( ) ; output.writeByte ( com.android.dx.dex.file.DBG_ADVANCE_PC ) ; output.writeUleb128 ( deltaAddress ) ; address += deltaAddress ; if ( ( ( annotateTo ) != null ) || ( ( debugPrint ) != null ) ) { annotate ( ( ( output.getCursor ( ) ) - mark ) , java.lang.String.format ( "%04x: advance pc" , address ) ) ; } if ( com.android.dx.dex.file.DebugInfoEncoder.DEBUG ) { java.lang.System.err.printf ( "Emitting advance_pc for %d\n" , deltaAddress ) ; } }

Target:
private void emitAdvancePc ( int deltaAddress ) throws java.io.IOException { int mark = output.getCursor ( ) ; output.writeByte ( com.android.dx.dex.file.DebugInfoConstants.DBG_ADVANCE_PC ) ; output.writeUleb128 ( deltaAddress ) ; address += deltaAddress ; if ( ( ( annotateTo ) != null ) || ( ( debugPrint ) != null ) ) { annotate ( ( ( output.getCursor ( ) ) - mark ) , java.lang.String.format ( "%04x: advance pc" , address ) ) ; } if ( com.android.dx.dex.file.DebugInfoEncoder.DEBUG ) { java.lang.System.err.printf ( "Emitting advance_pc for %d\n" , deltaAddress ) ; } }
Source:
public static double getJitterMean ( android.hardware.cts.helpers.TestSensorEvent [ ] events , java.util.Collection < java.lang.Double > jitterValues ) { java.util.ArrayList < java.lang.Long > timestampDelayValues = new java.util.ArrayList < java.lang.Long > ( ) ; double averageTimestampDelay = android.hardware.cts.helpers.SensorCtsHelper.getAverageTimestampDelayWithValues ( events , timestampDelayValues ) ; for ( long frequency : timestampDelayValues ) { jitterValues.add ( java.lang.Math.abs ( ( averageTimestampDelay - frequency ) ) ) ; } double jitterMean = android.hardware.cts.helpers.SensorCtsHelper.getMean ( timestampDelayValues ) ; return jitterMean ; }

Target:
public static java.util.List < java.lang.Double > getJitterValues ( android.hardware.cts.helpers.TestSensorEvent [ ] events ) { java.util.List < java.lang.Long > timestampDelayValues = android.hardware.cts.helpers.SensorCtsHelper.getTimestampDelayValues ( events ) ; double averageTimestampDelay = android.hardware.cts.helpers.SensorCtsHelper.getMean ( timestampDelayValues ) ; java.util.List < java.lang.Double > jitterValues = new java.util.ArrayList < java.lang.Double > ( timestampDelayValues.size ( ) ) ; for ( long timestampDelay : timestampDelayValues ) { jitterValues.add ( java.lang.Math.abs ( ( timestampDelay - averageTimestampDelay ) ) ) ; } return jitterValues ; }
Source:
public void testV1OneSignerSHA224withDSAAcceptedWithKeysTooLongForDigest ( ) throws java.lang.Exception { java.security.PublicKey publicKey = getCertificateFromResources ( "dsa-2048.x509.pem" ) . getPublicKey ( ) ; java.security.Signature s = java.security.Signature.getInstance ( "SHA224withDSA" ) ; try { s.initVerify ( publicKey ) ; } catch ( java.security.InvalidKeyException e ) { org.junit.Assume.assumeNoException ( e ) ; } assertVerifiedForEach ( "v1-only-with-dsa-sha224-1.2.840.10040.4.1-%s.apk" , com.android.apksig.ApkVerifierTest.DSA_KEY_NAMES_2048_AND_LARGER ) ; assertVerifiedForEach ( "v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-%s.apk" , com.android.apksig.ApkVerifierTest.DSA_KEY_NAMES_2048_AND_LARGER ) ; }

Target:
public void testV1OneSignerSHA224withDSAAcceptedWithKeysTooLongForDigest ( ) throws java.lang.Exception { java.security.PublicKey publicKey = com.android.apksig.internal.util.Resources.toCertificate ( getClass ( ) , "dsa-2048.x509.pem" ) . getPublicKey ( ) ; java.security.Signature s = java.security.Signature.getInstance ( "SHA224withDSA" ) ; try { s.initVerify ( publicKey ) ; } catch ( java.security.InvalidKeyException e ) { org.junit.Assume.assumeNoException ( e ) ; } assertVerifiedForEach ( "v1-only-with-dsa-sha224-1.2.840.10040.4.1-%s.apk" , com.android.apksig.ApkVerifierTest.DSA_KEY_NAMES_2048_AND_LARGER ) ; assertVerifiedForEach ( "v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-%s.apk" , com.android.apksig.ApkVerifierTest.DSA_KEY_NAMES_2048_AND_LARGER ) ; }
Source:
public android.net.Uri getPlaybackUri ( ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { return mService.getPlaybackUri ( mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_MIDDLEWARE_LOST ) ; } }

Target:
public android.net.Uri getPlaybackUri ( ) { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { return mService.getPlaybackUri ( mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; mParentSession.onStreamingServiceStopped ( this ) ; sendErrorToApp ( MbmsException.ERROR_MIDDLEWARE_LOST , null ) ; return null ; } }
Source:
public int setAllowedCarriers ( int slotId , java.util.List < android.service.carrier.CarrierIdentifier > carriers ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.setAllowedCarriers ( slotId , carriers ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } catch ( java.lang.NullPointerException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } return - 1 ; }

Target:
public int setAllowedCarriers ( int slotIndex , java.util.List < android.service.carrier.CarrierIdentifier > carriers ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.setAllowedCarriers ( slotIndex , carriers ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } catch ( java.lang.NullPointerException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setAllowedCarriers" , e ) ; } return - 1 ; }
Source:
private void copyTo ( java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , array , dt ) ; }

Target:
private void copyTo ( java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; boolean usePadding = false ; if ( ( mAutoPadding ) && ( ( mType.getElement ( ) . getVectorSize ( ) ) == 3 ) ) { usePadding = true ; } mRS.nAllocationRead ( getID ( mRS ) , array , dt , mType.mElement.mType.mSize , usePadding ) ; }
Source:
public synchronized com.android.builder.sdk.SdkLoader getSdkLoader ( ) { if ( ( sdkLoader ) == null ) { if ( isRegularSdk ) { getAndCheckSdkFolder ( ) ; if ( ( ( com.android.build.gradle.BasePlugin.TEST_SDK_DIR ) == null ) && ( ! ( sdkFolder.isDirectory ( ) ) ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "The SDK directory '%s' does not exist." , sdkFolder ) ) ; } sdkLoader = com.android.builder.sdk.DefaultSdkLoader.getLoader ( sdkFolder ) ; } else { sdkLoader = com.android.builder.sdk.PlatformLoader.getLoader ( sdkFolder ) ; } } return sdkLoader ; }

Target:
public synchronized com.android.builder.sdk.SdkLoader getSdkLoader ( ) { if ( ( sdkLoader ) == null ) { if ( isRegularSdk ) { getAndCheckSdkFolder ( ) ; if ( ( ( com.android.build.gradle.internal.SdkHandler.sTestSdkFolder ) == null ) && ( ! ( sdkFolder.isDirectory ( ) ) ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "The SDK directory '%s' does not exist." , sdkFolder ) ) ; } sdkLoader = com.android.builder.sdk.DefaultSdkLoader.getLoader ( sdkFolder ) ; } else { sdkLoader = com.android.builder.sdk.PlatformLoader.getLoader ( sdkFolder ) ; } } return sdkLoader ; }
Source:
private android.app.PendingIntent createLaunchPendingIntent ( boolean isFullScreen ) { android.content.Intent intent = com.android.incallui.InCallActivity.getIntent ( mContext , false , false , isFullScreen ) ; int requestCode = InCallActivity.PENDING_INTENT_REQUEST_CODE_NON_FULL_SCREEN ; if ( isFullScreen ) { requestCode = InCallActivity.PENDING_INTENT_REQUEST_CODE_FULL_SCREEN ; } return android.app.PendingIntent.getActivity ( mContext , requestCode , intent , 0 ) ; }

Target:
private android.app.PendingIntent createLaunchPendingIntent ( boolean isFullScreen ) { android.content.Intent intent = com.android.incallui.InCallActivity.getIntent ( mContext , false , false , isFullScreen ) ; int requestCode = InCallActivity.PendingIntentRequestCodes.NON_FULL_SCREEN ; if ( isFullScreen ) { requestCode = InCallActivity.PendingIntentRequestCodes.FULL_SCREEN ; } return android.app.PendingIntent.getActivity ( mContext , requestCode , intent , 0 ) ; }
Source:
public void test_parkFor_3 ( ) { tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }

Target:
public void test_parkFor_2 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; }
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:
public android.app.Dialog onCreateDialog ( int id , android.os.Bundle args ) { switch ( id ) { case com.android.cts.verifier.streamquality.StreamingVideoActivity.RTSP_URL_ERROR : return new android.app.AlertDialog.Builder ( this ) . setTitle ( getString ( R.string.sv_failed_title ) ) . setMessage ( getString ( R.string.sv_failed_message ) ) . setNegativeButton ( "Close" , new android.content.DialogInterface.OnClickListener ( ) { @ java.lang.Override public void onClick ( android.content.DialogInterface dialog , int which ) { com.android.cts.verifier.PassFailButtons.setTestResultAndFinish ( com.android.cts.verifier.streamquality.StreamingVideoActivity.this , getTestId ( ) , null , false ) ; } } ) . show ( ) ; default : return super . onCreateDialog ( id , args ) ; } }
Source:
public void testCheckAndSet ( ) { assertEquals ( true , pdq.checkAndSet ( "ldpi" , config ) ) ; assertTrue ( ( ( config.getPixelDensityQualifier ( ) ) != null ) ) ; assertEquals ( Density.LOW , config.getPixelDensityQualifier ( ) . getValue ( ) ) ; assertEquals ( "ldpi" , config.getPixelDensityQualifier ( ) . toString ( ) ) ; }

Target:
public void testCheckAndSet ( ) { assertEquals ( true , pdq.checkAndSet ( "ldpi" , config ) ) ; assertTrue ( ( ( config.getDensityQualifier ( ) ) != null ) ) ; assertEquals ( Density.LOW , config.getDensityQualifier ( ) . getValue ( ) ) ; assertEquals ( "ldpi" , config.getDensityQualifier ( ) . toString ( ) ) ; }
Source:
public void onStateChange ( boolean state ) { synchronized ( mLock ) { android.util.Log.i ( mTag , ( "OnStateChange:" + state ) ) ; mIsConnected = state ; if ( ! state ) { if ( ( mAccessControlEnforcer ) != null ) { mAccessControlEnforcer.reset ( ) ; } } else { try { initializeAccessControl ( ) ; } catch ( java.lang.Exception e ) { } synchronized ( mLock ) { mDefaultApplicationSelectedOnBasicChannel = true ; } } } }

Target:
public void onStateChange ( boolean state ) { synchronized ( mLock ) { android.util.Log.i ( mTag , ( "OnStateChange:" + state ) ) ; mIsConnected = state ; if ( ! state ) { if ( ( mAccessControlEnforcer ) != null ) { mAccessControlEnforcer.reset ( ) ; } } else { closeChannels ( ) ; try { initializeAccessControl ( ) ; } catch ( java.lang.Exception e ) { } mDefaultApplicationSelectedOnBasicChannel = true ; } } }
Source:
public static java.lang.Character.UnicodeBlock of ( int codePoint ) { java.lang.Character.checkValidCodePoint ( codePoint ) ; int block = java.lang.Character.ofImpl ( codePoint ) ; if ( ( block == ( - 1 ) ) || ( block >= ( java.lang.Character.UnicodeBlock.BLOCKS.length ) ) ) { return null ; } return java.lang.Character.UnicodeBlock.BLOCKS [ block ] ; }

Target:
public static java.lang.Character.UnicodeBlock of ( int codePoint ) { java.lang.Character.checkValidCodePoint ( codePoint ) ; int block = java.lang.Character.unicodeBlockForCodePoint ( codePoint ) ; if ( ( block == ( - 1 ) ) || ( block >= ( java.lang.Character.UnicodeBlock.BLOCKS.length ) ) ) { return null ; } return java.lang.Character.UnicodeBlock.BLOCKS [ block ] ; }
Source:
com.android.bluetooth.avrcpcontroller.AvrcpPlayer createFromNativePlayerItem ( int id , java.lang.String name , byte [ ] transportFlags , int playStatus , int playerType ) { if ( com.android.bluetooth.avrcpcontroller.AvrcpControllerService.DBG ) { android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerService.TAG , ( ( ( ( ( ( ( "createFromNativePlayerItem name: " + name ) + " transportFlags " ) + transportFlags ) + " play status " ) + playStatus ) + " player type " ) + playerType ) ) ; } com.android.bluetooth.avrcpcontroller.AvrcpPlayer player = new com.android.bluetooth.avrcpcontroller.AvrcpPlayer ( id , name , 0 , playStatus , playerType ) ; return player ; }

Target:
com.android.bluetooth.avrcpcontroller.AvrcpPlayer createFromNativePlayerItem ( int id , java.lang.String name , byte [ ] transportFlags , int playStatus , int playerType ) { if ( com.android.bluetooth.avrcpcontroller.AvrcpControllerService.VDBG ) { android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerService.TAG , ( ( ( ( ( ( ( "createFromNativePlayerItem name: " + name ) + " transportFlags " ) + transportFlags ) + " play status " ) + playStatus ) + " player type " ) + playerType ) ) ; } com.android.bluetooth.avrcpcontroller.AvrcpPlayer player = new com.android.bluetooth.avrcpcontroller.AvrcpPlayer ( id , name , 0 , playStatus , playerType ) ; return player ; }
Source:
public static final com.android.bluetooth.avrcp.Metadata empty_data ( ) { com.android.bluetooth.avrcp.Metadata ret = new com.android.bluetooth.avrcp.Metadata ( ) ; ret.mediaId = "Not Provided" ; ret.title = "Not Provided" ; ret.artist = "Not Provided" ; ret.album = "Not Provided" ; ret.genre = "Not Provided" ; ret.trackNum = "1" ; ret.numTracks = "1" ; ret.duration = "0" ; return ret ; }

Target:
public static final com.android.bluetooth.avrcp.Metadata empty_data ( ) { com.android.bluetooth.avrcp.Metadata ret = new com.android.bluetooth.avrcp.Metadata ( ) ; ret.mediaId = "Not Provided" ; ret.title = "Not Provided" ; ret.artist = "" ; ret.album = "" ; ret.genre = "" ; ret.trackNum = "1" ; ret.numTracks = "1" ; ret.duration = "0" ; return ret ; }
Source:
public void cleanStackTraceProxy ( ) { com.android.dx.mockito.tests.MockTests.TestClass t = org.mockito.Mockito.mock ( com.android.dx.mockito.tests.MockTests.TestClass.class ) ; try { org.mockito.Mockito.verify ( t ) . returnA ( ) ; } catch ( java.lang.Throwable verifyLocation ) { try { throw new java.lang.Exception ( ) ; } catch ( java.lang.Exception here ) { org.junit.Assert.assertEquals ( here.getStackTrace ( ) [ 0 ] . getMethodName ( ) , verifyLocation.getStackTrace ( ) [ 0 ] . getMethodName ( ) ) ; } } }

Target:
public void verifyAdditionalInvocations ( ) { com.android.dx.mockito.tests.GeneralMocking.TestClass t = org.mockito.Mockito.mock ( com.android.dx.mockito.tests.GeneralMocking.TestClass.class ) ; t.returnA ( ) ; t.returnA ( ) ; try { org.mockito.Mockito.verifyNoMoreInteractions ( t ) ; } catch ( org.mockito.exceptions.verification.NoInteractionsWanted e ) { try { throw new java.lang.Exception ( ) ; } catch ( java.lang.Exception here ) { org.junit.Assert.assertTrue ( e.getMessage ( ) , e.getMessage ( ) . contains ( here.getStackTrace ( ) [ 0 ] . getMethodName ( ) ) ) ; } } }
Source:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { com.android.ddmlib.SyncService.SyncResult result = sync.push ( localFiles , remoteDirectory , new com.android.ddmuilib.SyncProgressMonitor ( monitor , "Pushing file(s) to the device" ) ) ; if ( ( result.getCode ( ) ) != ( com.android.ddmlib.SyncService.RESULT_OK ) ) { com.android.ddmuilib.console.DdmConsole.printErrorToConsole ( java.lang.String.format ( "Failed to push the items: %1$s" , result.getMessage ( ) ) ) ; } sync.close ( ) ; }

Target:
public void run ( com.android.ddmlib.SyncService.ISyncProgressMonitor monitor ) throws com.android.ddmlib.SyncException , com.android.ddmlib.TimeoutException , java.io.IOException { sync.push ( localFiles , remoteDirectory , monitor ) ; }
Source:
private void processLibraries ( @ com.android.annotations.NonNull java.util.Collection < com.android.build.gradle.internal.dependency.LibraryDependencyImpl > libraries , @ com.android.annotations.NonNull com.google.common.collect.Multimap < com.android.builder.dependency.LibraryDependency , com.android.build.gradle.internal.dependency.VariantDependencies > reverseMap ) { for ( com.android.build.gradle.internal.dependency.LibraryDependencyImpl lib : libraries ) { handleLibrary2 ( lib , reverseMap ) ; processLibraries ( ( ( java.util.Collection < com.android.build.gradle.internal.dependency.LibraryDependencyImpl > ) ( ( java.util.List < ? > ) ( lib.getDependencies ( ) ) ) ) , reverseMap ) ; } }

Target:
private void processLibraries ( @ com.android.annotations.NonNull java.util.Collection < com.android.build.gradle.internal.dependency.LibraryDependencyImpl > libraries , @ com.android.annotations.NonNull com.google.common.collect.Multimap < com.android.builder.dependency.LibraryDependency , com.android.build.gradle.internal.dependency.VariantDependencies > reverseMap ) { for ( com.android.build.gradle.internal.dependency.LibraryDependencyImpl lib : libraries ) { setupPrepareLibraryTask ( lib , reverseMap ) ; processLibraries ( ( ( java.util.Collection < com.android.build.gradle.internal.dependency.LibraryDependencyImpl > ) ( ( java.util.List < ? > ) ( lib.getDependencies ( ) ) ) ) , reverseMap ) ; } }
Source:
public boolean setPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "setPnoList not supported" ) ; return false ; } else { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "setPnoList cmd " + ( com.android.server.wifi.WifiNative.sPnoCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.sPnoCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; com.android.server.wifi.WifiNative.sPnoEventHandler = eventHandler ; if ( com.android.server.wifi.WifiNative.setPnoListNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sPnoCmdId , settings ) ) { return true ; } } com.android.server.wifi.WifiNative.sPnoEventHandler = null ; return false ; } } }

Target:
public boolean setPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { android.util.Log.e ( mTAG , "setPnoList not supported" ) ; return false ; }
Source:
static byte [ ] calculateKeyId ( org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info ) { org.bouncycastle.crypto.Digest dig = new org.bouncycastle.crypto.digests.SHA1Digest ( ) ; byte [ ] hash = new byte [ dig.getDigestSize ( ) ] ; byte [ ] spkiEnc = new byte [ 0 ] ; try { spkiEnc = info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return new byte [ 0 ] ; } dig.update ( spkiEnc , 0 , spkiEnc.length ) ; dig.doFinal ( hash , 0 ) ; return hash ; }

Target:
static byte [ ] calculateKeyId ( org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info ) { org.bouncycastle.cert.selector.MSOutlookKeyIdCalculator.SHA1Digest dig = new org.bouncycastle.cert.selector.MSOutlookKeyIdCalculator.SHA1Digest ( ) ; byte [ ] hash = new byte [ dig.getDigestSize ( ) ] ; byte [ ] spkiEnc = new byte [ 0 ] ; try { spkiEnc = info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return new byte [ 0 ] ; } dig.update ( spkiEnc , 0 , spkiEnc.length ) ; dig.doFinal ( hash , 0 ) ; return hash ; }
Source:
protected com.android.ide.common.internal.PngCruncher getCruncher ( ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.ide.common.internal.CommandLineRunner commandLineRunner = new com.android.ide.common.internal.CommandLineRunner ( logger ) ; java.io.File aapt = getAapt ( ) ; return new com.android.ide.common.internal.AaptCruncher ( aapt.getAbsolutePath ( ) , commandLineRunner ) ; }

Target:
protected com.android.ide.common.internal.PngCruncher getCruncher ( ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.ide.common.process.ProcessExecutor processExecutor = new com.android.ide.common.process.DefaultProcessExecutor ( logger ) ; com.android.ide.common.process.ProcessOutputHandler processOutputHandler = new com.android.ide.common.process.LoggedProcessOutputHandler ( logger ) ; java.io.File aapt = getAapt ( ) ; return new com.android.ide.common.internal.AaptCruncher ( aapt.getAbsolutePath ( ) , processExecutor , processOutputHandler ) ; }
Source:
public void invokeOemRilRequestRaw ( byte [ ] data , android.os.Message response ) { if ( response != null ) { android.os.AsyncResult.forMessage ( response ) . result = data ; response.sendToTarget ( ) ; } }

Target:
public void getIccSlotsStatus ( android.os.Message result ) { com.android.internal.telephony.test.SimulatedCommandsVerifier.getInstance ( ) . getIccSlotsStatus ( result ) ; if ( ( mIccSlotStatus ) != null ) { resultSuccess ( result , mIccSlotStatus ) ; } else { resultFail ( result , null , new com.android.internal.telephony.CommandException ( CommandException.Error.REQUEST_NOT_SUPPORTED ) ) ; } }
Source:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVfs , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( FileType.DEX.getFileExtension ( ) ) ; } try { return outputVfs.getRootDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }

Target:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVfs , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( FileType.DEX.getFileExtension ( ) ) ; } try { return outputVfs.getRootOutputVDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }
Source:
public void testStageInstallWithErrorCode_withBadlyFormedDistroVersion ( ) throws java.lang.Exception { com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( 1 , 1 , com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidFormatVersionBytes = validDistroVersion.toBytes ( ) ; invalidFormatVersionBytes [ 0 ] = 'A' ; com.android.timezone.distro.TimeZoneDistro distro = createTimeZoneDistroWithVersionBytes ( invalidFormatVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withBadlyFormedDistroVersion ( ) throws java.lang.Exception { byte [ ] invalidFormatVersionBytes = com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( com.android.timezone.distro.installer.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . buildUnvalidatedBytes ( ) ; invalidFormatVersionBytes [ 0 ] = 'A' ; com.android.timezone.distro.TimeZoneDistro distro = createTimeZoneDistroWithVersionBytes ( invalidFormatVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { java.lang.String dexFile = args [ 0 ] ; java.lang.String pattern = args [ 1 ] ; com.android.dx.io.DexBuffer dex = new com.android.dx.io.DexBuffer ( new java.io.File ( dexFile ) ) ; int count = new com.android.dx.command.grep.Grep ( dex , java.util.regex.Pattern.compile ( pattern ) , new java.io.PrintWriter ( java.lang.System.out ) ) . grep ( ) ; java.lang.System.exit ( ( count > 0 ? 0 : 1 ) ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { java.lang.String dexFile = args [ 0 ] ; java.lang.String pattern = args [ 1 ] ; com.android.dex.Dex dex = new com.android.dex.Dex ( new java.io.File ( dexFile ) ) ; int count = new com.android.dx.command.grep.Grep ( dex , java.util.regex.Pattern.compile ( pattern ) , new java.io.PrintWriter ( java.lang.System.out ) ) . grep ( ) ; java.lang.System.exit ( ( count > 0 ? 0 : 1 ) ) ; }
Source:
public boolean startFilteringMulticastV6Packets ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.removeRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V6_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) ; } else { return ( ( doBooleanCommand ( "DRIVER RXFILTER-STOP" ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-REMOVE 3" ) ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-START" ) ) ; } }

Target:
public boolean stopFilteringMulticastV6Packets ( ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.addRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V6_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.startRxFilter ( ) ) ; }
Source:
int performDexOpt ( android.content.pm.PackageParser.Package pkg , java.lang.String [ ] sharedLibraries , java.lang.String [ ] instructionSets , boolean checkProfiles , java.lang.String targetCompilationFilter ) { synchronized ( mInstallLock ) { final boolean useLock = mSystemReady ; if ( useLock ) { mDexoptWakeLock.setWorkSource ( new android.os.WorkSource ( pkg.applicationInfo.uid ) ) ; mDexoptWakeLock.acquire ( ) ; } try { return performDexOptLI ( pkg , sharedLibraries , instructionSets , checkProfiles , targetCompilationFilter ) ; } finally { if ( useLock ) { mDexoptWakeLock.release ( ) ; } } } }

Target:
int performDexOpt ( android.content.pm.PackageParser.Package pkg , java.lang.String [ ] sharedLibraries , java.lang.String [ ] instructionSets , boolean checkProfiles , java.lang.String targetCompilationFilter , com.android.server.pm.CompilerStats.PackageStats packageStats ) { synchronized ( mInstallLock ) { final boolean useLock = mSystemReady ; if ( useLock ) { mDexoptWakeLock.setWorkSource ( new android.os.WorkSource ( pkg.applicationInfo.uid ) ) ; mDexoptWakeLock.acquire ( ) ; } try { return performDexOptLI ( pkg , sharedLibraries , instructionSets , checkProfiles , targetCompilationFilter , packageStats ) ; } finally { if ( useLock ) { mDexoptWakeLock.release ( ) ; } } } }
Source:
public void sendMessage ( int peerId , @ android.annotation.Nullable byte [ ] message , int messageId , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mSessionId , peerId , message , messageId , retryCount ) ; } }

Target:
public void sendMessage ( int peerId , @ android.annotation.Nullable byte [ ] message , int messageId , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mSessionId , peerId , message , messageId , retryCount ) ; } }
Source:
public static void setUpClass ( ) { com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.class . getClassLoader ( ) . setDefaultAssertionStatus ( true ) ; }

Target:
public static void setUpClass ( ) { com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.class . getClassLoader ( ) . setDefaultAssertionStatus ( true ) ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.BOOTCLASSPATH = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar" ) } ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest.JARJAR_RULES = new com.android.jack.JarJarRules ( com.android.jack.TestTools.getFromAndroidTree ( "external/bouncycastle/jarjar-rules.txt" ) ) ; }
Source:
private void onSubscriberInfo ( java.lang.String number , int type ) { com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent event = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EVENT_TYPE_SUBSCRIBER_INFO ) ; event.valueInt = type ; event.valueString = number ; android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "incoming" + event ) ) ; sendMessage ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.STACK_EVENT , event ) ; }

Target:
private void onSubscriberInfo ( java.lang.String number , int type ) { com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent event = new com.android.bluetooth.hfpclient.HeadsetClientStateMachine.StackEvent ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EVENT_TYPE_SUBSCRIBER_INFO ) ; event.valueInt = type ; event.valueString = number ; if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "incoming" + event ) ) ; } sendMessage ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.STACK_EVENT , event ) ; }
Source:
public void notifyChangeListeners ( ) { if ( ( mChangeListeners ) == null ) { return ; } synchronized ( mChangeListeners ) { for ( java.lang.Runnable runnable : mChangeListeners ) { try { runnable.run ( ) ; } catch ( java.lang.Throwable ignore ) { assert ignore == null : "A SdkSource.ChangeListener failed with an exception." ; } } } }

Target:
public void notifyChangeListeners ( ) { if ( ( mChangeListeners ) == null ) { return ; } synchronized ( mChangeListeners ) { for ( java.lang.Runnable runnable : mChangeListeners ) { try { runnable.run ( ) ; } catch ( java.lang.Throwable ignore ) { assert ignore == null : "A SdkSource.ChangeListener failed with an exception: " + ( ignore.toString ( ) ) ; } } } }
Source:
public void testSendCallEventNull ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.sendCallEvent ( ids.mCallId , com.android.server.telecom.tests.BasicCallTests.TEST_EVENT , null ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . sendCallEvent ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.BasicCallTests.TEST_EVENT ) , org.mockito.Matchers.isNull ( android.os.Bundle.class ) , org.mockito.Matchers.any ( ) ) ; }

Target:
public void testSendCallEventNull ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.sendCallEvent ( ids.mCallId , com.android.server.telecom.tests.BasicCallTests.TEST_EVENT , 26 , null ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . sendCallEvent ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.BasicCallTests.TEST_EVENT ) , org.mockito.Matchers.isNull ( android.os.Bundle.class ) , org.mockito.Matchers.any ( ) ) ; }
Source:
public void test_with_longTemporalField_minuteOfDay ( ) { for ( long i : testPoints ( ( 24 * 60 ) ) ) { java.time.LocalTime test = TEST_12_30_40_987654321.with ( java.time.temporal.ChronoField.MINUTE_OF_DAY , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.MINUTE_OF_DAY ) , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.SECOND_OF_MINUTE ) , TEST_12_30_40_987654321.get ( java.time.temporal.ChronoField.SECOND_OF_MINUTE ) ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) , TEST_12_30_40_987654321.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) ) ; } }

Target:
public void test_with_longTemporalField_minuteOfDay ( ) { for ( long i : testPoints ( ( 24 * 60 ) ) ) { java.time.LocalTime test = tck.java.time.TCKLocalTime.TEST_12_30_40_987654321.with ( java.time.temporal.ChronoField.MINUTE_OF_DAY , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.MINUTE_OF_DAY ) , i ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.SECOND_OF_MINUTE ) , tck.java.time.TCKLocalTime.TEST_12_30_40_987654321.get ( java.time.temporal.ChronoField.SECOND_OF_MINUTE ) ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) , tck.java.time.TCKLocalTime.TEST_12_30_40_987654321.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) ) ; } }