auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; setActivityInitialTouchMode ( false ) ; mActivity = getActivity ( ) ; com.example.android.rs.blasbenchmark.BlasTestRunner mRunner = ( ( com.example.android.rs.blasbenchmark.BlasTestRunner ) ( getInstrumentation ( ) ) ) ; mIteration = mRunner.mIteration ; assertTrue ( "please enter a valid iteration value" , ( ( mIteration ) > 0 ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; prepareTest ( ) ; setActivityInitialTouchMode ( false ) ; }
Source:
public void testNewInstanceString_ByteArrayIntIntCharsetConstructor ( ) { runTestNewInstanceString ( "([BIILjava/nio/charset/Charset;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value charsetValue = getStaticFieldValue ( debuggeeClassId , "CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; constructorArguments.add ( charsetValue ) ; } } ) ; }

Target:
public void testNewInstanceString_ByteArrayCharsetConstructor ( ) { runTestNewInstanceString ( "([BLjava/nio/charset/Charset;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value charsetValue = getStaticFieldValue ( debuggeeClassId , "CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( charsetValue ) ; } } ) ; }
Source:
void clear ( ) { if ( ( count ) != 0 ) { lock ( ) ; try { java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > [ ] tab = table ; for ( int i = 0 ; i < ( tab.length ) ; i ++ ) tab [ i ] = null ; ++ ( modCount ) ; count = 0 ; } finally { unlock ( ) ; } } }

Target:
final void clear ( ) { lock ( ) ; try { java.util.concurrent.ConcurrentHashMap.HashEntry < K , V > [ ] tab = table ; for ( int i = 0 ; i < ( tab.length ) ; i ++ ) java.util.concurrent.ConcurrentHashMap.setEntryAt ( tab , i , null ) ; ++ ( modCount ) ; count = 0 ; } finally { unlock ( ) ; } }
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 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 [ ] { "192.0.2.0/24" , "2001:db8::/32" } , mPackageName , "" ) ; checkTrafficOnVpn ( ) ; }
Source:
public void testHARMONY5323 ( ) { java.lang.Object [ ] messageArgs = new java.lang.Object [ 11 ] ; for ( int i = 0 ; i < ( messageArgs.length ) ; i ++ ) messageArgs [ i ] = "dumb" + i ; java.lang.String res = java.text.MessageFormat.format ( "bgcolor=\"{10}\"" , messageArgs ) ; assertEquals ( res , "bgcolor=\"dumb10\"" ) ; }

Target:
public void test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition ( ) { new org.apache.harmony.tests.java.text.Support_MessageFormat ( "test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition" ) . t_format_with_FieldPosition ( ) ; java.lang.String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s}." ; java.text.MessageFormat format = new java.text.MessageFormat ( pattern , java.util.Locale.US ) ; java.lang.Object [ ] objects = new java.lang.Object [ ] { "" , new java.lang.Integer ( 3 ) , 8 , "" } ; try { format.format ( objects , new java.lang.StringBuffer ( ) , new java.text.FieldPosition ( java.text.DateFormat.Field.AM_PM ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > findSync ( int sync_handle ) { java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > entry = null ; for ( java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > e : mSyncs.entrySet ( ) ) { if ( ( e.getValue ( ) . id ) == sync_handle ) { entry = e ; break ; } } return entry ; }

Target:
java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > findSync ( int syncHandle ) { java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > entry = null ; for ( java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.PeriodicScanManager.SyncInfo > e : mSyncs.entrySet ( ) ) { if ( ( e.getValue ( ) . id ) == syncHandle ) { entry = e ; break ; } } return entry ; }
Source:
public final java.lang.Class < ? > varType ( ) { java.lang.invoke.MethodType typeSet = accessModeType ( java.lang.invoke.VarHandle.AccessMode.SET ) ; return typeSet.parameterType ( ( ( typeSet.parameterCount ( ) ) - 1 ) ) ; }

Target:
public final java.lang.invoke.MethodType accessModeType ( java.lang.invoke.VarHandle.AccessMode accessMode ) { switch ( coordinateTypes.size ( ) ) { case 0 : return accessMode.at.accessModeType ( null , varType ) ; case 1 : return accessMode.at.accessModeType ( coordinateTypes.get ( 0 ) , varType ) ; case 2 : return accessMode.at.accessModeType ( coordinateTypes.get ( 0 ) , varType , coordinateTypes.get ( 1 ) ) ; default : throw new java.lang.InternalError ( ( "bad coordinateTypes: " + ( coordinateTypes ) ) ) ; } }
Source:
private void updateUnreadCount ( java.util.List < com.android.ddmlib.logcat.LogCatMessage > receivedMessages ) { for ( int i = 0 ; i < ( mLogCatFilters.size ( ) ) ; i ++ ) { if ( i == ( mCurrentSelectedFilterIndex ) ) { continue ; } mLogCatFilters.get ( i ) . updateUnreadCount ( receivedMessages ) ; } }

