auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "buddhist" , "buddhist" , "buddhist" , "gregorian" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }

Target:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }
Source:
private void writeObject ( java.io.ObjectOutputStream stream ) throws java.io.IOException { stream.defaultWriteObject ( ) ; stream.writeInt ( mappingsCount ) ; java.util.Iterator < java.util.Map.Entry < K , V > > iterator = entrySet ( ) . iterator ( ) ; while ( iterator.hasNext ( ) ) { java.util.Map.Entry < K , V > entry = iterator.next ( ) ; stream.writeObject ( entry.getKey ( ) ) ; stream.writeObject ( entry.getValue ( ) ) ; } }

Target:
private void writeObject ( java.io.ObjectOutputStream stream ) throws java.io.IOException { stream.defaultWriteObject ( ) ; stream.writeInt ( mappingsCount ) ; for ( java.util.Map.Entry < K , V > entry : entrySet ( ) ) { stream.writeObject ( entry.getKey ( ) ) ; stream.writeObject ( entry.getValue ( ) ) ; } }
Source:
boolean checkAppSwitchAllowedLocked ( int callingPid , int callingUid , java.lang.String name ) { if ( ( mAppSwitchesAllowedTime ) < ( android.os.SystemClock.uptimeMillis ( ) ) ) { return true ; } final int perm = checkComponentPermission ( android.Manifest.permission.STOP_APP_SWITCHES , callingPid , callingUid , ( - 1 ) ) ; if ( perm == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } android.util.Log.w ( com.android.server.am.ActivityManagerService.TAG , ( ( ( name + " request from " ) + callingUid ) + " stopped" ) ) ; return false ; }

Target:
boolean checkAppSwitchAllowedLocked ( int callingPid , int callingUid , java.lang.String name ) { if ( ( mAppSwitchesAllowedTime ) < ( android.os.SystemClock.uptimeMillis ( ) ) ) { return true ; } final int perm = checkComponentPermission ( android.Manifest.permission.STOP_APP_SWITCHES , callingPid , callingUid , ( - 1 ) ) ; if ( perm == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , ( ( ( name + " request from " ) + callingUid ) + " stopped" ) ) ; return false ; }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi/icon" , "drawable/icon2" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/android:colorForegroundInverse" , "attr/blah" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi/icon" , "drawable/icon2" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }
Source:
public final void init ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { initialized = false ; javax.crypto.Cipher.checkOpmode ( opmode ) ; if ( ( spi ) != null ) { spi.engineInit ( opmode , key , params , random ) ; } else { chooseProvider ( javax.crypto.Cipher.InitType.ALGORITHM_PARAMS , opmode , key , null , params , random ) ; } initialized = true ; this . opmode = opmode ; }

Target:
public final void init ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { initialized = false ; javax.crypto.Cipher.checkOpmode ( opmode ) ; chooseProvider ( javax.crypto.Cipher.InitType.ALGORITHM_PARAMS , opmode , key , null , params , random ) ; initialized = true ; this . opmode = opmode ; }
Source:
private void replaceInParent ( java.util.TreeMap.Node < K , V > node , java.util.TreeMap.Node < K , V > replacement ) { java.util.TreeMap.Node < K , V > parent = node.parent ; node.parent = null ; if ( replacement != null ) { replacement.parent = parent ; } if ( parent != null ) { if ( ( parent.left ) == node ) { parent.left = replacement ; } else { assert ( parent.right ) == node ; parent.right = replacement ; } } else { root = replacement ; } }

Target:
private void replaceInParent ( java.util.TreeMap.Node < K , V > node , java.util.TreeMap.Node < K , V > replacement ) { java.util.TreeMap.Node < K , V > parent = node.parent ; node.parent = null ; if ( replacement != null ) { replacement.parent = parent ; } if ( parent != null ) { if ( ( parent.left ) == node ) { parent.left = replacement ; } else { parent.right = replacement ; } } else { root = replacement ; } }
Source:
public void onReceivedLoginRequest ( android.webkit.WebView view , java.lang.String realm , java.lang.String account , java.lang.String args ) { super . onReceivedLoginRequest ( view , realm , account , args ) ; mOnReceivedLoginRequest = true ; mOnReceivedLoginRealm = realm ; mOnReceivedLoginAccount = account ; mOnReceivedLoginArgs = args ; BRANCH ( 2537.0F ) ; android.webkit.cts.f Fix ; assertion ( bug ) ; }

Target:
public void onReceivedLoginRequest ( android.webkit.WebView view , java.lang.String realm , java.lang.String account , java.lang.String args ) { super . onReceivedLoginRequest ( view , realm , account , args ) ; mOnReceivedLoginRequest = true ; mOnReceivedLoginRealm = realm ; mOnReceivedLoginAccount = account ; mOnReceivedLoginArgs = args ; }
Source:
public static android.telephony.SmsMessage.SubmitPdu getSubmitPdu ( java.lang.String scAddress , java.lang.String destinationAddress , java.lang.String message , boolean statusReportRequested ) { com.android.internal.telephony.SmsMessageBase.SubmitPduBase spb ; if ( android.telephony.SmsMessage.useCdmaFormatForMoSms ( ) ) { spb = com.android.internal.telephony.cdma.SmsMessage.getSubmitPdu ( scAddress , destinationAddress , message , statusReportRequested , null ) ; } else { spb = com.android.internal.telephony.gsm.SmsMessage.getSubmitPdu ( scAddress , destinationAddress , message , statusReportRequested ) ; } return new android.telephony.SmsMessage.SubmitPdu ( spb ) ; }

