auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testDismissKeyguard ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "DismissKeyguardActivity" ) ; enterAndConfirmLockCredential ( ) ; mAmWmState.waitForKeyguardGone ( mDevice ) ; assertKeyguardGone ( ) ; mAmWmState.assertVisibility ( "DismissKeyguardActivity" , true ) ; }

Target:
public void testDismissKeyguard ( ) throws java.lang.Exception { if ( ! ( isHandheld ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "DismissKeyguardActivity" ) ; enterAndConfirmLockCredential ( ) ; mAmWmState.waitForKeyguardGone ( mDevice ) ; assertKeyguardGone ( ) ; mAmWmState.assertVisibility ( "DismissKeyguardActivity" , true ) ; }
Source:
private com.android.bluetooth.hfp.HeadsetService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "Headset call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } return null ; }

Target:
private com.android.bluetooth.hfp.HeadsetService getService ( ) { final com.android.bluetooth.hfp.HeadsetService service = mService ; if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( service ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "Headset call not allowed for non-active user" ) ; return null ; } if ( service == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "Service is null" ) ; return null ; } if ( ! ( service.isAlive ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "Service is not alive" ) ; return null ; } return service ; }
Source:
public void libToExe ( @ javax.annotation.Nonnull java.io.File in , @ javax.annotation.Nonnull java.io.File out , boolean zipFile ) throws java.lang.Exception { try { compileWithDx ( in , out , zipFile ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( "Legacy toolchain exited with an error" , e ) ; } }

Target:
public void libToExe ( @ javax.annotation.Nonnull java.io.File [ ] in , @ javax.annotation.Nonnull java.io.File out , boolean zipFile ) throws java.lang.Exception { try { if ( ( in.length ) > 1 ) { throw new java.lang.AssertionError ( "Not yet supported" ) ; } for ( java.io.File lib : in ) { compileWithDx ( in [ 0 ] , out , zipFile ) ; } } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( "Legacy toolchain exited with an error" , e ) ; } }
Source:
public boolean isNonDefault ( ) { return ( ( ( mSupport5gBand ) || ( ( mMasterPreference ) != 0 ) ) || ( ( mClusterLow ) != ( android.net.wifi.aware.ConfigRequest.CLUSTER_ID_MIN ) ) ) || ( ( mClusterHigh ) != ( android.net.wifi.aware.ConfigRequest.CLUSTER_ID_MAX ) ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( "ConfigRequest [mSupport5gBand=" + ( mSupport5gBand ) ) + ", mMasterPreference=" ) + ( mMasterPreference ) ) + ", mClusterLow=" ) + ( mClusterLow ) ) + ", mClusterHigh=" ) + ( mClusterHigh ) ) + ", mDiscoveryWindowInterval=" ) + ( java.util.Arrays.toString ( mDiscoveryWindowInterval ) ) ) + "]" ; }
Source:
private static native int openDexFile ( java.lang.String sourceName , java.lang.String outputName , int flags ) throws java.io.IOException ;

Target:
private static int openDexFile ( java.lang.String sourceName , java.lang.String outputName , int flags ) throws java.io.IOException { return dalvik.system.DexFile.openDexFileNative ( new java.io.File ( sourceName ) . getCanonicalPath ( ) , ( outputName == null ? null : new java.io.File ( outputName ) . getCanonicalPath ( ) ) , flags ) ; }
Source:
boolean isCompatible ( com.android.tools.lint.checks.DuplicateIdDetector.Layout from , com.android.tools.lint.checks.DuplicateIdDetector.Layout to ) { java.io.File fromFolder = from.mFile.getParentFile ( ) ; java.io.File toFolder = to.mFile.getParentFile ( ) ; if ( fromFolder.equals ( toFolder ) ) { return true ; } java.lang.String [ ] fromQualifiers = fromFolder.getName ( ) . split ( "-" ) ; java.lang.String [ ] toQualifiers = toFolder.getName ( ) . split ( "-" ) ; if ( ( isPortrait ( fromQualifiers ) ) != ( isPortrait ( toQualifiers ) ) ) { return false ; } return true ; }