Target:
private void updateUnreadCount ( java.util.List < com.android.ddmlib.logcat.LogCatMessage > receivedMessages ) { for ( int i = 0 ; i < ( mLogCatFilters.size ( ) ) ; i ++ ) { if ( i == ( mCurrentSelectedFilterIndex ) ) { continue ; } com.android.ddmlib.logcat.LogCatFilter f = mLogCatFilters.get ( i ) ; com.android.ddmuilib.logcat.LogCatFilterData fd = mLogCatFilterData.get ( f ) ; fd.updateUnreadCount ( receivedMessages ) ; } }
Source:
public void testHasReturnType ( ) throws java.lang.Exception { assertTrue ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "(Landroid/app/Fragment;)Landroid/app/FragmentTransaction;" ) ) ; assertTrue ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()Landroid/app/FragmentTransaction;" ) ) ; assertFalse ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()Landroid/app/FragmentTransactions;" ) ) ; assertFalse ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()Landroid/app/FragmentTransactions" ) ) ; assertFalse ( com.android.tools.lint.checks.CleanupDetector.hasReturnType ( "android/app/FragmentTransaction" , "()android/app/FragmentTransaction;" ) ) ; }

Target:
public void testCommit ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "src/test/pkg/CommitTest.java:25: Warning: This transaction should be completed with a commit() call [CommitTransaction]\n" + " getFragmentManager().beginTransaction(); // Missing commit\n" ) + " ~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/CommitTest.java:30: Warning: This transaction should be completed with a commit() call [CommitTransaction]\n" ) + " FragmentTransaction transaction2 = getFragmentManager().beginTransaction(); // Missing commit\n" ) + " ~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/CommitTest.java:39: Warning: This transaction should be completed with a commit() call [CommitTransaction]\n" ) + " getFragmentManager().beginTransaction(); // Missing commit\n" ) + " ~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/CommitTest.java:65: Warning: This transaction should be completed with a commit() call [CommitTransaction]\n" ) + " getSupportFragmentManager().beginTransaction();\n" ) + " ~~~~~~~~~~~~~~~~\n" ) + "0 errors, 4 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk4.xml=>AndroidManifest.xml" , "project.properties19=>project.properties" , "bytecode/CommitTest.java.txt=>src/test/pkg/CommitTest.java" , "bytecode/CommitTest.class.data=>bin/classes/test/pkg/CommitTest.class" , "appcompat/Fragment.java.txt=>src/android/support/v4/app/Fragment.java" , "appcompat/DialogFragment.java.txt=>src/android/support/v4/app/DialogFragment.java" , "appcompat/FragmentTransaction.java.txt=>src/android/support/v4/app/FragmentTransaction.java" , "appcompat/FragmentManager.java.txt=>src/android/support/v4/app/FragmentManager.java" ) ) ; }
Source:
public void onNumberSet ( int limit ) { mSmsRecycler.setMessageLimit ( this , limit ) ; setSmsDisplayLimit ( ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final java.lang.String action = intent.getAction ( ) ; if ( TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals ( action ) ) { java.lang.String stateExtra = intent.getStringExtra ( IccCardConstants.INTENT_KEY_ICC_STATE ) ; if ( ( stateExtra != null ) && ( IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals ( stateExtra ) ) ) { android.preference.PreferenceCategory smsCategory = ( ( android.preference.PreferenceCategory ) ( findPreference ( "pref_key_sms_settings" ) ) ) ; if ( smsCategory != null ) { smsCategory.removePreference ( mManageSimPref ) ; } } } }
Source:
public void verifyModifyRetrievedConfig ( ) 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 ) ; android.net.wifi.hotspot2.PasspointConfiguration retrievedConfig = mProvider.getConfig ( ) ; retrievedConfig.homeSp.fqdn = "test2" ; verifyInstalledConfig ( retrievedConfig , false ) ; }

Target:
public void verifyModifyRetrievedConfig ( ) 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 ) ; android.net.wifi.hotspot2.PasspointConfiguration retrievedConfig = mProvider.getConfig ( ) ; retrievedConfig.homeSp.fqdn = "test2" ; verifyInstalledConfig ( retrievedConfig , false ) ; }
Source:
protected void runTest ( ) throws java.lang.Throwable { try { switch ( testType ) { case CHECK : runTasksOn ( BaseTest.FOLDER_TEST_REGULAR , projectName , gradleVersion , "clean" , "connectedCheck" ) ; break ; case CHECK_AND_REPORT : runTasksOn ( BaseTest.FOLDER_TEST_REGULAR , projectName , gradleVersion , "clean" , "connectedCheck" , "mergeAndroidReports" ) ; break ; case INSTALL : runTasksOn ( BaseTest.FOLDER_TEST_REGULAR , projectName , gradleVersion , "clean" , "installDebug" , "uninstallAll" ) ; break ; } } finally { } }

Target:
protected void runTest ( ) throws java.lang.Throwable { try { switch ( testType ) { case CHECK : runTasksOn ( testFolder , projectName , gradleVersion , "androidDependencies" , "signingReport" ) ; runTasksOn ( testFolder , projectName , gradleVersion , "clean" , "connectedCheck" ) ; break ; case CHECK_AND_REPORT : runTasksOn ( testFolder , projectName , gradleVersion , "clean" , "connectedCheck" , "mergeAndroidReports" ) ; break ; case INSTALL : runTasksOn ( testFolder , projectName , gradleVersion , "clean" , "installDebug" , "uninstallAll" ) ; break ; } } finally { } }
Source:
public static long $noinline$returnLong ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 400000 ; ++ i ) { } while ( ! ( Main.isInOsrCode ( "$noinline$returnLong" ) ) ) { } java.lang.System.out.println ( i ) ; return - 281474976706287L ; }

