auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void test_SSLSocket_getEnabledProtocols ( ) throws java.lang.Exception { javax.net.ssl.SSLSocketFactory sf = ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; javax.net.ssl.SSLSocket ssl = ( ( javax.net.ssl.SSLSocket ) ( sf.createSocket ( ) ) ) ; java.lang.String [ ] protocols = ssl.getEnabledProtocols ( ) ; libcore.java.security.StandardNames.assertValidProtocols ( protocols ) ; assertNotSame ( protocols , ssl.getEnabledProtocols ( ) ) ; }

Target:
public void test_SSLSocket_getEnabledProtocols ( ) throws java.lang.Exception { javax.net.ssl.SSLSocketFactory sf = ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; javax.net.ssl.SSLSocket ssl = ( ( javax.net.ssl.SSLSocket ) ( sf.createSocket ( ) ) ) ; java.lang.String [ ] protocols = ssl.getEnabledProtocols ( ) ; libcore.java.security.StandardNames.assertDefaultProtocolsClient ( protocols ) ; assertNotSame ( protocols , ssl.getEnabledProtocols ( ) ) ; }
Source:
public void onCapabilities ( com.android.bips.discovery.DiscoveredPrinter printer , com.android.bips.jni.LocalPrinterCapabilities capabilities ) { if ( ( mSession.isDestroyed ( ) ) || ( ! ( mSession.isKnown ( mPrinterId ) ) ) ) return ; if ( capabilities == null ) { if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( "No capabilities so removing printer " + ( this ) ) ) ; mSession.removePrinters ( java.util.Collections.singletonList ( mPrinterId ) ) ; } else { mCapabilities = capabilities ; mSession.handlePrinter ( this ) ; } }

Target:
public void onConnectionComplete ( com.android.bips.discovery.DiscoveredPrinter printer ) { if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( "connection complete " + printer ) ) ; if ( printer == null ) { mTrackingConnection = null ; } }
Source:
public int read ( byte [ ] buffer , int offset , int length ) throws java.io.IOException { java.util.Arrays.checkOffsetAndCount ( buffer.length , offset , length ) ; if ( length == 0 ) { return 0 ; } checkReadPrimitiveTypes ( ) ; return primitiveData.read ( buffer , offset , length ) ; }

Target:
public int read ( byte [ ] buffer , int byteOffset , int byteCount ) throws java.io.IOException { java.util.Arrays.checkOffsetAndCount ( buffer.length , byteOffset , byteCount ) ; if ( byteCount == 0 ) { return 0 ; } checkReadPrimitiveTypes ( ) ; return primitiveData.read ( buffer , byteOffset , byteCount ) ; }
Source:
public static void checkServerTrusted ( javax.net.ssl.X509TrustManager tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , org.conscrypt.OpenSSLSocketImpl socket ) throws java.security.cert.CertificateException { if ( tm instanceof javax.net.ssl.X509ExtendedTrustManager ) { javax.net.ssl.X509ExtendedTrustManager x509etm = ( ( javax.net.ssl.X509ExtendedTrustManager ) ( tm ) ) ; x509etm.checkServerTrusted ( chain , authType , socket ) ; } else { tm.checkServerTrusted ( chain , authType ) ; } }

Target:
static void checkServerTrusted ( javax.net.ssl.X509TrustManager tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , org.conscrypt.AbstractConscryptSocket socket ) throws java.security.cert.CertificateException { if ( tm instanceof javax.net.ssl.X509ExtendedTrustManager ) { javax.net.ssl.X509ExtendedTrustManager x509etm = ( ( javax.net.ssl.X509ExtendedTrustManager ) ( tm ) ) ; x509etm.checkServerTrusted ( chain , authType , socket ) ; } else { tm.checkServerTrusted ( chain , authType ) ; } }
Source:
private void generateTestManifest ( java.lang.String testPackageName , int minSdkVersion , java.lang.String testedPackageName , java.lang.String instrumentationRunner , java.lang.String outManifestLocation ) { com.android.builder.internal.TestManifestGenerator generator = new com.android.builder.internal.TestManifestGenerator ( outManifestLocation , testPackageName , minSdkVersion , testedPackageName , instrumentationRunner ) ; try { generator.generate ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
private void generateTestManifest ( java.lang.String testPackageName , int minSdkVersion , int targetSdkVersion , java.lang.String testedPackageName , java.lang.String instrumentationRunner , java.lang.String outManifestLocation ) { com.android.builder.internal.TestManifestGenerator generator = new com.android.builder.internal.TestManifestGenerator ( outManifestLocation , testPackageName , minSdkVersion , targetSdkVersion , testedPackageName , instrumentationRunner ) ; try { generator.generate ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.VVM3_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.DIALER_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context ) ; }

Target:
private void recordTosAcceptance ( ) { if ( isVvm3 ( ) ) { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) . apply ( ) ; } else { preferences.edit ( ) . putInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) . apply ( ) ; } com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context ) ; }
Source:
public void addTasks ( java.util.List < com.intellij.openapi.externalSystem.model.task.TaskData > tasks , com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.Phase phase ) { if ( tasks.isEmpty ( ) ) return ; final com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.ExternalProjectsStateProvider stateProvider = com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.getInstance ( myProject ) . getStateProvider ( ) ; for ( com.intellij.openapi.externalSystem.model.task.TaskData task : tasks ) { final com.intellij.openapi.externalSystem.service.project.manage.TaskActivationState taskActivationState = stateProvider.getTasksActivation ( task.getOwner ( ) , task.getLinkedExternalProjectPath ( ) ) ; taskActivationState.getTasks ( phase ) . add ( task.getName ( ) ) ; } fireTasksChanged ( ) ; }

Target:
public void addTasks ( @ org.jetbrains.annotations.NotNull java.util.Collection < com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry > entries ) { if ( entries.isEmpty ( ) ) return ; final com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.ExternalProjectsStateProvider stateProvider = com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.getInstance ( myProject ) . getStateProvider ( ) ; for ( com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry entry : entries ) { final com.intellij.openapi.externalSystem.service.project.manage.TaskActivationState taskActivationState = stateProvider.getTasksActivation ( entry.systemId , entry.projectPath ) ; taskActivationState.getTasks ( entry.phase ) . add ( entry.taskName ) ; } fireTasksChanged ( ) ; }
Source:
public void copyFromUnchecked ( short [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } }

Target:
public void copy1DRangeFrom ( int off , int count , java.lang.Object array ) { copy1DRangeFromUnchecked ( off , count , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public void resolve ( ) { block.setThenBlock ( com.android.jack.cfg.ForwardBranchResolver.getTargetBlock ( ifStatement ) ) ; block.setElseBlock ( com.android.jack.cfg.ForwardBranchResolver.getTargetBlock ( elseStatement ) ) ; }

Target:
public void resolve ( ) { block.setThenBlock ( com.android.jack.cfg.ForwardBranchResolver.getTargetBlock ( ifStatement ) ) ; if ( ( elseStatement ) == null ) { block.setElseBlock ( exitBlock ) ; } else { block.setElseBlock ( com.android.jack.cfg.ForwardBranchResolver.getTargetBlock ( elseStatement ) ) ; } }
Source:
public void onActivityStarted ( android.app.Activity activity ) { if ( BuildConfig.IS_DEBUG ) { assert ( ( java.lang.reflect.Proxy.isProxyClass ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_WRAPPER_CLASS ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS ) ) ; } }

Target:
public void onActivitySaveInstanceState ( android.app.Activity activity , android.os.Bundle outState ) { if ( BuildConfig.DCHECK_IS_ON ) { assert ( ( java.lang.reflect.Proxy.isProxyClass ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_WRAPPER_CLASS ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS ) ) ; } }
Source:
void reExecutePeriodic ( java.util.concurrent.RunnableScheduledFuture < ? > task ) { if ( canRunInCurrentRunState ( true ) ) { super . getQueue ( ) . add ( task ) ; if ( ( ! ( canRunInCurrentRunState ( true ) ) ) && ( remove ( task ) ) ) task.cancel ( false ) ; else prestartCoreThread ( ) ; } }

Target:
void reExecutePeriodic ( java.util.concurrent.RunnableScheduledFuture < ? > task ) { if ( canRunInCurrentRunState ( true ) ) { super . getQueue ( ) . add ( task ) ; if ( ( ! ( canRunInCurrentRunState ( true ) ) ) && ( remove ( task ) ) ) task.cancel ( false ) ; else ensurePrestart ( ) ; } }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copyFrom ( float [ ] d ) { validateIsFloat32 ( ) ; copyFromUnchecked ( d , Element.DataType.FLOAT_32 , d.length ) ; }
Source:
private void updateLocation ( final java.lang.String providerName , final double latitude , final double longitude ) { android.location.Location location = new android.location.Location ( providerName ) ; location.setLatitude ( latitude ) ; location.setLongitude ( longitude ) ; location.setAccuracy ( 1.0F ) ; location.setTime ( java.lang.System.currentTimeMillis ( ) ) ; location.setElapsedRealtimeNanos ( android.os.SystemClock.elapsedRealtimeNanos ( ) ) ; mManager.setTestProviderLocation ( providerName , location ) ; }

Target:
private void updateLocation ( java.lang.String testProviderName , java.lang.String locationProviderName , double latitude , double longitude ) { android.location.Location location = new android.location.Location ( locationProviderName ) ; location.setLatitude ( latitude ) ; location.setLongitude ( longitude ) ; location.setAccuracy ( 1.0F ) ; location.setTime ( java.lang.System.currentTimeMillis ( ) ) ; location.setElapsedRealtimeNanos ( android.os.SystemClock.elapsedRealtimeNanos ( ) ) ; mManager.setTestProviderLocation ( testProviderName , location ) ; }
Source:
public void requestImageRef ( final android.os.Message msg ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { requestImageRef ( msg ) ; } } ) ; return ; } mAwContents.requestImageRef ( msg ) ; }

Target:
public void pauseTimers ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { pauseTimers ( ) ; } } ) ; return ; } mAwContents.pauseTimers ( ) ; }
Source:
private void generateDocument ( java.io.File reportDir , long elapsedTime ) { java.lang.String timestamp = getTimestamp ( ) ; java.io.OutputStream stream = null ; try { stream = createOutputResultStream ( reportDir ) ; org.kxml2.io.KXmlSerializer serializer = new org.kxml2.io.KXmlSerializer ( ) ; serializer.setOutput ( stream , "UTF-8" ) ; serializer.startDocument ( "UTF-8" , null ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; printTestResults ( serializer , timestamp , elapsedTime ) ; serializer.endDocument ( ) ; java.lang.String msg = java.lang.String.format ( ( "XML test result file generated at %s. Total tests %d, " + "Failed %d, Error %d" ) , getAbsoluteReportPath ( ) , mRunResult.getNumTests ( ) , mRunResult.getNumFailedTests ( ) , mRunResult.getNumErrorTests ( ) ) ; com.android.ddmlib.Log.logAndDisplay ( LogLevel.INFO , com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , msg ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , "Failed to generate report data" ) ; } finally { if ( stream != null ) { try { stream.close ( ) ; } catch ( java.io.IOException ignored ) { } } } }

Target:
private void generateDocument ( java.io.File reportDir , long elapsedTime ) { java.lang.String timestamp = getTimestamp ( ) ; java.io.OutputStream stream = null ; try { stream = createOutputResultStream ( reportDir ) ; org.kxml2.io.KXmlSerializer serializer = new org.kxml2.io.KXmlSerializer ( ) ; serializer.setOutput ( stream , SdkConstants.UTF_8 ) ; serializer.startDocument ( SdkConstants.UTF_8 , null ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; printTestResults ( serializer , timestamp , elapsedTime ) ; serializer.endDocument ( ) ; java.lang.String msg = java.lang.String.format ( ( "XML test result file generated at %s. Total tests %d, " + "Failed %d, Error %d" ) , getAbsoluteReportPath ( ) , mRunResult.getNumTests ( ) , mRunResult.getNumFailedTests ( ) , mRunResult.getNumErrorTests ( ) ) ; com.android.ddmlib.Log.logAndDisplay ( LogLevel.INFO , com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , msg ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , "Failed to generate report data" ) ; } finally { if ( stream != null ) { try { stream.close ( ) ; } catch ( java.io.IOException ignored ) { } } } }
Source:
public void testSystemReady_networkScorerNotProvisioned_defaultScorer ( ) throws java.lang.Exception { Settings.Global.putInt ( mContentResolver , Global.NETWORK_SCORING_PROVISIONED , 0 ) ; org.mockito.Mockito.when ( mResources.getString ( R.string.config_defaultNetworkScorerPackageName ) ) . thenReturn ( com.android.server.NetworkScoreServiceTest.NEW_SCORER.mPackageName ) ; mNetworkScoreService.systemReady ( ) ; org.mockito.Mockito.verify ( mNetworkScorerAppManager ) . setActiveScorer ( com.android.server.NetworkScoreServiceTest.NEW_SCORER.mPackageName ) ; junit.framework.Assert.assertEquals ( 1 , Settings.Global.getInt ( mContentResolver , Global.NETWORK_SCORING_PROVISIONED ) ) ; }

Target:
public void testSystemRunning ( ) { org.mockito.Mockito.when ( mNetworkScorerAppManager.getActiveScorer ( ) ) . thenReturn ( com.android.server.NetworkScoreServiceTest.NEW_SCORER ) ; mNetworkScoreService.systemRunning ( ) ; org.mockito.Mockito.verify ( mContext ) . bindServiceAsUser ( com.android.server.devicepolicy.MockUtils.checkIntent ( new android.content.Intent ( ) . setComponent ( new android.content.ComponentName ( com.android.server.NetworkScoreServiceTest.NEW_SCORER.packageName , com.android.server.NetworkScoreServiceTest.NEW_SCORER.recommendationServiceClassName ) ) ) , org.mockito.Matchers.any ( android.content.ServiceConnection.class ) , org.mockito.Matchers.eq ( ( ( android.content.Context.BIND_AUTO_CREATE ) | ( android.content.Context.BIND_FOREGROUND_SERVICE ) ) ) , org.mockito.Matchers.eq ( UserHandle.SYSTEM ) ) ; }
Source:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , int timeout , android.bluetooth.le.IAdvertisingSetCallback callback ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , timeout , callback ) ; }

Target:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , int duration , int maxExtAdvEvents , android.bluetooth.le.IAdvertisingSetCallback callback ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , duration , maxExtAdvEvents , callback ) ; }
Source:
public int getMovementFlags ( android.support.v7.widget.RecyclerView recyclerView , android.support.v7.widget.RecyclerView.ViewHolder viewHolder ) { if ( ( viewHolder.getItemViewType ( ) ) == ( com.android.systemui.qs.customize.TileAdapter.TYPE_EDIT ) ) { return makeMovementFlags ( 0 , 0 ) ; } int dragFlags = ( ( ( android.support.v7.widget.helper.ItemTouchHelper.UP ) | ( android.support.v7.widget.helper.ItemTouchHelper.DOWN ) ) | ( android.support.v7.widget.helper.ItemTouchHelper.RIGHT ) ) | ( android.support.v7.widget.helper.ItemTouchHelper.LEFT ) ; return makeMovementFlags ( dragFlags , 0 ) ; }

Target:
public int getMovementFlags ( android.support.v7.widget.RecyclerView recyclerView , android.support.v7.widget.RecyclerView.ViewHolder viewHolder ) { if ( ( ( viewHolder.getItemViewType ( ) ) == ( com.android.systemui.qs.customize.TileAdapter.TYPE_EDIT ) ) || ( ( viewHolder.getItemViewType ( ) ) == ( com.android.systemui.qs.customize.TileAdapter.TYPE_DIVIDER ) ) ) { return makeMovementFlags ( 0 , 0 ) ; } int dragFlags = ( ( ( android.support.v7.widget.helper.ItemTouchHelper.UP ) | ( android.support.v7.widget.helper.ItemTouchHelper.DOWN ) ) | ( android.support.v7.widget.helper.ItemTouchHelper.RIGHT ) ) | ( android.support.v7.widget.helper.ItemTouchHelper.LEFT ) ; return makeMovementFlags ( dragFlags , 0 ) ; }
Source:
public void onClick ( android.view.View v ) { startActivity ( new android.content.Intent ( android.content.Intent.ACTION_EDIT ) . setDataAndType ( Uri.EMPTY , "vnd.android.cursor.dir/track" ) . putExtra ( "playlist" , "nowplaying" ) ) ; }

Target:
public void handleMessage ( android.os.Message msg ) { com.android.music.TextView tv = ( ( com.android.music.TextView ) ( msg.obj ) ) ; int x = tv.getScrollX ( ) ; x = ( x * 3 ) / 4 ; tv.scrollTo ( x , 0 ) ; if ( x == 0 ) { tv.setEllipsize ( TruncateAt.END ) ; } else { android.os.Message newmsg = obtainMessage ( 0 , tv ) ; mLabelScroller.sendMessageDelayed ( newmsg , 15 ) ; } }
Source:
public byte [ ] getEncoded ( ) { try { org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info = new org.bouncycastle.asn1.x509.SubjectPublicKeyInfo ( new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( org.bouncycastle.asn1.oiw.OIWObjectIdentifiers.elGamalAlgorithm , new org.bouncycastle.asn1.oiw.ElGamalParameter ( elSpec.getP ( ) , elSpec.getG ( ) ) ) , new org.bouncycastle.asn1.DERInteger ( y ) ) ; return info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
public byte [ ] getEncoded ( ) { try { org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info = new org.bouncycastle.asn1.x509.SubjectPublicKeyInfo ( new org.bouncycastle.asn1.x509.AlgorithmIdentifier ( org.bouncycastle.asn1.oiw.OIWObjectIdentifiers.elGamalAlgorithm , new org.bouncycastle.asn1.oiw.ElGamalParameter ( elSpec.getP ( ) , elSpec.getG ( ) ) ) , new org.bouncycastle.asn1.ASN1Integer ( y ) ) ; return info.getEncoded ( ASN1Encoding.DER ) ; } catch ( java.io.IOException e ) { return null ; } }
Source:
public void onDestroy ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.VERBOSE ) android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Pbap Service onDestroy" ) ; super . onDestroy ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; closeService ( ) ; if ( ( mSessionStatusHandler ) != null ) { mSessionStatusHandler.removeCallbacksAndMessages ( null ) ; } }

Target:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return false ; return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }
Source:
private void verifyCodecConfigIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothCodecStatus codecStatus ) { android.content.Intent intent = waitForIntent ( timeoutMs , mCodecConfigChangedQueue ) ; org.junit.Assert.assertNotNull ( intent ) ; org.junit.Assert.assertEquals ( BluetoothA2dp.ACTION_CODEC_CONFIG_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( codecStatus , intent.getParcelableExtra ( BluetoothCodecStatus.EXTRA_CODEC_STATUS ) ) ; }

Target:
private void verifyCodecConfigIntent ( int timeoutMs , android.bluetooth.BluetoothDevice device , android.bluetooth.BluetoothCodecStatus codecStatus ) { android.content.Intent intent = com.android.bluetooth.TestUtils.waitForIntent ( timeoutMs , mCodecConfigChangedQueue ) ; org.junit.Assert.assertNotNull ( intent ) ; org.junit.Assert.assertEquals ( BluetoothA2dp.ACTION_CODEC_CONFIG_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( codecStatus , intent.getParcelableExtra ( BluetoothCodecStatus.EXTRA_CODEC_STATUS ) ) ; }
Source:
public void activateDeactivatePolicy ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; android.support.test.uiautomator.UiDevice device = testFramework.getDevice ( ) ; com.android.devtools.systemimage.uitest.utils.SettingsUtil.activate ( instrumentation , "Sample Device Admin" ) ; assertTrue ( checkStatusOfPolicy ( instrumentation , "Sample Device Admin" ) ) ; com.android.devtools.systemimage.uitest.utils.SettingsUtil.deactivate ( instrumentation , "Sample Device Admin" ) ; assertFalse ( checkStatusOfPolicy ( instrumentation , "Sample Device Admin" ) ) ; }

Target:
public void developerOptionsEnabled ( ) throws java.lang.Exception { if ( ! ( com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.isDeveloperOptionsEnabled ( testFramework ) ) ) { com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.enableDeveloperOptions ( testFramework ) ; } else { return ; } assertTrue ( "Failed to enable Developer options." , com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.isDeveloperOptionsEnabled ( testFramework ) ) ; }
Source:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { com.android.ide.common.api.INode linearLayout = node.appendChild ( com.android.ide.common.layout.LayoutConstants.FQCN_LINEAR_LAYOUT ) ; linearLayout.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION , com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL ) ; } }

