auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void visitAnySwitchInstruction ( proguard.optimize.evaluation.Clazz clazz , proguard.optimize.evaluation.Method method , proguard.optimize.evaluation.CodeAttribute codeAttribute , int offset , proguard.optimize.evaluation.SwitchInstruction switchInstruction ) { replaceBranchInstruction ( clazz , offset , switchInstruction ) ; if ( ! ( codeAttributeEditor.isModified ( offset ) ) ) { replaceSwitchInstruction ( clazz , offset , switchInstruction ) ; } }

Target:
public void visitTableSwitchInstruction ( proguard.optimize.evaluation.Clazz clazz , proguard.optimize.evaluation.Method method , proguard.optimize.evaluation.CodeAttribute codeAttribute , int offset , proguard.optimize.evaluation.TableSwitchInstruction tableSwitchInstruction ) { replaceBranchInstruction ( clazz , offset , tableSwitchInstruction ) ; if ( ! ( codeAttributeEditor.isModified ( offset ) ) ) { replaceSimpleEnumSwitchInstruction ( clazz , codeAttribute , offset , tableSwitchInstruction ) ; if ( ! ( codeAttributeEditor.isModified ( offset ) ) ) { cleanUpSwitchInstruction ( clazz , offset , tableSwitchInstruction ) ; trimSwitchInstruction ( clazz , offset , tableSwitchInstruction ) ; } } }
Source:
private void updateOppLauncherComponentState ( boolean bluetoothDisallowed ) { final android.content.ComponentName oppLauncherComponent = new android.content.ComponentName ( "com.android.bluetooth" , "com.android.bluetooth.opp.BluetoothOppLauncherActivity" ) ; final int newState = ( bluetoothDisallowed ) ? android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED : android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT ; try { mContext.getPackageManager ( ) . setComponentEnabledSetting ( oppLauncherComponent , newState , 0 ) ; } catch ( java.lang.Exception e ) { } }

Target:
private void updateOppLauncherComponentState ( int userId , boolean bluetoothSharingDisallowed ) { final android.content.ComponentName oppLauncherComponent = new android.content.ComponentName ( "com.android.bluetooth" , "com.android.bluetooth.opp.BluetoothOppLauncherActivity" ) ; final int newState = ( bluetoothSharingDisallowed ) ? android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED : android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT ; try { final android.content.pm.IPackageManager imp = android.app.AppGlobals.getPackageManager ( ) ; imp.setComponentEnabledSetting ( oppLauncherComponent , newState , PackageManager.DONT_KILL_APP , userId ) ; } catch ( java.lang.Exception e ) { } }
Source:
public void testSensorStoppingInteraction ( ) throws java.lang.Throwable { android.content.Context context = this . getContext ( ) ; android.hardware.cts.helpers.SensorTestOperation tester = new android.hardware.cts.helpers.sensorTestOperations.VerifyEventOrderingOperation ( context , mSensorTypeTester , android.hardware.SensorManager.SENSOR_DELAY_NORMAL , 0 ) ; tester.start ( ) ; android.hardware.cts.helpers.SensorTestOperation testee = new android.hardware.cts.helpers.sensorTestOperations.VerifyEventOrderingOperation ( context , mSensorTypeTestee , android.hardware.SensorManager.SENSOR_DELAY_UI , 0 ) ; testee.start ( ) ; testee.waitForCompletion ( ) ; tester.waitForCompletion ( ) ; testee.execute ( ) ; }