Target:
public static long $noinline$returnLong ( ) { boolean interpreting = Main.isInInterpreter ( "$noinline$returnLong" ) ; int i = 0 ; for ( ; i < 400000 ; ++ i ) { } if ( interpreting ) { while ( ! ( Main.isInOsrCode ( "$noinline$returnLong" ) ) ) { } } java.lang.System.out.println ( i ) ; return - 281474976706287L ; }
Source:
public void closePort ( android.os.IBinder token ) { synchronized ( mPortClients ) { android.media.midi.MidiDeviceServer.PortClient client = mPortClients.remove ( token ) ; if ( client != null ) { client.close ( ) ; } } }

Target:
public void onReceiverFailure ( android.media.midi.MidiReceiver receiver , java.io.IOException failure ) { android.util.Log.e ( android.media.midi.MidiDeviceServer.TAG , "MidiInputPort failed to send data" , failure ) ; android.media.midi.MidiDeviceServer.PortClient client = null ; synchronized ( mInputPortClients ) { client = mInputPortClients.remove ( receiver ) ; } if ( client != null ) { client.close ( ) ; } }
Source:
public void testGetInputStream ( ) throws java.io.IOException { java.lang.String resourceName = "resources/" + "test.rtf" ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; assertNotNull ( url ) ; java.net.URL anchorUrl = new java.net.URL ( url , "#anchor" ) ; assertNotNull ( ( "Cannot find test resource " + resourceName ) , anchorUrl ) ; libcore.net.url.FileURLConnection conn = new libcore.net.url.FileURLConnection ( anchorUrl ) ; assertNotNull ( conn.getInputStream ( ) ) ; java.lang.String localURLString = "file://localhost/" + ( url.getFile ( ) ) ; java.net.URL localURL = new java.net.URL ( localURLString ) ; conn = new libcore.net.url.FileURLConnection ( localURL ) ; assertNotNull ( conn.getInputStream ( ) ) ; assertEquals ( "file" , conn.getURL ( ) . getProtocol ( ) ) ; }

Target:
public void testGetInputStream_localHost ( ) throws java.io.IOException { java.net.URL url = createTempFileWithContent ( org.apache.harmony.tests.internal.net.www.protocol.file.FileURLConnectionTest.RESOURCE_NAME ) ; java.lang.String localURLString = "file://localhost/" + ( url.getFile ( ) ) ; java.net.URL localURL = new java.net.URL ( localURLString ) ; libcore.net.url.FileURLConnection conn = new libcore.net.url.FileURLConnection ( localURL ) ; assertNotNull ( conn.getInputStream ( ) ) ; assertEquals ( "file" , conn.getURL ( ) . getProtocol ( ) ) ; }
Source:
public boolean hasExpired ( ) { if ( ( maxAge ) == ( - 1L ) ) { return false ; } boolean expired = false ; if ( ( maxAge ) <= 0L ) { expired = true ; } return expired ; }

Target:
public boolean hasExpired ( ) { if ( ( maxAge ) == ( - 1L ) ) { return false ; } if ( ( maxAge ) <= 0L ) { return true ; } long cookieAgeSeconds = ( ( java.lang.System.currentTimeMillis ( ) ) - ( maxAgeBaseTimeMillis ) ) / 1000 ; if ( cookieAgeSeconds > ( maxAge ) ) { return true ; } return false ; }
Source:
public static int foo ( int x , int y ) { int sum1 = x + y ; int sum2 = y + x ; return sum1 + sum2 ; }

Target:
public static int foo ( int x , int y ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Smali" ) ; java.lang.reflect.Method m = c.getMethod ( "foo" , int . class , int . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , x , y ) ) ) ; } catch ( java.lang.Throwable t ) { throw new java.lang.RuntimeException ( t ) ; } }
Source:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder getResourceFolder ( org.eclipse.core.resources.IFolder folder ) { for ( java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > list : mFolderMap.values ( ) ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder resFolder : list ) { com.android.ide.eclipse.adt.io.IFolderWrapper wrapper = ( ( com.android.ide.eclipse.adt.io.IFolderWrapper ) ( resFolder.getFolder ( ) ) ) ; if ( wrapper.getIFolder ( ) . equals ( folder ) ) { return resFolder ; } } } return null ; }

Target:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder getResourceFolder ( com.android.io.IAbstractFolder folder ) { for ( java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > list : mFolderMap.values ( ) ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder resFolder : list ) { com.android.io.IAbstractFolder wrapper = resFolder.getFolder ( ) ; if ( wrapper.equals ( folder ) ) { return resFolder ; } } } return null ; }
Source:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( android.bluetooth.BluetoothInputDevice.DBG ) android.util.Log.d ( android.bluetooth.BluetoothInputDevice.TAG , "Proxy object connected" ) ; mService = IBluetoothInputDevice.Stub.asInterface ( android.os.Binder.allowBlocking ( service ) ) ; if ( ( mServiceListener ) != null ) { mServiceListener.onServiceConnected ( BluetoothProfile.INPUT_DEVICE , this ) ; } }

