auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void reset ( ) { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = getSavedSettings ( ) . getState ( ) ; fakeBucketNameField.setText ( ( state == null ? "" : state.fakeBucketName ) ) ; useFakeBucketCheckbox.setSelected ( ( state == null ? false : state.shouldUseFakeBucket ) ) ; setUrlChoice ( ( state == null ? 0 : state.urlChoice ) ) ; customUrlField.setText ( ( state == null ? "" : state.customUrl ) ) ; com.google.gct.testing.launcher.CloudAuthenticator.recreateTest ( getBackendUrl ( ) ) ; }

Target:
public void apply ( ) throws com.intellij.openapi.options.ConfigurationException { com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState state = new com.google.gct.testing.config.GoogleCloudTestingConfigurable.GoogleCloudTestingState ( ) ; state.fakeBucketName = fakeBucketNameField.getText ( ) ; state.shouldUseFakeBucket = useFakeBucketCheckbox.isSelected ( ) ; state.backendOption = getBackendOption ( ) . ordinal ( ) ; state.backendUrl = getTestBackendUrl ( ) ; state.customUrl = customUrlField.getText ( ) ; getSavedSettings ( ) . loadState ( state ) ; com.google.gct.testing.launcher.CloudAuthenticator.recreateTestAndToolResults ( getTestBackendUrl ( ) , getToolResultsBackendUrl ( ) ) ; }
Source:
private void sendIndicatorIntent ( android.bluetooth.BluetoothDevice device , int ind_id , int ind_value ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_ID , ind_id ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_VALUE , ind_value ) ; mService.sendBroadcast ( intent , HeadsetService.BLUETOOTH_PERM ) ; }

Target:
private void sendIndicatorIntent ( android.bluetooth.BluetoothDevice device , int indId , int indValue ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_ID , indId ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_VALUE , indValue ) ; mService.sendBroadcast ( intent , HeadsetService.BLUETOOTH_PERM ) ; }
Source:
private static boolean contains ( java.io.File buildDir , java.io.File file ) { java.io.File parent = file.getParentFile ( ) ; if ( parent == null ) { return false ; } if ( parent.equals ( buildDir ) ) { return true ; } return com.android.build.gradle.internal.model.DependenciesImpl.contains ( buildDir , parent ) ; }

Target:
private static boolean contains ( @ com.android.annotations.NonNull java.io.File dir , @ com.android.annotations.NonNull java.io.File file ) { try { dir = dir.getCanonicalFile ( ) ; file = file.getCanonicalFile ( ) ; } catch ( java.io.IOException e ) { return false ; } return ( file.getAbsolutePath ( ) . startsWith ( dir.getAbsolutePath ( ) ) ) && ( com.android.build.gradle.internal.model.DependenciesImpl.doContains ( dir , file ) ) ; }
Source:
public static java.util.ResourceBundle getBundle ( java.lang.String baseName , java.util.Locale locale , java.lang.ClassLoader loader ) { if ( loader == null ) { throw new java.lang.NullPointerException ( ) ; } return java.util.ResourceBundle.getBundleImpl ( baseName , locale , loader , java.util.ResourceBundle.Control.INSTANCE ) ; }

Target:
private static java.util.ResourceBundle.Control getDefaultControl ( java.lang.String baseName ) { if ( ( java.util.ResourceBundle.providers ) != null ) { for ( java.util.spi.ResourceBundleControlProvider provider : java.util.ResourceBundle.providers ) { java.util.ResourceBundle.Control control = provider.getControl ( baseName ) ; if ( control != null ) { return control ; } } } return java.util.ResourceBundle.Control.INSTANCE ; }
Source:
public boolean performAccessibilityAction ( final int action , final android.os.Bundle arguments ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return performAccessibilityAction ( action , arguments ) ; } } ) ; return ret ; } if ( mAwContents.supportsAccessibilityAction ( action ) ) { return mAwContents.performAccessibilityAction ( action , arguments ) ; } return mWebViewPrivate.super_performAccessibilityAction ( action , arguments ) ; }

Target:
public void onDraw ( final android.graphics.Canvas canvas ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDraw ( canvas ) ; } } ) ; return ; } mAwContents.onDraw ( canvas ) ; }
Source:
private void moveConfigurationToIndex ( int index , com.google.gct.testing.CloudTestConfigurationImpl configuration ) { editableConfigurations.remove ( configuration ) ; editableConfigurations.add ( index , configuration ) ; removeConfigurationFromTree ( configuration ) ; addConfigurationToTree ( index , configuration , true ) ; updateConfigurationTree ( ) ; }

