auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean clearNetworkCandidateScanResult ( int networkId ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( null ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( java.lang.Integer.MIN_VALUE ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( false ) ; return true ; }

Target:
public boolean clearNetworkCandidateScanResult ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( "Clear network candidate scan result for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( null ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( java.lang.Integer.MIN_VALUE ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( false ) ; return true ; }
Source:
public void dismissKeyguardLw ( ) { if ( ! ( mKeyguardMediator.isSecure ( ) ) ) { if ( mKeyguardMediator.isShowing ( ) ) { mHandler.post ( new java.lang.Runnable ( ) { public void run ( ) { mKeyguardMediator.keyguardDone ( false , true ) ; } } ) ; } } }

Target:
private void waitForKeyguard ( final com.android.internal.policy.impl.ScreenOnListener screenOnListener ) { if ( ( mKeyguardMediator ) != null ) { if ( screenOnListener != null ) { mKeyguardMediator.onScreenTurnedOn ( new com.android.internal.policy.impl.keyguard.KeyguardViewManager.ShowListener ( ) { @ java.lang.Override public void onShown ( android.os.IBinder windowToken ) { waitForKeyguardWindowDrawn ( windowToken , screenOnListener ) ; } } ) ; return ; } else { mKeyguardMediator.onScreenTurnedOn ( null ) ; } } else { android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "No keyguard mediator!" ) ; } finishScreenTurningOn ( screenOnListener ) ; }
Source:
private void readObject ( java.io.ObjectInputStream stream ) throws java.io.IOException , java.lang.ClassNotFoundException { stream.defaultReadObject ( ) ; int size = com.google.common.collect.Serialization.readCount ( stream ) ; setDelegates ( com.google.common.collect.Maps.< K , V > newHashMapWithExpectedSize ( size ) , com.google.common.collect.Maps.< V , K > newHashMapWithExpectedSize ( size ) ) ; com.google.common.collect.Serialization.populateMap ( this , stream , size ) ; }

Target:
private void readObject ( java.io.ObjectInputStream stream ) throws java.io.IOException , java.lang.ClassNotFoundException { stream.defaultReadObject ( ) ; int size = com.google.common.collect.Serialization.readCount ( stream ) ; init ( size ) ; com.google.common.collect.Serialization.populateMap ( this , stream , size ) ; }
Source:
public void simStatusChanged ( int indicationType ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED ) ; if ( ( mRil.mIccStatusChangedRegistrants ) != null ) { mRil.mIccStatusChangedRegistrants.notifyRegistrants ( ) ; } }

Target:
public void newBroadcastSms ( int indicationType , java.util.ArrayList < java.lang.Byte > data ) { mRil.processIndication ( indicationType ) ; byte [ ] response = com.android.internal.telephony.RIL.arrayListToPrimitiveArray ( data ) ; if ( RIL.RILJ_LOGD ) { mRil.unsljLogvRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS , com.android.internal.telephony.uicc.IccUtils.bytesToHexString ( response ) ) ; } if ( ( mRil.mGsmBroadcastSmsRegistrant ) != null ) { mRil.mGsmBroadcastSmsRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , response , null ) ) ; } }
Source:
public void testSecurityLoggingWithSingleUser ( ) throws java.lang.Exception { if ( ! ( mHasFeature ) ) { return ; } executeDeviceTestMethod ( ".SecurityLoggingTest" , "testRetrievingSecurityLogsNotPossibleImmediatelyAfterPreviousSuccessfulRetrieval" ) ; executeDeviceTestMethod ( ".SecurityLoggingTest" , "testEnablingAndDisablingSecurityLogging" ) ; }

Target:
public void testSecurityLoggingWithSingleUser ( ) throws java.lang.Exception { if ( ! ( mHasFeature ) ) { return ; } executeDeviceTestMethod ( ".SecurityLoggingTest" , "testRetrievingSecurityLogsNotPossibleImmediatelyAfterPreviousSuccessfulRetrieval" ) ; try { executeDeviceTestMethod ( ".SecurityLoggingTest" , "testEnablingSecurityLogging" ) ; rebootAndWaitUntilReady ( ) ; java.lang.Thread.sleep ( java.util.concurrent.TimeUnit.SECONDS.toMillis ( 70 ) ) ; executeDeviceTestMethod ( ".SecurityLoggingTest" , "testGetSecurityLogs" ) ; } finally { executeDeviceTestMethod ( ".SecurityLoggingTest" , "testDisablingSecurityLogging" ) ; } }
Source:
private void assertUidTotal ( android.net.NetworkTemplate template , int uid , long rxBytes , long rxPackets , long txBytes , long txPackets , int operations ) throws java.lang.Exception { assertUidTotal ( template , uid , android.net.NetworkStats.SET_ALL , android.net.NetworkStats.METERED_ALL , android.net.NetworkStats.ROAMING_ALL , rxBytes , rxPackets , txBytes , txPackets , operations ) ; }

Target:
private void assertUidTotal ( android.net.NetworkTemplate template , int uid , long rxBytes , long rxPackets , long txBytes , long txPackets , int operations ) throws java.lang.Exception { assertUidTotal ( template , uid , android.net.NetworkStats.SET_ALL , android.net.NetworkStats.METERED_ALL , android.net.NetworkStats.ROAMING_ALL , android.net.NetworkStats.DEFAULT_NETWORK_ALL , rxBytes , rxPackets , txBytes , txPackets , operations ) ; }
Source:
public void onConnectionFailed ( ) { mConnState = com.android.bluetooth.avrcp.BrowsedMediaPlayer.DISCONNECTED ; android.util.Log.e ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.TAG , ( ( "mediaBrowser Connection failed with " + ( mPackageName ) ) + ", Sending fail response!" ) ) ; mMediaInterface.setBrowsedPlayerRsp ( mBDAddr , AvrcpConstants.RSP_INTERNAL_ERR , ( ( byte ) ( 0 ) ) , 0 , null ) ; }

