auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , int peerId , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( role , mSessionId , peerId , token ) ; } }

Target:
public java.lang.String createNetworkSpecifier ( @ android.net.wifi.nan.WifiNanManager.DataPathRole int role , int peerId , @ android.annotation.Nullable byte [ ] token ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called on terminated session" ) ; return null ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "createNetworkSpecifier: called post GC on WifiNanManager" ) ; return null ; } return mgr.createNetworkSpecifier ( role , mSessionId , peerId , token ) ; } }
Source:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . onFeatureRemoved ( ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . removeImsFeatureStatusCallback ( mTestCallback ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getFeatures ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( features.get ( ImsFeature.MMTEL ) ) ; }

Target:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMmTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.FEATURE_MMTEL , mTestCallback ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMmTelFeature ) . onFeatureRemoved ( ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMmTelFeature ) . removeImsFeatureStatusCallback ( mTestCallback ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getFeatures ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( features.get ( ImsFeature.FEATURE_MMTEL ) ) ; }
Source:
private android.net.wifi.WifiConfiguration getInternalConfiguredNetwork ( android.net.wifi.WifiConfiguration config ) { android.net.wifi.WifiConfiguration internalConfig = mConfiguredNetworks.getForCurrentUser ( config.networkId ) ; if ( internalConfig != null ) { return internalConfig ; } internalConfig = mConfiguredNetworks.getByConfigKeyForCurrentUser ( config.configKey ( ) ) ; if ( internalConfig == null ) { android.util.Log.e ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( ( ( "Cannot find network with networkId " + ( config.networkId ) ) + " or configKey " ) + ( config.configKey ( ) ) ) ) ; } return internalConfig ; }

Target:
private android.net.wifi.WifiConfiguration getInternalConfiguredNetwork ( android.net.wifi.WifiConfiguration config ) { android.net.wifi.WifiConfiguration internalConfig = mConfiguredNetworks.getForCurrentUser ( config.networkId ) ; if ( internalConfig != null ) { return internalConfig ; } internalConfig = mConfiguredNetworks.getByConfigKeyForCurrentUser ( config.configKey ( ) ) ; if ( internalConfig == null ) { android.util.Log.e ( com.android.server.wifi.WifiConfigManager.TAG , ( ( ( "Cannot find network with networkId " + ( config.networkId ) ) + " or configKey " ) + ( config.configKey ( ) ) ) ) ; } return internalConfig ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; }

Target:
public void testPhoneStateListenerInvokedOnIncomingCall ( ) throws java.lang.Exception { if ( ! ( mShouldTestTelecom ) ) { return ; } setupConnectionService ( null , ( ( FLAG_REGISTER ) | ( FLAG_ENABLE ) ) ) ; addAndVerifyNewIncomingCall ( createTestNumber ( ) , null ) ; verifyConnectionForIncomingCall ( ) ; verifyPhoneStateListenerCallbacksForCall ( TelephonyManager.CALL_STATE_RINGING ) ; }
Source:
public void testBindBuffer ( ) { com.android.ide.eclipse.gldebugger.GLEnum arg1 = com.android.ide.eclipse.gldebugger.GLEnum.GL_ELEMENT_ARRAY_BUFFER ; int arg2 = 10 ; com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg = constructGLMessage ( null , Function.glBindBuffer , createEnumDataType ( arg1.value ) , createIntegerDataType ( arg2 ) ) ; java.lang.String expected = java.lang.String.format ( "glBindBuffer(target = %s, buffer = %s)" , arg1.toString ( ) , java.lang.Integer.toString ( arg2 ) ) ; java.lang.String actual = com.android.ide.eclipse.gltrace.format.GLMessageFormatterTest.sGLMessageFormatter.formatGLMessage ( msg ) ; assertEquals ( expected , actual ) ; }