Target:
public boolean isEnabled ( com.intellij.openapi.actionSystem.AnActionEvent e ) { return ( ( ( selectedConfiguration ) != null ) && ( selectedConfiguration.isEditable ( ) ) ) && ( ( editableConfigurations.indexOf ( selectedConfiguration ) ) < ( ( editableConfigurations.size ( ) ) - 1 ) ) ; }
Source:
public void run ( org.eclipse.jface.action.IAction action ) { if ( ! ( com.android.ide.eclipse.adt.internal.actions.SdkManagerAction.openExternalSdkManager ( ) ) ) { if ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . checkSdkLocationAndId ( ) ) { com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android SDK" , "Failed to run the Android SDK Manager. Check the Android Console View for details." ) ; } } }

Target:
public void run ( org.eclipse.jface.action.IAction action ) { com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . refreshSdk ( ) ; if ( ! ( com.android.ide.eclipse.adt.internal.actions.SdkManagerAction.openExternalSdkManager ( ) ) ) { if ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . checkSdkLocationAndId ( ) ) { com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android SDK" , "Failed to run the Android SDK Manager. Check the Android Console View for details." ) ; } } }
Source:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > allAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return new com.google.common.util.concurrent.Futures.ListFuture < V > ( com.google.common.collect.ImmutableList.copyOf ( futures ) , true , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > successfulAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return com.google.common.util.concurrent.Futures.listFuture ( com.google.common.collect.ImmutableList.copyOf ( futures ) , false , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }
Source:
public int hashCode ( ) { return ( getAddress ( ) ) == null ? 0 : getAddress ( ) . hashCode ( ) ; }

Target:
public synchronized void close ( int cause ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( ( ( "Closing call " + ( mCurrentCall ) ) + "state: " ) + ( mClosed ) ) ) ; } if ( mClosed ) { return ; } android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( ( ( "Setting " + ( mCurrentCall ) ) + " to disconnected " ) + ( getTelecomCallId ( ) ) ) ) ; setDisconnected ( new android.telecom.DisconnectCause ( cause ) ) ; mClosed = true ; mCurrentCall = null ; destroy ( ) ; }
Source:
public void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { pw.println ( ( "Carrier app binding for phone " + ( phoneId ) ) ) ; pw.println ( ( " connection: " + ( connection ) ) ) ; pw.println ( ( " bindCount: " + ( bindCount ) ) ) ; pw.println ( ( " lastBindStartMillis: " + ( lastBindStartMillis ) ) ) ; pw.println ( ( " unbindCount: " + ( unbindCount ) ) ) ; pw.println ( ( " lastUnbindMillis: " + ( lastUnbindMillis ) ) ) ; pw.println ( ) ; }

Target:
public void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { pw.println ( ( "Carrier app binding for phone " + ( phoneId ) ) ) ; pw.println ( ( " connection: " + ( connection ) ) ) ; pw.println ( ( " bindCount: " + ( bindCount ) ) ) ; pw.println ( ( " lastBindStartMillis: " + ( lastBindStartMillis ) ) ) ; pw.println ( ( " unbindCount: " + ( unbindCount ) ) ) ; pw.println ( ( " lastUnbindMillis: " + ( lastUnbindMillis ) ) ) ; pw.println ( ( " mUnbindScheduledUptimeMillis: " + ( mUnbindScheduledUptimeMillis ) ) ) ; pw.println ( ) ; }
Source:
public void onCallAudioStateChanged ( com.android.server.telecom.Call activeCall , android.telecom.CallAudioState audioState ) { final java.lang.String callId = mCallIdMapper.getCallId ( activeCall ) ; if ( ( callId != null ) && ( isServiceValid ( "onCallAudioStateChanged" ) ) ) { try { logOutgoing ( "onCallAudioStateChanged %s %s" , callId , audioState ) ; mServiceInterface.onCallAudioStateChanged ( callId , audioState ) ; } catch ( android.os.RemoteException e ) { } } }

Target:
void unhold ( com.android.server.telecom.Call call ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "unhold" ) ) ) { try { logOutgoing ( "unhold %s" , callId ) ; mServiceInterface.unhold ( callId , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException e ) { } } }
Source:
public void sendUssd ( java.lang.String ussdMessage ) throws com.android.ims.ImsException { logi ( ( "sendUssd :: ussdMessage=" + ussdMessage ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "sendUssd :: " ) ; throw new com.android.ims.ImsException ( "No call session" , ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } mSession.sendUssd ( ussdMessage ) ; } }