Target:
public void onConnectionFailed ( ) { mConnState = com.android.bluetooth.avrcp.BrowsedMediaPlayer.DISCONNECTED ; mBrowser = null ; android.util.Log.e ( com.android.bluetooth.avrcp.BrowsedMediaPlayer.TAG , ( ( "mediaBrowser Connection failed with " + ( mPackageName ) ) + ", Sending fail response!" ) ) ; mMediaInterface.setBrowsedPlayerRsp ( mBDAddr , AvrcpConstants.RSP_INTERNAL_ERR , ( ( byte ) ( 0 ) ) , 0 , null ) ; }
Source:
public void testGetEmulatedCoreLibraryInvocationTarget_staticInterfaceMethod ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( "java/util/Comparator" ) ) ; com.google.common.truth.Truth.assertThat ( support.getEmulatedCoreLibraryInvocationTarget ( Opcodes.INVOKESTATIC , "java/util/Comparator" , "reverseOrder" , "()Ljava/util/Comparator;" , true ) ) . isEqualTo ( java.util.Comparator.class ) ; }

Target:
public void testGetCoreInterfaceRewritingTarget_staticInterfaceMethod ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( "java/util/Comparator" ) ) ; com.google.common.truth.Truth.assertThat ( support.getCoreInterfaceRewritingTarget ( Opcodes.INVOKESTATIC , "java/util/Comparator" , "reverseOrder" , "()Ljava/util/Comparator;" , true ) ) . isEqualTo ( java.util.Comparator.class ) ; }
Source:
public static void applyDebuggerSystemProperty ( com.android.internal.os.ZygoteConnection.Arguments args ) { if ( RoSystemProperties.DEBUGGABLE ) { args.debugFlags |= Zygote.DEBUG_ENABLE_JDWP ; } }

Target:
private static void applyInvokeWithSecurityPolicy ( com.android.internal.os.ZygoteConnection.Arguments args , android.net.Credentials peer ) throws com.android.internal.os.ZygoteSecurityException { int peerUid = peer.getUid ( ) ; if ( ( ( ( args.invokeWith ) != null ) && ( peerUid != 0 ) ) && ( ( ( args.runtimeFlags ) & ( Zygote.DEBUG_ENABLE_JDWP ) ) == 0 ) ) { throw new com.android.internal.os.ZygoteSecurityException ( ( "Peer is permitted to specify an" + ( "explicit invoke-with wrapper command only for debuggable" + "applications." ) ) ) ; } }
Source:
public void enter ( ) { mPhone.mCi.registerForRilConnected ( getHandler ( ) , DataConnection.EVENT_RIL_CONNECTED , null ) ; mPhone.mCi.registerForDataCallListChanged ( getHandler ( ) , DataConnection.EVENT_DATA_STATE_CHANGED , null ) ; if ( android.os.Build.IS_DEBUGGABLE ) { mDcTesterDeactivateAll = new com.android.internal.telephony.dataconnection.DcTesterDeactivateAll ( mPhone , this , getHandler ( ) ) ; } if ( ( mNetworkPolicyManager ) != null ) { mNetworkPolicyManager.registerListener ( mListener ) ; } }

Target:
public void enter ( ) { if ( ( ( mPhone ) != null ) && ( ( mDataServiceManager.getTransportType ( ) ) == ( android.telephony.AccessNetworkConstants.TransportType.WWAN ) ) ) { mPhone.mCi.registerForRilConnected ( getHandler ( ) , DataConnection.EVENT_RIL_CONNECTED , null ) ; } mDataServiceManager.registerForDataCallListChanged ( getHandler ( ) , DataConnection.EVENT_DATA_STATE_CHANGED ) ; if ( ( mNetworkPolicyManager ) != null ) { mNetworkPolicyManager.registerListener ( mListener ) ; } }
Source:
public long getLong ( int tag , long defaultValue ) { switch ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) { case KeymasterDefs.KM_LONG : break ; case KeymasterDefs.KM_LONG_REP : throw new java.lang.IllegalArgumentException ( ( "Repeatable tags must use getLongs: " + tag ) ) ; default : throw new java.lang.IllegalArgumentException ( ( "Tag is not a long type: " + tag ) ) ; } android.security.keymaster.KeymasterArgument arg = getArgumentByTag ( tag ) ; if ( arg == null ) { return defaultValue ; } return ( ( android.security.keymaster.KeymasterLongArgument ) ( arg ) ) . value ; }

Target:
public long getLong ( int tag , long defaultValue ) { switch ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) { case KeymasterDefs.KM_ULONG : break ; case KeymasterDefs.KM_ULONG_REP : throw new java.lang.IllegalArgumentException ( ( "Repeatable tags must use getLongs: " + tag ) ) ; default : throw new java.lang.IllegalArgumentException ( ( "Tag is not a long type: " + tag ) ) ; } android.security.keymaster.KeymasterArgument arg = getArgumentByTag ( tag ) ; if ( arg == null ) { return defaultValue ; } return ( ( android.security.keymaster.KeymasterLongArgument ) ( arg ) ) . value ; }
Source:
private boolean isTelevision ( ) { android.content.Context context = getInstrumentation ( ) . getTargetContext ( ) ; android.content.pm.PackageManager pm = context.getPackageManager ( ) ; return ( pm.hasSystemFeature ( PackageManager.FEATURE_TELEVISION ) ) || ( pm.hasSystemFeature ( PackageManager.FEATURE_LEANBACK ) ) ; }

