auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void adjustVolume ( int direction , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.adjustMasterVolume ( direction , flags , getContext ( ) . getOpPackageName ( ) ) ; } else { android.media.session.MediaSessionLegacyHelper helper = android.media.session.MediaSessionLegacyHelper.getHelper ( getContext ( ) ) ; helper.sendAdjustVolumeBy ( android.media.AudioManager.USE_DEFAULT_STREAM_TYPE , direction , flags ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustVolume" , e ) ; } }

Target:
public void adjustVolume ( int direction , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.adjustMasterVolume ( direction , flags , mApplicationContext.getOpPackageName ( ) ) ; } else { android.media.session.MediaSessionLegacyHelper helper = android.media.session.MediaSessionLegacyHelper.getHelper ( mApplicationContext ) ; helper.sendAdjustVolumeBy ( android.media.AudioManager.USE_DEFAULT_STREAM_TYPE , direction , flags ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustVolume" , e ) ; } }
Source:
public void setQualifier ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier ) { com.android.ide.eclipse.adt.internal.resources.configurations.ScreenDimensionQualifier q = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.ScreenDimensionQualifier ) ( qualifier ) ) ; mSize1.setText ( java.lang.Integer.toString ( q.getValue1 ( ) ) ) ; mSize2.setText ( java.lang.Integer.toString ( q.getValue2 ( ) ) ) ; }

Target:
public void setQualifier ( com.android.ide.common.resources.configuration.ResourceQualifier qualifier ) { com.android.ide.common.resources.configuration.ScreenDimensionQualifier q = ( ( com.android.ide.common.resources.configuration.ScreenDimensionQualifier ) ( qualifier ) ) ; mSize1.setText ( java.lang.Integer.toString ( q.getValue1 ( ) ) ) ; mSize2.setText ( java.lang.Integer.toString ( q.getValue2 ( ) ) ) ; }
Source:
public void disposeUIResources ( ) { panel = null ; useFakeBucketCheckbox = null ; fakeBucketNameField = null ; }

Target:
public void disposeUIResources ( ) { panel = null ; useFakeBucketCheckbox = null ; fakeBucketNameField = null ; useProd = null ; prodUrlField = null ; useStaging = null ; stagingUrlField = null ; useTest = null ; testUrlField = null ; useCustom = null ; customUrlField = null ; }
Source:
synchronized boolean connect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "connect(): device=" + device ) ) ; } return connectNative ( com.android.bluetooth.Utils.getByteAddress ( device ) ) ; }

Target:
synchronized boolean unplug ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "unplug(): device=" + device ) ) ; } return ( ( checkDevice ( device ) ) && ( checkCallingUid ( ) ) ) && ( mHidDeviceNativeInterface.unplug ( ) ) ; }
Source:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] buffer = new byte [ 1 ] ; org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , buffer , 0 , 1 , 0 ) ; assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public int writeBytesTo ( byte [ ] dest , int offset , int maxLength ) { byte [ ] hash = asBytes ( ) ; maxLength = com.google.common.primitives.Ints.min ( maxLength , hash.length ) ; com.google.common.base.Preconditions.checkPositionIndexes ( offset , ( offset + maxLength ) , dest.length ) ; java.lang.System.arraycopy ( hash , 0 , dest , offset , maxLength ) ; return maxLength ; }

Target:
void writeBytesToImpl ( byte [ ] dest , int offset , int maxLength ) { java.lang.System.arraycopy ( bytes , 0 , dest , offset , maxLength ) ; }
Source:
void restartRinger ( ) { if ( com.android.phone.CallNotifier.DBG ) log ( "restartRinger()..." ) ; if ( isRinging ( ) ) return ; final com.android.internal.telephony.Call ringingCall = mCM.getFirstActiveRingingCall ( ) ; if ( com.android.phone.CallNotifier.DBG ) log ( ( "- ringingCall state: " + ( ringingCall.getState ( ) ) ) ) ; if ( ( ringingCall.getState ( ) ) == ( Call.State.INCOMING ) ) { mRinger.ring ( ) ; } }

Target:
void restartRinger ( ) { if ( com.android.phone.CallNotifier.DBG ) log ( "restartRinger()..." ) ; if ( ( isRinging ( ) ) || ( mSilentRingerRequested ) ) return ; final com.android.internal.telephony.Call ringingCall = mCM.getFirstActiveRingingCall ( ) ; if ( com.android.phone.CallNotifier.DBG ) log ( ( "- ringingCall state: " + ( ringingCall.getState ( ) ) ) ) ; if ( ( ringingCall.getState ( ) ) == ( Call.State.INCOMING ) ) { mRinger.ring ( ) ; } }
Source:
public void testGrant_Generated_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testGrant_Generated_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
public void testParseAaptOutputWithRange1 ( ) throws java.io.IOException { createTempXmlFile ( ) ; writeToFile ( "<manifest xmlns:android='http://schemas.android.com/apk/res/android'" , " android:versionCode='12' android:versionName='2.0' package='com.android.tests.basic'>" , " <uses-sdk android:minSdkVersion='16' android:targetSdkVersion='16'/>" , " <application android:icon='@drawable/icon' android:label='@string/app_name2'>" ) ; java.lang.String messageText = "No resource found that matches the given name (at 'label' with value " + "'@string/app_name2')." ; java.lang.String err = ( ( sourceFilePath ) + ":4: error: Error: " ) + messageText ; java.util.Collection < com.android.ide.common.blame.output.GradleMessage > messages = parser.parseToolOutput ( err ) ; assertHasCorrectErrorMessage ( messages , messageText , 4 , 61 ) ; }