Target:
public void startDtmf ( char c ) { logi ( ( "startDtmf :: code=" + c ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) != null ) { mSession.startDtmf ( c ) ; } } }
Source:
public void run ( java.util.Collection < com.android.ddmlib.testrunner.ITestRunListener > listeners ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { final java.lang.String runCaseCommandStr = java.lang.String.format ( "am instrument -w -r %s %s" , getArgsCommand ( ) , getRunnerPath ( ) ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.RemoteAndroidTestRunner.LOG_TAG , java.lang.String.format ( "Running %s on %s" , runCaseCommandStr , mRemoteDevice.getSerialNumber ( ) ) ) ; mParser = new com.android.ddmlib.testrunner.InstrumentationResultParser ( listeners ) ; mRemoteDevice.executeShellCommand ( runCaseCommandStr , mParser , mMaxTimeToOutputResponse ) ; }

Target:
public void run ( java.util.Collection < com.android.ddmlib.testrunner.ITestRunListener > listeners ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { final java.lang.String runCaseCommandStr = java.lang.String.format ( "am instrument -w -r %s %s" , getArgsCommand ( ) , getRunnerPath ( ) ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.RemoteAndroidTestRunner.LOG_TAG , java.lang.String.format ( "Running %s on %s" , runCaseCommandStr , mRemoteDevice.getSerialNumber ( ) ) ) ; mParser = new com.android.ddmlib.testrunner.InstrumentationResultParser ( mPackageName , listeners ) ; mRemoteDevice.executeShellCommand ( runCaseCommandStr , mParser , mMaxTimeToOutputResponse ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput_short.d.T_aput_short_1 t = new dot.junit.opcodes.aput_short.d.T_aput_short_1 ( ) ; short [ ] arr = new short [ 2 ] ; try { t.run ( arr , 2 , ( ( short ) ( 10000 ) ) ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE1 ( ) { loadAndRun ( "dot.junit.opcodes.aput_short.d.T_aput_short_1" , java.lang.ArrayIndexOutOfBoundsException.class , new short [ 2 ] , 2 , ( ( short ) ( 10000 ) ) ) ; }
Source:
public java.lang.String getTitle ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getTitle ( ) ; } } ) ; return ret ; } return mAwContents.getTitle ( ) ; }

Target:
public java.lang.String getOriginalUrl ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getOriginalUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getOriginalUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }
Source:
public void run ( ) { java.io.InputStreamReader is = new java.io.InputStreamReader ( process.getErrorStream ( ) ) ; java.io.BufferedReader errReader = new java.io.BufferedReader ( is ) ; try { while ( true ) { java.lang.String line = errReader.readLine ( ) ; if ( output != null ) { output.err ( line ) ; } if ( line == null ) { break ; } } } catch ( java.io.IOException e ) { } }

Target:
public void run ( ) { java.io.InputStreamReader is = new java.io.InputStreamReader ( process.getErrorStream ( ) ) ; java.io.BufferedReader errReader = new java.io.BufferedReader ( is ) ; try { while ( true ) { java.lang.String line = errReader.readLine ( ) ; if ( output != null ) { output.err ( line ) ; } if ( line == null ) { break ; } } } catch ( java.io.IOException e ) { } finally { com.google.common.io.Closeables.closeQuietly ( errReader ) ; } }
Source:
public void test_available_on_nonIOCTL_supported_file ( ) throws java.lang.Exception { java.io.File file = new java.io.File ( "/dev/zero" ) ; try ( java.io.FileInputStream input = new java.io.FileInputStream ( file ) ) { assertEquals ( 0 , input.available ( ) ) ; } try ( java.io.FileInputStream input = new java.io.FileInputStream ( file ) ) { android.system.Os.ioctlInt ( input.getFD ( ) , OsConstants.FIONREAD , new android.util.MutableInt ( 0 ) ) ; fail ( ) ; } catch ( android.system.ErrnoException expected ) { assertEquals ( ( "FIONREAD should have returned ENOTTY for the file. If it doesn't return" + " FIONREAD, the test is no longer valid." ) , OsConstants.ENOTTY , expected.errno ) ; } }

Target:
public void test_available_on_nonIOCTL_supported_file ( ) throws java.lang.Exception { java.io.File file = new java.io.File ( "/dev/zero" ) ; try ( java.io.FileInputStream input = new java.io.FileInputStream ( file ) ) { assertEquals ( 0 , input.available ( ) ) ; } try ( java.io.FileInputStream input = new java.io.FileInputStream ( file ) ) { android.system.Os.ioctlInt ( input.getFD ( ) , OsConstants.FIONREAD , new android.system.Int32Ref ( 0 ) ) ; fail ( ) ; } catch ( android.system.ErrnoException expected ) { assertEquals ( ( "FIONREAD should have returned ENOTTY for the file. If it doesn't return" + " FIONREAD, the test is no longer valid." ) , OsConstants.ENOTTY , expected.errno ) ; } }
Source:
public void enableTdls ( java.lang.String remoteAddress , boolean enable ) { if ( remoteAddress == null ) { throw new java.lang.IllegalArgumentException ( "remoteAddress cannot be null" ) ; } com.android.server.wifi.WifiServiceImpl.TdlsTaskParams params = new com.android.server.wifi.WifiServiceImpl.TdlsTaskParams ( ) ; params.remoteIpAddress = remoteAddress ; params.enable = enable ; new com.android.server.wifi.WifiServiceImpl.TdlsTask ( ) . execute ( params ) ; }

