auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.server.wifi.WifiConfigStoreLegacy.WifiConfigStoreDataLegacy read ( ) { final java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap = new java.util.HashMap < > ( ) ; final android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras = new android.util.SparseArray ( ) ; final java.util.Set < java.lang.String > deletedEphemeralSSIDs = new java.util.HashSet < > ( ) ; loadFromWpaSupplicant ( configurationMap , networkExtras ) ; loadFromNetworkHistory ( configurationMap , deletedEphemeralSSIDs ) ; loadFromIpConfigStore ( configurationMap ) ; return new com.android.server.wifi.WifiConfigStoreLegacy.WifiConfigStoreDataLegacy ( new java.util.ArrayList ( configurationMap.values ( ) ) , deletedEphemeralSSIDs ) ; }

Target:
public com.android.server.wifi.WifiConfigStoreLegacy.WifiConfigStoreDataLegacy read ( ) { final java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap = new java.util.HashMap < > ( ) ; final android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras = new android.util.SparseArray ( ) ; final java.util.Set < java.lang.String > deletedEphemeralSSIDs = new java.util.HashSet < > ( ) ; loadFromWpaSupplicant ( configurationMap , networkExtras ) ; loadFromNetworkHistory ( configurationMap , deletedEphemeralSSIDs ) ; loadFromIpConfigStore ( configurationMap ) ; loadFromPasspointConfigStore ( configurationMap , networkExtras ) ; return new com.android.server.wifi.WifiConfigStoreLegacy.WifiConfigStoreDataLegacy ( new java.util.ArrayList ( configurationMap.values ( ) ) , deletedEphemeralSSIDs ) ; }
Source:
HEAD ( ) { }

Target:
protected com.intellij.codeInspection.reference.Ref < com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase > compute ( com.intellij.codeInspection.reference.PsiFile file , com.intellij.codeInspection.reference.RefManagerImpl refManager ) { com.intellij.codeInspection.reference.Tools tools = ( ( com.intellij.codeInspection.reference.GlobalInspectionContextBase ) ( refManager.getContext ( ) ) ) . getTools ( ) . get ( UnusedDeclarationInspectionBase.SHORT_NAME ) ; com.intellij.codeInspection.reference.InspectionToolWrapper toolWrapper = ( tools == null ) ? null : tools.getEnabledTool ( file ) ; com.intellij.codeInspection.InspectionProfileEntry tool = ( toolWrapper == null ) ? null : toolWrapper.getTool ( ) ; return com.intellij.codeInspection.reference.Ref.create ( ( tool instanceof com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase ? ( ( com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase ) ( tool ) ) : null ) ) ; }
Source:
public void copyFrom ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
private void validateIsInt64 ( ) { if ( ( ( mType.mElement.mType ) == ( Element.DataType.SIGNED_64 ) ) || ( ( mType.mElement.mType ) == ( Element.DataType.UNSIGNED_64 ) ) ) { return ; } throw new android.renderscript.RSIllegalArgumentException ( ( "64 bit integer source does not match allocation type " + ( mType.mElement.mType ) ) ) ; }
Source:
public void testProcessChldHoldActiveUnhold ( ) throws java.lang.Exception { com.android.server.telecom.Call heldCall = createHeldCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_HOLDACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . unholdCall ( org.mockito.Matchers.eq ( heldCall ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldHoldActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_HOLDACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public void onReceivedError ( int errorCode , java.lang.String description , java.lang.String failingUrl ) { if ( ( description == null ) || ( description.isEmpty ( ) ) ) { description = mWebViewDelegate.getErrorString ( mWebView.getContext ( ) , errorCode ) ; } org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedError=" + failingUrl ) ) ; mWebViewClient.onReceivedError ( mWebView , errorCode , description , failingUrl ) ; org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onReceivedError ( int errorCode , java.lang.String description , java.lang.String failingUrl ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onReceivedError" ) ; if ( ( description == null ) || ( description.isEmpty ( ) ) ) { description = mWebViewDelegate.getErrorString ( mWebView.getContext ( ) , errorCode ) ; } if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedError=" + failingUrl ) ) ; mWebViewClient.onReceivedError ( mWebView , errorCode , description , failingUrl ) ; } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onReceivedError" ) ; } }
Source:
public boolean isReviewRequired ( ) { if ( ! ( android.os.Build.PERMISSIONS_REVIEW_REQUIRED ) ) { return false ; } final int groupCount = mGroups.size ( ) ; for ( int i = 0 ; i < groupCount ; i ++ ) { com.android.packageinstaller.permission.model.AppPermissionGroup group = mGroups.get ( i ) ; if ( group.isReviewRequired ( ) ) { return true ; } } return false ; }

Target:
public boolean isReviewRequired ( ) { if ( ( ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_permissionReviewRequired ) ) ) && ( ! ( android.os.Build.PERMISSIONS_REVIEW_REQUIRED ) ) ) { return false ; } final int groupCount = mGroups.size ( ) ; for ( int i = 0 ; i < groupCount ; i ++ ) { com.android.packageinstaller.permission.model.AppPermissionGroup group = mGroups.get ( i ) ; if ( group.isReviewRequired ( ) ) { return true ; } } return false ; }
Source:
public static com.android.dialer.voicemail.model.VoicemailEntry.Builder builder ( ) { return new com.android.dialer.voicemail.model.AutoValue_VoicemailEntry.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setPhotoId ( 0 ) . setDuration ( 0 ) . setCallType ( 0 ) . setIsRead ( 0 ) ; }