Target:
boolean isCompatible ( com.android.tools.lint.checks.DuplicateIdDetector.Layout from , com.android.tools.lint.checks.DuplicateIdDetector.Layout to ) { java.io.File fromFolder = from.mFile.getParentFile ( ) ; java.io.File toFolder = to.mFile.getParentFile ( ) ; if ( fromFolder.equals ( toFolder ) ) { return true ; } java.lang.Iterable < java.lang.String > fromQualifiers = com.android.ide.common.resources.configuration.FolderConfiguration.QUALIFIER_SPLITTER.split ( fromFolder.getName ( ) ) ; java.lang.Iterable < java.lang.String > toQualifiers = com.android.ide.common.resources.configuration.FolderConfiguration.QUALIFIER_SPLITTER.split ( toFolder.getName ( ) ) ; return ( isPortrait ( fromQualifiers ) ) == ( isPortrait ( toQualifiers ) ) ; }
Source:
int getServiceHandle ( java.util.UUID uuid , int serviceType , int instance ) { for ( com.android.bluetooth.gatt.HandleMap.Entry entry : mEntries ) { if ( ( ( ( ( entry.type ) == ( com.android.bluetooth.gatt.HandleMap.TYPE_SERVICE ) ) && ( ( entry.serviceType ) == serviceType ) ) && ( ( entry.instance ) == instance ) ) && ( entry.uuid.equals ( uuid ) ) ) { return entry.handle ; } } android.util.Log.e ( com.android.bluetooth.gatt.HandleMap.TAG , ( ( "getServiceHandle() - UUID " + uuid ) + " not found!" ) ) ; return 0 ; }

Target:
boolean checkServiceExists ( java.util.UUID uuid , int handle ) { for ( com.android.bluetooth.gatt.HandleMap.Entry entry : mEntries ) { if ( ( ( ( entry.type ) == ( com.android.bluetooth.gatt.HandleMap.TYPE_SERVICE ) ) && ( ( entry.handle ) == handle ) ) && ( entry.uuid.equals ( uuid ) ) ) { return true ; } } return false ; }
Source:
public void insert ( @ javax.annotation.Nonnegative int index , @ javax.annotation.Nonnull com.android.sched.scheduler.ManagedRunnable runner ) { assert isConstraintValid ( index , runner ) ; index ++ ; plan.add ( index , new DecoratedRunner ( runner ) ) ; currentTagValidityIdx = index - 1 ; constraintTagValidityIdx = index ; }

Target:
public void insert ( @ javax.annotation.Nonnegative int index , @ javax.annotation.Nonnull com.android.sched.scheduler.ManagedRunnable runner ) { assert isConstraintValid ( index , runner ) ; index ++ ; plan.add ( index , new DecoratedRunner ( runner ) ) ; currentTagValidityIdx = java.lang.Math.min ( ( index - 1 ) , currentTagValidityIdx ) ; constraintTagValidityIdx = java.lang.Math.max ( ( index + 1 ) , constraintTagValidityIdx ) ; missingProductions.removeAll ( runner.getProductions ( ) ) ; }
Source:
public void run ( ) { if ( ( mBootMsgDialog ) != null ) { mBootMsgDialog.dismiss ( ) ; mBootMsgDialog = null ; } }