Target:
public void testParseAaptOutputWithRange1 ( ) throws java.io.IOException { createTempXmlFile ( ) ; writeToFile ( "<manifest xmlns:android='http://schemas.android.com/apk/res/android'" , " android:versionCode='12' android:versionName='2.0' package='com.android.tests.basic'>" , " <uses-sdk android:minSdkVersion='16' android:targetSdkVersion='16'/>" , " <application android:icon='@drawable/icon' android:label='@string/app_name2'>" ) ; java.lang.String messageText = "No resource found that matches the given name (at 'label' with value " + "'@string/app_name2')." ; java.lang.String err = ( ( sourceFilePath ) + ":4: error: Error: " ) + messageText ; java.util.Collection < com.android.ide.common.blame.Message > messages = parser.parseToolOutput ( err ) ; assertHasCorrectErrorMessage ( messages , messageText , 4 , 61 ) ; }
Source:
public void enter ( ) { super . enter ( ) ; mWasOnSpeaker = true ; setSpeakerphoneOn ( true ) ; setBluetoothOff ( ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_SPEAKER , mAvailableRoutes ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; mWasOnSpeaker = true ; setSpeakerphoneOn ( true ) ; setBluetoothOff ( ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_SPEAKER , mAvailableRoutes , null , mBluetoothRouteManager.getConnectedDevices ( ) ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }
Source:
private void notifyToolsNeedsToBeRestarted ( ) { org.eclipse.swt.widgets.Display display = mWindowShell.getDisplay ( ) ; display.syncExec ( new java.lang.Runnable ( ) { public void run ( ) { org.eclipse.jface.dialogs.MessageDialog.openInformation ( mWindowShell , "Android Tools Updated" , ( "The Android SDK and AVD Manager that you are currently using has been updated. " + ( ( "It is recommended that you now close the manager window and re-open it. " + "If you started this window from Eclipse, please check if the Android " ) + "plug-in needs to be updated." ) ) ) ; } } ) ; }

Target:
private void notifyToolsNeedsToBeRestarted ( ) { if ( ( getWindowShell ( ) ) == null ) { return ; } org.eclipse.swt.widgets.Display display = getWindowShell ( ) . getDisplay ( ) ; display.syncExec ( new java.lang.Runnable ( ) { public void run ( ) { org.eclipse.jface.dialogs.MessageDialog.openInformation ( getWindowShell ( ) , "Android Tools Updated" , ( "The Android SDK and AVD Manager that you are currently using has been updated. " + ( ( "It is recommended that you now close the manager window and re-open it. " + "If you started this window from Eclipse, please check if the Android " ) + "plug-in needs to be updated." ) ) ) ; } } ) ; }
Source:
private static boolean hasPermission ( ) { boolean hasPermission = true ; java.lang.SecurityManager sm = java.lang.System.getSecurityManager ( ) ; if ( sm != null ) { try { sm.checkPermission ( new java.util.PropertyPermission ( "user.timezone" , "write" ) ) ; } catch ( java.lang.SecurityException e ) { hasPermission = false ; } } return hasPermission ; }

Target:
public static java.util.TimeZone getTimeZone ( java.time.ZoneId zoneId ) { java.lang.String tzid = zoneId.getId ( ) ; char c = tzid.charAt ( 0 ) ; if ( ( c == '+' ) || ( c == '-' ) ) { tzid = "GMT" + tzid ; } else if ( ( c == 'Z' ) && ( ( tzid.length ( ) ) == 1 ) ) { tzid = "UTC" ; } return java.util.TimeZone.getTimeZone ( tzid ) ; }
Source:
public void wifiNanDisconnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId ) throws android.os.RemoteException , org.json.JSONException { android.net.wifi.nan.WifiNanSession session ; synchronized ( mLock ) { session = mSessions.get ( clientId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanDisconnect before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } session.disconnect ( ) ; }

Target:
public void wifiNanDestroy ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId ) throws android.os.RemoteException , org.json.JSONException { android.net.wifi.nan.WifiNanSession session ; synchronized ( mLock ) { session = mSessions.get ( clientId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanDisconnect before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } session.destroy ( ) ; }
Source:
public static com.android.sdklib.internal.project.ProjectProperties load ( java.lang.String projectFolderOsPath , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { java.io.File projectFolder = new java.io.File ( projectFolderOsPath ) ; if ( projectFolder.isDirectory ( ) ) { java.io.File defaultFile = new java.io.File ( projectFolder , type.mFilename ) ; if ( defaultFile.isFile ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.SdkManager.parsePropertyFile ( defaultFile , null ) ; if ( map != null ) { return new com.android.sdklib.internal.project.ProjectProperties ( projectFolderOsPath , map , type ) ; } } } return null ; }

Target:
public static com.android.sdklib.internal.project.ProjectProperties load ( java.lang.String projectFolderOsPath , com.android.sdklib.internal.project.ProjectProperties.PropertyType type ) { com.android.sdklib.io.IAbstractFolder wrapper = new com.android.sdklib.io.FolderWrapper ( projectFolderOsPath ) ; return com.android.sdklib.internal.project.ProjectProperties.load ( wrapper , type ) ; }
Source:
public void testSplashscreenContent ( ) throws java.lang.Exception { launchActivityNoWait ( "SplashscreenActivity" ) ; mAmWmState.waitForAppTransitionIdle ( mDevice ) ; mAmWmState.getWmState ( ) . getStableBounds ( ) ; final java.awt.image.BufferedImage image = takeScreenshot ( ) ; assertColors ( image , mAmWmState.getWmState ( ) . getStableBounds ( ) , java.awt.Color.RED.getRGB ( ) , 0.5F , java.awt.Color.BLACK.getRGB ( ) , 0.01F ) ; }

Target:
public void testSplashscreenContent ( ) throws java.lang.Exception { launchActivityOnDisplayNoWait ( "SplashscreenActivity" , ActivityAndWindowManagersState.DEFAULT_DISPLAY_ID ) ; mAmWmState.waitForDisplayUnfrozen ( mDevice ) ; mAmWmState.getWmState ( ) . getStableBounds ( ) ; final java.awt.image.BufferedImage image = takeScreenshot ( ) ; assertColors ( image , mAmWmState.getWmState ( ) . getStableBounds ( ) , java.awt.Color.RED.getRGB ( ) , 0.5F , java.awt.Color.BLACK.getRGB ( ) , 0.01F ) ; }
Source:
private void launchSettingsAppAndFinish ( ) { android.content.Intent launchSettingsIntent = new android.content.Intent ( android.provider.Settings.ACTION_SECURITY_SETTINGS ) ; launchSettingsIntent.setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; startActivity ( launchSettingsIntent ) ; finish ( ) ; }

Target:
public void onActivityResult ( int request , int result , android.content.Intent data ) { if ( ( ( request == ( com.android.packageinstaller.PackageInstallerActivity.REQUEST_ENABLE_UNKNOWN_SOURCES ) ) && ( result == ( RESULT_OK ) ) ) && ( isUnknownSourcesEnabled ( ) ) ) { initiateInstall ( ) ; } else { finish ( ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.out.println ( "thread test starting" ) ; Main.testThreadCapacity ( ) ; Main.testThreadDaemons ( ) ; Main.testSleepZero ( ) ; Main.testSetName ( ) ; Main.testThreadPriorities ( ) ; java.lang.System.out.println ( "thread test done" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; java.lang.System.out.println ( "thread test starting" ) ; Main.testThreadCapacity ( ) ; Main.testThreadDaemons ( ) ; Main.testSleepZero ( ) ; Main.testSetName ( ) ; Main.testThreadPriorities ( ) ; java.lang.System.out.println ( "thread test done" ) ; }
Source:
public void junit ( ) throws java.lang.Exception { java.io.File junitJack = com.android.jack.TestTools.createTempFile ( "junit" , ".zip" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.ToolchainTest.JUNIT_SOURCELIST , ( ( ( com.android.jack.ToolchainTest.corePath.getAbsolutePath ( ) ) + ( java.io.File.pathSeparator ) ) + ( com.android.jack.TestTools.getFromAndroidTree ( "out/host/common/obj/JAVA_LIBRARIES/hamcrest-core-hostdex-jack_intermediates/classes.jar" ) ) ) , junitJack , true ) ; java.io.File junit = com.android.jack.TestTools.createTempFile ( "junit" , ".dex" ) ; com.android.jack.TestTools.compileJackToDex ( new com.android.jack.Options ( ) , junitJack , junit , false ) ; }

Target:
public void junit ( ) throws java.lang.Exception { java.io.File junitJack = com.android.jack.TestTools.createTempFile ( "junit" , ".zip" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.ToolchainTest.JUNIT_SOURCELIST , ( ( ( com.android.jack.ToolchainTest.corePath.getAbsolutePath ( ) ) + ( java.io.File.pathSeparator ) ) + ( com.android.jack.TestTools.getFromAndroidTree ( "out/host/common/obj/JAVA_LIBRARIES/hamcrest-core-hostdex-jack_intermediates/classes.jar" ) ) ) , junitJack , true ) ; java.io.File junitOutFolder = com.android.jack.TestTools.createTempDir ( "junit" , "dex" ) ; com.android.jack.TestTools.compileJackToDex ( new com.android.jack.Options ( ) , junitJack , junitOutFolder , false ) ; }
Source:
public void testAppAllowed ( ) throws java.lang.Exception { if ( ! ( supportedHardware ( ) ) ) return ; startVpn ( new java.lang.String [ ] { "192.0.2.2/32" , "2001:db8:1:2::ffe/128" } , new java.lang.String [ ] { "0.0.0.0/0" , "::/0" } , mPackageName , "" ) ; checkTrafficOnVpn ( ) ; }

Target:
public void testDefault ( ) throws java.lang.Exception { if ( ! ( supportedHardware ( ) ) ) return ; startVpn ( new java.lang.String [ ] { "192.0.2.2/32" , "2001:db8:1:2::ffe/128" } , new java.lang.String [ ] { "0.0.0.0/0" , "::/0" } , "" , "" ) ; checkTrafficOnVpn ( ) ; }
Source:
public final void onSendSmsResult ( int token , int messageRef , @ android.telephony.ims.internal.stub.SmsImplBase.SendStatusResult int status , int reason ) throws android.os.RemoteException , java.lang.IllegalStateException { synchronized ( mLock ) { if ( ( mListener ) == null ) { throw new java.lang.IllegalStateException ( "Feature not ready." ) ; } mListener.onSendSmsResult ( token , messageRef , status , reason ) ; } }

Target:
public final void onSendSmsResult ( int token , int messageRef , @ android.telephony.ims.internal.stub.SmsImplBase.SendStatusResult int status , int reason ) throws java.lang.RuntimeException { synchronized ( mLock ) { if ( ( mListener ) == null ) { throw new java.lang.RuntimeException ( "Feature not ready." ) ; } try { mListener.onSendSmsResult ( token , messageRef , status , reason ) ; } catch ( android.os.RemoteException e ) { e.rethrowFromSystemServer ( ) ; } } }
Source:
public java.util.Properties loadProperties ( @ com.android.annotations.NonNull java.io.File file ) { java.util.Properties props = new java.util.Properties ( ) ; java.io.FileInputStream fis = null ; try { fis = new java.io.FileInputStream ( file ) ; props.load ( fis ) ; } catch ( java.io.IOException ignore ) { } finally { com.google.common.io.Closeables.closeQuietly ( fis ) ; } return props ; }

Target:
public java.util.Properties loadProperties ( @ com.android.annotations.NonNull java.io.File file ) { java.util.Properties props = new java.util.Properties ( ) ; com.google.common.io.Closer closer = com.google.common.io.Closer.create ( ) ; try { java.io.FileInputStream fis = closer.register ( new java.io.FileInputStream ( file ) ) ; props.load ( fis ) ; } catch ( java.io.IOException ignore ) { } finally { try { closer.close ( ) ; } catch ( java.io.IOException e ) { } } return props ; }
Source:
public void test_clear ( ) { hm.clear ( ) ; assertEquals ( "Clear failed to reset size" , 0 , hm.size ( ) ) ; for ( int i = 0 ; i < ( tests.api.java.util.IdentityHashMap2Test.hmSize ) ; i ++ ) assertNull ( "Failed to clear all elements" , hm.get ( tests.api.java.util.IdentityHashMap2Test.objArray2 [ i ] ) ) ; }

Target:
public void test_clear ( ) { hm.clear ( ) ; assertEquals ( "Clear failed to reset size" , 0 , hm.size ( ) ) ; for ( int i = 0 ; i < ( tests.api.java.util.IdentityHashMap2Test.hmSize ) ; i ++ ) assertNull ( "Failed to clear all elements" , hm.get ( objArray2 [ i ] ) ) ; }
Source:
public void getNeighboringCids ( android.os.Message response ) { com.android.internal.telephony.gsm.RILRequest rr = com.android.internal.telephony.gsm.RILRequest.obtain ( RILConstants.RIL_REQUEST_GET_NEIGHBORING_CELL_IDS , response ) ; if ( com.android.internal.telephony.gsm.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.gsm.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void getNeighboringCids ( android.os.Message response ) { android.os.AsyncResult.forMessage ( response ) . exception = new com.android.internal.telephony.gsm.CommandException ( CommandException.Error.REQUEST_NOT_SUPPORTED ) ; response.sendToTarget ( ) ; response = null ; }
Source:
protected com.android.jack.backend.dex.MergingManager getManager ( ) { return new com.android.jack.backend.dex.MergingManager ( ) ; }

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 ) + ( 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 ) ; } }
Source:
public java.lang.Object [ ] getElements ( java.lang.Object inputElement ) { if ( ( mQualifierFilter ) == null ) { return mInput.getQualifiers ( ) ; } java.util.ArrayList < com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier > ( ) ; for ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qual : mInput.getQualifiers ( ) ) { if ( mQualifierFilter.accept ( qual ) ) { list.add ( qual ) ; } } return list.toArray ( ) ; }

Target:
public java.lang.Object [ ] getElements ( java.lang.Object inputElement ) { if ( ( mQualifierFilter ) == null ) { return mInput.getQualifiers ( ) ; } java.util.ArrayList < com.android.ide.common.resources.configuration.ResourceQualifier > list = new java.util.ArrayList < com.android.ide.common.resources.configuration.ResourceQualifier > ( ) ; for ( com.android.ide.common.resources.configuration.ResourceQualifier qual : mInput.getQualifiers ( ) ) { if ( mQualifierFilter.accept ( qual ) ) { list.add ( qual ) ; } } return list.toArray ( ) ; }
Source:
public static com.android.sched.scheduler.TagOrMarkerOrComponentSet getJavaSourceInitialTagSet ( ) { com.android.sched.scheduler.Scheduler scheduler = com.android.sched.scheduler.Scheduler.getScheduler ( ) ; com.android.sched.scheduler.TagOrMarkerOrComponentSet set = scheduler.createTagOrMarkerOrComponentSet ( ) ; set.add ( com.android.jack.ir.JavaSourceIr.class ) ; set.add ( com.android.jack.shrob.obfuscation.OriginalNames.class ) ; set.add ( com.android.jack.ir.sourceinfo.SourceInfoCreation.class ) ; return set ; }

Target:
public static com.android.sched.scheduler.TagOrMarkerOrComponentSet getJavaSourceInitialTagSet ( @ javax.annotation.Nonnull com.android.sched.scheduler.Scheduler scheduler ) { com.android.sched.scheduler.TagOrMarkerOrComponentSet set = scheduler.createTagOrMarkerOrComponentSet ( ) ; set.add ( com.android.jack.ir.JavaSourceIr.class ) ; set.add ( com.android.jack.shrob.obfuscation.OriginalNames.class ) ; set.add ( com.android.jack.ir.sourceinfo.SourceInfoCreation.class ) ; if ( ( com.android.sched.util.config.ThreadConfig.get ( Options.JAVA_SOURCE_VERSION ) . compareTo ( JavaVersion.JAVA_7 ) ) >= 0 ) { set.add ( JSwitchStatement.SwitchWithString.class ) ; } return set ; }
Source:
private static java.security.Signature getInstance ( sun.security.jca.GetInstance.Instance instance , java.lang.String algorithm ) { java.security.Signature sig ; if ( ( instance.impl ) instanceof java.security.Signature ) { sig = ( ( java.security.Signature ) ( instance.impl ) ) ; } else { java.security.SignatureSpi spi = ( ( java.security.SignatureSpi ) ( instance.impl ) ) ; sig = new java.security.Signature.Delegate ( spi , algorithm ) ; } sig.provider = instance.provider ; return sig ; }

Target:
private static java.security.Signature getInstance ( sun.security.jca.GetInstance.Instance instance , java.lang.String algorithm ) { java.security.Signature sig ; if ( ( instance.impl ) instanceof java.security.Signature ) { sig = ( ( java.security.Signature ) ( instance.impl ) ) ; sig.algorithm = algorithm ; } else { java.security.SignatureSpi spi = ( ( java.security.SignatureSpi ) ( instance.impl ) ) ; sig = new java.security.Signature.Delegate ( spi , algorithm ) ; } sig.provider = instance.provider ; return sig ; }
Source:
public void testSystemTzDataFileCorrupt ( ) throws java.lang.Exception { byte [ ] invalidTzDataBytes = new byte [ 20 ] ; java.nio.file.Files.write ( mSystemDir.hostPath.resolve ( com.android.cts.tzdata.TzDataCheckTest.SYSTEM_TZDATA_FILE_NAME ) , invalidTzDataBytes ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro validDistro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , validDistro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 7 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , validDistro ) ; }

Target:
public void testSystemTzDataFileCorrupt ( ) throws java.lang.Exception { byte [ ] invalidTzDataBytes = new byte [ 20 ] ; java.nio.file.Files.write ( mSystemDir.hostPath.resolve ( com.android.cts.tzdata.TzDataCheckTest.SYSTEM_TZDATA_FILE_NAME ) , invalidTzDataBytes ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; byte [ ] validDistroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , validDistroBytes ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 7 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , validDistroBytes ) ; }
Source:
public synchronized com.android.jack.ir.sourceinfo.LineSourceInfo create ( @ javax.annotation.Nonnegative int startLine , @ javax.annotation.Nonnegative int endLine , @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.FileSourceInfo fileName ) { com.android.jack.ir.sourceinfo.LineSourceInfo newInstance = new com.android.jack.ir.sourceinfo.LineSourceInfo ( fileName , startLine , endLine ) ; com.android.jack.ir.sourceinfo.LineSourceInfo canonical = canonicalLineSourceInfos.get ( newInstance ) ; assert ( canonical == null ) || ( ( newInstance != canonical ) && ( newInstance.equals ( canonical ) ) ) ; if ( canonical != null ) { return canonical ; } else { canonicalLineSourceInfos.put ( newInstance , newInstance ) ; return newInstance ; } }

Target:
public java.util.Set < com.android.jack.ir.sourceinfo.LineSourceInfo > getLineSourceInfos ( ) { return canonicalLineSourceInfos.keySet ( ) ; }
Source:
public static com.android.dx.rop.annotation.Annotation makeThrows ( com.android.dx.rop.type.TypeList types ) { com.android.dx.rop.cst.CstArray array = com.android.dx.dex.file.AnnotationUtils.makeCstArray ( types ) ; com.android.dx.rop.annotation.Annotation result = new com.android.dx.rop.annotation.Annotation ( com.android.dx.dex.file.AnnotationUtils.THROWS_TYPE , SYSTEM ) ; result.put ( new com.android.dx.rop.annotation.NameValuePair ( com.android.dx.dex.file.AnnotationUtils.VALUE_STRING , array ) ) ; result.setImmutable ( ) ; return result ; }

Target:
public static com.android.dx.rop.annotation.Annotation makeThrows ( com.android.dx.rop.type.TypeList types ) { com.android.dx.rop.cst.CstArray array = com.android.dx.dex.file.AnnotationUtils.makeCstArray ( types ) ; com.android.dx.rop.annotation.Annotation result = new com.android.dx.rop.annotation.Annotation ( com.android.dx.dex.file.AnnotationUtils.THROWS_TYPE , com.android.dx.rop.annotation.AnnotationVisibility.SYSTEM ) ; result.put ( new com.android.dx.rop.annotation.NameValuePair ( com.android.dx.dex.file.AnnotationUtils.VALUE_STRING , array ) ) ; result.setImmutable ( ) ; return result ; }
Source:
private android.net.wifi.WifiConfiguration getInternalConfiguredNetwork ( int networkId ) { android.net.wifi.WifiConfiguration internalConfig = mConfiguredNetworks.getForCurrentUser ( networkId ) ; if ( internalConfig == null ) { android.util.Log.e ( com.android.server.wifi.WifiConfigManager.TAG , ( "Cannot find network with networkId " + networkId ) ) ; } return internalConfig ; }

Target:
private android.net.wifi.WifiConfiguration getInternalConfiguredNetwork ( int networkId ) { if ( networkId == ( android.net.wifi.WifiConfiguration.INVALID_NETWORK_ID ) ) { android.util.Log.e ( com.android.server.wifi.WifiConfigManager.TAG , "Looking up network with invalid networkId -1" ) ; return null ; } android.net.wifi.WifiConfiguration internalConfig = mConfiguredNetworks.getForCurrentUser ( networkId ) ; if ( internalConfig == null ) { android.util.Log.e ( com.android.server.wifi.WifiConfigManager.TAG , ( "Cannot find network with networkId " + networkId ) ) ; } return internalConfig ; }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newBuildTool ( @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision revision ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_BUILD_TOOLS ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getFullRevision ( ) { return revision ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return ( isGenericUpdateFor ( existingDesc ) ) && ( ( revision.compareTo ( existingDesc.getFullRevision ( ) , PreviewComparison.COMPARE_TYPE ) ) == 0 ) ; } } ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newBuildTool ( @ com.android.annotations.NonNull com.android.sdklib.repository.FullRevision revision ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_BUILD_TOOLS ) ; p.mFullRevision = revision ; p.mCustomIsUpdateFor = new com.android.sdklib.repository.descriptors.PkgDesc.IIsUpdateFor ( ) { @ java.lang.Override public boolean isUpdateFor ( com.android.sdklib.repository.descriptors.PkgDesc thisPkgDesc , com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return ( thisPkgDesc.isGenericUpdateFor ( existingDesc ) ) && ( ( thisPkgDesc.getFullRevision ( ) . compareTo ( existingDesc.getFullRevision ( ) , PreviewComparison.COMPARE_TYPE ) ) == 0 ) ; } } ; return p ; }
Source:
public void int16 ( short v ) throws java.io.IOException { mBuffer [ 0 ] = ( ( byte ) ( ( v > > > 0 ) & 255 ) ) ; mBuffer [ 1 ] = ( ( byte ) ( ( v > > > 8 ) & 255 ) ) ; write ( 2 ) ; }

Target:
public void int16 ( short v ) throws java.io.IOException { intv ( v ) ; }
Source:
public static java.lang.String intToDoubleToIntPrint ( int value ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } double d = ( ( double ) ( value ) ) ; int i = ( ( int ) ( d ) ) ; return ( ( "d=" + d ) + ", i=" ) + i ; }

Target:
public static java.lang.String $noinline$intToDoubleToIntPrint ( int value ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } double d = ( ( double ) ( value ) ) ; int i = ( ( int ) ( d ) ) ; return ( ( "d=" + d ) + ", i=" ) + i ; }
Source:
public static android.net.MacAddress.MacAddressType macAddressType ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { return null ; } if ( java.util.Arrays.equals ( addr , android.net.MacAddress.ETHER_ADDR_BROADCAST ) ) { return android.net.MacAddress.MacAddressType.BROADCAST ; } if ( ( ( addr [ 0 ] ) & 1 ) == 1 ) { return android.net.MacAddress.MacAddressType.MULTICAST ; } return android.net.MacAddress.MacAddressType.UNICAST ; }

