auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void addI16 ( android.support.v8.renderscript.Short2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI16 ( new android.support.v8.renderscript.Short2 ( v.x , v.y ) ) ; return ; } addI16 ( v.x ) ; addI16 ( v.y ) ; }

Target:
public void addU16 ( android.support.v8.renderscript.Int2 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addU16 ( v ) ; return ; } addU16 ( v.x ) ; addU16 ( v.y ) ; }
Source:
private final boolean loadPrefs ( ) { android.content.SharedPreferences preferences = getSharedPreferences ( "RedirectData" , 0 ) ; mTextPref = preferences.getString ( "text" , null ) ; if ( ( mTextPref ) != null ) { mText.setText ( mTextPref ) ; return true ; } return false ; }

Target:
private final void loadPrefs ( ) { android.content.SharedPreferences preferences = getSharedPreferences ( "RedirectData" , 0 ) ; mTextPref = preferences.getString ( "text" , null ) ; if ( ( mTextPref ) != null ) { mText.setText ( mTextPref ) ; } else { mText.setText ( "" ) ; } }
Source:
public android.os.UserHandle createUser ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String name ) { return null ; }

Target:
public java.util.List < java.lang.String > getPermittedCrossProfileNotificationListeners ( @ android.annotation.NonNull android.content.ComponentName admin ) { throwIfParentInstance ( "getPermittedCrossProfileNotificationListeners" ) ; if ( ( mService ) != null ) { try { return mService.getPermittedCrossProfileNotificationListeners ( admin ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
public void exit ( ) { if ( ( mPhone ) != null ) { mPhone.mCi.unregisterForRilConnected ( getHandler ( ) ) ; mPhone.mCi.unregisterForDataCallListChanged ( getHandler ( ) ) ; } if ( ( mDcTesterDeactivateAll ) != null ) { mDcTesterDeactivateAll.dispose ( ) ; } if ( ( mNetworkPolicyManager ) != null ) { mNetworkPolicyManager.unregisterListener ( mListener ) ; } }

Target:
public void exit ( ) { if ( ( ( mPhone ) != null ) & ( ( mDataServiceManager.getTransportType ( ) ) == ( android.telephony.AccessNetworkConstants.TransportType.WWAN ) ) ) { mPhone.mCi.unregisterForRilConnected ( getHandler ( ) ) ; } mDataServiceManager.unregisterForDataCallListChanged ( getHandler ( ) ) ; if ( ( mDcTesterDeactivateAll ) != null ) { mDcTesterDeactivateAll.dispose ( ) ; } if ( ( mNetworkPolicyManager ) != null ) { mNetworkPolicyManager.unregisterListener ( mListener ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mDevice.registerWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher.class . getName ( ) , new com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher ( mDevice , null , null ) ) ; }

Target:
public void testGoogleAccountLoginWatcher ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; android.support.test.uiautomator.UiDevice device = testFramework.getDevice ( ) ; device.registerWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher.class . getName ( ) , new com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher ( device , null , null ) ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Contacts" ) ; device.removeWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleAccountLoginWatcher.class . getName ( ) ) ; }
Source:
public boolean setMoratoriumTimeHttp ( java.lang.String retryAfter ) { try { long ms = ( java.lang.Long.valueOf ( retryAfter ) ) * 1000 ; setMoratoriumTimeMillis ( ( ms + ( currentTimeMillis ( ) ) ) ) ; return true ; } catch ( java.lang.NumberFormatException nfe ) { try { setMoratoriumTimeMillis ( android.net.http.AndroidHttpClient.parseDate ( retryAfter ) ) ; return true ; } catch ( java.lang.IllegalArgumentException iae ) { return false ; } } }

Target:
public boolean setMoratoriumTimeHttp ( java.lang.String retryAfter ) { try { long ms = ( java.lang.Long.valueOf ( retryAfter ) ) * 1000 ; setMoratoriumTimeMillis ( ( ms + ( currentTimeMillis ( ) ) ) ) ; return true ; } catch ( java.lang.NumberFormatException nfe ) { try { setMoratoriumTimeMillis ( com.android.common.LegacyHttpDateTime.parse ( retryAfter ) ) ; return true ; } catch ( java.lang.IllegalArgumentException iae ) { return false ; } } }
Source:
private java.lang.String format ( long number , android.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }

Target:
private java.lang.String format ( double number , android.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; if ( ( getRoundingMode ( ) ) != ( android.icu.math.BigDecimal.ROUND_UNNECESSARY ) ) { number = new android.icu.math.BigDecimal ( java.lang.Double.toString ( number ) ) . setScale ( getMaximumFractionDigits ( ) , roundingMode ) . doubleValue ( ) ; } ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }
Source:
private static java.security.cert.Certificate [ ] [ ] loadCertificates ( java.util.jar.StrictJarFile jarFile , java.util.zip.ZipEntry entry ) throws android.content.pm.PackageParser.PackageParserException { java.io.InputStream is = null ; try { is = jarFile.getInputStream ( entry ) ; android.content.pm.PackageParser.readFullyIgnoringContents ( is ) ; return jarFile.getCertificateChains ( entry ) ; } catch ( java.io.IOException | java.lang.RuntimeException e ) { throw new android.content.pm.PackageParser.PackageParserException ( android.content.pm.PackageManager.INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION , ( ( ( "Failed reading " + ( entry.getName ( ) ) ) + " in " ) + jarFile ) , e ) ; } finally { libcore.io.IoUtils.closeQuietly ( is ) ; } }

Target:
private static java.security.cert.Certificate [ ] [ ] loadCertificates ( android.util.jar.StrictJarFile jarFile , java.util.zip.ZipEntry entry ) throws android.content.pm.PackageParser.PackageParserException { java.io.InputStream is = null ; try { is = jarFile.getInputStream ( entry ) ; android.content.pm.PackageParser.readFullyIgnoringContents ( is ) ; return jarFile.getCertificateChains ( entry ) ; } catch ( java.io.IOException | java.lang.RuntimeException e ) { throw new android.content.pm.PackageParser.PackageParserException ( android.content.pm.PackageManager.INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION , ( ( ( "Failed reading " + ( entry.getName ( ) ) ) + " in " ) + jarFile ) , e ) ; } finally { libcore.io.IoUtils.closeQuietly ( is ) ; } }
Source:
public void testCase2 ( ) { java.lang.String regex = "[4-" ; try { org.apache.harmony.regex.tests.java.util.regex.Pattern.compile ( regex ) ; fail ( "PatternSyntaxException expected" ) ; } catch ( java.util.regex.PatternSyntaxException e ) { assertEquals ( 3 , e.getIndex ( ) ) ; assertEquals ( regex , e.getPattern ( ) ) ; } }

Target:
public void testCase2 ( ) { java.lang.String regex = "[4-" ; try { java.util.regex.Pattern.compile ( regex ) ; fail ( "PatternSyntaxException expected" ) ; } catch ( java.util.regex.PatternSyntaxException e ) { assertEquals ( 3 , e.getIndex ( ) ) ; assertEquals ( regex , e.getPattern ( ) ) ; } }
Source:
public void testAPInterfaceFailedWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testEnterSoftApModeFromDifferentState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.CLIENT_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; enterSoftApActiveMode ( ) ; }
Source:
public boolean equals ( java.lang.Object thatObject ) { if ( thatObject == ( this ) ) { return true ; } else if ( ( thatObject == null ) || ( ( thatObject.getClass ( ) ) != ( com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP.class ) ) ) { return false ; } else { return ( ( ( com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP ) ( thatObject ) ) . getEAPMethodID ( ) ) == ( getEAPMethodID ( ) ) ; } }

Target:
public boolean equals ( java.lang.Object thatObject ) { if ( thatObject == ( this ) ) { return true ; } if ( ! ( thatObject instanceof com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP ) ) { return false ; } com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP that = ( ( com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP ) ( thatObject ) ) ; return ( mEAPMethodID ) == ( that.mEAPMethodID ) ; }
Source:
public void run ( ) { mNM.notify ( 1 , notificationWithNumbers ( 1 ) ) ; mNM.notify ( 1 , notificationWithNumbers ( 1 ) ) ; }

Target:
public void run ( ) { for ( int i = 0 ; i < 10 ; i ++ ) { android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "Add two notifications" ) ; mNM.notify ( 1 , notificationWithNumbers ( 1 ) ) ; mNM.notify ( 2 , notificationWithNumbers ( 2 ) ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "Cancel two notifications" ) ; mNM.cancel ( 1 ) ; mNM.cancel ( 2 ) ; } }
Source:
private boolean isUserLimitReachedLocked ( ) { int aliveUserCount = 0 ; final int totalUserCount = mUsers.size ( ) ; for ( int i = 0 ; i < totalUserCount ; i ++ ) { android.content.pm.UserInfo user = mUsers.valueAt ( i ) ; if ( ( ( ! ( mRemovingUserIds.get ( user.id ) ) ) && ( ! ( user.isGuest ( ) ) ) ) && ( ! ( user.partial ) ) ) { aliveUserCount ++ ; } } return aliveUserCount >= ( android.os.UserManager.getMaxSupportedUsers ( ) ) ; }

Target:
public boolean canAddMoreManagedProfiles ( ) { com.android.server.pm.UserManagerService.checkManageUsersPermission ( "check if more managed profiles can be added." ) ; if ( android.app.ActivityManager.isLowRamDeviceStatic ( ) ) { return false ; } synchronized ( mPackagesLock ) { if ( ( numberOfUsersOfTypeLocked ( UserInfo.FLAG_MANAGED_PROFILE , true ) ) >= ( com.android.server.pm.UserManagerService.MAX_MANAGED_PROFILES ) ) { return false ; } int usersCount = getAliveUsersExcludingGuestsCountLocked ( ) ; return ( usersCount == 1 ) || ( usersCount < ( android.os.UserManager.getMaxSupportedUsers ( ) ) ) ; } }
Source:
public void test_run_for_SimpleTest2_limiting_to_1method_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , null , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , new java.lang.String [ ] { "testSimple2" } ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( vogar.target.junit.JUnitRunner.class , ( ( target.getName ( ) ) + "#testSimple2" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest2_limiting_to_1method_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.util.List < vogar.target.junit.VogarTest > tests = vogar.target.junit.JUnitRunnerFactory.createVogarTests ( target , null , new java.lang.String [ ] { "testSimple2" } ) ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , skipPastReference , testEnvironment , 0 , tests ) ; runner.run ( null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( vogar.target.junit.JUnitRunner.class , ( ( target.getName ( ) ) + "#testSimple2" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
public java.lang.String describeFirstNonRequestableCapability ( ) { if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED ) ) return "NET_CAPABILITY_VALIDATED" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL ) ) return "NET_CAPABILITY_CAPTIVE_PORTAL" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND ) ) return "NET_CAPABILITY_FOREGROUND" ; if ( ( ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ) != 0 ) { return "unknown non-requestable capabilities " + ( java.lang.Long.toHexString ( mNetworkCapabilities ) ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }

Target:
public android.net.NetworkCapabilities setUids ( java.util.Set < android.net.UidRange > uids ) { if ( null == uids ) { mUids = null ; } else { mUids = new android.util.ArraySet ( uids ) ; } return this ; }
Source:
boolean hideLw ( boolean doAnimation , boolean requestAnim ) { boolean current = ( doAnimation ) ? mPolicyVisibilityAfterAnim : mPolicyVisibility ; if ( ! current ) { return false ; } if ( doAnimation ) { applyAnimationLocked ( this , WindowManagerPolicy.TRANSIT_EXIT , false ) ; if ( ( mAnimation ) == null ) { doAnimation = false ; } } if ( doAnimation ) { mPolicyVisibilityAfterAnim = false ; } else { mPolicyVisibilityAfterAnim = false ; mPolicyVisibility = false ; } if ( requestAnim ) { requestAnimationLocked ( 0 ) ; } return true ; }

Target:
boolean hideLw ( boolean doAnimation , boolean requestAnim ) { boolean current = ( doAnimation ) ? mPolicyVisibilityAfterAnim : mPolicyVisibility ; if ( ! current ) { return false ; } if ( doAnimation ) { applyAnimationLocked ( this , WindowManagerPolicy.TRANSIT_EXIT , false ) ; if ( ( mAnimation ) == null ) { doAnimation = false ; } } if ( doAnimation ) { mPolicyVisibilityAfterAnim = false ; } else { mPolicyVisibilityAfterAnim = false ; mPolicyVisibility = false ; enableScreenIfNeededLocked ( ) ; } if ( requestAnim ) { requestAnimationLocked ( 0 ) ; } return true ; }
Source:
public boolean init ( java.io.File fontLocation , java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Integer > > enumValueMap ) { if ( ( mBridge ) != null ) { return mBridge.init ( fontLocation , enumValueMap ) ; } else if ( ( mLegacyBridge ) != null ) { return mLegacyBridge.init ( fontLocation.getAbsolutePath ( ) , enumValueMap ) ; } return false ; }

Target:
public boolean init ( java.io.File fontLocation , java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Integer > > enumValueMap , com.android.ide.common.rendering.api.LayoutLog log ) { if ( ( mBridge ) != null ) { return mBridge.init ( fontLocation , enumValueMap , log ) ; } else if ( ( mLegacyBridge ) != null ) { return mLegacyBridge.init ( fontLocation.getAbsolutePath ( ) , enumValueMap ) ; } return false ; }
Source:
public int gattServerCreateBluetoothGattCharacteristic ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "characteristicUuid" ) java.lang.String characteristicUuid , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "property" ) java.lang.Integer property , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "permission" ) java.lang.Integer permission ) { com.googlecode.android_scripting.facade.bluetooth.GattServerFacade.CharacteristicCount += 1 ; int index = com.googlecode.android_scripting.facade.bluetooth.GattServerFacade.CharacteristicCount ; android.bluetooth.BluetoothGattCharacteristic characteristic = new android.bluetooth.BluetoothGattCharacteristic ( java.util.UUID.fromString ( characteristicUuid ) , property , permission ) ; mCharacteristicList.put ( index , characteristic ) ; return index ; }