Target:
private void handleHideBootMessage ( ) { synchronized ( mLock ) { if ( ! ( mKeyguardDrawnOnce ) ) { mBootMessageNeedsHiding = true ; return ; } } if ( ( mBootMsgDialog ) != null ) { if ( com.android.internal.policy.impl.PhoneWindowManager.DEBUG_WAKEUP ) android.util.Slog.d ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "handleHideBootMessage: dismissing" ) ; mBootMsgDialog.dismiss ( ) ; mBootMsgDialog = null ; } }
Source:
public static void set ( @ android.annotation.NonNull java.lang.String key , @ android.annotation.Nullable java.lang.String val ) { if ( ( val != null ) && ( ( val.length ( ) ) > ( android.os.SystemProperties.PROP_VALUE_MAX ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( ( ( "value of system property '" + key ) + "' is longer than " ) + ( android.os.SystemProperties.PROP_VALUE_MAX ) ) + " characters: " ) + val ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; android.os.SystemProperties.native_set ( key , val ) ; }

Target:
public static void set ( @ android.annotation.NonNull java.lang.String key , @ android.annotation.Nullable java.lang.String val ) { if ( ( ( val != null ) && ( ! ( val.startsWith ( "ro." ) ) ) ) && ( ( val.length ( ) ) > ( android.os.SystemProperties.PROP_VALUE_MAX ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( ( ( "value of system property '" + key ) + "' is longer than " ) + ( android.os.SystemProperties.PROP_VALUE_MAX ) ) + " characters: " ) + val ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; android.os.SystemProperties.native_set ( key , val ) ; }
Source:
public void setConnectionProperties ( java.lang.String callId , int connectionProperties ) { android.telecom.Log.startSession ( "CSW.sCP" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setConnectionProperties %s %d" , callId , connectionProperties ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setConnectionProperties ( connectionProperties ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }

Target:
public void setConnectionProperties ( java.lang.String callId , int connectionProperties , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( "CSW.sCP" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setConnectionProperties %s %d" , callId , connectionProperties ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setConnectionProperties ( connectionProperties ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public void testIpManagerEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.IpManagerEvent.class ) , com.android.server.connectivity.MetricsTestUtil.aString ( "wlan0" ) , com.android.server.connectivity.MetricsTestUtil.anInt ( IpManagerEvent.PROVISIONING_OK ) , com.android.server.connectivity.MetricsTestUtil.aLong ( 5678 ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " ip_provisioning_event <" , " event_type: 1" , " if_name: \"wlan0\"" , " latency_ms: 5678" , " >" , " time_ms: 1" , ">" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }

Target:
public void testIpManagerEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.IpManagerEvent.class ) , com.android.server.connectivity.MetricsTestUtil.aString ( "wlan0" ) , com.android.server.connectivity.MetricsTestUtil.anInt ( IpManagerEvent.PROVISIONING_OK ) , com.android.server.connectivity.MetricsTestUtil.aLong ( 5678 ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " ip_provisioning_event <" , " event_type: 1" , " if_name: \"wlan0\"" , " latency_ms: 5678" , " >" , " time_ms: 1" , ">" , "version: 2" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }
Source:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiNanNative.NAN_TERMINATED_REASON_FAILURE ) ; com.android.server.wifi.nan.WifiNanHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onSessionTerminatedNotification ( subscribeId , WifiNanSessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiNanNative.NAN_TERMINATED_REASON_FAILURE ) ; com.android.server.wifi.nan.WifiNanHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onSessionTerminatedNotification ( subscribeId , WifiNanDiscoverySessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }
Source:
public void testKeyPairGenerator_Initialize_ParamsAndSecureRandom_Failure ( ) throws java.lang.Exception { mGenerator.initialize ( new android.security.AndroidKeyPairGeneratorSpec ( getContext ( ) , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) , new java.security.SecureRandom ( ) ) ; }

Target:
public void testKeyPairGenerator_GenerateKeyPair_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mGenerator.initialize ( new android.security.AndroidKeyPairGeneratorSpec.Builder ( getContext ( ) ) . setAlias ( android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 ) . setSubject ( android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 ) . setSerialNumber ( android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 ) . setStartDate ( android.security.AndroidKeyPairGeneratorTest.NOW ) . setEndDate ( android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) . setEncryptionRequired ( ) . build ( ) ) ; final java.security.KeyPair pair = mGenerator.generateKeyPair ( ) ; assertNotNull ( "The KeyPair returned should not be null" , pair ) ; assertKeyPairCorrect ( pair , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) ; }
Source:
public int runLaunchpad ( java.lang.String action ) { android.app.cts.LaunchpadActivity.setCallingTest ( this ) ; synchronized ( this ) { mIntent.setAction ( action ) ; mFinished = false ; mIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( mIntent ) ; } return waitForResultOrThrow ( ( 60 * 1000 ) ) ; }

Target:
private void startLaunchpadActivity ( java.lang.String action ) { android.app.cts.LaunchpadActivity.setCallingTest ( this ) ; synchronized ( this ) { mIntent.setAction ( action ) ; mFinished = false ; mIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( mIntent ) ; } }
Source:
private void updateAvdList ( com.android.sdklib.internal.avd.AvdManager avdManager ) { if ( avdManager == null ) { avdManager = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getAvdManager ( ) ; } mPreferredAvdSelector.setManager ( avdManager ) ; mPreferredAvdSelector.setFilter ( mProjectTarget ) ; mPreferredAvdSelector.refresh ( false ) ; }

Target:
public boolean accept ( com.android.sdklib.internal.avd.AvdInfo avd ) { com.android.sdklib.IAndroidTarget avdTarget = avd.getTarget ( ) ; if ( avdTarget == null ) { return true ; } if ( mProjectTarget.isPlatform ( ) ) { return avdTarget.getVersion ( ) . canRun ( mProjectMinApiVersion ) ; } return mProjectTarget.canRunOn ( avdTarget ) ; }
Source:
public void testPownF32 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandom ( 305419896 , 32 , 1 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n1 ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }

Target:
public void testPownF32 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandomInts ( 305419896 , 32 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n1 ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }
Source:
protected void runWifiPrecondition ( com.android.tradefed.device.ITestDevice device ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.TargetSetupError { if ( ( mWifiSsid ) == null ) { if ( ! ( device.checkConnectivity ( ) ) ) { throw new com.android.tradefed.targetprep.TargetSetupError ( "Device has no network connection, no ssid provided" ) ; } } else { if ( ! ( device.connectToWifiNetworkIfNeeded ( mWifiSsid , mWifiPsk ) ) ) { throw new com.android.tradefed.targetprep.TargetSetupError ( ( "Unable to establish network connection," + "some CTS packages require an active network connection" ) ) ; } } }

Target:
protected void runWifiPrecondition ( com.android.tradefed.device.ITestDevice device ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.TargetSetupError { if ( mSkipWifiCheck ) { return ; } if ( ( mWifiSsid ) == null ) { if ( ! ( device.checkConnectivity ( ) ) ) { com.android.cts.tradefed.targetprep.HostPreconditionPreparer.printWarning ( ( "Device has no network connection, option --wifi-ssid was not " + "provided. Some CTS tests require an active network connection to pass" ) ) ; } } else { if ( ! ( device.connectToWifiNetworkIfNeeded ( mWifiSsid , mWifiPsk ) ) ) { com.android.cts.tradefed.targetprep.HostPreconditionPreparer.printWarning ( ( "Unable to establish network connection, some CTS tests require " + "an active network connection to pass" ) ) ; } } }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( mMatchRule ) ; dest.writeString ( mSubscriberId ) ; dest.writeStringArray ( mMatchSubscriberIds ) ; dest.writeString ( mNetworkId ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( mMatchRule ) ; dest.writeString ( mSubscriberId ) ; dest.writeStringArray ( mMatchSubscriberIds ) ; dest.writeString ( mNetworkId ) ; dest.writeInt ( mMetered ) ; dest.writeInt ( mRoaming ) ; dest.writeInt ( mDefaultNetwork ) ; }
Source:
private synchronized void onSetReport ( byte reportType , byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "onSetReport(): reportType=" + reportType ) + " reportId=" ) + reportId ) ) ; } java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_SET_REPORT ) ; msg.arg1 = reportType ; msg.arg2 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onConnectStateChangedFromNative ( android.bluetooth.BluetoothDevice device , int state ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "onConnectStateChanged(): device=" + device ) + " state=" ) + state ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = device ; msg.arg1 = state ; mHandler.sendMessage ( msg ) ; }
Source:
public boolean hasChildren ( java.lang.Object element ) { if ( ( element instanceof com.android.ddmlib.IDevice ) && ( mDoTreeViewStuff ) ) { com.android.hierarchyviewerlib.device.Window [ ] list = mModel.getWindows ( ( ( com.android.ddmlib.IDevice ) ( element ) ) ) ; if ( list != null ) { return ( list.length ) != 0 ; } } return false ; }