Target:
public static com.android.dialer.voicemail.model.VoicemailEntry.Builder builder ( ) { return new com.android.dialer.voicemail.model.AutoValue_VoicemailEntry.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setNumberAttributes ( com.android.dialer.NumberAttributes.getDefaultInstance ( ) ) . setDuration ( 0 ) . setCallType ( 0 ) . setIsRead ( 0 ) ; }
Source:
public void onRadioStateUnavailable ( ) { if ( ( mUiccCard ) != null ) { mUiccCard.dispose ( ) ; } mUiccCard = null ; mCardState = com.android.internal.telephony.uicc.IccCardStatus.CardState.CARDSTATE_ABSENT ; mLastRadioState = com.android.internal.telephony.CommandsInterface.RadioState.RADIO_UNAVAILABLE ; }

Target:
public void onRadioStateUnavailable ( ) { if ( ( mUiccCard ) != null ) { mUiccCard.dispose ( ) ; } mUiccCard = null ; if ( ( mPhoneId ) != null ) { com.android.internal.telephony.uicc.UiccProfile.broadcastInternalIccStateChangedIntent ( IccCardConstants.INTENT_VALUE_ICC_UNKNOWN , null , mPhoneId ) ; } mCardState = com.android.internal.telephony.uicc.IccCardStatus.CardState.CARDSTATE_ABSENT ; mLastRadioState = com.android.internal.telephony.CommandsInterface.RadioState.RADIO_UNAVAILABLE ; }
Source:
public void testNoActivity ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:5: Warning: App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details. [GoogleAppIndexingWarning]\n" + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + "\n" ) + " <application\n" ) + " android:allowBackup=\"true\"\n" ) + " android:icon=\"@mipmap/ic_launcher\"\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >\n" ) + " <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }

Target:
public void testNoActivity ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "AndroidManifest.xml:5: Warning: App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details. [GoogleAppIndexingWarning]\n" + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" ) + " package=\"com.example.helloworld\" >\n" ) + "\n" ) + " <application\n" ) + " android:allowBackup=\"true\"\n" ) + " android:icon=\"@mipmap/ic_launcher\"\n" ) + " android:label=\"@string/app_name\"\n" ) + " android:theme=\"@style/AppTheme\" >\n" ) + " <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />" ) + " </application>\n" ) + "\n" ) + "</manifest>\n" ) ) ) ) ) ; }
Source:
public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount ( ) { synchronized ( mLock ) { try { com.android.server.telecom.Log.startSession ( "TSI.gUSOPA" ) ; final android.os.UserHandle callingUserHandle = android.os.Binder.getCallingUserHandle ( ) ; return mPhoneAccountRegistrar.getUserSelectedOutgoingPhoneAccount ( callingUserHandle ) ; } catch ( java.lang.Exception e ) { com.android.server.telecom.Log.e ( this , e , "getUserSelectedOutgoingPhoneAccount" ) ; throw e ; } finally { com.android.server.telecom.Log.endSession ( ) ; } } }

Target:
public android.telecom.PhoneAccountHandle getUserSelectedOutgoingPhoneAccount ( ) { synchronized ( mLock ) { try { android.telecom.Log.startSession ( "TSI.gUSOPA" ) ; final android.os.UserHandle callingUserHandle = android.os.Binder.getCallingUserHandle ( ) ; return mPhoneAccountRegistrar.getUserSelectedOutgoingPhoneAccount ( callingUserHandle ) ; } catch ( java.lang.Exception e ) { android.telecom.Log.e ( this , e , "getUserSelectedOutgoingPhoneAccount" ) ; throw e ; } finally { android.telecom.Log.endSession ( ) ; } } }
Source:
public void testPerformViewViolatesConstraints ( ) { actionConstraint = org.hamcrest.Matchers.not ( viewMatcher ) ; org.mockito.Mockito.when ( mockViewFinder.getView ( ) ) . thenReturn ( targetView ) ; initInteraction ( ) ; try { testInteraction.perform ( mockAction ) ; fail ( "should propagate constraint violation!" ) ; } catch ( java.lang.RuntimeException re ) { if ( ! ( android.support.test.espresso.PerformException.class . isAssignableFrom ( re.getClass ( ) ) ) ) { throw re ; } } }

Target:
public void performViewViolatesConstraints ( ) { actionConstraint = org.hamcrest.Matchers.not ( viewMatcher ) ; org.mockito.Mockito.when ( mockViewFinder.getView ( ) ) . thenReturn ( targetView ) ; initInteraction ( ) ; expectedException.expect ( android.support.test.espresso.PerformException.class ) ; testInteraction.perform ( mockAction ) ; }
Source:
public void timeDateIntervalFormat_formatDateRange_DATE_TIME ( int reps ) throws java.lang.Exception { java.util.Locale l = java.util.Locale.US ; java.util.TimeZone utc = java.util.TimeZone.getTimeZone ( "UTC" ) ; int flags = ( ( ( FORMAT_SHOW_DATE ) | ( FORMAT_SHOW_WEEKDAY ) ) | ( FORMAT_SHOW_TIME ) ) | ( FORMAT_24HOUR ) ; for ( int rep = 0 ; rep < reps ; ++ rep ) { formatDateRange ( l , utc , 0L , 0L , flags ) ; } }