Target:
public int gattServerCreateBluetoothGattCharacteristic ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "characteristicUuid" ) java.lang.String characteristicUuid , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "property" ) java.lang.Integer property , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "permission" ) java.lang.Integer permission ) { com.googlecode.android_scripting.facade.bluetooth.GattServerFacade.sCharacteristicCount += 1 ; int index = com.googlecode.android_scripting.facade.bluetooth.GattServerFacade.sCharacteristicCount ; android.bluetooth.BluetoothGattCharacteristic characteristic = new android.bluetooth.BluetoothGattCharacteristic ( java.util.UUID.fromString ( characteristicUuid ) , property , permission ) ; mCharacteristicList.put ( index , characteristic ) ; return index ; }
Source:
public static com.android.dx.cf.code.RopMethod convert ( com.android.dx.cf.code.ConcreteMethod method , com.android.dx.cf.code.TranslationAdvice advice ) { try { com.android.dx.cf.code.Ropper r = new com.android.dx.cf.code.Ropper ( method , advice ) ; r.doit ( ) ; return r.getRopMethod ( ) ; } catch ( com.android.dx.cf.code.SimException ex ) { ex.addContext ( ( "...while working on method " + ( method.getNat ( ) . toHuman ( ) ) ) ) ; throw ex ; } }