Target:
public static long longAddrFromByteAddr ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( java.util.Arrays.toString ( addr ) ) + " was not a valid MAC address" ) ) ; } long longAddr = 0 ; for ( byte b : addr ) { longAddr = ( longAddr << 8 ) + ( com.android.internal.util.BitUtils.uint8 ( b ) ) ; } return longAddr ; }
Source:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = "test1" ; mProvider = new com.android.server.wifi.hotspot2.PasspointProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.homeSp.fqdn = "test2" ; verifyInstalledConfig ( config , false ) ; }

Target:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = "test1" ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.homeSp.fqdn = "test2" ; verifyInstalledConfig ( config , false ) ; }
Source:
public void testConstructor_NoAliases ( ) { tests.api.java.nio.charset.CharsetTest.MockCharset c = new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ 0 ] ) ; assertEquals ( "mockChar" , c.name ( ) ) ; assertEquals ( "mockChar" , c.displayName ( ) ) ; assertEquals ( "mockChar" , c.displayName ( java.util.Locale.getDefault ( ) ) ) ; assertEquals ( 0 , c.aliases ( ) . toArray ( ) . length ) ; }

Target:
public void testConstructor_NoAliases ( ) { org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset c = new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ 0 ] ) ; assertEquals ( "mockChar" , c.name ( ) ) ; assertEquals ( "mockChar" , c.displayName ( ) ) ; assertEquals ( "mockChar" , c.displayName ( java.util.Locale.getDefault ( ) ) ) ; assertEquals ( 0 , c.aliases ( ) . toArray ( ) . length ) ; }
Source:
public android.hardware.wifi.supplicant.V1_0.SupplicantStatus answer ( java.util.ArrayList < java.lang.Byte > ssid ) throws android.os.RemoteException { mSupplicantVariables.ssid = ssid ; return mStatusFailure ; }