Target:
public void enableTdls ( java.lang.String remoteAddress , boolean enable ) { if ( remoteAddress == null ) { throw new java.lang.IllegalArgumentException ( "remoteAddress cannot be null" ) ; } mLog.trace ( "enableTdls uid=% enable=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . c ( enable ) . flush ( ) ; com.android.server.wifi.WifiServiceImpl.TdlsTaskParams params = new com.android.server.wifi.WifiServiceImpl.TdlsTaskParams ( ) ; params.remoteIpAddress = remoteAddress ; params.enable = enable ; new com.android.server.wifi.WifiServiceImpl.TdlsTask ( ) . execute ( params ) ; }
Source:
public void updatePersistentConfiguration ( android.content.res.Configuration values ) { enforceCallingPermission ( android.Manifest.permission.CHANGE_CONFIGURATION , "updateConfiguration()" ) ; enforceWriteSettingsPermission ( "updateConfiguration()" ) ; if ( values == null ) { throw new java.lang.NullPointerException ( "Configuration must not be null" ) ; } synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; updateConfigurationLocked ( values , null , true , false ) ; android.os.Binder.restoreCallingIdentity ( origId ) ; } }

Target:
public void moveTasksToFullscreenStack ( int fromStackId , boolean onTop ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "moveTasksToFullscreenStack()" ) ; if ( fromStackId == ( StackId.HOME_STACK_ID ) ) { throw new java.lang.IllegalArgumentException ( "You can't move tasks from the home stack." ) ; } synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { mStackSupervisor.moveTasksToFullscreenStackLocked ( fromStackId , onTop ) ; } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }
Source:
public void testRemove2_IndexOutOfBounds ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.add ( "adasdasd" ) ; c.remove ( 100 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testListIterator1_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.listIterator ( ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void test_EVP_CipherInit_ex_Success ( ) throws java.lang.Exception { org.apache.harmony.xnet.provider.jsse.OpenSSLCipherContext context = new org.apache.harmony.xnet.provider.jsse.OpenSSLCipherContext ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_CTX_new ( ) ) ; int evpCipher = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_cipherbyname ( "aes-128-ecb" ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CipherInit_ex ( context.getContext ( ) , evpCipher , org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.AES_128_KEY , null , true ) ; }

Target:
public void test_EVP_CipherInit_ex_Success ( ) throws java.lang.Exception { final int ctx = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_CTX_new ( ) ; try { final int evpCipher = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_get_cipherbyname ( "aes-128-ecb" ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CipherInit_ex ( ctx , evpCipher , org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.AES_128_KEY , null , true ) ; } finally { org.apache.harmony.xnet.provider.jsse.NativeCrypto.EVP_CIPHER_CTX_cleanup ( ctx ) ; } }
Source:
private java.lang.String getReportName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return java.lang.String.format ( "%s-%s-%s-%s-%s" , date , Build.MANUFACTURER , Build.PRODUCT , Build.DEVICE , Build.ID ) ; }

Target:
private java.lang.String getReportBaseName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd-HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return ( ( ( ( ( ( ( ( ( "ctsVerifierReport" + "-" ) + date ) + "-" ) + ( android.os.Build.MANUFACTURER ) ) + "-" ) + ( android.os.Build.PRODUCT ) ) + "-" ) + ( android.os.Build.DEVICE ) ) + "-" ) + ( android.os.Build.ID ) ; }
Source:
private void responseRadioCapability ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.RadioCapability rc ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.RadioCapability ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalRadioCapability ( rc , mRil ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseCellInfoList_1_2 ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < com.android.internal.telephony.V1_2.CellInfo > cellInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < android.telephony.CellInfo > ret = com.android.internal.telephony.RIL.convertHalCellInfoList_1_2 ( cellInfo ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
private static int codeNameToApi ( java.lang.String codename ) { for ( int api = 1 ; api <= ( com.android.SdkConstants.HIGHEST_KNOWN_API ) ; api ++ ) { java.lang.String code = com.android.tools.lint.detector.api.LintUtils.getBuildCode ( api ) ; if ( ( code != null ) && ( code.equalsIgnoreCase ( codename ) ) ) { return api ; } } return - 1 ; }

Target:
private static int codeNameToApi ( java.lang.String codename ) { for ( int api = 1 ; api <= ( com.android.ide.common.sdk.SdkVersionInfo.HIGHEST_KNOWN_API ) ; api ++ ) { java.lang.String code = com.android.ide.common.sdk.SdkVersionInfo.getBuildCode ( api ) ; if ( ( code != null ) && ( code.equalsIgnoreCase ( codename ) ) ) { return api ; } } return - 1 ; }
Source:
public com.android.builder.png.QueuedCruncher newCruncher ( @ com.android.annotations.NonNull java.lang.String aaptLocation , @ com.android.annotations.NonNull com.android.utils.ILogger logger ) { synchronized ( sLock ) { if ( ! ( sInstances.containsKey ( aaptLocation ) ) ) { com.android.builder.png.QueuedCruncher queuedCruncher = new com.android.builder.png.QueuedCruncher ( aaptLocation , logger ) ; sInstances.put ( aaptLocation , queuedCruncher ) ; } return sInstances.get ( aaptLocation ) ; } }

Target:
public com.android.builder.png.QueuedCruncher newCruncher ( @ com.android.annotations.NonNull java.lang.String aaptLocation , @ com.android.annotations.NonNull com.android.utils.ILogger logger ) { synchronized ( sLock ) { logger.info ( "QueuedCruncher is using %1$s" , aaptLocation ) ; if ( ! ( sInstances.containsKey ( aaptLocation ) ) ) { com.android.builder.png.QueuedCruncher queuedCruncher = new com.android.builder.png.QueuedCruncher ( aaptLocation , logger ) ; sInstances.put ( aaptLocation , queuedCruncher ) ; } return sInstances.get ( aaptLocation ) ; } }
Source:
public static android.content.res.Resources getWebViewPackageResources ( android.content.Context ctx ) { try { return ctx.getPackageManager ( ) . getResourcesForApplication ( android.webkit.WebViewFactory.getWebViewPackageName ( ) ) ; } catch ( android.content.pm.PackageManager e ) { throw new java.lang.RuntimeException ( "Could not load webview resources apk." , e ) ; } }

Target:
private static void deleteContents ( java.io.File dir ) { java.io.File [ ] files = dir.listFiles ( ) ; if ( files != null ) { for ( java.io.File file : files ) { if ( file.isDirectory ( ) ) { com.android.webview.chromium.WebViewChromiumFactoryProvider.deleteContents ( file ) ; } if ( ! ( file.delete ( ) ) ) { android.util.Log.w ( com.android.webview.chromium.WebViewChromiumFactoryProvider.TAG , ( "Failed to delete " + file ) ) ; } } } }
Source:
public static boolean isValidDigitString ( java.lang.String str ) { int c ; int i = 0 ; android.icu.text.UCharacterIterator it = android.icu.text.UCharacterIterator.getInstance ( str ) ; it.setToStart ( ) ; while ( ( c = it.nextCodePoint ( ) ) != ( UCharacterIterator.DONE ) ) { if ( android.icu.lang.UCharacter.isSupplementary ( c ) ) { return false ; } i ++ ; } if ( i != 10 ) { return false ; } return true ; }

Target:
public static boolean isValidDigitString ( java.lang.String str ) { int numCodepoints = str.codePointCount ( 0 , str.length ( ) ) ; return numCodepoints == 10 ; }
Source:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { com.android.tools.lint.detector.api.Project project = context.getProject ( ) ; java.io.File projectFolder = project.getDir ( ) ; checkFolder ( context , new java.io.File ( projectFolder , "res" ) ) ; checkFolder ( context , new java.io.File ( projectFolder , "assets" ) ) ; for ( java.io.File srcFolder : project.getJavaSourceFolders ( ) ) { checkFolder ( context , srcFolder ) ; } }

Target:
public void afterCheckProject ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ! ( context.getProject ( ) . getReportIssues ( ) ) ) { return ; } com.android.tools.lint.detector.api.Project project = context.getProject ( ) ; java.io.File projectFolder = project.getDir ( ) ; checkFolder ( context , new java.io.File ( projectFolder , "res" ) ) ; checkFolder ( context , new java.io.File ( projectFolder , "assets" ) ) ; for ( java.io.File srcFolder : project.getJavaSourceFolders ( ) ) { checkFolder ( context , srcFolder ) ; } }
Source:
public static void register ( ) { org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPRS , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPRE , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPSS , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPSE , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPRQ , android.ddm.DdmHandleProfiling.mInstance ) ; }