Target:
public static android.telephony.SmsMessage.SubmitPdu getSubmitPdu ( java.lang.String scAddress , java.lang.String destinationAddress , java.lang.String message , boolean statusReportRequested , int subId ) { com.android.internal.telephony.SmsMessageBase.SubmitPduBase spb ; if ( android.telephony.SmsMessage.useCdmaFormatForMoSms ( subId ) ) { spb = com.android.internal.telephony.cdma.SmsMessage.getSubmitPdu ( scAddress , destinationAddress , message , statusReportRequested , null ) ; } else { spb = com.android.internal.telephony.gsm.SmsMessage.getSubmitPdu ( scAddress , destinationAddress , message , statusReportRequested ) ; } return new android.telephony.SmsMessage.SubmitPdu ( spb ) ; }
Source:
public void recommendation_noScans_returnsCurrentConfig ( ) throws java.lang.Exception { android.net.wifi.ScanResult [ ] scanResults = new android.net.wifi.ScanResult [ 0 ] ; android.net.wifi.WifiConfiguration expectedConfig = new android.net.wifi.WifiConfiguration ( ) ; android.net.RecommendationRequest request = new android.net.RecommendationRequest.Builder ( ) . setScanResults ( scanResults ) . setNetworkCapabilities ( new android.net.NetworkCapabilities ( ) . removeCapability ( NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ) . setCurrentRecommendedWifiConfig ( expectedConfig ) . build ( ) ; android.net.RecommendationResult result = verifyAndCaptureResult ( mProvider , request ) ; org.junit.Assert.assertEquals ( request.getCurrentSelectedConfig ( ) , result.getWifiConfiguration ( ) ) ; }

Target:
public void recommendation_noScans_returnsCurrentConfig ( ) throws java.lang.Exception { android.net.wifi.ScanResult [ ] scanResults = new android.net.wifi.ScanResult [ 0 ] ; android.net.wifi.WifiConfiguration expectedConfig = new android.net.wifi.WifiConfiguration ( ) ; android.net.RecommendationRequest request = new android.net.RecommendationRequest.Builder ( ) . setScanResults ( scanResults ) . setNetworkCapabilities ( new android.net.NetworkCapabilities ( ) . removeCapability ( NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ) . setCurrentRecommendedWifiConfig ( expectedConfig ) . build ( ) ; android.net.RecommendationResult result = verifyAndCaptureResult ( request ) ; org.junit.Assert.assertEquals ( request.getCurrentSelectedConfig ( ) , result.getWifiConfiguration ( ) ) ; }
Source:
private void helpDestroy ( ) { boolean shouldDestroy = false ; synchronized ( this ) { if ( ! ( mDestroyed ) ) { shouldDestroy = true ; mDestroyed = true ; } } if ( shouldDestroy ) { java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock ( ) ; rlock.lock ( ) ; if ( mRS.isAlive ( ) ) { mRS.nObjDestroy ( mID ) ; } rlock.unlock ( ) ; mRS = null ; mID = 0 ; } }

Target:
private void helpDestroy ( ) { boolean shouldDestroy = false ; synchronized ( this ) { if ( ! ( mDestroyed ) ) { shouldDestroy = true ; mDestroyed = true ; } } if ( shouldDestroy ) { java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock ( ) ; rlock.lock ( ) ; if ( ( mRS.isAlive ( ) ) && ( ( mID ) != 0 ) ) { mRS.nObjDestroy ( mID ) ; } rlock.unlock ( ) ; mRS = null ; mID = 0 ; } }
Source:
private void writeEmptyBlock ( ) throws java.io.IOException { sourceInfoWriter.writeDebugBegin ( currentClass , currentLine ) ; writer.writeCatchBlockIds ( currentCatchList ) ; writer.writeKeyword ( Token.BLOCK ) ; writer.writeOpen ( ) ; writer.writeOpenNodeList ( ) ; writer.writeCloseNodeList ( ) ; sourceInfoWriter.writeDebugEnd ( currentClass , ( ( currentLine ) + 1 ) ) ; writer.writeClose ( ) ; }

Target:
private void writeEmptyBlock ( ) throws java.io.IOException { writeDebugBegin ( currentClass , currentLine ) ; writer.writeCatchBlockIds ( currentCatchList ) ; writer.writeKeyword ( Token.BLOCK ) ; writer.writeOpen ( ) ; writer.writeOpenNodeList ( ) ; writer.writeCloseNodeList ( ) ; writeDebugEnd ( currentClass , currentLine ) ; writer.writeClose ( ) ; }
Source:
public void update ( ) { log ( ( "update sub = " + ( mPhone.getSubId ( ) ) ) ) ; log ( "update(): Active DDS, register for all events now!" ) ; onUpdateIcc ( ) ; mDataEnabledSettings.setUserDataEnabled ( getDataEnabled ( ) ) ; mAutoAttachOnCreation.set ( false ) ; ( ( com.android.internal.telephony.GsmCdmaPhone ) ( mPhone ) ) . updateCurrentCarrierInProvider ( ) ; }

Target:
public void update ( ) { log ( ( "update sub = " + ( mPhone.getSubId ( ) ) ) ) ; log ( "update(): Active DDS, register for all events now!" ) ; onUpdateIcc ( ) ; mAutoAttachOnCreation.set ( false ) ; ( ( com.android.internal.telephony.GsmCdmaPhone ) ( mPhone ) ) . updateCurrentCarrierInProvider ( ) ; }
Source:
public static void $opt$noinline$testOsrInlineLoop ( java.lang.String [ ] args ) { if ( Main.doThrow ) throw new java.lang.Error ( ) ; Main.assertIntEquals ( 12 , Main.$opt$inline$testRemoveSuspendCheck ( 12 , 5 ) ) ; Main.ensureHasProfilingInfo ( "$opt$noinline$testOsrInlineLoop" ) ; Main.ensureHasOsrCode ( "$opt$noinline$testOsrInlineLoop" ) ; }

Target:
public static void $opt$noinline$testOsrInlineLoop ( java.lang.String [ ] args ) { Main.assertIntEquals ( 12 , Main.$opt$inline$testRemoveSuspendCheck ( 12 , 5 ) ) ; Main.ensureHasProfilingInfo ( "$opt$noinline$testOsrInlineLoop" ) ; Main.ensureHasOsrCode ( "$opt$noinline$testOsrInlineLoop" ) ; }
Source:
public void testGetLine1Number ( ) throws java.lang.Exception { int subId = 58374 ; java.lang.String line1Number = "9482752023479" ; makeAccountsVisibleToAllUsers ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_CURRENT ) ; org.mockito.Mockito.when ( mFakePhoneAccountRegistrar.getSubscriptionIdForPhoneAccount ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_CURRENT ) ) . thenReturn ( subId ) ; android.telephony.TelephonyManager mockTelephonyManager = ( ( android.telephony.TelephonyManager ) ( mContext.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; org.mockito.Mockito.when ( mockTelephonyManager.getLine1Number ( subId ) ) . thenReturn ( line1Number ) ; assertEquals ( line1Number , mTSIBinder.getLine1Number ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_CURRENT , com.android.server.telecom.tests.TelecomServiceImplTest.DEFAULT_DIALER_PACKAGE ) ) ; }

Target:
public void testGetLine1Number ( ) throws java.lang.Exception { int subId = 58374 ; java.lang.String line1Number = "9482752023479" ; makeAccountsVisibleToAllUsers ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_CURRENT ) ; org.mockito.Mockito.when ( mFakePhoneAccountRegistrar.getSubscriptionIdForPhoneAccount ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_CURRENT ) ) . thenReturn ( subId ) ; android.telephony.TelephonyManager mockTelephonyManager = ( ( android.telephony.TelephonyManager ) ( mContext.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; org.mockito.Mockito.when ( mockTelephonyManager.getLine1Number ( subId ) ) . thenReturn ( line1Number ) ; org.junit.Assert.assertEquals ( line1Number , mTSIBinder.getLine1Number ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_CURRENT , com.android.server.telecom.tests.TelecomServiceImplTest.DEFAULT_DIALER_PACKAGE ) ) ; }
Source:
public void testHandleUserSwitchAfterBootupBeforeLegacyStoreMigration ( ) throws java.lang.Exception { int user2 = ( com.android.server.wifi.WifiConfigManagerTest.TEST_DEFAULT_USER ) + 1 ; when ( mUserManager.isUserUnlockingOrUnlocked ( user2 ) ) . thenReturn ( false ) ; mWifiConfigManager.handleUserSwitch ( user2 ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . switchUserStoreAndRead ( any ( WifiConfigStore.StoreFile.class ) ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . write ( anyBoolean ( ) , any ( com.android.server.wifi.WifiConfigStoreData.class ) ) ; }

Target:
public void testHandleUserSwitchAfterBootupBeforeLegacyStoreMigration ( ) throws java.lang.Exception { int user2 = ( com.android.server.wifi.WifiConfigManagerTest.TEST_DEFAULT_USER ) + 1 ; when ( mUserManager.isUserUnlockingOrUnlocked ( user2 ) ) . thenReturn ( false ) ; mWifiConfigManager.handleUserSwitch ( user2 ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . switchUserStoreAndRead ( any ( WifiConfigStore.StoreFile.class ) ) ; mContextConfigStoreMockOrder.verify ( mWifiConfigStore , never ( ) ) . write ( anyBoolean ( ) ) ; }
Source:
private static void addPackageLoaderForLibrary ( com.android.jack.ir.ast.JSession session , com.android.sched.util.config.ReflectFactory < com.android.jack.jayce.JaycePackageLoader > factory , com.android.jack.library.InputJackLibrary inputJackLibrary ) { if ( inputJackLibrary.containsFileType ( FileType.JAYCE ) ) { com.android.jack.jayce.JaycePackageLoader rootPLoader = factory.create ( inputJackLibrary , session.getPhantomLookup ( ) ) ; session.getTopLevelPackage ( ) . addLoader ( rootPLoader ) ; } }

Target:
private static void addPackageLoaderForLibrary ( com.android.jack.ir.ast.JSession session , com.android.sched.util.config.ReflectFactory < com.android.jack.jayce.JaycePackageLoader > factory , com.android.jack.library.InputJackLibrary inputJackLibrary ) { if ( inputJackLibrary.containsFileType ( FileType.JAYCE ) ) { com.android.jack.jayce.JaycePackageLoader rootPLoader = factory.create ( inputJackLibrary , session ) ; session.getTopLevelPackage ( ) . addLoader ( rootPLoader ) ; } }
Source:
public com.android.ims.ImsMultiEndpoint getMultiEndpointInterface ( int serviceId ) throws com.android.ims.ImsException { if ( ( ( mMultiEndpoint ) == null ) || ( ! ( mImsServiceProxy.isBinderAlive ( ) ) ) ) { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsMultiEndpoint iImsMultiEndpoint = mImsServiceProxy.getMultiEndpointInterface ( serviceId ) ; if ( iImsMultiEndpoint == null ) { throw new com.android.ims.ImsException ( "getMultiEndpointInterface()" , ImsReasonInfo.CODE_MULTIENDPOINT_NOT_SUPPORTED ) ; } mMultiEndpoint = new com.android.ims.ImsMultiEndpoint ( iImsMultiEndpoint ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getMultiEndpointInterface()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } } return mMultiEndpoint ; }

Target:
public com.android.ims.ImsMultiEndpoint getMultiEndpointInterface ( int serviceId ) throws com.android.ims.ImsException { if ( ( ( mMultiEndpoint ) == null ) || ( ! ( mImsServiceProxy.isBinderAlive ( ) ) ) ) { checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsMultiEndpoint iImsMultiEndpoint = mImsServiceProxy.getMultiEndpointInterface ( ) ; if ( iImsMultiEndpoint == null ) { throw new com.android.ims.ImsException ( "getMultiEndpointInterface()" , ImsReasonInfo.CODE_MULTIENDPOINT_NOT_SUPPORTED ) ; } mMultiEndpoint = new com.android.ims.ImsMultiEndpoint ( iImsMultiEndpoint ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getMultiEndpointInterface()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } } return mMultiEndpoint ; }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; final boolean succeded ; synchronized ( mInstallLock ) { succeded = deleteApplicationCacheFilesLI ( packageName , userId ) ; } clearExternalStorageDataSync ( packageName , false ) ; if ( observer != null ) { try { observer.onRemoveCompleted ( packageName , succeded ) ; } catch ( android.os.RemoteException e ) { android.util.Log.i ( com.android.server.pm.PackageManagerService.TAG , "Observer no longer exists." ) ; } } }

Target:
public void run ( ) { mHandler.removeCallbacks ( this ) ; final boolean succeded ; synchronized ( mInstallLock ) { succeded = deleteApplicationCacheFilesLI ( packageName , userId ) ; } clearExternalStorageDataSync ( packageName , userId , false ) ; if ( observer != null ) { try { observer.onRemoveCompleted ( packageName , succeded ) ; } catch ( android.os.RemoteException e ) { android.util.Log.i ( com.android.server.pm.PackageManagerService.TAG , "Observer no longer exists." ) ; } } }
Source:
public void run ( ) { com.android.rs.test_compat.RenderScript pRS = com.android.rs.test_compat.RenderScript.create ( mCtx ) ; com.android.rs.test_compat.ScriptC_int4 s = new com.android.rs.test_compat.ScriptC_int4 ( pRS , mRes , R.raw.int4 ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_int4_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { com.android.rs.test_compat.RenderScript pRS = com.android.rs.test_compat.RenderScript.create ( mCtx ) ; com.android.rs.test_compat.ScriptC_int4 s = new com.android.rs.test_compat.ScriptC_int4 ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_int4_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
public void exit ( ) { if ( com.android.bluetooth.hearingaid.HearingAidStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hearingaid.HearingAidStateMachine.TAG , ( ( ( "Exit Connecting(" + ( mDevice ) ) + "): " ) + ( com.android.bluetooth.hearingaid.HearingAidStateMachine.messageWhatToString ( getCurrentMessage ( ) . what ) ) ) ) ; } mLastConnectionState = android.bluetooth.BluetoothProfile.STATE_CONNECTING ; removeMessages ( com.android.bluetooth.hearingaid.HearingAidStateMachine.CONNECT_TIMEOUT ) ; }

Target:
public void exit ( ) { log ( ( ( ( "Exit Connecting(" + ( mDevice ) ) + "): " ) + ( com.android.bluetooth.hearingaid.HearingAidStateMachine.messageWhatToString ( getCurrentMessage ( ) . what ) ) ) ) ; mLastConnectionState = android.bluetooth.BluetoothProfile.STATE_CONNECTING ; removeMessages ( com.android.bluetooth.hearingaid.HearingAidStateMachine.CONNECT_TIMEOUT ) ; }
Source:
public void test_getTcpNoDelay ( ) throws java.lang.Exception { java.net.ServerSocket server = new java.net.ServerSocket ( 0 ) ; java.net.Socket client = new java.net.Socket ( java.net.InetAddress.getLocalHost ( ) , server.getLocalPort ( ) ) ; boolean bool = ! ( client.getTcpNoDelay ( ) ) ; client.setTcpNoDelay ( bool ) ; assertTrue ( ( "Failed to get no delay setting: " + ( client.getTcpNoDelay ( ) ) ) , ( ( client.getTcpNoDelay ( ) ) == bool ) ) ; client.close ( ) ; server.close ( ) ; }

Target:
public void test_getTcpNoDelay ( ) throws java.lang.Exception { try ( java.net.ServerSocket server = new java.net.ServerSocket ( 0 ) ; java.net.Socket client = new java.net.Socket ( java.net.InetAddress.getLocalHost ( ) , server.getLocalPort ( ) ) ) { boolean bool = ! ( client.getTcpNoDelay ( ) ) ; client.setTcpNoDelay ( bool ) ; assertTrue ( ( "Failed to get no delay setting: " + ( client.getTcpNoDelay ( ) ) ) , ( ( client.getTcpNoDelay ( ) ) == bool ) ) ; } }
Source:
private void fillFiles ( @ javax.annotation.Nonnull java.io.File folder , @ javax.annotation.Nonnull java.lang.String fileExt , @ javax.annotation.Nonnull java.util.List < java.lang.String > fileNames ) { for ( java.io.File subFile : folder.listFiles ( ) ) { if ( subFile.isDirectory ( ) ) { fillFiles ( subFile , fileExt , fileNames ) ; } else { java.lang.String path = subFile.getPath ( ) ; if ( ( subFile.getName ( ) . endsWith ( fileExt ) ) && ( ! ( fileNames.contains ( path ) ) ) ) { fileNames.add ( path ) ; } } } }

Target:
private void fillFiles ( @ javax.annotation.Nonnull java.io.File folder , @ javax.annotation.Nonnull java.lang.String fileExt , @ javax.annotation.Nonnull java.util.Set < java.lang.String > fileNames ) { for ( java.io.File subFile : folder.listFiles ( ) ) { if ( subFile.isDirectory ( ) ) { fillFiles ( subFile , fileExt , fileNames ) ; } else { java.lang.String path = subFile.getPath ( ) ; if ( subFile.getName ( ) . endsWith ( fileExt ) ) { fileNames.add ( path ) ; } } } }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "getClient()" ) ; com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) return null ; if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , ( "getClient() - returning " + ( service.getRemoteDevice ( ) ) ) ) ; return service.getRemoteDevice ( ) ; }

