auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static void openUrl ( java.net.URL url ) { org.eclipse.ui.browser.IWorkbenchBrowserSupport support = org.eclipse.ui.PlatformUI.getWorkbench ( ) . getBrowserSupport ( ) ; org.eclipse.ui.browser.IWebBrowser browser ; try { browser = support.createBrowser ( AdtPlugin.PLUGIN_ID ) ; browser.openURL ( url ) ; } catch ( org.eclipse.ui.PartInitException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , null ) ; } }

Target:
private static boolean isStyleAttribute ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { java.lang.String tag = context.getElement ( ) . getTagName ( ) ; return com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.STYLE_ELEMENT.equals ( tag ) ; }
Source:
public void testKeyStore_Load_InputStreamSupplied_Failure ( ) throws java.lang.Exception { byte [ ] buf = "FAKE KEYSTORE" . getBytes ( ) ; java.io.ByteArrayInputStream is = new java.io.ByteArrayInputStream ( buf ) ; try { mKeyStore.load ( is , null ) ; fail ( "Should throw IllegalArgumentException when InputStream is supplied" ) ; } catch ( java.lang.IllegalArgumentException success ) { } }

Target:
public void testKeyStore_Load_InputStreamSupplied_Encrypted_Failure ( ) throws java.lang.Exception { byte [ ] buf = "FAKE KEYSTORE" . getBytes ( ) ; java.io.ByteArrayInputStream is = new java.io.ByteArrayInputStream ( buf ) ; try { mKeyStore.load ( is , null ) ; fail ( "Should throw IllegalArgumentException when InputStream is supplied" ) ; } catch ( java.lang.IllegalArgumentException success ) { } }
Source:
public void importVcf ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "uri" , description = "The URI, using the file:/// scheme, for the content to retrieve." ) java.lang.String uri ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.setComponent ( new android.content.ComponentName ( "com.google.android.contacts" , "com.android.contacts.common.vcard.ImportVCardActivity" ) ) ; intent.setData ( android.net.Uri.parse ( uri ) ) ; mService.startActivity ( intent ) ; }

Target:
public void importVcf ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "uri" , description = "The URI, using the file:/// scheme, for the content to retrieve." ) java.lang.String uri ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; intent.setComponent ( new android.content.ComponentName ( "com.google.android.contacts" , "com.google.android.apps.contacts.vcard.ImportVCardActivity" ) ) ; intent.setData ( android.net.Uri.parse ( uri ) ) ; mService.startActivity ( intent ) ; }
Source:
public void onGuidedActionClicked ( android.support.v17.leanback.widget.GuidedAction action ) { if ( ( action.getId ( ) ) == ( com.android.tv.dvr.ui.DvrSeriesScheduledFragment.ACTION_VIEW_SCHEDULES ) ) { android.content.Intent intent = new android.content.Intent ( getActivity ( ) , com.android.tv.dvr.ui.DvrSchedulesActivity.class ) ; intent.putExtra ( DvrSchedulesActivity.KEY_SCHEDULES_TYPE , DvrSchedulesActivity.TYPE_SERIES_SCHEDULE ) ; intent.putExtra ( DvrSeriesSchedulesFragment.SERIES_SCHEDULES_KEY_SERIES_RECORDING , mSeriesRecording ) ; startActivity ( intent ) ; } getActivity ( ) . finish ( ) ; }

Target:
public void onGuidedActionClicked ( android.support.v17.leanback.widget.GuidedAction action ) { if ( ( action.getId ( ) ) == ( com.android.tv.dvr.ui.DvrSeriesScheduledFragment.ACTION_VIEW_SCHEDULES ) ) { android.content.Intent intent = new android.content.Intent ( getActivity ( ) , com.android.tv.dvr.ui.list.DvrSchedulesActivity.class ) ; intent.putExtra ( DvrSchedulesActivity.KEY_SCHEDULES_TYPE , DvrSchedulesActivity.TYPE_SERIES_SCHEDULE ) ; intent.putExtra ( DvrSeriesSchedulesFragment.SERIES_SCHEDULES_KEY_SERIES_RECORDING , mSeriesRecording ) ; com.android.tv.dvr.ui.BigArguments.reset ( ) ; com.android.tv.dvr.ui.BigArguments.setArgument ( DvrSeriesSchedulesFragment.SERIES_SCHEDULES_KEY_SERIES_PROGRAMS , mPrograms ) ; startActivity ( intent ) ; } getActivity ( ) . finish ( ) ; }
Source:
private void initStateMachine ( int interfaceType ) throws java.lang.Exception { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , interfaceType , mNMService , mStatsService , mTetherHelper ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.reset ( mNMService , mStatsService , mTetherHelper ) ; org.mockito.Mockito.when ( mNMService.getInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ) . thenReturn ( mInterfaceConfiguration ) ; }

Target:
private void initStateMachine ( int interfaceType ) throws java.lang.Exception { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , interfaceType , mNMService , mStatsService , mTetherHelper , mIPv6TetheringInterfaceServices ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.reset ( mNMService , mStatsService , mTetherHelper ) ; org.mockito.Mockito.when ( mNMService.getInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ) . thenReturn ( mInterfaceConfiguration ) ; }
Source:
public java.security.KeyPair generateKeyPair ( ) { if ( ( group ) == null ) { final java.lang.String curveName = org.conscrypt.OpenSSLECKeyPairGenerator.SIZE_TO_CURVE_NAME.get ( org.conscrypt.OpenSSLECKeyPairGenerator.DEFAULT_KEY_SIZE ) ; group = org.conscrypt.OpenSSLECGroupContext.getCurveByName ( curveName ) ; } final org.conscrypt.OpenSSLKey key = new org.conscrypt.OpenSSLKey ( org.conscrypt.NativeCrypto.EC_KEY_generate_key ( group.getNativeRef ( ) ) ) ; return new java.security.KeyPair ( new org.conscrypt.OpenSSLECPublicKey ( group , key ) , new org.conscrypt.OpenSSLECPrivateKey ( group , key ) ) ; }