Target:
private boolean hasGlobalSearchActivity ( ) { android.content.Context context = getInstrumentation ( ) . getTargetContext ( ) ; android.app.SearchManager searchManager = ( ( android.app.SearchManager ) ( context.getSystemService ( Context.SEARCH_SERVICE ) ) ) ; if ( searchManager == null ) { return false ; } try { return ( searchManager.getGlobalSearchActivity ( ) ) != null ; } catch ( java.lang.NullPointerException e ) { return false ; } }
Source:
private void dumpPropertiesToZip ( @ javax.annotation.Nonnull java.util.zip.ZipOutputStream zos , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) { try { java.util.zip.ZipEntry entry = new java.util.zip.ZipEntry ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES ) ; zos.putNextEntry ( entry ) ; libraryProperties.store ( zos , "Library Properties" ) ; } catch ( java.io.IOException e ) { throw new com.android.jill.JillException ( ( ( "Error writing '" + ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES ) ) + "' to output zip" ) , e ) ; } }

Target:
private com.android.sched.vfs.OutputVFS wrapOutputVFS ( @ javax.annotation.Nonnull com.android.sched.vfs.VFS baseVFS ) { try { return new com.android.sched.vfs.GenericOutputVFS ( new com.android.sched.vfs.DeflateFS ( new com.android.sched.vfs.PrefixedFS ( baseVFS , new com.android.sched.vfs.VPath ( "jayce" , '/' ) ) ) ) ; } catch ( com.android.sched.util.file.NotDirectoryException | com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jill.JillException ( e ) ; } }
Source:
public android.telephony.mbms.StreamingService startStreaming ( android.telephony.mbms.StreamingServiceInfo serviceInfo , android.telephony.mbms.IStreamingServiceCallback listener ) { return null ; }

Target:
public android.telephony.mbms.StreamingService startStreaming ( android.telephony.mbms.StreamingServiceInfo serviceInfo , android.telephony.mbms.StreamingServiceCallback listener ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new android.telephony.mbms.MbmsException ( android.telephony.mbms.MbmsException.ERROR_MIDDLEWARE_NOT_BOUND ) ; } try { int returnCode = mService.startStreaming ( mAppName , mSubscriptionId , serviceInfo.getServiceId ( ) , listener ) ; if ( returnCode != ( android.telephony.mbms.MbmsException.SUCCESS ) ) { throw new android.telephony.mbms.MbmsException ( returnCode ) ; } } catch ( android.os.RemoteException e ) { throw new android.telephony.mbms.MbmsException ( android.telephony.mbms.MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } return new android.telephony.mbms.StreamingService ( mAppName , mSubscriptionId , mService , serviceInfo , listener ) ; }
Source:
public void requestNetwork ( android.net.NetworkRequest request , android.net.ConnectivityManager.NetworkCallback networkCallback , int timeoutMs ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( ( "Non-positive timeoutMs: " + timeoutMs ) ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , getDefaultHandler ( ) ) ; }

Target:
private static java.lang.RuntimeException convertServiceException ( android.os.ServiceSpecificException e ) { switch ( e.errorCode ) { case android.net.ConnectivityManager.Errors.TOO_MANY_REQUESTS : return new android.net.ConnectivityManager.TooManyRequestsException ( ) ; default : android.util.Log.w ( android.net.ConnectivityManager.TAG , ( "Unknown service error code " + ( e.errorCode ) ) ) ; return new java.lang.RuntimeException ( e ) ; } }
Source:
public static int getVideoStateFromCallType ( int callType ) { int videostate = android.telecom.VideoProfile.STATE_AUDIO_ONLY ; switch ( callType ) { case com.android.ims.ImsCallProfile.CALL_TYPE_VT_TX : videostate = android.telecom.VideoProfile.STATE_TX_ENABLED ; break ; case com.android.ims.ImsCallProfile.CALL_TYPE_VT_RX : videostate = android.telecom.VideoProfile.STATE_RX_ENABLED ; break ; case com.android.ims.ImsCallProfile.CALL_TYPE_VT : videostate = android.telecom.VideoProfile.STATE_BIDIRECTIONAL ; break ; case com.android.ims.ImsCallProfile.CALL_TYPE_VOICE : videostate = android.telecom.VideoProfile.STATE_AUDIO_ONLY ; break ; default : videostate = android.telecom.VideoProfile.STATE_AUDIO_ONLY ; break ; } return videostate ; }

Target:
public static int getVideoStateFromCallType ( int callType ) { int videostate = android.telecom.VideoProfile.STATE_AUDIO_ONLY ; switch ( callType ) { case android.telephony.ims.ImsCallProfile.CALL_TYPE_VT_TX : videostate = android.telecom.VideoProfile.STATE_TX_ENABLED ; break ; case android.telephony.ims.ImsCallProfile.CALL_TYPE_VT_RX : videostate = android.telecom.VideoProfile.STATE_RX_ENABLED ; break ; case android.telephony.ims.ImsCallProfile.CALL_TYPE_VT : videostate = android.telecom.VideoProfile.STATE_BIDIRECTIONAL ; break ; case android.telephony.ims.ImsCallProfile.CALL_TYPE_VOICE : videostate = android.telecom.VideoProfile.STATE_AUDIO_ONLY ; break ; default : videostate = android.telecom.VideoProfile.STATE_AUDIO_ONLY ; break ; } return videostate ; }
Source:
public void testIsInternalDoesNotMatch ( ) { assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.isInternal ( ) . matches ( new android.content.Intent ( ) ) ) ; android.content.ComponentName externalComponent = new android.content.ComponentName ( "com.google.android" , "com.google.android.SomeClass" ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.isInternal ( ) . matches ( new android.content.Intent ( ) . setComponent ( externalComponent ) ) ) ; }