Target:
public boolean hasChildren ( java.lang.Object element ) { if ( ( element instanceof com.android.hierarchyviewerlib.device.IHvDevice ) && ( mDoTreeViewStuff ) ) { com.android.hierarchyviewerlib.models.Window [ ] list = mModel.getWindows ( ( ( com.android.hierarchyviewerlib.device.IHvDevice ) ( element ) ) ) ; if ( list != null ) { return ( list.length ) != 0 ; } } return false ; }
Source:
protected android.content.res.ObbInfo getObbInfo ( ) throws java.io.IOException { android.content.res.ObbInfo obbInfo ; try { obbInfo = mContainerService.getObbInfo ( mObbState.ownerPath ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.d ( com.android.server.MountService.TAG , ( "Couldn't call DefaultContainerService to fetch OBB info for " + ( mObbState.ownerPath ) ) ) ; obbInfo = null ; } if ( obbInfo == null ) { throw new java.io.IOException ( ( "Couldn't read OBB file: " + ( mObbState.ownerPath ) ) ) ; } return obbInfo ; }

Target:
public void onClose ( java.io.IOException e ) { try { final com.android.server.NativeDaemonEvent event = mConnector.execute ( "appfuse" , "unmount" , uid , pid , name ) ; } catch ( com.android.server.NativeDaemonConnectorException unmountException ) { android.util.Log.e ( com.android.server.MountService.TAG , "Failed to unmount appfuse." ) ; } }
Source:
public void setAudioRoute ( java.lang.String callId , int audioRoute , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , "CSW.sAR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setAudioRoute %s %s" , callId , android.telecom.CallAudioState.audioRouteToString ( audioRoute ) ) ; mCallsManager.setAudioRoute ( audioRoute ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }

Target:
public void setAudioRoute ( java.lang.String callId , int audioRoute , java.lang.String bluetoothAddress , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , "CSW.sAR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setAudioRoute %s %s" , callId , android.telecom.CallAudioState.audioRouteToString ( audioRoute ) ) ; mCallsManager.setAudioRoute ( audioRoute , bluetoothAddress ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public java.lang.String getDisplayVariant ( java.util.Locale locale ) { if ( ( variantCode.length ( ) ) == 0 ) { return variantCode ; } java.lang.String result = libcore.icu.ICU.getDisplayVariantNative ( getIcuLocaleId ( ) , locale.getIcuLocaleId ( ) ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayVariantNative ( getIcuLocaleId ( ) , java.util.Locale.getDefault ( ) . getIcuLocaleId ( ) ) ; } return result ; }

Target:
public java.lang.String getDisplayLanguage ( java.util.Locale locale ) { if ( languageCode.isEmpty ( ) ) { return "" ; } try { java.util.Locale.Builder.normalizeAndValidateLanguage ( languageCode ) ; } catch ( java.util.IllformedLocaleException ex ) { return languageCode ; } java.lang.String result = libcore.icu.ICU.getDisplayLanguage ( this , locale ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayLanguage ( this , java.util.Locale.getDefault ( ) ) ; } return result ; }
Source:
private boolean isAndroid23 ( com.android.tools.lint.detector.api.Context context , int folderVersion ) { if ( isAndroid30 ( context , folderVersion ) ) { return false ; } if ( ( folderVersion == 9 ) || ( folderVersion == 10 ) ) { return true ; } int minSdk = context.getMainProject ( ) . getMinSdk ( ) ; return ( minSdk == 9 ) || ( minSdk == 10 ) ; }

Target:
private static boolean isAndroid23 ( com.android.tools.lint.detector.api.Context context , int folderVersion ) { if ( com.android.tools.lint.checks.IconDetector.isAndroid30 ( context , folderVersion ) ) { return false ; } if ( ( folderVersion == 9 ) || ( folderVersion == 10 ) ) { return true ; } int minSdk = context.getMainProject ( ) . getMinSdk ( ) ; return ( minSdk == 9 ) || ( minSdk == 10 ) ; }
Source:
void splitFromConference ( ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "splitting from conference call without a connection service" ) ; } else { com.android.server.telecom.Log.event ( this , Log.Events.SPLIT_CONFERENCE ) ; mConnectionService.splitFromConference ( this ) ; } }