Target:
public void timeDateIntervalFormat_formatDateRange_DATE_TIME ( int reps ) throws java.lang.Exception { android.icu.util.ULocale l = android.icu.util.ULocale.US ; android.icu.util.TimeZone utc = android.icu.util.TimeZone.getTimeZone ( "UTC" ) ; int flags = ( ( ( FORMAT_SHOW_DATE ) | ( FORMAT_SHOW_WEEKDAY ) ) | ( FORMAT_SHOW_TIME ) ) | ( FORMAT_24HOUR ) ; for ( int rep = 0 ; rep < reps ; ++ rep ) { formatDateRange ( l , utc , 0L , 0L , flags ) ; } }
Source:
public int invokeOemRilRequestRaw ( byte [ ] oemReq , byte [ ] oemResp ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.invokeOemRilRequestRaw ( oemReq , oemResp ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return - 1 ; }

Target:
public android.telephony.ims.aidl.IImsConfig getImsConfig ( int slotIndex , int feature ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsConfig ( slotIndex , feature ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsRegistration, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public boolean onSubGuidedActionClicked ( android.support.v17.leanback.widget.GuidedAction action ) { long actionId = action.getId ( ) ; if ( actionId == ( com.android.tv.dvr.ui.SeriesSettingsFragment.SUB_ACTION_ID_CHANNEL_ALL ) ) { mChannelOption = com.android.tv.dvr.SeriesRecording.OPTION_CHANNEL_ALL ; mSelectedChannelId = com.android.tv.data.Channel.INVALID_ID ; updateChannelsGuidedAction ( true ) ; return true ; } else if ( actionId > ( com.android.tv.dvr.ui.SeriesSettingsFragment.SUB_ACTION_ID_CHANNEL_ONE_BASE ) ) { mChannelOption = com.android.tv.dvr.SeriesRecording.OPTION_CHANNEL_ONE ; mSelectedChannelId = actionId - ( com.android.tv.dvr.ui.SeriesSettingsFragment.SUB_ACTION_ID_CHANNEL_ONE_BASE ) ; updateChannelsGuidedAction ( true ) ; return true ; } return false ; }

Target:
public boolean onSubGuidedActionClicked ( android.support.v17.leanback.widget.GuidedAction action ) { long actionId = action.getId ( ) ; if ( actionId == ( com.android.tv.dvr.ui.DvrSeriesSettingsFragment.SUB_ACTION_ID_CHANNEL_ALL ) ) { mChannelOption = com.android.tv.dvr.data.SeriesRecording.OPTION_CHANNEL_ALL ; mSelectedChannelId = com.android.tv.data.Channel.INVALID_ID ; updateChannelsGuidedAction ( true ) ; return true ; } else if ( actionId > ( com.android.tv.dvr.ui.DvrSeriesSettingsFragment.SUB_ACTION_ID_CHANNEL_ONE_BASE ) ) { mChannelOption = com.android.tv.dvr.data.SeriesRecording.OPTION_CHANNEL_ONE ; mSelectedChannelId = actionId - ( com.android.tv.dvr.ui.DvrSeriesSettingsFragment.SUB_ACTION_ID_CHANNEL_ONE_BASE ) ; updateChannelsGuidedAction ( true ) ; return true ; } return false ; }
Source:
protected void disconnect ( ) { synchronized ( this ) { if ( ( mState ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; setState ( BluetoothProfile.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; } } }

Target:
void disconnect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; synchronized ( this ) { if ( ( mState ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; setState ( BluetoothProfile.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; } } }
Source:
public int invokeOemRilRequestRaw ( byte [ ] oemReq , byte [ ] oemResp ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.invokeOemRilRequestRaw ( oemReq , oemResp ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return - 1 ; }

Target:
public boolean isImsRegistered ( int subId ) { try { return getITelephony ( ) . isImsRegistered ( subId ) ; } catch ( android.os.RemoteException | java.lang.NullPointerException ex ) { return false ; } }
Source:
protected java.util.Properties createProps ( ) { java.util.Properties props = super . createProps ( ) ; props.setProperty ( PkgProps.EXTRA_VENDOR_ID , "vendor" ) ; props.setProperty ( PkgProps.EXTRA_VENDOR_DISPLAY , "vendor" ) ; props.setProperty ( PkgProps.EXTRA_PATH , "the_path" ) ; props.setProperty ( PkgProps.EXTRA_NAME_DISPLAY , "Vendor The Path" ) ; props.setProperty ( PkgProps.PKG_REVISION , "42.0.0" ) ; props.setProperty ( PkgProps.MIN_TOOLS_REV , "3.0.1" ) ; return props ; }

Target:
protected java.util.Properties createExpectedProps ( ) { java.util.Properties props = super . createExpectedProps ( ) ; props.setProperty ( PkgProps.EXTRA_VENDOR_ID , "vendor" ) ; props.setProperty ( PkgProps.EXTRA_VENDOR_DISPLAY , "vendor" ) ; props.setProperty ( PkgProps.EXTRA_PATH , "the_path" ) ; props.setProperty ( PkgProps.EXTRA_NAME_DISPLAY , "Vendor The Path" ) ; props.setProperty ( PkgProps.PKG_REVISION , "42.0.0" ) ; props.setProperty ( PkgProps.MIN_TOOLS_REV , "3.0.1" ) ; return props ; }
Source:
public void goForward ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { goForward ( ) ; } } ) ; return ; } mAwContents.goForward ( ) ; }

Target:
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 ) ; }
Source:
public boolean enable ( ) { if ( ( isEnabled ( ) ) == true ) { if ( android.bluetooth.BluetoothAdapter.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAdapter.TAG , "enable(): BT is already enabled..!" ) ; return true ; } try { return mManagerService.enable ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public boolean disable ( boolean persist ) { try { return mManagerService.disable ( android.app.ActivityThread.currentPackageName ( ) , persist ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }
Source:
public void resetMemory ( java.lang.String cardId , @ android.telephony.euicc.EuiccCardManager.ResetOption int options , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . resetMemory ( mContext.getOpPackageName ( ) , cardId , options , new com.android.internal.telephony.euicc.IResetMemoryCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling resetMemory" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void deleteProfile ( java.lang.String cardId , java.lang.String iccid , java.util.concurrent.Executor executor , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . deleteProfile ( mContext.getOpPackageName ( ) , cardId , iccid , new com.android.internal.telephony.euicc.IDeleteProfileCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { executor.execute ( ( ) -> callback.onComplete ( resultCode , null ) ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling deleteProfile" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
private final boolean finishReceiverLocked ( android.os.IBinder receiver , int resultCode , java.lang.String resultData , android.os.Bundle resultExtras , boolean resultAbort ) { final com.android.server.am.BroadcastRecord r = broadcastRecordForReceiverLocked ( receiver ) ; if ( r == null ) { android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , "finishReceiver called but not found on queue" ) ; return false ; } return r.queue.finishReceiverLocked ( r , resultCode , resultData , resultExtras , resultAbort , false ) ; }

Target:
public void serviceDoneExecuting ( android.os.IBinder token , int type , int startId , int res ) { synchronized ( this ) { if ( ! ( token instanceof com.android.server.am.ServiceRecord ) ) { android.util.Slog.e ( com.android.server.am.ActivityManagerService.TAG , ( "serviceDoneExecuting: Invalid service token=" + token ) ) ; throw new java.lang.IllegalArgumentException ( "Invalid service token" ) ; } mServices.serviceDoneExecutingLocked ( ( ( com.android.server.am.ServiceRecord ) ( token ) ) , type , startId , res ) ; } }
Source:
public java.lang.String getType ( android.net.Uri uri ) { logger.info ( "Enter: getType()" ) ; final int match = com.android.service.ims.presence.EABProvider.URI_MATCHER.match ( uri ) ; switch ( match ) { case com.android.service.ims.presence.EABProvider.EAB_TABLE : return EABContract.EABColumns.CONTENT_TYPE ; case com.android.service.ims.presence.EABProvider.EAB_TABLE_ID : return EABContract.EABColumns.CONTENT_ITEM_TYPE ; default : throw new java.lang.IllegalArgumentException ( ( "EABProvider URI: " + uri ) ) ; } }

Target:
public java.lang.String getType ( android.net.Uri uri ) { logger.debug ( "Enter: getType()" ) ; final int match = com.android.service.ims.presence.EABProvider.URI_MATCHER.match ( uri ) ; switch ( match ) { case com.android.service.ims.presence.EABProvider.EAB_TABLE : return EABContract.EABColumns.CONTENT_TYPE ; case com.android.service.ims.presence.EABProvider.EAB_TABLE_ID : return EABContract.EABColumns.CONTENT_ITEM_TYPE ; default : throw new java.lang.IllegalArgumentException ( ( "EABProvider URI: " + uri ) ) ; } }
Source:
void stopProfileServices ( ) { mAdapterProperties.onBluetoothDisable ( ) ; java.lang.Class [ ] supportedProfileServices = com.android.bluetooth.btservice.Config.getSupportedProfiles ( ) ; if ( ( ( mRunningProfiles.size ( ) ) < 1 ) || ( ( ( mRunningProfiles.size ( ) ) == 1 ) && ( com.android.bluetooth.gatt.GattService.class . getSimpleName ( ) . equals ( mRunningProfiles.get ( 0 ) . getName ( ) ) ) ) ) { debugLog ( "stopProfileServices() - No profiles services to stop or already stopped." ) ; mAdapterStateMachine.sendMessage ( AdapterState.BREDR_STOPPED ) ; } setAllProfileServiceStates ( supportedProfileServices , BluetoothAdapter.STATE_OFF ) ; }

Target:
void startProfileServices ( ) { debugLog ( "startCoreServices()" ) ; java.lang.Class [ ] supportedProfileServices = com.android.bluetooth.btservice.Config.getSupportedProfiles ( ) ; if ( ( ( supportedProfileServices.length ) == 1 ) && ( com.android.bluetooth.gatt.GattService.class . getSimpleName ( ) . equals ( supportedProfileServices [ 0 ] . getSimpleName ( ) ) ) ) { updateUuids ( ) ; setBluetoothClassFromConfig ( ) ; mAdapterStateMachine.sendMessage ( AdapterState.BREDR_STARTED ) ; } else { setAllProfileServiceStates ( supportedProfileServices , BluetoothAdapter.STATE_ON ) ; } }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_check_dims s = new com.android.rs.test.ScriptC_check_dims ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_root ( mA ) ; s.invoke_check_dims_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_check_dims s = new com.android.rs.test.ScriptC_check_dims ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_root ( mA ) ; s.invoke_check_dims_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
public static void computeAtanh ( android.renderscript.cts.TestAtanh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 128 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( ( java.lang.StrictMath.log ( ( ( x + 1.0 ) / ( x - 1.0 ) ) ) ) / 2.0 ) ) ; }

Target:
public static void computeAtanh ( android.renderscript.cts.TestAtanh.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.atanh ( args.in ) , 5 , 128 ) ; }
Source:
public void zoomChanged ( ) { synchronized ( this ) { if ( ( grid ) != null ) { grid.dispose ( ) ; grid = null ; zoom = model.getZoom ( ) ; } } doRedraw ( ) ; }

Target:
public void zoomChanged ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { if ( ( grid ) != null ) { grid.dispose ( ) ; grid = null ; zoom = model.getZoom ( ) ; } } } } ) ; doRedraw ( ) ; }
Source:
public java.io.File getResourceFolder ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Project project ) { java.io.File res = new java.io.File ( project.getDir ( ) , com.android.SdkConstants.RES_FOLDER ) ; if ( res.exists ( ) ) { return res ; } return null ; }