Target:
public void testInvalidSsidLoadFailure ( ) throws java.lang.Exception { android.net.wifi.WifiConfiguration config = com.android.server.wifi.WifiConfigurationTestUtil.createWepHiddenNetwork ( ) ; assertTrue ( mSupplicantNetwork.saveWifiConfiguration ( config ) ) ; mSupplicantVariables.ssid = null ; android.net.wifi.WifiConfiguration loadConfig = new android.net.wifi.WifiConfiguration ( ) ; java.util.Map < java.lang.String , java.lang.String > networkExtras = new java.util.HashMap < > ( ) ; assertFalse ( mSupplicantNetwork.loadWifiConfiguration ( loadConfig , networkExtras ) ) ; }
Source:
public static org.w3c.dom.Node getNode ( org.eclipse.jface.text.ITextViewer viewer , int offset ) { return com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities.getNode ( viewer.getDocument ( ) , offset ) ; }

Target:
private char computeElementNeedTag ( org.eclipse.jface.text.ITextViewer viewer , int offset , java.lang.String wordPrefix ) { char needTag = 0 ; int offset2 = ( offset - ( wordPrefix.length ( ) ) ) - 1 ; char c1 = extractChar ( viewer , offset2 ) ; if ( ! ( ( c1 == '<' ) || ( ( c1 == '/' ) && ( ( extractChar ( viewer , ( offset2 - 1 ) ) ) == '<' ) ) ) ) { needTag = '<' ; } return needTag ; }
Source:
public void testTypeTextActionPerform ( ) throws android.support.test.espresso.InjectEventSecurityException { java.lang.String stringToBeTyped = "Hello!" ; typeTextAction = new android.support.test.espresso.action.TypeTextAction ( stringToBeTyped ) ; org.mockito.Mockito.when ( mockUiController.injectMotionEvent ( org.mockito.Matchers.isA ( android.view.MotionEvent.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockUiController.injectString ( stringToBeTyped ) ) . thenReturn ( true ) ; typeTextAction.perform ( mockUiController , mockView ) ; }

Target:
public void typeTextActionPerform ( ) throws android.support.test.espresso.InjectEventSecurityException { java.lang.String stringToBeTyped = "Hello!" ; typeTextAction = new android.support.test.espresso.action.TypeTextAction ( stringToBeTyped ) ; org.mockito.Mockito.when ( mockUiController.injectMotionEvent ( org.mockito.Matchers.isA ( android.view.MotionEvent.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockUiController.injectString ( stringToBeTyped ) ) . thenReturn ( true ) ; typeTextAction.perform ( mockUiController , mockView ) ; }
Source:
public java.lang.String getDeviceSoftwareVersion ( int slotId ) { int [ ] subId = android.telephony.SubscriptionManager.getSubId ( slotId ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return null ; } try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getDeviceSvnUsingSubId ( subId [ 0 ] , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getDeviceSoftwareVersion ( int slotIndex ) { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; try { return telephony.getDeviceSoftwareVersionForSlot ( slotIndex , getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSample ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SAMPLES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinToolsRev ( ) { return minToolsRev ; } } ; }

Target:
public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; }
Source:
public java.lang.String getOriginalUrl ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.String ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { return getOriginalUrl ( ) ; } } ) ; return ret ; } java.lang.String url = mAwContents.getOriginalUrl ( ) ; if ( ( url == null ) || ( url.trim ( ) . isEmpty ( ) ) ) return null ; return url ; }

Target:
public boolean isPaused ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return isPaused ( ) ; } } ) ; return ret ; } return mAwContents.isPaused ( ) ; }
Source:
public void beforeCheckFile ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( context.getPhase ( ) ) == 1 ) { mNames = new java.util.HashSet < java.lang.String > ( ) ; } mIgnoreFile = context.file.getName ( ) . startsWith ( "donottranslate" ) ; }

