auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private com.android.internal.telephony.uicc.euicc.EuiccCard getEuiccCard ( java.lang.String cardId ) { com.android.internal.telephony.uicc.UiccController controller = com.android.internal.telephony.uicc.UiccController.getInstance ( ) ; int slotId = controller.getUiccSlotForCardId ( cardId ) ; if ( slotId != ( com.android.internal.telephony.uicc.UiccController.INVALID_SLOT_ID ) ) { com.android.internal.telephony.uicc.UiccSlot slot = controller.getUiccSlot ( slotId ) ; if ( slot.isEuicc ( ) ) { return ( ( com.android.internal.telephony.uicc.euicc.EuiccCard ) ( controller.getUiccCardForSlot ( slotId ) ) ) ; } } return null ; }

Target:
private com.android.internal.telephony.uicc.euicc.EuiccCard getEuiccCard ( java.lang.String cardId ) { com.android.internal.telephony.uicc.UiccController controller = com.android.internal.telephony.uicc.UiccController.getInstance ( ) ; int slotId = controller.getUiccSlotForCardId ( cardId ) ; if ( slotId != ( com.android.internal.telephony.uicc.UiccController.INVALID_SLOT_ID ) ) { com.android.internal.telephony.uicc.UiccSlot slot = controller.getUiccSlot ( slotId ) ; if ( slot.isEuicc ( ) ) { return ( ( com.android.internal.telephony.uicc.euicc.EuiccCard ) ( controller.getUiccCardForSlot ( slotId ) ) ) ; } } android.util.Log.e ( com.android.internal.telephony.euicc.EuiccCardController.TAG , ( "EuiccCard is null. CardId : " + cardId ) ) ; return null ; }
Source:
public void turnOnProximitySensor ( ) { try { com.android.server.telecom.Log.startSession ( "ICA.tOnPS" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { mCallsManager.turnOnProximitySensor ( ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void turnOnProximitySensor ( ) { try { android.telecom.Log.startSession ( "ICA.tOnPS" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { mCallsManager.turnOnProximitySensor ( ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void setPrimaryItem ( android.view.ViewGroup container , int position , java.lang.Object object ) { android.app.Fragment fragment = ( ( android.app.Fragment ) ( object ) ) ; if ( fragment != ( mCurrentPrimaryItem ) ) { if ( ( mCurrentPrimaryItem ) != null ) { android.support.v13.app.FragmentCompat.setMenuVisibility ( mCurrentPrimaryItem , false ) ; } if ( fragment != null ) { android.support.v13.app.FragmentCompat.setMenuVisibility ( fragment , true ) ; } mCurrentPrimaryItem = fragment ; } }

Target:
public void setPrimaryItem ( android.view.ViewGroup container , int position , java.lang.Object object ) { android.app.Fragment fragment = ( ( android.app.Fragment ) ( object ) ) ; if ( fragment != ( mCurrentPrimaryItem ) ) { if ( ( mCurrentPrimaryItem ) != null ) { android.support.v13.app.FragmentCompat.setMenuVisibility ( mCurrentPrimaryItem , false ) ; android.support.v13.app.FragmentCompat.setUserVisibleHint ( mCurrentPrimaryItem , false ) ; } if ( fragment != null ) { android.support.v13.app.FragmentCompat.setMenuVisibility ( fragment , true ) ; android.support.v13.app.FragmentCompat.setUserVisibleHint ( fragment , true ) ; } mCurrentPrimaryItem = fragment ; } }
Source:
public void requestImageRef ( final android.os.Message msg ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { requestImageRef ( msg ) ; } } ) ; return ; } mAwContents.requestImageRef ( msg ) ; }

Target:
public java.lang.String getUrl ( ) { 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 getUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }
Source:
public void setOverScrollMode ( final int mode ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setOverScrollMode ( mode ) ; } } ) ; return ; } mAwContents.setOverScrollMode ( mode ) ; }

Target:
public void flingScroll ( final int vx , final int vy ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { flingScroll ( vx , vy ) ; } } ) ; return ; } mAwContents.flingScroll ( vx , vy ) ; }
Source:
private boolean loopQueryCalls ( ) { if ( ( callsInState ( BluetoothHeadsetClientCall.CALL_STATE_ACTIVE ) ) > 1 ) { return true ; } android.bluetooth.BluetoothHeadsetClientCall c = getCall ( BluetoothHeadsetClientCall.CALL_STATE_INCOMING ) ; if ( ( c != null ) && ( ( mIndicatorCallSetup ) == ( HeadsetClientHalConstants.CALLSETUP_NONE ) ) ) return true ; return false ; }

Target:
private boolean loopQueryCalls ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , "loopQueryCalls, starting call query loop" ) ; } if ( ( mCalls.size ( ) ) > 0 ) { return true ; } android.bluetooth.BluetoothHeadsetClientCall c = getCall ( BluetoothHeadsetClientCall.CALL_STATE_INCOMING ) ; if ( ( c != null ) && ( ( mIndicatorCallSetup ) == ( HeadsetClientHalConstants.CALLSETUP_NONE ) ) ) return true ; return false ; }
Source:
public void testDockActivity ( ) throws java.lang.Exception { HEAD ( 5 ) ; android.server.cts.c121a Merge ; }

Target:
public void testDockActivity ( ) throws java.lang.Exception { if ( ( ! ( supportsMultiWindowMode ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
public void testConfigurationUpdatesWhenRotatingToSideFromDocked ( ) throws java.lang.Exception { setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; rotateAndCheckSizes ( initialSizes , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }

Target:
public void testConfigurationUpdatesWhenRotatingToSideFromDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsMultiWindowMode ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; rotateAndCheckSizes ( initialSizes , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }
Source:
private com.ibm.icu.impl.SimplePatternFormatter getPluralFormatter ( com.ibm.icu.util.MeasureUnit unit , com.ibm.icu.text.MeasureFormat.FormatWidth width , int index ) { if ( index != ( com.ibm.icu.text.PluralRules.StandardPluralCategories.OTHER_INDEX ) ) { com.ibm.icu.impl.SimplePatternFormatter pattern = getFormatterOrNull ( unit , width , index ) ; if ( pattern != null ) { return pattern ; } } return getFormatter ( unit , width , StandardPluralCategories.OTHER_INDEX ) ; }

Target:
private com.ibm.icu.impl.SimplePatternFormatter getPluralFormatter ( com.ibm.icu.util.MeasureUnit unit , com.ibm.icu.text.MeasureFormat.FormatWidth width , int index ) { if ( index != ( com.ibm.icu.impl.StandardPlural.OTHER_INDEX ) ) { com.ibm.icu.impl.SimplePatternFormatter pattern = getFormatterOrNull ( unit , width , index ) ; if ( pattern != null ) { return pattern ; } } return getFormatter ( unit , width , StandardPlural.OTHER_INDEX ) ; }
Source:
public boolean isVoicemailVibrationEnabled ( android.telecom.PhoneAccountHandle accountHandle ) { final com.android.internal.telephony.Phone phone = com.android.phone.PhoneUtils.getPhoneForPhoneAccountHandle ( accountHandle ) ; if ( phone == null ) { return false ; } return com.android.phone.settings.VoicemailNotificationSettingsUtil.isVibrationEnabled ( phone ) ; }

Target:
private boolean isUssdApiAllowed ( int subId ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( mPhone.getContext ( ) . getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; if ( configManager == null ) { return false ; } android.os.PersistableBundle pb = configManager.getConfigForSubId ( subId ) ; if ( pb == null ) { return false ; } return pb.getBoolean ( CarrierConfigManager.KEY_ALLOW_USSD_REQUESTS_VIA_TELEPHONY_MANAGER_BOOL ) ; }
Source:
public static com.google.common.io.InputSupplier < java.io.StringReader > newReaderSupplier ( final java.lang.String value ) { com.google.common.base.Preconditions.checkNotNull ( value ) ; return new com.google.common.io.InputSupplier < java.io.StringReader > ( ) { @ java.lang.Override public java.io.StringReader getInput ( ) { return new java.io.StringReader ( value ) ; } } ; }

Target:
public static < T > T readLines ( java.lang.Readable readable , com.google.common.io.LineProcessor < T > processor ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( readable ) ; com.google.common.base.Preconditions.checkNotNull ( processor ) ; com.google.common.io.LineReader lineReader = new com.google.common.io.LineReader ( readable ) ; java.lang.String line ; while ( ( line = lineReader.readLine ( ) ) != null ) { if ( ! ( processor.processLine ( line ) ) ) { break ; } } return processor.getResult ( ) ; }
Source:
private static com.android.jack.resource.ResourceImporter getResourceImporter ( @ javax.annotation.Nonnull java.util.List < java.io.File > importedResources , @ javax.annotation.Nonnull com.android.sched.util.RunnableHooks hooks ) throws com.android.jack.resource.ResourceReadingException { java.util.List < com.android.sched.vfs.InputVDir > resourceVDirs = new java.util.ArrayList < com.android.sched.vfs.InputVDir > ( ) ; for ( java.io.File resourceDir : importedResources ) { try { com.android.sched.vfs.InputRootVDir dir = new com.android.sched.vfs.DirectDir ( new com.android.sched.util.file.Directory ( resourceDir.getPath ( ) , hooks , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.READ , com.android.sched.util.file.FileOrDirectory.ChangePermission.NOCHANGE ) ) ; resourceVDirs.add ( dir ) ; } catch ( java.io.IOException ioException ) { throw new com.android.jack.resource.ResourceReadingException ( ioException ) ; } } return new com.android.jack.resource.ResourceImporter ( resourceVDirs ) ; }

Target:
private static com.android.jack.resource.ResourceImporter getResourceImporter ( @ javax.annotation.Nonnull java.util.List < java.io.File > importedResources , @ javax.annotation.Nonnull com.android.sched.util.RunnableHooks hooks ) throws com.android.jack.resource.ResourceReadingException { java.util.List < com.android.sched.vfs.InputVFS > resourceVDirs = new java.util.ArrayList < com.android.sched.vfs.InputVFS > ( ) ; for ( java.io.File resourceDir : importedResources ) { try { com.android.sched.vfs.InputVFS dir = new com.android.sched.vfs.DirectVFS ( new com.android.sched.util.file.Directory ( resourceDir.getPath ( ) , hooks , com.android.sched.util.file.FileOrDirectory.Existence.MUST_EXIST , com.android.sched.util.file.FileOrDirectory.Permission.READ , com.android.sched.util.file.FileOrDirectory.ChangePermission.NOCHANGE ) ) ; resourceVDirs.add ( dir ) ; } catch ( java.io.IOException ioException ) { throw new com.android.jack.resource.ResourceReadingException ( ioException ) ; } } return new com.android.jack.resource.ResourceImporter ( resourceVDirs ) ; }
Source:
public void notifyFailed ( ) { ( mRetryCounter ) ++ ; long temp = java.lang.Math.min ( mMaximumDelayMs , ( ( long ) ( ( mStartDelayMs ) * ( java.lang.Math.pow ( mMultiplier , mRetryCounter ) ) ) ) ) ; mCurrentDelayMs = ( ( long ) ( ( ( 1 + ( java.lang.Math.random ( ) ) ) / 2 ) * temp ) ) ; mHandler.removeCallbacks ( mRunnable ) ; mHandler.postDelayed ( mRunnable , mCurrentDelayMs ) ; }

Target:
public void stop ( ) { mRetryCounter = 0 ; mHandlerAdapter.removeCallbacks ( mRunnable ) ; }
Source:
public void testInstall_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.DistroVersion validDistroVersion = new libcore.tzdata.update2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validDistroVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; libcore.tzdata.update2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { libcore.tzdata.shared2.DistroVersion validDistroVersion = new libcore.tzdata.shared2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validDistroVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public static android.icu.util.UResourceBundle getBundleInstance ( java.lang.String baseName , android.icu.util.ULocale locale , java.lang.ClassLoader loader ) { if ( baseName == null ) { baseName = android.icu.impl.ICUResourceBundle.ICU_BASE_NAME ; } if ( locale == null ) { locale = android.icu.util.ULocale.getDefault ( ) ; } return android.icu.util.UResourceBundle.getBundleInstance ( baseName , locale.toString ( ) , loader , false ) ; }

Target:
public static android.icu.util.UResourceBundle getBundleInstance ( java.lang.String baseName , android.icu.util.ULocale locale , java.lang.ClassLoader loader ) { if ( baseName == null ) { baseName = android.icu.impl.ICUData.ICU_BASE_NAME ; } if ( locale == null ) { locale = android.icu.util.ULocale.getDefault ( ) ; } return android.icu.util.UResourceBundle.getBundleInstance ( baseName , locale.getBaseName ( ) , loader , false ) ; }
Source:
private static java.lang.String toUnsignedString ( long i , int shift ) { char [ ] buf = new char [ 64 ] ; int charPos = 64 ; int radix = 1 << shift ; long mask = radix - 1 ; do { buf [ ( -- charPos ) ] = java.lang.Integer.digits [ ( ( int ) ( i & mask ) ) ] ; i >>>= shift ; } while ( i != 0 ) ; return new java.lang.String ( buf , charPos , ( 64 - charPos ) ) ; }

Target:
private static java.lang.String toUnsignedString0 ( long i , int shift ) { char [ ] buf = new char [ 64 ] ; int charPos = 64 ; int radix = 1 << shift ; long mask = radix - 1 ; do { buf [ ( -- charPos ) ] = java.lang.Integer.digits [ ( ( int ) ( i & mask ) ) ] ; i >>>= shift ; } while ( i != 0 ) ; return new java.lang.String ( buf , charPos , ( 64 - charPos ) ) ; }
Source:
private void addCall ( com.android.server.telecom.Call call ) { if ( mCalls.contains ( call ) ) { com.android.server.telecom.Log.w ( LOG_TAG , "Call TC@%s is being added twice." , call.getId ( ) ) ; return ; } com.android.server.telecom.Log.d ( LOG_TAG , "Call added with id TC@%s in state %s" , call.getId ( ) , com.android.server.telecom.CallState.toString ( call.getState ( ) ) ) ; if ( ( mCallStateToCalls.get ( call.getState ( ) ) ) != null ) { mCallStateToCalls.get ( call.getState ( ) ) . add ( call ) ; } updateForegroundCall ( ) ; mCalls.add ( call ) ; onCallEnteringState ( call , call.getState ( ) ) ; }

Target:
private void addCall ( com.android.server.telecom.Call call ) { if ( mCalls.contains ( call ) ) { android.telecom.Log.w ( LOG_TAG , "Call TC@%s is being added twice." , call.getId ( ) ) ; return ; } android.telecom.Log.d ( LOG_TAG , "Call added with id TC@%s in state %s" , call.getId ( ) , com.android.server.telecom.CallState.toString ( call.getState ( ) ) ) ; if ( ( mCallStateToCalls.get ( call.getState ( ) ) ) != null ) { mCallStateToCalls.get ( call.getState ( ) ) . add ( call ) ; } updateForegroundCall ( ) ; mCalls.add ( call ) ; onCallEnteringState ( call , call.getState ( ) ) ; }
Source:
void enableVerboseLogging ( int verbose ) { if ( verbose > 0 ) { com.android.server.wifi.WifiNative.DBG = true ; } else { com.android.server.wifi.WifiNative.DBG = false ; } }

Target:
void enableVerboseLogging ( int verbose ) { if ( verbose > 0 ) { com.android.server.wifi.WifiNative.DBG = true ; } else { com.android.server.wifi.WifiNative.DBG = false ; } if ( ( mWificondControl ) != null ) { mWificondControl.enableVerboseLogging ( ( verbose > 0 ? true : false ) ) ; } }
Source:
public static void genRandomInts ( long seed , int min , int max , int [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = min + ( r.nextInt ( ( ( max - min ) + 1 ) ) ) ; } }

Target:
public static void genRandomInts ( long seed , int min , int max , int [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { long range = ( max - min ) + 1 ; array [ i ] = ( ( int ) ( min + ( ( r.nextLong ( ) ) % range ) ) ) ; } }
Source:
public void forceCheckStateForTests ( int checkStatus , com.android.server.timezone.PackageVersions packageVersions ) { int optimisticLockId = getCurrentOptimisticLockId ( ) ; writeStatusRow ( optimisticLockId , optimisticLockId , checkStatus , packageVersions ) ; }

Target:
public void forceCheckStateForTests ( int checkStatus , com.android.server.timezone.PackageVersions packageVersions ) { synchronized ( this ) { try { int optimisticLockId = getCurrentOptimisticLockId ( ) ; writePackageStatusWithOptimisticLockCheck ( optimisticLockId , optimisticLockId , checkStatus , packageVersions ) ; } catch ( java.io.IOException | java.text.ParseException e ) { throw new java.lang.IllegalStateException ( e ) ; } } }
Source:
public void treeChanged ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { tree = model.getTree ( ) ; selectedNode = model.getSelection ( ) ; setBounds ( ) ; setTransform ( ) ; } } } ) ; doRedraw ( ) ; }

Target:
public void loadAllData ( ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( this ) { tree = model.getTree ( ) ; selectedNode = model.getSelection ( ) ; viewport = model.getViewport ( ) ; setBounds ( ) ; setTransform ( ) ; } } } ) ; }
Source:
public void TestCheckResultToString11447 ( ) { android.icu.text.SpoofChecker.CheckResult checkResult = new android.icu.text.SpoofChecker.CheckResult ( ) ; android.icu.text.SpoofChecker sc = new android.icu.text.SpoofChecker.Builder ( ) . setChecks ( ( - 1 ) ) . build ( ) ; sc.failsChecks ( "1१" , checkResult ) ; assertTrue ( "CheckResult: " , checkResult.toString ( ) . contains ( "MIXED_NUMBERS" ) ) ; }

Target:
public void TestCheckResultToString11447 ( ) { android.icu.text.SpoofChecker.CheckResult checkResult = new android.icu.text.SpoofChecker.CheckResult ( ) ; android.icu.text.SpoofChecker sc = new android.icu.text.SpoofChecker.Builder ( ) . setChecks ( SpoofChecker.MIXED_NUMBERS ) . build ( ) ; sc.failsChecks ( "1१" , checkResult ) ; assertTrue ( "CheckResult: " , checkResult.toString ( ) . contains ( "MIXED_NUMBERS" ) ) ; }
Source:
void stateChangeCallback ( int status ) { if ( status == ( AbstractionLayer.BT_STATE_OFF ) ) { mAdapterStateMachine.sendMessage ( AdapterState.DISABLED_NATIVE ) ; } else if ( status == ( AbstractionLayer.BT_STATE_ON ) ) { mAdapterStateMachine.sendMessage ( AdapterState.ENABLED_NATIVE ) ; } else { android.util.Log.e ( "TAG" , ( ( "Incorrect status " + status ) + " in stateChangeCallback" ) ) ; } }

Target:
void stateChangeCallback ( int status ) { if ( status == ( AbstractionLayer.BT_STATE_OFF ) ) { debugLog ( "stateChangeCallback: disableNative() completed" ) ; } else if ( status == ( AbstractionLayer.BT_STATE_ON ) ) { mAdapterStateMachine.sendMessage ( AdapterState.BLE_STARTED ) ; } else { android.util.Log.e ( com.android.bluetooth.btservice.AdapterService.TAG , ( ( "Incorrect status " + status ) + " in stateChangeCallback" ) ) ; } }
Source:
public void testAllowBackup ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestOrderDetector.ALLOW_BACKUP ) ; assertEquals ( ( "AndroidManifest.xml:9: Warning: Should explicitly set android:allowBackup to " + ( ( ( ( "true or false (it's true by default, and that can have some security " + "implications for the application\'s data) [AllowBackup]\n" ) + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( "AndroidManifest.xml" , "apicheck/minsdk14.xml=>AndroidManifest.xml" , "res/values/strings.xml" ) ) ; }

Target:
public void testAllowBackup ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( ManifestDetector.ALLOW_BACKUP ) ; assertEquals ( ( "AndroidManifest.xml:9: Warning: Should explicitly set android:allowBackup to " + ( ( ( ( "true or false (it's true by default, and that can have some security " + "implications for the application\'s data) [AllowBackup]\n" ) + " <application\n" ) + " ^\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( "AndroidManifest.xml" , "apicheck/minsdk14.xml=>AndroidManifest.xml" , "res/values/strings.xml" ) ) ; }
Source:
public void createGlobalMethodNameProvider ( @ javax.annotation.Nonnull java.util.Map < java.lang.String , java.lang.String > existingNames , @ javax.annotation.Nonnull java.util.Collection < com.android.jack.ir.ast.JMethodIdWide > methodIds ) throws com.android.jack.JackIOException { for ( com.android.jack.ir.ast.JMethodIdWide mid : methodIds ) { if ( ! ( com.android.jack.shrob.obfuscation.Renamer.mustBeRenamed ( mid ) ) ) { existingNames.put ( com.android.jack.shrob.obfuscation.Renamer.getKey ( mid ) , mid.getName ( ) ) ; } } globalMethodNameProvider = new com.android.jack.shrob.obfuscation.nameprovider.MappingNameProvider ( getNameProvider ( obfuscationDictionary ) , existingNames ) ; }

Target:
public void createGlobalMethodNameProvider ( @ javax.annotation.Nonnull java.util.Map < com.android.jack.shrob.obfuscation.key.MethodKey , java.lang.String > existingNames , @ javax.annotation.Nonnull java.util.Collection < com.android.jack.ir.ast.JMethodIdWide > methodIds ) throws com.android.jack.JackIOException { for ( com.android.jack.ir.ast.JMethodIdWide mid : methodIds ) { if ( ! ( com.android.jack.shrob.obfuscation.Renamer.mustBeRenamed ( mid ) ) ) { existingNames.put ( new com.android.jack.shrob.obfuscation.key.MethodKey ( mid ) , mid.getName ( ) ) ; } } globalMethodNameProvider = new com.android.jack.shrob.obfuscation.nameprovider.MappingNameProvider ( getNameProvider ( obfuscationDictionary ) , existingNames ) ; }
Source:
public void stkCallSetup ( int var1 , long var2 ) { }

Target:
public void stkCallSetup ( int indicationType , long timeout ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_CALL_SETUP , timeout ) ; if ( ( mRil.mCatCallSetUpRegistrant ) != null ) { mRil.mCatCallSetUpRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , timeout , null ) ) ; } }
Source:
public void call ( org.chromium.mojo.bindings.RunResponseMessageParams response ) { mVersion = response.queryVersionResult.version ; try { callback.call ( mVersion ) ; } catch ( java.lang.RuntimeException e ) { android.util.Log.wtf ( "org.chromium.mojo.bindings.Interface" , "Uncaught runtime exception" , e ) ; } }

Target:
public void call ( org.chromium.mojo.bindings.interfacecontrol.RunResponseMessageParams response ) { if ( ( ( response.output ) != null ) && ( ( response.output.which ( ) ) == ( RunOutput.Tag.QueryVersionResult ) ) ) { mVersion = response.output.getQueryVersionResult ( ) . version ; } try { callback.call ( mVersion ) ; } catch ( java.lang.RuntimeException e ) { android.util.Log.wtf ( "org.chromium.mojo.bindings.Interface" , "Uncaught runtime exception" , e ) ; } }
Source:
public com.android.sched.vfs.InputVFile getInputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.NotFileOrDirectoryException { java.io.File file = new java.io.File ( dir , path.getPathAsString ( java.io.File.separatorChar ) ) ; if ( ! ( file.isFile ( ) ) ) { throw new com.android.sched.util.file.NotFileOrDirectoryException ( new com.android.sched.util.location.FileLocation ( file ) ) ; } return new com.android.sched.vfs.DirectFile ( file , vfsRoot ) ; }

Target:
public com.android.sched.vfs.InputVFile getInputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileOrDirectoryException { java.io.File file = new java.io.File ( dir , path.getPathAsString ( java.io.File.separatorChar ) ) ; if ( ! ( file.exists ( ) ) ) { throw new com.android.sched.util.file.NoSuchFileException ( new com.android.sched.util.location.FileLocation ( file ) ) ; } if ( ! ( file.isFile ( ) ) ) { throw new com.android.sched.util.file.NotFileOrDirectoryException ( new com.android.sched.util.location.FileLocation ( file ) ) ; } return new com.android.sched.vfs.DirectFile ( file , vfsRoot ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JReturnBasicBlock bb ) { com.android.jack.dx.rop.code.InsnList il = createInsnList ( instructions , 0 ) ; il.setImmutable ( ) ; ropBb.createBasicBlock ( getBlockId ( bb ) , il , IntList.EMPTY , ( - 1 ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JReturnBasicBlock bb ) { java.util.List < com.android.jack.dx.ssa.SsaInsn > il = createInsnList ( instructions , 0 ) ; ssaBb.setRopLabel ( getBlockId ( bb ) ) ; ssaBb.setInsns ( il ) ; ssaBb.setSuccessors ( IntList.EMPTY , ( - 1 ) ) ; return false ; }
Source:
private void sendEmergencyCallbackModeChange ( ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_ECM_STATE , isInEcm ( ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManagerNative.broadcastStickyIntent ( intent , null , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , "sendEmergencyCallbackModeChange" ) ; }

Target:
private void sendEmergencyCallbackModeChange ( ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_ECM_STATE , isInEcm ( ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManagerNative.broadcastStickyIntent ( intent , null , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "sendEmergencyCallbackModeChange: isInEcm=" + ( isInEcm ( ) ) ) ) ; }
Source:
public void onServiceDisconnected ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; } if ( isServiceControllerAvailable ( ) ) { mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; } notifyAllFeaturesRemoved ( ) ; cleanUpService ( ) ; android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + name ) + "): onServiceDisconnected. Rebinding..." ) ) ; startDelayedRebindToService ( ) ; }

Target:
public void onBindingDied ( android.content.ComponentName name ) { synchronized ( mLock ) { mIsBinding = false ; mIsBound = false ; } cleanupConnection ( ) ; android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + name ) + "): onBindingDied. Starting rebind..." ) ) ; startDelayedRebindToService ( ) ; }
Source:
private void doBadPublishConfiguration ( java.lang.String serviceName , byte [ ] ssi , byte [ ] matchFilter ) throws java.lang.IllegalArgumentException { android.net.wifi.nan.PublishConfig publishConfig = new android.net.wifi.nan.PublishConfig.Builder ( ) . setServiceName ( serviceName ) . setServiceSpecificInfo ( ssi ) . setMatchFilter ( matchFilter ) . build ( ) ; int clientId = doConnect ( ) ; android.net.wifi.nan.IWifiNanDiscoverySessionCallback mockCallback = org.mockito.Mockito.mock ( android.net.wifi.nan.IWifiNanDiscoverySessionCallback.class ) ; mDut.publish ( clientId , publishConfig , mockCallback ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . publish ( clientId , publishConfig , mockCallback ) ; }

Target:
private void doBadPublishConfiguration ( java.lang.String serviceName , byte [ ] ssi , byte [ ] matchFilter ) throws java.lang.IllegalArgumentException { android.net.wifi.aware.PublishConfig publishConfig = new android.net.wifi.aware.PublishConfig.Builder ( ) . setServiceName ( serviceName ) . setServiceSpecificInfo ( ssi ) . setMatchFilter ( matchFilter ) . build ( ) ; int clientId = doConnect ( ) ; android.net.wifi.aware.IWifiAwareDiscoverySessionCallback mockCallback = org.mockito.Mockito.mock ( android.net.wifi.aware.IWifiAwareDiscoverySessionCallback.class ) ; mDut.publish ( clientId , publishConfig , mockCallback ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . publish ( clientId , publishConfig , mockCallback ) ; }
Source:
private boolean endOperationDeferLogLocked ( int cookie ) { final android.database.sqlite.SQLiteConnection.Operation operation = getOperationLocked ( cookie ) ; if ( operation != null ) { operation.mEndTime = java.lang.System.currentTimeMillis ( ) ; operation.mFinished = true ; return ( SQLiteDebug.DEBUG_LOG_SLOW_QUERIES ) && ( android.database.sqlite.SQLiteDebug.shouldLogSlowQuery ( ( ( operation.mEndTime ) - ( operation.mStartTime ) ) ) ) ; } return false ; }

Target:
private boolean endOperationDeferLogLocked ( int cookie ) { final android.database.sqlite.SQLiteConnection.Operation operation = getOperationLocked ( cookie ) ; if ( operation != null ) { if ( android.os.Trace.isTagEnabled ( Trace.TRACE_TAG_DATABASE ) ) { android.os.Trace.asyncTraceEnd ( Trace.TRACE_TAG_DATABASE , operation.getTraceMethodName ( ) , operation.mCookie ) ; } operation.mEndTime = java.lang.System.currentTimeMillis ( ) ; operation.mFinished = true ; return ( SQLiteDebug.DEBUG_LOG_SLOW_QUERIES ) && ( android.database.sqlite.SQLiteDebug.shouldLogSlowQuery ( ( ( operation.mEndTime ) - ( operation.mStartTime ) ) ) ) ; } return false ; }
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:
int getConnectionState ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mState ; }
Source:
public void returnsBufferWithRightSize ( ) { com.android.volley.toolbox.ByteArrayPool pool = new com.android.volley.toolbox.ByteArrayPool ( 32 ) ; byte [ ] buf1 = pool.getBuf ( 16 ) ; pool.returnBuf ( buf1 ) ; byte [ ] buf2 = pool.getBuf ( 17 ) ; assertNotSame ( buf2 , buf1 ) ; byte [ ] buf3 = pool.getBuf ( 15 ) ; assertSame ( buf3 , buf1 ) ; }

Target:
public void returnsBufferWithRightSize ( ) { com.android.volley.toolbox.ByteArrayPool pool = new com.android.volley.toolbox.ByteArrayPool ( 32 ) ; byte [ ] buf1 = pool.getBuf ( 16 ) ; pool.returnBuf ( buf1 ) ; byte [ ] buf2 = pool.getBuf ( 17 ) ; org.junit.Assert.assertNotSame ( buf2 , buf1 ) ; byte [ ] buf3 = pool.getBuf ( 15 ) ; org.junit.Assert.assertSame ( buf3 , buf1 ) ; }
Source:
java.lang.String computeChangeOfLocalMessage ( java.lang.String newMessage ) { com.android.incallui.rtt.impl.RttChatMessage rttChatMessage = null ; if ( ( lastIndexOfLocalMessage ) >= 0 ) { rttChatMessage = rttMessages.get ( lastIndexOfLocalMessage ) ; } if ( ( rttChatMessage == null ) || ( rttChatMessage.isFinished ( ) ) ) { return newMessage ; } else { return com.android.incallui.rtt.impl.RttChatMessage.computeChangedString ( rttChatMessage.getContent ( ) , newMessage ) ; } }

Target:
java.lang.String computeChangeOfLocalMessage ( java.lang.String newMessage ) { com.android.incallui.rtt.protocol.RttChatMessage rttChatMessage = null ; if ( ( lastIndexOfLocalMessage ) >= 0 ) { rttChatMessage = rttMessages.get ( lastIndexOfLocalMessage ) ; } if ( ( rttChatMessage == null ) || ( rttChatMessage.isFinished ( ) ) ) { return newMessage ; } else { return com.android.incallui.rtt.protocol.RttChatMessage.computeChangedString ( rttChatMessage.getContent ( ) , newMessage ) ; } }
Source:
protected com.android.jack.ProguardFlags generateApplyMapping ( @ javax.annotation.Nonnull java.io.File mappingFile ) throws java.io.IOException { java.io.File applyMapping = com.android.jack.TestTools.createTempFile ( "mapping.flags" , null ) ; java.io.BufferedWriter writer = new java.io.BufferedWriter ( new java.io.FileWriter ( applyMapping ) ) ; writer.append ( "-applymapping " ) ; writer.append ( mappingFile.getAbsolutePath ( ) ) ; writer.close ( ) ; return new com.android.jack.ProguardFlags ( applyMapping ) ; }

Target:
protected com.android.jack.ProguardFlags generateApplyMapping ( @ javax.annotation.Nonnull java.io.File mappingFile ) throws java.io.IOException { java.io.File applyMapping = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "mapping.flags" , null ) ; java.io.BufferedWriter writer = new java.io.BufferedWriter ( new java.io.FileWriter ( applyMapping ) ) ; writer.append ( "-applymapping " ) ; writer.append ( mappingFile.getAbsolutePath ( ) ) ; writer.close ( ) ; return new com.android.jack.ProguardFlags ( applyMapping ) ; }
Source:
public final void init ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { initialized = false ; javax.crypto.Cipher.checkOpmode ( opmode ) ; if ( ( spi ) != null ) { checkCryptoPerm ( spi , key , params ) ; spi.engineInit ( opmode , key , params , random ) ; } else { chooseProvider ( javax.crypto.Cipher.I_PARAMS , opmode , key , null , params , random ) ; } initialized = true ; this . opmode = opmode ; }

Target:
public final void init ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { initialized = false ; javax.crypto.Cipher.checkOpmode ( opmode ) ; if ( ( spi ) != null ) { spi.engineInit ( opmode , key , params , random ) ; } else { chooseProvider ( javax.crypto.Cipher.InitType.ALGORITHM_PARAMS , opmode , key , null , params , random ) ; } initialized = true ; this . opmode = opmode ; }
Source:
private static void assertHexadecimalEsnFormat ( java.lang.String deviceId ) { java.lang.String esnPattern = "[0-9a-fA-F]{8}" ; assertTrue ( ( ( ( "ESN hex device id " + deviceId ) + " does not match pattern " ) + esnPattern ) , java.util.regex.Pattern.matches ( esnPattern , deviceId ) ) ; assertFalse ( ( ( "ESN hex device id " + deviceId ) + " must not be a pseudo-ESN" ) , "80" . equals ( deviceId.substring ( 0 , 2 ) ) ) ; }

Target:
private static void assertHexadecimalEsnFormat ( java.lang.String deviceId ) { java.lang.String esnPattern = "[0-9a-fA-F]{8}" ; org.junit.Assert.assertTrue ( ( ( ( "ESN hex device id " + deviceId ) + " does not match pattern " ) + esnPattern ) , java.util.regex.Pattern.matches ( esnPattern , deviceId ) ) ; org.junit.Assert.assertFalse ( ( ( "ESN hex device id " + deviceId ) + " must not be a pseudo-ESN" ) , "80" . equals ( deviceId.substring ( 0 , 2 ) ) ) ; }
Source:
public final com.android.tools.perflib.heap.Instance findReference ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.Instance instance = mHeaps.get ( i ) . getInstance ( id ) ; if ( instance != null ) { return instance ; } } return findClass ( id ) ; }

Target:
public final com.android.tools.perflib.heap.Instance findReference ( long id ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { com.android.tools.perflib.heap.Instance instance = mHeap.getInstance ( id ) ; if ( instance != null ) { return instance ; } } return findClass ( id ) ; }
Source:
public boolean setExternalSim ( boolean external ) { java.lang.String value = ( external ) ? "1" : "0" ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "Setting external_sim to " + value ) ) ; return doBooleanCommand ( ( "SET external_sim " + value ) ) ; }

Target:
public boolean setExternalSim ( boolean external ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.setExternalSim ( external ) ; } else { java.lang.String value = ( external ) ? "1" : "0" ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "Setting external_sim to " + value ) ) ; return doBooleanCommand ( ( "SET external_sim " + value ) ) ; } }
Source:
public int getPriority ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getPriority: " + ( device.getAddress ( ) ) ) ) ; } int priority = Settings.Global.getInt ( getContentResolver ( ) , Settings.Global.getBluetoothInputDevicePriorityKey ( device.getAddress ( ) ) , BluetoothProfile.PRIORITY_UNDEFINED ) ; return priority ; }

Target:
public int getPriority ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getPriority: " + ( device.getAddress ( ) ) ) ) ; } int priority = Settings.Global.getInt ( getContentResolver ( ) , Settings.Global.getBluetoothHidHostPriorityKey ( device.getAddress ( ) ) , BluetoothProfile.PRIORITY_UNDEFINED ) ; return priority ; }
Source:
public void flush ( ) throws java.io.IOException { java.io.PipedReader reader = destination ; if ( isClosed ) { throw new java.io.IOException ( "Pipe is closed" ) ; } if ( reader == null ) { return ; } synchronized ( reader ) { reader.notifyAll ( ) ; } }

Target:
public void flush ( ) throws java.io.IOException { java.io.PipedReader reader = destination ; if ( isClosed ) { throw new java.io.IOException ( "Pipe is closed" ) ; } if ( reader == null ) { return ; } synchronized ( reader ) { if ( reader.isClosed ) { throw new java.io.IOException ( "Pipe is broken" ) ; } reader.notifyAll ( ) ; } }
Source:
public void startFlush ( ) { if ( ( mTestSensorEventListener ) == null ) { return ; } java.lang.String message = formatAssertionMessage ( "Flush" ) ; junit.framework.Assert.assertTrue ( message , mSensorManager.flush ( mTestSensorEventListener ) ) ; }

Target:
public void runSensor ( android.hardware.cts.helpers.TestSensorEventListener listener , long duration , java.util.concurrent.TimeUnit timeUnit ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } try { registerListener ( listener ) ; waitForEvents ( duration , timeUnit ) ; } finally { unregisterListener ( ) ; } }
Source:
public void playDtmfTone ( java.lang.String callId , char digit ) { mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_PLAY_DTMF_TONE , digit , 0 , callId ) . sendToTarget ( ) ; }

Target:
public void hold ( java.lang.String callId , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_HOLD ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = callId ; args.arg2 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_HOLD , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
protected java.util.Set < com.google.common.reflect.TypeToken < ? super T > > delegate ( ) { com.google.common.collect.ImmutableSet < com.google.common.reflect.TypeToken < ? super T > > filteredTypes = types ; if ( filteredTypes == null ) { @ java.lang.SuppressWarnings ( value = { "unchecked" , "rawtypes" } ) com.google.common.collect.ImmutableList < com.google.common.reflect.TypeToken < ? super T > > collectedTypes = ( ( com.google.common.collect.ImmutableList ) ( com.google.common.reflect.TypeToken.TypeCollector.FOR_GENERIC_TYPE.collectTypes ( this ) ) ) ; return types = com.google.common.collect.FluentIterable.from ( collectedTypes ) . filter ( com.google.common.reflect.TypeToken.TypeFilter.IGNORE_TYPE_VARIABLE_OR_WILDCARD ) . toImmutableSet ( ) ; } else { return filteredTypes ; } }

Target:
protected java.util.Set < com.google.common.reflect.TypeToken < ? super T > > delegate ( ) { com.google.common.collect.ImmutableSet < com.google.common.reflect.TypeToken < ? super T > > filteredTypes = types ; if ( filteredTypes == null ) { @ java.lang.SuppressWarnings ( value = { "unchecked" , "rawtypes" } ) com.google.common.collect.ImmutableList < com.google.common.reflect.TypeToken < ? super T > > collectedTypes = ( ( com.google.common.collect.ImmutableList ) ( com.google.common.reflect.TypeToken.TypeCollector.FOR_GENERIC_TYPE.collectTypes ( this ) ) ) ; return types = com.google.common.collect.FluentIterable.from ( collectedTypes ) . filter ( com.google.common.reflect.TypeToken.TypeFilter.IGNORE_TYPE_VARIABLE_OR_WILDCARD ) . toSet ( ) ; } else { return filteredTypes ; } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setResult ( com.android.cts.verifier.sensors.RESULT_CANCELED ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.MagnetometerTestRenderer ( this ) ; mListener = renderer ; setContentView ( R.layout.pass_fail_gl ) ; setInfoResources ( R.string.snsr_mag_test , R.string.snsr_mag_test_info , ( - 1 ) ) ; mGLSurfaceView = ( ( android.opengl.GLSurfaceView ) ( findViewById ( R.id.gl_surface_view ) ) ) ; mGLSurfaceView.setRenderer ( renderer ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.MagnetometerTestRenderer ( this ) ; mListener = renderer ; setContentView ( R.layout.pass_fail_gl ) ; setPassFailButtonClickListeners ( ) ; setInfoResources ( R.string.snsr_mag_test , R.string.snsr_mag_test_info , ( - 1 ) ) ; mGLSurfaceView = ( ( android.opengl.GLSurfaceView ) ( findViewById ( R.id.gl_surface_view ) ) ) ; mGLSurfaceView.setRenderer ( renderer ) ; }
Source:
public boolean clearNetworkConnectChoice ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Clear network connect choice for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setConnectChoice ( null ) ; config.getNetworkSelectionStatus ( ) . setConnectChoiceTimestamp ( NetworkSelectionStatus.INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP ) ; return true ; }

Target:
public boolean clearNetworkConnectChoice ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Clear network connect choice for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setConnectChoice ( null ) ; config.getNetworkSelectionStatus ( ) . setConnectChoiceTimestamp ( NetworkSelectionStatus.INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP ) ; saveToStore ( false ) ; return true ; }
Source:
public void connectionForDeprecatedPostRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.DeprecatedPost request = new com.android.volley.mock.TestRequest.DeprecatedPost ( ) ; assertEquals ( request.getMethod ( ) , Method.DEPRECATED_GET_OR_POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "POST" , mMockConnection.getRequestMethod ( ) ) ; assertTrue ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void connectionForDeprecatedGetRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.DeprecatedGet request = new com.android.volley.mock.TestRequest.DeprecatedGet ( ) ; org.junit.Assert.assertEquals ( request.getMethod ( ) , Method.DEPRECATED_GET_OR_POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; org.mockito.Mockito.verify ( mMockConnection , org.mockito.Mockito.never ( ) ) . setRequestMethod ( org.mockito.ArgumentMatchers.anyString ( ) ) ; org.mockito.Mockito.verify ( mMockConnection , org.mockito.Mockito.never ( ) ) . setDoOutput ( true ) ; }