Target:
public java.security.KeyPair generateKeyPair ( ) { if ( ( group ) == null ) { final java.lang.String curveName = org.conscrypt.OpenSSLECKeyPairGenerator.SIZE_TO_CURVE_NAME.get ( org.conscrypt.OpenSSLECKeyPairGenerator.DEFAULT_KEY_SIZE ) ; group = org.conscrypt.OpenSSLECGroupContext.getCurveByName ( curveName ) ; if ( ( group ) == null ) { throw new java.lang.RuntimeException ( ( "Curve not recognized: " + curveName ) ) ; } } final org.conscrypt.OpenSSLKey key = new org.conscrypt.OpenSSLKey ( org.conscrypt.NativeCrypto.EC_KEY_generate_key ( group.getNativeRef ( ) ) ) ; return new java.security.KeyPair ( new org.conscrypt.OpenSSLECPublicKey ( group , key ) , new org.conscrypt.OpenSSLECPrivateKey ( group , key ) ) ; }
Source:
public void runCmdLine ( @ com.android.annotations.NonNull java.lang.String [ ] command , @ com.android.annotations.Nullable java.util.Map < java.lang.String , java.lang.String > envVariableMap ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { java.lang.Thread.sleep ( 1000 ) ; throw new java.io.IOException ( "foo" ) ; }

Target:
public com.android.ide.common.process.ProcessResult execute ( @ com.android.annotations.NonNull com.android.ide.common.process.JavaProcessInfo javaProcessInfo , @ com.android.annotations.NonNull com.android.ide.common.process.ProcessOutputHandler processOutputHandler ) { try { java.lang.Thread.sleep ( 1000 ) ; throw new java.io.IOException ( "foo" ) ; } catch ( final java.lang.Exception e ) { return new com.android.ide.common.process.ProcessResult ( ) { @ java.lang.Override public com.android.ide.common.process.ProcessResult assertNormalExitValue ( ) throws com.android.ide.common.process.ProcessException { return this ; } @ java.lang.Override public int getExitValue ( ) { return 0 ; } @ java.lang.Override public com.android.ide.common.process.ProcessResult rethrowFailure ( ) throws com.android.ide.common.process.ProcessException { throw new com.android.ide.common.process.ProcessException ( null , e ) ; } } ; } }
Source:
public void onFullscreenModeChanged ( boolean isFullscreenMode ) { cancelAutoFullScreen ( ) ; if ( ( primaryCall ) != null ) { updateFullscreenAndGreenScreenMode ( primaryCall.getState ( ) , primaryCall.getVideoTech ( ) . getSessionModificationState ( ) ) ; } else { updateFullscreenAndGreenScreenMode ( State.INVALID , SessionModificationState.NO_REQUEST ) ; } }

Target:
public void onFullscreenModeChanged ( boolean isFullscreenMode ) { cancelAutoFullScreen ( ) ; if ( ( primaryCall ) != null ) { updateFullscreenAndGreenScreenMode ( primaryCall.getState ( ) , primaryCall.getVideoTech ( ) . getSessionModificationState ( ) ) ; } else { updateFullscreenAndGreenScreenMode ( DialerCallState.INVALID , SessionModificationState.NO_REQUEST ) ; } }
Source:
private void handleReportAudioStatus ( com.android.server.hdmi.HdmiCecMessage cmd ) { byte [ ] params = cmd.getParams ( ) ; boolean mute = ( ( params [ 0 ] ) & 128 ) == 128 ; int volume = ( params [ 0 ] ) & 127 ; tv ( ) . setAudioStatus ( mute , volume ) ; if ( ! ( ( tv ( ) . isSystemAudioActivated ( ) ) ^ mute ) ) { sendUserControlPressedAndReleased ( mAvrAddress , HdmiCecKeycode.CEC_KEYCODE_MUTE ) ; } finishWithCallback ( HdmiControlManager.RESULT_SUCCESS ) ; }

Target:
private void handleReportAudioStatus ( com.android.server.hdmi.HdmiCecMessage cmd ) { byte [ ] params = cmd.getParams ( ) ; boolean mute = com.android.server.hdmi.HdmiUtils.isAudioStatusMute ( cmd ) ; int volume = com.android.server.hdmi.HdmiUtils.getAudioStatusVolume ( cmd ) ; tv ( ) . setAudioStatus ( mute , volume ) ; if ( ! ( ( tv ( ) . isSystemAudioActivated ( ) ) ^ mute ) ) { sendUserControlPressedAndReleased ( mAvrAddress , HdmiCecKeycode.CEC_KEYCODE_MUTE ) ; } finishWithCallback ( HdmiControlManager.RESULT_SUCCESS ) ; }
Source:
private static void doTestEvents ( ) throws java.lang.Exception { art.Test924.enableThreadEvents ( true ) ; java.lang.Thread t = new java.lang.Thread ( "EventTestThread" ) ; java.lang.System.out.println ( "Constructed thread" ) ; java.lang.Thread.yield ( ) ; t.start ( ) ; t.join ( ) ; java.lang.System.out.println ( "Thread joined" ) ; art.Test924.enableThreadEvents ( false ) ; }

Target:
public void run ( ) { try { cdl1.countDown ( ) ; cdl2.await ( ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void getMemoryInfo ( android.app.ActivityManager.MemoryInfo outInfo ) { outInfo.availMem = java.lang.Process.getFreeMemory ( ) ; outInfo.threshold = com.android.server.am.ActivityManagerService.HOME_APP_MEM ; outInfo.lowMemory = ( outInfo.availMem ) < ( ( com.android.server.am.ActivityManagerService.HOME_APP_MEM ) + ( ( ( com.android.server.am.ActivityManagerService.HIDDEN_APP_MEM ) - ( com.android.server.am.ActivityManagerService.HOME_APP_MEM ) ) / 2 ) ) ; }

Target:
public void getMemoryInfo ( android.app.ActivityManager.MemoryInfo outInfo ) { final long homeAppMem = mProcessList.getMemLevel ( ProcessList.HOME_APP_ADJ ) ; final long hiddenAppMem = mProcessList.getMemLevel ( ProcessList.HIDDEN_APP_MIN_ADJ ) ; outInfo.availMem = java.lang.Process.getFreeMemory ( ) ; outInfo.threshold = homeAppMem ; outInfo.lowMemory = ( outInfo.availMem ) < ( homeAppMem + ( ( hiddenAppMem - homeAppMem ) / 2 ) ) ; outInfo.hiddenAppThreshold = hiddenAppMem ; outInfo.secondaryServerThreshold = mProcessList.getMemLevel ( ProcessList.SERVICE_ADJ ) ; outInfo.visibleAppThreshold = mProcessList.getMemLevel ( ProcessList.VISIBLE_APP_ADJ ) ; outInfo.foregroundAppThreshold = mProcessList.getMemLevel ( ProcessList.FOREGROUND_APP_ADJ ) ; }
Source:
public void testTwoSystemTwoDeleted ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; }

Target:
public void testOneSystemOneDeleted ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }
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 android.icu.text.NumberingSystem getInstanceByName ( java.lang.String name ) { return android.icu.text.NumberingSystem.cachedStringData.getInstance ( name , null ) ; }
Source:
public void onLoadFinished ( android.support.v4.content.Loader < android.database.Cursor > loader , android.database.Cursor data ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailFragment.onCreateLoader" , "cursor size is %d" , data.getCount ( ) ) ; recyclerView.setLayoutManager ( new android.support.v7.widget.LinearLayoutManager ( getContext ( ) ) ) ; recyclerView.setAdapter ( new com.android.dialer.voicemail.listui.NewVoicemailAdapter ( data , java.lang.System :: currentTimeMillis ) ) ; }

Target:
public void onLoadFinished ( android.support.v4.content.Loader < android.database.Cursor > loader , android.database.Cursor data ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailFragment.onCreateLoader" , "cursor size is %d" , data.getCount ( ) ) ; recyclerView.setLayoutManager ( new android.support.v7.widget.LinearLayoutManager ( getContext ( ) ) ) ; recyclerView.setAdapter ( new com.android.dialer.voicemail.listui.NewVoicemailAdapter ( data , java.lang.System :: currentTimeMillis , getActivity ( ) . getFragmentManager ( ) ) ) ; }
Source:
protected java.io.File crunchFile ( @ com.android.annotations.NonNull java.io.File file ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException , java.util.zip.DataFormatException { java.io.File outFile = java.io.File.createTempFile ( "pngWriterTest" , ".png" ) ; outFile.deleteOnExit ( ) ; com.android.ide.common.internal.PngCruncher aaptCruncher = getCruncher ( ) ; try { aaptCruncher.crunchPng ( file , outFile ) ; } catch ( java.lang.InterruptedException e ) { e.printStackTrace ( ) ; throw e ; } catch ( com.android.ide.common.internal.LoggedErrorException e ) { e.printStackTrace ( ) ; throw e ; } return outFile ; }

Target:
protected java.io.File crunchFile ( @ com.android.annotations.NonNull java.io.File file ) throws com.android.ide.common.internal.PngException , java.io.IOException { java.io.File outFile = java.io.File.createTempFile ( "pngWriterTest" , ".png" ) ; outFile.deleteOnExit ( ) ; com.android.ide.common.internal.PngCruncher aaptCruncher = getCruncher ( ) ; try { aaptCruncher.crunchPng ( file , outFile ) ; } catch ( com.android.ide.common.internal.PngException e ) { e.printStackTrace ( ) ; throw e ; } return outFile ; }
Source:
private static boolean isNavigatable ( com.intellij.ui.tabs.impl.JBTabsImpl tabs ) { final int selectedIndex = tabs.myVisibleInfos.indexOf ( tabs.getSelectedInfo ( ) ) ; return ( ( tabs.isNavigationVisible ( ) ) && ( selectedIndex >= 0 ) ) && ( tabs.myNavigationActionsEnabled ) ; }

Target:
public final void update ( final com.intellij.ui.tabs.impl.AnActionEvent e ) { com.intellij.ui.tabs.impl.JBTabsImpl tabs = e.getData ( com.intellij.ui.tabs.impl.JBTabsImpl.NAVIGATION_ACTIONS_KEY ) ; e.getPresentation ( ) . setVisible ( ( tabs != null ) ) ; if ( tabs == null ) return ; tabs = findNavigatableTabs ( tabs ) ; e.getPresentation ( ) . setEnabled ( ( tabs != null ) ) ; if ( tabs != null ) { _update ( e , tabs , tabs.getVisibleInfos ( ) . indexOf ( tabs.getSelectedInfo ( ) ) ) ; } }
Source:
private void setSourceType ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType sourceType ) { if ( sourceType == ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType.IMAGE ) ) { chooseForegroundTab ( mImageRadio , mImageForm ) ; } else if ( sourceType == ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType.CLIPART ) ) { chooseForegroundTab ( mClipartRadio , mClipartForm ) ; } else if ( sourceType == ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType.TEXT ) ) { updateFontLabel ( mFontButton.getFont ( ) ) ; chooseForegroundTab ( mTextRadio , mTextForm ) ; mText.setFocus ( ) ; } }

Target:
private void setSourceType ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType sourceType ) { if ( sourceType == ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType.IMAGE ) ) { chooseForegroundTab ( mImageRadio , mImageForm ) ; } else if ( sourceType == ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType.CLIPART ) ) { chooseForegroundTab ( mClipartRadio , mClipartForm ) ; mChooseClipart.setFocus ( ) ; } else if ( sourceType == ( com.android.ide.eclipse.adt.internal.assetstudio.CreateAssetSetWizardState.SourceType.TEXT ) ) { updateFontLabel ( mFontButton.getFont ( ) ) ; chooseForegroundTab ( mTextRadio , mTextForm ) ; mText.setFocus ( ) ; } }
Source:
public void enablingVerboseLoggingIncreasesLogRecSize ( ) { org.junit.Assert.assertTrue ( ( ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE ) > ( WifiStateMachine.NUM_LOG_RECS_NORMAL ) ) ) ; mWsm.enableVerboseLogging ( 1 ) ; for ( int i = 0 ; i < ( ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE ) * 2 ) ; i ++ ) { mWsm.sendMessage ( WifiStateMachine.CMD_DISCONNECT ) ; } mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE , mWsm.getLogRecSize ( ) ) ; }