Target:
public java.util.List < java.io.File > getResourceFolders ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Project project ) { java.io.File res = new java.io.File ( project.getDir ( ) , com.android.SdkConstants.RES_FOLDER ) ; if ( res.exists ( ) ) { return java.util.Collections.singletonList ( res ) ; } return java.util.Collections.emptyList ( ) ; }
Source:
private void readClut ( ) { int length = ( mIconData [ 3 ] ) * ( com.android.internal.telephony.gsm.stk.IconLoader.CLUT_ENTRY_SIZE ) ; android.os.Message msg = this . obtainMessage ( com.android.internal.telephony.gsm.stk.IconLoader.EVENT_READ_CLUT_DONE ) ; mSimFH.loadEFImgTransparent ( mId.imageId , mIconData [ com.android.internal.telephony.gsm.stk.IconLoader.CLUT_LOCATION_OFFSET ] , mIconData [ ( ( com.android.internal.telephony.gsm.stk.IconLoader.CLUT_LOCATION_OFFSET ) + 1 ) ] , length , msg ) ; }

Target:
private void readClut ( ) { int length = ( mIconData [ 3 ] ) * ( com.android.internal.telephony.cat.IconLoader.CLUT_ENTRY_SIZE ) ; android.os.Message msg = this . obtainMessage ( com.android.internal.telephony.cat.IconLoader.EVENT_READ_CLUT_DONE ) ; mSimFH.loadEFImgTransparent ( mId.imageId , mIconData [ com.android.internal.telephony.cat.IconLoader.CLUT_LOCATION_OFFSET ] , mIconData [ ( ( com.android.internal.telephony.cat.IconLoader.CLUT_LOCATION_OFFSET ) + 1 ) ] , length , msg ) ; }
Source:
public final boolean bool_literal ( ) throws org.jf.smali.RecognitionException { boolean value = false ; org.antlr.runtime.tree.CommonTree BOOL_LITERAL199 = null ; try { { BOOL_LITERAL199 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BOOL_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BOOL_LITERAL_in_bool_literal3371 ) ) ) ; value = java.lang.Boolean.parseBoolean ( ( BOOL_LITERAL199 != null ? BOOL_LITERAL199.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final boolean bool_literal ( ) throws org.jf.smali.RecognitionException { boolean value = false ; org.antlr.runtime.tree.CommonTree BOOL_LITERAL199 = null ; try { { BOOL_LITERAL199 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BOOL_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BOOL_LITERAL_in_bool_literal3373 ) ) ) ; value = java.lang.Boolean.parseBoolean ( ( BOOL_LITERAL199 != null ? BOOL_LITERAL199.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public static int computeSampleSizeLarger ( float scale ) { int initialSize = ( ( int ) ( android.util.FloatMath.floor ( ( 1.0F / scale ) ) ) ) ; if ( initialSize <= 1 ) return 1 ; return initialSize <= 8 ? com.android.gallery3d.common.Utils.prevPowerOf2 ( initialSize ) : ( initialSize / 8 ) * 8 ; }

Target:
public static int computeSampleSizeLarger ( float scale ) { int initialSize = ( ( int ) ( java.lang.Math.floor ( ( 1.0 / scale ) ) ) ) ; if ( initialSize <= 1 ) return 1 ; return initialSize <= 8 ? com.android.gallery3d.common.Utils.prevPowerOf2 ( initialSize ) : ( initialSize / 8 ) * 8 ; }
Source:
public java.lang.String answer ( int uid ) throws java.lang.Exception { if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ) ) { return com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_NAME ; } else if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_UPDATE_UID ) ) { return com.android.server.wifi.WifiConfigManagerTest.TEST_UPDATE_NAME ; } else if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_SYSUI_UID ) ) { return WifiConfigManager.SYSUI_PACKAGE_NAME ; } fail ( ( "Unexpected UID: " + uid ) ) ; return "" ; }