Target:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( android.bluetooth.BluetoothHidHost.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHidHost.TAG , "Proxy object connected" ) ; mService = IBluetoothHidHost.Stub.asInterface ( android.os.Binder.allowBlocking ( service ) ) ; if ( ( mServiceListener ) != null ) { mServiceListener.onServiceConnected ( BluetoothProfile.HID_HOST , this ) ; } }
Source:
public android.hardware.cts.helpers.TestSensorEvent [ ] collectEvents ( int eventCount ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return null ; } try { registerListener ( ) ; return getEvents ( eventCount ) ; } finally { unregisterListener ( ) ; } }

Target:
public void runSensor ( android.hardware.cts.helpers.TestSensorEventListener listener , long duration , java.util.concurrent.TimeUnit timeUnit ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } try { registerListener ( listener ) ; waitForEvents ( duration , timeUnit ) ; } finally { unregisterListener ( ) ; } }
Source:
public void tesNoSplitDelegateLast ( ) { android.content.pm.ApplicationInfo ai = createMockApplicationInfo ( com.android.server.pm.dex.DexoptUtilsTest.DELEGATE_LAST_CLASS_LOADER_NAME , false , false ) ; java.lang.String [ ] sharedLibrary = new java.lang.String [ ] { "a.dex" , "b.dex" } ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( ai , sharedLibrary ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[a.dex:b.dex]" , contexts [ 0 ] ) ; }

Target:
public void tesNoSplitDelegateLastNoSharedLibraries ( ) { com.android.server.pm.dex.DexoptUtilsTest.TestData data = createMockApplicationInfo ( com.android.server.pm.dex.DexoptUtilsTest.DELEGATE_LAST_CLASS_LOADER_NAME , false , false ) ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( data.info , null , data.pathsWithCode ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[]" , contexts [ 0 ] ) ; }
Source:
protected void validate ( ) { }

Target:
private com.android.builder.VariantConfiguration getVariantWithManifestVersion ( final java.lang.String versionName ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override public java.lang.String getVersionNameFromManifest ( ) { return versionName ; } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
protected void engineUpdate ( byte [ ] input , int offset , int len ) { final org.conscrypt.OpenSSLDigestContext ctxLocal = ctx ; if ( signing ) { org.conscrypt.NativeCrypto.EVP_SignUpdate ( ctxLocal , input , offset , len ) ; } else { org.conscrypt.NativeCrypto.EVP_VerifyUpdate ( ctxLocal , input , offset , len ) ; } }

Target:
protected void engineUpdate ( byte [ ] input , int offset , int len ) { final org.conscrypt.NativeRef.EVP_MD_CTX ctxLocal = ctx ; if ( signing ) { org.conscrypt.NativeCrypto.EVP_SignUpdate ( ctxLocal , input , offset , len ) ; } else { org.conscrypt.NativeCrypto.EVP_VerifyUpdate ( ctxLocal , input , offset , len ) ; } }
Source:
private static boolean isValidApnType ( java.lang.String types , java.lang.String requestType ) { if ( android.text.TextUtils.isEmpty ( types ) ) { return true ; } for ( java.lang.String t : types.split ( "," ) ) { if ( ( t.equals ( requestType ) ) || ( t.equals ( Phone.APN_TYPE_ALL ) ) ) { return true ; } } return false ; }

Target:
private static boolean isValidApnType ( java.lang.String types , java.lang.String requestType ) { if ( android.text.TextUtils.isEmpty ( types ) ) { return true ; } for ( java.lang.String t : types.split ( "," ) ) { if ( ( t.equals ( requestType ) ) || ( t.equals ( PhoneConstants.APN_TYPE_ALL ) ) ) { return true ; } } return false ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.nio.file.Path dumpDirectory = com.google.devtools.build.android.desugar.Desugar.createAndRegisterLambdaDumpDirectory ( ) ; com.google.devtools.build.android.desugar.Desugar.Options options = com.google.devtools.build.android.desugar.Desugar.parseCommandLineOptions ( args ) ; if ( options.verbose ) { java.lang.System.out.printf ( "Lambda classes will be written under %s%n" , dumpDirectory ) ; } new com.google.devtools.build.android.desugar.Desugar ( options , dumpDirectory ) . desugar ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.nio.file.Path dumpDirectory = com.google.devtools.build.android.desugar.Desugar.createAndRegisterLambdaDumpDirectory ( ) ; com.google.devtools.build.android.desugar.Desugar.verifyLambdaDumpDirectoryRegistered ( dumpDirectory ) ; com.google.devtools.build.android.desugar.Desugar.Options options = com.google.devtools.build.android.desugar.Desugar.parseCommandLineOptions ( args ) ; if ( options.verbose ) { java.lang.System.out.printf ( "Lambda classes will be written under %s%n" , dumpDirectory ) ; } new com.google.devtools.build.android.desugar.Desugar ( options , dumpDirectory ) . desugar ( ) ; }
Source:
void showGlobalActionsDialog ( ) { if ( ( mGlobalActions ) == null ) { mGlobalActions = new com.android.internal.policy.impl.GlobalActions ( mContext , mWindowManagerFuncs ) ; } final boolean keyguardShowing = keyguardIsShowingTq ( ) ; mGlobalActions.showDialog ( keyguardShowing , isDeviceProvisioned ( ) ) ; if ( keyguardShowing ) { mKeyguardMediator.pokeWakelock ( ) ; } }

Target:
void showGlobalActionsDialog ( ) { if ( ( mGlobalActions ) == null ) { mGlobalActions = new com.android.internal.policy.impl.GlobalActions ( mContext , mWindowManagerFuncs ) ; } final boolean keyguardShowing = keyguardIsShowingTq ( ) ; mGlobalActions.showDialog ( keyguardShowing , isDeviceProvisioned ( ) ) ; if ( keyguardShowing ) { mKeyguardMediator.userActivity ( ) ; } }
Source:
public void onClick ( android.view.View view ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.deleteButtonListener" , "delete voicemailUri %s" , voicemailUri.toString ( ) ) ; }

Target:
public void onClick ( android.view.View view ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.deleteButtonListener" , "delete voicemailUri %s" , voicemailUri.toString ( ) ) ; android.content.ContentValues contentValues = new android.content.ContentValues ( ) ; contentValues.put ( "has_content" , 0 ) ; try { getContext ( ) . getContentResolver ( ) . update ( voicemailUri , contentValues , "type = 4" , null ) ; } catch ( java.lang.Exception e ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.deleteButtonListener" , "update has content of voicemailUri %s caused an error: %s" , voicemailUri.toString ( ) , e.toString ( ) ) ; } }
Source:
private static java.util.Locale chooseBestFallback ( java.util.Locale target , java.util.List < java.util.Locale > candidates ) { if ( candidates.isEmpty ( ) ) { return null ; } java.util.Locale fallback = target ; while ( ( fallback = com.android.internal.telephony.MccTable.FALLBACKS.get ( fallback ) ) != null ) { if ( candidates.contains ( fallback ) ) { return fallback ; } } return candidates.get ( 0 ) ; }

Target:
private static java.util.Locale lookupFallback ( java.util.Locale target , java.util.List < java.util.Locale > candidates ) { java.util.Locale fallback = target ; while ( ( fallback = com.android.internal.telephony.MccTable.FALLBACKS.get ( fallback ) ) != null ) { if ( candidates.contains ( fallback ) ) { return fallback ; } } return null ; }
Source:
public void onActivityCreated ( android.os.Bundle savedInstanseState ) { super . onActivityCreated ( savedInstanseState ) ; final android.app.Activity activity = getActivity ( ) ; mTimezoneSortedAdapter = com.android.settings.ZonePicker.constructTimezoneAdapter ( activity , false ) ; mAlphabeticalAdapter = com.android.settings.ZonePicker.constructTimezoneAdapter ( activity , true ) ; setSorting ( true ) ; setHasOptionsMenu ( true ) ; }

Target:
public void onActivityCreated ( android.os.Bundle savedInstanceState ) { super . onActivityCreated ( savedInstanceState ) ; final android.app.Activity activity = getActivity ( ) ; mTimezoneSortedAdapter = com.android.settings.ZonePicker.constructTimezoneAdapter ( activity , false ) ; mAlphabeticalAdapter = com.android.settings.ZonePicker.constructTimezoneAdapter ( activity , true ) ; setSorting ( true ) ; setHasOptionsMenu ( true ) ; }
Source:
public void testMaxSdkVersion ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "maxSdkVersion" ) ; runGradleTasks ( sdkDir , ndkDir , BasePlugin.GRADLE_TEST_VERSION , project , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "assembleDebug" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f1-debug.apk" ) ) , "21" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f2-debug.apk" ) ) , "19" ) ; }