Target:
public void testBindBuffer ( ) { com.android.ide.eclipse.gltrace.GLEnum arg1 = com.android.ide.eclipse.gltrace.GLEnum.GL_ELEMENT_ARRAY_BUFFER ; int arg2 = 10 ; com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg = constructGLMessage ( null , Function.glBindBuffer , createEnumDataType ( arg1.value ) , createIntegerDataType ( arg2 ) ) ; java.lang.String expected = java.lang.String.format ( "glBindBuffer(target = %s, buffer = %s)" , arg1.toString ( ) , java.lang.Integer.toString ( arg2 ) ) ; java.lang.String actual = com.android.ide.eclipse.gltrace.format.GLMessageFormatterTest.sGLMessageFormatter.formatGLMessage ( msg ) ; assertEquals ( expected , actual ) ; }
Source:
private static libcore.io.MemoryMappedFile mapData ( ) { try { java.lang.String path = ( java.lang.System.getenv ( "ANDROID_ROOT" ) ) + "/usr/share/zoneinfo/tzdata" ; return libcore.io.MemoryMappedFile.mmapRO ( path ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } }

Target:
private static libcore.io.MemoryMappedFile mapData ( ) { libcore.io.MemoryMappedFile result = libcore.util.ZoneInfoDB.mapData ( ( ( java.lang.System.getenv ( "ANDROID_DATA" ) ) + "/misc/zoneinfo/" ) ) ; if ( result == null ) { result = libcore.util.ZoneInfoDB.mapData ( ( ( java.lang.System.getenv ( "ANDROID_ROOT" ) ) + "/usr/share/zoneinfo/" ) ) ; if ( result == null ) { throw new java.lang.AssertionError ( "Couldn't find any tzdata!" ) ; } } return result ; }
Source:
public void execute ( org.gradle.nativeplatform.internal.StaticLibraryBinarySpecInternal binary ) { binary.setBuildable ( false ) ; }

Target:
public void apply ( org.gradle.api.Project project ) { this . project = project ; project.getPluginManager ( ) . apply ( com.android.build.gradle.model.AndroidComponentModelPlugin.class ) ; project.getPluginManager ( ) . apply ( org.gradle.language.c.plugins.CPlugin.class ) ; project.getPluginManager ( ) . apply ( org.gradle.language.cpp.plugins.CppPlugin.class ) ; }
Source:
public void testNotifyResponseUnknown ( ) throws org.json.JSONException { final int invalidTransactionId = 99999 ; final short transactionId = 46 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_SUCCESS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , invalidTransactionId ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testNotifyResponseUnknown ( ) throws org.json.JSONException { final int invalidTransactionId = 99999 ; final short transactionId = 46 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiAwareNative.AWARE_STATUS_SUCCESS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , invalidTransactionId ) ; com.android.server.wifi.aware.WifiAwareHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
protected com.intellij.updater.ValidationResult doValidate ( java.io.File toFile ) { com.intellij.updater.ValidationResult result = doValidateAccess ( toFile , ValidationResult.Action.CREATE ) ; if ( result != null ) return result ; if ( toFile.exists ( ) ) { return new com.intellij.updater.ValidationResult ( ValidationResult.Kind.CONFLICT , myPath , ValidationResult.Action.CREATE , ValidationResult.ALREADY_EXISTS_MESSAGE , ValidationResult.Option.REPLACE , ValidationResult.Option.KEEP ) ; } return null ; }

Target:
protected com.intellij.updater.ValidationResult doValidate ( java.io.File toFile ) { com.intellij.updater.ValidationResult result = doValidateAccess ( toFile , ValidationResult.Action.CREATE ) ; if ( result != null ) return result ; if ( toFile.exists ( ) ) { com.intellij.updater.ValidationResult [ ] options = ( myPatch.isStrict ( ) ) ? new com.intellij.updater.ValidationResult.Option [ ] { ValidationResult.Option.REPLACE } : new com.intellij.updater.ValidationResult.Option [ ] { ValidationResult.Option.REPLACE , ValidationResult.Option.KEEP } ; return new com.intellij.updater.ValidationResult ( ValidationResult.Kind.CONFLICT , myPath , ValidationResult.Action.CREATE , ValidationResult.ALREADY_EXISTS_MESSAGE , options ) ; } return null ; }
Source:
synchronized int getAudioState ( ) { com.android.internal.util.IState state = getCurrentState ( ) ; if ( state == ( mAudioConnecting ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; } else if ( ( state == ( mAudioDisconnecting ) ) || ( state == ( mAudioOn ) ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ; } else { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ; } }

Target:
int getAudioStateInt ( ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ; }
Source:
public void pushProgramToDevice ( java.lang.String programName , java.lang.String testLocation ) { assert ! ( isHost ) ; if ( ! ( programPushed ) ) { executeCommand ( ( ( ( ( getExecutionPrefixWithAdb ( "push" ) ) + programName ) + " " ) + testLocation ) , false ) ; programPushed = true ; } }

Target:
public void cleanCodeCache ( dexfuzz.executors.Architecture architecture , java.lang.String testLocation , java.lang.String programName ) { java.lang.String command = ( ( ( getExecutionPrefixWithAdb ( "shell" ) ) + "rm -f " ) + ( getCacheLocation ( architecture ) ) ) + ( getOatFileName ( testLocation , programName ) ) ; executeCommand ( command , false ) ; }
Source:
public void onDeselected ( ) { if ( ( com.android.tv.menu.BaseCardView.isAttachedToWindow ( ) ) && ( ( com.android.tv.menu.BaseCardView.getVisibility ( ) ) == ( android.view.View.VISIBLE ) ) ) { startFocusAnimation ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_0F ) ; } else { cancelFocusAnimationIfAny ( ) ; setFocusAnimatedValue ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_0F ) ; } }

Target:
public void onDeselected ( ) { mSelected = false ; if ( ( com.android.tv.menu.BaseCardView.isAttachedToWindow ( ) ) && ( ( com.android.tv.menu.BaseCardView.getVisibility ( ) ) == ( android.view.View.VISIBLE ) ) ) { startFocusAnimation ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_0F ) ; } else { cancelFocusAnimationIfAny ( ) ; setFocusAnimatedValue ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_0F ) ; } }
Source:
public void testCreateAllocations_USAGE_IO_INPUT ( ) { int usage = android.renderscript.Allocation.USAGE_IO_INPUT ; int numAlloc = ( MAX_NUM_IO_ALLOC ) + 1 ; android.renderscript.Allocation [ ] allocArray ; try { allocArray = createAllocationsHelper ( usage , ( ( MAX_NUM_IO_ALLOC ) + 1 ) ) ; fail ( "should throw RSIllegalArgumentException" ) ; } catch ( android.renderscript.RSIllegalArgumentException e ) { } numAlloc = 10 ; allocArray = createAllocationsHelper ( usage , numAlloc ) ; assertTrue ( "failed to create AllocationQueue" , ( allocArray != null ) ) ; }