Target:
public java.lang.String answer ( int uid ) throws java.lang.Exception { if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_UID ) ) { return com.android.server.wifi.WifiConfigManagerTest.TEST_CREATOR_NAME ; } else if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_UPDATE_UID ) ) { return com.android.server.wifi.WifiConfigManagerTest.TEST_UPDATE_NAME ; } else if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_SYSUI_UID ) ) { return WifiConfigManager.SYSUI_PACKAGE_NAME ; } else if ( uid == ( com.android.server.wifi.WifiConfigManagerTest.TEST_NO_PERM_UID ) ) { return com.android.server.wifi.WifiConfigManagerTest.TEST_NO_PERM_NAME ; } fail ( ( "Unexpected UID: " + uid ) ) ; return "" ; }
Source:
public void radioCapabilityIndication ( int indicationType , com.android.internal.telephony.V1_0.RadioCapability var2 ) { }

Target:
public void radioCapabilityIndication ( int indicationType , com.android.internal.telephony.V1_0.RadioCapability rc ) { mRil.processIndication ( indicationType ) ; com.android.internal.telephony.RadioCapability response = com.android.internal.telephony.RIL.convertHalRadioCapability ( rc , mRil ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RADIO_CAPABILITY , response ) ; mRil.mPhoneRadioCapabilityChangedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void onDeleteClick ( android.text.style.EasyEditSpan span ) { android.text.Editable editable = ( ( android.text.Editable ) ( mTextView.getText ( ) ) ) ; int start = editable.getSpanStart ( span ) ; int end = editable.getSpanEnd ( span ) ; if ( ( start >= 0 ) && ( end >= 0 ) ) { sendNotification ( EasyEditSpan.TEXT_DELETED , span ) ; mTextView.deleteText_internal ( start , end ) ; } editable.removeSpan ( span ) ; }

Target:
public void onDeleteClick ( android.text.style.EasyEditSpan span ) { android.text.Editable editable = ( ( android.text.Editable ) ( mTextView.getText ( ) ) ) ; int start = editable.getSpanStart ( span ) ; int end = editable.getSpanEnd ( span ) ; if ( ( start >= 0 ) && ( end >= 0 ) ) { sendEasySpanNotification ( EasyEditSpan.TEXT_DELETED , span ) ; mTextView.deleteText_internal ( start , end ) ; } editable.removeSpan ( span ) ; }
Source:
private void grantUriPermissionFromIntentLocked ( int callingUid , java.lang.String targetPkg , android.content.Intent intent , com.android.server.am.HistoryRecord activity ) { if ( intent == null ) { return ; } android.net.Uri data = intent.getData ( ) ; if ( data == null ) { return ; } grantUriPermissionLocked ( callingUid , targetPkg , data , intent.getFlags ( ) , activity ) ; }

Target:
void grantUriPermissionUncheckedFromIntentLocked ( int targetUid , java.lang.String targetPkg , android.content.Intent intent , com.android.server.am.UriPermissionOwner owner ) { grantUriPermissionUncheckedLocked ( targetUid , targetPkg , intent.getData ( ) , intent.getFlags ( ) , owner ) ; }
Source:
protected byte [ ] engineUpdate ( byte [ ] input , int inputOffset , int inputLen ) { ensureKeystoreOperationInitialized ( ) ; if ( inputLen == 0 ) { return null ; } byte [ ] output ; try { output = mMainDataStreamer.update ( input , inputOffset , inputLen ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } if ( ( output.length ) == 0 ) { return null ; } return output ; }

Target:
protected byte [ ] engineUpdate ( byte [ ] input , int inputOffset , int inputLen ) { ensureKeystoreOperationInitialized ( ) ; if ( inputLen == 0 ) { return null ; } byte [ ] output ; try { output = mMainDataStreamer.update ( input , inputOffset , inputLen ) ; } catch ( android.security.KeyStoreException e ) { throw android.security.KeyStore.getCryptoOperationException ( e ) ; } if ( ( output.length ) == 0 ) { return null ; } return output ; }
Source:
public static int getDeviceLocalPort ( com.android.ddmlib.IDevice device ) { synchronized ( com.android.hierarchyviewerlib.device.DeviceBridge.devicePortMap ) { java.lang.Integer port = com.android.hierarchyviewerlib.device.DeviceBridge.devicePortMap.get ( device ) ; if ( port != null ) { return port ; } com.android.ddmlib.Log.e ( com.android.hierarchyviewerlib.device.DeviceBridge.TAG , ( "Missing forwarded port for " + ( device.getSerialNumber ( ) ) ) ) ; return - 1 ; } }

Target:
public static int getDeviceLocalPort ( com.android.ddmlib.IDevice device ) { synchronized ( com.android.hierarchyviewerlib.device.DeviceBridge.sDevicePortMap ) { java.lang.Integer port = com.android.hierarchyviewerlib.device.DeviceBridge.sDevicePortMap.get ( device ) ; if ( port != null ) { return port ; } com.android.ddmlib.Log.e ( com.android.hierarchyviewerlib.device.DeviceBridge.TAG , ( "Missing forwarded port for " + ( device.getSerialNumber ( ) ) ) ) ; return - 1 ; } }
Source:
public void processIntent ( android.content.Intent intent ) { final boolean isUnknownCall = intent.getBooleanExtra ( com.android.server.telecom.CallIntentProcessor.KEY_IS_UNKNOWN_CALL , false ) ; com.android.server.telecom.Log.i ( this , "onReceive - isUnknownCall: %s" , isUnknownCall ) ; android.os.Trace.beginSection ( "processNewCallCallIntent" ) ; if ( isUnknownCall ) { com.android.server.telecom.CallIntentProcessor.processUnknownCallIntent ( mCallsManager , intent ) ; } else { com.android.server.telecom.CallIntentProcessor.processOutgoingCallIntent ( mContext , mCallsManager , intent ) ; } android.os.Trace.endSection ( ) ; }

Target:
public void processIntent ( android.content.Intent intent ) { final boolean isUnknownCall = intent.getBooleanExtra ( com.android.server.telecom.CallIntentProcessor.KEY_IS_UNKNOWN_CALL , false ) ; android.telecom.Log.i ( this , "onReceive - isUnknownCall: %s" , isUnknownCall ) ; android.os.Trace.beginSection ( "processNewCallCallIntent" ) ; if ( isUnknownCall ) { com.android.server.telecom.CallIntentProcessor.processUnknownCallIntent ( mCallsManager , intent ) ; } else { com.android.server.telecom.CallIntentProcessor.processOutgoingCallIntent ( mContext , mCallsManager , intent ) ; } android.os.Trace.endSection ( ) ; }
Source:
public void updatePersistentConfiguration ( android.content.res.Configuration values ) { enforceCallingPermission ( android.Manifest.permission.CHANGE_CONFIGURATION , "updateConfiguration()" ) ; enforceWriteSettingsPermission ( "updateConfiguration()" ) ; if ( values == null ) { throw new java.lang.NullPointerException ( "Configuration must not be null" ) ; } synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; updateConfigurationLocked ( values , null , true , false ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; } }

Target:
public void setServiceForeground ( android.content.ComponentName className , android.os.IBinder token , int id , android.app.Notification notification , int flags ) { synchronized ( this ) { mServices.setServiceForegroundLocked ( className , token , id , notification , flags ) ; } }
Source:
public void setTargetInfo ( @ com.android.annotations.NonNull com.android.builder.sdk.SdkInfo sdkInfo , @ com.android.annotations.NonNull com.android.builder.sdk.TargetInfo targetInfo ) { mSdkInfo = sdkInfo ; mTargetInfo = targetInfo ; if ( ( mTargetInfo.getBuildTools ( ) . getRevision ( ) . compareTo ( com.android.builder.core.AndroidBuilder.MIN_BUILD_TOOLS_REV ) ) < 0 ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "The SDK Build Tools revision (%1$s) is too low. Minimum required is %2$s" , mTargetInfo.getBuildTools ( ) . getRevision ( ) , com.android.builder.core.AndroidBuilder.MIN_BUILD_TOOLS_REV ) ) ; } }