Target:
public void isInternalDoesNotMatch ( ) { org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.isInternal ( ) . matches ( new android.content.Intent ( ) ) ) ; android.content.ComponentName externalComponent = new android.content.ComponentName ( "com.google.android" , "com.google.android.SomeClass" ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.isInternal ( ) . matches ( new android.content.Intent ( ) . setComponent ( externalComponent ) ) ) ; }
Source:
public void propertyChange ( org.eclipse.core.runtime.Preferences.PropertyChangeEvent event ) { java.lang.String property = event.getProperty ( ) ; if ( PreferenceInitializer.ATTR_LOGCAT_FONT.equals ( property ) ) { try { org.eclipse.swt.graphics.FontData fdat = new org.eclipse.swt.graphics.FontData ( ( ( java.lang.String ) ( event.getNewValue ( ) ) ) ) ; com.android.ide.eclipse.ddms.views.LogCatView.setFont ( new org.eclipse.swt.graphics.Font ( getFieldEditorParent ( ) . getDisplay ( ) , fdat ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } catch ( org.eclipse.swt.SWTError e2 ) { } } }

Target:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { java.lang.String property = event.getProperty ( ) ; if ( PreferenceInitializer.ATTR_LOGCAT_FONT.equals ( property ) ) { try { org.eclipse.swt.graphics.FontData fdat = new org.eclipse.swt.graphics.FontData ( ( ( java.lang.String ) ( event.getNewValue ( ) ) ) ) ; com.android.ide.eclipse.ddms.views.LogCatView.setFont ( new org.eclipse.swt.graphics.Font ( getFieldEditorParent ( ) . getDisplay ( ) , fdat ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } catch ( org.eclipse.swt.SWTError e2 ) { } } }
Source:
private void dumpStreamStates ( java.io.PrintWriter pw ) { pw.println ( "\nStream volumes (device: index)" ) ; int numStreamTypes = android.media.AudioSystem.getNumStreamTypes ( ) ; for ( int i = 0 ; i < numStreamTypes ; i ++ ) { pw.println ( ( ( "- " + ( STREAM_NAMES [ i ] ) ) + ":" ) ) ; mStreamStates [ i ] . dump ( pw ) ; pw.println ( "" ) ; } pw.print ( "\n- mute affected streams = 0x" ) ; pw.println ( java.lang.Integer.toHexString ( mMuteAffectedStreams ) ) ; }

Target:
private void dumpStreamStates ( java.io.PrintWriter pw ) { pw.println ( "\nStream volumes (device: index)" ) ; int numStreamTypes = android.media.AudioSystem.getNumStreamTypes ( ) ; for ( int i = 0 ; i < numStreamTypes ; i ++ ) { pw.println ( ( ( "- " + ( android.media.AudioService.STREAM_NAMES [ i ] ) ) + ":" ) ) ; mStreamStates [ i ] . dump ( pw ) ; pw.println ( "" ) ; } pw.print ( "\n- mute affected streams = 0x" ) ; pw.println ( java.lang.Integer.toHexString ( mMuteAffectedStreams ) ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_foreach s = new com.android.rs.test.ScriptC_foreach ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_root ( A ) ; s.invoke_verify_root ( ) ; s.forEach_foo ( A , A ) ; s.invoke_verify_foo ( ) ; s.invoke_foreach_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_foreach s = new com.android.rs.test.ScriptC_foreach ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_root ( A ) ; s.invoke_verify_root ( ) ; s.forEach_foo ( A , A ) ; s.invoke_verify_foo ( ) ; s.invoke_foreach_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
private static com.android.sched.util.file.Directory createTempDir ( @ javax.annotation.Nonnull com.android.sched.util.RunnableHooks hooks ) { try { java.io.File tmp = com.android.sched.util.file.Files.createTempDir ( ) ; com.android.sched.util.file.Directory dir = new com.android.sched.util.file.Directory ( tmp.getPath ( ) , hooks , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.WRITE , com.android.sched.util.file.FileOrDirectory.ChangePermission.NOCHANGE ) ; hooks.addHook ( new com.android.jack.Options.TempDirDeleter ( dir ) ) ; return dir ; } catch ( java.io.IOException e ) { throw new com.android.jack.JackUserException ( e ) ; } }

Target:
private static com.android.sched.util.file.Directory createTempDir ( @ javax.annotation.Nonnull com.android.sched.util.RunnableHooks hooks ) { try { java.io.File tmp = com.android.sched.util.file.Files.createTempDir ( "jack-" ) ; com.android.sched.util.file.Directory dir = new com.android.sched.util.file.Directory ( tmp.getPath ( ) , hooks , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.WRITE , com.android.sched.util.file.FileOrDirectory.ChangePermission.NOCHANGE ) ; hooks.addHook ( new com.android.jack.Options.TempDirDeleter ( dir ) ) ; return dir ; } catch ( java.io.IOException e ) { throw new com.android.jack.JackUserException ( e ) ; } }
Source:
public com.android.builder.model.Variant getCurrentVariant ( ) { java.util.List < java.lang.String > productFlavorNames = java.util.Arrays.asList ( "free" , "beta" ) ; com.android.builder.model.Variant mock = org.easymock.EasyMock.createNiceMock ( com.android.builder.model.Variant.class ) ; org.easymock.EasyMock.expect ( mock.getProductFlavors ( ) ) . andReturn ( productFlavorNames ) . anyTimes ( ) ; org.easymock.EasyMock.replay ( mock ) ; return mock ; }

Target:
public com.android.builder.model.Variant getCurrentVariant ( ) { java.util.List < java.lang.String > productFlavorNames = java.util.Arrays.asList ( "free" , "beta" ) ; com.android.builder.model.Variant mock = org.mockito.Mockito.mock ( com.android.builder.model.Variant.class ) ; org.mockito.Mockito.when ( mock.getProductFlavors ( ) ) . thenReturn ( productFlavorNames ) ; return mock ; }
Source:
private android.util.Pair < android.net.wifi.WifiScanner.ScanSettings , com.android.server.wifi.WifiNative.ScanSettings > createScanSettingsForHwPno ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 0 , 2400 , 5150 , 5175 ) , 30000 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; com.android.server.wifi.WifiNative.ScanSettings nativeSettings = new com.android.server.wifi.scanner.NativeScanSettingsBuilder ( ) . withBasePeriod ( 30000 ) . withMaxApPerScan ( com.android.server.wifi.scanner.WifiScanningServiceTest.MAX_AP_PER_SCAN ) . withMaxScansToCache ( BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH ) . addBucketWithChannels ( 30000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , 0 , 2400 , 5150 , 5175 ) . build ( ) ; return android.util.Pair.create ( requestSettings , nativeSettings ) ; }

Target:
public void sendBackgroundScanBandRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( WifiScanner.WIFI_BAND_BOTH , 30000 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; com.android.server.wifi.WifiNative.ScanSettings nativeSettings = new com.android.server.wifi.ScanTestUtil.NativeScanSettingsBuilder ( ) . withBasePeriod ( 30000 ) . withMaxApPerScan ( com.android.server.wifi.scanner.WifiScanningServiceTest.MAX_AP_PER_SCAN ) . withMaxScansToCache ( BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH ) . addBucketWithBand ( 30000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , WifiScanner.WIFI_BAND_BOTH ) . build ( ) ; doSuccessfulBackgroundScan ( requestSettings , nativeSettings ) ; org.junit.Assert.assertEquals ( mWifiMetrics.getBackgroundScanCount ( ) , 1 ) ; }
Source:
public static long longAddrFromByteAddr ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( java.util.Arrays.toString ( addr ) ) + " was not a valid MAC address" ) ) ; } long longAddr = 0 ; for ( byte b : addr ) { longAddr = ( longAddr << 8 ) + ( com.android.internal.util.BitUtils.uint8 ( b ) ) ; } return longAddr ; }