Target:
public void testCreateAllocations_USAGE_IO_INPUT ( ) { int usage = android.renderscript.Allocation.USAGE_IO_INPUT ; int numAlloc = ( MAX_NUM_IO_ALLOC ) + 1 ; android.renderscript.Allocation [ ] allocArray ; try { allocArray = createAllocationsHelper ( usage , ( ( MAX_NUM_IO_ALLOC ) + 1 ) ) ; fail ( "should throw RSIllegalArgumentException" ) ; } catch ( android.renderscript.RSIllegalArgumentException e ) { } numAlloc = 10 ; allocArray = createAllocationsHelper ( usage , numAlloc ) ; assertTrue ( "failed to create AllocationQueue" , ( allocArray != null ) ) ; for ( android.renderscript.Allocation a : allocArray ) { a.destroy ( ) ; } }
Source:
public void testIntersectionType005 ( ) throws java.lang.Exception { try { new com.android.jack.test.helper.RuntimeTestHelper ( INTERSECTION_TYPE_005 ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.LAMBDA_TO_ANONYMOUS_CONVERTER.getName ( ) , java.lang.Boolean.TRUE.toString ( ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackCliToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.LegacyToolchain.class ) . compileAndRunTest ( ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } }

Target:
public void testIntersectionType005 ( ) throws java.lang.Exception { try { new com.android.jack.test.helper.RuntimeTestHelper ( INTERSECTION_TYPE_005 ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.LAMBDA_TO_ANONYMOUS_CONVERTER.getName ( ) , java.lang.Boolean.TRUE.toString ( ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackCliToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.LegacyBasedToolchain.class ) . compileAndRunTest ( ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } }
Source:
public void testNoResidualPermissionsOnUninstall ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part1" ) ; assertNull ( getDevice ( ) . uninstallPackage ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG ) ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part2" ) ; }

Target:
public void testNoResidualPermissionsOnUninstall ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part1" ) ; assertNull ( getDevice ( ) . uninstallPackage ( android.appsecurity.cts.PermissionsHostTest.PKG ) ) ; assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testNoResidualPermissionsOnUninstall_part2" ) ; }
Source:
private void cleanStore ( ) { for ( java.io.File dir : new java.io.File [ ] { org.conscrypt.TrustedCertificateStoreTest.DIR_SYSTEM , org.conscrypt.TrustedCertificateStoreTest.DIR_ADDED , org.conscrypt.TrustedCertificateStoreTest.DIR_DELETED , org.conscrypt.TrustedCertificateStoreTest.DIR_TEST } ) { java.io.File [ ] files = dir.listFiles ( ) ; if ( files == null ) { continue ; } for ( java.io.File file : files ) { assertTrue ( file.delete ( ) ) ; } } store = null ; }

Target:
private void cleanStore ( ) { for ( java.io.File dir : new java.io.File [ ] { org.conscrypt.TrustedCertificateStoreTest.DIR_SYSTEM , org.conscrypt.TrustedCertificateStoreTest.DIR_ADDED , org.conscrypt.TrustedCertificateStoreTest.DIR_DELETED , org.conscrypt.TrustedCertificateStoreTest.DIR_TEST } ) { java.io.File [ ] files = dir.listFiles ( ) ; if ( files == null ) { continue ; } for ( java.io.File file : files ) { assertTrue ( ( "Should delete " + ( file.getPath ( ) ) ) , file.delete ( ) ) ; } } store = null ; }
Source:
public boolean overlayHorizontalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }

Target:
public void setVerticalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setVerticalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setVerticalScrollbarOverlay ( overlay ) ; }
Source:
private static byte [ ] readFully ( java.io.File file ) throws java.io.IOException { java.io.ByteArrayOutputStream result = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buf = new byte [ 65536 ] ; int chunkSize ; try ( java.io.FileInputStream in = new java.io.FileInputStream ( file ) ) { while ( ( chunkSize = in.read ( buf ) ) != ( - 1 ) ) { result.write ( buf , 0 , chunkSize ) ; } } return result.toByteArray ( ) ; }