Target:
public void testSensorStoppingInteraction ( ) throws java.lang.Throwable { android.content.Context context = this . getContext ( ) ; android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation tester = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( context , mSensorTypeTester , android.hardware.SensorManager.SENSOR_DELAY_NORMAL , 0 , 100 ) ; tester.verifyEventOrdering ( ) ; tester.start ( ) ; android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation testee = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( context , mSensorTypeTestee , android.hardware.SensorManager.SENSOR_DELAY_UI , 0 , 100 ) ; testee.verifyEventOrdering ( ) ; testee.start ( ) ; testee.waitForCompletion ( ) ; tester.waitForCompletion ( ) ; testee.execute ( ) ; }
Source:
boolean doBind ( ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.IBluetoothA2dp.class . getName ( ) ) ; android.content.ComponentName comp = intent.resolveSystemService ( mContext.getPackageManager ( ) , 0 ) ; intent.setComponent ( comp ) ; if ( ( comp == null ) || ( ! ( mContext.bindService ( intent , mConnection , 0 ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothA2dp.TAG , ( "Could not bind to Bluetooth A2DP Service with " + intent ) ) ; return false ; } return true ; }

Target:
boolean doBind ( ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.IBluetoothA2dp.class . getName ( ) ) ; android.content.ComponentName comp = intent.resolveSystemService ( mContext.getPackageManager ( ) , 0 ) ; intent.setComponent ( comp ) ; if ( ( comp == null ) || ( ! ( mContext.bindServiceAsUser ( intent , mConnection , 0 , android.os.Process.myUserHandle ( ) ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothA2dp.TAG , ( "Could not bind to Bluetooth A2DP Service with " + intent ) ) ; return false ; } return true ; }
Source:
public java.lang.Boolean ipSecCloseUdpEncapsulationSocket ( java.lang.String id ) { try { android.net.IpSecManager.UdpEncapsulationSocket udpEncapSocket = com.googlecode.android_scripting.facade.IpSecManagerFacade.mUdpEncapMap.get ( id ) ; udpEncapSocket.close ( ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.mUdpEncapMap.remove ( id ) ; return true ; } catch ( java.io.IOException e ) { com.googlecode.android_scripting.Log.e ( ( "IpSec: Failed to close udp encap socket " + ( e.toString ( ) ) ) ) ; } return false ; }

Target:
public java.lang.Boolean ipSecCloseUdpEncapsulationSocket ( java.lang.String id ) { try { android.net.IpSecManager.UdpEncapsulationSocket udpEncapSocket = com.googlecode.android_scripting.facade.IpSecManagerFacade.sUdpEncapHashMap.get ( id ) ; udpEncapSocket.close ( ) ; com.googlecode.android_scripting.facade.IpSecManagerFacade.sUdpEncapHashMap.remove ( id ) ; return true ; } catch ( java.io.IOException e ) { com.googlecode.android_scripting.Log.e ( ( "IpSec: Failed to close udp encap socket " + ( e.toString ( ) ) ) ) ; } return false ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Throwable { Main.testfindSpecial_invokeSuperBehaviour ( ) ; Main.testfindSpecial_invokeDirectBehaviour ( ) ; Main.testExceptionDetailMessages ( ) ; Main.testfindVirtual ( ) ; Main.testfindStatic ( ) ; Main.testUnreflects ( ) ; Main.testAsType ( ) ; Main.testConstructors ( ) ; Main.testStringConstructors ( ) ; Main.testReturnValueConversions ( ) ; Main.testVariableArity ( ) ; Main.testVariableArity_MethodHandles_bind ( ) ; Main.testRevealDirect ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Throwable { Main.testfindSpecial_invokeSuperBehaviour ( ) ; Main.testfindSpecial_invokeDirectBehaviour ( ) ; Main.testExceptionDetailMessages ( ) ; Main.testfindVirtual ( ) ; Main.testfindStatic ( ) ; Main.testUnreflects ( ) ; Main.testAsType ( ) ; Main.testConstructors ( ) ; Main.testStringConstructors ( ) ; Main.testReturnValueConversions ( ) ; Main.testVariableArity ( ) ; Main.testVariableArity_MethodHandles_bind ( ) ; Main.testRevealDirect ( ) ; Main.testReflectiveCalls ( ) ; }
Source:
public boolean isPermissionEnforced ( java.lang.String permission ) { final boolean enforcedDefault = isPermissionEnforcedDefault ( permission ) ; synchronized ( mPackages ) { return isPermissionEnforcedLocked ( permission , enforcedDefault ) ; } }

Target:
static boolean locationIsPrivileged ( java.io.File path ) { try { final java.lang.String privilegedAppDir = new java.io.File ( android.os.Environment.getRootDirectory ( ) , "priv-app" ) . getCanonicalPath ( ) ; return path.getCanonicalPath ( ) . startsWith ( privilegedAppDir ) ; } catch ( java.io.IOException e ) { android.util.Slog.e ( com.android.server.pm.PackageManagerService.TAG , ( "Unable to access code path " + path ) ) ; } return false ; }
Source:
private static java.io.File getNoConfigProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ) == null ) { java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsJar = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "processor" , ".jar" ) ; java.io.File processorsSrcDir = com.android.jack.annotation.processor.AnnotationProcessorTests.compileProcessorsToDir ( processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.makeZipFromDir ( processorsDir , processorsJar ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors = processorsJar ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ; }

Target:
private static java.io.File getNoConfigProcessors ( ) throws java.lang.Exception { java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsJar = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "processor" , ".jar" ) ; java.io.File processorsSrcDir = com.android.jack.annotation.processor.AnnotationProcessorTests.compileProcessorsToDir ( processorsDir , "com.android.jack.annotation.processor.sample.processors" ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.makeZipFromDir ( processorsDir , processorsJar ) ; return processorsJar ; }
Source:
public void dup_x2 ( ) { super . dup_x2 ( ) ; producerPop ( ) ; producerPop ( ) ; producerPop ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; producerPush ( ) ; }

Target:
public void dup_x2 ( ) { super . dup_x2 ( ) ; producerStack.pop ( ) ; producerStack.pop ( ) ; producerStack.pop ( ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; producerStack.push ( producerValue ) ; actualProducerStack.dup_x2 ( ) ; }
Source:
public void iccOpenLogicalChannelResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , int var2 , java.util.ArrayList < java.lang.Byte > var3 ) { }

Target:
public void iccOpenLogicalChannelResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , int channelId , java.util.ArrayList < java.lang.Byte > selectResponse ) { java.util.ArrayList < java.lang.Integer > arr = new java.util.ArrayList < > ( ) ; arr.add ( channelId ) ; for ( int i = 0 ; i < ( selectResponse.size ( ) ) ; i ++ ) { arr.add ( ( ( int ) ( selectResponse.get ( i ) ) ) ) ; } responseIntArrayList ( responseInfo , arr ) ; }
Source:
public android.telephony.ServiceState getServiceStateForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getServiceStateForSubscriber" ) ) ) { return null ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone == null ) { return null ; } return phone.getServiceState ( ) ; }

Target:
public android.telephony.ServiceState getServiceStateForSubscriber ( int subId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getServiceStateForSubscriber" ) ) ) { return null ; } final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone == null ) { return null ; } return phone.getServiceState ( ) ; }
Source:
public void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection ) { com.android.server.telecom.Log.startSession ( "CSW.aEC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "addExistingConnection %s %s" , callId , connection ) ; com.android.server.telecom.Call existingCall = mCallsManager.createCallForExistingConnection ( callId , connection ) ; mCallIdMapper.addCall ( existingCall , callId ) ; existingCall.setConnectionService ( this ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection ) { android.telecom.Log.startSession ( "CSW.aEC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "addExistingConnection %s %s" , callId , connection ) ; com.android.server.telecom.Call existingCall = mCallsManager.createCallForExistingConnection ( callId , connection ) ; mCallIdMapper.addCall ( existingCall , callId ) ; existingCall.setConnectionService ( this ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public int getStreamingServices ( java.util.List < java.lang.String > classList ) { return 0 ; }

Target:
public void getStreamingServices ( java.util.List < java.lang.String > classList ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new android.telephony.mbms.MbmsException ( android.telephony.mbms.MbmsException.ERROR_MIDDLEWARE_NOT_BOUND ) ; } try { int returnCode = mService.getStreamingServices ( mAppName , mSubscriptionId , classList ) ; if ( returnCode != ( android.telephony.mbms.MbmsException.SUCCESS ) ) { throw new android.telephony.mbms.MbmsException ( returnCode ) ; } } catch ( android.os.RemoteException e ) { throw new android.telephony.mbms.MbmsException ( android.telephony.mbms.MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } }
Source:
public int getCurrentIconId ( ) { if ( ( mCurrentState.iconGroup ) == ( TelephonyIcons.CARRIER_NETWORK_CHANGE ) ) { return com.android.systemui.statusbar.phone.SignalDrawable.getCarrierChangeState ( getNumLevels ( ) ) ; } else if ( mCurrentState.connected ) { int level = mCurrentState.level ; if ( mConfig.inflateSignalStrengths ) { level ++ ; } return com.android.systemui.statusbar.phone.SignalDrawable.getState ( level , getNumLevels ( ) , ( ( mCurrentState.inetCondition ) == 0 ) ) ; } else if ( mCurrentState.enabled ) { return com.android.systemui.statusbar.phone.SignalDrawable.getEmptyState ( getNumLevels ( ) ) ; } else { return 0 ; } }

Target:
public int getCurrentIconId ( ) { if ( ( mCurrentState.iconGroup ) == ( TelephonyIcons.CARRIER_NETWORK_CHANGE ) ) { return com.android.settingslib.graph.SignalDrawable.getCarrierChangeState ( getNumLevels ( ) ) ; } else if ( mCurrentState.connected ) { int level = mCurrentState.level ; if ( mConfig.inflateSignalStrengths ) { level ++ ; } return com.android.settingslib.graph.SignalDrawable.getState ( level , getNumLevels ( ) , ( ( mCurrentState.inetCondition ) == 0 ) ) ; } else if ( mCurrentState.enabled ) { return com.android.settingslib.graph.SignalDrawable.getEmptyState ( getNumLevels ( ) ) ; } else { return 0 ; } }
Source:
public static < T > boolean any ( java.util.Iterator < T > iterator , com.google.common.base.Predicate < ? super T > predicate ) { com.google.common.base.Preconditions.checkNotNull ( predicate ) ; while ( iterator.hasNext ( ) ) { T element = iterator.next ( ) ; if ( predicate.apply ( element ) ) { return true ; } } return false ; }

Target:
public static < T > T get ( java.util.Iterator < T > iterator , int position ) { com.google.common.collect.Iterators.checkNonnegative ( position ) ; int skipped = com.google.common.collect.Iterators.advance ( iterator , position ) ; if ( ! ( iterator.hasNext ( ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( "position (" + position ) + ") must be less than the number of elements that remained (" ) + skipped ) + ")" ) ) ; } return iterator.next ( ) ; }
Source:
public void sync ( ) throws java.io.SyncFailedException { try { if ( Libcore.os.isatty ( this ) ) { Libcore.os.tcdrain ( this ) ; } else { Libcore.os.fsync ( this ) ; } } catch ( libcore.io.ErrnoException errnoException ) { java.io.SyncFailedException sfe = new java.io.SyncFailedException ( errnoException.getMessage ( ) ) ; sfe.initCause ( errnoException ) ; throw sfe ; } }

Target:
public void sync ( ) throws java.io.SyncFailedException { try { if ( Libcore.os.isatty ( this ) ) { Libcore.os.tcdrain ( this ) ; } else { Libcore.os.fsync ( this ) ; } } catch ( android.system.ErrnoException errnoException ) { java.io.SyncFailedException sfe = new java.io.SyncFailedException ( errnoException.getMessage ( ) ) ; sfe.initCause ( errnoException ) ; throw sfe ; } }
Source:
public java.lang.String getPackageFromManifest ( ) { assert ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ; java.io.File manifestLocation = mDefaultSourceProvider.getManifestFile ( ) ; java.lang.String packageName = sManifestParser.getPackage ( manifestLocation ) ; if ( packageName == null ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "Cannot read packageName from %1$s" , mDefaultSourceProvider.getManifestFile ( ) . getAbsolutePath ( ) ) ) ; } return packageName ; }

Target:
public java.lang.Boolean getHandleProfiling ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.Boolean handleProfiling = config.mMergedFlavor.getTestHandleProfiling ( ) ; return handleProfiling != null ? handleProfiling : com.android.builder.core.VariantConfiguration.DEFAULT_HANDLE_PROFILING ; }
Source:
public com.android.sdklib.ISystemImage getSystemImage ( java.lang.String abiType ) { for ( com.android.sdklib.ISystemImage sysImg : mSystemImages ) { if ( sysImg.getAbiType ( ) . equals ( abiType ) ) { return sysImg ; } } return null ; }