Target:
public void beforeCheckFile ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context ) { if ( ( context.getPhase ( ) ) == 1 ) { mNames = new java.util.HashSet < java.lang.String > ( ) ; } mIgnoreFile = context.file.getName ( ) . startsWith ( "donottranslate" ) ; if ( ! ( context.getProject ( ) . getReportIssues ( ) ) ) { mIgnoreFile = true ; } }
Source:
public static java.lang.Object newProxyInstance ( java.lang.ClassLoader loader , java.lang.Class < ? > [ ] interfaces , java.lang.reflect.InvocationHandler h ) throws java.lang.IllegalArgumentException { if ( h == null ) { throw new java.lang.NullPointerException ( ) ; } java.lang.Class < ? > cl = java.lang.reflect.Proxy.getProxyClass0 ( loader , interfaces ) ; try { final java.lang.reflect.Constructor < ? > cons = cl.getConstructor ( java.lang.reflect.Proxy.constructorParams ) ; return java.lang.reflect.Proxy.newInstance ( cons , h ) ; } catch ( java.lang.NoSuchMethodException e ) { throw new java.lang.InternalError ( e.toString ( ) ) ; } }

Target:
public java.lang.Object apply ( java.lang.ClassLoader classLoader , java.lang.Class < ? > [ ] interfaces ) { switch ( interfaces.length ) { case 1 : return new java.lang.reflect.Proxy.Key1 ( interfaces [ 0 ] ) ; case 2 : return new java.lang.reflect.Proxy.Key2 ( interfaces [ 0 ] , interfaces [ 1 ] ) ; case 0 : return java.lang.reflect.Proxy.key0 ; default : return new java.lang.reflect.Proxy.KeyX ( interfaces ) ; } }
Source:
public < T extends com.android.sched.util.config.category.Category > T getCategory ( @ javax.annotation.Nonnull java.lang.Class < T > target ) { if ( target == ( com.android.sched.util.config.category.Category.class ) ) { return null ; } for ( java.lang.Class < ? extends com.android.sched.util.config.category.Category > category : categories.keySet ( ) ) { if ( target.isAssignableFrom ( category ) ) { return ( ( T ) ( categories.get ( target ) ) ) ; } } throw new java.util.NoSuchElementException ( ) ; }