Target:
private static long longAddrFromByteAddr ( byte [ ] addr ) { com.android.internal.util.Preconditions.checkNotNull ( addr ) ; if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( java.util.Arrays.toString ( addr ) ) + " was not a valid MAC address" ) ) ; } long longAddr = 0 ; for ( byte b : addr ) { longAddr = ( longAddr << 8 ) + ( com.android.internal.util.BitUtils.uint8 ( b ) ) ; } return longAddr ; }
Source:
public int getLengthOfGeographicalAreaCode ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata metadata = getMetadataForRegion ( getRegionCodeForNumber ( number ) ) ; if ( metadata == null ) { return 0 ; } if ( ( metadata.nationalPrefix.equals ( "" ) ) && ( ! ( number.isItalianLeadingZero ( ) ) ) ) { return 0 ; } if ( ! ( isNumberGeographical ( number ) ) ) { return 0 ; } return getLengthOfNationalDestinationCode ( number ) ; }

Target:
public int getLengthOfGeographicalAreaCode ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegion ( getRegionCodeForNumber ( number ) ) ; if ( metadata == null ) { return 0 ; } if ( ( ! ( metadata.hasNationalPrefix ( ) ) ) && ( ! ( number.isItalianLeadingZero ( ) ) ) ) { return 0 ; } if ( ! ( isNumberGeographical ( number ) ) ) { return 0 ; } return getLengthOfNationalDestinationCode ( number ) ; }
Source:
private java.lang.String format ( double number , com.ibm.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; if ( ( getRoundingMode ( ) ) != ( com.ibm.icu.math.BigDecimal.ROUND_UNNECESSARY ) ) { number = new com.ibm.icu.math.BigDecimal ( java.lang.Double.toString ( number ) ) . setScale ( getMaximumFractionDigits ( ) , roundingMode ) . doubleValue ( ) ; } ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }

Target:
private java.lang.String format ( long number , com.ibm.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; if ( number == ( java.lang.Long.MIN_VALUE ) ) { result.append ( getDecimalFormat ( ) . format ( java.lang.Long.MIN_VALUE ) ) ; } else { ruleSet.format ( number , result , 0 , 0 ) ; } postProcess ( result , ruleSet ) ; return result.toString ( ) ; }
Source:
public void collectManifestDigest ( android.content.pm.PackageParser.Package pkg ) throws android.content.pm.PackageParser.PackageParserException { pkg.manifestDigest = null ; try { final java.util.jar.StrictJarFile jarFile = new java.util.jar.StrictJarFile ( pkg.baseCodePath ) ; try { final java.util.zip.ZipEntry je = jarFile.findEntry ( android.content.pm.PackageParser.ANDROID_MANIFEST_FILENAME ) ; if ( je != null ) { pkg.manifestDigest = android.content.pm.ManifestDigest.fromInputStream ( jarFile.getInputStream ( je ) ) ; } } finally { jarFile.close ( ) ; } } catch ( java.io.IOException | java.lang.RuntimeException e ) { throw new android.content.pm.PackageParser.PackageParserException ( android.content.pm.PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED , "Failed to collect manifest digest" ) ; } }

Target:
public void collectManifestDigest ( android.content.pm.PackageParser.Package pkg ) throws android.content.pm.PackageParser.PackageParserException { pkg.manifestDigest = null ; try { final android.util.jar.StrictJarFile jarFile = new android.util.jar.StrictJarFile ( pkg.baseCodePath ) ; try { final java.util.zip.ZipEntry je = jarFile.findEntry ( android.content.pm.PackageParser.ANDROID_MANIFEST_FILENAME ) ; if ( je != null ) { pkg.manifestDigest = android.content.pm.ManifestDigest.fromInputStream ( jarFile.getInputStream ( je ) ) ; } } finally { jarFile.close ( ) ; } } catch ( java.io.IOException | java.lang.RuntimeException e ) { throw new android.content.pm.PackageParser.PackageParserException ( android.content.pm.PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED , "Failed to collect manifest digest" ) ; } }
Source:
public void test_get_TemporalField ( ) { java.time.Instant test = TEST_12345_123456789 ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) , 123456789 ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.MICRO_OF_SECOND ) , 123456 ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.MILLI_OF_SECOND ) , 123 ) ; }

Target:
public void test_get_TemporalField ( ) { java.time.Instant test = tck.java.time.TCKInstant.TEST_12345_123456789 ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.NANO_OF_SECOND ) , 123456789 ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.MICRO_OF_SECOND ) , 123456 ) ; org.testng.Assert.assertEquals ( test.get ( java.time.temporal.ChronoField.MILLI_OF_SECOND ) , 123 ) ; }
Source:
public final void onConnectionEvent ( java.lang.String connectionId , java.lang.String event , android.os.Bundle extras ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.arg2 = event ; args.arg3 = extras ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_ON_CONNECTION_EVENT , args ) . sendToTarget ( ) ; }

Target:
public final void onConnectionEvent ( java.lang.String connectionId , java.lang.String event , android.os.Bundle extras , android.telecom.Logging.Session.Info sessionInfo ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.arg2 = event ; args.arg3 = extras ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_ON_CONNECTION_EVENT , args ) . sendToTarget ( ) ; }
Source:
public void testCantSetUserRestriction ( ) throws java.lang.Exception { android.host.multiuser.f64cb0 Merge ; }