Target:
public static com.android.dx.rop.code.RopMethod convert ( com.android.dx.cf.code.ConcreteMethod method , com.android.dx.rop.code.TranslationAdvice advice ) { try { com.android.dx.cf.code.Ropper r = new com.android.dx.cf.code.Ropper ( method , advice ) ; r.doit ( ) ; return r.getRopMethod ( ) ; } catch ( com.android.dx.cf.code.SimException ex ) { ex.addContext ( ( "...while working on method " + ( method.getNat ( ) . toHuman ( ) ) ) ) ; throw ex ; } }
Source:
public com.android.server.wifi.WifiNative.TdlsCapabilities getTdlsCapabilities ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getTdlsCapabilitiesNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } }

Target:
public com.android.server.wifi.WifiNative.TdlsCapabilities getTdlsCapabilities ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "getTdlsCapabilities not supported" ) ; return null ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getTdlsCapabilitiesNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }
Source:
public static int forkAndSpecialize ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , int mountExternal , java.lang.String seInfo , java.lang.String niceName , int [ ] fdsToClose ) { dalvik.system.Zygote.preFork ( ) ; int pid = dalvik.system.Zygote.nativeForkAndSpecialize_new ( uid , gid , gids , debugFlags , rlimits , mountExternal , seInfo , niceName , fdsToClose ) ; dalvik.system.Zygote.postFork ( ) ; return pid ; }