Target:
public static void register ( ) { org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPRS , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPRE , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPSS , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPSE , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_MPRQ , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_SPSS , android.ddm.DdmHandleProfiling.mInstance ) ; org.apache.harmony.dalvik.ddmc.DdmServer.registerHandler ( android.ddm.DdmHandleProfiling.CHUNK_SPSE , android.ddm.DdmHandleProfiling.mInstance ) ; }
Source:
public void run ( ) { com.android.ddmlib.HandleThread.mThreadStackTraceReqRunning = true ; try { com.android.ddmlib.HandleThread.sendSTKL ( client , threadId ) ; } catch ( java.io.IOException ioe ) { com.android.ddmlib.Log.d ( "ddms" , ( ( ( "Unable to request thread stack call updates from " + client ) + ": " ) + ( ioe.getMessage ( ) ) ) ) ; } finally { com.android.ddmlib.HandleThread.mThreadStackTraceReqRunning = false ; } }

Target:
public void run ( ) { com.android.ddmlib.HandleThread.sThreadStackTraceReqRunning = true ; try { com.android.ddmlib.HandleThread.sendSTKL ( client , threadId ) ; } catch ( java.io.IOException ioe ) { com.android.ddmlib.Log.d ( "ddms" , ( ( ( "Unable to request thread stack call updates from " + client ) + ": " ) + ( ioe.getMessage ( ) ) ) ) ; } finally { com.android.ddmlib.HandleThread.sThreadStackTraceReqRunning = false ; } }
Source:
public void onPrepareOptionsMenu ( android.view.Menu menu ) { final android.view.MenuItem itemDeleteAll = menu.findItem ( R.id.delete_all ) ; if ( itemDeleteAll != null ) { itemDeleteAll.setEnabled ( ( ( ( mAdapter ) != null ) && ( ! ( mAdapter.isEmpty ( ) ) ) ) ) ; showAllFilterMenuOptions ( menu ) ; hideCurrentFilterMenuOption ( menu ) ; if ( ! ( mVoicemailSourcesAvailable ) ) { menu.findItem ( R.id.show_voicemails_only ) . setVisible ( false ) ; } } }

Target:
private void updateEmptyMessage ( int filterType ) { final java.lang.String message ; switch ( filterType ) { case android.provider.CallLog.Calls.MISSED_TYPE : message = getString ( R.string.recentMissed_empty ) ; break ; case CallLogQueryHandler.CALL_TYPE_ALL : message = getString ( R.string.recentCalls_empty ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Unexpected filter type in CallLogFragment: " + filterType ) ) ; } ( ( android.widget.TextView ) ( getListView ( ) . getEmptyView ( ) ) ) . setText ( message ) ; }
Source:
private static < E > com.google.common.collect.ImmutableMap < E , java.lang.Integer > makeIndex ( com.google.common.collect.ImmutableSet < E > set ) { com.google.common.collect.ImmutableMap.Builder < E , java.lang.Integer > indexBuilder = com.google.common.collect.ImmutableMap.builder ( ) ; int i = 0 ; for ( E key : set ) { indexBuilder.put ( key , i ) ; i ++ ; } return indexBuilder.build ( ) ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object instanceof com.google.common.collect.Table.Cell ) { com.google.common.collect.Table.Cell < ? , ? , ? > cell = ( ( com.google.common.collect.Table.Cell < ? , ? , ? > ) ( object ) ) ; java.lang.Object value = get ( cell.getRowKey ( ) , cell.getColumnKey ( ) ) ; return ( value != null ) && ( value.equals ( cell.getValue ( ) ) ) ; } return false ; }
Source:
public int [ ] blend ( int [ ] src , int [ ] dst ) { return new int [ ] { dst [ 0 ] , src [ 1 ] , dst [ 2 ] , java.lang.Math.min ( 255 , ( ( src [ 3 ] ) + ( dst [ 3 ] ) ) ) } ; }

Target:
public int [ ] blend ( int [ ] src , int [ ] dst , int [ ] result ) { java.lang.System.arraycopy ( dst , 0 , result , 0 , 3 ) ; result [ 3 ] = java.lang.Math.min ( 255 , ( ( src [ 3 ] ) + ( dst [ 3 ] ) ) ) ; return result ; }
Source:
protected void run ( junit.framework.TestCase testCase ) { if ( testCase instanceof android.hardware.cts.SensorTestCase ) { android.hardware.cts.SensorTestCase sensorTestCase = ( ( android.hardware.cts.SensorTestCase ) ( testCase ) ) ; sensorTestCase.setContext ( mContext ) ; sensorTestCase.setEmulateSensorUnderLoad ( false ) ; } else { throw new java.lang.IllegalStateException ( "TestCase must be an instance of SensorTestCase." ) ; } super . run ( testCase ) ; }

Target:
protected void run ( junit.framework.TestCase testCase ) { if ( testCase instanceof android.hardware.cts.SensorTestCase ) { android.hardware.cts.SensorTestCase sensorTestCase = ( ( android.hardware.cts.SensorTestCase ) ( testCase ) ) ; sensorTestCase.setContext ( mContext ) ; sensorTestCase.setEmulateSensorUnderLoad ( false ) ; sensorTestCase.setCurrentTestNode ( new com.android.cts.verifier.sensors.base.SensorCtsTestResult.TestNode ( testCase ) ) ; } else { throw new java.lang.IllegalStateException ( "TestCase must be an instance of SensorTestCase." ) ; } super . run ( testCase ) ; }
Source:
public java.lang.String getInstrumentationRunner ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { config = getTestedConfig ( ) ; } java.lang.String runner = config.mMergedFlavor.getTestInstrumentationRunner ( ) ; return runner != null ? runner : com.android.builder.core.VariantConfiguration.DEFAULT_TEST_RUNNER ; }

Target:
public java.lang.String getInstrumentationRunner ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.String runner = config.mMergedFlavor.getTestInstrumentationRunner ( ) ; return runner != null ? runner : com.android.builder.core.VariantConfiguration.DEFAULT_TEST_RUNNER ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object param1 ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }
Source:
public void testNoSize ( ) { com.android.test.runner.TestRequestBuilder b = new com.android.test.runner.TestRequestBuilder ( new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleTest.class . getName ( ) ) ; com.android.test.runner.TestRequest request = b.build ( mInstr ) ; org.junit.runner.JUnitCore testRunner = new org.junit.runner.JUnitCore ( ) ; org.junit.runner.Result result = testRunner.run ( request.getRequest ( ) ) ; org.junit.Assert.assertEquals ( 2 , result.getRunCount ( ) ) ; }

Target:
public void testNoSize ( ) { com.android.test.runner.TestRequestBuilder b = new com.android.test.runner.TestRequestBuilder ( new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleTest.class . getName ( ) ) ; com.android.test.runner.TestRequest request = b.build ( mInstr , mBundle ) ; org.junit.runner.JUnitCore testRunner = new org.junit.runner.JUnitCore ( ) ; org.junit.runner.Result result = testRunner.run ( request.getRequest ( ) ) ; org.junit.Assert.assertEquals ( 2 , result.getRunCount ( ) ) ; }
Source:
public boolean supportsMulticast ( ) throws java.net.SocketException { return java.net.NetworkInterface.supportsMulticast0 ( name , index ) ; }