Target:
private static byte [ ] readFully ( java.io.File file ) throws java.io.IOException { java.io.ByteArrayOutputStream result = new java.io.ByteArrayOutputStream ( ) ; try ( java.io.FileInputStream in = new java.io.FileInputStream ( file ) ) { com.android.apksigner.ApkSignerTool.drain ( in , result ) ; } return result.toByteArray ( ) ; }
Source:
final void put ( long [ ] src , int srcOffset , int longCount ) { int byteCount = checkPutBounds ( SizeOf.LONG , src.length , srcOffset , longCount ) ; this . block.pokeLongArray ( ( ( offset ) + ( position ) ) , src , srcOffset , longCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( long [ ] src , int srcOffset , int longCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.LONG , src.length , srcOffset , longCount ) ; this . block.pokeLongArray ( ( ( offset ) + ( position ) ) , src , srcOffset , longCount , order.needsSwap ) ; position += byteCount ; }
Source:
private void clear ( ) { synchronized ( mLock ) { mConnectionEventList.clear ( ) ; if ( ( mCurrentConnectionEvent ) != null ) { mConnectionEventList.add ( mCurrentConnectionEvent ) ; } mScanReturnEntries.clear ( ) ; mWifiSystemStateEntries.clear ( ) ; mRecordStartTimeSec = ( mClock.getElapsedSinceBootMillis ( ) ) / 1000 ; mRssiPollCounts.clear ( ) ; mWifiAlertReasonCounts.clear ( ) ; mWifiLogProto.clear ( ) ; } }

Target:
private void clear ( ) { synchronized ( mLock ) { mConnectionEventList.clear ( ) ; if ( ( mCurrentConnectionEvent ) != null ) { mConnectionEventList.add ( mCurrentConnectionEvent ) ; } mScanReturnEntries.clear ( ) ; mWifiSystemStateEntries.clear ( ) ; mRecordStartTimeSec = ( mClock.getElapsedSinceBootMillis ( ) ) / 1000 ; mRssiPollCounts.clear ( ) ; mWifiAlertReasonCounts.clear ( ) ; mWifiScoreCounts.clear ( ) ; mWifiLogProto.clear ( ) ; } }
Source:
public void systemRunning ( ) { registerForTelephonyIntents ( ) ; registerForAlarms ( ) ; registerForConnectivityIntents ( ) ; android.os.HandlerThread thread = new android.os.HandlerThread ( com.android.server.NetworkTimeUpdateService.TAG ) ; thread.start ( ) ; mHandler = new com.android.server.NetworkTimeUpdateService.MyHandler ( thread.getLooper ( ) ) ; mHandler.obtainMessage ( com.android.server.NetworkTimeUpdateService.EVENT_POLL_NETWORK_TIME ) . sendToTarget ( ) ; mSettingsObserver = new com.android.server.NetworkTimeUpdateService.SettingsObserver ( mHandler , com.android.server.NetworkTimeUpdateService.EVENT_AUTO_TIME_CHANGED ) ; mSettingsObserver.observe ( mContext ) ; }

Target:
public void systemRunning ( ) { registerForTelephonyIntents ( ) ; registerForAlarms ( ) ; android.os.HandlerThread thread = new android.os.HandlerThread ( com.android.server.NetworkTimeUpdateService.TAG ) ; thread.start ( ) ; mHandler = new com.android.server.NetworkTimeUpdateService.MyHandler ( thread.getLooper ( ) ) ; mNetworkTimeUpdateCallback = new com.android.server.NetworkTimeUpdateService.NetworkTimeUpdateCallback ( ) ; mCM.registerDefaultNetworkCallback ( mNetworkTimeUpdateCallback , mHandler ) ; mSettingsObserver = new com.android.server.NetworkTimeUpdateService.SettingsObserver ( mHandler , com.android.server.NetworkTimeUpdateService.EVENT_AUTO_TIME_CHANGED ) ; mSettingsObserver.observe ( mContext ) ; }
Source:
public void registerForImsiReady ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mImsiReadyRegistrants.add ( r ) ; if ( ( mImsi ) != null ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }

Target:
public java.lang.String getIMSI ( ) { if ( ( mCarrierTestOverride.isInTestMode ( ) ) && ( ( mFakeImsi ) != null ) ) { return mFakeImsi ; } else { return mImsi ; } }
Source:
private void updateAlwaysOnNotification ( android.net.NetworkInfo.DetailedState networkState ) { final boolean visible = ( mAlwaysOn ) && ( networkState != ( android.net.NetworkInfo.DetailedState.CONNECTED ) ) ; updateAlwaysOnNotificationInternal ( visible ) ; }

Target:
private void loadAlwaysOnPackage ( ) { final long token = android.os.Binder.clearCallingIdentity ( ) ; try { final java.lang.String alwaysOnPackage = mSystemServices.settingsSecureGetStringForUser ( Settings.Secure.ALWAYS_ON_VPN_APP , mUserHandle ) ; final boolean alwaysOnLockdown = ( mSystemServices.settingsSecureGetIntForUser ( Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN , 0 , mUserHandle ) ) != 0 ; setAlwaysOnPackageInternal ( alwaysOnPackage , alwaysOnLockdown ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }
Source:
public void testNewInstanceString_ByteArrayCharsetConstructor ( ) { runTestNewInstanceString ( "([BLjava/nio/charset/Charset;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value charsetValue = getStaticFieldValue ( debuggeeClassId , "CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( charsetValue ) ; } } ) ; }

Target:
public void testNewInstanceString_ByteArrayArgConstructor ( ) { runTestNewInstanceString ( "([B)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; constructorArguments.add ( byteArrayValue ) ; } } ) ; }
Source:
public void run ( ) { com.android.ddmlib.HandleThread.mThreadStatusReqRunning = true ; try { com.android.ddmlib.HandleThread.sendTHST ( client ) ; } catch ( java.io.IOException ioe ) { com.android.ddmlib.Log.d ( "ddms" , ( ( ( "Unable to request thread updates from " + client ) + ": " ) + ( ioe.getMessage ( ) ) ) ) ; } finally { com.android.ddmlib.HandleThread.mThreadStatusReqRunning = false ; } }

Target:
public void run ( ) { com.android.ddmlib.HandleThread.sThreadStatusReqRunning = true ; try { com.android.ddmlib.HandleThread.sendTHST ( client ) ; } catch ( java.io.IOException ioe ) { com.android.ddmlib.Log.d ( "ddms" , ( ( ( "Unable to request thread updates from " + client ) + ": " ) + ( ioe.getMessage ( ) ) ) ) ; } finally { com.android.ddmlib.HandleThread.sThreadStatusReqRunning = false ; } }
Source:
private android.net.Uri insertVideo ( ) throws java.io.IOException { java.io.File file = new java.io.File ( android.os.Environment.getExternalStorageDirectory ( ) , "testVideo.3gp" ) ; mResolver.delete ( Media.EXTERNAL_CONTENT_URI , "_data=?" , new java.lang.String [ ] { file.getAbsolutePath ( ) } ) ; file.delete ( ) ; mFileHelper.copyToExternalStorage ( R.raw.testvideo , file ) ; android.content.ContentValues values = new android.content.ContentValues ( ) ; values.put ( VideoColumns.DATA , file.getAbsolutePath ( ) ) ; return mResolver.insert ( Media.EXTERNAL_CONTENT_URI , values ) ; }

Target:
private android.net.Uri insertVideo ( ) throws java.io.IOException { java.io.File file = new java.io.File ( android.os.Environment.getExternalStorageDirectory ( ) , "testVideo.3gp" ) ; mResolver.delete ( Media.EXTERNAL_CONTENT_URI , "_data=?" , new java.lang.String [ ] { file.getAbsolutePath ( ) } ) ; file.delete ( ) ; mFileHelper.copyToExternalStorage ( R.raw.testthumbvideo , file ) ; android.content.ContentValues values = new android.content.ContentValues ( ) ; values.put ( VideoColumns.DATA , file.getAbsolutePath ( ) ) ; return mResolver.insert ( Media.EXTERNAL_CONTENT_URI , values ) ; }
Source:
private static void deleteFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath vpath ) throws com.android.jack.experimental.incremental.IncrementalException { try { assert ( com.android.jack.experimental.incremental.JackIncremental.incrementalOutputLibrary ) != null ; com.android.jack.experimental.incremental.JackIncremental.incrementalOutputLibrary.getFile ( fileType , vpath ) ; com.android.jack.experimental.incremental.JackIncremental.incrementalOutputLibrary.delete ( fileType , vpath ) ; } catch ( com.android.jack.library.FileTypeDoesNotExistException e ) { } catch ( com.android.sched.util.file.DeleteException e ) { throw new com.android.jack.experimental.incremental.IncrementalException ( e ) ; } }

Target:
private static void deleteFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath vpath ) throws com.android.jack.experimental.incremental.IncrementalException { try { assert ( com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary ) != null ; com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary.getFile ( fileType , vpath ) ; com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary.delete ( fileType , vpath ) ; } catch ( com.android.jack.library.FileTypeDoesNotExistException e ) { } catch ( com.android.sched.util.file.CannotDeleteFileException e ) { throw new com.android.jack.experimental.incremental.IncrementalException ( e ) ; } }
Source:
public static void attachJvmtiAgent ( @ android.annotation.NonNull java.lang.String library , @ android.annotation.Nullable java.lang.String options ) throws java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( library ) ; com.android.internal.util.Preconditions.checkArgument ( ( ! ( library.contains ( "=" ) ) ) ) ; if ( options == null ) { dalvik.system.VMDebug.attachAgent ( library ) ; } else { dalvik.system.VMDebug.attachAgent ( ( ( library + "=" ) + options ) ) ; } }