Target:
public < T extends com.android.sched.util.config.category.Category > T getCategory ( @ javax.annotation.Nonnull java.lang.Class < T > target ) { if ( target == ( com.android.sched.util.config.category.Category.class ) ) { return null ; } for ( java.util.Map.Entry < java.lang.Class < ? extends com.android.sched.util.config.category.Category > , com.android.sched.util.config.category.Category > entry : categories.entrySet ( ) ) { if ( target.isAssignableFrom ( entry.getKey ( ) ) ) { return ( ( T ) ( entry.getValue ( ) ) ) ; } } throw new java.util.NoSuchElementException ( ) ; }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { for ( int i = 0 ; i < ( mLogLevelActions.length ) ; i ++ ) { com.android.ddmuilib.actions.ToolItemAction a = mLogLevelActions [ i ] ; if ( a == newAction ) { a.setChecked ( true ) ; mLogPanel.setCurrentFilterLogLevel ( ( i + 2 ) ) ; } else { a.setChecked ( false ) ; } } }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { for ( int k = 0 ; k < ( mLogLevelActions.length ) ; k ++ ) { com.android.ddmuilib.actions.ToolItemAction a = mLogLevelActions [ k ] ; if ( a == newAction ) { a.setChecked ( true ) ; mLogPanel.setCurrentFilterLogLevel ( ( k + 2 ) ) ; } else { a.setChecked ( false ) ; } } }
Source:
protected boolean start ( ) { android.util.Log.e ( com.android.bluetooth.mapclient.MapClientService.TAG , "start()" ) ; com.android.bluetooth.mapclient.MapClientService.setService ( this ) ; if ( ( mMnsServer ) == null ) { mMnsServer = com.android.bluetooth.mapclient.MapUtils.newMnsServiceInstance ( this ) ; } mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_SDP_RECORD ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; registerReceiver ( mMapReceiver , filter ) ; removeUncleanAccounts ( ) ; return true ; }