Target:
public com.android.sdklib.ISystemImage getSystemImage ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IdDisplay tag , @ com.android.annotations.NonNull java.lang.String abiType ) { for ( com.android.sdklib.ISystemImage sysImg : mSystemImages ) { if ( ( sysImg.getTag ( ) . equals ( tag ) ) && ( sysImg.getAbiType ( ) . equals ( abiType ) ) ) { return sysImg ; } } return null ; }
Source:
public void testWithKey ( ) { android.preference.CheckBoxPreference pref = new android.preference.CheckBoxPreference ( getInstrumentation ( ) . getContext ( ) ) ; pref.setKey ( "foo" ) ; org.hamcrest.MatcherAssert.assertThat ( pref , android.support.test.espresso.matcher.PreferenceMatchers.withKey ( "foo" ) ) ; org.hamcrest.MatcherAssert.assertThat ( pref , org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.PreferenceMatchers.withKey ( "bar" ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( pref , android.support.test.espresso.matcher.PreferenceMatchers.withKey ( org.hamcrest.Matchers.is ( "foo" ) ) ) ; }

Target:
public void withKeyTest ( ) { android.preference.CheckBoxPreference pref = new android.preference.CheckBoxPreference ( android.support.test.InstrumentationRegistry.getInstrumentation ( ) . getContext ( ) ) ; pref.setKey ( "foo" ) ; org.hamcrest.MatcherAssert.assertThat ( pref , android.support.test.espresso.matcher.PreferenceMatchers.withKey ( "foo" ) ) ; org.hamcrest.MatcherAssert.assertThat ( pref , org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.PreferenceMatchers.withKey ( "bar" ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( pref , android.support.test.espresso.matcher.PreferenceMatchers.withKey ( org.hamcrest.Matchers.is ( "foo" ) ) ) ; }
Source:
public static java.lang.String getPackageVersionCode ( android.content.Context context ) { java.lang.String msg = "versionCode not available." ; try { android.content.pm.PackageManager pm = context.getPackageManager ( ) ; android.content.pm.PackageInfo pi = pm.getPackageInfo ( context.getPackageName ( ) , 0 ) ; msg = "" ; if ( ( pi.versionCode ) > 0 ) { msg = java.lang.Integer.toString ( pi.versionCode ) ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { android.util.Log.d ( org.chromium.base.BuildInfo.TAG , msg ) ; } return msg ; }

Target:
public static java.lang.String getPackageVersionCode ( android.content.Context context ) { java.lang.String msg = "versionCode not available." ; try { android.content.pm.PackageManager pm = context.getPackageManager ( ) ; android.content.pm.PackageInfo pi = pm.getPackageInfo ( context.getPackageName ( ) , 0 ) ; msg = "" ; if ( ( pi.versionCode ) > 0 ) { msg = java.lang.Integer.toString ( pi.versionCode ) ; } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { org.chromium.base.Log.d ( org.chromium.base.BuildInfo.TAG , msg ) ; } return msg ; }
Source:
public boolean onHandleForceStop ( android.content.Intent intent , java.lang.String [ ] packages , int uid , boolean doit ) { int userId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; if ( packages != null ) { for ( java.lang.String pkg : packages ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false , false , false , userId , "finished booting" ) ) { return true ; } } } } return false ; }

Target:
public void notifyCleartextNetwork ( int uid , byte [ ] firstPacket ) { mHandler.obtainMessage ( com.android.server.am.ActivityManagerService.NOTIFY_CLEARTEXT_NETWORK_MSG , uid , 0 , firstPacket ) . sendToTarget ( ) ; }
Source:
public void compileRegressions ( ) throws java.lang.Exception { java.io.File out = com.android.jack.TestTools.createTempFile ( "out" , ".zip" ) ; java.lang.String classpath = com.android.jack.TestTools.getClasspathAsString ( com.android.jack.compile.androidtree.dalvik.compilerregressions.CompilerRegressionsTest.BOOTCLASSPATH ) ; com.android.jack.TestTools.compileSourceToDex ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getDalvikTestFolder ( "083-jit-regressions" ) , classpath , out , true ) ; }

Target:
public void compileRegressions ( ) throws java.lang.Exception { java.io.File out = com.android.jack.TestTools.createTempFile ( "out" , ".zip" ) ; java.lang.String classpath = com.android.jack.TestTools.getClasspathAsString ( com.android.jack.compile.androidtree.dalvik.compilerregressions.CompilerRegressionsTest.BOOTCLASSPATH ) ; com.android.jack.TestTools.compileSourceToDex ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getArtTestFolder ( "083-compiler-regressions" ) , classpath , out , true ) ; }
Source:
public int getOffset ( long when ) { long unix = when / 1000 ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return mEarliestRawOffset ; } } return ( mRawOffset ) + ( ( mOffsets [ ( ( mTypes [ transition ] ) & 255 ) ] ) * 1000 ) ; }