Target:
public static int forkAndSpecialize ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , int mountExternal , java.lang.String seInfo , java.lang.String niceName , int [ ] fdsToClose ) { dalvik.system.Zygote.preFork ( ) ; int pid = dalvik.system.Zygote.nativeForkAndSpecialize ( uid , gid , gids , debugFlags , rlimits , mountExternal , seInfo , niceName , fdsToClose ) ; dalvik.system.Zygote.postFork ( ) ; return pid ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { onLocaleChange ( ) ; }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { this . getDisplay ( ) . asyncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { try { com.android.ide.eclipse.adt.AdtPlugin.openFile ( resource , null , false ) ; } catch ( org.eclipse.ui.PartInitException ex ) { com.android.ide.eclipse.adt.AdtPlugin.log ( ex , null ) ; } } } ) ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws java.lang.Exception { com.android.sched.util.file.WriterFile file = com.android.sched.util.config.ThreadConfig.get ( CodeCoverage.COVERAGE_METADATA_FILE ) ; com.android.sched.util.stream.ExtendedPrintWriter writer = file.getPrintWriter ( ) ; try { writeMetadata ( session , writer ) ; } finally { writer.close ( ) ; try { writer.throwPendingException ( ) ; } catch ( java.io.IOException e ) { session.getReporter ( ) . report ( Severity.FATAL , new com.android.jack.reporting.ReportableIOException ( "Coverage metadata" , new com.android.sched.util.file.CannotWriteException ( file , e ) ) ) ; session.abortEventually ( ) ; } } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws java.lang.Exception { com.android.sched.util.file.WriterFile file = com.android.sched.util.config.ThreadConfig.get ( CodeCoverage.COVERAGE_METADATA_FILE ) ; com.android.sched.util.stream.CustomPrintWriter writer = file.getPrintWriter ( ) ; try { writeMetadata ( session , writer ) ; } finally { writer.close ( ) ; try { writer.throwPendingException ( ) ; } catch ( java.io.IOException e ) { session.getReporter ( ) . report ( Severity.FATAL , new com.android.jack.reporting.ReportableIOException ( "Coverage metadata" , new com.android.sched.util.file.CannotWriteException ( file , e ) ) ) ; session.abortEventually ( ) ; } } }
Source:
public boolean sendReport ( int id , byte [ ] data ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "sendReport(): id=" + id ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.sendReport ( id , data ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "getConnectionState(): device=" + device ) ) ; if ( ( mService ) != null ) { try { return mService.getConnectionState ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return STATE_DISCONNECTED ; }
Source:
private void syncCheckboxView ( android.view.View view ) { if ( view instanceof android.widget.Checkable ) { ( ( android.widget.Checkable ) ( view ) ) . setChecked ( mChecked ) ; } }

Target:
private void syncCheckboxView ( android.view.View view ) { if ( view instanceof android.widget.CompoundButton ) { ( ( android.widget.CompoundButton ) ( view ) ) . setOnCheckedChangeListener ( null ) ; } if ( view instanceof android.widget.Checkable ) { ( ( android.widget.Checkable ) ( view ) ) . setChecked ( mChecked ) ; } if ( view instanceof android.widget.CompoundButton ) { ( ( android.widget.CompoundButton ) ( view ) ) . setOnCheckedChangeListener ( mListener ) ; } }
Source:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( call ) ; assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }

Target:
public void testEndCallWithNoForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }
Source:
public java.lang.Iterable < java.lang.Object > getConfigObjects ( ) { java.util.List < java.lang.Object > list = new java.util.ArrayList < java.lang.Object > ( ) ; list.add ( mDefaultConfig ) ; list.add ( mBuildType ) ; list.addAll ( mFlavorConfigs ) ; return list ; }

Target:
public java.lang.Iterable < java.lang.Object > getConfigObjects ( ) { java.util.List < java.lang.Object > list = com.google.common.collect.Lists.newArrayListWithExpectedSize ( ( ( mFlavorConfigs.size ( ) ) + 2 ) ) ; list.add ( mDefaultConfig ) ; list.add ( mBuildType ) ; list.addAll ( mFlavorConfigs ) ; return list ; }
Source:
public void testConstructor_WithSkipPast ( ) { vogar.target.TestRunner runner = new vogar.target.TestRunner ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "--skipPast" , "fred" ) ) ) ; java.lang.String skipPast = runner.skipPastReference.get ( ) ; org.junit.Assert.assertEquals ( "fred" , skipPast ) ; }

Target:
public void testConstructor_CaliperBenchmark ( ) throws java.lang.Exception { vogar.target.TestRunner runner = testRunnerRule.createTestRunner ( "-i" , "runtime" ) ; runner.run ( ) ; java.lang.String out = ios.contents ( Stream.OUT ) ; out = out.replaceAll ( "\t[^\n]+\\n" , "" ) ; org.junit.Assert.assertEquals ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + "//00xx{\"outcome\":\"" ) + ( vogar.target.TestRunnerTest.CaliperBenchmark.class . getName ( ) ) ) + "\"," ) + "\"runner\":\"" ) + ( vogar.target.CaliperRunner.class . getName ( ) ) ) + "\"}\n" ) + "Experiment selection: \n" ) + " Benchmark Methods: [timeMethod]\n" ) + " Instruments: [runtime]\n" ) + " User parameters: {}\n" ) + " Virtual machines: [default]\n" ) + " Selection type: Full cartesian product\n" ) + "\n" ) + "This selection yields 1 experiments.\n" ) + ( com.google.caliper.runner.UserCodeException.class . getName ( ) ) ) + ": An exception was thrown from the benchmark code\n" ) + "Caused by: " ) + ( java.lang.IllegalStateException.class . getName ( ) ) ) + ": " ) + ( vogar.target.TestRunnerTest.CaliperBenchmark.CALIPER_BENCHMARK_MESSAGE ) ) + "\n" ) + "//00xx{\"result\":\"SUCCESS\"}\n" ) + "//00xx{\"completedNormally\":true}\n" ) , out ) ; }
Source:
public java.lang.String getDeviceUserName ( ) { java.lang.String line = new vogar.commands.Command ( run.log , "adb" , "shell" , "id" ) . execute ( ) . get ( 0 ) ; java.util.regex.Matcher m = java.util.regex.Pattern.compile ( "uid=\\d+\\((\\S+)\\) gid=\\d+\\(\\S+\\)" ) . matcher ( line ) ; return m.matches ( ) ? m.group ( 1 ) : "root" ; }

Target:
public java.lang.String getDeviceUserName ( ) { java.lang.String line = new vogar.commands.Command ( run.log , "adb" , "shell" , "id" ) . execute ( ) . get ( 0 ) ; java.util.regex.Matcher m = java.util.regex.Pattern.compile ( "^uid=\\d+\\((\\S+)\\) gid=\\d+\\(\\S+\\).*" ) . matcher ( line ) ; return m.matches ( ) ? m.group ( 1 ) : "root" ; }
Source:
public void testSslFallback_defaultProtocols ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext testSSLContext = createDefaultTestSSLContext ( ) ; javax.net.ssl.SSLSocketFactory serverSocketFactory = testSSLContext.serverContext.getSocketFactory ( ) ; javax.net.ssl.SSLSocketFactory clientSocketFactoryDelegate = testSSLContext.clientContext.getSocketFactory ( ) ; checkSslFallback ( serverSocketFactory , clientSocketFactoryDelegate ) ; }

Target:
public void testNoSslFallback_defaultProtocols ( ) throws java.lang.Exception { java.lang.String [ ] expectedEnabledProtocols = new java.lang.String [ ] { "TLSv1.2" , "TLSv1.1" , "TLSv1" } ; libcore.javax.net.ssl.TestSSLContext testSSLContext = createDefaultTestSSLContext ( ) ; javax.net.ssl.SSLSocketFactory serverSocketFactory = testSSLContext.serverContext.getSocketFactory ( ) ; javax.net.ssl.SSLSocketFactory clientSocketFactory = testSSLContext.clientContext.getSocketFactory ( ) ; checkNoFallbackOnFailedHandshake ( clientSocketFactory , serverSocketFactory , expectedEnabledProtocols ) ; }
Source:
public static void registerHandler ( int type , org.apache.harmony.dalvik.ddmc.ChunkHandler handler ) { if ( handler == null ) throw new java.lang.NullPointerException ( ) ; synchronized ( org.apache.harmony.dalvik.ddmc.DdmServer.mHandlerMap ) { if ( ( org.apache.harmony.dalvik.ddmc.DdmServer.mHandlerMap.get ( type ) ) != null ) throw new java.lang.RuntimeException ( ( ( "type " + ( java.lang.Integer.toHexString ( type ) ) ) + " already registered" ) ) ; org.apache.harmony.dalvik.ddmc.DdmServer.mHandlerMap.put ( type , handler ) ; } }

Target:
public static void registerHandler ( int type , org.apache.harmony.dalvik.ddmc.ChunkHandler handler ) { if ( handler == null ) { throw new java.lang.NullPointerException ( "handler == null" ) ; } synchronized ( org.apache.harmony.dalvik.ddmc.DdmServer.mHandlerMap ) { if ( ( org.apache.harmony.dalvik.ddmc.DdmServer.mHandlerMap.get ( type ) ) != null ) throw new java.lang.RuntimeException ( ( ( "type " + ( java.lang.Integer.toHexString ( type ) ) ) + " already registered" ) ) ; org.apache.harmony.dalvik.ddmc.DdmServer.mHandlerMap.put ( type , handler ) ; } }
Source:
public int size ( ) { return map ( ) . size ( ) ; }

Target:
com.google.common.collect.ImmutableList < V > createAsList ( ) { final com.google.common.collect.ImmutableList < java.util.Map.Entry < K , V > > entryList = map.entrySet ( ) . asList ( ) ; return new com.google.common.collect.ImmutableAsList < V > ( ) { @ java.lang.Override public V get ( int index ) { return entryList.get ( index ) . getValue ( ) ; } @ java.lang.Override com.google.common.collect.ImmutableCollection < V > delegateCollection ( ) { return com.google.common.collect.ImmutableMapValues.this ; } } ; }
Source:
public void testEnableSupplicant ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; mWifiNative.setWificondControl ( wificondControl ) ; mWifiNative.enableSupplicant ( ) ; org.mockito.Mockito.verify ( wificondControl ) . enableSupplicant ( ) ; }

Target:
public void testStopPnoScan ( ) throws java.lang.Exception { mWifiNative.stopPnoScan ( ) ; org.mockito.Mockito.verify ( mWificondControl ) . stopPnoScan ( ) ; }
Source:
public boolean delKey ( java.lang.String key , int uid ) { try { return ( mBinder.del_key ( key , uid ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean delKey ( java.lang.String key , int uid ) { return delete ( key , uid ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mHasTelephony = getContext ( ) . getPackageManager ( ) . hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ; mTelephonyManager = ( ( android.telephony.TelephonyManager ) ( mContext.getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; assertNotNull ( mTelephonyManager ) ; mAudioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; assertNotNull ( mAudioManager ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mHasTelephony = android.permission.cts.TelephonyManagerPermissionTest.getContext ( ) . getPackageManager ( ) . hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ; mTelephonyManager = ( ( android.telephony.TelephonyManager ) ( android.permission.cts.TelephonyManagerPermissionTest.getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; org.junit.Assert.assertNotNull ( mTelephonyManager ) ; mAudioManager = ( ( android.media.AudioManager ) ( android.permission.cts.TelephonyManagerPermissionTest.getContext ( ) . getSystemService ( Context.AUDIO_SERVICE ) ) ) ; org.junit.Assert.assertNotNull ( mAudioManager ) ; }
Source:
public void copyFrom ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; copyFromUnchecked ( array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private void updatePrimaryUI ( ) { if ( ( getView ( ) ) == null ) { return ; } contactGridManager.setPrimary ( primaryInfo ) ; getAnswerMethod ( ) . setShowIncomingWillDisconnect ( primaryInfo.answeringDisconnectsOngoingCall ) ; getAnswerMethod ( ) . setContactPhoto ( ( ( primaryInfo.photoType ) == ( com.android.incallui.incall.protocol.ContactPhotoType.CONTACT ) ? primaryInfo.photo : null ) ) ; updateDataFragment ( ) ; if ( primaryInfo.shouldShowLocation ) { contactGridManager.setAvatarHidden ( true ) ; } }

Target:
private void updatePrimaryUI ( ) { if ( ( getView ( ) ) == null ) { return ; } contactGridManager.setPrimary ( primaryInfo ) ; getAnswerMethod ( ) . setShowIncomingWillDisconnect ( primaryInfo.answeringDisconnectsOngoingCall ( ) ) ; getAnswerMethod ( ) . setContactPhoto ( ( ( primaryInfo.photoType ( ) ) == ( com.android.incallui.incall.protocol.ContactPhotoType.CONTACT ) ? primaryInfo.photo ( ) : null ) ) ; updateDataFragment ( ) ; if ( primaryInfo.shouldShowLocation ( ) ) { contactGridManager.setAvatarHidden ( true ) ; } }
Source:
protected void transform ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JNode newNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.Transformation transformation ) throws java.lang.UnsupportedOperationException { if ( ! ( transform ( params , existingNode , ( ( com.android.jack.ir.ast.JParameter ) ( newNode ) ) , transformation ) ) ) { if ( ! ( transform ( annotations , existingNode , ( ( com.android.jack.ir.ast.JAnnotation ) ( newNode ) ) , transformation ) ) ) { super . transform ( existingNode , newNode , transformation ) ; } } }

Target:
protected void transform ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JNode newNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.Transformation transformation ) throws java.lang.UnsupportedOperationException { if ( ! ( transform ( params , existingNode , ( ( com.android.jack.ir.ast.JParameter ) ( newNode ) ) , transformation ) ) ) { if ( ! ( transform ( annotations , existingNode , ( ( com.android.jack.ir.ast.JAnnotation ) ( newNode ) ) , transformation ) ) ) { super . transform ( existingNode , newNode , transformation ) ; } } else { hasPolymorphicSignature = com.android.jack.util.TriStateBoolean.UNDEFINED ; } }
Source:
public void lifeCycle_onCreate_shouldInitBluetoothPan ( ) { mController.onCreate ( null ) ; org.mockito.Mockito.verify ( mBluetoothAdapter ) . getProfileProxy ( mContext , mController.mBtProfileServiceListener , BluetoothProfile.PAN ) ; }

Target:
public void lifeCycle_onCreate_shouldInitBluetoothPan ( ) { org.mockito.Mockito.when ( mBluetoothAdapter.getState ( ) ) . thenReturn ( BluetoothAdapter.STATE_ON ) ; mController.onCreate ( null ) ; org.mockito.Mockito.verify ( mBluetoothAdapter ) . getState ( ) ; org.mockito.Mockito.verify ( mBluetoothAdapter ) . getProfileProxy ( mContext , mController.mBtProfileServiceListener , BluetoothProfile.PAN ) ; }
Source:
public boolean isWifiCall ( ) { synchronized ( mLockObj ) { if ( ( mCallProfile ) == null ) { return false ; } java.lang.String callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE ) ; if ( ( callType == null ) || ( callType.isEmpty ( ) ) ) { callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE_ALT ) ; } int radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; try { radioTechnology = java.lang.Integer.parseInt ( callType ) ; } catch ( java.lang.NumberFormatException nfe ) { radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; } return radioTechnology == ( android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN ) ; } }

Target:
public int getRadioTechnology ( ) { synchronized ( mLockObj ) { if ( ( mCallProfile ) == null ) { return android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; } java.lang.String callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE ) ; if ( ( callType == null ) || ( callType.isEmpty ( ) ) ) { callType = mCallProfile.getCallExtra ( ImsCallProfile.EXTRA_CALL_RAT_TYPE_ALT ) ; } int radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; try { radioTechnology = java.lang.Integer.parseInt ( callType ) ; } catch ( java.lang.NumberFormatException nfe ) { radioTechnology = android.telephony.ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN ; } return radioTechnology ; } }
Source:
public void test_ConstructorLjava_io_OutputStream ( ) { try { java.io.FileOutputStream outFile = new java.io.FileOutputStream ( "GZIPOutCon.txt" ) ; org.apache.harmony.tests.java.util.zip.GZIPOutputStreamTest.TestGZIPOutputStream outGZIP = new org.apache.harmony.tests.java.util.zip.GZIPOutputStreamTest.TestGZIPOutputStream ( outFile ) ; assertNotNull ( "the constructor for GZIPOutputStream is null" , outGZIP ) ; assertEquals ( "the CRC value of the outputStream is not zero" , 0 , outGZIP.getChecksum ( ) . getValue ( ) ) ; outGZIP.close ( ) ; } catch ( java.io.IOException e ) { fail ( "an IO error occured while trying to find the output file or creating GZIP constructor" ) ; } }

Target:
public void test_ConstructorLjava_io_OutputStream ( ) { try { java.io.FileOutputStream outFile = new java.io.FileOutputStream ( java.io.File.createTempFile ( "GZIPCon" , ".txt" ) ) ; org.apache.harmony.tests.java.util.zip.GZIPOutputStreamTest.TestGZIPOutputStream outGZIP = new org.apache.harmony.tests.java.util.zip.GZIPOutputStreamTest.TestGZIPOutputStream ( outFile ) ; assertNotNull ( "the constructor for GZIPOutputStream is null" , outGZIP ) ; assertEquals ( "the CRC value of the outputStream is not zero" , 0 , outGZIP.getChecksum ( ) . getValue ( ) ) ; outGZIP.close ( ) ; } catch ( java.io.IOException e ) { fail ( "an IO error occured while trying to find the output file or creating GZIP constructor" ) ; } }
Source:
private java.util.List < com.android.apksig.internal.apk.v3.V3SigningCertificateLineage.SigningCertificateNode > read ( java.nio.ByteBuffer inputByteBuffer ) throws java.io.IOException { com.android.apksig.internal.apk.ApkSigningBlockUtils.checkByteOrderLittleEndian ( inputByteBuffer ) ; if ( ( inputByteBuffer.remaining ( ) ) < 8 ) { throw new java.lang.IllegalArgumentException ( "Improper SigningCertificateLineage format: insufficient data for header." ) ; } if ( ( inputByteBuffer.getInt ( ) ) != ( com.android.apksig.SigningCertificateLineage.MAGIC ) ) { throw new java.lang.IllegalArgumentException ( "Improper SigningCertificateLineage format: MAGIC header mismatch." ) ; } return read ( inputByteBuffer , inputByteBuffer.getInt ( ) ) ; }

Target:
public void writeToDataSink ( com.android.apksig.util.DataSink dataSink ) throws java.io.IOException { if ( dataSink == null ) { throw new java.lang.NullPointerException ( "dataSink == null" ) ; } dataSink.consume ( write ( ) ) ; }
Source:
com.android.sched.vfs.DirectFS.DirectVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.DirectFS.DirectVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File file = new java.io.File ( parent.getNativePath ( ) . getPath ( ) , name ) ; try { com.android.sched.util.file.AbstractStreamFile.create ( file , new com.android.sched.util.location.FileLocation ( file ) ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { } return new com.android.sched.vfs.DirectFS.DirectVFile ( this , parent , name ) ; }

Target:
com.android.sched.vfs.ParentVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.WRITE ) ) != 0 ; java.io.File path = getNativeFile ( parent.getPath ( ) , name ) ; try { com.android.sched.util.file.Directory.create ( path , new com.android.sched.util.location.DirectoryLocation ( path ) ) ; } catch ( com.android.sched.util.file.FileAlreadyExistsException e ) { } return new com.android.sched.vfs.ParentVDir ( this , parent , name ) ; }
Source:
public boolean onPreferenceClick ( android.preference.Preference preference ) { if ( preference == ( mAppListPreference ) ) { android.os.Bundle args = new android.os.Bundle ( ) ; args.putBoolean ( com.android.settings.applications.ARG_TRANSFER_STATS , true ) ; args.putInt ( com.android.settings.applications.ARG_DURATION_INDEX , mDurationIndex ) ; mStatsManager.xferStats ( ) ; startFragment ( this , com.android.settings.applications.ProcessStatsUi.class . getName ( ) , R.string.app_list_memory_use , 0 , args ) ; return true ; } return false ; }

Target:
public boolean onPreferenceClick ( android.support.v7.preference.Preference preference ) { if ( preference == ( mAppListPreference ) ) { android.os.Bundle args = new android.os.Bundle ( ) ; args.putBoolean ( com.android.settings.applications.ARG_TRANSFER_STATS , true ) ; args.putInt ( com.android.settings.applications.ARG_DURATION_INDEX , mDurationIndex ) ; mStatsManager.xferStats ( ) ; startFragment ( this , com.android.settings.applications.ProcessStatsUi.class . getName ( ) , R.string.memory_usage_apps , 0 , args ) ; return true ; } return false ; }
Source:
public V replace ( K key , V value ) { if ( value == null ) throw new java.lang.NullPointerException ( ) ; int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; return segmentFor ( hash ) . replace ( key , hash , value ) ; }

Target:
public V replace ( K key , V value ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; if ( value == null ) throw new java.lang.NullPointerException ( ) ; java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = segmentForHash ( hash ) ; return s == null ? null : s.replace ( key , hash , value ) ; }
Source:
public void testHasContentDescription ( ) { android.view.View view = new android.view.View ( context ) ; view.setContentDescription ( null ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) . matches ( view ) ) ; java.lang.CharSequence testText = "test text!" ; view.setContentDescription ( testText ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) . matches ( view ) ) ; }

Target:
public void hasContentDescriptionTest ( ) { android.view.View view = new android.view.View ( context ) ; view.setContentDescription ( null ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) . matches ( view ) ) ; java.lang.CharSequence testText = "test text!" ; view.setContentDescription ( testText ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasContentDescription ( ) . matches ( view ) ) ; }
Source:
public boolean setNetworkRSSIStats ( int networkId , int numUserTriggeredWifiDisableLowRSSI , int numUserTriggeredWifiDisableBadRSSI , int numUserTriggeredWifiDisableNotHighRSSI , int numTicksAtLowRSSI , int numTicksAtBadRSSI , int numTicksAtNotHighRSSI ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.numUserTriggeredWifiDisableLowRSSI = numUserTriggeredWifiDisableLowRSSI ; config.numUserTriggeredWifiDisableBadRSSI = numUserTriggeredWifiDisableBadRSSI ; config.numUserTriggeredWifiDisableNotHighRSSI = numUserTriggeredWifiDisableNotHighRSSI ; config.numTicksAtLowRSSI = numTicksAtLowRSSI ; config.numTicksAtBadRSSI = numTicksAtBadRSSI ; config.numTicksAtNotHighRSSI = numTicksAtNotHighRSSI ; return true ; }

Target:
private void loadInternalDataFromSharedStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from shared store " + ( configuration.configKey ( ) ) ) ) ; } mConfiguredNetworks.put ( configuration ) ; } }
Source:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.util.MutableLong inOffset , long byteCount ) throws android.system.ErrnoException { if ( inOffset == null ) { return Libcore.os.sendfile ( outFd , inFd , null , byteCount ) ; } else { android.util.MutableLong internalInOffset = new android.util.MutableLong ( inOffset.value ) ; try { return Libcore.os.sendfile ( outFd , inFd , internalInOffset , byteCount ) ; } finally { inOffset.value = internalInOffset.value ; } } }

Target:
public static long sendfile ( java.io.FileDescriptor outFd , java.io.FileDescriptor inFd , android.system.Int64Ref inOffset , long byteCount ) throws android.system.ErrnoException { if ( inOffset == null ) { return Libcore.os.sendfile ( outFd , inFd , null , byteCount ) ; } else { android.system.MutableLong internalInOffset = new android.system.MutableLong ( inOffset.value ) ; try { return Libcore.os.sendfile ( outFd , inFd , internalInOffset , byteCount ) ; } finally { inOffset.value = internalInOffset.value ; } } }
Source:
public void snapshotRuntimeProfile ( @ android.annotation.NonNull java.lang.String packageName , @ android.annotation.NonNull java.lang.String codePath , @ android.annotation.NonNull android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallback callback , @ android.annotation.NonNull android.os.Handler handler ) { android.util.Slog.d ( android.content.pm.dex.ArtManager.TAG , ( ( ( "Requesting profile snapshot for " + packageName ) + ":" ) + codePath ) ) ; android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallbackDelegate delegate = new android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallbackDelegate ( callback , handler.getLooper ( ) ) ; try { mArtManager.snapshotRuntimeProfile ( packageName , codePath , delegate ) ; } catch ( android.os.RemoteException e ) { e.rethrowAsRuntimeException ( ) ; } }

Target:
public void snapshotRuntimeProfile ( @ android.content.pm.dex.ArtManager.ProfileType int profileType , @ android.annotation.Nullable java.lang.String packageName , @ android.annotation.Nullable java.lang.String codePath , @ android.annotation.NonNull java.util.concurrent.Executor executor , @ android.annotation.NonNull android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallback callback ) { android.util.Slog.d ( android.content.pm.dex.ArtManager.TAG , ( ( ( "Requesting profile snapshot for " + packageName ) + ":" ) + codePath ) ) ; android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallbackDelegate delegate = new android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallbackDelegate ( callback , executor ) ; try { mArtManager.snapshotRuntimeProfile ( profileType , packageName , codePath , delegate ) ; } catch ( android.os.RemoteException e ) { e.rethrowAsRuntimeException ( ) ; } }