Target:
public static void attachJvmtiAgent ( @ android.annotation.NonNull java.lang.String library , @ android.annotation.Nullable java.lang.String options , @ android.annotation.Nullable java.lang.ClassLoader classLoader ) throws java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( library ) ; com.android.internal.util.Preconditions.checkArgument ( ( ! ( library.contains ( "=" ) ) ) ) ; if ( options == null ) { dalvik.system.VMDebug.attachAgent ( library , classLoader ) ; } else { dalvik.system.VMDebug.attachAgent ( ( ( library + "=" ) + options ) , classLoader ) ; } }
Source:
public int getPriority ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getPriority: " + ( device.getAddress ( ) ) ) ) ; } int priority = Settings.Global.getInt ( getContentResolver ( ) , Settings.Global.getBluetoothHidHostPriorityKey ( device.getAddress ( ) ) , BluetoothProfile.PRIORITY_UNDEFINED ) ; return priority ; }

Target:
public int getPriority ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidHostService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , ( "getPriority: " + ( device.getAddress ( ) ) ) ) ; } int priority = Settings.Global.getInt ( getContentResolver ( ) , Settings.Global.getBluetoothHidHostPriorityKey ( device.getAddress ( ) ) , BluetoothProfile.PRIORITY_UNDEFINED ) ; return priority ; }
Source:
public void test_checkedListSerializationCompatability ( ) throws java.lang.Exception { java.util.List < java.lang.String > c = new java.util.LinkedList < java.lang.String > ( ) ; assertFalse ( ( c instanceof java.util.RandomAccess ) ) ; c = java.util.Collections.checkedList ( c , java.lang.String.class ) ; tests.util.SerializationTester.assertCompabilityEquals ( c , "serialization/java/util/Collections_CheckedList.golden.ser" ) ; }

Target:
public void test_checkedListSerializationCompatability ( ) throws java.lang.Exception { java.util.List < java.lang.String > c = new java.util.LinkedList < java.lang.String > ( ) ; assertFalse ( ( c instanceof java.util.RandomAccess ) ) ; c = java.util.Collections.checkedList ( c , java.lang.String.class ) ; tests.util.SerializationTester.assertCompabilityEquals ( c , "serialization/tests/api/java/util/Collections_CheckedList.golden.ser" ) ; }
Source:
public void revert ( java.util.List < com.intellij.updater.PatchAction > actions , final java.io.File backupDir , final java.io.File toDir , com.intellij.updater.UpdaterUI ui ) throws com.intellij.updater.OperationCancelledException , java.io.IOException { java.util.Collections.reverse ( actions ) ; com.intellij.updater.Patch.forEach ( actions , "Reverting..." , ui , false , new com.intellij.updater.Patch.ActionsProcessor ( ) { @ java.lang.Override public void forEach ( com.intellij.updater.PatchAction each ) throws java.io.IOException { each.revert ( toDir , backupDir ) ; } } ) ; }