Target:
public void testCantSetUserRestriction ( ) throws java.lang.Exception { final java.lang.String setRestriction = "pm set-user-restriction no_fun " ; final java.lang.String output = getDevice ( ) . executeShellCommand ( ( setRestriction + "1" ) ) ; assertTrue ( "Trying to set user restriction should fail with SecurityException" , ( ( output.startsWith ( "Error" ) ) && ( output.contains ( "SecurityException" ) ) ) ) ; }
Source:
public void checkValidity ( ) { if ( ! ( ( ( ( ( ( ( parent ) instanceof com.android.jack.ir.ast.JExpression ) || ( ( parent ) instanceof com.android.jack.ir.ast.JNameValuePair ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JAnnotationMethod ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JFieldInitializer ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JReturnStatement ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JSynchronizedBlock ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent" ) ; } }

Target:
public void checkValidity ( ) { if ( ! ( ( ( ( ( ( ( ( parent ) instanceof com.android.jack.ir.ast.JExpression ) || ( ( parent ) instanceof com.android.jack.ir.ast.JNameValuePair ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JAnnotationMethod ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JFieldInitializer ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JReturnStatement ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.cfg.JReturnBlockElement ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JSynchronizedBlock ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent" ) ; } }
Source:
protected void doBuildPatchFile ( java.io.File olderFile , java.io.File newerFile , java.util.zip.ZipOutputStream patchOutput ) throws java.io.IOException { Runner.logger.info ( "building PatchFile" ) ; patchOutput.putNextEntry ( new java.util.zip.ZipEntry ( myPath ) ) ; if ( ! ( newerFile.isDirectory ( ) ) ) { writeExecutableFlag ( patchOutput , newerFile ) ; com.intellij.updater.Utils.copyFileToStream ( newerFile , patchOutput ) ; } patchOutput.closeEntry ( ) ; }

Target:
protected void doBuildPatchFile ( java.io.File toFile , com.intellij.updater.MultiZipFile.OutputStream patchOutput ) throws java.io.IOException { Runner.logger.info ( "building PatchFile" ) ; patchOutput.putNextEntry ( myPath ) ; if ( ! ( toFile.isDirectory ( ) ) ) { writeExecutableFlag ( patchOutput , toFile ) ; com.intellij.updater.Utils.copyFileToStream ( toFile , patchOutput ) ; } patchOutput.closeEntry ( ) ; }
Source:
public void destroy ( ) { destroy ( mBitmapProvider ) ; }

Target:
public void destroy ( ) { if ( ( mBitmapProvider ) == null ) { throw new java.lang.IllegalStateException ( "BitmapProvider must be non-null" ) ; } android.graphics.Bitmap bitmapToReleaseA ; android.graphics.Bitmap bitmapToReleaseB = null ; synchronized ( mLock ) { checkDestroyedLocked ( ) ; bitmapToReleaseA = mFrontBitmap ; mFrontBitmap = null ; if ( ( mState ) != ( android.support.rastermill.FrameSequenceDrawable.STATE_DECODING ) ) { bitmapToReleaseB = mBackBitmap ; mBackBitmap = null ; } mDestroyed = true ; } mBitmapProvider.releaseBitmap ( bitmapToReleaseA ) ; if ( bitmapToReleaseB != null ) { mBitmapProvider.releaseBitmap ( bitmapToReleaseB ) ; } }
Source:
public boolean logIn ( java.lang.String message ) { com.google.gdt.eclipse.login.common.GoogleLoginState state = createGoogleLoginState ( ) ; boolean loggedIn = state.logIn ( message ) ; com.google.gct.login.IGoogleLoginUpdateUser callback = new com.google.gct.login.IGoogleLoginUpdateUser ( ) { @ java.lang.Override public void updateUser ( ) { uiFacade.notifyStatusIndicator ( ) ; } } ; if ( loggedIn ) { users.addUser ( new com.google.gct.login.CredentialedUser ( state , callback ) ) ; } return loggedIn ; }

Target:
public void logIn ( final java.lang.String message ) { final com.google.gdt.eclipse.login.common.GoogleLoginState state = createGoogleLoginState ( ) ; com.intellij.openapi.application.ApplicationManager.getApplication ( ) . executeOnPooledThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { boolean loggedIn = state.logInWithLocalServer ( message ) ; if ( loggedIn ) { com.google.gct.login.IGoogleLoginUpdateUser callback = new com.google.gct.login.IGoogleLoginUpdateUser ( ) { @ java.lang.Override public void updateUser ( ) { uiFacade.notifyStatusIndicator ( ) ; } } ; users.addUser ( new com.google.gct.login.CredentialedUser ( state , callback ) ) ; } } } ) ; }
Source:
public freemarker.template.TemplateModel exec ( java.util.List args ) throws freemarker.template.TemplateModelException { if ( ( args.size ( ) ) != 1 ) { throw new freemarker.template.TemplateModelException ( "Wrong arguments" ) ; } java.lang.String string = args.get ( 0 ) . toString ( ) ; return new freemarker.template.SimpleScalar ( com.android.ide.common.resources.ValueResourceParser.escapeResourceString ( string ) ) ; }

Target:
public freemarker.template.TemplateModel exec ( java.util.List args ) throws freemarker.template.TemplateModelException { if ( ( args.size ( ) ) != 1 ) { throw new freemarker.template.TemplateModelException ( "Wrong arguments" ) ; } java.lang.String string = args.get ( 0 ) . toString ( ) ; return new freemarker.template.SimpleScalar ( com.android.ide.common.res2.ValueXmlHelper.escapeResourceString ( string ) ) ; }
Source:
public boolean clearBlacklist ( ) { return doBooleanCommand ( "BLACKLIST clear" ) ; }

Target:
public java.lang.String getMacAddress ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.getMacAddress ( ) ; } else { java.lang.String ret = doStringCommand ( "DRIVER MACADDR" ) ; if ( ! ( android.text.TextUtils.isEmpty ( ret ) ) ) { java.lang.String [ ] tokens = ret.split ( " = " ) ; if ( ( tokens.length ) == 2 ) return tokens [ 1 ] ; } return null ; } }
Source:
private ApkVerifier.Result verify ( java.lang.String apkFilenameInResources , java.lang.Integer minSdkVersionOverride ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException , java.security.NoSuchAlgorithmException { byte [ ] apkBytes = com.android.apksig.internal.util.Resources.toByteArray ( getClass ( ) , apkFilenameInResources ) ; com.android.apksig.ApkVerifier.Builder builder = new com.android.apksig.ApkVerifier.Builder ( com.android.apksig.util.DataSources.asDataSource ( java.nio.ByteBuffer.wrap ( apkBytes ) ) ) ; if ( minSdkVersionOverride != null ) { builder.setMinCheckedPlatformVersion ( minSdkVersionOverride ) ; } return builder.build ( ) . verify ( ) ; }

Target:
private ApkVerifier.Result verify ( java.lang.String apkFilenameInResources , java.lang.Integer minSdkVersionOverride , java.lang.Integer maxSdkVersionOverride ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException , java.security.NoSuchAlgorithmException { byte [ ] apkBytes = com.android.apksig.internal.util.Resources.toByteArray ( getClass ( ) , apkFilenameInResources ) ; com.android.apksig.ApkVerifier.Builder builder = new com.android.apksig.ApkVerifier.Builder ( com.android.apksig.util.DataSources.asDataSource ( java.nio.ByteBuffer.wrap ( apkBytes ) ) ) ; if ( minSdkVersionOverride != null ) { builder.setMinCheckedPlatformVersion ( minSdkVersionOverride ) ; } if ( maxSdkVersionOverride != null ) { builder.setMaxCheckedPlatformVersion ( maxSdkVersionOverride ) ; } return builder.build ( ) . verify ( ) ; }
Source:
private static void loadShortNumberMetadataFromFile ( java.lang.String regionCode ) { java.lang.String fileName = ( ( com.google.i18n.phonenumbers.MetadataManager.SHORT_NUMBER_METADATA_FILE_PREFIX ) + "_" ) + regionCode ; java.io.InputStream source = com.google.i18n.phonenumbers.MetadataManager.class . getResourceAsStream ( fileName ) ; if ( source == null ) { throw new java.lang.IllegalStateException ( ( "missing metadata: " + fileName ) ) ; } com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection shortNumberMetadata = com.google.i18n.phonenumbers.MetadataManager.loadMetadataAndCloseInput ( source ) ; for ( com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata : shortNumberMetadata.getMetadataList ( ) ) { com.google.i18n.phonenumbers.MetadataManager.regionCodeToShortNumberMetadataMap.put ( regionCode , metadata ) ; } }

Target:
static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata getShortNumberMetadataForRegion ( java.lang.String regionCode ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.shortNumberMetadataRegionCodes.contains ( regionCode ) ) ) { return null ; } return com.google.i18n.phonenumbers.MetadataManager.getMetadataFromMultiFilePrefix ( regionCode , com.google.i18n.phonenumbers.MetadataManager.shortNumberMetadataMap , com.google.i18n.phonenumbers.MetadataManager.SHORT_NUMBER_METADATA_FILE_PREFIX , com.google.i18n.phonenumbers.MetadataManager.DEFAULT_METADATA_LOADER ) ; }
Source:
public void test_with_adjustment_OffsetTime ( ) { java.time.OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with ( java.time.OffsetTime.of ( java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2008 , 6 , 30 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; }

Target:
public void test_with_adjustment_OffsetTime ( ) { java.time.OffsetDateTime test = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.with ( java.time.OffsetTime.of ( java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2008 , 6 , 30 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PTWO ) ) ; }
Source:
public boolean isVolteAvailable ( ) { try { return getITelephony ( ) . isVolteAvailable ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
public boolean isDataCapable ( ) { boolean retVal = false ; try { int subId = getSubId ( android.telephony.SubscriptionManager.getDefaultDataSubscriptionId ( ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.isDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }
Source:
public void run ( ) { android.os.Looper.prepare ( ) ; android.os.Process.setThreadPriority ( android.os.Process.THREAD_PRIORITY_FOREGROUND ) ; com.android.server.am.ActivityManagerService m = new com.android.server.am.ActivityManagerService ( ) ; synchronized ( this ) { mService = m ; notifyAll ( ) ; } synchronized ( this ) { while ( ! ( mReady ) ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { } } } android.os.Looper.loop ( ) ; }

Target:
public void run ( ) { android.os.Looper.prepare ( ) ; android.os.Process.setThreadPriority ( android.os.Process.THREAD_PRIORITY_FOREGROUND ) ; android.os.Process.setCanSelfBackground ( false ) ; com.android.server.am.ActivityManagerService m = new com.android.server.am.ActivityManagerService ( ) ; synchronized ( this ) { mService = m ; notifyAll ( ) ; } synchronized ( this ) { while ( ! ( mReady ) ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { } } } android.os.Looper.loop ( ) ; }
Source:
public final void scheduleServiceArgs ( android.os.IBinder token , boolean taskRemoved , int startId , int flags , android.content.Intent args ) { android.app.ActivityThread.ServiceArgsData s = new android.app.ActivityThread.ServiceArgsData ( ) ; s.token = token ; s.taskRemoved = taskRemoved ; s.startId = startId ; s.flags = flags ; s.args = args ; queueOrSendMessage ( android.app.ActivityThread.H.SERVICE_ARGS , s ) ; }

Target:
public final void scheduleServiceArgs ( android.os.IBinder token , boolean taskRemoved , int startId , int flags , android.content.Intent args ) { android.app.ActivityThread.ServiceArgsData s = new android.app.ActivityThread.ServiceArgsData ( ) ; s.token = token ; s.taskRemoved = taskRemoved ; s.startId = startId ; s.flags = flags ; s.args = args ; sendMessage ( android.app.ActivityThread.H.SERVICE_ARGS , s ) ; }
Source:
public void test_setPositivePrefixLjava_lang_String ( ) { java.text.DecimalFormat format = new java.text.DecimalFormat ( ) ; assertEquals ( "" , format.getPositivePrefix ( ) ) ; }

Target:
public void test_setNegativeSuffixLjava_lang_String ( ) throws java.lang.Exception { java.text.DecimalFormat format = new java.text.DecimalFormat ( ) ; assertEquals ( "" , format.getNegativeSuffix ( ) ) ; format.setNegativeSuffix ( "NegSfx" ) ; assertEquals ( "NegSfx" , format.getNegativeSuffix ( ) ) ; assertTrue ( ( ( format.parse ( "123.45NegPfx" ) . doubleValue ( ) ) == 123.45 ) ) ; format.setNegativeSuffix ( "" ) ; assertEquals ( "" , format.getNegativeSuffix ( ) ) ; format.setNegativeSuffix ( null ) ; assertNull ( format.getNegativeSuffix ( ) ) ; }
Source:
public void testGetTxPacketCounters ( ) throws java.lang.Exception { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.getTxPacketCounters ( ) ) . thenReturn ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT , mWifiNative.getTxPacketCounters ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . getTxPacketCounters ( ) ; }

Target:
public void testGetTxPacketCounters ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mWificondControl.getTxPacketCounters ( ) ) . thenReturn ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT , mWifiNative.getTxPacketCounters ( ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . getTxPacketCounters ( ) ; }
Source:
public void testVector ( ) { android.renderscript.cts.ScriptC_vector s = new android.renderscript.cts.ScriptC_vector ( mRS ) ; if ( ! ( initializeVector ( s ) ) ) { fail ( "Failed to init vector components" ) ; } else { s.invoke_vector_test ( ) ; mRS.finish ( ) ; waitForMessage ( ) ; } checkForErrors ( ) ; }

Target:
public void testVector ( ) { android.renderscript.cts.ScriptC_vector s = new android.renderscript.cts.ScriptC_vector ( mRS ) ; if ( ! ( initializeVector ( s ) ) ) { fail ( "Failed to init vector components" ) ; } else { s.invoke_vector_test ( ) ; mRS.finish ( ) ; waitForMessage ( ) ; } checkForErrors ( ) ; s.destroy ( ) ; }
Source:
public void selectionChanged ( org.eclipse.ui.IWorkbenchPart part , org.eclipse.jface.viewers.ISelection selection ) { if ( getEditor ( ) . isEditorPageActive ( ) ) { mCheckOutlineAdapter = true ; } }

Target:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; getEditor ( ) . getSite ( ) . getSelectionProvider ( ) . setSelection ( selection ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager manager = mGraphicalEditor.getCanvasControl ( ) . getSelectionManager ( ) ; manager.setSelection ( selection ) ; }
Source:
public void testAesCbcHmacSha512Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesGcm96Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.AEAD_KEY , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }