auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAesCbcHmacMd5Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1000 , false ) ; }
Source:
private void reportConnectionAttemptEnd ( int level2FailureCode , int connectivityFailureCode ) { mWifiMetrics.endConnectionEvent ( level2FailureCode , connectivityFailureCode ) ; switch ( level2FailureCode ) { case WifiMetrics.ConnectionEvent.FAILURE_NONE : case WifiMetrics.ConnectionEvent.FAILURE_REDUNDANT_CONNECTION_ATTEMPT : case WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED : break ; default : mWifiDiagnostics.reportConnectionFailure ( ) ; } }

Target:
private void reportConnectionAttemptEnd ( int level2FailureCode , int connectivityFailureCode ) { mWifiMetrics.endConnectionEvent ( level2FailureCode , connectivityFailureCode ) ; switch ( level2FailureCode ) { case WifiMetrics.ConnectionEvent.FAILURE_NONE : mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED ) ; break ; case WifiMetrics.ConnectionEvent.FAILURE_REDUNDANT_CONNECTION_ATTEMPT : case WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED : break ; default : mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; } }
Source:
private static java.util.HashSet < android.net.IpPrefix > allOffloadExemptPrefixes ( java.lang.Iterable < android.net.NetworkState > netStates ) { final java.util.HashSet < android.net.IpPrefix > prefixSet = new java.util.HashSet < > ( ) ; com.android.server.connectivity.tethering.UpstreamNetworkMonitor.addDefaultLocalPrefixes ( prefixSet ) ; for ( android.net.NetworkState ns : netStates ) { com.android.server.connectivity.tethering.UpstreamNetworkMonitor.addOffloadExemptPrefixes ( prefixSet , ns.linkProperties ) ; } return prefixSet ; }

Target:
private static java.util.HashSet < android.net.IpPrefix > allLocalPrefixes ( java.lang.Iterable < android.net.NetworkState > netStates ) { final java.util.HashSet < android.net.IpPrefix > prefixSet = new java.util.HashSet < > ( ) ; for ( android.net.NetworkState ns : netStates ) { final android.net.LinkProperties lp = ns.linkProperties ; if ( lp == null ) continue ; prefixSet.addAll ( android.net.util.PrefixUtils.localPrefixesFrom ( lp ) ) ; } return prefixSet ; }
Source:
private int removeDataDirsLI ( java.lang.String volumeUuid , java.lang.String packageName ) { int [ ] users = com.android.server.pm.PackageManagerService.sUserManager.getUserIds ( ) ; int res = 0 ; for ( int user : users ) { int resInner = mInstaller.remove ( volumeUuid , packageName , user ) ; if ( resInner < 0 ) { res = resInner ; } } return res ; }

Target:
public byte [ ] getEphemeralApplicationCookie ( java.lang.String packageName , int userId ) { if ( com.android.server.pm.PackageManagerService.DISABLE_EPHEMERAL_APPS ) { return null ; } enforceCrossUserPermission ( android.os.Binder.getCallingUid ( ) , userId , true , false , "getCookie" ) ; if ( ! ( isCallerSameApp ( packageName ) ) ) { return null ; } synchronized ( mPackages ) { return mEphemeralApplicationRegistry.getEphemeralApplicationCookieLPw ( packageName , userId ) ; } }
Source:
protected org.eclipse.swt.widgets.Control createContents ( org.eclipse.swt.widgets.Composite parent ) { org.eclipse.swt.widgets.Control control = super . createContents ( parent ) ; getShell ( ) . setText ( "Create new Android Virtual Device (AVD)" ) ; mOkButton = getButton ( IDialogConstants.OK_ID ) ; validatePage ( ) ; return control ; }

Target:
protected org.eclipse.swt.widgets.Control createContents ( org.eclipse.swt.widgets.Composite parent ) { org.eclipse.swt.widgets.Control control = super . createContents ( parent ) ; getShell ( ) . setText ( ( ( mEditAvdInfo ) == null ? "Create new Android Virtual Device (AVD)" : "Edit Android Virtual Device (AVD)" ) ) ; mOkButton = getButton ( IDialogConstants.OK_ID ) ; fillExistingAvdInfo ( ) ; validatePage ( ) ; return control ; }
Source:
private void assertContainsNoneMatching ( java.util.List < java.lang.String > list , java.lang.String pattern ) { for ( java.lang.String header : list ) { if ( header.matches ( pattern ) ) { fail ( ( ( ( "Header " + header ) + " matches " ) + pattern ) ) ; } } }

Target:
private void assertContainsNoneMatching ( java.util.List < java.lang.String > list , java.lang.String pattern ) { for ( java.lang.String header : list ) { if ( header.matches ( pattern ) ) { org.junit.Assert.fail ( ( ( ( "Header " + header ) + " matches " ) + pattern ) ) ; } } }
Source:
private static boolean isProfileDisabled ( android.content.Context context , java.lang.Class profile ) { final int profileIndex = com.android.bluetooth.btservice.Config.getProfileIndex ( profile ) ; if ( profileIndex == ( - 1 ) ) { android.util.Log.w ( com.android.bluetooth.btservice.Config.TAG , "Could not find profile bit mask" ) ; return false ; } final android.content.ContentResolver resolver = context.getContentResolver ( ) ; final long disabledProfilesBitMask = Settings.Global.getLong ( resolver , Settings.Global.BLUETOOTH_DISABLED_PROFILES , 0 ) ; final long profileBit = 1 << profileIndex ; return ( disabledProfilesBitMask & profileBit ) != 0 ; }

Target:
private static boolean isProfileDisabled ( android.content.Context context , long profileMask ) { final android.content.ContentResolver resolver = context.getContentResolver ( ) ; final long disabledProfilesBitMask = Settings.Global.getLong ( resolver , Settings.Global.BLUETOOTH_DISABLED_PROFILES , 0 ) ; return ( disabledProfilesBitMask & profileMask ) != 0 ; }
Source:
boolean recordUidIfAuthorized ( android.net.wifi.WifiConfiguration config , int uid , boolean onlyAnnotate ) { if ( ! ( mWifiConfigManager.isNetworkConfigured ( config ) ) ) { config.creatorUid = uid ; config.creatorName = mContext.getPackageManager ( ) . getNameForUid ( uid ) ; } else if ( ! ( mWifiConfigManager.canModifyNetwork ( uid , config , onlyAnnotate ) ) ) { return false ; } config.lastUpdateUid = uid ; config.lastUpdateName = mContext.getPackageManager ( ) . getNameForUid ( uid ) ; return true ; }

Target:
public void setAllowScansWithTraffic ( int enabled ) { mAlwaysEnableScansWhileAssociated = enabled ; }
Source:
public void setUp ( ) throws java.lang.Exception { mContext = getInstrumentation ( ) . getContext ( ) ; mHandlerThread = new android.os.HandlerThread ( "EmbmsCtsTestWorker" ) ; mHandlerThread.start ( ) ; mCallbackHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; getControlBinder ( ) ; setupStreamingSession ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mContext = getInstrumentation ( ) . getContext ( ) ; mHandlerThread = new android.os.HandlerThread ( "EmbmsCtsTestWorker" ) ; mHandlerThread.start ( ) ; mCallbackHandler = new android.os.Handler ( mHandlerThread.getLooper ( ) ) ; mCallback = new android.telephony.embms.cts.MbmsStreamingTestBase.TestCallback ( ) ; getControlBinder ( ) ; setupStreamingSession ( ) ; }
Source:
protected void onPostExecute ( java.lang.Boolean isBlocked ) { com.android.server.telecom.callfiltering.CallFilteringResult result ; if ( isBlocked ) { result = new com.android.server.telecom.callfiltering.CallFilteringResult ( false , true , false , false ) ; } else { result = new com.android.server.telecom.callfiltering.CallFilteringResult ( true , false , true , true ) ; } com.android.server.telecom.Log.event ( mIncomingCall , Log.Events.BLOCK_CHECK_FINISHED , result ) ; mCallback.onCallFilteringComplete ( mIncomingCall , result ) ; }

Target:
protected void onPostExecute ( java.lang.Boolean isBlocked ) { com.android.server.telecom.callfiltering.CallFilteringResult result ; if ( isBlocked ) { result = new com.android.server.telecom.callfiltering.CallFilteringResult ( false , true , false , false ) ; } else { result = new com.android.server.telecom.callfiltering.CallFilteringResult ( true , false , true , true ) ; } android.telecom.Log.addEvent ( mIncomingCall , LogUtils.Events.BLOCK_CHECK_FINISHED , result ) ; mCallback.onCallFilteringComplete ( mIncomingCall , result ) ; }
Source:
public void enableIms ( ) throws android.os.RemoteException { mCompatFeature.turnOnIms ( ) ; }

Target:
public void onFeatureRemoved ( ) { mContext.unregisterReceiver ( mReceiver ) ; try { mCompatFeature.endSession ( mSessionId ) ; mCompatFeature.removeRegistrationListener ( mListener ) ; if ( ( mRegCompatAdapter ) != null ) { mCompatFeature.removeRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "onFeatureRemoved: Couldn't end session: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public static synchronized com.android.bluetooth.hfp.HeadsetService getHeadsetService ( ) { if ( ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService ) == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "getHeadsetService(): service is NULL" ) ; return null ; } if ( ! ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService.isAvailable ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "getHeadsetService(): service is not available" ) ; return null ; } com.android.bluetooth.hfp.HeadsetService.logD ( ( "getHeadsetService(): returning " + ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService ) ) ) ; return com.android.bluetooth.hfp.HeadsetService.sHeadsetService ; }

Target:
public boolean setPriority ( android.bluetooth.BluetoothDevice device , int priority ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; Settings.Global.putInt ( getContentResolver ( ) , Settings.Global.getBluetoothHeadsetPriorityKey ( device.getAddress ( ) ) , priority ) ; if ( com.android.bluetooth.hfp.HeadsetService.DBG ) { android.util.Log.d ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( ( "Saved priority " + device ) + " = " ) + priority ) ) ; } return true ; }
Source:
public void testZipFileWithLotsOfEntries ( ) throws java.io.IOException { int expectedEntryCount = ( 64 * 1024 ) - 1 ; java.io.File f = createZipFile ( expectedEntryCount , 0 ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( expectedEntryCount , entryCount ) ; zipFile.close ( ) ; }

Target:
public void testZipFileWithLotsOfEntries ( ) throws java.io.IOException { int expectedEntryCount = ( 64 * 1024 ) - 1 ; java.io.File f = libcore.java.util.zip.ZipFileTest.createZipFile ( expectedEntryCount , 0 ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( expectedEntryCount , entryCount ) ; zipFile.close ( ) ; }
Source:
private boolean maybeReadSample ( com.android.tv.tuner.exoplayer.buffer.SampleQueue queue , int index ) { if ( ( ( ( queue.getLastQueuedPositionUs ( ) ) != null ) && ( ( queue.getLastQueuedPositionUs ( ) ) > ( ( mCurrentPlaybackPositionUs ) + ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.BUFFER_NEEDED_US ) ) ) ) && ( queue.isDurationGreaterThan ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.CHUNK_DURATION_US ) ) ) { return false ; } com.google.android.exoplayer.SampleHolder sample = mSampleChunkIoHelper.readSample ( index ) ; if ( sample != null ) { queue.queueSample ( sample ) ; return true ; } return false ; }

Target:
private boolean maybeReadSample ( com.android.tv.tuner.exoplayer.buffer.SampleQueue queue , int index ) { if ( ( ( ( queue.getLastQueuedPositionUs ( ) ) != null ) && ( ( queue.getLastQueuedPositionUs ( ) ) > ( ( mCurrentPlaybackPositionUs ) + ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.BUFFER_NEEDED_US ) ) ) ) && ( queue.isDurationGreaterThan ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.MIN_SEEK_DURATION_US ) ) ) { return false ; } com.google.android.exoplayer.SampleHolder sample = mSampleChunkIoHelper.readSample ( index ) ; if ( sample != null ) { queue.queueSample ( sample ) ; return true ; } return false ; }
Source:
public void badData ( ) { com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; com.android.builder.model.SyncIssue issue = new com.android.build.gradle.integration.common.truth.IssueSubjectTest.FakeIssue ( 1 , 2 , "foo" ) ; com.android.build.gradle.integration.common.truth.IssueSubject subject = new com.android.build.gradle.integration.common.truth.IssueSubject ( failure , issue ) ; subject.hasData ( "bar" ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "Not true that <1|2|foo> has data <bar>. It is <foo>" ) ; }

Target:
public void badData ( ) { com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; com.android.builder.model.SyncIssue issue = new com.android.build.gradle.integration.common.truth.IssueSubjectTest.FakeIssue ( 1 , 2 , "foo" ) ; com.android.build.gradle.integration.common.truth.IssueSubject subject = new com.android.build.gradle.integration.common.truth.IssueSubject ( failure , issue ) ; subject.hasData ( "bar" ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . isEqualTo ( "Not true that <1|2|foo> has data <bar>. It is <foo>" ) ; }
Source:
public void testUpdateBatteryLevel_errorNegativeValue ( ) { com.android.bluetooth.btservice.RemoteDevices remoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; int batteryLevel = - 1 ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; remoteDevices.updateBatteryLevel ( mDevice1 , batteryLevel ) ; org.mockito.Mockito.verify ( mAdapterService , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testUpdateBatteryLevel_errorNegativeValue ( ) { int batteryLevel = android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.updateBatteryLevel ( mDevice1 , batteryLevel ) ; org.mockito.Mockito.verify ( mAdapterService , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }
Source:
public void onSuccess ( ) { if ( url.isNull ( ) ) { return ; } if ( dialog.isOpenInBrowser ( ) ) { com.intellij.ide.BrowserUtil.launchBrowser ( url.get ( ) ) ; } else { org.jetbrains.plugins.github.GithubNotifications.showInfoURL ( project , "Gist Created Successfully" , "Your gist url" , url.get ( ) ) ; } }

Target:
public void onSuccess ( ) { if ( url.isNull ( ) ) { return ; } if ( dialog.isOpenInBrowser ( ) ) { com.intellij.ide.BrowserUtil.launchBrowser ( url.get ( ) ) ; } else { org.jetbrains.plugins.github.util.GithubNotifications.showInfoURL ( project , "Gist Created Successfully" , "Your gist url" , url.get ( ) ) ; } }
Source:
public com.google.common.collect.ImmutableList < com.android.manifmerger.XmlNode.NodeName > getRecordedAttributeNames ( com.android.manifmerger.XmlNode.NodeKey nodeKey ) { com.android.manifmerger.Actions.DecisionTreeRecord decisionTreeRecord = mRecords.get ( nodeKey ) ; if ( decisionTreeRecord == null ) { return com.google.common.collect.ImmutableList.of ( ) ; } return decisionTreeRecord.getAttributesRecords ( ) . keySet ( ) . asList ( ) ; }

Target:
public com.google.common.collect.ImmutableList < com.android.manifmerger.Actions.AttributeRecord > getAttributeRecords ( com.android.manifmerger.XmlNode.NodeKey elementKey , com.android.manifmerger.XmlNode.NodeName attributeName ) { com.android.manifmerger.Actions.DecisionTreeRecord decisionTreeRecord = mRecords.get ( elementKey ) ; if ( decisionTreeRecord == null ) { return com.google.common.collect.ImmutableList.of ( ) ; } return decisionTreeRecord.getAttributeRecords ( attributeName ) ; }
Source:
public long get ( int index ) { if ( index >= ( mSize ) ) { throw new java.lang.ArrayIndexOutOfBoundsException ( mSize , index ) ; } return mValues [ index ] ; }

Target:
public void resize ( int newSize ) { com.android.internal.util.Preconditions.checkArgumentNonnegative ( newSize ) ; if ( newSize <= ( mValues.length ) ) { java.util.Arrays.fill ( mValues , newSize , mValues.length , 0 ) ; } else { ensureCapacity ( ( newSize - ( mSize ) ) ) ; } mSize = newSize ; }
Source:
private static java.io.FileDescriptor [ ] createCommSocketPair ( ) throws java.io.IOException { try { final java.io.FileDescriptor comm1 = new java.io.FileDescriptor ( ) ; final java.io.FileDescriptor comm2 = new java.io.FileDescriptor ( ) ; Libcore.os.socketpair ( libcore.io.OsConstants.AF_UNIX , libcore.io.OsConstants.SOCK_STREAM , 0 , comm1 , comm2 ) ; libcore.io.IoUtils.setBlocking ( comm1 , false ) ; libcore.io.IoUtils.setBlocking ( comm2 , false ) ; return new java.io.FileDescriptor [ ] { comm1 , comm2 } ; } catch ( libcore.io.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }

Target:
private static java.io.FileDescriptor [ ] createCommSocketPair ( ) throws java.io.IOException { try { final java.io.FileDescriptor comm1 = new java.io.FileDescriptor ( ) ; final java.io.FileDescriptor comm2 = new java.io.FileDescriptor ( ) ; android.system.Os.socketpair ( android.system.OsConstants.AF_UNIX , android.system.OsConstants.SOCK_STREAM , 0 , comm1 , comm2 ) ; libcore.io.IoUtils.setBlocking ( comm1 , false ) ; libcore.io.IoUtils.setBlocking ( comm2 , false ) ; return new java.io.FileDescriptor [ ] { comm1 , comm2 } ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }
Source:
public void notifyDexLoad ( android.content.pm.ApplicationInfo loadingAppInfo , java.util.List < java.lang.String > dexPaths , java.lang.String loaderIsa , int loaderUserId ) { try { notifyDexLoadInternal ( loadingAppInfo , dexPaths , loaderIsa , loaderUserId ) ; } catch ( java.lang.Exception e ) { android.util.Slog.w ( com.android.server.pm.dex.DexManager.TAG , ( "Exception while notifying dex load for package " + ( loadingAppInfo.packageName ) ) , e ) ; } }

Target:
public void notifyDexLoad ( android.content.pm.ApplicationInfo loadingAppInfo , java.util.List < java.lang.String > classLoadersNames , java.util.List < java.lang.String > classPaths , java.lang.String loaderIsa , int loaderUserId ) { try { notifyDexLoadInternal ( loadingAppInfo , classLoadersNames , classPaths , loaderIsa , loaderUserId ) ; } catch ( java.lang.Exception e ) { android.util.Slog.w ( com.android.server.pm.dex.DexManager.TAG , ( "Exception while notifying dex load for package " + ( loadingAppInfo.packageName ) ) , e ) ; } }
Source:
public void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; com.android.internal.telephony.gsm.stk.StkLog.d ( this , "onCreate" ) ; requestWindowFeature ( Window.FEATURE_NO_TITLE ) ; setContentView ( R.layout.stk_menu_list ) ; mTitleTextView = ( ( android.widget.TextView ) ( findViewById ( R.id.title_text ) ) ) ; mTitleIconView = ( ( android.widget.ImageView ) ( findViewById ( R.id.title_icon ) ) ) ; mProgressView = ( ( android.widget.ProgressBar ) ( findViewById ( R.id.progress_bar ) ) ) ; mContext = getBaseContext ( ) ; initFromIntent ( getIntent ( ) ) ; mAcceptUsersInput = true ; }

Target:
public void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; com.android.internal.telephony.cat.CatLog.d ( this , "onCreate" ) ; requestWindowFeature ( Window.FEATURE_NO_TITLE ) ; setContentView ( R.layout.stk_menu_list ) ; mTitleTextView = ( ( android.widget.TextView ) ( findViewById ( R.id.title_text ) ) ) ; mTitleIconView = ( ( android.widget.ImageView ) ( findViewById ( R.id.title_icon ) ) ) ; mProgressView = ( ( android.widget.ProgressBar ) ( findViewById ( R.id.progress_bar ) ) ) ; mContext = getBaseContext ( ) ; initFromIntent ( getIntent ( ) ) ; mAcceptUsersInput = true ; }
Source:
protected void printMethodHeader ( com.android.jack.ir.ast.JMethod x ) { print ( com.android.jack.ir.ast.JModifier.getStringMethodModifier ( x.getModifier ( ) ) ) ; print ( formatter.getName ( x ) ) ; }

Target:
protected void printMethodHeader ( com.android.jack.ir.ast.JMethod x ) { print ( com.android.jack.ir.ast.JModifier.getStringMethodModifier ( x.getModifier ( ) ) ) ; printType ( x ) ; space ( ) ; printTypeName ( x.getEnclosingType ( ) ) ; print ( '.' ) ; printName ( x ) ; printParameterList ( x ) ; }
Source:
public boolean accept ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier ) { if ( ( ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.LanguageQualifier ) || ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier ) ) || ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier ) ) { return false ; } return true ; }

Target:
public boolean accept ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier ) { if ( ( ( ( ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.LanguageQualifier ) || ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.RegionQualifier ) ) || ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.DockModeQualifier ) ) || ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.NightModeQualifier ) ) || ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier ) ) { return false ; } return true ; }
Source:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpLoadLibrary ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method setValue = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; setValue.invoke ( intHolder , Main.nativeLibraryName ) ; return new java.lang.ref.WeakReference ( loader ) ; }

Target:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpLoadLibrary ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method loadLibrary = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; loadLibrary.invoke ( intHolder , Main.nativeLibraryName ) ; return new java.lang.ref.WeakReference ( loader ) ; }
Source:
void onCreate ( android.content.Intent intent , @ android.support.annotation.Nullable android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "PreCallCoordinatorImpl.onCreate" ) ; if ( savedInstanceState != null ) { currentActionIndex = savedInstanceState.getInt ( com.android.dialer.precall.impl.PreCallCoordinatorImpl.SAVED_STATE_CURRENT_ACTION ) ; builder = com.android.dialer.common.Assert.isNotNull ( savedInstanceState.getParcelable ( com.android.dialer.precall.impl.PreCallCoordinatorImpl.EXTRA_CALL_INTENT_BUILDER ) ) ; } else { builder = com.android.dialer.common.Assert.isNotNull ( intent.getParcelableExtra ( com.android.dialer.precall.impl.PreCallCoordinatorImpl.EXTRA_CALL_INTENT_BUILDER ) ) ; } actions = com.android.dialer.precall.PreCallComponent.get ( activity ) . getPreCall ( ) . getActions ( ) ; }

Target:
void onCreate ( android.content.Intent intent , @ android.support.annotation.Nullable android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "PreCallCoordinatorImpl.onCreate" ) ; if ( savedInstanceState != null ) { currentActionIndex = savedInstanceState.getInt ( com.android.dialer.precall.impl.PreCallCoordinatorImpl.SAVED_STATE_CURRENT_ACTION ) ; builder = com.android.dialer.common.Assert.isNotNull ( savedInstanceState.getParcelable ( com.android.dialer.precall.impl.EXTRA_CALL_INTENT_BUILDER ) ) ; } else { builder = com.android.dialer.common.Assert.isNotNull ( intent.getParcelableExtra ( com.android.dialer.precall.impl.EXTRA_CALL_INTENT_BUILDER ) ) ; } actions = com.android.dialer.precall.PreCallComponent.get ( activity ) . getPreCall ( ) . getActions ( ) ; }
Source:
public void testUpdateSubscribeInvalid ( ) { int sessionId = 1232 ; android.net.wifi.nan.SubscribeConfig subscribeConfig = new android.net.wifi.nan.SubscribeConfig.Builder ( ) . setServiceName ( "something.valid" ) . setServiceSpecificInfo ( new byte [ ( com.android.server.wifi.nan.WifiNanServiceImplTest.MAX_LENGTH ) + 1 ] ) . build ( ) ; int clientId = doConnect ( ) ; mDut.updateSubscribe ( clientId , sessionId , subscribeConfig ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . updateSubscribe ( clientId , sessionId , subscribeConfig ) ; }

Target:
public void testUpdateSubscribeInvalid ( ) { int sessionId = 1232 ; android.net.wifi.aware.SubscribeConfig subscribeConfig = new android.net.wifi.aware.SubscribeConfig.Builder ( ) . setServiceName ( "something.valid" ) . setServiceSpecificInfo ( new byte [ ( com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ) + 1 ] ) . build ( ) ; int clientId = doConnect ( ) ; mDut.updateSubscribe ( clientId , sessionId , subscribeConfig ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . updateSubscribe ( clientId , sessionId , subscribeConfig ) ; }
Source:
public void testVoiceCommand ( ) { android.content.pm.PackageManager packageManager = mContext.getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_MICROPHONE ) ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VOICE_COMMAND ) ; assertCanBeHandled ( intent ) ; assertDefaultHandlerValidPriority ( intent ) ; } }

Target:
public void testVoiceCommand ( ) { if ( com.android.compatibility.common.util.FeatureUtil.isLowRam ( ) ) { return ; } android.content.pm.PackageManager packageManager = mContext.getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_MICROPHONE ) ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VOICE_COMMAND ) ; assertCanBeHandled ( intent ) ; assertDefaultHandlerValidPriority ( intent ) ; } }
Source:
void assertAudioRoute ( final android.telecom.InCallService incallService , final int route ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return route ; } @ java.lang.Override public java.lang.Object actual ( ) { final android.telecom.CallAudioState state = incallService.getCallAudioState ( ) ; return state == null ? null : state.getRoute ( ) ; } } , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( "Phone's audio route should be: " + route ) ) ; }

Target:
void assertAudioRoute ( final android.telecom.InCallService incallService , final int route ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return route ; } @ java.lang.Override public java.lang.Object actual ( ) { final android.telecom.CallAudioState state = incallService.getCallAudioState ( ) ; return state == null ? null : state.getRoute ( ) ; } } , android.telecom.cts.TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( "Phone's audio route should be: " + route ) ) ; }
Source:
public void setIsTonePlaying ( boolean isTonePlaying ) { mIsTonePlaying = isTonePlaying ; mCallAudioModeStateMachine.sendMessageWithArgs ( ( isTonePlaying ? CallAudioModeStateMachine.TONE_STARTED_PLAYING : CallAudioModeStateMachine.TONE_STOPPED_PLAYING ) , makeArgsForModeStateMachine ( ) ) ; }

Target:
public void setIsTonePlaying ( boolean isTonePlaying ) { mIsTonePlaying = isTonePlaying ; mCallAudioModeStateMachine.sendMessageWithArgs ( ( isTonePlaying ? CallAudioModeStateMachine.TONE_STARTED_PLAYING : CallAudioModeStateMachine.TONE_STOPPED_PLAYING ) , makeArgsForModeStateMachine ( ) ) ; if ( ( ! isTonePlaying ) && ( mIsDisconnectedTonePlaying ) ) { mCallsManager.onDisconnectedTonePlaying ( false ) ; mIsDisconnectedTonePlaying = false ; } }
Source:
public void parseCacheHeaders_cacheControlNoCache ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now + ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; headers.put ( "Cache-Control" , "no-cache" ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNull ( entry ) ; }

Target:
public void parseCacheHeaders_cacheControlNoCache ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now + ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; headers.put ( "Cache-Control" , "no-cache" ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; org.junit.Assert.assertNull ( entry ) ; }
Source:
public void destroyUserData ( java.lang.String uuid , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.destroyUserData ( uuid , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void destroyAppProfiles ( java.lang.String packageName ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.destroyAppProfiles ( packageName ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void execute ( java.lang.Runnable command ) { new java.lang.Thread ( command , ( ( ( getServiceName ( ) ) + " " ) + state ) ) . start ( ) ; }

Target:
protected final void doStop ( ) { com.google.common.util.concurrent.MoreExecutors.renamingDecorator ( executor ( ) , threadNameSupplier ) . execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { try { shutDown ( ) ; notifyStopped ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } } } ) ; }
Source:
private void editSlideshow ( ) { android.net.Uri dataUri = mWorkingMessage.saveAsMms ( false ) ; if ( dataUri == null ) { return ; } android.content.Intent intent = new android.content.Intent ( this , com.android.mms.ui.SlideshowEditActivity.class ) ; intent.setData ( dataUri ) ; startActivityForResult ( intent , com.android.mms.ui.ComposeMessageActivity.REQUEST_CODE_CREATE_SLIDESHOW ) ; }

Target:
private void editSlideshow ( ) { getAsyncDialog ( ) . runAsync ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mTempMmsUri = mWorkingMessage.saveAsMms ( false ) ; } } , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( ( mTempMmsUri ) == null ) { return ; } android.content.Intent intent = new android.content.Intent ( com.android.mms.ui.ComposeMessageActivity.this , com.android.mms.ui.SlideshowEditActivity.class ) ; intent.setData ( mTempMmsUri ) ; startActivityForResult ( intent , com.android.mms.ui.ComposeMessageActivity.REQUEST_CODE_CREATE_SLIDESHOW ) ; } } , R.string.building_slideshow_title ) ; }
Source:
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 ( ) ; } android.telecom.PhoneAccountHandle handle = new android.telecom.PhoneAccountHandle ( android.content.ComponentName.unflattenFromString ( status.phoneAccountComponentName ) , status.phoneAccountId ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . onTosAccepted ( context , handle ) ; }

Target:
private boolean hasAcceptedTos ( ) { if ( isVvm3 ( ) ) { return ( preferences.getInt ( VoicemailVersionConstants.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , 0 ) ) >= ( com.android.voicemail.VoicemailVersionConstants.CURRENT_VVM3_TOS_VERSION ) ; } else { return ( preferences.getInt ( VoicemailVersionConstants.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , 0 ) ) >= ( com.android.voicemail.VoicemailVersionConstants.CURRENT_DIALER_TOS_VERSION ) ; } }
Source:
public boolean removeProvider ( java.lang.String fqdn ) { if ( ! ( mProviders.containsKey ( fqdn ) ) ) { android.util.Log.e ( com.android.server.wifi.hotspot2.PasspointManager.TAG , "Config doesn't exist" ) ; return false ; } mProviders.get ( fqdn ) . uninstallCertsAndKeys ( ) ; mProviders.remove ( fqdn ) ; return true ; }

Target:
public boolean removeProvider ( java.lang.String fqdn ) { if ( ! ( mProviders.containsKey ( fqdn ) ) ) { android.util.Log.e ( com.android.server.wifi.hotspot2.PasspointManager.TAG , "Config doesn't exist" ) ; return false ; } mProviders.get ( fqdn ) . uninstallCertsAndKeys ( ) ; mProviders.remove ( fqdn ) ; mWifiConfigManager.saveToStore ( true ) ; return true ; }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient" + ( mRemoteDevice ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getClient(): not allowed for non-active user" ) ; return null ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ) ) { return null ; } return mRemoteDevice ; }

Target:
private void setUserTimeoutAlarm ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "SetUserTimeOutAlarm()" ) ; if ( ( mAlarmManager ) == null ) { mAlarmManager = ( ( android.app.AlarmManager ) ( this . getSystemService ( Context.ALARM_SERVICE ) ) ) ; } mRemoveTimeoutMsg = true ; android.content.Intent timeoutIntent = new android.content.Intent ( com.android.bluetooth.pbap.BluetoothPbapService.USER_CONFIRM_TIMEOUT_ACTION ) ; android.app.PendingIntent pIntent = android.app.PendingIntent.getBroadcast ( this , 0 , timeoutIntent , 0 ) ; mAlarmManager.set ( AlarmManager.RTC_WAKEUP , ( ( java.lang.System.currentTimeMillis ( ) ) + ( com.android.bluetooth.pbap.BluetoothPbapService.USER_CONFIRM_TIMEOUT_VALUE ) ) , pIntent ) ; }
Source:
private void dumpPosition ( java.lang.StringBuilder stringBuilder , com.android.utils.PositionXmlParser.Position position ) { stringBuilder.append ( "(" ) . append ( position.getLine ( ) ) . append ( "," ) . append ( position.getColumn ( ) ) . append ( ") " ) . append ( mDocument.getSourceLocation ( ) . print ( true ) ) . append ( ":" ) . append ( position.getLine ( ) ) ; }