Target:
public void setTargetInfo ( @ com.android.annotations.NonNull com.android.builder.sdk.SdkInfo sdkInfo , @ com.android.annotations.NonNull com.android.builder.sdk.TargetInfo targetInfo ) { mSdkInfo = sdkInfo ; mTargetInfo = targetInfo ; if ( ( mTargetInfo.getBuildTools ( ) . getRevision ( ) . compareTo ( com.android.builder.core.AndroidBuilder.MIN_BUILD_TOOLS_REV ) ) < 0 ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "The SDK Build Tools revision (%1$s) is too low for project '%2$s'. Minimum required is %3$s" , mTargetInfo.getBuildTools ( ) . getRevision ( ) , mProjectId , com.android.builder.core.AndroidBuilder.MIN_BUILD_TOOLS_REV ) ) ; } }
Source:
void onScanManagerErrorCallback ( int clientIf , int errorCode ) throws android.os.RemoteException { com.android.bluetooth.gatt.ClientMap.App app = mClientMap.getById ( clientIf ) ; if ( ( app == null ) || ( ( app.callback ) == null ) ) { android.util.Log.e ( com.android.bluetooth.gatt.GattService.TAG , "App or callback is null" ) ; return ; } app.callback.onScanManagerErrorCallback ( errorCode ) ; }

Target:
void onScanManagerErrorCallback ( int scannerId , int errorCode ) throws android.os.RemoteException { com.android.bluetooth.gatt.ScannerMap.App app = mScannerMap.getById ( scannerId ) ; if ( ( app == null ) || ( ( app.callback ) == null ) ) { android.util.Log.e ( com.android.bluetooth.gatt.GattService.TAG , "App or callback is null" ) ; return ; } app.callback.onScanManagerErrorCallback ( errorCode ) ; }
Source:
private void loadClass ( ) throws java.io.IOException { java.io.DataInputStream in = mInput ; in.readInt ( ) ; long id = readId ( ) ; in.readInt ( ) ; java.lang.String name = mStrings.get ( readId ( ) ) ; mClassNames.put ( id , name ) ; }

Target:
private long readUnsignedInt ( ) throws java.io.IOException { return com.google.common.primitives.UnsignedInts.toLong ( mInput.readInt ( ) ) ; }
Source:
public static com.android.sdklib.internal.avd.AvdManager getInstance ( com.android.sdklib.SdkManager sdkManager , com.android.utils.ILogger log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { synchronized ( com.android.sdklib.internal.avd.AvdManager.mManagers ) { com.android.sdklib.internal.avd.AvdManager manager ; if ( ( manager = com.android.sdklib.internal.avd.AvdManager.mManagers.get ( sdkManager.getLocation ( ) ) ) != null ) { return manager ; } manager = new com.android.sdklib.internal.avd.AvdManager ( sdkManager , log ) ; com.android.sdklib.internal.avd.AvdManager.mManagers.put ( sdkManager.getLocation ( ) , manager ) ; return manager ; } }

Target:
public static com.android.sdklib.internal.avd.AvdManager getInstance ( com.android.sdklib.repository.local.LocalSdk localSdk , com.android.utils.ILogger log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { synchronized ( com.android.sdklib.internal.avd.AvdManager.mManagers ) { com.android.sdklib.internal.avd.AvdManager manager ; if ( ( manager = com.android.sdklib.internal.avd.AvdManager.mManagers.get ( localSdk.getLocation ( ) ) ) != null ) { return manager ; } manager = new com.android.sdklib.internal.avd.AvdManager ( localSdk , log ) ; com.android.sdklib.internal.avd.AvdManager.mManagers.put ( localSdk.getLocation ( ) . getPath ( ) , manager ) ; return manager ; } }
Source:
public void test_SSL_check_private_key_cert_then_key ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_check_private_key_cert_then_key ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getPkeyContext ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
public static void testSendEtwsMessageTest ( android.app.Activity activity , int serialNumber ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( activity , com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageTest , serialNumber , 0 ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_EMERGENCY_BROADCAST , AppOpsManager.OP_RECEIVE_EMERGECY_SMS , null , null , Activity.RESULT_OK , null , null ) ; }

Target:
public static void testSendEtwsMessageTest ( android.app.Activity activity , int serialNumber ) { com.android.cellbroadcastreceiver.tests.SendTestMessages.sendBroadcast ( activity , serialNumber , SmsCbConstants.MESSAGE_ID_ETWS_TEST_MESSAGE , com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageTest ) ; }
Source:
public void testLarge ( ) { assertEquals ( true , ssq.checkAndSet ( "large" , config ) ) ; assertTrue ( ( ( config.getScreenSizeQualifier ( ) ) != null ) ) ; assertEquals ( ScreenSize.LARGE , config.getScreenSizeQualifier ( ) . getValue ( ) ) ; assertEquals ( "large" , config.getScreenSizeQualifier ( ) . toString ( ) ) ; }

Target:
public void testLarge ( ) { assertEquals ( true , ssq.checkAndSet ( "large" , config ) ) ; assertTrue ( ( ( config.getScreenLayoutSizeQualifier ( ) ) != null ) ) ; assertEquals ( ScreenLayoutSize.LARGE , config.getScreenLayoutSizeQualifier ( ) . getValue ( ) ) ; assertEquals ( "large" , config.getScreenLayoutSizeQualifier ( ) . toString ( ) ) ; }
Source:
private java.util.ArrayList < java.lang.Integer > splitInt ( java.lang.String str ) { if ( str == null ) return null ; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer ( str , "," ) ; java.util.ArrayList < java.lang.Integer > substrings = new java.util.ArrayList < java.lang.Integer > ( ) ; while ( tokenizer.hasMoreElements ( ) ) { java.lang.String token = tokenizer.nextToken ( ) ; substrings.add ( java.lang.Integer.parseInt ( token ) ) ; } if ( ( substrings.size ( ) ) == 0 ) return null ; return substrings ; }

Target:
private java.util.ArrayList < java.lang.Integer > splitInt ( java.lang.String str ) { if ( str == null ) return null ; android.text.TextUtils.StringSplitter splitter = new android.text.TextUtils.SimpleStringSplitter ( ',' ) ; splitter.setString ( str ) ; java.util.ArrayList < java.lang.Integer > substrings = new java.util.ArrayList < java.lang.Integer > ( ) ; for ( java.lang.String s : splitter ) { substrings.add ( java.lang.Integer.parseInt ( s ) ) ; } if ( ( substrings.size ( ) ) == 0 ) return null ; return substrings ; }
Source:
protected static byte [ ] createRandomBlock ( java.security.SecureRandom random ) { random.setSeed ( java.lang.System.currentTimeMillis ( ) ) ; byte [ ] result = new byte [ 32 ] ; random.nextBytes ( result ) ; return result ; }

Target:
protected static byte [ ] createRandomBlock ( boolean useGMTUnixTime , org.bouncycastle.crypto.prng.RandomGenerator randomGenerator ) { byte [ ] result = new byte [ 32 ] ; randomGenerator.nextBytes ( result ) ; if ( useGMTUnixTime ) { org.bouncycastle.crypto.tls.TlsUtils.writeGMTUnixTime ( result , 0 ) ; } return result ; }
Source:
private static java.lang.String findLegacyVpnGateway ( android.net.LinkProperties prop ) { for ( android.net.RouteInfo route : prop.getRoutes ( ) ) { if ( ( route.isDefaultRoute ( ) ) && ( ( route.getGateway ( ) ) instanceof java.net.Inet4Address ) ) { return route.getGateway ( ) . getHostAddress ( ) ; } } throw new java.lang.IllegalStateException ( "Unable to find suitable gateway" ) ; }

Target:
private static android.net.RouteInfo findIPv4DefaultRoute ( android.net.LinkProperties prop ) { for ( android.net.RouteInfo route : prop.getAllRoutes ( ) ) { if ( ( route.isDefaultRoute ( ) ) && ( ( route.getGateway ( ) ) instanceof java.net.Inet4Address ) ) { return route ; } } throw new java.lang.IllegalStateException ( "Unable to find IPv4 default gateway" ) ; }
Source:
public void initialize ( int gsmSignalStrength , int gsmBitErrorRate , int cdmaDbm , int cdmaEcio , int evdoDbm , int evdoEcio , int evdoSnr , boolean gsm ) { initialize ( gsmSignalStrength , gsmBitErrorRate , cdmaDbm , cdmaEcio , evdoDbm , evdoEcio , evdoSnr , 99 , android.telephony.SignalStrength.INVALID , android.telephony.SignalStrength.INVALID , android.telephony.SignalStrength.INVALID , android.telephony.SignalStrength.INVALID , 0 , gsm , false ) ; }

Target:
public void setWcdmaRscpThresholds ( int [ ] wcdmaRscpThresholds ) { if ( ( wcdmaRscpThresholds == null ) || ( ( wcdmaRscpThresholds.length ) != ( android.telephony.SignalStrength.WCDMA_RSCP_THRESHOLDS_NUM ) ) ) { android.util.Log.wtf ( android.telephony.SignalStrength.LOG_TAG , "setWcdmaRscpThresholds - wcdmaRscpThresholds is invalid." ) ; return ; } java.lang.System.arraycopy ( wcdmaRscpThresholds , 0 , mWcdmaRscpThresholds , 0 , android.telephony.SignalStrength.WCDMA_RSCP_THRESHOLDS_NUM ) ; }
Source:
public java.lang.String toString ( ) { return map.toString ( ) ; }

Target:
public T next ( ) { if ( ! ( valueIterator.hasNext ( ) ) ) { java.util.Map.Entry < K , java.util.Collection < V > > mapEntry = mapIterator.next ( ) ; key = mapEntry.getKey ( ) ; valueIterator = mapEntry.getValue ( ) . iterator ( ) ; } return output ( key , valueIterator.next ( ) ) ; }