Target:
public void enablingVerboseLoggingUpdatesLogRecSize ( ) { mWsm.enableVerboseLogging ( 1 ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachineTest.LOG_REC_LIMIT_IN_VERBOSE_MODE , mWsm.getLogRecMaxSize ( ) ) ; }
Source:
public void onCreateActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { android.app.Activity activity = getActivity ( ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( activity ) . id ( com.android.tv.dvr.ui.DvrMissingStorageErrorFragment.ACTION_CANCEL ) . title ( getResources ( ) . getString ( R.string.dvr_action_error_cancel ) ) . build ( ) ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( activity ) . id ( com.android.tv.dvr.ui.DvrMissingStorageErrorFragment.ACTION_FORGET_STORAGE ) . title ( getResources ( ) . getString ( R.string.dvr_action_error_forget_storage ) ) . build ( ) ) ; }

Target:
public void onCreateActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { android.app.Activity activity = getActivity ( ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( activity ) . id ( com.android.tv.dvr.ui.DvrMissingStorageErrorFragment.ACTION_OK ) . title ( android.R.string.ok ) . build ( ) ) ; actions.add ( new android.support.v17.leanback.widget.GuidedAction.Builder ( activity ) . id ( com.android.tv.dvr.ui.DvrMissingStorageErrorFragment.ACTION_OPEN_STORAGE_SETTINGS ) . title ( getResources ( ) . getString ( R.string.dvr_action_error_storage_settings ) ) . build ( ) ) ; }
Source:
public void testManifestIExistingI ( ) { int iFlags = PackageManager.INSTALL_INTERNAL ; int rFlags = PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_internal , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; }

Target:
public void testManifestIExistingE ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } int iFlags = android.content.pm.PackageManager.INSTALL_EXTERNAL ; int rFlags = android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_internal , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; }
Source:
private void connectOtherProfile ( android.bluetooth.BluetoothDevice device ) { if ( ( ! ( mHandler.hasMessages ( com.android.bluetooth.btservice.PhonePolicy.MESSAGE_CONNECT_OTHER_PROFILES ) ) ) && ( ! ( mAdapterService.isQuietModeEnabled ( ) ) ) ) { android.os.Message m = mHandler.obtainMessage ( com.android.bluetooth.btservice.PhonePolicy.MESSAGE_CONNECT_OTHER_PROFILES ) ; m.obj = device ; mHandler.sendMessageDelayed ( m , com.android.bluetooth.btservice.PhonePolicy.CONNECT_OTHER_PROFILES_TIMEOUT ) ; } }

Target:
private void connectOtherProfile ( android.bluetooth.BluetoothDevice device ) { if ( mAdapterService.isQuietModeEnabled ( ) ) { com.android.bluetooth.btservice.PhonePolicy.debugLog ( ( "connectOtherProfile: in quiet mode, skip connect other profile " + device ) ) ; return ; } if ( mConnectOtherProfilesDeviceSet.contains ( device ) ) { com.android.bluetooth.btservice.PhonePolicy.debugLog ( ( "connectOtherProfile: already scheduled callback for " + device ) ) ; return ; } mConnectOtherProfilesDeviceSet.add ( device ) ; android.os.Message m = mHandler.obtainMessage ( com.android.bluetooth.btservice.PhonePolicy.MESSAGE_CONNECT_OTHER_PROFILES ) ; m.obj = device ; mHandler.sendMessageDelayed ( m , com.android.bluetooth.btservice.PhonePolicy.sConnectOtherProfilesTimeoutMillis ) ; }
Source:
boolean disconnect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.a2dp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mStateMachine.sendMessage ( A2dpStateMachine.DISCONNECT , device ) ; return true ; }

Target:
boolean disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , ( "disconnect(): " + device ) ) ; } enforceCallingOrSelfPermission ( com.android.bluetooth.a2dp.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mStateMachine.sendMessage ( A2dpStateMachine.DISCONNECT , device ) ; return true ; }
Source:
public void setOrientationHint ( int degrees ) { if ( ( ( ( degrees != 0 ) && ( degrees != 90 ) ) && ( degrees != 180 ) ) && ( degrees != 270 ) ) { throw new java.lang.IllegalArgumentException ( ( "Unsupported angle: " + degrees ) ) ; } setParameter ( java.lang.String.format ( "video-param-rotation-angle-degrees=%d" , degrees ) ) ; }

Target:
public void setOrientationHint ( int degrees ) { if ( ( ( ( degrees != 0 ) && ( degrees != 90 ) ) && ( degrees != 180 ) ) && ( degrees != 270 ) ) { throw new java.lang.IllegalArgumentException ( ( "Unsupported angle: " + degrees ) ) ; } setParameter ( ( "video-param-rotation-angle-degrees=" + degrees ) ) ; }
Source:
public java.lang.String toString ( ) { if ( ( ( mParentSession ) != null ) && ( mIsStartedFromActiveSession ) ) { return mParentSession.toString ( ) ; } else { java.lang.StringBuilder methodName = new java.lang.StringBuilder ( ) ; methodName.append ( mShortMethodName ) ; if ( ( ( mOwnerInfo ) != null ) && ( ! ( mOwnerInfo.isEmpty ( ) ) ) ) { methodName.append ( "(InCall package: " ) ; methodName.append ( mOwnerInfo ) ; methodName.append ( ")" ) ; } return ( ( methodName.toString ( ) ) + "@" ) + ( getFullSessionId ( ) ) ; } }

Target:
public java.lang.String toString ( ) { if ( ( ( mParentSession ) != null ) && ( mIsStartedFromActiveSession ) ) { return mParentSession.toString ( ) ; } else { java.lang.StringBuilder methodName = new java.lang.StringBuilder ( ) ; methodName.append ( getFullMethodPath ( ) ) ; if ( ( ( mOwnerInfo ) != null ) && ( ! ( mOwnerInfo.isEmpty ( ) ) ) ) { methodName.append ( "(InCall package: " ) ; methodName.append ( mOwnerInfo ) ; methodName.append ( ")" ) ; } return ( ( methodName.toString ( ) ) + "@" ) + ( getFullSessionId ( ) ) ; } }
Source:
public void enter ( ) { com.android.server.telecom.Log.i ( com.android.server.telecom.CallAudioModeStateMachine.LOG_TAG , "Audio focus entering RINGING state" ) ; mAudioManager.requestAudioFocusForCall ( AudioManager.STREAM_RING , AudioManager.AUDIOFOCUS_GAIN_TRANSIENT ) ; if ( ( mMostRecentMode ) == ( android.media.AudioManager.MODE_IN_CALL ) ) { com.android.server.telecom.Log.i ( com.android.server.telecom.CallAudioModeStateMachine.LOG_TAG , ( "Transition from IN_CALL -> RINGTONE." + " Resetting to NORMAL first." ) ) ; mAudioManager.setMode ( AudioManager.MODE_NORMAL ) ; } mAudioManager.setMode ( AudioManager.MODE_RINGTONE ) ; mCallAudioManager.stopCallWaiting ( ) ; mCallAudioManager.startRinging ( ) ; mCallAudioManager.setCallAudioRouteFocusState ( CallAudioRouteStateMachine.HAS_FOCUS ) ; }

Target:
public void enter ( ) { android.telecom.Log.i ( com.android.server.telecom.CallAudioModeStateMachine.LOG_TAG , "Audio focus entering RINGING state" ) ; mAudioManager.requestAudioFocusForCall ( AudioManager.STREAM_RING , AudioManager.AUDIOFOCUS_GAIN_TRANSIENT ) ; if ( ( mMostRecentMode ) == ( android.media.AudioManager.MODE_IN_CALL ) ) { android.telecom.Log.i ( com.android.server.telecom.CallAudioModeStateMachine.LOG_TAG , ( "Transition from IN_CALL -> RINGTONE." + " Resetting to NORMAL first." ) ) ; mAudioManager.setMode ( AudioManager.MODE_NORMAL ) ; } mAudioManager.setMode ( AudioManager.MODE_RINGTONE ) ; mCallAudioManager.stopCallWaiting ( ) ; mCallAudioManager.startRinging ( ) ; mCallAudioManager.setCallAudioRouteFocusState ( CallAudioRouteStateMachine.HAS_FOCUS ) ; }
Source:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier compareQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier referenceQ = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier ) ( reference ) ) ; if ( ( compareQ.mVersion ) == ( referenceQ.mVersion ) ) { return false ; } else if ( ( mVersion ) == ( referenceQ.mVersion ) ) { return true ; } else { return ( mVersion ) > ( compareQ.mVersion ) ; } }

Target:
public boolean isBetterMatchThan ( com.android.ide.common.resources.configuration.ResourceQualifier compareTo , com.android.ide.common.resources.configuration.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.common.resources.configuration.VersionQualifier compareQ = ( ( com.android.ide.common.resources.configuration.VersionQualifier ) ( compareTo ) ) ; com.android.ide.common.resources.configuration.VersionQualifier referenceQ = ( ( com.android.ide.common.resources.configuration.VersionQualifier ) ( reference ) ) ; if ( ( compareQ.mVersion ) == ( referenceQ.mVersion ) ) { return false ; } else if ( ( mVersion ) == ( referenceQ.mVersion ) ) { return true ; } else { return ( mVersion ) > ( compareQ.mVersion ) ; } }
Source:
public void missingAuthToken ( ) throws java.lang.Exception { android.os.Bundle bundle = new android.os.Bundle ( ) ; when ( mAccountManager.getAuthToken ( mAccount , "cooltype" , false , null , null ) ) . thenReturn ( mFuture ) ; when ( mFuture.getResult ( ) ) . thenReturn ( bundle ) ; when ( mFuture.isDone ( ) ) . thenReturn ( true ) ; when ( mFuture.isCancelled ( ) ) . thenReturn ( false ) ; mAuthenticator.getAuthToken ( ) ; }

Target:
public void missingAuthToken ( ) throws java.lang.Exception { android.os.Bundle bundle = new android.os.Bundle ( ) ; org.mockito.Mockito.when ( mAccountManager.getAuthToken ( mAccount , "cooltype" , false , null , null ) ) . thenReturn ( mFuture ) ; org.mockito.Mockito.when ( mFuture.getResult ( ) ) . thenReturn ( bundle ) ; org.mockito.Mockito.when ( mFuture.isDone ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mFuture.isCancelled ( ) ) . thenReturn ( false ) ; mAuthenticator.getAuthToken ( ) ; }
Source:
public void testDensityOnlyWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 2 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertNull ( result ) ; }

Target:
public void testSingleOutput ( ) { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) . getOutputFile ( ) , result.get ( 0 ) ) ; }
Source:
public void onLosing ( android.net.Network network , int maxMsToLive ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLosing" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LOSING ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LOSING ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventOnLosing ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LOSING ) , maxMsToLive ) ) ; } }

Target:
public void onLosing ( android.net.Network network , int maxMsToLive ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLosing" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LOSING ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LOSING ) ) { mEventFacade.postEvent ( TelephonyConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.telephony.TelephonyEvents.NetworkCallbackEvent ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LOSING ) , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE , maxMsToLive ) ) ; } }
Source:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromContainer ( project , AndroidConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromContainer ( project , AndroidConstants.MARKER_XML ) ; removeMarkersFromContainer ( project , AndroidConstants.MARKER_AIDL ) ; removeMarkersFromContainer ( project , AndroidConstants.MARKER_RENDERSCRIPT ) ; removeMarkersFromContainer ( project , AndroidConstants.MARKER_ANDROID ) ; }

Target:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromContainer ( project , AdtConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_XML ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_AIDL ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_RENDERSCRIPT ) ; removeMarkersFromContainer ( project , AdtConstants.MARKER_ANDROID ) ; }
Source:
public void setImmersive ( android.os.IBinder token , boolean immersive ) { synchronized ( this ) { com.android.server.am.ActivityRecord r = mMainStack.isInStackLocked ( token ) ; if ( r == null ) { throw new java.lang.IllegalArgumentException ( ) ; } r.immersive = immersive ; } }

Target:
public void setImmersive ( android.os.IBinder token , boolean immersive ) { synchronized ( this ) { final com.android.server.am.ActivityRecord r = mMainStack.isInStackLocked ( token ) ; if ( r == null ) { throw new java.lang.IllegalArgumentException ( ) ; } r.immersive = immersive ; if ( r == ( mFocusedActivity ) ) { if ( com.android.server.am.ActivityManagerService.DEBUG_IMMERSIVE ) { android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG , ( "Frontmost changed immersion: " + r ) ) ; } applyUpdateLockStateLocked ( r ) ; } } }
Source:
public void test_getResourceAsStream_withSharpChar ( ) throws java.lang.Exception { java.io.InputStream in = getClass ( ) . getResourceAsStream ( ( "/" + ( org.apache.harmony.tests.java.lang.ClassTest.FILENAME ) ) ) ; assertNotNull ( in ) ; in.close ( ) ; in = getClass ( ) . getResourceAsStream ( org.apache.harmony.tests.java.lang.ClassTest.FILENAME ) ; assertNull ( in ) ; in = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( org.apache.harmony.tests.java.lang.ClassTest.FILENAME ) ; assertNotNull ( in ) ; in.close ( ) ; }

Target:
public void test_getResourceAsStream_withSharpChar ( ) throws java.lang.Exception { assertNull ( getClass ( ) . getResourceAsStream ( org.apache.harmony.tests.java.lang.ClassTest.SHARP_RESOURCE_ABS_NAME ) ) ; assertResourceExists ( ( "/" + ( org.apache.harmony.tests.java.lang.ClassTest.SHARP_RESOURCE_ABS_NAME ) ) ) ; assertResourceExists ( org.apache.harmony.tests.java.lang.ClassTest.SHARP_RESOURCE_RELATIVE_NAME ) ; java.io.InputStream in = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( org.apache.harmony.tests.java.lang.ClassTest.SHARP_RESOURCE_ABS_NAME ) ; assertNotNull ( in ) ; in.close ( ) ; }
Source:
private android.security.net.config.NetworkSecurityConfig getSystemStoreConfig ( ) { java.util.ArrayList < android.security.net.config.CertificatesEntryRef > defaultSource = new java.util.ArrayList < android.security.net.config.CertificatesEntryRef > ( ) ; defaultSource.add ( new android.security.net.config.CertificatesEntryRef ( new android.security.net.config.SystemCertificateSource ( ) , false ) ) ; return new android.security.net.config.NetworkSecurityConfig ( true , false , new android.security.net.config.PinSet ( new android.util.ArraySet < android.security.net.config.Pin > ( ) , ( - 1 ) ) , defaultSource ) ; }

Target:
public void testConfigBuilderParentLoop ( ) throws java.lang.Exception { android.security.net.config.NetworkSecurityConfig.Builder config1 = new android.security.net.config.NetworkSecurityConfig.Builder ( ) ; android.security.net.config.NetworkSecurityConfig.Builder config2 = new android.security.net.config.NetworkSecurityConfig.Builder ( ) ; config1.setParent ( config2 ) ; try { config2.setParent ( config1 ) ; fail ( "Loop in NetworkSecurityConfig parents" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public void test_isLinkLocalAddress ( ) throws java.lang.Exception { assertFalse ( java.net.InetAddress.getByName ( "127.0.0.1" ) . isLinkLocalAddress ( ) ) ; assertFalse ( java.net.InetAddress.getByName ( "::ffff:127.0.0.1" ) . isLinkLocalAddress ( ) ) ; assertTrue ( java.net.InetAddress.getByName ( "169.254.1.2" ) . isLinkLocalAddress ( ) ) ; assertFalse ( java.net.InetAddress.getByName ( "fec0::" ) . isLinkLocalAddress ( ) ) ; assertTrue ( java.net.InetAddress.getByName ( "fe80::" ) . isLinkLocalAddress ( ) ) ; }

Target:
public void test_isLinkLocalAddress ( ) throws java.lang.Exception { org.junit.Assert.assertFalse ( java.net.InetAddress.getByName ( "127.0.0.1" ) . isLinkLocalAddress ( ) ) ; org.junit.Assert.assertFalse ( java.net.InetAddress.getByName ( "::ffff:127.0.0.1" ) . isLinkLocalAddress ( ) ) ; org.junit.Assert.assertTrue ( java.net.InetAddress.getByName ( "169.254.1.2" ) . isLinkLocalAddress ( ) ) ; org.junit.Assert.assertFalse ( java.net.InetAddress.getByName ( "fec0::" ) . isLinkLocalAddress ( ) ) ; org.junit.Assert.assertTrue ( java.net.InetAddress.getByName ( "fe80::" ) . isLinkLocalAddress ( ) ) ; }
Source:
com.google.devtools.common.options.OptionsParser.OptionValueDescription getOptionValueDescription ( java.lang.String name ) { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + name ) + "'" ) ) ; } com.google.devtools.common.options.OptionsParserImpl.ParsedOptionEntry entry = parsedValues.get ( field ) ; if ( entry == null ) { return null ; } return entry.asOptionValueDescription ( name ) ; }

Target:
boolean containsExplicitOption ( java.lang.String name ) { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + name ) + "'" ) ) ; } return ( parsedValues.get ( field ) ) != null ; }
Source:
private void explicitCallTransfer ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "explicitCallTransfer" ) ; } if ( ( mCalls.size ( ) ) < 2 ) { return ; } if ( handleCallActionNative ( getByteAddress ( mCurrentDevice ) , HeadsetClientHalConstants.CALL_ACTION_CHLD_4 , ( - 1 ) ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EXPLICIT_CALL_TRANSFER ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't transfer call" ) ; } }

Target:
private void explicitCallTransfer ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "explicitCallTransfer" ) ; } if ( ( mCalls.size ( ) ) < 2 ) { return ; } if ( com.android.bluetooth.hfpclient.NativeInterface.handleCallActionNative ( getByteAddress ( mCurrentDevice ) , HeadsetClientHalConstants.CALL_ACTION_CHLD_4 , ( - 1 ) ) ) { addQueuedAction ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.EXPLICIT_CALL_TRANSFER ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "ERROR: Couldn't transfer call" ) ; } }
Source:
public void onBenchmarkFinish ( ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.putExtra ( "tests" , mTestList ) ; intent.putExtra ( "results" , mTestResults ) ; setResult ( com.android.rs.imagejb.RESULT_OK , intent ) ; finish ( ) ; }

Target:
public void onBenchmarkFinish ( boolean ok ) { if ( ok ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.putExtra ( "tests" , mTestList ) ; intent.putExtra ( "results" , mTestResults ) ; setResult ( com.android.rs.imagejb.RESULT_OK , intent ) ; } else { setResult ( com.android.rs.imagejb.RESULT_CANCELED ) ; } finish ( ) ; }
Source:
public void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.RemoteConnection remoteConnection = new android.telecom.RemoteConnection ( callId , mOutgoingConnectionServiceRpc , connection ) ; mConnectionById.put ( callId , remoteConnection ) ; remoteConnection.registerCallback ( new android.telecom.RemoteConnection.Callback ( ) { @ java.lang.Override public void onDestroyed ( android.telecom.RemoteConnection connection ) { mConnectionById.remove ( callId ) ; maybeDisconnectAdapter ( ) ; } } ) ; mOurConnectionServiceImpl.addRemoteExistingConnection ( remoteConnection ) ; }

Target:
public void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection , android.telecom.Logging.Session.Info sessionInfo ) { java.lang.String callingPackage = mOurConnectionServiceImpl.getApplicationContext ( ) . getOpPackageName ( ) ; android.telecom.RemoteConnection remoteConnection = new android.telecom.RemoteConnection ( callId , mOutgoingConnectionServiceRpc , connection , callingPackage ) ; mConnectionById.put ( callId , remoteConnection ) ; remoteConnection.registerCallback ( new android.telecom.RemoteConnection.Callback ( ) { @ java.lang.Override public void onDestroyed ( android.telecom.RemoteConnection connection ) { mConnectionById.remove ( callId ) ; maybeDisconnectAdapter ( ) ; } } ) ; mOurConnectionServiceImpl.addRemoteExistingConnection ( remoteConnection ) ; }
Source:
public com.android.jack.ir.ast.JAnnotationType apply ( com.android.jack.ir.ast.JAnnotation annotation ) { return annotation.getType ( ) ; }

Target:
public static java.util.Set < com.android.jack.ir.ast.JAnnotationType > getAnnotationTypes ( @ javax.annotation.Nonnull java.util.Collection < com.android.jack.ir.ast.JAnnotation > annotations ) { java.util.Set < com.android.jack.ir.ast.JAnnotationType > annotationTypes = new java.util.HashSet < com.android.jack.ir.ast.JAnnotationType > ( ) ; for ( com.android.jack.ir.ast.JAnnotation annotation : annotations ) { annotationTypes.add ( annotation.getType ( ) ) ; } return annotationTypes ; }
Source:
public void onServiceDisconnected ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; } if ( ( mIImsServiceController ) != null ) { mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; } notifyAllFeaturesRemoved ( ) ; cleanUpService ( ) ; android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + name ) + "): onServiceDisconnected. Rebinding..." ) ) ; startDelayedRebindToService ( ) ; }

Target:
protected boolean isServiceControllerAvailable ( ) { return ( mIImsServiceController ) != null ; }
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.resources.TouchScreen type = com.android.resources.TouchScreen.getEnum ( value ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.TouchScreenQualifier ( ) ; qualifier.mValue = type ; config.setTouchTypeQualifier ( qualifier ) ; return true ; } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.resources.TouchScreen type = com.android.resources.TouchScreen.getEnum ( value ) ; if ( type != null ) { com.android.ide.common.resources.configuration.TouchScreenQualifier qualifier = new com.android.ide.common.resources.configuration.TouchScreenQualifier ( ) ; qualifier.mValue = type ; config.setTouchTypeQualifier ( qualifier ) ; return true ; } return false ; }
Source:
public void dispatchMediaKeyEvent ( android.view.KeyEvent keyEvent ) { mMediaFocusControl.dispatchMediaKeyEvent ( keyEvent ) ; }

Target:
private void makeA2dpDeviceUnavailableNow ( java.lang.String address ) { synchronized ( mA2dpAvrcpLock ) { mAvrcpAbsVolSupported = false ; } android.media.AudioSystem.setDeviceConnectionState ( AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP , AudioSystem.DEVICE_STATE_UNAVAILABLE , address ) ; mConnectedDevices.remove ( AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP ) ; synchronized ( mCurAudioRoutes ) { if ( ( mCurAudioRoutes.mBluetoothName ) != null ) { mCurAudioRoutes.mBluetoothName = null ; android.media.AudioService.sendMsg ( mAudioHandler , android.media.AudioService.MSG_REPORT_NEW_ROUTES , android.media.AudioService.SENDMSG_NOOP , 0 , 0 , null , 0 ) ; } } }
Source:
public int int32 ( ) throws java.io.IOException { read ( 4 ) ; int i = 0 ; i |= ( mBuffer [ 0 ] ) & 255 ; i |= ( ( mBuffer [ 1 ] ) & 255 ) << 8 ; i |= ( ( mBuffer [ 2 ] ) & 255 ) << 16 ; i |= ( ( mBuffer [ 3 ] ) & 255 ) << 24 ; return i ; }

Target:
public float float32 ( ) throws java.io.IOException { int bits = ( ( int ) ( uintv ( ) ) ) ; int shuffled = ( ( ( ( bits & 255 ) << 24 ) | ( ( bits & 65280 ) << 8 ) ) | ( ( bits & 16711680 ) > > 8 ) ) | ( ( bits & - 16777216 ) > > > 24 ) ; return java.lang.Float.intBitsToFloat ( shuffled ) ; }
Source:
public void testMatchesIntentWithOneCategoryAndMatcherWithMultipleCategories ( ) { org.hamcrest.Matcher < android.content.Intent > matcher = android.support.test.espresso.intent.matcher.IntentMatchers.hasCategories ( org.hamcrest.Matchers.allOf ( org.hamcrest.Matchers.hasItem ( org.hamcrest.Matchers.equalTo ( "category" ) ) , org.hamcrest.Matchers.hasItem ( org.hamcrest.Matchers.equalTo ( "category1" ) ) , org.hamcrest.Matchers.hasItem ( org.hamcrest.Matchers.equalTo ( "category2" ) ) ) ) ; assertFalse ( matcher.matches ( new android.content.Intent ( android.content.Intent.ACTION_VIEW , uri ) . addCategory ( "category" ) ) ) ; }

Target:
public void matchesIntentWithOneCategoryAndMatcherWithMultipleCategories ( ) { org.hamcrest.Matcher < android.content.Intent > matcher = android.support.test.espresso.intent.matcher.IntentMatchers.hasCategories ( org.hamcrest.Matchers.allOf ( org.hamcrest.Matchers.hasItem ( org.hamcrest.Matchers.equalTo ( "category" ) ) , org.hamcrest.Matchers.hasItem ( org.hamcrest.Matchers.equalTo ( "category1" ) ) , org.hamcrest.Matchers.hasItem ( org.hamcrest.Matchers.equalTo ( "category2" ) ) ) ) ; org.junit.Assert.assertFalse ( matcher.matches ( new android.content.Intent ( android.content.Intent.ACTION_VIEW , uri ) . addCategory ( "category" ) ) ) ; }
Source:
private static void assertMeidEsn ( java.lang.String id ) { if ( ( id.length ( ) ) == 14 ) { android.telephony.cts.TelephonyManagerTest.assertMeidFormat ( id ) ; } else if ( ( id.length ( ) ) == 8 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalEsnFormat ( id ) ; } else { org.junit.Assert.fail ( "device id on CDMA must be 14-digit hex MEID or 8-digit hex ESN." ) ; } }

Target:
private static void assertMeidEsn ( java.lang.String id ) { org.junit.Assert.assertFalse ( "Meid ESN should not be empty or null" , android.text.TextUtils.isEmpty ( id ) ) ; if ( ( id.length ( ) ) == 14 ) { android.telephony.cts.TelephonyManagerTest.assertMeidFormat ( id ) ; } else if ( ( id.length ( ) ) == 8 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalEsnFormat ( id ) ; } else { org.junit.Assert.fail ( "device id on CDMA must be 14-digit hex MEID or 8-digit hex ESN." ) ; } }