Target:
protected boolean start ( ) { android.util.Log.e ( com.android.bluetooth.mapclient.MapClientService.TAG , "start()" ) ; if ( ( mMnsServer ) == null ) { mMnsServer = com.android.bluetooth.mapclient.MapUtils.newMnsServiceInstance ( this ) ; } mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( BluetoothDevice.ACTION_SDP_RECORD ) ; filter.addAction ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ; registerReceiver ( mMapReceiver , filter ) ; removeUncleanAccounts ( ) ; com.android.bluetooth.mapclient.MapClientService.setMapClientService ( this ) ; return true ; }
Source:
private void setupFunctioningHardwareInterface ( ) { org.mockito.Mockito.when ( mHardware.initOffloadConfig ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.initOffloadControl ( org.mockito.Matchers.any ( OffloadHardwareInterface.ControlCallback.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.getForwardedStats ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( new com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats ( ) ) ; }

Target:
private void setupFunctioningHardwareInterface ( ) { org.mockito.Mockito.when ( mHardware.initOffloadConfig ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.initOffloadControl ( mControlCallbackCaptor.capture ( ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.getForwardedStats ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( new com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats ( ) ) ; }
Source:
private android.hardware.cts.helpers.sensorverification.EventOrderingVerification getVerification ( long ... timestamps ) { android.hardware.cts.helpers.sensorverification.EventOrderingVerification verification = new android.hardware.cts.helpers.sensorverification.EventOrderingVerification ( ) ; for ( long timestamp : timestamps ) { verification.addSensorEvent ( new android.hardware.cts.helpers.TestSensorEvent ( null , timestamp , 0 , null ) ) ; } return verification ; }

Target:
private static android.hardware.cts.helpers.sensorverification.EventOrderingVerification getVerification ( long ... timestamps ) { java.util.Collection < android.hardware.cts.helpers.TestSensorEvent > events = new java.util.ArrayList < > ( timestamps.length ) ; for ( long timestamp : timestamps ) { events.add ( new android.hardware.cts.helpers.TestSensorEvent ( null , timestamp , 0 , null ) ) ; } android.hardware.cts.helpers.sensorverification.EventOrderingVerification verification = new android.hardware.cts.helpers.sensorverification.EventOrderingVerification ( ) ; verification.addSensorEvents ( events ) ; return verification ; }