Target:
public void revert ( java.util.List < com.intellij.updater.PatchAction > actions , final java.io.File backupDir , final java.io.File rootDir , com.intellij.updater.UpdaterUI ui ) throws com.intellij.updater.OperationCancelledException , java.io.IOException { java.util.Collections.reverse ( actions ) ; final java.io.File toDir = toBaseDir ( rootDir ) ; com.intellij.updater.Patch.forEach ( actions , "Reverting..." , ui , false , new com.intellij.updater.Patch.ActionsProcessor ( ) { @ java.lang.Override public void forEach ( com.intellij.updater.PatchAction each ) throws java.io.IOException { each.revert ( toDir , backupDir ) ; } } ) ; }
Source:
synchronized boolean isHearingAidPlaying ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hearingaid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.hearingaid.HearingAidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hearingaid.HearingAidService.TAG , ( ( "isHearingAidPlaying(" + device ) + ")" ) ) ; } throw new java.lang.IllegalStateException ( "Implement me" ) ; }

Target:
java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hearingaid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { java.util.List < android.bluetooth.BluetoothDevice > devices = new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; for ( com.android.bluetooth.hearingaid.HearingAidStateMachine sm : mStateMachines.values ( ) ) { if ( sm.isConnected ( ) ) { devices.add ( sm.getDevice ( ) ) ; } } return devices ; } }
Source:
public void run ( ) { final com.intellij.util.indexing.ProgressIndicator indicator = com.intellij.util.indexing.ProgressManager.getInstance ( ) . getProgressIndicator ( ) ; indicator.setText ( "" ) ; int count = 0 ; while ( true ) { com.intellij.util.indexing.FileBasedIndexImpl.InvalidationTask task = myFutureInvalidations.poll ( ) ; if ( task == null ) { break ; } indicator.setFraction ( ( ( ( double ) ( count ++ ) ) / size ) ) ; task.run ( ) ; } }

Target:
public void run ( ) { final com.intellij.openapi.progress.ProgressIndicator indicator = com.intellij.openapi.progress.ProgressManager.getInstance ( ) . getProgressIndicator ( ) ; indicator.setText ( "" ) ; int count = 0 ; while ( true ) { com.intellij.util.indexing.FileBasedIndexImpl.InvalidationTask task = myFutureInvalidations.poll ( ) ; if ( task == null ) { break ; } indicator.setFraction ( ( ( ( double ) ( count ++ ) ) / size ) ) ; task.run ( ) ; } }
Source:
private static int translateHalStatusToAwareSessionCallbackTerminate ( int halStatus ) { switch ( halStatus ) { case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_TIMEOUT : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_USER_REQUEST : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_COUNT_REACHED : return android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE ; case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_INVALID : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_FAILURE : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_DE_SHUTDOWN : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_DISABLE_IN_PROGRESS : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_POST_DISC_ATTR_EXPIRED : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_POST_DISC_LEN_EXCEEDED : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_FURTHER_AVAIL_MAP_EMPTY : return android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ; } return android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ; }