Target:
public void mergeConference ( ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "merging conference calls without a connection service." ) ; } else if ( can ( Connection.CAPABILITY_MERGE_CONFERENCE ) ) { android.telecom.Log.addEvent ( this , LogUtils.Events.CONFERENCE_WITH ) ; mConnectionService.mergeConference ( this ) ; mWasConferencePreviouslyMerged = true ; } }
Source:
static Bitmap.NativeWrapper allocNativeStorage ( int width , int height ) { int nativeData ; synchronized ( Bitmap.class ) { nativeData = ( Bitmap.sSerial ) ++ ; } Bitmap.NativeWrapper wrapper = new Bitmap.NativeWrapper ( nativeData ) ; PhantomWrapper phan = new PhantomWrapper ( wrapper , Bitmap.sPhantomQueue , nativeData ) ; Bitmap.sPhantomList.add ( phan ) ; return wrapper ; }

Target:
static Bitmap.NativeWrapper allocNativeStorage ( int width , int height ) { int nativeData ; synchronized ( Bitmap.class ) { nativeData = ( Bitmap.sSerial ) ++ ; } Bitmap.NativeWrapper wrapper = new Bitmap.NativeWrapper ( nativeData ) ; PhantomWrapper phan = new PhantomWrapper ( wrapper , Bitmap.sPhantomQueue , nativeData ) ; Bitmap.sPhantomList.add ( phan ) ; wrapper.mPhantomWrapper = phan ; return wrapper ; }
Source:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision> <r:major>1</r:major> </r:revision> " ) + "<r:min-platform-tools-rev> <r:major>1</r:major> </r:min-platform-tools-rev> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision> <r:major>1</r:major> </r:revision> " ) + "<r:min-platform-tools-rev> <r:major>1</r:major> </r:min-platform-tools-rev> " ) + "<r:archives> <r:archive> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }
Source:
public void traverse ( @ javax.annotation.Nonnull com.android.sched.scheduler.ScheduleInstance < ? super com.android.sched.item.Component > schedule ) throws java.lang.Exception { schedule.process ( this ) ; for ( com.android.jack.ir.ast.JField field : fields ) { field.traverse ( schedule ) ; } for ( com.android.jack.ir.ast.JMethod method : methods ) { method.traverse ( schedule ) ; } annotations.traverse ( schedule ) ; }