Target:
void addMessage ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.MergingReport.Record.Severity severity , java.lang.String message ) { mergingReport.addMessage ( getDocument ( ) . getSourceLocation ( ) , getLine ( ) , getColumn ( ) , severity , message ) ; }
Source:
private static boolean isManifestName ( com.android.ide.eclipse.adt.internal.editors.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( ( ( attribute != null ) && ( com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_NAME.equals ( attribute.getLocalName ( ) ) ) ) && ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { if ( ( com.android.ide.eclipse.adt.internal.editors.Hyperlinks.getEditor ( ) ) instanceof com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor ) { return true ; } } return false ; }

Target:
private static boolean isManifestName ( com.android.ide.eclipse.adt.internal.editors.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( ( ( attribute != null ) && ( com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_NAME.equals ( attribute.getLocalName ( ) ) ) ) && ( com.android.util.XmlUtils.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { if ( ( com.android.ide.eclipse.adt.internal.editors.Hyperlinks.getEditor ( ) ) instanceof com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor ) { return true ; } } return false ; }
Source:
private static android.os.Message verifyHandleMessageAndGetMessage ( org.mockito.InOrder order , android.os.Handler handler , final int what ) { org.mockito.compat.CapturingMatcher < android.os.Message > messageMatcher = new org.mockito.compat.CapturingMatcher < android.os.Message > ( ) { public boolean matchesObject ( java.lang.Object argument ) { android.os.Message message = ( ( android.os.Message ) ( argument ) ) ; return ( message.what ) == what ; } } ; order.verify ( handler ) . handleMessage ( argThat ( messageMatcher ) ) ; return messageMatcher.getLastValue ( ) ; }

Target:
private static android.os.Message verifyHandleMessageAndGetMessage ( org.mockito.InOrder order , android.os.Handler handler , final int what ) { com.android.server.wifi.scanner.WifiScanningServiceTest.ConditionalMessageCaptor messageMatcher = new com.android.server.wifi.scanner.WifiScanningServiceTest.ConditionalMessageCaptor ( what ) ; order.verify ( handler ) . handleMessage ( org.mockito.Mockito.argThat ( messageMatcher ) ) ; return messageMatcher.getLastValue ( ) ; }
Source:
public void testMalformedVenueNameElementBytes ( ) { for ( byte [ ] invalidBytes : com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.MALFORMED_VENUE_NAME_ELEMENT_BYTES ) { try { com.android.server.wifi.hotspot2.anqp.VenueNameElement venueNameElement = new com.android.server.wifi.hotspot2.anqp.VenueNameElement ( Constants.ANQPElementType.ANQPVenueName , java.nio.ByteBuffer.wrap ( invalidBytes ) . order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ) ; } catch ( java.net.ProtocolException e ) { continue ; } fail ( ( "Expected exception while parsing malformed Venue Name Element bytes: " + invalidBytes ) ) ; } }

Target:
public void parseBufferWithValidVenueNames ( ) throws java.lang.Exception { java.util.List < com.android.server.wifi.hotspot2.anqp.I18Name > nameList = new java.util.ArrayList < > ( ) ; nameList.add ( new com.android.server.wifi.hotspot2.anqp.I18Name ( com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_LANGUAGE , com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_LOCALE , com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_VENUE_NAME1 ) ) ; nameList.add ( new com.android.server.wifi.hotspot2.anqp.I18Name ( com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_LANGUAGE , com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_LOCALE , com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_VENUE_NAME2 ) ) ; com.android.server.wifi.hotspot2.anqp.VenueNameElement expectedElement = new com.android.server.wifi.hotspot2.anqp.VenueNameElement ( nameList ) ; java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap ( getTestData ( new java.lang.String [ ] { com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_VENUE_NAME1 , com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.TEST_VENUE_NAME2 } ) ) ; org.junit.Assert.assertEquals ( expectedElement , com.android.server.wifi.hotspot2.anqp.VenueNameElement.parse ( buffer ) ) ; }
Source:
public final int doFinal ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { checkCipherState ( ) ; if ( ( ( ( input == null ) || ( inputOffset < 0 ) ) || ( inputLen > ( ( input.length ) - inputOffset ) ) ) || ( inputLen < 0 ) ) { throw new java.lang.IllegalArgumentException ( "Bad arguments" ) ; } chooseFirstProvider ( ) ; return spi.engineDoFinal ( input , inputOffset , inputLen , output , 0 ) ; }

Target:
public final int doFinal ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { checkCipherState ( ) ; if ( ( ( ( input == null ) || ( inputOffset < 0 ) ) || ( inputLen > ( ( input.length ) - inputOffset ) ) ) || ( inputLen < 0 ) ) { throw new java.lang.IllegalArgumentException ( "Bad arguments" ) ; } updateProviderIfNeeded ( ) ; return spi.engineDoFinal ( input , inputOffset , inputLen , output , 0 ) ; }
Source:
public static java.io.File getFromAndroidTree ( @ javax.annotation.Nonnull java.lang.String filePath ) { java.io.File sourceFile = new java.io.File ( com.android.jack.TestTools.getAndroidTop ( ) , filePath ) ; if ( ! ( sourceFile.exists ( ) ) ) { throw new java.lang.AssertionError ( ( ( "Failed to locate file \"" + filePath ) + "\"." ) ) ; } return sourceFile ; }

Target:
public static java.io.File getFromAndroidTree ( @ javax.annotation.Nonnull java.lang.String filePath ) { java.io.File sourceFile = new java.io.File ( com.android.jack.test.TestsProperties.getAndroidRootDir ( ) , filePath ) ; if ( ! ( sourceFile.exists ( ) ) ) { throw new java.lang.AssertionError ( ( ( "Failed to locate file \"" + filePath ) + "\"." ) ) ; } return sourceFile ; }
Source:
public void getCellInfoList ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_CELL_INFO_LIST , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void resetRadio ( android.os.Message result ) { throw new java.lang.RuntimeException ( "resetRadio not expected to be called" ) ; }
Source:
void systemReady ( ) { if ( com.android.server.NetworkScoreService.DBG ) android.util.Log.d ( com.android.server.NetworkScoreService.TAG , "systemReady" ) ; android.content.ContentResolver cr = mContext.getContentResolver ( ) ; if ( ( Settings.Global.getInt ( cr , Settings.Global.NETWORK_SCORING_PROVISIONED , 0 ) ) == 0 ) { java.lang.String defaultPackage = mContext.getResources ( ) . getString ( R.string.config_defaultNetworkScorerPackageName ) ; if ( ! ( android.text.TextUtils.isEmpty ( defaultPackage ) ) ) { mNetworkScorerAppManager.setActiveScorer ( defaultPackage ) ; } Settings.Global.putInt ( cr , Settings.Global.NETWORK_SCORING_PROVISIONED , 1 ) ; } registerPackageMonitorIfNeeded ( ) ; }

Target:
void systemReady ( ) { if ( com.android.server.NetworkScoreService.DBG ) android.util.Log.d ( com.android.server.NetworkScoreService.TAG , "systemReady" ) ; registerPackageMonitorIfNeeded ( ) ; registerRecommendationSettingObserverIfNeeded ( ) ; }
Source:
private static < T > void assertException ( java.lang.Runnable block , java.lang.Class < T > expected ) { try { block.run ( ) ; fail ( ( "Expected exception of type " + expected ) ) ; } catch ( java.lang.Exception got ) { if ( ! ( got.getClass ( ) . equals ( expected ) ) ) { fail ( ( ( ( "Expected exception of type " + expected ) + " but got " ) + got ) ) ; } return ; } }

Target:
private static < T > void assertException ( java.lang.Runnable block , java.lang.Class < T > expected ) { try { block.run ( ) ; org.junit.Assert.fail ( ( "Expected exception of type " + expected ) ) ; } catch ( java.lang.Exception got ) { if ( ! ( got.getClass ( ) . equals ( expected ) ) ) { org.junit.Assert.fail ( ( ( ( "Expected exception of type " + expected ) + " but got " ) + got ) ) ; } return ; } }
Source:
public void testEvaluateNetworks_emptyScanList ( ) { android.net.wifi.WifiConfiguration result = mRecommendedNetworkEvaluator.evaluateNetworks ( new java.util.ArrayList < com.android.server.wifi.ScanDetail > ( ) , null , null , false , false , null ) ; junit.framework.Assert.assertNull ( result ) ; org.mockito.Mockito.verifyZeroInteractions ( mWifiConfigManager , mNetworkScoreManager ) ; }

Target:
public void testEvaluateNetworks_recommendationsDisabled ( ) { when ( mFrameworkFacade.getIntegerSetting ( mContext , Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED , 0 ) ) . thenReturn ( 0 ) ; mContentObserver.onChange ( false ) ; mRecommendedNetworkEvaluator.evaluateNetworks ( null , null , null , false , false , null ) ; verifyZeroInteractions ( mWifiConfigManager , mNetworkScoreManager ) ; }
Source:
public boolean disableNetwork ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "disableNetwork nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( "DISABLE_NETWORK " + netId ) ) ; }

Target:
public java.lang.String getMacAddress ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.getMacAddress ( ) ; } else { java.lang.String ret = doStringCommand ( "DRIVER MACADDR" ) ; if ( ! ( android.text.TextUtils.isEmpty ( ret ) ) ) { java.lang.String [ ] tokens = ret.split ( " = " ) ; if ( ( tokens.length ) == 2 ) return tokens [ 1 ] ; } return null ; } }
Source:
public void destroy ( ) { validate ( ) ; nContextDeinitToClient ( mContext ) ; mMessageThread.mRun = false ; try { mMessageThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { } nContextDestroy ( ) ; mContext = 0 ; nDeviceDestroy ( mDev ) ; mDev = 0 ; }

Target:
public void destroy ( ) { validate ( ) ; nContextFinish ( ) ; nContextDeinitToClient ( mContext ) ; mMessageThread.mRun = false ; try { mMessageThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { } nContextDestroy ( ) ; nDeviceDestroy ( mDev ) ; mDev = 0 ; }