Target:
private void readObject ( java.io.ObjectInputStream in ) throws java.io.IOException , java.lang.ClassNotFoundException { in.defaultReadObject ( ) ; if ( ( ! ( mUseDst ) ) && ( ( mDstSavings ) != 0 ) ) { mDstSavings = 0 ; } }
Source:
public void testCenterLocationsX ( ) { assertPositionEquals ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) - 1 ) / 2.0F ) ) , GeneralLocation.CENTER , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) - 1 ) / 2.0F ) ) , GeneralLocation.TOP_CENTER , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) - 1 ) / 2.0F ) ) , GeneralLocation.BOTTOM_CENTER , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; }

Target:
public void centerLocationsX ( ) { assertPositionEquals ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) - 1 ) / 2.0F ) ) , GeneralLocation.CENTER , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) - 1 ) / 2.0F ) ) , GeneralLocation.TOP_CENTER , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; assertPositionEquals ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_POSITION_X ) + ( ( ( android.support.test.espresso.action.GeneralLocationTest.VIEW_WIDTH ) - 1 ) / 2.0F ) ) , GeneralLocation.BOTTOM_CENTER , android.support.test.espresso.action.GeneralLocationTest.AXIS_X ) ; }
Source:
public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JCatchBlock block ) { com.android.jack.cfg.NormalBasicBlock endOfBlock = new com.android.jack.cfg.NormalBasicBlock ( ( ( basicBlockId ) ++ ) , currentStmts ) ; setBlockOfStatement ( endOfBlock ) ; com.android.jack.ir.ast.JStatement nextStatement = com.android.jack.util.ControlFlowHelper.getNextStatement ( block ) ; if ( nextStatement != null ) { forwardBranchResolver.addNormalBasicBlock ( endOfBlock , nextStatement ) ; } }