Target:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "getClient()" ) ; } com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) { return null ; } if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , ( "getClient() - returning " + ( service.getRemoteDevice ( ) ) ) ) ; } return service.getRemoteDevice ( ) ; }
Source:
public int read ( ) throws java.io.IOException { if ( ( in ) == null ) { return - 1 ; } int c = in.read ( ) ; if ( c == ( - 1 ) ) { nextStream ( ) ; return read ( ) ; } return c ; }

Target:
public int read ( ) throws java.io.IOException { while ( ( in ) != null ) { int c = in.read ( ) ; if ( c != ( - 1 ) ) { return c ; } nextStream ( ) ; } return - 1 ; }
Source:
public static org.eclipse.swt.widgets.Display getDisplay ( ) { org.eclipse.ui.IWorkbench bench = null ; synchronized ( com.android.ide.eclipse.adt.AdtPlugin.class ) { bench = com.android.ide.eclipse.adt.AdtPlugin.sPlugin.getWorkbench ( ) ; } if ( bench != null ) { return bench.getDisplay ( ) ; } return null ; }

Target:
public static org.eclipse.swt.widgets.Display getDisplay ( ) { org.eclipse.ui.IWorkbench bench = null ; synchronized ( com.android.ide.eclipse.adt.AdtPlugin.class ) { if ( ( com.android.ide.eclipse.adt.AdtPlugin.sPlugin ) == null ) { return null ; } bench = com.android.ide.eclipse.adt.AdtPlugin.sPlugin.getWorkbench ( ) ; } if ( bench != null ) { return bench.getDisplay ( ) ; } return null ; }
Source:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_DPAD_LEFT : if ( movePrevious ( ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_LEFT ) ; } return true ; case android.view.KeyEvent.KEYCODE_DPAD_RIGHT : if ( moveNext ( ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_RIGHT ) ; } return true ; case android.view.KeyEvent.KEYCODE_DPAD_CENTER : case android.view.KeyEvent.KEYCODE_ENTER : mReceivedInvokeKeyDown = true ; } return super . onKeyDown ( keyCode , event ) ; }

Target:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_DPAD_LEFT : if ( movePrevious ( ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_LEFT ) ; return true ; } break ; case android.view.KeyEvent.KEYCODE_DPAD_RIGHT : if ( moveNext ( ) ) { playSoundEffect ( SoundEffectConstants.NAVIGATION_RIGHT ) ; return true ; } break ; case android.view.KeyEvent.KEYCODE_DPAD_CENTER : case android.view.KeyEvent.KEYCODE_ENTER : mReceivedInvokeKeyDown = true ; } return super . onKeyDown ( keyCode , event ) ; }
Source:
private final void resetContext ( ) { org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = new org.conscrypt.NativeRef.EVP_MD_CTX ( org.conscrypt.NativeCrypto.EVP_MD_CTX_create ( ) ) ; if ( signing ) { enableDSASignatureNonceHardeningIfApplicable ( ) ; evpPkeyCtx = org.conscrypt.NativeCrypto.EVP_DigestSignInit ( ctxLocal , evpMdRef , key.getNativeRef ( ) ) ; } else { evpPkeyCtx = org.conscrypt.NativeCrypto.EVP_DigestVerifyInit ( ctxLocal , evpMdRef , key.getNativeRef ( ) ) ; } configureEVP_PKEY_CTX ( evpPkeyCtx ) ; this . ctx = ctxLocal ; }

Target:
private final void resetContext ( ) { org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = new org.conscrypt.NativeRef.EVP_MD_CTX ( org.conscrypt.NativeCrypto.EVP_MD_CTX_create ( ) ) ; if ( signing ) { evpPkeyCtx = org.conscrypt.NativeCrypto.EVP_DigestSignInit ( ctxLocal , evpMdRef , key.getNativeRef ( ) ) ; } else { evpPkeyCtx = org.conscrypt.NativeCrypto.EVP_DigestVerifyInit ( ctxLocal , evpMdRef , key.getNativeRef ( ) ) ; } configureEVP_PKEY_CTX ( evpPkeyCtx ) ; this . ctx = ctxLocal ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.main ) ; android.content.Intent intent = new android.content.Intent ( NotificationService.ACTION_CREATE ) ; intent.setComponent ( new android.content.ComponentName ( this , com.android.example.notificationshowcase.NotificationService.class ) ) ; startService ( intent ) ; finish ( ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.main ) ; }
Source:
final void handleActivityConfigurationChanged ( android.os.IBinder token ) { android.app.ActivityThread.ActivityClientRecord r = mActivities.get ( token ) ; if ( ( r == null ) || ( ( r.activity ) == null ) ) { return ; } if ( android.app.ActivityThread.DEBUG_CONFIGURATION ) android.util.Slog.v ( android.app.ActivityThread.TAG , ( "Handle activity config changed: " + ( r.activityInfo.name ) ) ) ; android.app.ActivityThread.performConfigurationChanged ( r.activity , mCompatConfiguration ) ; freeTextLayoutCachesIfNeeded ( r.activity.mCurrentConfig.diff ( mCompatConfiguration ) ) ; }

Target:
final void handleActivityConfigurationChanged ( android.os.IBinder token ) { android.app.ActivityThread.ActivityClientRecord r = mActivities.get ( token ) ; if ( ( r == null ) || ( ( r.activity ) == null ) ) { return ; } if ( android.app.ActivityThread.DEBUG_CONFIGURATION ) android.util.Slog.v ( android.app.ActivityThread.TAG , ( "Handle activity config changed: " + ( r.activityInfo.name ) ) ) ; android.app.ActivityThread.performConfigurationChanged ( r.activity , mCompatConfiguration ) ; android.app.ActivityThread.freeTextLayoutCachesIfNeeded ( r.activity.mCurrentConfig.diff ( mCompatConfiguration ) ) ; }
Source:
android.content.res.Configuration applyConfigCompatMainThread ( int displayDensity , android.content.res.Configuration config , android.content.res.CompatibilityInfo compat ) { if ( config == null ) { return null ; } if ( ( compat != null ) && ( ! ( compat.supportsScreen ( ) ) ) ) { mMainThreadConfig.setTo ( config ) ; config = mMainThreadConfig ; compat.applyToConfiguration ( displayDensity , config ) ; } return config ; }

Target:
android.content.res.Configuration applyConfigCompatMainThread ( int displayDensity , android.content.res.Configuration config , android.content.res.CompatibilityInfo compat ) { if ( config == null ) { return null ; } if ( ! ( compat.supportsScreen ( ) ) ) { mMainThreadConfig.setTo ( config ) ; config = mMainThreadConfig ; compat.applyToConfiguration ( displayDensity , config ) ; } return config ; }
Source:
public com.android.jack.ir.ast.JMethodId getOrCreateMethodId ( @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull java.util.List < ? extends com.android.jack.ir.ast.JType > argsType , @ javax.annotation.Nonnull com.android.jack.ir.ast.MethodKind kind ) { try { return getMethodId ( name , argsType , kind ) ; } catch ( com.android.jack.lookup.JMethodLookupException e ) { com.android.jack.ir.ast.JMethodId id = getPhantomMethod ( name , argsType , kind ) ; if ( id == null ) { id = new com.android.jack.ir.ast.JMethodId ( name , argsType , kind ) ; phantomMethods.add ( id ) ; } return id ; } }

Target:
public com.android.jack.ir.ast.JMethodId getOrCreateMethodId ( @ javax.annotation.Nonnull java.lang.String name , @ javax.annotation.Nonnull java.util.List < ? extends com.android.jack.ir.ast.JType > argsType , @ javax.annotation.Nonnull com.android.jack.ir.ast.MethodKind kind ) { try { return getMethodId ( name , argsType , kind ) ; } catch ( com.android.jack.lookup.JMethodLookupException e ) { synchronized ( phantomMethods ) { com.android.jack.ir.ast.JMethodId id = getPhantomMethod ( name , argsType , kind ) ; if ( id == null ) { id = new com.android.jack.ir.ast.JMethodId ( name , argsType , kind ) ; phantomMethods.add ( id ) ; } return id ; } } }
Source:
protected void checkPoints ( org.bouncycastle.math.ec.ECPoint [ ] points ) { if ( points == null ) { throw new java.lang.IllegalArgumentException ( "'points' cannot be null" ) ; } for ( int i = 0 ; i < ( points.length ) ; ++ i ) { org.bouncycastle.math.ec.ECPoint point = points [ i ] ; if ( ( null != point ) && ( ( this ) != ( point.getCurve ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "'points' entries must be null or on this curve" ) ; } } }

Target:
protected void checkPoints ( org.bouncycastle.math.ec.ECPoint [ ] points ) { checkPoints ( points , 0 , points.length ) ; }
Source:
private boolean deleteDir ( java.io.File dir ) { if ( dir.isDirectory ( ) ) { java.lang.String [ ] children = dir.list ( ) ; for ( int i = 0 ; i < ( children.length ) ; i ++ ) { boolean success = deleteDir ( new java.io.File ( dir , children [ i ] ) ) ; if ( ! success ) { return false ; } } } return dir.delete ( ) ; }

Target:
private boolean deleteDir ( java.io.File dir ) { java.lang.String [ ] children = dir.list ( ) ; if ( children != null ) { for ( int i = 0 ; i < ( children.length ) ; i ++ ) { boolean success = deleteDir ( new java.io.File ( dir , children [ i ] ) ) ; if ( ! success ) { return false ; } } } return dir.delete ( ) ; }
Source:
private void disable ( ) { if ( ( mBluetoothAdapter ) == null ) return ; com.android.cts.deviceowner.BluetoothRestrictionTest.sleep ( com.android.cts.deviceowner.BluetoothRestrictionTest.CHECK_WAIT_TIME_MS ) ; if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_OFF ) ) { assertFalse ( mBluetoothAdapter.isEnabled ( ) ) ; return ; } assertEquals ( BluetoothAdapter.STATE_ON , mBluetoothAdapter.getState ( ) ) ; assertTrue ( mBluetoothAdapter.isEnabled ( ) ) ; mBluetoothAdapter.disable ( ) ; assertDisabledAfterTimeout ( ) ; }

Target:
private void disable ( ) { com.android.cts.deviceowner.BluetoothRestrictionTest.sleep ( com.android.cts.deviceowner.BluetoothRestrictionTest.CHECK_WAIT_TIME_MS ) ; if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_OFF ) ) { assertFalse ( mBluetoothAdapter.isEnabled ( ) ) ; return ; } assertEquals ( BluetoothAdapter.STATE_ON , mBluetoothAdapter.getState ( ) ) ; assertTrue ( mBluetoothAdapter.isEnabled ( ) ) ; mBluetoothAdapter.disable ( ) ; assertDisabledAfterTimeout ( ) ; }
Source:
public void test_create_BIO_OutputStream ( ) throws java.lang.Exception { byte [ ] actual = "Test" . getBytes ( ) ; java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream ( ) ; long ctx = org.conscrypt.NativeCrypto.create_BIO_OutputStream ( os ) ; try { org.conscrypt.NativeCrypto.BIO_write ( ctx , actual , 0 , actual.length ) ; assertEquals ( actual.length , os.size ( ) ) ; assertEquals ( java.util.Arrays.toString ( actual ) , java.util.Arrays.toString ( os.toByteArray ( ) ) ) ; } finally { org.conscrypt.NativeCrypto.BIO_free_all ( ctx ) ; } }

Target:
public void test_create_BIO_OutputStream ( ) throws java.lang.Exception { byte [ ] actual = "Test" . getBytes ( ) ; java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream ( ) ; long ctx = org.conscrypt.NativeCrypto.create_BIO_OutputStream ( os ) ; try { org.conscrypt.NativeCrypto.BIO_write ( ctx , actual , 0 , actual.length ) ; org.junit.Assert.assertEquals ( actual.length , os.size ( ) ) ; org.junit.Assert.assertEquals ( java.util.Arrays.toString ( actual ) , java.util.Arrays.toString ( os.toByteArray ( ) ) ) ; } finally { org.conscrypt.NativeCrypto.BIO_free_all ( ctx ) ; } }
Source:
private static void assertValues ( android.net.NetworkStats.Entry entry , java.lang.String iface , int uid , int set , int tag , int metered , int roaming ) { assertEquals ( iface , entry.iface ) ; assertEquals ( uid , entry.uid ) ; assertEquals ( set , entry.set ) ; assertEquals ( tag , entry.tag ) ; assertEquals ( metered , entry.metered ) ; assertEquals ( roaming , entry.roaming ) ; }

Target:
private static void assertValues ( android.net.NetworkStats.Entry entry , java.lang.String iface , int uid , int set , int tag , int metered , int roaming ) { org.junit.Assert.assertEquals ( iface , entry.iface ) ; org.junit.Assert.assertEquals ( uid , entry.uid ) ; org.junit.Assert.assertEquals ( set , entry.set ) ; org.junit.Assert.assertEquals ( tag , entry.tag ) ; org.junit.Assert.assertEquals ( metered , entry.metered ) ; org.junit.Assert.assertEquals ( roaming , entry.roaming ) ; }
Source:
public void testParseICMPv6NA ( ) { final java.lang.String packet = "00005E000265 807ABF6F48F3 86DD" + ( ( ( ( ( ( "600000000020 3A FF" + "2401FA000004FD0015EA6A5C7B01C146" ) + "FE80000000000000FA000004FD000001" ) + "88 00 E8126" ) + "0000000" ) + "2401FA000004FD0015EA6A5C7B01C146" ) + "02 01 807ABF6F48F3" ) ; final java.lang.String expected = "TX 80:7a:bf:6f:48:f3 > 00:00:5e:00:02:65 ipv6" + ( " 2401:fa00:4:fd00:15ea:6a5c:7b01:c146 > fe80::fa00:4:fd00:1 icmp6" + " na 2401:fa00:4:fd00:15ea:6a5c:7b01:c146 tlla 80:7a:bf:6f:48:f3" ) ; assertEquals ( expected , getSummary ( packet ) ) ; }

Target:
public void testParseICMPv6NA ( ) { final java.lang.String packet = "00005E000265 807ABF6F48F3 86DD" + ( ( ( ( ( ( "600000000020 3A FF" + "2401FA000004FD0015EA6A5C7B01C146" ) + "FE80000000000000FA000004FD000001" ) + "88 00 E8126" ) + "0000000" ) + "2401FA000004FD0015EA6A5C7B01C146" ) + "02 01 807ABF6F48F3" ) ; final java.lang.String expected = "TX 80:7a:bf:6f:48:f3 > 00:00:5e:00:02:65 ipv6" + ( " 2401:fa00:4:fd00:15ea:6a5c:7b01:c146 > fe80::fa00:4:fd00:1 icmp6" + " na 2401:fa00:4:fd00:15ea:6a5c:7b01:c146 tlla 80:7a:bf:6f:48:f3" ) ; org.junit.Assert.assertEquals ( expected , getSummary ( packet ) ) ; }
Source:
public void dconst ( final double cst ) { long bits = java.lang.Double.doubleToLongBits ( cst ) ; if ( ( bits == 0L ) || ( bits == 4607182418800017408L ) ) { mv.visitInsn ( ( ( org.objectweb.asm.Opcodes.DCONST_0 ) + ( ( int ) ( cst ) ) ) ) ; } else { mv.visitLdcInsn ( new java.lang.Double ( cst ) ) ; } }

Target:
public void dconst ( final double cst ) { long bits = java.lang.Double.doubleToLongBits ( cst ) ; if ( ( bits == 0L ) || ( bits == 4607182418800017408L ) ) { mv.visitInsn ( ( ( org.objectweb.asm.Opcodes.DCONST_0 ) + ( ( int ) ( cst ) ) ) ) ; } else { mv.visitLdcInsn ( cst ) ; } }
Source:
public void addRegistrationListener ( int sessionId , int serviceClass , com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } try { com.android.ims.ImsManager.ImsRegistrationListenerProxy p = createRegistrationListenerProxy ( serviceClass , listener ) ; mRegistrationListeners.add ( p ) ; mImsServiceProxy.addRegistrationListener ( sessionId , p ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "addRegistrationListener()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public void addRegistrationListener ( int serviceClass , com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } try { com.android.ims.ImsManager.ImsRegistrationListenerProxy p = createRegistrationListenerProxy ( serviceClass , listener ) ; mRegistrationListeners.add ( p ) ; mImsServiceProxy.addRegistrationListener ( p ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "addRegistrationListener()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public void mergeAppDataDirs ( android.content.pm.ApplicationInfo ai , int userId ) { java.util.Set < java.lang.String > dataDirs = com.android.server.pm.dex.DexManager.putIfAbsent ( mAppDataDirs , userId , new java.util.HashSet < > ( ) ) ; dataDirs.add ( ai.dataDir ) ; try { dataDirs.add ( com.android.server.pm.PackageManagerServiceUtils.realpath ( new java.io.File ( ai.dataDir ) ) ) ; } catch ( java.io.IOException e ) { if ( com.android.server.pm.dex.DexManager.DEBUG ) { android.util.Slog.w ( com.android.server.pm.dex.DexManager.TAG , ( "Error to get realpath of " + ( ai.dataDir ) ) , e ) ; } } }

Target:
public void mergeAppDataDirs ( android.content.pm.ApplicationInfo ai , int userId ) { java.util.Set < java.lang.String > dataDirs = com.android.server.pm.dex.DexManager.putIfAbsent ( mAppDataDirs , userId , new java.util.HashSet < > ( ) ) ; dataDirs.add ( ai.dataDir ) ; }
Source:
public boolean isAssistedDialed ( ) { if ( ( getIntentExtras ( ) ) != null ) { if ( ( ( getIntentExtras ( ) . getBoolean ( TelephonyManagerCompat.USE_ASSISTED_DIALING , false ) ) && ( ( getAssistedDialingExtras ( ) ) != null ) ) && ( ( android.os.Build.VERSION.SDK_INT ) <= ( com.android.dialer.assisteddialing.ConcreteCreator.BUILD_CODE_CEILING ) ) ) { return true ; } } if ( ( hasProperty ( TelephonyManagerCompat.PROPERTY_ASSISTED_DIALING_USED ) ) && ( android.support.v4.os.BuildCompat.isAtLeastP ( ) ) ) { return true ; } return false ; }

Target:
public boolean isAssistedDialed ( ) { if ( ( getIntentExtras ( ) ) != null ) { if ( ( ( getIntentExtras ( ) . getBoolean ( TelephonyManagerCompat.USE_ASSISTED_DIALING , false ) ) && ( ( getAssistedDialingExtras ( ) ) != null ) ) && ( ( android.os.Build.VERSION.SDK_INT ) <= ( com.android.dialer.assisteddialing.ConcreteCreator.BUILD_CODE_CEILING ) ) ) { return true ; } } return false ; }
Source:
protected boolean launchSuggestion ( int position , int actionKey , java.lang.String actionMsg ) { android.database.Cursor c = mSuggestionsAdapter.getCursor ( ) ; if ( ( c != null ) && ( c.moveToPosition ( position ) ) ) { android.content.Intent intent = createIntentFromSuggestion ( c , actionKey , actionMsg ) ; launchIntent ( intent ) ; return true ; } return false ; }

Target:
protected boolean launchSuggestion ( int position , int actionKey , java.lang.String actionMsg ) { if ( ( mSuggestionsAdapter ) == null ) { return false ; } android.database.Cursor c = mSuggestionsAdapter.getCursor ( ) ; if ( ( c != null ) && ( c.moveToPosition ( position ) ) ) { android.content.Intent intent = createIntentFromSuggestion ( c , actionKey , actionMsg ) ; launchIntent ( intent ) ; return true ; } return false ; }
Source:
private void terminateCall ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "terminateCall" ) ; } int action = HeadsetClientHalConstants.CALL_ACTION_CHUP ; android.bluetooth.BluetoothHeadsetClientCall c = getCall ( BluetoothHeadsetClientCall.CALL_STATE_DIALING , BluetoothHeadsetClientCall.CALL_STATE_ALERTING , BluetoothHeadsetClientCall.CALL_STATE_ACTIVE ) ; if ( c != null ) { if ( com.android.bluetooth.hfpclient.NativeInterface.handleCallActionNative ( getByteAddress ( mCurrentDevice ) , action , 0 ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TERMINATE_CALL , action ) ; sendMessageDelayed ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DISCONNECT_AUDIO , com.android.bluetooth.hfpclient.HeadsetClientStateMachine.SCO_DISCONNECT_TIMEOUT_MS ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't terminate outgoing call" ) ; } } }

Target:
private void terminateCall ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "terminateCall" ) ; } int action = HeadsetClientHalConstants.CALL_ACTION_CHUP ; android.bluetooth.BluetoothHeadsetClientCall c = getCall ( BluetoothHeadsetClientCall.CALL_STATE_DIALING , BluetoothHeadsetClientCall.CALL_STATE_ALERTING , BluetoothHeadsetClientCall.CALL_STATE_ACTIVE ) ; if ( c != null ) { if ( com.android.bluetooth.hfpclient.NativeInterface.handleCallActionNative ( getByteAddress ( mCurrentDevice ) , action , 0 ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TERMINATE_CALL , action ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't terminate outgoing call" ) ; } } }
Source:
public boolean isClosedOrPending ( ) { synchronized ( fdLock ) { if ( ( closePending ) || ( ( fd ) == null ) ) { return true ; } else { return false ; } } }

Target:
public boolean isClosedOrPending ( ) { synchronized ( fdLock ) { if ( ( ( closePending ) || ( ( fd ) == null ) ) || ( ! ( fd.valid ( ) ) ) ) { return true ; } else { return false ; } } }
Source:
public void openServer ( java.lang.String server , int port ) throws java.io.IOException , java.net.UnknownHostException { if ( ( serverSocket ) != null ) closeServer ( ) ; serverSocket = doConnect ( server , port ) ; try { serverOutput = new java.io.PrintStream ( new java.io.BufferedOutputStream ( serverSocket.getOutputStream ( ) ) , true , sun.net.NetworkClient.encoding ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.InternalError ( ( ( sun.net.NetworkClient.encoding ) + "encoding not found" ) ) ; } serverInput = new java.io.BufferedInputStream ( serverSocket.getInputStream ( ) ) ; }

Target:
public void openServer ( java.lang.String server , int port ) throws java.io.IOException , java.net.UnknownHostException { if ( ( serverSocket ) != null ) closeServer ( ) ; serverSocket = doConnect ( server , port ) ; try { serverOutput = new java.io.PrintStream ( new java.io.BufferedOutputStream ( serverSocket.getOutputStream ( ) ) , true , sun.net.NetworkClient.encoding ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.InternalError ( ( ( sun.net.NetworkClient.encoding ) + "encoding not found" ) , e ) ; } serverInput = new java.io.BufferedInputStream ( serverSocket.getInputStream ( ) ) ; }
Source:
public void srcToLib ( @ javax.annotation.Nonnull java.io.File out , boolean zipFiles , @ javax.annotation.Nonnull java.io.File ... sources ) throws java.lang.Exception { setIncrementalFolder ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ) ; super . srcToLib ( out , zipFiles , sources ) ; java.lang.Thread.sleep ( 1000 ) ; touchSourceFile ( sources ) ; super . srcToLib ( out , zipFiles , sources ) ; }

Target:
public void srcToLib ( @ javax.annotation.Nonnull java.io.File out , boolean zipFiles , @ javax.annotation.Nonnull java.io.File ... sources ) throws java.lang.Exception { setIncrementalFolder ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ) ; super . srcToLib ( out , zipFiles , sources ) ; touchSourceFile ( sources ) ; super . srcToLib ( out , zipFiles , sources ) ; }
Source:
private boolean sendCommand ( java.lang.String command ) { boolean result = false ; try { byte [ ] bCommand ; try { bCommand = command.getBytes ( com.android.ddmlib.EmulatorConsole.DEFAULT_ENCODING ) ; } catch ( java.io.UnsupportedEncodingException e ) { return result ; } com.android.ddmlib.AdbHelper.write ( mSocketChannel , bCommand , bCommand.length , com.android.ddmlib.DdmPreferences.getTimeOut ( ) ) ; result = true ; } catch ( java.lang.Exception e ) { return false ; } finally { if ( result == false ) { com.android.ddmlib.EmulatorConsole.RemoveConsole ( mPort ) ; } } return result ; }

Target:
private boolean sendCommand ( java.lang.String command ) { boolean result = false ; try { byte [ ] bCommand ; try { bCommand = command.getBytes ( com.android.ddmlib.EmulatorConsole.DEFAULT_ENCODING ) ; } catch ( java.io.UnsupportedEncodingException e ) { return result ; } com.android.ddmlib.AdbHelper.write ( mSocketChannel , bCommand , bCommand.length , com.android.ddmlib.DdmPreferences.getTimeOut ( ) ) ; result = true ; } catch ( java.lang.Exception e ) { return false ; } finally { if ( ! result ) { com.android.ddmlib.EmulatorConsole.RemoveConsole ( mPort ) ; } } return result ; }