Target:
public void traverse ( @ javax.annotation.Nonnull com.android.sched.scheduler.ScheduleInstance < ? super com.android.sched.item.Component > schedule ) throws java.lang.Exception { schedule.process ( this ) ; for ( com.android.jack.ir.ast.JField field : fields ) { field.traverse ( schedule ) ; } for ( com.android.jack.ir.ast.JMethod method : methods ) { method.traverse ( schedule ) ; } for ( com.android.jack.ir.ast.JAnnotation annotation : annotations ) { annotation.traverse ( schedule ) ; } }
Source:
private boolean mode_array ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { final byte [ ] inputArray = createInputArrayByte ( size [ 0 ] , seed ) ; final com.android.rs.test.Int2 javaResult = mode ( RS , inputArray ) ; final com.android.rs.test.Int2 rsResult = s.reduce_mode ( inputArray ) . get ( ) ; return result ( "mode" , new com.android.rs.test.UT_reduce.timing ( size [ 0 ] ) , javaResult , rsResult ) ; }

Target:
private boolean mode_array ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { final byte [ ] inputArray = createInputArrayByte ( size [ 0 ] , seed ) ; final android.renderscript.Int2 javaResult = mode ( RS , inputArray ) ; final android.renderscript.Int2 rsResult = s.reduce_mode ( inputArray ) . get ( ) ; return result ( "mode" , new com.android.rs.test.UT_reduce.timing ( size [ 0 ] ) , javaResult , rsResult ) ; }
Source:
private java.lang.String getItemName ( int itemId ) { com.android.internal.telephony.gsm.stk.Menu menu = mCurrentCmd.getMenu ( ) ; if ( menu == null ) { return null ; } for ( com.android.internal.telephony.gsm.stk.Item item : menu.items ) { if ( ( item.id ) == itemId ) { return item.text ; } } return null ; }

Target:
private java.lang.String getItemName ( int itemId ) { com.android.internal.telephony.cat.Menu menu = mCurrentCmd.getMenu ( ) ; if ( menu == null ) { return null ; } for ( com.android.internal.telephony.cat.Item item : menu.items ) { if ( ( item.id ) == itemId ) { return item.text ; } } return null ; }
Source:
public void readIntArray ( int [ ] dst , int dstOffset , int intCount ) { libcore.io.Memory.peekIntArray ( ( ( address ) + ( position ) ) , dst , dstOffset , intCount , swap ) ; position += ( SizeOf.INT ) * intCount ; }

Target:
public void readIntArray ( int [ ] dst , int dstOffset , int intCount ) { libcore.io.NioBufferIterator.checkDstBounds ( dstOffset , dst.length , intCount ) ; file.checkNotClosed ( ) ; final int byteCount = ( SizeOf.INT ) * intCount ; libcore.io.NioBufferIterator.checkReadBounds ( position , length , byteCount ) ; libcore.io.Memory.peekIntArray ( ( ( address ) + ( position ) ) , dst , dstOffset , intCount , swap ) ; position += byteCount ; }
Source:
public void setHttpAuthUsernamePassword ( final java.lang.String host , final java.lang.String realm , final java.lang.String username , final java.lang.String password ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHttpAuthUsernamePassword ( host , realm , username , password ) ; } } ) ; return ; } mAwContents.setHttpAuthUsernamePassword ( host , realm , username , password ) ; }