Target:
private int getFlags ( ) throws java.net.SocketException { java.io.FileDescriptor fd = null ; try { fd = Libcore.os.socket ( java.net.AF_INET , java.net.SOCK_DGRAM , 0 ) ; return Libcore.os.ioctlFlags ( fd , name ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsSocketException ( ) ; } catch ( java.lang.Exception ex ) { throw new java.net.SocketException ( ex ) ; } finally { libcore.io.IoUtils.closeQuietly ( fd ) ; } }
Source:
public void testStageInstallWithErrorCode_missingTzDataFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearTzDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { byte [ ] distro1Bytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distro1Bytes ) ) ) ; assertInstallDistroStaged ( distro1Bytes ) ; byte [ ] distro2Bytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distro2Bytes ) ) ) ; assertInstallDistroStaged ( distro1Bytes ) ; assertNoInstalledDistro ( ) ; }
Source:
public void testAddSingleEphemeralNetwork ( ) { android.net.wifi.WifiConfiguration openNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; openNetwork.ephemeral = true ; java.util.List < android.net.wifi.WifiConfiguration > networks = new java.util.ArrayList < > ( ) ; networks.add ( openNetwork ) ; verifyAddEphemeralNetworkToWifiConfigManager ( openNetwork ) ; java.util.List < android.net.wifi.WifiConfiguration > retrievedNetworks = mWifiConfigManager.getConfiguredNetworksWithPasswords ( ) ; com.android.server.wifi.WifiConfigurationTestUtil.assertConfigurationsEqualForConfigManagerAddOrUpdate ( networks , retrievedNetworks ) ; assertTrue ( mWifiConfigManager.getSavedNetworks ( ) . isEmpty ( ) ) ; }

Target:
public void testAddSingleEphemeralNetwork ( ) throws java.lang.Exception { android.net.wifi.WifiConfiguration ephemeralNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; ephemeralNetwork.ephemeral = true ; java.util.List < android.net.wifi.WifiConfiguration > networks = new java.util.ArrayList < > ( ) ; networks.add ( ephemeralNetwork ) ; verifyAddEphemeralNetworkToWifiConfigManager ( ephemeralNetwork ) ; java.util.List < android.net.wifi.WifiConfiguration > retrievedNetworks = mWifiConfigManager.getConfiguredNetworksWithPasswords ( ) ; com.android.server.wifi.WifiConfigurationTestUtil.assertConfigurationsEqualForConfigManagerAddOrUpdate ( networks , retrievedNetworks ) ; assertTrue ( mWifiConfigManager.getSavedNetworks ( ) . isEmpty ( ) ) ; }
Source:
public void registerDefaultNetworkCallback ( android.net.ConnectivityManager.NetworkCallback cb ) { org.junit.Assert.assertFalse ( trackingDefault.contains ( cb ) ) ; trackingDefault.add ( cb ) ; }

Target:
public void registerDefaultNetworkCallback ( android.net.ConnectivityManager.NetworkCallback cb , android.os.Handler h ) { org.junit.Assert.assertFalse ( allCallbacks.containsKey ( cb ) ) ; allCallbacks.put ( cb , h ) ; org.junit.Assert.assertFalse ( trackingDefault.contains ( cb ) ) ; trackingDefault.add ( cb ) ; }
Source:
private void testChargingConstraintFails_notCharging ( ) { mTestEnvironment.setUp ( ) ; mTestEnvironment.setExpectedExecutions ( 0 ) ; android.app.job.JobInfo runOnCharge = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mJobScheduler.schedule ( runOnCharge ) ; sendBroadcastAndBlockForResult ( com.android.cts.verifier.jobscheduler.EXPEDITE_STABLE_CHARGING ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitTimeout ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } mDeviceUnpluggedTestPassed = testPassed ; runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , testPassed ) ) ; }

Target:
private boolean isDevicePluggedIn ( ) { android.content.IntentFilter ifilter = new android.content.IntentFilter ( android.content.Intent.ACTION_BATTERY_CHANGED ) ; android.content.Intent batteryStatus = registerReceiver ( null , ifilter ) ; int status = batteryStatus.getIntExtra ( BatteryManager.EXTRA_PLUGGED , ( - 1 ) ) ; return status != 0 ; }
Source:
public final void readArray ( ) { int size = com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ; visitArray ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { readValue ( ) ; } }

Target:
public int peek ( ) { if ( ( type ) == ( com.android.dx.io.EncodedValueReader.MUST_READ ) ) { int argAndType = ( in.readByte ( ) ) & 255 ; type = argAndType & 31 ; arg = ( argAndType & 224 ) > > 5 ; } return type ; }
Source:
public void dumpShowsFailureTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertTrue ( getDumpString ( ) . contains ( "rdev_connect" ) ) ; }

