auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void initializeTelephonyAndPowerStateListeners ( ) { mCallActive = ( mTelephonyManager.getCallState ( ) ) != ( android.telephony.TelephonyManager.CALL_STATE_IDLE ) ; mTelephonyManager.listen ( mPhoneStateListener , PhoneStateListener.LISTEN_CALL_STATE ) ; if ( ( mPowerSaveModeListener ) == null ) { mPowerSaveModeListener = new com.android.server.soundtrigger.SoundTriggerHelper.PowerSaveModeListener ( ) ; mContext.registerReceiver ( mPowerSaveModeListener , new android.content.IntentFilter ( android.os.PowerManager.ACTION_POWER_SAVE_MODE_CHANGED ) ) ; } mIsPowerSaveMode = mPowerManager.getPowerSaveState ( ServiceType.SOUND ) . batterySaverEnabled ; }

Target:
private void initializeTelephonyAndPowerStateListeners ( ) { long token = android.os.Binder.clearCallingIdentity ( ) ; try { mCallActive = ( mTelephonyManager.getCallState ( ) ) != ( android.telephony.TelephonyManager.CALL_STATE_IDLE ) ; mTelephonyManager.listen ( mPhoneStateListener , PhoneStateListener.LISTEN_CALL_STATE ) ; if ( ( mPowerSaveModeListener ) == null ) { mPowerSaveModeListener = new com.android.server.soundtrigger.SoundTriggerHelper.PowerSaveModeListener ( ) ; mContext.registerReceiver ( mPowerSaveModeListener , new android.content.IntentFilter ( android.os.PowerManager.ACTION_POWER_SAVE_MODE_CHANGED ) ) ; } mIsPowerSaveMode = mPowerManager.getPowerSaveState ( ServiceType.SOUND ) . batterySaverEnabled ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }
Source:
private static synchronized long internalStringCreate ( android.renderscript.RenderScript rs , java.lang.String resName , byte [ ] bitcode ) { if ( ( android.renderscript.ScriptC.mCachePath ) == null ) { java.io.File f = new java.io.File ( RenderScriptCacheDir.mCacheDir , android.renderscript.ScriptC.CACHE_PATH ) ; android.renderscript.ScriptC.mCachePath = f.getAbsolutePath ( ) ; f.mkdirs ( ) ; } return rs.nScriptCCreate ( resName , android.renderscript.ScriptC.mCachePath , bitcode , bitcode.length ) ; }

Target:
private static synchronized long internalStringCreate ( android.renderscript.RenderScript rs , java.lang.String resName , byte [ ] bitcode ) { return rs.nScriptCCreate ( resName , android.renderscript.RenderScript.getCachePath ( ) , bitcode , bitcode.length ) ; }
Source:
public static void e ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { if ( com.android.services.telephony.Log.ERROR ) { android.util.Log.e ( com.android.services.telephony.Log.TAG , com.android.services.telephony.Log.buildMessage ( com.android.services.telephony.Log.getPrefixFromObject ( objectPrefix ) , format , args ) , tr ) ; } }

Target:
public static void e ( java.lang.String prefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { android.telecom.Log.e ( prefix , tr , format , args ) ; }
Source:
public void registerForCarrierAction ( int action , android.os.Handler h , int what , java.lang.Object obj , boolean notifyNow ) { java.lang.Object carrierAction = getCarrierAction ( action ) ; if ( carrierAction == null ) { throw new java.lang.IllegalArgumentException ( ( "invalid carrier action: " + action ) ) ; } android.os.RegistrantList list = getRegistrantsFromAction ( action ) ; android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; list.add ( r ) ; if ( notifyNow ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , carrierAction , null ) ) ; } }

Target:
public void registerForCarrierAction ( int action , android.os.Handler h , int what , java.lang.Object obj , boolean notifyNow ) { java.lang.Boolean carrierAction = getCarrierActionEnabled ( action ) ; if ( carrierAction == null ) { throw new java.lang.IllegalArgumentException ( ( "invalid carrier action: " + action ) ) ; } android.os.RegistrantList list = getRegistrantsFromAction ( action ) ; android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; list.add ( r ) ; if ( notifyNow ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , carrierAction , null ) ) ; } }
Source:
private static com.android.dx.rop.type.Type putIntern ( com.android.dx.rop.type.Type type ) { synchronized ( com.android.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.getDescriptor ( ) ; com.android.dx.rop.type.Type already = com.android.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }

Target:
private static com.android.dx.rop.type.Type putIntern ( com.android.dx.rop.type.Type type ) { com.android.dx.rop.type.Type result = com.android.dx.rop.type.Type.internTable.putIfAbsent ( type.getDescriptor ( ) , type ) ; return result != null ? result : type ; }
Source:
private void checkPermissionsSafe ( java.lang.String provider ) { if ( ( LocationManager.GPS_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { throw new java.lang.SecurityException ( "Requires ACCESS_FINE_LOCATION permission" ) ; } if ( ( ( LocationManager.NETWORK_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) && ( ( mContext.checkCallingPermission ( com.android.server.LocationManagerService.ACCESS_COARSE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { throw new java.lang.SecurityException ( "Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission" ) ; } }

Target:
private boolean isAllowedProviderSafe ( java.lang.String provider ) { if ( ( LocationManager.GPS_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { return false ; } if ( ( ( LocationManager.NETWORK_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) && ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.ACCESS_COARSE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { return false ; } return true ; }
Source:
public void onSubscribeStarted ( android.net.wifi.nan.WifiNanSubscribeDiscoverySession discoverySession ) { synchronized ( mLock ) { mDiscoverySessions.put ( mDiscoverySessionId , discoverySession ) ; } android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mResults.putLong ( "timestampMs" , java.lang.System.currentTimeMillis ( ) ) ; mEventFacade.postEvent ( "WifiNanSessionOnSubscribeStarted" , mResults ) ; }

Target:
public void onSubscribeStarted ( android.net.wifi.aware.WifiAwareSubscribeDiscoverySession discoverySession ) { synchronized ( mLock ) { mDiscoverySessions.put ( mDiscoverySessionId , discoverySession ) ; } android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mResults.putLong ( "timestampMs" , java.lang.System.currentTimeMillis ( ) ) ; mEventFacade.postEvent ( "WifiAwareSessionOnSubscribeStarted" , mResults ) ; }
Source:
public void TestArabicLongStyle ( ) { android.icu.text.NumberFormat cdf = android.icu.text.CompactDecimalFormat.getInstance ( android.icu.util.ULocale.forLanguageTag ( "ar" ) , CompactStyle.LONG ) ; assertEquals ( "Arabic Long" , "‏-٥٫٣ ألف" , cdf.format ( ( - 5300 ) ) ) ; }

Target:
public void TestArabicLongStyle ( ) { if ( logKnownIssue ( "12181" , "No support for negative numbers in CDF" ) ) { return ; } android.icu.text.NumberFormat cdf = android.icu.text.CompactDecimalFormat.getInstance ( new java.util.Locale ( "ar" ) , CompactStyle.LONG ) ; assertEquals ( "Arabic Long" , "‏-٥٫٣ ألف" , cdf.format ( ( - 5300 ) ) ) ; }
Source:
private long startingTask ( @ javax.annotation.Nonnull com.android.jack.server.ServerInfo info ) throws com.android.jack.server.JackHttpServer.ServerClosedException { long id ; synchronized ( lock ) { if ( shuttingDown ) { throw new com.android.jack.server.JackHttpServer.ServerClosedException ( ) ; } id = info.totalLocal ; ( info.totalLocal ) ++ ; if ( ( info.currentLocal ) == 0 ) { cancelTimer ( ) ; } ( info.currentLocal ) ++ ; if ( ( info.currentLocal ) > ( info.maxLocal ) ) { info.maxLocal = info.currentLocal ; } } return id ; }

Target:
private long startingTask ( @ javax.annotation.Nonnull com.android.jack.server.ServerInfo info ) throws com.android.jack.server.JackHttpServer.ServerClosedException { long id ; synchronized ( lock ) { if ( shuttingDown ) { throw new com.android.jack.server.JackHttpServer.ServerClosedException ( ) ; } id = info.totalLocal ; ( info.totalLocal ) ++ ; setServerMode ( ServerMode.WORK ) ; ( info.currentLocal ) ++ ; if ( ( info.currentLocal ) > ( info.maxLocal ) ) { info.maxLocal = info.currentLocal ; } } return id ; }
Source:
public static com.android.tools.lint.detector.api.Issue create ( @ com.android.annotations.NonNull java.lang.String id , @ com.android.annotations.NonNull java.lang.String description , @ com.android.annotations.NonNull java.lang.String explanation , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Category category , int priority , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Severity severity , @ com.android.annotations.NonNull java.lang.Class < ? extends com.android.tools.lint.detector.api.Detector > detectorClass , @ com.android.annotations.NonNull java.util.EnumSet < com.android.tools.lint.detector.api.Scope > scope ) { return new com.android.tools.lint.detector.api.Issue ( id , description , explanation , category , priority , severity , detectorClass , scope ) ; }

Target:
public static com.android.tools.lint.detector.api.Issue create ( @ com.android.annotations.NonNull java.lang.String id , @ com.android.annotations.NonNull java.lang.String briefDescription , @ com.android.annotations.NonNull java.lang.String description , @ com.android.annotations.NonNull java.lang.String explanation , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Category category , int priority , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Severity severity , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Implementation implementation ) { return new com.android.tools.lint.detector.api.Issue ( id , briefDescription , description , explanation , category , priority , severity , implementation ) ; }
Source:
public void dump ( java.lang.StringBuilder sb ) { if ( ( mMediaPlayerList ) != null ) { mMediaPlayerList.dump ( sb ) ; } else { sb.append ( "\nMedia Player List is empty\n" ) ; } }

Target:
public void dump ( java.lang.StringBuilder sb ) { sb.append ( "\nProfile: AvrcpTargetService:\n" ) ; if ( ( com.android.bluetooth.avrcp.AvrcpTargetService.sInstance ) == null ) { sb.append ( "AvrcpTargetService not running" ) ; return ; } if ( ( mMediaPlayerList ) != null ) { mMediaPlayerList.dump ( sb ) ; } else { sb.append ( "\nMedia Player List is empty\n" ) ; } mVolumeManager.dump ( sb ) ; sb.append ( "\n" ) ; }
Source:
public void testAesCbcHmacSha384Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha256Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , android.net.cts.IpSecManagerTest.getKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
public boolean enableNetwork ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "enableNetwork nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( "ENABLE_NETWORK " + netId ) ) ; }

Target:
public boolean startFilteringMulticastV4Packets ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.removeRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V4_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) ; } else { return ( ( doBooleanCommand ( "DRIVER RXFILTER-STOP" ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-REMOVE 2" ) ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-START" ) ) ; } }
Source:
public void test_getMaxPriority ( ) { final java.lang.ThreadGroup originalCurrent = getInitialThreadGroup ( ) ; java.lang.ThreadGroup testRoot = new java.lang.ThreadGroup ( originalCurrent , "Test group" ) ; boolean passed = true ; try { testRoot.setMaxPriority ( java.lang.Thread.MIN_PRIORITY ) ; } catch ( java.lang.IllegalArgumentException iae ) { passed = false ; } assertTrue ( "Should be able to set priority" , passed ) ; assertTrue ( "New value should be the same as we set" , ( ( testRoot.getMaxPriority ( ) ) == ( java.lang.Thread.MIN_PRIORITY ) ) ) ; testRoot.destroy ( ) ; }

Target:
public void test_getMaxPriority ( ) { final java.lang.ThreadGroup originalCurrent = initialThreadGroup ; java.lang.ThreadGroup testRoot = new java.lang.ThreadGroup ( originalCurrent , "Test group" ) ; boolean passed = true ; try { testRoot.setMaxPriority ( java.lang.Thread.MIN_PRIORITY ) ; } catch ( java.lang.IllegalArgumentException iae ) { passed = false ; } assertTrue ( "Should be able to set priority" , passed ) ; assertTrue ( "New value should be the same as we set" , ( ( testRoot.getMaxPriority ( ) ) == ( java.lang.Thread.MIN_PRIORITY ) ) ) ; testRoot.destroy ( ) ; }
Source:
public void TestFormatReplaceNoOptimization ( ) { com.ibm.icu.impl.SimplePatternFormatter fmt = com.ibm.icu.impl.SimplePatternFormatter.compile ( "{2}, {0}, {1} and {3}" ) ; int [ ] offsets = new int [ 4 ] ; java.lang.StringBuilder result = new java.lang.StringBuilder ( "original" ) ; assertEquals ( "format" , "frog, original, freddy and by" , fmt.formatAndReplace ( result , offsets , result , "freddy" , "frog" , "by" ) . toString ( ) ) ; int [ ] expectedOffsets = new int [ ] { 6 , 16 , 0 , 27 } ; verifyOffsets ( expectedOffsets , offsets ) ; }

Target:
public void TestFormatReplaceNoOptimization ( ) { com.ibm.icu.text.SimpleFormatter fmt = com.ibm.icu.text.SimpleFormatter.compile ( "{2}, {0}, {1} and {3}" ) ; int [ ] offsets = new int [ 4 ] ; java.lang.StringBuilder result = new java.lang.StringBuilder ( "original" ) ; assertEquals ( "format" , "frog, original, freddy and by" , fmt.formatAndReplace ( result , offsets , result , "freddy" , "frog" , "by" ) . toString ( ) ) ; int [ ] expectedOffsets = new int [ ] { 6 , 16 , 0 , 27 } ; verifyOffsets ( expectedOffsets , offsets ) ; }
Source:
protected static void readFromParcel ( android.net.StaticIpConfiguration s , android.os.Parcel in ) { s.ipAddress = in.readParcelable ( null ) ; s.gateway = android.net.NetworkUtils.unparcelInetAddress ( in ) ; s.dnsServers.clear ( ) ; int size = in.readInt ( ) ; for ( int i = 0 ; i < size ; i ++ ) { s.dnsServers.add ( android.net.NetworkUtils.unparcelInetAddress ( in ) ) ; } }

Target:
protected static void readFromParcel ( android.net.StaticIpConfiguration s , android.os.Parcel in ) { s.ipAddress = in.readParcelable ( null ) ; s.gateway = android.net.NetworkUtils.unparcelInetAddress ( in ) ; s.dnsServers.clear ( ) ; int size = in.readInt ( ) ; for ( int i = 0 ; i < size ; i ++ ) { s.dnsServers.add ( android.net.NetworkUtils.unparcelInetAddress ( in ) ) ; } s.domains = in.readString ( ) ; }
Source:
public android.net.wifi.nan.TlvBufferUtils.TlvConstructor putString ( int type , @ android.annotation.Nullable java.lang.String data ) { byte [ ] bytes = null ; int length = 0 ; if ( data != null ) { bytes = data.getBytes ( ) ; length = bytes.length ; } return putByteArray ( type , bytes , 0 , length ) ; }

Target:
public android.net.wifi.aware.TlvBufferUtils.TlvConstructor putString ( int type , @ android.annotation.Nullable java.lang.String data ) { byte [ ] bytes = null ; int length = 0 ; if ( data != null ) { bytes = data.getBytes ( ) ; length = bytes.length ; } return putByteArray ( type , bytes , 0 , length ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( intent.getAction ( ) . equals ( Intent.ACTION_SCREEN_ON ) ) { sendScreenState ( true ) ; } else if ( intent.getAction ( ) . equals ( Intent.ACTION_SCREEN_OFF ) ) { sendScreenState ( false ) ; } else { android.util.Log.w ( com.android.internal.telephony.RIL.LOG_TAG , ( "RIL received unexpected Intent: " + ( intent.getAction ( ) ) ) ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( intent.getAction ( ) . equals ( Intent.ACTION_SCREEN_ON ) ) { sendScreenState ( true ) ; } else if ( intent.getAction ( ) . equals ( Intent.ACTION_SCREEN_OFF ) ) { sendScreenState ( false ) ; } else { android.telephony.Rlog.w ( com.android.internal.telephony.RIL.LOG_TAG , ( "RIL received unexpected Intent: " + ( intent.getAction ( ) ) ) ) ; } }
Source:
private static java.util.List < java.lang.reflect.Field > getAllAnnotatedFields ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass ) { java.util.List < java.lang.reflect.Field > allFields = com.google.common.collect.Lists.newArrayList ( ) ; for ( java.lang.reflect.Field field : optionsClass.getFields ( ) ) { if ( field.isAnnotationPresent ( com.google.devtools.common.options.Option.class ) ) { allFields.add ( field ) ; } } if ( allFields.isEmpty ( ) ) { throw new java.lang.IllegalStateException ( ( optionsClass + " has no public @Option-annotated fields" ) ) ; } return com.google.common.collect.ImmutableList.copyOf ( allFields ) ; }

Target:
private static com.google.common.collect.ImmutableList < java.lang.reflect.Field > getAllAnnotatedFieldsSorted ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass ) { java.util.List < java.lang.reflect.Field > unsortedFields = new java.util.ArrayList < > ( ) ; for ( java.lang.reflect.Field field : optionsClass.getFields ( ) ) { if ( field.isAnnotationPresent ( com.google.devtools.common.options.Option.class ) ) { unsortedFields.add ( field ) ; } } return com.google.devtools.common.options.IsolatedOptionsData.fieldOrdering.immutableSortedCopy ( unsortedFields ) ; }
Source:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onCreateView" ) ; android.view.View view = inflater.inflate ( R.layout.new_call_log_fragment , container , false ) ; recyclerView = view.findViewById ( R.id.new_call_log_recycler_view ) ; getLoaderManager ( ) . restartLoader ( 0 , null , this ) ; return view ; }

Target:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onCreateView" ) ; android.view.View view = inflater.inflate ( R.layout.new_call_log_fragment , container , false ) ; recyclerView = view.findViewById ( R.id.new_call_log_recycler_view ) ; recyclerView.addOnScrollListener ( new com.android.dialer.metrics.jank.RecyclerViewJankLogger ( com.android.dialer.metrics.MetricsComponent.get ( getContext ( ) ) . metrics ( ) , com.android.dialer.logging.LoggingBindings.NEW_CALL_LOG_JANK_EVENT_NAME ) ) ; getLoaderManager ( ) . restartLoader ( 0 , null , this ) ; return view ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.d ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "received intent: " + intent ) ) ; java.lang.String action = intent.getAction ( ) ; switch ( action ) { case android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED : onHfIndicatorValueChanged ( intent ) ; break ; case android.bluetooth.BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT : onVendorSpecificHeadsetEvent ( intent ) ; break ; default : android.util.Log.w ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "unhandled intent: " + intent ) ) ; break ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.d ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "Received intent: " + intent ) ) ; java.lang.String action = intent.getAction ( ) ; switch ( action ) { case android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED : onHfIndicatorValueChanged ( intent ) ; break ; case android.bluetooth.BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT : onVendorSpecificHeadsetEvent ( intent ) ; break ; default : android.util.Log.w ( com.android.bluetooth.btservice.RemoteDevices.TAG , ( "Unhandled intent: " + intent ) ) ; break ; } }
Source:
public java.nio.ByteBuffer putShort ( short value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }

Target:
public java.nio.ByteBuffer putShort ( short value ) { checkIsAccessible ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Object param1 ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; java.lang.Object [ ] params = new java.lang.Object [ ] { param1 } ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.Throwable thrown , java.util.function.Supplier < java.lang.String > msgSupplier ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msgSupplier.get ( ) ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
public void test_joinAnySource_IPv4 ( ) throws java.lang.Exception { test_joinAnySource ( libcore.java.nio.channels.DatagramChannelMulticastTest.GOOD_MULTICAST_IPv4 , libcore.java.nio.channels.DatagramChannelMulticastTest.BAD_MULTICAST_IPv4 ) ; }

Target:
public void test_joinAnySource_nonMulticastGroupAddress_IPv4 ( ) throws java.lang.Exception { if ( ! ( supportsMulticast ) ) { return ; } java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; try { dc.join ( libcore.java.nio.channels.DatagramChannelMulticastTest.UNICAST_IPv4_1 , ipv4NetworkInterface ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } dc.close ( ) ; }
Source:
public void close ( ) { android.util.Log.d ( android.net.IpSecTransform.TAG , ( "Removing Transform with Id " + ( mResourceId ) ) ) ; if ( ( mResourceId ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { mCloseGuard.close ( ) ; return ; } try { android.net.IIpSecService svc = getIpSecService ( ) ; svc.deleteTransportModeTransform ( mResourceId ) ; stopKeepalive ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowAsRuntimeException ( ) ; } finally { mResourceId = android.net.IpSecManager.INVALID_RESOURCE_ID ; mCloseGuard.close ( ) ; } }

Target:
public void close ( ) { android.util.Log.d ( android.net.IpSecTransform.TAG , ( "Removing Transform with Id " + ( mResourceId ) ) ) ; if ( ( mResourceId ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { mCloseGuard.close ( ) ; return ; } try { android.net.IIpSecService svc = getIpSecService ( ) ; svc.deleteTransform ( mResourceId ) ; stopNattKeepalive ( ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowAsRuntimeException ( ) ; } finally { mResourceId = android.net.IpSecManager.INVALID_RESOURCE_ID ; mCloseGuard.close ( ) ; } }
Source:
public com.hp.creals.CR exp ( ) { final int low_prec = - 10 ; java.math.BigInteger rough_appr = get_appr ( low_prec ) ; if ( ( rough_appr.signum ( ) ) < 0 ) return negate ( ) . exp ( ) . inverse ( ) ; if ( ( rough_appr.compareTo ( com.hp.creals.CR.big2 ) ) > 0 ) { com.hp.creals.CR square_root = shiftRight ( 1 ) . exp ( ) ; return square_root.multiply ( square_root ) ; } else { return new com.hp.creals.prescaled_exp_CR ( this ) ; } }

Target:
public com.hp.creals.CR exp ( ) { final int low_prec = - 10 ; java.math.BigInteger rough_appr = get_appr ( low_prec ) ; if ( ( ( rough_appr.compareTo ( com.hp.creals.CR.big2 ) ) > 0 ) || ( ( rough_appr.compareTo ( com.hp.creals.CR.bigm2 ) ) < 0 ) ) { com.hp.creals.CR square_root = shiftRight ( 1 ) . exp ( ) ; return square_root.multiply ( square_root ) ; } else { return new com.hp.creals.prescaled_exp_CR ( this ) ; } }
Source:
public void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { bottomNav.selectTab ( savedInstanceState.getInt ( com.android.dialer.main.impl.MainSearchController.KEY_CURRENT_TAB ) ) ; bottomNav.setVisibility ( savedInstanceState.getInt ( com.android.dialer.main.impl.MainSearchController.KEY_BOTTOM_NAV_VISIBILITY ) ) ; if ( savedInstanceState.getBoolean ( com.android.dialer.main.impl.MainSearchController.KEY_IS_FAB_HIDDEN , false ) ) { fab.hide ( ) ; } if ( savedInstanceState.getBoolean ( com.android.dialer.main.impl.MainSearchController.KEY_IS_TOOLBAR_EXPANDED , false ) ) { toolbar.expand ( false , com.google.common.base.Optional.absent ( ) ) ; } if ( savedInstanceState.getBoolean ( com.android.dialer.main.impl.MainSearchController.KEY_IS_TOOLBAR_SLIDE_UP , false ) ) { toolbar.slideUp ( false ) ; } }

Target:
public void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { toolbarShadow.setVisibility ( savedInstanceState.getInt ( com.android.dialer.main.impl.MainSearchController.KEY_TOOLBAR_SHADOW_VISIBILITY ) ) ; if ( savedInstanceState.getBoolean ( com.android.dialer.main.impl.MainSearchController.KEY_IS_FAB_HIDDEN , false ) ) { fab.hide ( ) ; } if ( savedInstanceState.getBoolean ( com.android.dialer.main.impl.MainSearchController.KEY_IS_TOOLBAR_EXPANDED , false ) ) { toolbar.expand ( false , com.google.common.base.Optional.absent ( ) ) ; } if ( savedInstanceState.getBoolean ( com.android.dialer.main.impl.MainSearchController.KEY_IS_TOOLBAR_SLIDE_UP , false ) ) { toolbar.slideUp ( false ) ; } }
Source:
static < D extends java.lang.reflect.GenericDeclaration > java.lang.reflect.TypeVariable < D > newArtificialTypeVariable ( D declaration , java.lang.String name , java.lang.reflect.Type ... bounds ) { return new com.google.common.reflect.Types.TypeVariableImpl < D > ( declaration , name , ( ( bounds.length ) == 0 ? new java.lang.reflect.Type [ ] { java.lang.Object.class } : bounds ) ) ; }

Target:
static < D extends java.lang.reflect.GenericDeclaration > java.lang.reflect.TypeVariable < D > newArtificialTypeVariable ( D declaration , java.lang.String name , java.lang.reflect.Type ... bounds ) { return com.google.common.reflect.Types.newTypeVariableImpl ( declaration , name , ( ( bounds.length ) == 0 ? new java.lang.reflect.Type [ ] { java.lang.Object.class } : bounds ) ) ; }
Source:
public static void onWebViewProviderChanged ( android.content.pm.PackageInfo packageInfo , java.lang.String cacheKey ) { synchronized ( android.webkit.WebViewZygote.sLock ) { android.webkit.WebViewZygote.sPackage = packageInfo ; android.webkit.WebViewZygote.sPackageCacheKey = cacheKey ; if ( ! ( android.webkit.WebViewZygote.sMultiprocessEnabled ) ) { return ; } final java.lang.String serviceName = android.webkit.WebViewZygote.getServiceNameLocked ( ) ; android.webkit.WebViewZygote.sZygote = null ; if ( android.os.SystemService.isStopped ( serviceName ) ) { android.os.SystemService.start ( serviceName ) ; } else { android.os.SystemService.restart ( serviceName ) ; } android.webkit.WebViewZygote.sStartedService = true ; } }

Target:
public static void onWebViewProviderChanged ( android.content.pm.PackageInfo packageInfo , android.content.pm.ApplicationInfo originalAppInfo ) { synchronized ( android.webkit.WebViewZygote.sLock ) { android.webkit.WebViewZygote.sPackage = packageInfo ; android.webkit.WebViewZygote.sPackageOriginalAppInfo = originalAppInfo ; if ( ! ( android.webkit.WebViewZygote.sMultiprocessEnabled ) ) { return ; } final java.lang.String serviceName = android.webkit.WebViewZygote.getServiceNameLocked ( ) ; android.webkit.WebViewZygote.sZygote = null ; if ( android.os.SystemService.isStopped ( serviceName ) ) { android.os.SystemService.start ( serviceName ) ; } else { android.os.SystemService.restart ( serviceName ) ; } android.webkit.WebViewZygote.sStartedService = true ; } }
Source:
public static double factorial ( int n ) { com.google.common.math.MathPreconditions.checkNonNegative ( "n" , n ) ; if ( n > ( com.google.common.math.DoubleMath.MAX_FACTORIAL ) ) { return java.lang.Double.POSITIVE_INFINITY ; } else { double accum = 1.0 ; for ( int i = 1 + ( n & ( ~ 15 ) ) ; i <= n ; i ++ ) { accum *= i ; } return accum * ( com.google.common.math.DoubleMath.EVERY_SIXTEENTH_FACTORIAL [ ( n > > 4 ) ] ) ; } }

Target:
public static double factorial ( int n ) { com.google.common.math.MathPreconditions.checkNonNegative ( "n" , n ) ; if ( n > ( com.google.common.math.DoubleMath.MAX_FACTORIAL ) ) { return java.lang.Double.POSITIVE_INFINITY ; } else { double accum = 1.0 ; for ( int i = 1 + ( n & ( ~ 15 ) ) ; i <= n ; i ++ ) { accum *= i ; } return accum * ( com.google.common.math.DoubleMath.everySixteenthFactorial [ ( n > > 4 ) ] ) ; } }
Source:
public void setTraceOptions ( boolean readFbOnEglSwap , boolean readFbOnGlDraw , boolean readTextureOnGlTexImage ) throws java.io.IOException { int eglSwap = ( readFbOnEglSwap ) ? 1 << ( com.android.ide.eclipse.gltrace.TraceCommandWriter.READ_FB_ON_EGLSWAP_BIT ) : 0 ; int glDraw = ( readFbOnGlDraw ) ? 1 << ( com.android.ide.eclipse.gltrace.TraceCommandWriter.READ_FB_ON_GLDRAW_BIT ) : 0 ; int tex = ( readTextureOnGlTexImage ) ? 1 << ( com.android.ide.eclipse.gltrace.TraceCommandWriter.READ_TEXTURE_DATA_ON_GLTEXIMAGE_BIT ) : 0 ; int cmd = ( eglSwap | glDraw ) | tex ; mStream.writeInt ( cmd ) ; mStream.flush ( ) ; }

Target:
public void setTraceOptions ( boolean readFbOnEglSwap , boolean readFbOnGlDraw , boolean readTextureOnGlTexImage ) throws java.io.IOException { int eglSwap = ( readFbOnEglSwap ) ? 1 << ( com.android.ide.eclipse.gltrace.TraceCommandWriter.READ_FB_ON_EGLSWAP_BIT ) : 0 ; int glDraw = ( readFbOnGlDraw ) ? 1 << ( com.android.ide.eclipse.gltrace.TraceCommandWriter.READ_FB_ON_GLDRAW_BIT ) : 0 ; int tex = ( readTextureOnGlTexImage ) ? 1 << ( com.android.ide.eclipse.gltrace.TraceCommandWriter.READ_TEXTURE_DATA_ON_GLTEXIMAGE_BIT ) : 0 ; int cmd = ( eglSwap | glDraw ) | tex ; mStream.writeInt ( com.android.ide.eclipse.gltrace.TraceCommandWriter.CMD_SIZE ) ; mStream.writeInt ( cmd ) ; mStream.flush ( ) ; }
Source:
protected boolean engineVerify ( byte [ ] sigBytes ) throws java.security.SignatureException { if ( ( key ) == null ) { throw new java.security.SignatureException ( "Need DSA or RSA public key" ) ; } try { int result = org.conscrypt.NativeCrypto.EVP_VerifyFinal ( ctx , sigBytes , 0 , sigBytes.length , key.getPkeyContext ( ) ) ; return result == 1 ; } catch ( java.lang.Exception ex ) { return false ; } finally { destroyContextIfExists ( ) ; } }

Target:
protected boolean engineVerify ( byte [ ] sigBytes ) throws java.security.SignatureException { if ( ( key ) == null ) { throw new java.security.SignatureException ( "Need DSA or RSA public key" ) ; } try { int result = org.conscrypt.NativeCrypto.EVP_VerifyFinal ( ctx , sigBytes , 0 , sigBytes.length , key.getPkeyContext ( ) ) ; return result == 1 ; } catch ( java.lang.Exception ex ) { return false ; } finally { resetContext ( ) ; } }
Source:
public void copy ( @ javax.annotation.Nonnull com.android.sched.vfs.VFile srcFile , @ javax.annotation.Nonnull FILE dstFile ) throws com.android.sched.util.file.WrongPermissionException , java.io.IOException { java.io.InputStream is = srcFile.getInputStream ( ) ; java.io.OutputStream os = dstFile.getOutputStream ( ) ; try { new com.android.sched.util.stream.LocationByteStreamSucker ( is , os , srcFile , dstFile ) . suck ( ) ; } finally { os.close ( ) ; is.close ( ) ; } }

Target:
public void copy ( @ javax.annotation.Nonnull com.android.sched.vfs.VFile srcFile , @ javax.annotation.Nonnull FILE dstFile ) throws com.android.sched.util.file.CannotCloseInputException , com.android.sched.util.file.CannotCloseOutputException , com.android.sched.util.file.CannotReadException , com.android.sched.util.file.CannotWriteException , com.android.sched.util.file.WrongPermissionException { try ( java.io.InputStream is = srcFile.getInputStream ( ) ) { try ( java.io.OutputStream os = dstFile.getOutputStream ( ) ) { new com.android.sched.util.stream.LocationByteStreamSucker ( is , os , srcFile , dstFile ) . suck ( ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseOutputException ( dstFile , e ) ; } } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseInputException ( srcFile , e ) ; } }
Source:
protected com.android.ide.common.internal.PngCruncher getCruncher ( ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.ide.common.internal.CommandLineRunner commandLineRunner = new com.android.ide.common.internal.CommandLineRunner ( logger ) ; java.io.File aapt = new java.io.File ( getSdkDir ( ) , "build-tools/20.0.0/aapt" ) ; assertTrue ( ( "Test requires build-tools 20.0.0 in " + ( aapt.getAbsolutePath ( ) ) ) , aapt.isFile ( ) ) ; return new com.android.ide.common.internal.AaptCruncher ( aapt.getAbsolutePath ( ) , commandLineRunner ) ; }

Target:
protected java.io.File getAapt ( ) { return getAapt ( com.android.sdklib.repository.FullRevision.parseRevision ( "20" ) ) ; }
Source:
public void unscheduleDrawable ( android.graphics.drawable.Drawable who , java.lang.Runnable what ) { if ( ( ( verifyDrawable ( who ) ) && ( what != null ) ) && ( ( mAttachInfo ) != null ) ) { mAttachInfo.mHandler.removeCallbacks ( what , who ) ; } }

Target:
public void scheduleDrawable ( android.graphics.drawable.Drawable who , java.lang.Runnable what , long when ) { if ( ( verifyDrawable ( who ) ) && ( what != null ) ) { if ( ( mAttachInfo ) != null ) { mAttachInfo.mHandler.postAtTime ( what , who , when ) ; } else { android.view.ViewRootImpl.getRunQueue ( ) . postDelayed ( what , ( when - ( android.os.SystemClock.uptimeMillis ( ) ) ) ) ; } } }
Source:
protected void finalize ( ) throws java.lang.Throwable { if ( ! ( mDestroyed ) ) { if ( ( ( mID ) != 0 ) && ( mRS.isAlive ( ) ) ) { mRS.nObjDestroy ( mID ) ; } mRS = null ; mID = 0 ; mDestroyed = true ; } super . finalize ( ) ; }

Target:
private void helpDestroy ( ) { boolean shouldDestroy = false ; synchronized ( this ) { if ( ! ( mDestroyed ) ) { shouldDestroy = true ; mDestroyed = true ; } } if ( shouldDestroy ) { java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock ( ) ; rlock.lock ( ) ; if ( mRS.isAlive ( ) ) { mRS.nObjDestroy ( mID ) ; } rlock.unlock ( ) ; mRS = null ; mID = 0 ; } }
Source:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { if ( event.getSource ( ) . equals ( mUseAdbHost ) ) { mAdbHostValue.setEnabled ( mUseAdbHost.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } }

Target:
public void propertyChange ( org.eclipse.jface.util.PropertyChangeEvent event ) { if ( event.getSource ( ) . equals ( mUseAdbHost ) ) { mAdbHostValue.setEnabled ( mUseAdbHost.getBooleanValue ( ) , getFieldEditorParent ( ) ) ; } else if ( event.getSource ( ) . equals ( mProfilerBufsize ) ) { com.android.ddmlib.DdmPreferences.setProfilerBufferSizeMb ( mProfilerBufsize.getIntValue ( ) ) ; } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final int uid = intent.getIntExtra ( android.content.Intent.EXTRA_UID , ( - 1 ) ) ; if ( uid == ( - 1 ) ) return ; if ( com.android.server.net.NetworkPolicyManagerService.LOGV ) android.util.Slog.v ( com.android.server.net.NetworkPolicyManagerService.TAG , ( "ACTION_UID_REMOVED for uid=" + uid ) ) ; synchronized ( mRulesLock ) { mUidPolicy.delete ( uid ) ; updateRestrictionRulesForUidLocked ( uid ) ; writePolicyLocked ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final int uid = intent.getIntExtra ( android.content.Intent.EXTRA_UID , ( - 1 ) ) ; if ( uid == ( - 1 ) ) return ; if ( com.android.server.net.NetworkPolicyManagerService.LOGV ) android.util.Slog.v ( com.android.server.net.NetworkPolicyManagerService.TAG , ( "ACTION_UID_REMOVED for uid=" + uid ) ) ; synchronized ( mRulesLock ) { mUidPolicy.delete ( uid ) ; removeRestrictBackgroundWhitelistedUidLocked ( uid , true , true ) ; updateRestrictionRulesForUidLocked ( uid ) ; writePolicyLocked ( ) ; } }
Source:
public void testGetPath_SpecifiedApiClassResource ( ) { initializePsiClass ( "\"\"" , "\"abc\"" ) ; initializePsiMethod ( "\"\"" , "\"\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "abc" , path ) ; }

Target:
public void testGetPath_SpecifiedApiClassResource ( ) { initializePsiClass ( "\"\"" , "\"abc\"" ) ; initializePsiMethod ( "\"\"" , "\"\"" , "\"\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "abc" , path ) ; }
Source:
public java.lang.String getDisplayName ( java.util.Locale locale ) { java.util.Objects.requireNonNull ( locale , "locale" ) ; if ( ( rangeUnit ) == ( java.time.temporal.ChronoUnit.YEARS ) ) { sun.util.locale.provider.LocaleResources lr = sun.util.locale.provider.LocaleProviderAdapter.getResourceBundleBased ( ) . getLocaleResources ( locale ) ; java.util.ResourceBundle rb = lr.getJavaTimeFormatData ( ) ; return rb.containsKey ( "field.week" ) ? rb.getString ( "field.week" ) : name ; } return name ; }

Target:
public java.lang.String getDisplayName ( java.util.Locale locale ) { java.util.Objects.requireNonNull ( locale , "locale" ) ; if ( ( rangeUnit ) == ( java.time.temporal.ChronoUnit.YEARS ) ) { android.icu.text.DateTimePatternGenerator dateTimePatternGenerator = android.icu.text.DateTimePatternGenerator.getFrozenInstance ( android.icu.util.ULocale.forLocale ( locale ) ) ; java.lang.String icuName = dateTimePatternGenerator.getAppendItemName ( DateTimePatternGenerator.WEEK_OF_YEAR ) ; return ( icuName != null ) && ( ! ( icuName.isEmpty ( ) ) ) ? icuName : name ; } return name ; }
Source:
protected void startNetStatPoll ( ) { if ( ( ( getOverallState ( ) ) == ( DctConstants.State.CONNECTED ) ) && ( ( mNetStatPollEnabled ) == false ) ) { if ( com.android.internal.telephony.dataconnection.DcTrackerBase.DBG ) log ( "startNetStatPoll" ) ; resetPollStats ( ) ; mNetStatPollEnabled = true ; mPollNetStat.run ( ) ; } }

Target:
void startNetStatPoll ( ) { if ( ( ( getOverallState ( ) ) == ( com.android.internal.telephony.DctConstants.State.CONNECTED ) ) && ( ( mNetStatPollEnabled ) == false ) ) { if ( com.android.internal.telephony.dataconnection.DcTrackerBase.DBG ) { log ( "startNetStatPoll" ) ; } resetPollStats ( ) ; mNetStatPollEnabled = true ; mPollNetStat.run ( ) ; } }
Source:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findVerticalPatch ( int x , int y ) { if ( x < ( ( image.getWidth ( ) ) / 2 ) ) { return getVerticalPatchLeft ( y ) ; } else { return getVerticalPaddingRight ( y ) ; } }

Target:
private com.android.draw9patch.ui.ImageViewer.UpdateRegionInfo findVerticalPatch ( int x , int y ) { java.util.List < com.android.draw9patch.ui.Pair < java.lang.Integer > > markers ; com.android.draw9patch.ui.ImageViewer.UpdateRegion region ; if ( x < ( ( image.getWidth ( ) ) / 2 ) ) { markers = patchInfo.verticalPatchMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.LEFT_PATCH ; } else { markers = patchInfo.verticalPaddingMarkers ; region = com.android.draw9patch.ui.ImageViewer.UpdateRegion.RIGHT_PADDING ; } return getContainingPatch ( markers , y , region ) ; }
Source:
public void testSetupDriverForSoftApModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForSoftApMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IApInterface returnedApInterface = mWifiNative.setupForSoftApMode ( ) ; org.junit.Assert.assertEquals ( null , returnedApInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( false ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForSoftApMode ( ) ; }

Target:
public void testScan ( ) throws java.lang.Exception { mWifiNative.scan ( com.android.server.wifi.WifiNativeTest.SCAN_FREQ_SET , com.android.server.wifi.WifiNativeTest.SCAN_HIDDEN_NETWORK_SSID_SET ) ; org.mockito.Mockito.verify ( mWificondControl ) . scan ( com.android.server.wifi.WifiNativeTest.SCAN_FREQ_SET , com.android.server.wifi.WifiNativeTest.SCAN_HIDDEN_NETWORK_SSID_SET ) ; }
Source:
private static void assertTimeZoneIdUsedInCountry ( java.lang.String isoCountryCode , java.lang.String timeZoneId ) { java.util.List < java.lang.String > zoneIdsByCountry = libcore.util.TimeZoneFinder.getInstance ( ) . lookupTimeZoneIdsByCountry ( isoCountryCode ) ; org.junit.Assert.assertTrue ( ( ( timeZoneId + " must be used in " ) + isoCountryCode ) , zoneIdsByCountry.contains ( timeZoneId ) ) ; }

Target:
private static void assertOffsetResultZoneCountry ( java.lang.String isoCountryCode , com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult lookupResult ) { java.lang.String timeZoneId = lookupResult.zoneId ; java.util.List < java.lang.String > zoneIdsByCountry = libcore.util.TimeZoneFinder.getInstance ( ) . lookupTimeZoneIdsByCountry ( isoCountryCode ) ; org.junit.Assert.assertTrue ( ( ( timeZoneId + " must be used in " ) + isoCountryCode ) , zoneIdsByCountry.contains ( timeZoneId ) ) ; }
Source:
protected void replaceUpdated ( java.io.File from , java.io.File dest ) throws java.io.IOException { if ( ! ( dest.delete ( ) ) ) throw new java.io.IOException ( ( "Cannot delete file " + dest ) ) ; com.intellij.updater.Utils.copy ( from , dest ) ; }

Target:
protected void replaceUpdated ( java.io.File from , java.io.File dest ) throws java.io.IOException { if ( ( dest.exists ( ) ) && ( ! ( dest.delete ( ) ) ) ) throw new java.io.IOException ( ( "Cannot delete file " + dest ) ) ; com.intellij.updater.Utils.copy ( from , dest ) ; }
Source:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ReadZipFS.ZipVFile file ) { try { return zipFile.getInputStream ( file.getZipEntry ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
java.io.InputStream openRead ( @ javax.annotation.Nonnull com.android.sched.vfs.ReadZipFS.ZipVFile file ) { try { com.android.sched.util.log.Tracer tracer = getTracer ( ) ; if ( tracer != null ) { tracer.getStatistic ( com.android.sched.vfs.ReadZipFS.OPENED_ZIP_ENTRIES ) . incValue ( ) ; } return zipFile.getInputStream ( file.getZipEntry ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } }
Source:
private boolean waitForObject ( ) { while ( true ) { java.lang.Object object = java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingObject ; if ( object != null ) { return true ; } synchronized ( this ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { return false ; } catch ( java.lang.OutOfMemoryError e ) { return false ; } } } }

Target:
private synchronized boolean sleepUntilNeeded ( ) { while ( ! ( needToWork ) ) { try { wait ( ) ; } catch ( java.lang.InterruptedException e ) { return false ; } catch ( java.lang.OutOfMemoryError e ) { return false ; } } return true ; }
Source:
public void test_parkFor_2 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; }

Target:
public void test_parkFor_2 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; waiterThread.join ( ) ; parkerThread.join ( ) ; }