Target:
public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JCatchBlock block ) { if ( ! ( currentStmts.isEmpty ( ) ) ) { com.android.jack.cfg.NormalBasicBlock endOfBlock = new com.android.jack.cfg.NormalBasicBlock ( ( ( basicBlockId ) ++ ) , currentStmts ) ; setBlockOfStatement ( endOfBlock ) ; com.android.jack.ir.ast.JStatement nextStatement = com.android.jack.util.ControlFlowHelper.getNextStatement ( block ) ; if ( nextStatement != null ) { forwardBranchResolver.addNormalBasicBlock ( endOfBlock , nextStatement ) ; } } }
Source:
public void t_formatToCharacterIterator ( ) { java.lang.String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} litres of coke. That was {0,choice,1#just enough|1<more than enough} food!" ; java.text.MessageFormat format = new java.text.MessageFormat ( pattern , java.util.Locale.US ) ; java.util.Date date = new java.util.GregorianCalendar ( 2005 , 1 , 28 , 14 , 20 , 16 ) . getTime ( ) ; java.lang.Integer hamburgers = new java.lang.Integer ( 8 ) ; java.lang.Object [ ] objects = new java.lang.Object [ ] { hamburgers , new java.lang.Double ( 3.5 ) , hamburgers , date , date } ; t_Format ( 1 , objects , format , getMessageVector1 ( ) ) ; }

Target:
public void t_formatToCharacterIterator ( ) { java.lang.String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} liters of coke. That was {0,choice,1#just enough|1<more than enough} food!" ; java.text.MessageFormat format = new java.text.MessageFormat ( pattern , java.util.Locale.US ) ; java.util.Date date = new java.util.GregorianCalendar ( 2005 , 1 , 28 , 14 , 20 , 16 ) . getTime ( ) ; java.lang.Integer hamburgers = new java.lang.Integer ( 8 ) ; java.lang.Object [ ] objects = new java.lang.Object [ ] { hamburgers , new java.lang.Double ( 3.5 ) , hamburgers , date , date } ; t_Format ( 1 , objects , format , getMessageVector1 ( ) ) ; }
Source:
public static final javax.crypto.Mac getInstance ( java.lang.String algorithm , java.lang.String provider ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException { sun.security.jca.GetInstance.Instance instance = javax.crypto.JceSecurity.getInstance ( "Mac" , javax.crypto.MacSpi.class , algorithm , provider ) ; return new javax.crypto.Mac ( ( ( javax.crypto.MacSpi ) ( instance.impl ) ) , instance.provider , algorithm ) ; }

Target:
public static final javax.crypto.Mac getInstance ( java.lang.String algorithm , java.lang.String provider ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException { sun.security.jca.Providers.checkBouncyCastleDeprecation ( provider , "Mac" , algorithm ) ; sun.security.jca.GetInstance.Instance instance = javax.crypto.JceSecurity.getInstance ( "Mac" , javax.crypto.MacSpi.class , algorithm , provider ) ; return new javax.crypto.Mac ( ( ( javax.crypto.MacSpi ) ( instance.impl ) ) , instance.provider , algorithm ) ; }
Source:
public void testCountryUsesUtc ( ) { org.junit.Assert.assertFalse ( mTimeZoneLookupHelper.countryUsesUtc ( "us" ) ) ; org.junit.Assert.assertTrue ( mTimeZoneLookupHelper.countryUsesUtc ( "gb" ) ) ; }

Target:
public void testCountryUsesUtc ( ) { org.junit.Assert.assertFalse ( mTimeZoneLookupHelper.countryUsesUtc ( "us" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_SUMMER_TIME_MILLIS ) ) ; org.junit.Assert.assertFalse ( mTimeZoneLookupHelper.countryUsesUtc ( "us" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_WINTER_TIME_MILLIS ) ) ; org.junit.Assert.assertFalse ( mTimeZoneLookupHelper.countryUsesUtc ( "gb" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_SUMMER_TIME_MILLIS ) ) ; org.junit.Assert.assertTrue ( mTimeZoneLookupHelper.countryUsesUtc ( "gb" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_WINTER_TIME_MILLIS ) ) ; }
Source:
private void initializeGlobals ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_refcount s ) { android.renderscript.Type.Builder typeBuilder = new android.renderscript.Type.Builder ( RS , android.renderscript.Element.I32 ( RS ) ) ; int X = 500 ; int Y = 700 ; typeBuilder.setX ( X ) . setY ( Y ) ; android.renderscript.Allocation A = android.renderscript.Allocation.createTyped ( RS , typeBuilder.create ( ) ) ; s.set_globalA ( A ) ; }

Target:
private void initializeGlobals ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_refcount s ) { android.renderscript.Type.Builder typeBuilder = new android.renderscript.Type.Builder ( RS , android.renderscript.Element.I32 ( RS ) ) ; int X = 500 ; int Y = 700 ; typeBuilder.setX ( X ) . setY ( Y ) ; mT = typeBuilder.create ( ) ; mA = android.renderscript.Allocation.createTyped ( RS , mT ) ; s.set_globalA ( mA ) ; }
Source:
java.lang.invoke.MethodHandle asTypeUncached ( java.lang.invoke.MethodType newType ) { if ( ! ( type.isConvertibleTo ( newType ) ) ) throw new java.lang.invoke.WrongMethodTypeException ( ( ( ( "cannot convert " + ( this ) ) + " to " ) + newType ) ) ; throw new java.lang.UnsupportedOperationException ( "asTypeUncached(MethodType)" ) ; }

Target:
public java.lang.invoke.MethodHandle asType ( java.lang.invoke.MethodType newType ) { if ( newType == ( type ) ) { return this ; } if ( ! ( type.isConvertibleTo ( newType ) ) ) { throw new java.lang.invoke.WrongMethodTypeException ( ( ( ( "cannot convert " + ( this ) ) + " to " ) + newType ) ) ; } java.lang.invoke.MethodHandle mh = duplicate ( ) ; mh.nominalType = newType ; return mh ; }
Source:
public java.lang.String toString ( ) { try { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; sb.append ( java.lang.String.format ( "RA %s -> %s %ds " , IPv6AddresstoString ( android.net.apf.ApfFilter.IPV6_SRC_ADDR_OFFSET ) , IPv6AddresstoString ( android.net.apf.ApfFilter.IPV6_DEST_ADDR_OFFSET ) , android.net.apf.ApfFilter.getUint16 ( mPacket , android.net.apf.ApfFilter.Ra.ICMP6_RA_ROUTER_LIFETIME_OFFSET ) ) ) ; for ( int i : mPrefixOptionOffsets ) { prefixOptionToString ( sb , i ) ; } for ( int i : mRdnssOptionOffsets ) { rdnssOptionToString ( sb , i ) ; } return sb.toString ( ) ; } catch ( java.nio.BufferUnderflowException | java.lang.IndexOutOfBoundsException e ) { return "<Malformed RA>" ; } }

Target:
public java.lang.String toString ( ) { try { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; sb.append ( java.lang.String.format ( "RA %s -> %s %ds " , IPv6AddresstoString ( android.net.apf.ApfFilter.IPV6_SRC_ADDR_OFFSET ) , IPv6AddresstoString ( android.net.apf.ApfFilter.IPV6_DEST_ADDR_OFFSET ) , com.android.internal.util.BitUtils.getUint16 ( mPacket , android.net.apf.ApfFilter.Ra.ICMP6_RA_ROUTER_LIFETIME_OFFSET ) ) ) ; for ( int i : mPrefixOptionOffsets ) { prefixOptionToString ( sb , i ) ; } for ( int i : mRdnssOptionOffsets ) { rdnssOptionToString ( sb , i ) ; } return sb.toString ( ) ; } catch ( java.nio.BufferUnderflowException | java.lang.IndexOutOfBoundsException e ) { return "<Malformed RA>" ; } }
Source:
public static void computeMax ( android.renderscript.cts.TestMax.ArgumentsUintUintUint args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( int ) ( java.lang.StrictMath.max ( ( ( long ) ( ( args.inV1 ) & 4294967295L ) ) , ( ( long ) ( ( args.inV2 ) & 4294967295L ) ) ) ) ) ; }

Target:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsShortShortShortShort args ) { args.out = android.renderscript.cts.CoreMathVerifier.minI16 ( args.inMaxValue , android.renderscript.cts.CoreMathVerifier.maxI16 ( args.inValue , args.inMinValue ) ) ; }
Source:
public boolean resetPnoList ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "resetPnoList not supported" ) ; return false ; } else { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "resetPnoList cmd " + ( com.android.server.wifi.WifiNative.sPnoCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.sPnoCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; com.android.server.wifi.WifiNative.sPnoEventHandler = null ; if ( com.android.server.wifi.WifiNative.resetPnoListNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sPnoCmdId ) ) { return true ; } } return false ; } } }

Target:
public boolean resetPnoList ( ) { android.util.Log.e ( mTAG , "resetPnoList not supported" ) ; return false ; }
Source:
private com.android.jack.dx.rop.code.RegisterSpec getRegisterSpec ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { com.android.jack.dx.rop.code.RegisterSpec regSpec ; if ( expr instanceof com.android.jack.ir.ast.JVariableRef ) { regSpec = ropReg.getRegisterSpec ( ( ( com.android.jack.ir.ast.JVariableRef ) ( expr ) ) ) ; } else { assert expr instanceof com.android.jack.ir.ast.JValueLiteral ; regSpec = ropReg.getOrCreateTmpRegister ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( expr.getType ( ) ) ) ; buildConstant ( regSpec , ( ( com.android.jack.ir.ast.JValueLiteral ) ( expr ) ) ) ; } return regSpec ; }

Target:
private com.android.jack.dx.rop.code.RegisterSpec getRegisterSpec ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { com.android.jack.dx.rop.code.RegisterSpec regSpec ; if ( expr instanceof com.android.jack.ir.ast.JVariableRef ) { regSpec = ropReg.getOrCreateRegisterSpec ( ( ( com.android.jack.ir.ast.JVariableRef ) ( expr ) ) ) ; } else { assert expr instanceof com.android.jack.ir.ast.JValueLiteral ; regSpec = ropReg.getOrCreateTmpRegister ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( expr.getType ( ) ) ) ; buildConstant ( regSpec , ( ( com.android.jack.ir.ast.JValueLiteral ) ( expr ) ) ) ; } return regSpec ; }
Source:
private static com.ibm.icu.text.DateIntervalFormat getFormatter ( java.lang.String skeleton , java.util.Locale locale , java.util.TimeZone tz ) { java.lang.String key = ( ( ( skeleton + "\t" ) + locale ) + "\t" ) + tz ; libcore.icu.DateIntervalFormat formatter = libcore.icu.DateIntervalFormat.CACHED_FORMATTERS.get ( key ) ; if ( formatter != null ) { return formatter ; } formatter = libcore.icu.com.ibm.icu.text.DateIntervalFormat.getInstance ( skeleton , locale ) ; formatter.setTimeZone ( libcore.icu.DateIntervalFormat.icuTimeZone ( tz ) ) ; libcore.icu.DateIntervalFormat.CACHED_FORMATTERS.put ( key , formatter ) ; return formatter ; }

Target:
public static java.lang.String formatDateRange ( long startMs , long endMs , int flags , java.lang.String olsonId ) { if ( ( flags & ( libcore.icu.DateIntervalFormat.FORMAT_UTC ) ) != 0 ) { olsonId = "UTC" ; } java.util.TimeZone tz = ( olsonId != null ) ? java.util.TimeZone.getTimeZone ( olsonId ) : java.util.TimeZone.getDefault ( ) ; java.util.TimeZone icuTimeZone = libcore.icu.DateIntervalFormat.icuTimeZone ( tz ) ; com.ibm.icu.util.ULocale icuLocale = com.ibm.icu.util.ULocale.getDefault ( ) ; return libcore.icu.DateIntervalFormat.formatDateRange ( icuLocale , icuTimeZone , startMs , endMs , flags ) ; }
Source:
public java.util.List < com.google.currysrc.api.transform.TransformRule > getTransformRules ( java.io.File file ) { java.util.List < com.google.currysrc.api.transform.TransformRule > transformRules = com.google.common.collect.Lists.newArrayList ( Icu4jTransform.Icu4jRules.getRepackagingRules ( ) ) ; transformRules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.android.icu4j.srcgen.TranslateJcite.BeginEndTagsHandler ( ) ) ) ; return transformRules ; }

Target:
private static java.util.List < com.google.currysrc.api.transform.TransformRule > createTransformRules ( ) { java.util.List < com.google.currysrc.api.transform.TransformRule > transformRules = com.google.common.collect.Lists.newArrayList ( Icu4jTransform.Icu4jRules.getRepackagingRules ( ) ) ; transformRules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.ReplaceTextCommentScanner ( Icu4jTransform.ORIGINAL_ICU_PACKAGE , Icu4jTransform.ANDROID_ICU_PACKAGE ) ) ) ; transformRules.add ( com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.android.icu4j.srcgen.TranslateJcite.BeginEndTagsHandler ( ) ) ) ; return transformRules ; }
Source:
public void testKeyPairGenerator_GenerateKeyPair_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mGenerator.initialize ( new android.security.KeyPairGeneratorSpec.Builder ( getContext ( ) ) . setAlias ( android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 ) . setSubject ( android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 ) . setSerialNumber ( android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 ) . setStartDate ( android.security.AndroidKeyPairGeneratorTest.NOW ) . setEndDate ( android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) . setEncryptionRequired ( ) . build ( ) ) ; final java.security.KeyPair pair = mGenerator.generateKeyPair ( ) ; assertNotNull ( "The KeyPair returned should not be null" , pair ) ; assertKeyPairCorrect ( pair , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) ; }

Target:
public void testKeyPairGenerator_GenerateKeyPair_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mGenerator.initialize ( new android.security.KeyPairGeneratorSpec.Builder ( getContext ( ) ) . setAlias ( android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 ) . setSubject ( android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 ) . setSerialNumber ( android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 ) . setStartDate ( android.security.AndroidKeyPairGeneratorTest.NOW ) . setEndDate ( android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) . setEncryptionRequired ( ) . build ( ) ) ; final java.security.KeyPair pair = mGenerator.generateKeyPair ( ) ; assertNotNull ( "The KeyPair returned should not be null" , pair ) ; assertKeyPairCorrect ( pair , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , "RSA" , 2048 , null , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) ; }
Source:
public void setVisualVoicemailEnabled ( java.lang.String callingPackage , android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( android.text.TextUtils.equals ( callingPackage , android.telecom.TelecomManager.from ( mPhone.getContext ( ) ) . getDefaultDialerPackage ( ) ) ) ) { enforceModifyPermissionOrCarrierPrivilege ( com.android.phone.PhoneUtils.getSubIdForPhoneAccountHandle ( phoneAccountHandle ) ) ; } com.android.phone.settings.VisualVoicemailSettingsUtil.setEnabled ( mPhone.getContext ( ) , phoneAccountHandle , enabled ) ; }

Target:
public void setVoicemailVibrationEnabled ( java.lang.String callingPackage , android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( android.text.TextUtils.equals ( callingPackage , android.telecom.TelecomManager.from ( mPhone.getContext ( ) ) . getDefaultDialerPackage ( ) ) ) ) { enforceModifyPermissionOrCarrierPrivilege ( com.android.phone.PhoneUtils.getSubIdForPhoneAccountHandle ( phoneAccountHandle ) ) ; } com.android.internal.telephony.Phone phone = com.android.phone.PhoneUtils.getPhoneForPhoneAccountHandle ( phoneAccountHandle ) ; if ( phone == null ) { phone = mPhone ; } com.android.phone.settings.VoicemailNotificationSettingsUtil.setVibrationEnabled ( phone , enabled ) ; }
Source:
public void onProgressChanged ( com.android.browser.Tab tab ) { mCrashRecoveryHandler.backupState ( ) ; int newProgress = tab.getLoadProgress ( ) ; if ( newProgress == 100 ) { android.webkit.CookieSyncManager.getInstance ( ) . sync ( ) ; if ( tab.inPageLoad ( ) ) { updateInLoadMenuItems ( mCachedMenu , tab ) ; } } else { if ( ! ( tab.inPageLoad ( ) ) ) { updateInLoadMenuItems ( mCachedMenu , tab ) ; } } mUi.onProgressChanged ( tab ) ; }

Target:
public void onPageFinished ( com.android.browser.Tab tab ) { mCrashRecoveryHandler.backupState ( ) ; mUi.onTabDataChanged ( tab ) ; if ( false ) { com.android.browser.Performance.onPageFinished ( tab.getUrl ( ) ) ; } com.android.browser.Performance.tracePageFinished ( ) ; }
Source:
private static void testThreadDaemons ( ) { java.lang.Thread t = new java.lang.Thread ( null , new Main.TestDaemonThread ( ) , "TestDaemonThread" , 7168 ) ; t.setDaemon ( false ) ; java.lang.System.out.print ( ( ( "testThreadDaemons starting thread '" + ( t.getName ( ) ) ) + "\'\n" ) ) ; t.start ( ) ; try { t.join ( ) ; } catch ( java.lang.InterruptedException ex ) { ex.printStackTrace ( ) ; } java.lang.System.out.print ( "testThreadDaemons finished\n" ) ; }

Target:
private static void testThreadDaemons ( ) { java.lang.Thread t = new java.lang.Thread ( null , new Main.TestDaemonThread ( ) , "TestDaemonThread" , 7168 ) ; t.setDaemon ( false ) ; java.lang.System.out.print ( ( ( "testThreadDaemons starting thread '" + ( t.getName ( ) ) ) + "\'\n" ) ) ; t.start ( ) ; try { t.join ( ) ; } catch ( java.lang.InterruptedException ex ) { ex.printStackTrace ( java.lang.System.out ) ; } java.lang.System.out.print ( "testThreadDaemons finished\n" ) ; }
Source:
public void testGrant_Imported_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to import key for testcase" , mKeyStore.importKey ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.PRIVKEY_BYTES , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testGrant_Imported_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to import key for testcase" , mKeyStore.importKey ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.PRIVKEY_BYTES , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
public static boolean canReportAsInvalidNumber ( com.android.dialer.phonelookup.PhoneLookupInfo phoneLookupInfo ) { if ( ( phoneLookupInfo.getCp2Info ( ) . getCp2ContactInfoCount ( ) ) > 0 ) { return false ; } com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo peopleApiInfo = phoneLookupInfo.getPeopleApiInfo ( ) ; return ( ( peopleApiInfo.getInfoType ( ) ) != ( com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo.InfoType.UNKNOWN ) ) && ( ! ( peopleApiInfo.getPersonId ( ) . isEmpty ( ) ) ) ; }

Target:
public static boolean canReportAsInvalidNumber ( com.android.dialer.phonelookup.PhoneLookupInfo phoneLookupInfo ) { if ( ( phoneLookupInfo.getCp2LocalInfo ( ) . getCp2ContactInfoCount ( ) ) > 0 ) { return false ; } com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo peopleApiInfo = phoneLookupInfo.getPeopleApiInfo ( ) ; return ( ( peopleApiInfo.getInfoType ( ) ) != ( com.android.dialer.phonelookup.PhoneLookupInfo.PeopleApiInfo.InfoType.UNKNOWN ) ) && ( ! ( peopleApiInfo.getPersonId ( ) . isEmpty ( ) ) ) ; }
Source:
public void testInstall_withBadlyFormedRevision ( ) throws java.lang.Exception { libcore.tzdata.update2.DistroVersion validDistroVersion = new libcore.tzdata.update2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRevisionBytes = validDistroVersion.toBytes ( ) ; invalidRevisionBytes [ ( ( invalidRevisionBytes.length ) - 3 ) ] = 'A' ; libcore.tzdata.update2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRevisionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRevision ( ) throws java.lang.Exception { libcore.tzdata.shared2.DistroVersion validDistroVersion = new libcore.tzdata.shared2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRevisionBytes = validDistroVersion.toBytes ( ) ; invalidRevisionBytes [ ( ( invalidRevisionBytes.length ) - 3 ) ] = 'A' ; libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRevisionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public void queryPasspointIcon ( long bssid , java.lang.String fileName ) { enforceAccessPermission ( ) ; mLog.trace ( "queryPasspointIcon uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; mWifiStateMachine.syncQueryPasspointIcon ( mWifiStateMachineChannel , bssid , fileName ) ; }

Target:
public void queryPasspointIcon ( long bssid , java.lang.String fileName ) { enforceAccessPermission ( ) ; mLog.trace ( "queryPasspointIcon uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_wifi_hotspot2_enabled ) ) ) { throw new java.lang.UnsupportedOperationException ( "Passpoint not enabled" ) ; } mWifiStateMachine.syncQueryPasspointIcon ( mWifiStateMachineChannel , bssid , fileName ) ; }
Source:
void limitImpl ( int newLimit ) { if ( ( newLimit < 0 ) || ( newLimit > ( capacity ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "Bad limit (capacity " + ( capacity ) ) + "): " ) + newLimit ) ) ; } limit = newLimit ; if ( ( position ) > newLimit ) { position = newLimit ; } if ( ( ( mark ) != ( java.nio.Buffer.UNSET_MARK ) ) && ( ( mark ) > newLimit ) ) { mark = java.nio.Buffer.UNSET_MARK ; } }

Target:
public final java.nio.Buffer limit ( int newLimit ) { if ( ( newLimit < 0 ) || ( newLimit > ( capacity ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "Bad limit (capacity " + ( capacity ) ) + "): " ) + newLimit ) ) ; } limit = newLimit ; if ( ( position ) > newLimit ) { position = newLimit ; } if ( ( ( mark ) != ( java.nio.Buffer.UNSET_MARK ) ) && ( ( mark ) > newLimit ) ) { mark = java.nio.Buffer.UNSET_MARK ; } return this ; }