Target:
public void onCreate ( com.android.ide.common.api.INode node , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { com.android.ide.common.api.INode linearLayout = node.appendChild ( com.android.ide.common.layout.LayoutConstants.FQCN_LINEAR_LAYOUT ) ; linearLayout.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION , com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL ) ; } }
Source:
public static java.lang.Class < ? > forName ( java.lang.String className , boolean shouldInitialize , java.lang.ClassLoader classLoader ) throws java.lang.ClassNotFoundException { if ( classLoader == null ) { classLoader = java.lang.ClassLoader.getSystemClassLoader ( ) ; } java.lang.Class < ? > result ; try { result = java.lang.Class.classForName ( className , shouldInitialize , classLoader ) ; } catch ( java.lang.ClassNotFoundException e ) { java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof java.lang.LinkageError ) { throw ( ( java.lang.LinkageError ) ( cause ) ) ; } throw e ; } return result ; }

Target:
public static java.lang.Class < ? > forName ( java.lang.String className , boolean shouldInitialize , java.lang.ClassLoader classLoader ) throws java.lang.ClassNotFoundException { if ( classLoader == null ) { classLoader = java.lang.BootClassLoader.getInstance ( ) ; } java.lang.Class < ? > result ; try { result = java.lang.Class.classForName ( className , shouldInitialize , classLoader ) ; } catch ( java.lang.ClassNotFoundException e ) { java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof java.lang.LinkageError ) { throw ( ( java.lang.LinkageError ) ( cause ) ) ; } throw e ; } return result ; }
Source:
public boolean createForward ( int localPort , int remotePort ) { try { return com.android.ddmlib.AdbHelper.createForward ( AndroidDebugBridge.sSocketAddr , this , localPort , remotePort ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( "adb-forward" , e ) ; return false ; } }

Target:
public boolean createForward ( int localPort , int remotePort ) { try { return com.android.ddmlib.AdbHelper.createForward ( com.android.ddmlib.AndroidDebugBridge.getSocketAddress ( ) , this , localPort , remotePort ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( "adb-forward" , e ) ; return false ; } }
Source:
com.android.sched.vfs.DirectFS.DirectVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.DirectFS.DirectVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File file = new java.io.File ( parent.getNativePath ( ) , name ) ; try { com.android.sched.util.file.Directory.create ( file , new com.android.sched.util.location.DirectoryLocation ( file ) ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { } return new com.android.sched.vfs.DirectFS.DirectNonRootVDir ( this , parent , name ) ; }

Target:
void delete ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file ) throws com.android.sched.util.file.CannotDeleteFileException { assert ! ( isClosed ( ) ) ; assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; if ( ( ! ( path.delete ( ) ) ) || ( path.exists ( ) ) ) { throw new com.android.sched.util.file.CannotDeleteFileException ( file.getLocation ( ) ) ; } }
Source:
public void testRegistrationCallbackSendCurrentStateDisconnected ( ) throws android.os.RemoteException { android.telephony.ims.internal.stub.ImsRegistrationImplBase.Callback mCallback2 = org.mockito.Mockito.spy ( new android.telephony.ims.internal.stub.ImsRegistrationImplBase.Callback ( ) ) ; com.android.ims.ImsReasonInfo info = new com.android.ims.ImsReasonInfo ( com.android.ims.ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; mRegBinder.addRegistrationCallback ( mCallback2 ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; org.mockito.Mockito.verify ( mCallback2 ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; }

Target:
public void testRegistrationCallbackGetRegistrationTechDisconnected ( ) throws android.os.RemoteException { com.android.ims.ImsReasonInfo info = new com.android.ims.ImsReasonInfo ( com.android.ims.ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; junit.framework.Assert.assertEquals ( ImsRegistrationImplBase.REGISTRATION_TECH_NONE , mRegBinder.getRegistrationTechnology ( ) ) ; }
Source:
public java.lang.String next ( java.util.regex.Pattern pattern ) { checkOpen ( ) ; checkNotNull ( pattern ) ; matchSuccessful = false ; saveCurrentStatus ( ) ; if ( ! ( setTokenRegion ( ) ) ) { recoverPreviousStatus ( ) ; throw new java.util.NoSuchElementException ( ) ; } matcher.usePattern ( pattern ) ; if ( ! ( matcher.matches ( ) ) ) { recoverPreviousStatus ( ) ; throw new java.util.InputMismatchException ( ) ; } matchSuccessful = true ; return matcher.group ( ) ; }

Target:
public java.lang.String next ( java.util.regex.Pattern pattern ) { checkOpen ( ) ; checkNotNull ( pattern ) ; matchSuccessful = false ; prepareForScan ( ) ; if ( ! ( setTokenRegion ( ) ) ) { recoverPreviousStatus ( ) ; throw new java.util.NoSuchElementException ( ) ; } matcher.usePattern ( pattern ) ; if ( ! ( matcher.matches ( ) ) ) { recoverPreviousStatus ( ) ; throw new java.util.InputMismatchException ( ) ; } matchSuccessful = true ; return matcher.group ( ) ; }
Source:
public static com.android.server.connectivity.DnsManager.PrivateDnsConfig tryBlockingResolveOf ( android.net.Network network , java.lang.String name ) { final android.system.StructAddrinfo hints = new android.system.StructAddrinfo ( ) ; hints.ai_flags = 0 ; hints.ai_family = android.system.OsConstants.AF_UNSPEC ; hints.ai_socktype = android.system.OsConstants.SOCK_DGRAM ; try { final java.net.InetAddress [ ] ips = Libcore.os.android_getaddrinfo ( name , hints , network.netId ) ; if ( ( ips != null ) && ( ( ips.length ) > 0 ) ) { return new com.android.server.connectivity.DnsManager.PrivateDnsConfig ( name , ips ) ; } } catch ( android.system.GaiException ignored ) { } return null ; }

Target:
public static com.android.server.connectivity.DnsManager.PrivateDnsConfig tryBlockingResolveOf ( android.net.Network network , java.lang.String name ) { try { final java.net.InetAddress [ ] ips = android.net.dns.ResolvUtil.blockingResolveAllLocally ( network , name ) ; return new com.android.server.connectivity.DnsManager.PrivateDnsConfig ( name , ips ) ; } catch ( java.net.UnknownHostException uhe ) { return new com.android.server.connectivity.DnsManager.PrivateDnsConfig ( name , null ) ; } }
Source:
public static org.w3c.dom.Node getParentMethod ( @ com.android.annotations.NonNull org.w3c.dom.Node node ) { org.w3c.dom.Node current = node.getParent ( ) ; while ( ( ( current != null ) && ( ! ( current instanceof lombok.ast.MethodDeclaration ) ) ) && ( ! ( current instanceof lombok.ast.ConstructorDeclaration ) ) ) { current = current.getParent ( ) ; } return current ; }

Target:
private static boolean isCharacterType ( com.intellij.psi.PsiType type ) { if ( type == ( com.intellij.psi.PsiType.CHAR ) ) { return true ; } if ( type instanceof com.intellij.psi.PsiClassType ) { java.lang.String fqn = type.getCanonicalText ( ) ; return com.android.tools.lint.client.api.JavaParser.TYPE_CHARACTER_WRAPPER.equals ( fqn ) ; } return false ; }
Source:
public void testKeyStore_GetCertificateAlias_NonExist_Failure ( ) throws java.lang.Exception { mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.Certificate userCert = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_USER_1 ) ) ; assertNull ( "Stored certificate alias should be found" , mKeyStore.getCertificateAlias ( userCert ) ) ; }

Target:
public void testKeyStore_GetCertificateAlias_NonExist_Encrypted_Failure ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.Certificate userCert = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_USER_1 ) ) ; assertNull ( "Stored certificate alias should be found" , mKeyStore.getCertificateAlias ( userCert ) ) ; }
Source:
public void test_SSLEngine_getSupportedProtocols ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; javax.net.ssl.SSLEngine e = c.clientContext.createSSLEngine ( ) ; java.lang.String [ ] protocols = e.getSupportedProtocols ( ) ; libcore.java.security.StandardNames.assertSupportedProtocols ( StandardNames.SSL_SOCKET_PROTOCOLS_SSLENGINE , protocols ) ; assertNotSame ( protocols , e.getSupportedProtocols ( ) ) ; c.close ( ) ; }