Target:
public void connectionEventFailedDoesNotDisableTracingOnFailureOfStaleConnection ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; mLastMileLogger.reportConnectionEvent ( ( ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID ) + 1 ) , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.junit.Assert.assertEquals ( "1" , libcore.io.IoUtils.readFileAsString ( mTraceEnableFile.getPath ( ) ) ) ; }
Source:
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 ) ) ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getConnectionState: " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; } return service.getConnectionState ( device ) ; }
Source:
public int hashCode ( ) { int result = 17 ; result = ( 31 * result ) + ( mServiceType ) ; result = ( 31 * result ) + ( mStatus ) ; result = ( 31 * result ) + ( mTransId ) ; result = ( 31 * result ) + ( ( mDevice.deviceAddress ) == null ? 0 : mDevice.deviceAddress.hashCode ( ) ) ; result = ( 31 * result ) + ( ( mData ) == null ? 0 : mData.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { int result = 17 ; result = ( 31 * result ) + ( mServiceType ) ; result = ( 31 * result ) + ( mStatus ) ; result = ( 31 * result ) + ( mTransId ) ; result = ( 31 * result ) + ( ( mDevice.deviceAddress ) == null ? 0 : mDevice.deviceAddress.hashCode ( ) ) ; result = ( 31 * result ) + ( ( mData ) == null ? 0 : java.util.Arrays.hashCode ( mData ) ) ; return result ; }
Source:
public boolean generate ( java.lang.String key ) { try { return ( mBinder.generate ( key , ( - 1 ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean delKey ( java.lang.String key , int uid ) { try { return ( mBinder.del_key ( key , uid ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
private com.android.ims.ImsStreamMediaProfile createResumeMediaProfile ( ) { com.android.ims.ImsStreamMediaProfile mediaProfile = new com.android.ims.ImsStreamMediaProfile ( ) ; if ( ( mCallProfile ) == null ) { return mediaProfile ; } mediaProfile.mAudioQuality = mCallProfile.mMediaProfile.mAudioQuality ; mediaProfile.mVideoQuality = mCallProfile.mMediaProfile.mVideoQuality ; mediaProfile.mAudioDirection = ImsStreamMediaProfile.DIRECTION_SEND_RECEIVE ; if ( ( mediaProfile.mVideoQuality ) != ( ImsStreamMediaProfile.VIDEO_QUALITY_NONE ) ) { mediaProfile.mVideoDirection = ImsStreamMediaProfile.DIRECTION_SEND_RECEIVE ; } return mediaProfile ; }

Target:
private android.telephony.ims.ImsStreamMediaProfile createHoldMediaProfile ( ) { android.telephony.ims.ImsStreamMediaProfile mediaProfile = new android.telephony.ims.ImsStreamMediaProfile ( ) ; if ( ( mCallProfile ) == null ) { return mediaProfile ; } mediaProfile.mAudioQuality = mCallProfile.mMediaProfile.mAudioQuality ; mediaProfile.mVideoQuality = mCallProfile.mMediaProfile.mVideoQuality ; mediaProfile.mAudioDirection = android.telephony.ims.ImsStreamMediaProfile.DIRECTION_SEND ; if ( ( mediaProfile.mVideoQuality ) != ( android.telephony.ims.ImsStreamMediaProfile.VIDEO_QUALITY_NONE ) ) { mediaProfile.mVideoDirection = android.telephony.ims.ImsStreamMediaProfile.DIRECTION_SEND ; } return mediaProfile ; }
Source:
public void onDestroy ( ) { super . onDestroy ( ) ; if ( ( ( getActivity ( ) ) != null ) && ( ! ( getActivity ( ) . isDestroyed ( ) ) ) ) { getActivity ( ) . unregisterReceiver ( mPhoneChangeReceiver ) ; } }

Target:
public void onDestroy ( ) { unbindNetworkQueryService ( ) ; super . onDestroy ( ) ; if ( ( ( getActivity ( ) ) != null ) && ( ! ( getActivity ( ) . isDestroyed ( ) ) ) ) { getActivity ( ) . unregisterReceiver ( mPhoneChangeReceiver ) ; } }
Source:
synchronized void nScriptInvokeV ( long id , int slot , byte [ ] params ) { validate ( ) ; rsnScriptInvokeV ( mContext , id , slot , params ) ; }

Target:
synchronized void nScriptSetVarV ( long id , int slot , byte [ ] val , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarV ( curCon , id , slot , val , mUseInc ) ; }
Source:
public java.lang.Object getParent ( java.lang.Object element ) { if ( element instanceof com.android.sdklib.internal.repository.RepoSource ) { return this ; } else if ( element instanceof java.lang.Package ) { return ( ( java.lang.Package ) ( element ) ) . getParentSource ( ) ; } else if ( element instanceof com.android.sdklib.internal.repository.Archive ) { return ( ( com.android.sdklib.internal.repository.Archive ) ( element ) ) . getParentPackage ( ) ; } return null ; }

Target:
public java.lang.Object getParent ( java.lang.Object element ) { if ( element instanceof com.android.sdklib.internal.repository.SdkSource ) { return this ; } else if ( element instanceof java.lang.Package ) { return ( ( java.lang.Package ) ( element ) ) . getParentSource ( ) ; } else if ( element instanceof com.android.sdklib.internal.repository.Archive ) { return ( ( com.android.sdklib.internal.repository.Archive ) ( element ) ) . getParentPackage ( ) ; } return null ; }