Target:
private static void onPublishTerminated ( int publishId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onPublishTerminated: publishId=" + publishId ) + ", status=" ) + status ) ) ; com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) . onSessionTerminatedNotification ( publishId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ) , true ) ; }
Source:
public java.util.Map < ? extends java.lang.Enum , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > apply ( java.lang.Class < ? extends java.lang.Enum > clazz ) { return createNodesFor ( clazz ) ; }

Target:
private static java.util.Map < ? extends java.lang.Enum , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > getOrCreateNodes ( java.lang.Class < ? extends java.lang.Enum > clazz ) { java.util.Map < ? extends java.lang.Enum , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > existing = com.google.common.util.concurrent.CycleDetectingLockFactory.lockGraphNodesPerType.get ( clazz ) ; if ( existing != null ) { return existing ; } java.util.Map < ? extends java.lang.Enum , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > created = com.google.common.util.concurrent.CycleDetectingLockFactory.createNodes ( clazz ) ; existing = com.google.common.util.concurrent.CycleDetectingLockFactory.lockGraphNodesPerType.putIfAbsent ( clazz , created ) ; return com.google.common.base.MoreObjects.firstNonNull ( existing , created ) ; }
Source:
public final void testRectRectangle ( ) { org.eclipse.swt.graphics.Rectangle r = new org.eclipse.swt.graphics.Rectangle ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r2 = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( r ) ; assertEquals ( 3 , r2.x ) ; assertEquals ( 4 , r2.y ) ; assertEquals ( 20 , r2.w ) ; assertEquals ( 30 , r2.h ) ; }

Target:
public final void testRectRectangle ( ) { org.eclipse.swt.graphics.Rectangle r = new org.eclipse.swt.graphics.Rectangle ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Rect r2 = new com.android.ide.common.api.Rect ( r ) ; assertEquals ( 3 , r2.x ) ; assertEquals ( 4 , r2.y ) ; assertEquals ( 20 , r2.w ) ; assertEquals ( 30 , r2.h ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { return mDir.equals ( obj ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( obj instanceof java.io.File ) { return mDir.equals ( obj ) ; } else if ( obj instanceof com.android.sdklib.repository.local.LocalDirInfo ) { return mDir.equals ( ( ( com.android.sdklib.repository.local.LocalDirInfo ) ( obj ) ) . mDir ) ; } else if ( obj instanceof com.android.sdklib.repository.local.LocalDirInfo.MapComparator ) { return mDir.equals ( ( ( com.android.sdklib.repository.local.LocalDirInfo.MapComparator ) ( obj ) ) . mDir ) ; } return false ; }
Source:
private void testSinglePathSet ( java.lang.String setName , java.lang.String referencePath , java.util.Set < java.io.File > pathSet ) { assertEquals ( 1 , pathSet.size ( ) ) ; assertEquals ( ( ( ( ( ( projectName ) + ": " ) + ( configName ) ) + "/" ) + setName ) , new java.io.File ( projectDir , referencePath ) . getAbsolutePath ( ) , pathSet.iterator ( ) . next ( ) . getAbsolutePath ( ) ) ; }

Target:
private void testSinglePathCollection ( @ com.android.annotations.NonNull java.lang.String setName , @ com.android.annotations.NonNull java.lang.String referencePath , @ com.android.annotations.NonNull java.util.Collection < java.io.File > pathSet ) { assertEquals ( 1 , pathSet.size ( ) ) ; assertEquals ( ( ( ( ( ( projectName ) + ": " ) + ( configName ) ) + "/" ) + setName ) , new java.io.File ( projectDir , referencePath ) . getAbsolutePath ( ) , pathSet.iterator ( ) . next ( ) . getAbsolutePath ( ) ) ; }
Source:
public int getVoiceMessageCount ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; int voicemailCount = ( r != null ) ? r.getVoiceMessageCount ( ) : 0 ; if ( voicemailCount == 0 ) { android.content.SharedPreferences sp = android.preference.PreferenceManager.getDefaultSharedPreferences ( getContext ( ) ) ; voicemailCount = sp.getInt ( com.android.internal.telephony.cdma.CDMAPhone.VM_COUNT_CDMA , 0 ) ; } return voicemailCount ; }

Target:
public int getVoiceMessageCount ( ) { com.android.internal.telephony.uicc.IccRecords r = mIccRecords.get ( ) ; int voicemailCount = ( r != null ) ? r.getVoiceMessageCount ( ) : 0 ; if ( voicemailCount == 0 ) { android.content.SharedPreferences sp = android.preference.PreferenceManager.getDefaultSharedPreferences ( getContext ( ) ) ; voicemailCount = sp.getInt ( com.android.internal.telephony.cdma.CDMAPhone.VM_COUNT_CDMA , 0 ) ; } return voicemailCount ; }
Source:
public static org.w3c.dom.Document parseDocumentSilently ( @ com.android.annotations.NonNull java.lang.String xml , boolean namespaceAware ) { javax.xml.parsers.DocumentBuilderFactory factory = javax.xml.parsers.DocumentBuilderFactory.newInstance ( ) ; org.xml.sax.InputSource is = new org.xml.sax.InputSource ( new java.io.StringReader ( xml ) ) ; factory.setNamespaceAware ( namespaceAware ) ; factory.setValidating ( false ) ; try { javax.xml.parsers.DocumentBuilder builder = factory.newDocumentBuilder ( ) ; return builder.parse ( is ) ; } catch ( java.lang.Exception e ) { } return null ; }

Target:
public static org.w3c.dom.Document parseDocumentSilently ( @ com.android.annotations.NonNull java.lang.String xml , boolean namespaceAware ) { try { return com.android.utils.XmlUtils.parseDocument ( xml , namespaceAware ) ; } catch ( java.lang.Exception e ) { } return null ; }
Source:
public void setDataActivationState ( int subId , int activationState ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { phone.setDataActivationState ( activationState ) ; } else { com.android.phone.PhoneInterfaceManager.loge ( ( "setVoiceActivationState fails with invalid subId: " + subId ) ) ; } }

Target:
public void setDataActivationState ( int subId , int activationState ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , subId , "setDataActivationState" ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { phone.setDataActivationState ( activationState ) ; } else { com.android.phone.PhoneInterfaceManager.loge ( ( "setVoiceActivationState fails with invalid subId: " + subId ) ) ; } }
Source:
private void enableDSASignatureNonceHardeningIfApplicable ( ) { switch ( engineType ) { case DSA : org.conscrypt.NativeCrypto.set_DSA_flag_nonce_from_hash ( key.getPkeyContext ( ) ) ; break ; case EC : org.conscrypt.NativeCrypto.EC_KEY_set_nonce_from_hash ( key.getPkeyContext ( ) , true ) ; break ; default : } }

Target:
private void enableDSASignatureNonceHardeningIfApplicable ( ) { final org.conscrypt.OpenSSLKey key = this . key ; switch ( engineType ) { case DSA : org.conscrypt.NativeCrypto.set_DSA_flag_nonce_from_hash ( key.getPkeyContext ( ) ) ; break ; case EC : org.conscrypt.NativeCrypto.EC_KEY_set_nonce_from_hash ( key.getPkeyContext ( ) , true ) ; break ; default : } }
Source:
public static void genRandomDoubles ( long seed , float min , float max , double [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = min + ( ( r.nextFloat ( ) ) * ( max - min ) ) ; } }

Target:
public static void genRandomDoubles ( long seed , double min , double max , double [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = min + ( ( r.nextDouble ( ) ) * ( max - min ) ) ; } }
Source:
public static boolean isXmlFile ( @ com.android.annotations.NonNull java.io.File file ) { java.lang.String string = file.getName ( ) ; return string.regionMatches ( true , ( ( string.length ( ) ) - ( com.android.SdkConstants.DOT_XML.length ( ) ) ) , com.android.SdkConstants.DOT_XML , 0 , com.android.SdkConstants.DOT_XML.length ( ) ) ; }

Target:
public static boolean isXmlFile ( @ com.android.annotations.NonNull java.io.File file ) { return com.android.utils.SdkUtils.endsWithIgnoreCase ( file.getPath ( ) , com.android.SdkConstants.DOT_XML ) ; }
Source:
void onRemovedFromCallList ( ) { videoTechManager.dispatchRemovedFromCallList ( ) ; }

Target:
void onRemovedFromCallList ( ) { com.android.dialer.common.LogUtil.enterBlock ( "DialerCall.onRemovedFromCallList" ) ; videoTechManager.dispatchRemovedFromCallList ( ) ; if ( ( rttTranscript ) != null ) { com.google.common.util.concurrent.Futures.addCallback ( com.android.dialer.rtt.RttTranscriptUtil.saveRttTranscript ( context , rttTranscript ) , new com.android.dialer.common.concurrent.DefaultFutureCallback ( ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; rttTranscript = null ; } }
Source:
static java.util.Properties getProperties ( java.io.File file ) throws java.io.IOException { java.util.Properties properties = new java.util.Properties ( ) ; java.io.FileReader reader = new java.io.FileReader ( file ) ; properties.load ( reader ) ; com.google.common.io.Closeables.close ( reader , true ) ; return properties ; }

Target:
static java.util.Properties getProperties ( java.io.File file ) throws java.io.IOException { java.util.Properties properties = new java.util.Properties ( ) ; java.io.InputStreamReader reader = new java.io.InputStreamReader ( new java.io.BufferedInputStream ( new java.io.FileInputStream ( file ) ) , com.google.common.base.Charsets.UTF_8 ) ; properties.load ( reader ) ; com.google.common.io.Closeables.close ( reader , true ) ; return properties ; }
Source:
public java.lang.Void doInBackground ( java.io.ByteArrayOutputStream ... args ) { final java.io.ByteArrayOutputStream buffer = args [ 0 ] ; java.io.FileOutputStream fileOutput = null ; try { synchronized ( mWriteLock ) { fileOutput = mAtomicFile.startWrite ( ) ; buffer.writeTo ( fileOutput ) ; mAtomicFile.finishWrite ( fileOutput ) ; } } catch ( java.io.IOException e ) { com.android.server.telecom.Log.e ( this , e , "Writing state to XML file" ) ; mAtomicFile.failWrite ( fileOutput ) ; } return null ; }

Target:
public java.lang.Void doInBackground ( java.io.ByteArrayOutputStream ... args ) { final java.io.ByteArrayOutputStream buffer = args [ 0 ] ; java.io.FileOutputStream fileOutput = null ; try { synchronized ( mWriteLock ) { fileOutput = mAtomicFile.startWrite ( ) ; buffer.writeTo ( fileOutput ) ; mAtomicFile.finishWrite ( fileOutput ) ; } } catch ( java.io.IOException e ) { android.telecom.Log.e ( this , e , "Writing state to XML file" ) ; mAtomicFile.failWrite ( fileOutput ) ; } return null ; }
Source:
public void goBackOrForward ( final int steps ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { goBackOrForward ( steps ) ; } } ) ; return ; } mAwContents.goBackOrForward ( steps ) ; }

Target:
public boolean canGoBackOrForward ( final int steps ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return canGoBackOrForward ( steps ) ; } } ) ; return ret ; } return mAwContents.canGoBackOrForward ( steps ) ; }
Source:
public void deletePhoto ( int appWidgetId ) { try { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; java.lang.String whereClause = java.lang.String.format ( "%s=%d" , com.cooliris.media.PhotoAppWidgetProvider.PhotoDatabaseHelper.FIELD_APPWIDGET_ID , appWidgetId ) ; db.delete ( com.cooliris.media.PhotoAppWidgetProvider.PhotoDatabaseHelper.TABLE_PHOTOS , whereClause , null ) ; } catch ( android.database.sqlite.SQLiteException e ) { android.util.Log.e ( com.cooliris.media.PhotoAppWidgetProvider.TAG , "Could not delete photo from database" , e ) ; } }

Target:
public void deletePhoto ( int appWidgetId ) { try { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; java.lang.String [ ] selectionArgs = new java.lang.String [ ] { java.lang.String.valueOf ( appWidgetId ) } ; db.delete ( com.cooliris.media.PhotoAppWidgetProvider.PhotoDatabaseHelper.TABLE_PHOTOS , ( ( com.cooliris.media.PhotoAppWidgetProvider.PhotoDatabaseHelper.FIELD_APPWIDGET_ID ) + "=?" ) , selectionArgs ) ; } catch ( android.database.sqlite.SQLiteException e ) { android.util.Log.e ( com.cooliris.media.PhotoAppWidgetProvider.TAG , "Could not delete photo from database" , e ) ; } }