Target:
public void test_SSLEngine_getSupportedProtocols ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext c = libcore.javax.net.ssl.TestSSLContext.create ( ) ; javax.net.ssl.SSLEngine e = c.clientContext.createSSLEngine ( ) ; java.lang.String [ ] protocols = e.getSupportedProtocols ( ) ; libcore.java.security.StandardNames.assertSSLEngineSupportedProtocols ( protocols ) ; assertNotSame ( protocols , e.getSupportedProtocols ( ) ) ; c.close ( ) ; }
Source:
public void testOnVendorSpecificHeadsetEvent_testCorrectPlantronicsXEvent ( ) { org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.onVendorSpecificHeadsetEvent ( com.android.bluetooth.btservice.RemoteDevicesTest.getVendorSpecificHeadsetEventIntent ( BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT , BluetoothAssignedNumbers.PLANTRONICS , BluetoothHeadset.AT_CMD_TYPE_SET , com.android.bluetooth.btservice.RemoteDevicesTest.getXEventArray ( 3 , 8 ) , mDevice1 ) ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( mIntentArgument.capture ( ) , mStringArgument.capture ( ) ) ; com.android.bluetooth.btservice.RemoteDevicesTest.verfyBatteryLevelChangedIntent ( mDevice1 , 37 , mIntentArgument ) ; org.junit.Assert.assertEquals ( AdapterService.BLUETOOTH_PERM , mStringArgument.getValue ( ) ) ; }

Target:
public void testOnVendorSpecificHeadsetEvent_testCorrectPlantronicsXEvent ( ) { org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.onVendorSpecificHeadsetEvent ( com.android.bluetooth.btservice.RemoteDevicesTest.getVendorSpecificHeadsetEventIntent ( BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT , BluetoothAssignedNumbers.PLANTRONICS , BluetoothHeadset.AT_CMD_TYPE_SET , com.android.bluetooth.btservice.RemoteDevicesTest.getXEventArray ( 3 , 8 ) , mDevice1 ) ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( mIntentArgument.capture ( ) , mStringArgument.capture ( ) ) ; com.android.bluetooth.btservice.RemoteDevicesTest.verifyBatteryLevelChangedIntent ( mDevice1 , 37 , mIntentArgument ) ; org.junit.Assert.assertEquals ( AdapterService.BLUETOOTH_PERM , mStringArgument.getValue ( ) ) ; }
Source:
public android.net.IpSecTransform buildTransportModeTransform ( java.net.InetAddress localAddress ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { mConfig.setMode ( android.net.IpSecTransform.MODE_TRANSPORT ) ; mConfig.setLocalAddress ( localAddress.getHostAddress ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) . activate ( ) ; }

Target:
public android.net.IpSecTransform buildTunnelModeTransform ( @ android.annotation.NonNull java.net.InetAddress sourceAddress , @ android.annotation.NonNull android.net.IpSecManager.SecurityParameterIndex spi ) throws IpSecManager.ResourceUnavailableException , IpSecManager.SpiUnavailableException , java.io.IOException { com.android.internal.util.Preconditions.checkNotNull ( sourceAddress ) ; com.android.internal.util.Preconditions.checkNotNull ( spi ) ; if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setMode ( android.net.IpSecTransform.MODE_TUNNEL ) ; mConfig.setSourceAddress ( sourceAddress.getHostAddress ( ) ) ; mConfig.setSpiResourceId ( spi.getResourceId ( ) ) ; return new android.net.IpSecTransform ( mContext , mConfig ) ; }
Source:
public static java.util.TimeZone getSystemDefault ( ) { synchronized ( libcore.util.ZoneInfoDB.LOCK ) { org.apache.harmony.luni.internal.util.TimezoneGetter tzGetter = org.apache.harmony.luni.internal.util.TimezoneGetter.getInstance ( ) ; java.lang.String zoneName = ( tzGetter != null ) ? tzGetter.getId ( ) : null ; if ( zoneName != null ) { zoneName = zoneName.trim ( ) ; } if ( ( zoneName == null ) || ( zoneName.isEmpty ( ) ) ) { zoneName = "localtime" ; } return java.util.TimeZone.getTimeZone ( zoneName ) ; } }

Target:
public java.util.TimeZone makeTimeZone ( java.lang.String id ) throws java.io.IOException { int index = java.util.Arrays.binarySearch ( ids , id ) ; if ( index < 0 ) { return null ; } libcore.io.BufferIterator it = mappedFile.bigEndianIterator ( ) ; it.skip ( byteOffsets [ index ] ) ; return libcore.util.ZoneInfo.makeTimeZone ( id , it ) ; }
Source:
public static com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier getQualifier ( java.lang.String segment ) { java.util.regex.Matcher m = com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier.sCountryCodePattern.matcher ( segment ) ; if ( m.matches ( ) ) { java.lang.String v = m.group ( 1 ) ; int code = - 1 ; try { code = java.lang.Integer.parseInt ( v ) ; } catch ( java.lang.NumberFormatException e ) { return null ; } com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier ( ) ; qualifier.mVersion = code ; return qualifier ; } return null ; }

Target:
public static com.android.ide.common.resources.configuration.VersionQualifier getQualifier ( java.lang.String segment ) { java.util.regex.Matcher m = com.android.ide.common.resources.configuration.VersionQualifier.sCountryCodePattern.matcher ( segment ) ; if ( m.matches ( ) ) { java.lang.String v = m.group ( 1 ) ; int code = - 1 ; try { code = java.lang.Integer.parseInt ( v ) ; } catch ( java.lang.NumberFormatException e ) { return null ; } com.android.ide.common.resources.configuration.VersionQualifier qualifier = new com.android.ide.common.resources.configuration.VersionQualifier ( ) ; qualifier.mVersion = code ; return qualifier ; } return null ; }
Source:
void removeClient ( com.android.ddmlib.Client client , boolean notify ) { mMonitor.addPortToAvailableList ( client.getDebuggerListenPort ( ) ) ; synchronized ( mClients ) { mClients.remove ( client ) ; } if ( notify ) { mMonitor.getServer ( ) . deviceChanged ( this , com.android.ddmlib.CHANGE_CLIENT_LIST ) ; } }

Target:
void addClient ( com.android.ddmlib.Client client ) { synchronized ( mClients ) { mClients.add ( client ) ; } addClientInfo ( client ) ; }
Source:
public void execute ( org.gradle.api.Task task ) { task.dependsOn ( other ) ; }

Target:
public void execute ( org.gradle.api.Task task ) { for ( java.lang.Object dependency : dependencies ) { if ( dependency instanceof com.android.build.gradle.internal.scope.AndroidTask ) { task.dependsOn ( ( ( com.android.build.gradle.internal.scope.AndroidTask ) ( dependency ) ) . getName ( ) ) ; } else { task.dependsOn ( dependency ) ; } } }
Source:
public boolean enableNdefPush ( ) throws android.os.RemoteException { com.android.nfc.NfcPermissions.enforceAdminPermissions ( mContext ) ; synchronized ( this ) { if ( mIsNdefPushEnabled ) { return true ; } android.util.Log.i ( com.android.nfc.NfcService.TAG , "enabling NDEF Push" ) ; mPrefsEditor.putBoolean ( com.android.nfc.NfcService.PREF_NDEF_PUSH_ON , true ) ; mPrefsEditor.apply ( ) ; mIsNdefPushEnabled = true ; setBeamShareActivityState ( true ) ; if ( isNfcEnabled ( ) ) { mP2pLinkManager.enableDisable ( true , true ) ; } mBackupManager.dataChanged ( ) ; } return true ; }

Target:
public boolean enableNdefPush ( ) throws android.os.RemoteException { com.android.nfc.NfcPermissions.enforceAdminPermissions ( mContext ) ; synchronized ( this ) { if ( mIsNdefPushEnabled ) { return true ; } android.util.Log.i ( com.android.nfc.NfcService.TAG , "enabling NDEF Push" ) ; mPrefsEditor.putBoolean ( com.android.nfc.NfcService.PREF_NDEF_PUSH_ON , true ) ; mPrefsEditor.apply ( ) ; mIsNdefPushEnabled = true ; enforceBeamShareActivityPolicy ( mContext , new android.os.UserHandle ( mUserId ) ) ; if ( isNfcEnabled ( ) ) { mP2pLinkManager.enableDisable ( true , true ) ; } mBackupManager.dataChanged ( ) ; } return true ; }
Source:
private void handleIccFull ( ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SIM_FULL_ACTION ) ; mWakeLock.acquire ( com.android.internal.telephony.SmsStorageMonitor.WAKE_LOCK_TIMEOUT ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , mPhone.getPhoneId ( ) ) ; mContext.sendBroadcast ( intent , android.Manifest.permission.RECEIVE_SMS ) ; }

Target:
private void handleIccFull ( ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SIM_FULL_ACTION ) ; intent.setComponent ( com.android.internal.telephony.SmsApplication.getDefaultSimFullApplication ( mContext , false ) ) ; mWakeLock.acquire ( com.android.internal.telephony.SmsStorageMonitor.WAKE_LOCK_TIMEOUT ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , mPhone.getPhoneId ( ) ) ; mContext.sendBroadcast ( intent , android.Manifest.permission.RECEIVE_SMS ) ; }
Source:
private com.android.ddmuilib.logcat.LogCatFilter findTransientAppFilter ( java.lang.String appName ) { for ( com.android.ddmuilib.logcat.LogCatFilter f : mLogCatFilters ) { if ( ( f.isTransient ( ) ) && ( f.getAppName ( ) . equals ( appName ) ) ) { return f ; } } return null ; }

Target:
private com.android.ddmlib.logcat.LogCatFilter findTransientAppFilter ( java.lang.String appName ) { for ( com.android.ddmlib.logcat.LogCatFilter f : mLogCatFilters ) { com.android.ddmuilib.logcat.LogCatFilterData fd = mLogCatFilterData.get ( f ) ; if ( ( ( fd != null ) && ( fd.isTransient ( ) ) ) && ( f.getAppName ( ) . equals ( appName ) ) ) { return f ; } } return null ; }
Source:
synchronized void nScriptSetVarV ( long id , int slot , byte [ ] val ) { validate ( ) ; rsnScriptSetVarV ( mContext , id , slot , val ) ; }

Target:
synchronized long nIncTypeCreate ( long eid , int x , int y , int z , boolean mips , boolean faces , int yuv ) { validate ( ) ; return rsnIncTypeCreate ( mIncCon , eid , x , y , z , mips , faces , yuv ) ; }
Source:
private boolean findMinAbsNaN ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinAbs ( RS , createInputArrayFloat ( size [ 0 ] , seed ) , "findMinAbsNaN" , ( com.android.rs.test.Allocation input ) -> s.reduce_findMinAbsNaN ( input ) . get ( ) ) ; }

Target:
private boolean findMinAbsNaN ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinAbs ( RS , createInputArrayFloat ( size [ 0 ] , seed ) , "findMinAbsNaN" , ( android.renderscript.Allocation input ) -> s.reduce_findMinAbsNaN ( input ) . get ( ) ) ; }
Source:
private void open ( ) { mConnectionPtr = android.database.sqlite.SQLiteConnection.nativeOpen ( mConfiguration.path , mConfiguration.openFlags , mConfiguration.label , SQLiteDebug.DEBUG_SQL_STATEMENTS , SQLiteDebug.DEBUG_SQL_TIME ) ; setPageSize ( ) ; setForeignKeyModeFromConfiguration ( ) ; setWalModeFromConfiguration ( ) ; setJournalSizeLimit ( ) ; setAutoCheckpointInterval ( ) ; setLocaleFromConfiguration ( ) ; }

Target:
private void open ( ) { mConnectionPtr = android.database.sqlite.SQLiteConnection.nativeOpen ( mConfiguration.path , mConfiguration.openFlags , mConfiguration.label , SQLiteDebug.DEBUG_SQL_STATEMENTS , SQLiteDebug.DEBUG_SQL_TIME ) ; setPageSize ( ) ; setForeignKeyModeFromConfiguration ( ) ; setWalModeFromConfiguration ( ) ; setJournalSizeLimit ( ) ; setAutoCheckpointInterval ( ) ; setLocaleFromConfiguration ( ) ; final int functionCount = mConfiguration.customFunctions.size ( ) ; for ( int i = 0 ; i < functionCount ; i ++ ) { android.database.sqlite.SQLiteCustomFunction function = mConfiguration.customFunctions.get ( i ) ; android.database.sqlite.SQLiteConnection.nativeRegisterCustomFunction ( mConnectionPtr , function ) ; } }
Source:
public void setHs20 ( boolean hs20 ) { if ( hs20 ) { doBooleanCommand ( "SET HS20 1" ) ; } else { doBooleanCommand ( "SET HS20 0" ) ; } }

Target:
public boolean startWpsPinKeypad ( java.lang.String iface , java.lang.String pin ) { if ( android.text.TextUtils.isEmpty ( pin ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPinKeypad ( iface , pin ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PIN any " ) + pin ) ) ; } } }
Source:
public void copyTo ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt8 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , byte [ ] data ) { validateIsInt8 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_8 , data.length ) ; }