Target:
public void testMaxSdkVersion ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "maxSdkVersion" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "assembleDebug" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f1-debug.apk" ) ) , "21" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f2-debug.apk" ) ) , "19" ) ; }
Source:
private void enforcePrivilegedPermissionOrCarrierPrivilege ( com.android.internal.telephony.Phone phone ) { int permissionResult = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE ) ; if ( permissionResult == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return ; } log ( "No read privileged phone permission, check carrier privilege next." ) ; com.android.internal.telephony.uicc.UiccCard uiccCard = phone.getUiccCard ( ) ; if ( uiccCard == null ) { throw new java.lang.SecurityException ( "No Carrier Privilege: No UICC" ) ; } if ( ( uiccCard.getCarrierPrivilegeStatusForCurrentTransaction ( mContext.getPackageManager ( ) ) ) != ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ) { throw new java.lang.SecurityException ( "No Carrier Privilege." ) ; } }

Target:
private void enforcePrivilegedPermissionOrCarrierPrivilege ( int subId , java.lang.String message ) { int permissionResult = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE ) ; if ( permissionResult == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return ; } if ( com.android.internal.telephony.PhoneSubInfoController.VDBG ) log ( "No read privileged phone permission, check carrier privilege next." ) ; com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfCarrierPrivilege ( subId , message ) ; }
Source:
public void registerForNotification ( int clientIf , java.lang.String address , int srvcType , int srvcInstanceId , android.os.ParcelUuid srvcId , int charInstanceId , android.os.ParcelUuid charId , boolean enable ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.registerForNotification ( clientIf , address , srvcType , srvcInstanceId , srvcId.getUuid ( ) , charInstanceId , charId.getUuid ( ) , enable ) ; }

Target:
public void registerForNotification ( int clientIf , java.lang.String address , int handle , boolean enable ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.registerForNotification ( clientIf , address , handle , enable ) ; }
Source:
public void test2 ( ) { com.android.utils.HtmlBuilder builder = new com.android.utils.HtmlBuilder ( ) ; builder.add ( "Plain" ) . newline ( ) . addLink ( "mylink" , "runnable:0" ) . newline ( ) ; builder.beginList ( ) . listItem ( ) . add ( "item 1" ) . listItem ( ) . add ( "item 2" ) . endList ( ) ; assertEquals ( ( "Plain<BR/>\n" + ( ( ( ( "<A HREF=\"runnable:0\">mylink</A><BR/>\n" + "<DL>\n" ) + "<DD>-&NBSP;item 1\n" ) + "<DD>-&NBSP;item 2\n" ) + "</DL>" ) ) , builder.getHtml ( ) ) ; }

Target:
public void testAddList ( ) { com.android.utils.HtmlBuilder builder = new com.android.utils.HtmlBuilder ( ) ; builder.add ( "Plain" ) . newline ( ) ; builder.beginList ( ) . listItem ( ) . add ( "item 1" ) . listItem ( ) . add ( "item 2" ) . endList ( ) ; assertEquals ( ( "Plain<BR/>\n" + ( ( ( "<DL>\n" + "<DD>-&NBSP;item 1\n" ) + "<DD>-&NBSP;item 2\n" ) + "</DL>" ) ) , builder.getHtml ( ) ) ; }
Source:
public void onWorkCompleted ( android.app.job.JobWorkItem completedWorkItem ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.LogUtil.i ( "TranscriptionService.Callback.onWorkCompleted" , completedWorkItem.toString ( ) ) ; jobParameters.completeWork ( completedWorkItem ) ; checkForWork ( ) ; }

Target:
public void onWorkCompleted ( android.app.job.JobWorkItem completedWorkItem ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.LogUtil.i ( "TranscriptionService.Callback.onWorkCompleted" , completedWorkItem.toString ( ) ) ; activeTask = null ; if ( stopped ) { com.android.dialer.common.LogUtil.i ( "TranscriptionService.Callback.onWorkCompleted" , "stopped" ) ; } else { jobParameters.completeWork ( completedWorkItem ) ; checkForWork ( ) ; } }
Source:
private static void assertCdmaDeviceId ( java.lang.String deviceId ) { if ( ( deviceId.length ( ) ) == 14 ) { android.telephony.cts.TelephonyManagerTest.assertMeidFormat ( deviceId ) ; } else if ( ( deviceId.length ( ) ) == 8 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalEsnFormat ( deviceId ) ; } else { fail ( "device id on CDMA must be 14-digit hex MEID or 8-digit hex ESN." ) ; } }

Target:
private static void assertCdmaDeviceId ( java.lang.String deviceId ) { if ( ( deviceId.length ( ) ) == 14 ) { android.telephony.cts.TelephonyManagerTest.assertMeidFormat ( deviceId ) ; } else if ( ( deviceId.length ( ) ) == 8 ) { android.telephony.cts.TelephonyManagerTest.assertHexadecimalEsnFormat ( deviceId ) ; } else { org.junit.Assert.fail ( "device id on CDMA must be 14-digit hex MEID or 8-digit hex ESN." ) ; } }
Source:
public java.util.Locale.Builder setRegion ( java.lang.String region ) { if ( ( region == null ) || ( region.isEmpty ( ) ) ) { this . region = "" ; return this ; } final java.lang.String uppercaseRegion = region.toUpperCase ( java.util.Locale.ROOT ) ; if ( ( ! ( java.util.Locale.isValidBcp47Alpha ( uppercaseRegion , 2 , 2 ) ) ) && ( ! ( java.util.Locale.isUnM49AreaCode ( uppercaseRegion ) ) ) ) { throw new java.util.IllformedLocaleException ( ( "Invalid region: " + region ) ) ; } this . region = uppercaseRegion ; return this ; }

Target:
public java.util.Locale.Builder setRegion ( java.lang.String region ) { this . region = java.util.Locale.Builder.normalizeAndValidateRegion ( region ) ; return this ; }
Source:
public void testGet2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.add ( "asdad" ) ; c.get ( 100 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testGet2_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.get ( list.size ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void testToPackage ( ) { final java.lang.String pkg = "pkg1" ; android.support.test.espresso.intent.ResolvedIntent intent = new android.support.test.espresso.intent.matcher.IntentMatchersTest.FakeResolvedIntent ( pkg ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.toPackage ( pkg ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.toPackage ( "notpkg1" ) . matches ( intent ) ) ; try { android.support.test.espresso.intent.matcher.IntentMatchers.toPackage ( "whatever" ) . matches ( new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ) ; fail ( "Expected previous call to fail." ) ; } catch ( java.lang.RuntimeException expected ) { } }

Target:
public void toPackageTesting ( ) { final java.lang.String pkg = "pkg1" ; android.support.test.espresso.intent.ResolvedIntent intent = new android.support.test.espresso.intent.matcher.IntentMatchersTest.FakeResolvedIntent ( pkg ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.toPackage ( pkg ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.toPackage ( "notpkg1" ) . matches ( intent ) ) ; expectedException.expect ( java.lang.RuntimeException.class ) ; android.support.test.espresso.intent.matcher.IntentMatchers.toPackage ( "whatever" ) . matches ( new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ) ; }
Source:
public static java.lang.String getFullCompilerFilter ( ) { java.lang.String value = android.os.SystemProperties.get ( "dalvik.vm.dex2oat-filter" ) ; if ( ( value == null ) || ( value.isEmpty ( ) ) ) { return "speed" ; } if ( ( ! ( dalvik.system.DexFile.isValidCompilerFilter ( value ) ) ) || ( dalvik.system.DexFile.isProfileGuidedCompilerFilter ( value ) ) ) { return "speed" ; } return value ; }

Target:
public static java.lang.String getDefaultCompilerFilter ( ) { java.lang.String value = android.os.SystemProperties.get ( "dalvik.vm.dex2oat-filter" ) ; if ( ( value == null ) || ( value.isEmpty ( ) ) ) { return "speed" ; } if ( ( ! ( dalvik.system.DexFile.isValidCompilerFilter ( value ) ) ) || ( dalvik.system.DexFile.isProfileGuidedCompilerFilter ( value ) ) ) { return "speed" ; } return value ; }
Source:
private void testChargingConstraintExecutes_onCharging ( ) { mTestEnvironment.setUp ( ) ; android.app.job.JobInfo delayConstraintAndUnexpiredDeadline = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ON_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mTestEnvironment.setExpectedExecutions ( 1 ) ; mJobScheduler.schedule ( delayConstraintAndUnexpiredDeadline ) ; sendBroadcast ( com.android.cts.verifier.jobscheduler.EXPEDITE_STABLE_CHARGING ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitExecution ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ON_CHARGING_JOB_ID , testPassed ) ) ; }

Target:
public void startTestImpl ( ) { android.os.BatteryManager bm = ( ( android.os.BatteryManager ) ( getSystemService ( com.android.cts.verifier.jobscheduler.BATTERY_SERVICE ) ) ) ; if ( bm.isCharging ( ) ) { new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.TestDevicePluggedInConstraint ( ) . execute ( ) ; } else if ( isDevicePluggedIn ( ) ) { mTestState = com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.STATE_WAITING_TO_START_ON_CHARGING_TEST ; showWaitingForStableChargingViews ( ) ; } }
Source:
public static int getSocketLocalPort ( java.io.FileDescriptor fd ) { try { java.net.SocketAddress sa = Libcore.os.getsockname ( fd ) ; java.net.InetSocketAddress isa = ( ( java.net.InetSocketAddress ) ( sa ) ) ; return isa.getPort ( ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } }

Target:
public static int getSocketLocalPort ( java.io.FileDescriptor fd ) throws java.net.SocketException { try { java.net.SocketAddress sa = Libcore.os.getsockname ( fd ) ; java.net.InetSocketAddress isa = ( ( java.net.InetSocketAddress ) ( sa ) ) ; return isa.getPort ( ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
private void keyPressed ( int keyCode ) { mDigits.performHapticFeedback ( HapticFeedbackConstants.VIRTUAL_KEY ) ; android.view.KeyEvent event = new android.view.KeyEvent ( android.view.KeyEvent.ACTION_DOWN , keyCode ) ; mDigits.onKeyDown ( keyCode , event ) ; }

Target:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_CALL : { if ( android.text.TextUtils.isEmpty ( mDigits.getText ( ) . toString ( ) ) ) { finish ( ) ; } else { placeCall ( ) ; } return true ; } } return super . onKeyDown ( keyCode , event ) ; }
Source:
public void iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String pathID , android.os.Message response ) { mCi.iccIO ( command , fileID , pathID , p1 , p2 , p3 , null , null , obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_SIM_IO_DONE , response ) ) ; }

Target:
public void iccOpenLogicalChannel ( java.lang.String aid , int p2 , android.os.Message response ) { loglocal ( ( ( ( ( ( ( ( "iccOpenLogicalChannel: " + aid ) + " , " ) + p2 ) + " by pid:" ) + ( android.os.Binder.getCallingPid ( ) ) ) + " uid:" ) + ( android.os.Binder.getCallingUid ( ) ) ) ) ; mCi.iccOpenLogicalChannel ( aid , p2 , mHandler.obtainMessage ( com.android.internal.telephony.uicc.UiccProfile.EVENT_OPEN_LOGICAL_CHANNEL_DONE , response ) ) ; }
Source:
public void remove ( ) { backingIterator.remove ( ) ; }

Target:
protected java.util.Set < java.util.Map.Entry < K , V > > createEntrySet ( ) { return new com.google.common.collect.Maps.EntrySet < K , V > ( ) { @ java.lang.Override java.util.Map < K , V > map ( ) { return com.google.common.collect.Maps.AsMapView.this ; } @ java.lang.Override public java.util.Iterator < java.util.Map.Entry < K , V > > iterator ( ) { return com.google.common.collect.Maps.asMapEntryIterator ( backingSet ( ) , function ) ; } } ; }
Source:
public void testInstallWithMissingBundleVersionFile ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createTzDataBundleWithoutFormatVersionFile ( "2030a" ) ; assertFalse ( install ( tzData ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testBadSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TzDataBundleInstaller brokenSystemInstaller = new libcore.tzdata.update2.TzDataBundleInstaller ( "TzDataBundleInstallerTest" , doesNotExist , testInstallDir ) ; libcore.tzdata.update2.ConfigBundle tzData = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertFalse ( brokenSystemInstaller.install ( tzData.getBundleBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
protected com.android.jack.test.toolchain.JackBasedToolchain setSourceLevel ( @ javax.annotation.Nonnull java.util.List < java.lang.String > commandLine ) { super . setSourceLevel ( sourceLevel ) ; switch ( sourceLevel ) { case JAVA_6 : addProperty ( "jack.java.source.version" , "1.6" ) ; break ; case JAVA_7 : addProperty ( "jack.java.source.version" , "1.7" ) ; break ; case JAVA_8 : addProperty ( "jack.java.source.version" , "1.8" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( sourceLevel.toString ( ) ) ) + "'" ) ) ; } return this ; }

Target:
public com.android.jack.test.toolchain.JackCliToolchain setSourceLevel ( @ javax.annotation.Nonnull com.android.jack.test.toolchain.Toolchain.SourceLevel sourceLevel ) { super . setSourceLevel ( sourceLevel ) ; switch ( sourceLevel ) { case JAVA_6 : addProperty ( "jack.java.source.version" , "1.6" ) ; break ; case JAVA_7 : addProperty ( "jack.java.source.version" , "1.7" ) ; break ; case JAVA_8 : addProperty ( "jack.java.source.version" , "1.8" ) ; break ; default : throw new java.lang.AssertionError ( ( ( "Unkown level: '" + ( sourceLevel.toString ( ) ) ) + "'" ) ) ; } return this ; }
Source:
public static void main ( java.lang.String [ ] args ) { Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; Main.testEnvironment ( ) ; }
Source:
public void testUnsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle1 = libcore.tzdata.update2.TzDataBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION , "002" ) ; assertTrue ( installer.install ( bundle1.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; libcore.tzdata.update2.TimeZoneBundle bundle2 = libcore.tzdata.update2.TzDataBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.OLDER_RULES_VERSION , "001" ) ; assertFalse ( installer.install ( bundle2.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; }

Target:
public void testUnsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle1 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "002" ) ; assertTrue ( installer.install ( bundle1.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; libcore.tzdata.update2.TimeZoneBundle bundle2 = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.OLDER_RULES_VERSION , "001" ) ; assertFalse ( installer.install ( bundle2.getBytes ( ) ) ) ; assertBundleInstalled ( bundle1 ) ; }
Source:
public void switchToSubscription ( int subscriptionId , android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . switchToSubscription ( subscriptionId , mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void retainSubscriptionsForFactoryReset ( android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { getIEuiccController ( ) . retainSubscriptionsForFactoryReset ( callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( mMajor ) ; result = ( prime * result ) + ( mMinor ) ; result = ( prime * result ) + ( mMicro ) ; result = ( prime * result ) + ( mPreview ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( mMajor ) ; result = ( prime * result ) + ( mMinor ) ; result = ( prime * result ) + ( mMicro ) ; result = ( prime * result ) + ( mPreview ) ; result = ( prime * result ) + ( mPreviewType.hashCode ( ) ) ; return result ; }
Source:
public void matchProviderWithNoProvidersInstalled ( ) throws java.lang.Exception { java.util.List < android.util.Pair < com.android.server.wifi.hotspot2.PasspointProvider , com.android.server.wifi.hotspot2.PasspointMatch > > result = mManager.matchProvider ( createTestScanResult ( ) ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void matchProviderWithNoMatch ( ) throws java.lang.Exception { com.android.server.wifi.hotspot2.PasspointProvider provider = addTestProvider ( ) ; com.android.server.wifi.hotspot2.ANQPData entry = new com.android.server.wifi.hotspot2.ANQPData ( mClock , null ) ; org.mockito.Mockito.when ( mAnqpCache.getEntry ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_ANQP_KEY ) ) . thenReturn ( entry ) ; org.mockito.Mockito.when ( provider.match ( org.mockito.Mockito.anyMap ( ) ) ) . thenReturn ( PasspointMatch.None ) ; org.junit.Assert.assertNull ( mManager.matchProvider ( createTestScanResult ( ) ) ) ; }
Source:
public void copyFrom ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( float [ ] d ) { validateIsFloat32 ( ) ; copyFromUnchecked ( d , Element.DataType.FLOAT_32 , d.length ) ; }