Target:
public void setVerticalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setVerticalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setVerticalScrollbarOverlay ( overlay ) ; }
Source:
public void testBadSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneBundleInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneBundleInstaller ( "TzDataBundleInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.update2.TimeZoneBundle tzData = libcore.tzdata.update2.TzDataBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertFalse ( brokenSystemInstaller.install ( tzData.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testBadSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneBundleInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneBundleInstaller ( "TimeZoneBundleInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.update2.TimeZoneBundle tzData = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertFalse ( brokenSystemInstaller.install ( tzData.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public java.lang.String getFullVersion ( ) { final java.lang.String majorVersion = getMajorVersion ( ) ; if ( ( majorVersion != null ) && ( ( majorVersion.trim ( ) . length ( ) ) > 0 ) ) { final java.lang.String minorVersion = getMinorVersion ( ) ; if ( ( minorVersion != null ) && ( ( minorVersion.trim ( ) . length ( ) ) > 0 ) ) { return ( majorVersion + "." ) + minorVersion ; } else { return majorVersion + ".0" ; } } else { return getVersionName ( ) ; } }

Target:
public abstract java.lang.String getPatchVersion ( ) ;
Source:
public void testInstall_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle1 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( bundle1.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; libcore.tzdata.update2.TimeZoneBundle bundle2 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.installWithErrorCode ( bundle2.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; }

Target:
public void testInstall_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneDistro distro1 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( distro1.getBytes ( ) ) ) ; assertDistroInstalled ( distro1 ) ; libcore.tzdata.update2.TimeZoneDistro distro2 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.installWithErrorCode ( distro2.getBytes ( ) ) ) ; assertDistroInstalled ( distro1 ) ; }
Source:
static void requestDeleteManagedProfile ( android.content.Context context ) { try { android.content.Intent intent = new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_REMOVE_MANAGED_PROFILE ) ; context.startActivity ( intent ) ; java.lang.String message = context.getString ( R.string.provisioning_byod_delete_profile ) ; android.widget.Toast.makeText ( context , message , Toast.LENGTH_SHORT ) . show ( ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( com.android.cts.verifier.managedprovisioning.Utils.TAG , "requestDeleteProfileOwner: ActivityNotFoundException" , e ) ; } }

Target:
static void requestDeleteManagedProfile ( android.content.Context context ) { try { android.content.Intent intent = new android.content.Intent ( com.android.cts.verifier.managedprovisioning.ByodHelperActivity.ACTION_REMOVE_MANAGED_PROFILE ) ; intent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; context.startActivity ( intent ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( com.android.cts.verifier.managedprovisioning.Utils.TAG , "requestDeleteProfileOwner: ActivityNotFoundException" , e ) ; } }
Source:
public void setCurrency ( java.util.Currency currency ) { if ( ( currency != ( symbols.getCurrency ( ) ) ) || ( ! ( currency.getSymbol ( ) . equals ( symbols.getCurrencySymbol ( ) ) ) ) ) { symbols.setCurrency ( currency ) ; } icuDecimalFormat.setDecimalFormatSymbols ( symbols.getIcuDecimalFormatSymbols ( ) ) ; }

Target:
public void setCurrency ( java.util.Currency currency ) { if ( ( currency != ( symbols.getCurrency ( ) ) ) || ( ! ( currency.getSymbol ( ) . equals ( symbols.getCurrencySymbol ( ) ) ) ) ) { symbols.setCurrency ( currency ) ; icuDecimalFormat.setDecimalFormatSymbols ( symbols.getIcuDecimalFormatSymbols ( ) ) ; icuDecimalFormat.setMinimumFractionDigits ( minimumFractionDigits ) ; icuDecimalFormat.setMaximumFractionDigits ( maximumFractionDigits ) ; } }
Source:
public java.lang.Object clone ( ) { try { java.text.Collator clone = ( ( java.text.Collator ) ( super . clone ( ) ) ) ; clone.icuColl = ( ( java.text.Collator ) ( icuColl.clone ( ) ) ) ; return clone ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
public java.lang.Object clone ( ) { try { java.text.Collator clone = ( ( java.text.Collator ) ( super . clone ( ) ) ) ; clone.icuColl = ( ( libcore.icu.RuleBasedCollatorICU ) ( icuColl.clone ( ) ) ) ; return clone ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( e ) ; } }
Source:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( ids.mCallId ) ; }

Target:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( ids.mConnectionId ) ; }
Source:
public void testVenueNameElementParsing ( ) { try { for ( com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.VenueNameElementTestMapping testMapping : com.android.server.wifi.hotspot2.anqp.VenueNameElementTest.VENUE_NAME_ELEMENT_MAPPINGS ) { com.android.server.wifi.hotspot2.anqp.VenueNameElement venueNameElement = new com.android.server.wifi.hotspot2.anqp.VenueNameElement ( Constants.ANQPElementType.ANQPVenueName , java.nio.ByteBuffer.wrap ( testMapping.mBytes ) . order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ) ; assertEquals ( testMapping.mExpectedNames , venueNameElement.getNames ( ) ) ; } } catch ( java.net.ProtocolException e ) { fail ( ( "Exception encountered during parsing: " + e ) ) ; } }

Target:
public void parseBufferWithVenueNameLengthExceedMax ( ) throws java.lang.Exception { byte [ ] textData = new byte [ ( VenueNameElement.MAXIMUM_VENUE_NAME_LENGTH ) + 1 ] ; java.util.Arrays.fill ( textData , ( ( byte ) ( 'a' ) ) ) ; java.lang.String text = new java.lang.String ( textData ) ; java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap ( getTestData ( new java.lang.String [ ] { text } ) ) ; com.android.server.wifi.hotspot2.anqp.VenueNameElement.parse ( buffer ) ; }
Source:
private void doTestBracesNextLineStyle ( ) throws java.lang.Exception { com.intellij.psi.codeStyle.CodeStyleSettings settings = com.intellij.psi.codeStyle.CodeStyleSettingsManager.getSettings ( getProject ( ) ) ; settings.BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.NEXT_LINE ; settings.METHOD_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.NEXT_LINE ; settings.CLASS_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.NEXT_LINE ; try { doTest ( ) ; } finally { settings.BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.END_OF_LINE ; settings.METHOD_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.END_OF_LINE ; settings.CLASS_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.END_OF_LINE ; } }

Target:
private void doTestBracesNextLineStyle ( ) throws java.lang.Exception { com.intellij.psi.codeStyle.CommonCodeStyleSettings settings = com.intellij.psi.codeStyle.CodeStyleSettingsManager.getSettings ( getProject ( ) ) . getCommonSettings ( JavaLanguage.INSTANCE ) ; settings.BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.NEXT_LINE ; settings.METHOD_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.NEXT_LINE ; settings.CLASS_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.NEXT_LINE ; try { doTest ( ) ; } finally { settings.BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.END_OF_LINE ; settings.METHOD_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.END_OF_LINE ; settings.CLASS_BRACE_STYLE = com.intellij.psi.codeStyle.CommonCodeStyleSettings.END_OF_LINE ; } }
Source:
private void onSetStreamVolume ( int streamType , int index , int flags , int device ) { setStreamVolumeInt ( mStreamVolumeAlias [ streamType ] , index , device , false ) ; if ( ( ( flags & ( AudioManager.FLAG_ALLOW_RINGER_MODES ) ) != 0 ) || ( ( mStreamVolumeAlias [ streamType ] ) == ( getMasterStreamType ( ) ) ) ) { int newRingerMode ; if ( index == 0 ) { newRingerMode = ( mHasVibrator ) ? AudioManager.RINGER_MODE_VIBRATE : AudioManager.RINGER_MODE_SILENT ; } else { newRingerMode = AudioManager.RINGER_MODE_NORMAL ; } setRingerMode ( newRingerMode ) ; } }

Target:
public void adjustStreamVolume ( int streamType , int direction , int flags , java.lang.String callingPackage ) { adjustStreamVolume ( streamType , direction , flags , callingPackage , android.os.Binder.getCallingUid ( ) ) ; }
Source:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVfs , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( FileType.DEX.getFileExtension ( ) ) ; } try { return outputVfs.getRootOutputVDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }

Target:
protected com.android.sched.vfs.OutputVFile getOutputDex ( @ javax.annotation.Nonnull com.android.sched.vfs.OutputVFS outputVfs , int dexCount ) throws com.android.jack.backend.dex.DexWritingException { assert dexCount >= 1 ; java.lang.String dexName ; if ( dexCount == 1 ) { dexName = DexFileWriter.DEX_FILENAME ; } else { dexName = ( ( DexFileWriter.DEX_PREFIX ) + dexCount ) + ( DexFileWriter.DEX_FILE_EXTENSION ) ; } try { return outputVfs.getRootOutputVDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( dexName , '/' ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.backend.dex.DexWritingException ( e ) ; } }
Source:
public static com.android.manifmerger.XmlDocument load ( java.io.File xmlFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.InputStream inputStream = new java.io.BufferedInputStream ( new java.io.FileInputStream ( xmlFile ) ) ; com.android.utils.PositionXmlParser positionXmlParser = new com.android.utils.PositionXmlParser ( ) ; org.w3c.dom.Document domDocument = positionXmlParser.parse ( inputStream ) ; return domDocument != null ? new com.android.manifmerger.XmlDocument ( positionXmlParser , new com.android.manifmerger.XmlLoader.FileSourceLocation ( null , xmlFile ) , domDocument.getDocumentElement ( ) ) : null ; }

Target:
public static com.android.manifmerger.XmlDocument load ( java.lang.String displayName , java.io.File xmlFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.InputStream inputStream = new java.io.BufferedInputStream ( new java.io.FileInputStream ( xmlFile ) ) ; com.android.utils.PositionXmlParser positionXmlParser = new com.android.utils.PositionXmlParser ( ) ; org.w3c.dom.Document domDocument = positionXmlParser.parse ( inputStream ) ; return domDocument != null ? new com.android.manifmerger.XmlDocument ( positionXmlParser , new com.android.manifmerger.XmlLoader.FileSourceLocation ( displayName , xmlFile ) , domDocument.getDocumentElement ( ) ) : null ; }
Source:
public java.lang.String getName ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : return phoneLookupInfo.getPeopleApiInfo ( ) . getDisplayName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getName ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : return phoneLookupInfo.getPeopleApiInfo ( ) . getDisplayName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : return phoneLookupInfo.getCnapInfo ( ) . getName ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }