auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void validateCopyConstructorWithValidSource ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration sourceConfig = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; sourceConfig.homeSp = android.net.wifi.hotspot2.PasspointConfigurationTest.createHomeSp ( ) ; sourceConfig.credential = android.net.wifi.hotspot2.PasspointConfigurationTest.createCredential ( ) ; android.net.wifi.hotspot2.PasspointConfiguration copyConfig = new android.net.wifi.hotspot2.PasspointConfiguration ( sourceConfig ) ; org.junit.Assert.assertTrue ( copyConfig.equals ( sourceConfig ) ) ; }

Target:
public void validateCopyConstructorWithValidSource ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration sourceConfig = android.net.wifi.hotspot2.PasspointConfigurationTest.createConfig ( ) ; android.net.wifi.hotspot2.PasspointConfiguration copyConfig = new android.net.wifi.hotspot2.PasspointConfiguration ( sourceConfig ) ; org.junit.Assert.assertTrue ( copyConfig.equals ( sourceConfig ) ) ; }
Source:
private void addActiveLog ( java.lang.String packageName , boolean enable ) { synchronized ( mActiveLogs ) { if ( ( mActiveLogs.size ( ) ) > 10 ) { mActiveLogs.remove ( ) ; } mActiveLogs.add ( new com.android.server.BluetoothManagerService.ActiveLog ( packageName , enable , java.lang.System.currentTimeMillis ( ) ) ) ; } }

Target:
private void addActiveLog ( java.lang.String packageName , boolean enable ) { synchronized ( mActiveLogs ) { if ( ( mActiveLogs.size ( ) ) > ( com.android.server.BluetoothManagerService.ACTIVE_LOG_MAX_SIZE ) ) { mActiveLogs.remove ( ) ; } mActiveLogs.add ( new com.android.server.BluetoothManagerService.ActiveLog ( packageName , enable , java.lang.System.currentTimeMillis ( ) ) ) ; } }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { if ( ( mCurrentDevice ) != null ) { com.android.ddmuilib.ScreenShotDialog dlg = new com.android.ddmuilib.ScreenShotDialog ( shell ) ; dlg.open ( mCurrentDevice ) ; } }

Target:
public void menuShown ( org.eclipse.swt.events.MenuEvent e ) { boolean deviceEnabled = ( mCurrentDevice ) != null ; screenShotItem.setEnabled ( deviceEnabled ) ; explorerItem.setEnabled ( deviceEnabled ) ; processItem.setEnabled ( deviceEnabled ) ; deviceStateItem.setEnabled ( deviceEnabled ) ; appStateItem.setEnabled ( deviceEnabled ) ; radioStateItem.setEnabled ( deviceEnabled ) ; logCatItem.setEnabled ( deviceEnabled ) ; screenRecordItem.setEnabled ( ( ( ( mCurrentDevice ) != null ) && ( mCurrentDevice.supportsFeature ( IDevice.Feature.SCREEN_RECORD ) ) ) ) ; }
Source:
private void handleSessionEnd ( ) { com.android.internal.telephony.cat.CatLog.d ( this , ( "SESSION END on " + ( mSlotId ) ) ) ; mCurrntCmd = mMenuCmd ; android.content.Intent intent = new android.content.Intent ( AppInterface.CAT_SESSION_END_ACTION ) ; intent.putExtra ( "SLOT_ID" , mSlotId ) ; mContext.sendBroadcast ( intent , AppInterface.STK_PERMISSION ) ; }

Target:
private void handleSessionEnd ( ) { com.android.internal.telephony.cat.CatLog.d ( this , ( "SESSION END on " + ( mSlotId ) ) ) ; mCurrntCmd = mMenuCmd ; android.content.Intent intent = new android.content.Intent ( AppInterface.CAT_SESSION_END_ACTION ) ; intent.putExtra ( "SLOT_ID" , mSlotId ) ; intent.setComponent ( com.android.internal.telephony.cat.AppInterface.getDefaultSTKApplication ( ) ) ; mContext.sendBroadcast ( intent , AppInterface.STK_PERMISSION ) ; }
Source:
public boolean connectAudio ( ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.connectAudio ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }

Target:
public boolean disconnectAudio ( ) { final android.bluetooth.IBluetoothHeadset service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { return service.disconnectAudio ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }
Source:
public com.google.common.collect.SortedMultiset < E > subMultiset ( E fromElement , com.google.common.collect.BoundType fromBoundType , E toElement , com.google.common.collect.BoundType toBoundType ) { return forwardMultiset ( ) . subMultiset ( toElement , toBoundType , fromElement , fromBoundType ) . descendingMultiset ( ) ; }

Target:
public java.util.NavigableSet < E > subSet ( E fromElement , boolean fromInclusive , E toElement , boolean toInclusive ) { return new com.google.common.collect.SortedMultisets.NavigableElementSet < E > ( multiset ( ) . subMultiset ( fromElement , com.google.common.collect.BoundType.forBoolean ( fromInclusive ) , toElement , com.google.common.collect.BoundType.forBoolean ( toInclusive ) ) ) ; }
Source:
public void testParseNonAscii ( ) throws java.lang.Exception { assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( "＋1 (650) 253-0000" , RegionCode.SG ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( "1 (650) 253­-0000" , RegionCode.US ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( ( "＋１ （６５０）" + ( " ２５３－０００" + "０" ) ) , RegionCode.SG ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( ( "＋１ （６５０）" + ( " ２５３ー０００" + "０" ) ) , RegionCode.SG ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( ( "᠑ ᠖᠕᠐ " + "᠒᠕᠓ ᠐᠐᠐᠐" ) , RegionCode.US ) ) ; }

Target:
public void testParseNonAscii ( ) throws java.lang.Exception { assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( "＋1 (650) 253-0000" , RegionCode.SG ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( "1 (650) 253­-0000" , RegionCode.US ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( ( "＋１ （６５０）" + " ２５３－００００" ) , RegionCode.SG ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( ( "＋１ （６５０）" + " ２５３ー００００" ) , RegionCode.SG ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.US_NUMBER , phoneUtil.parse ( ( "᠑ ᠖᠕᠐ " + "᠒᠕᠓ ᠐᠐᠐᠐" ) , RegionCode.US ) ) ; }
Source:
protected java.lang.String getName ( ) { return com.android.bluetooth.hdp.HealthService.TAG ; }

Target:
public static synchronized com.android.bluetooth.hdp.HealthService getHealthService ( ) { if ( ( com.android.bluetooth.hdp.HealthService.sHealthService ) == null ) { android.util.Log.w ( com.android.bluetooth.hdp.HealthService.TAG , "getHealthService(): service is null" ) ; return null ; } if ( ! ( com.android.bluetooth.hdp.HealthService.sHealthService.isAvailable ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hdp.HealthService.TAG , "getHealthService(): service is not available" ) ; return null ; } return com.android.bluetooth.hdp.HealthService.sHealthService ; }
Source:
public void setClientCertificateAlias ( java.lang.String alias ) { setFieldValue ( android.net.wifi.WifiEnterpriseConfig.CLIENT_CERT_KEY , alias , android.net.wifi.WifiEnterpriseConfig.CLIENT_CERT_PREFIX ) ; setFieldValue ( android.net.wifi.WifiEnterpriseConfig.PRIVATE_KEY_ID_KEY , alias , Credentials.USER_PRIVATE_KEY ) ; if ( android.text.TextUtils.isEmpty ( alias ) ) { mFields.put ( android.net.wifi.WifiEnterpriseConfig.ENGINE_KEY , android.net.wifi.WifiEnterpriseConfig.ENGINE_DISABLE ) ; mFields.put ( android.net.wifi.WifiEnterpriseConfig.ENGINE_ID_KEY , android.net.wifi.WifiEnterpriseConfig.EMPTY_VALUE ) ; } else { mFields.put ( android.net.wifi.WifiEnterpriseConfig.ENGINE_KEY , android.net.wifi.WifiEnterpriseConfig.ENGINE_ENABLE ) ; mFields.put ( android.net.wifi.WifiEnterpriseConfig.ENGINE_ID_KEY , convertToQuotedString ( android.net.wifi.WifiEnterpriseConfig.ENGINE_ID_KEYSTORE ) ) ; } }

Target:
public void setClientCertificateAlias ( java.lang.String alias ) { setFieldValue ( android.net.wifi.WifiEnterpriseConfig.CLIENT_CERT_KEY , alias , android.net.wifi.WifiEnterpriseConfig.CLIENT_CERT_PREFIX ) ; setFieldValue ( android.net.wifi.WifiEnterpriseConfig.PRIVATE_KEY_ID_KEY , alias , Credentials.USER_PRIVATE_KEY ) ; if ( android.text.TextUtils.isEmpty ( alias ) ) { setFieldValue ( android.net.wifi.WifiEnterpriseConfig.ENGINE_KEY , android.net.wifi.WifiEnterpriseConfig.ENGINE_DISABLE ) ; setFieldValue ( android.net.wifi.WifiEnterpriseConfig.ENGINE_ID_KEY , "" ) ; } else { setFieldValue ( android.net.wifi.WifiEnterpriseConfig.ENGINE_KEY , android.net.wifi.WifiEnterpriseConfig.ENGINE_ENABLE ) ; setFieldValue ( android.net.wifi.WifiEnterpriseConfig.ENGINE_ID_KEY , android.net.wifi.WifiEnterpriseConfig.ENGINE_ID_KEYSTORE ) ; } }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; final boolean succeded ; synchronized ( mInstallLock ) { succeded = deleteApplicationCacheFilesLI ( packageName ) ; } if ( observer != null ) { try { observer.onRemoveCompleted ( packageName , succeded ) ; } catch ( android.os.RemoteException e ) { android.util.Log.i ( com.android.server.pm.PackageManagerService.TAG , "Observer no longer exists." ) ; } } }

Target:
private void unloadAllContainers ( java.util.Set < com.android.server.pm.PackageManagerService.AsecInstallArgs > cidArgs ) { for ( com.android.server.pm.PackageManagerService.AsecInstallArgs arg : cidArgs ) { synchronized ( mInstallLock ) { arg.doPostDeleteLI ( false ) ; } } }
Source:
final void put ( double [ ] src , int srcOffset , int doubleCount ) { int byteCount = checkPutBounds ( SizeOf.DOUBLE , src.length , srcOffset , doubleCount ) ; this . block.pokeDoubleArray ( ( ( offset ) + ( position ) ) , src , srcOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( double [ ] src , int srcOffset , int doubleCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.DOUBLE , src.length , srcOffset , doubleCount ) ; this . block.pokeDoubleArray ( ( ( offset ) + ( position ) ) , src , srcOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }
Source:
public java.lang.String getType ( android.net.Uri url ) { switch ( com.android.providers.telephony.TelephonyProvider.s_urlMatcher.match ( url ) ) { case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY : case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY_USING_SUBID : return "vnd.android.cursor.dir/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_ID : case com.android.providers.telephony.TelephonyProvider.URL_FILTERED_ID : return "vnd.android.cursor.item/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE : return "vnd.android.cursor.item/telephony-carrier" ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown URL " + url ) ) ; } }

Target:
public java.lang.String getType ( android.net.Uri url ) { switch ( com.android.providers.telephony.TelephonyProvider.s_urlMatcher.match ( url ) ) { case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY : case com.android.providers.telephony.TelephonyProvider.URL_TELEPHONY_USING_SUBID : return "vnd.android.cursor.dir/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_ID : case com.android.providers.telephony.TelephonyProvider.URL_FILTERED_ID : return "vnd.android.cursor.item/telephony-carrier" ; case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE_USING_SUBID : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPN_NO_UPDATE : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPNSET : case com.android.providers.telephony.TelephonyProvider.URL_PREFERAPNSET_USING_SUBID : return "vnd.android.cursor.item/telephony-carrier" ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown URL " + url ) ) ; } }
Source:
public void parseCacheHeaders_cacheControlMustRevalidate ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now + ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; headers.put ( "Cache-Control" , "must-revalidate" ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEqualsWithin ( now , entry.ttl , com.android.volley.toolbox.HttpHeaderParserTest.ONE_MINUTE_MILLIS ) ; assertEquals ( entry.softTtl , entry.ttl ) ; }

Target:
public void parseCacheHeaders_cacheControlMustRevalidateNoMaxAge ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now + ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; headers.put ( "Cache-Control" , "must-revalidate" ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEqualsWithin ( now , entry.ttl , com.android.volley.toolbox.HttpHeaderParserTest.ONE_MINUTE_MILLIS ) ; assertEquals ( entry.softTtl , entry.ttl ) ; }
Source:
protected boolean cleanup ( ) { if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mInputDevices ) != null ) { mInputDevices.clear ( ) ; } com.android.bluetooth.hid.HidService.clearHidService ( ) ; return true ; }

Target:
protected boolean cleanup ( ) { if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mInputDevices ) != null ) { for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; if ( inputDeviceState != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { broadcastConnectionState ( device , BluetoothProfile.STATE_DISCONNECTED ) ; } } mInputDevices.clear ( ) ; } com.android.bluetooth.hid.HidService.clearHidService ( ) ; return true ; }
Source:
public static com.android.dialer.contactactions.IntentModule newCallModule ( android.content.Context context , java.lang.String number , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.precall.PreCall.getIntent ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setPhoneAccountHandle ( phoneAccountHandle ) ) , R.string.call , R.drawable.quantum_ic_call_white_24 ) ; }

Target:
public static com.android.dialer.contactactions.IntentModule newCallModule ( android.content.Context context , java.lang.String number , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.contactactions.IntentModule ( context , com.android.dialer.precall.PreCall.getIntent ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setPhoneAccountHandle ( phoneAccountHandle ) ) , R.string.voice_call , R.drawable.quantum_ic_call_white_24 ) ; }
Source:
public static void setEndpointIdentificationAlgorithm ( javax.net.ssl.SSLParameters params , java.lang.String endpointIdentificationAlgorithm ) { params.setEndpointIdentificationAlgorithm ( endpointIdentificationAlgorithm ) ; }

Target:
public static void setSSLParameters ( javax.net.ssl.SSLParameters params , org.conscrypt.SSLParametersImpl impl , org.conscrypt.OpenSSLSocketImpl socket ) { impl.setEndpointIdentificationAlgorithm ( params.getEndpointIdentificationAlgorithm ( ) ) ; java.util.List < javax.net.ssl.SNIServerName > serverNames = params.getServerNames ( ) ; if ( serverNames != null ) { for ( javax.net.ssl.SNIServerName serverName : serverNames ) { if ( ( serverName.getType ( ) ) == ( javax.net.ssl.StandardConstants.SNI_HOST_NAME ) ) { socket.setHostname ( ( ( javax.net.ssl.SNIHostName ) ( serverName ) ) . getAsciiName ( ) ) ; break ; } } } }
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { java.util.regex.Matcher m = com.android.ide.eclipse.adt.internal.resources.configurations.ScreenDimensionQualifier.sDimensionPattern.matcher ( value ) ; if ( m.matches ( ) ) { java.lang.String d1 = m.group ( 1 ) ; java.lang.String d2 = m.group ( 2 ) ; com.android.ide.eclipse.adt.internal.resources.configurations.ScreenDimensionQualifier qualifier = com.android.ide.eclipse.adt.internal.resources.configurations.ScreenDimensionQualifier.getQualifier ( d1 , d2 ) ; if ( qualifier != null ) { config.setScreenDimensionQualifier ( qualifier ) ; return true ; } } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.common.resources.configuration.FolderConfiguration config ) { java.util.regex.Matcher m = com.android.ide.common.resources.configuration.ScreenDimensionQualifier.sDimensionPattern.matcher ( value ) ; if ( m.matches ( ) ) { java.lang.String d1 = m.group ( 1 ) ; java.lang.String d2 = m.group ( 2 ) ; com.android.ide.common.resources.configuration.ScreenDimensionQualifier qualifier = com.android.ide.common.resources.configuration.ScreenDimensionQualifier.getQualifier ( d1 , d2 ) ; if ( qualifier != null ) { config.setScreenDimensionQualifier ( qualifier ) ; return true ; } } return false ; }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nScriptInvokeV ( long id , int slot , byte [ ] params , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptInvokeV ( curCon , id , slot , params , mUseInc ) ; }
Source:
public void checkValidity ( ) { if ( ! ( ( ( ( ( ( parent ) instanceof com.android.jack.ir.ast.JLocal ) || ( ( parent ) instanceof com.android.jack.ir.ast.JParameter ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JMethod ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JField ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JCastOperation ) ) ) { throw new com.android.jack.ir.InternalCompilerException ( this , "Invalid parent" ) ; } }

Target:
public void checkValidity ( ) { if ( ! ( ( ( ( ( ( parent ) instanceof com.android.jack.ir.ast.JLocal ) || ( ( parent ) instanceof com.android.jack.ir.ast.JParameter ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JMethod ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JField ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JCastOperation ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent" ) ; } }
Source:
public static void setDefault ( com.ibm.icu.util.ULocale.Category category , java.util.Locale newLocale ) { if ( com.ibm.icu.util.ULocale.JDKLocaleHelper.isJava7orNewer ) { java.lang.Object cat = null ; switch ( category ) { case DISPLAY : cat = com.ibm.icu.util.ULocale.JDKLocaleHelper.eDISPLAY ; break ; case FORMAT : cat = com.ibm.icu.util.ULocale.JDKLocaleHelper.eFORMAT ; break ; } if ( cat != null ) { try { com.ibm.icu.util.ULocale.JDKLocaleHelper.mSetDefault.invoke ( null , cat , newLocale ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { } catch ( java.lang.IllegalArgumentException e ) { } catch ( java.lang.IllegalAccessException e ) { } } } }

Target:
public static void setDefault ( com.ibm.icu.util.ULocale.Category category , java.util.Locale newLocale ) { if ( com.ibm.icu.util.ULocale.JDKLocaleHelper.hasLocaleCategories ) { java.lang.Object cat = null ; switch ( category ) { case DISPLAY : cat = com.ibm.icu.util.ULocale.JDKLocaleHelper.eDISPLAY ; break ; case FORMAT : cat = com.ibm.icu.util.ULocale.JDKLocaleHelper.eFORMAT ; break ; } if ( cat != null ) { try { com.ibm.icu.util.ULocale.JDKLocaleHelper.mSetDefault.invoke ( null , cat , newLocale ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { } catch ( java.lang.IllegalArgumentException e ) { } catch ( java.lang.IllegalAccessException e ) { } } } }
Source:
public void testFormatIpv4MappedAddress ( ) throws java.lang.Exception { byte [ ] mappedAddress = new byte [ ] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 1 , - 1 , 127 , 0 , 0 , 1 } ; assertEquals ( "127.0.0.1" , formatIpAddress ( mappedAddress ) ) ; }

Target:
public void testFormatIpv4MappedAddress ( ) throws java.lang.Exception { byte [ ] mappedAddress = new byte [ ] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 1 , - 1 , 127 , 0 , 0 , 1 } ; java.lang.String decoded = formatIpAddress ( mappedAddress ) ; assertTrue ( decoded , ( ( decoded.equals ( "127.0.0.1" ) ) || ( decoded.equalsIgnoreCase ( "::ffff:127.0.0.1" ) ) ) ) ; }
Source:
private static boolean isCommittedInChainedCalls ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.MethodInvocation node ) { lombok.ast.Node parent = node.getParent ( ) ; while ( parent instanceof lombok.ast.MethodInvocation ) { lombok.ast.MethodInvocation methodInvocation = ( ( lombok.ast.MethodInvocation ) ( parent ) ) ; if ( ( com.android.tools.lint.checks.CleanupDetector.isTransactionCommitMethodCall ( context , methodInvocation ) ) || ( com.android.tools.lint.checks.CleanupDetector.isShowFragmentMethodCall ( context , methodInvocation ) ) ) { return true ; } parent = parent.getParent ( ) ; } return false ; }

Target:
private static boolean isSharedEditorCreation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull com.intellij.psi.PsiMethod method ) { java.lang.String methodName = method.getName ( ) ; if ( com.android.tools.lint.checks.CleanupDetector.EDIT.equals ( methodName ) ) { com.intellij.psi.PsiClass containingClass = method.getContainingClass ( ) ; com.android.tools.lint.client.api.JavaEvaluator evaluator = context.getEvaluator ( ) ; return evaluator.extendsClass ( containingClass , com.android.tools.lint.checks.CleanupDetector.ANDROID_CONTENT_SHARED_PREFERENCES , false ) ; } return false ; }
Source:
public void registerForDataRoamingOff ( android.os.Handler h , int what , java.lang.Object obj ) { android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mDataRoamingOffRegistrants.add ( r ) ; if ( ! ( mSS.getDataRoaming ( ) ) ) { r.notifyRegistrant ( ) ; } }

Target:
public void registerForDataRoamingOff ( android.os.Handler h , int what , java.lang.Object obj , boolean notifyNow ) { android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mDataRoamingOffRegistrants.add ( r ) ; if ( notifyNow && ( ! ( mSS.getDataRoaming ( ) ) ) ) { r.notifyRegistrant ( ) ; } }
Source:
boolean hasCallbackAlreadyHappened ( int callback ) { synchronized ( mLocalLock ) { java.util.Iterator < java.lang.Integer > it = mCallbackQueue.iterator ( ) ; while ( it.hasNext ( ) ) { if ( ( it.next ( ) ) == callback ) { return true ; } } } return false ; }

Target:
boolean hasCallbackAlreadyHappened ( int callback ) { synchronized ( mLocalLock ) { return mCallbackQueue.contains ( callback ) ; } }
Source:
public void getDataRegistrationStateResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.DataRegStateResult dataRegResponse ) { responseStrings ( responseInfo , java.lang.Integer.toString ( dataRegResponse.regState ) , java.lang.Integer.toString ( dataRegResponse.lac ) , java.lang.Integer.toString ( dataRegResponse.cid ) , java.lang.Integer.toString ( dataRegResponse.rat ) , java.lang.Integer.toString ( dataRegResponse.reasonDataDenied ) , java.lang.Integer.toString ( dataRegResponse.maxDataCalls ) , java.lang.Integer.toString ( dataRegResponse.tac ) , java.lang.Integer.toString ( dataRegResponse.phyCid ) , java.lang.Integer.toString ( dataRegResponse.eci ) , java.lang.Integer.toString ( dataRegResponse.csgid ) , java.lang.Integer.toString ( dataRegResponse.tadv ) ) ; }

Target:
public void getDataRegistrationStateResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.DataRegStateResult dataRegResponse ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , dataRegResponse ) ; } mRil.processResponseDone ( rr , responseInfo , dataRegResponse ) ; } }
Source:
static void rethrow ( final java.lang.Throwable ex ) { if ( ex != null ) { if ( ex instanceof java.lang.Error ) throw ( ( java.lang.Error ) ( ex ) ) ; if ( ex instanceof java.lang.RuntimeException ) throw ( ( java.lang.RuntimeException ) ( ex ) ) ; throw java.util.concurrent.ForkJoinTask.uncheckedThrowable ( ex , java.lang.RuntimeException.class ) ; } }

Target:
public final boolean exec ( ) { runnable.run ( ) ; return true ; }
Source:
public static void main ( java.lang.String [ ] args ) { Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; Main.testEnvironment ( ) ; Main.testNewStringObject ( ) ; Main.testSignalHandler ( ) ; Main.testGetErrorByLoadInvalidLibrary ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; Main.testEnvironment ( ) ; Main.testNewStringObject ( ) ; Main.testSignalHandler ( ) ; Main.testGetErrorByLoadInvalidLibrary ( ) ; Main.testSignalHandlerNotReturn ( ) ; }
Source:
public void registerForRecordsLoaded ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mRecordsLoadedRegistrants.add ( r ) ; if ( ( ( mRecordsToLoad ) == 0 ) && ( ( mRecordsRequested ) == true ) ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }

Target:
public void registerForRecordsLoaded ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mRecordsLoadedRegistrants.add ( r ) ; if ( getRecordsLoaded ( ) ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }
Source:
void tearDown ( ) { mNm.cancelAll ( ) ; deleteChannel ( ) ; com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . resetData ( ) ; }

Target:
protected void test ( ) { if ( ( ( mNm.getEffectsSuppressor ( ) ) == null ) && ( ( ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) ) == null ) || ( ! ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . isConnected ) ) ) ) { status = PASS ; } else { if ( ( -- ( mRetries ) ) > 0 ) { sleep ( 100 ) ; status = RETEST ; } else { status = FAIL ; } } }
Source:
public static java.lang.String map2AlgName ( java.lang.String oid ) { java.lang.String algUC = org.apache.harmony.security.utils.AlgNameMapper.oid2AlgMap.get ( oid ) ; if ( algUC != null ) { return org.apache.harmony.security.utils.AlgNameMapper.algAliasesMap.get ( algUC ) ; } org.apache.harmony.security.utils.AlgNameMapperSource s = org.apache.harmony.security.utils.AlgNameMapper.source ; if ( s != null ) { return s.mapOidToName ( oid ) ; } return null ; }

Target:
public static java.lang.String map2AlgName ( java.lang.String oid ) { org.apache.harmony.security.utils.AlgNameMapper.checkCacheVersion ( ) ; java.lang.String algUC = org.apache.harmony.security.utils.AlgNameMapper.oid2AlgMap.get ( oid ) ; if ( algUC != null ) { return org.apache.harmony.security.utils.AlgNameMapper.algAliasesMap.get ( algUC ) ; } org.apache.harmony.security.utils.AlgNameMapperSource s = org.apache.harmony.security.utils.AlgNameMapper.source ; if ( s != null ) { return s.mapOidToName ( oid ) ; } return null ; }
Source:
public void removePackageFromPreferred ( java.lang.String packageName ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.SET_PREFERRED_APPLICATIONS , null ) ; synchronized ( mPackages ) { android.content.pm.PackageParser.Package p = mPackages.get ( packageName ) ; if ( p == null ) { return ; } if ( ( p.mPreferredOrder ) > 0 ) { com.android.server.PackageManagerService.PackageSetting ps = ( ( com.android.server.PackageManagerService.PackageSetting ) ( p.mExtras ) ) ; if ( ps != null ) { mSettings.mPreferredPackages.remove ( ps ) ; p.mPreferredOrder = 0 ; updatePreferredIndicesLP ( ) ; mSettings.writeLP ( ) ; } } } }

Target:
public void addPackageToPreferred ( java.lang.String packageName ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.SET_PREFERRED_APPLICATIONS , null ) ; com.android.server.Log.w ( com.android.server.PackageManagerService.TAG , "addPackageToPreferred: no longer implemented" ) ; }
Source:
private void grow ( int minCapacity ) { int oldCapacity = buf.length ; int newCapacity = oldCapacity << 1 ; if ( ( newCapacity - minCapacity ) < 0 ) newCapacity = minCapacity ; if ( newCapacity < 0 ) { if ( minCapacity < 0 ) throw new java.lang.OutOfMemoryError ( ) ; newCapacity = java.lang.Integer.MAX_VALUE ; } buf = java.util.Arrays.copyOf ( buf , newCapacity ) ; }

Target:
private static int hugeCapacity ( int minCapacity ) { if ( minCapacity < 0 ) throw new java.lang.OutOfMemoryError ( ) ; return minCapacity > ( java.io.ByteArrayOutputStream.MAX_ARRAY_SIZE ) ? java.lang.Integer.MAX_VALUE : java.io.ByteArrayOutputStream.MAX_ARRAY_SIZE ; }
Source:
public void test_accept ( ) throws java.lang.Exception { java.net.ServerSocket s = new java.net.ServerSocket ( 0 ) ; new libcore.java.net.ConcurrentCloseTest.Killer ( s ) . start ( ) ; try { java.lang.System.err.println ( "accept..." ) ; s.accept ( ) ; fail ( "accept returned!" ) ; } catch ( java.net.SocketException expected ) { assertEquals ( "Socket closed" , expected.getMessage ( ) ) ; } }

Target:
public void test_accept ( ) throws java.lang.Exception { java.net.ServerSocket ss = new java.net.ServerSocket ( 0 ) ; new libcore.java.net.ConcurrentCloseTest.Killer ( ss ) . start ( ) ; try { java.lang.System.err.println ( "accept..." ) ; java.net.Socket s = ss.accept ( ) ; fail ( ( ( "accept returned " + s ) + "!" ) ) ; } catch ( java.net.SocketException expected ) { assertEquals ( "Socket closed" , expected.getMessage ( ) ) ; } }
Source:
public void testResetBatteryLevel_testResetBeforeUpdate ( ) { com.android.bluetooth.btservice.RemoteDevices remoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; remoteDevices.resetBatteryLevel ( mDevice1 ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testResetBatteryLevel_testResetBeforeUpdate ( ) { org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.resetBatteryLevel ( mDevice1 ) ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }
Source:
public void notInBadgingOutput ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; failure.reset ( ) ; subject.checkMaxSdkVersion ( strings , 1 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "maxSdkVersion not found in badging output for <foo>" ) ; }

Target:
public void notInBadgingOutput ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; failure.reset ( ) ; subject.checkMaxSdkVersion ( strings , 1 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . isEqualTo ( "maxSdkVersion not found in badging output for <foo>" ) ; }
Source:
public static android.telephony.MbmsStreamingManager create ( android.content.Context context , android.telephony.mbms.IMbmsStreamingManagerCallback listener , java.lang.String streamingAppName ) throws android.telephony.mbms.MbmsException { int subId = android.telephony.SubscriptionManager.getDefaultSubscriptionId ( ) ; android.telephony.MbmsStreamingManager manager = new android.telephony.MbmsStreamingManager ( context , listener , streamingAppName , subId ) ; manager.bindAndInitialize ( ) ; return manager ; }

Target:
public static android.telephony.MbmsStreamingManager create ( android.content.Context context , android.telephony.mbms.MbmsStreamingManagerCallback listener , java.lang.String streamingAppName ) throws android.telephony.mbms.MbmsException { int subId = android.telephony.SubscriptionManager.getDefaultSubscriptionId ( ) ; android.telephony.MbmsStreamingManager manager = new android.telephony.MbmsStreamingManager ( context , listener , streamingAppName , subId ) ; manager.bindAndInitialize ( ) ; return manager ; }
Source:
public final org.jf.dexlib2.iface.reference.FieldReference field_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.FieldReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableFieldReference fully_qualified_field208 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_FIELD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_FIELD_in_field_literal3569 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_fully_qualified_field_in_field_literal3571 ) ; fully_qualified_field208 = fully_qualified_field ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = fully_qualified_field208 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final org.jf.dexlib2.iface.reference.FieldReference enum_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.FieldReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableFieldReference field_reference210 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_ENUM , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_ENUM_in_enum_literal3617 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_field_reference_in_enum_literal3619 ) ; field_reference210 = field_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = field_reference210 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public boolean implies ( java.security.Permission permission ) { if ( ! ( permission instanceof javax.crypto.CryptoPermission ) ) { return false ; } javax.crypto.CryptoPermission cryptoPerm = ( ( javax.crypto.CryptoPermission ) ( permission ) ) ; java.security.PermissionCollection pc = getPermissionCollection ( cryptoPerm.getAlgorithm ( ) ) ; return pc.implies ( cryptoPerm ) ; }

Target:
public void add ( java.security.Permission permission ) { }
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 java.lang.ref.FinalizerReference < ? > waitForFinalization ( ) { long startCount = java.lang.Daemons.FinalizerDaemon.INSTANCE.progressCounter.get ( ) ; sleepFor ( java.lang.Daemons.MAX_FINALIZE_NANOS ) ; if ( ( getNeedToWork ( ) ) && ( ( java.lang.Daemons.FinalizerDaemon.INSTANCE.progressCounter.get ( ) ) == startCount ) ) { java.lang.ref.FinalizerReference < ? > finalizing = java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingObject ; sleepFor ( java.lang.Daemons.NANOS_PER_SECOND ) ; if ( ( getNeedToWork ( ) ) && ( ( java.lang.Daemons.FinalizerDaemon.INSTANCE.progressCounter.get ( ) ) == startCount ) ) { return finalizing ; } } return null ; }
Source:
private void extractFuzzyImage ( java.lang.String name ) { android.graphics.Bitmap mBitmap = android.graphics.Bitmap.createBitmap ( buffers.inputImage.getWidth ( ) , buffers.inputImage.getHeight ( ) , Bitmap.Config.ARGB_8888 ) ; android.renderscript.Allocation mAllocation = android.renderscript.Allocation.createFromBitmap ( renderScript , mBitmap ) ; scriptC.forEach_PackFuzzyImage ( mAllocation ) ; mAllocation.copyTo ( mBitmap ) ; android.renderscript.cts.refocus.MediaStoreSaver.savePNG ( mBitmap , "fuzzyF32" , name , renderScript.getApplicationContext ( ) ) ; }

Target:
private void extractFuzzyImage ( java.lang.String name ) { android.graphics.Bitmap mBitmap = android.graphics.Bitmap.createBitmap ( buffers.inputImage.getWidth ( ) , buffers.inputImage.getHeight ( ) , Bitmap.Config.ARGB_8888 ) ; android.renderscript.Allocation mAllocation = android.renderscript.Allocation.createFromBitmap ( renderScript , mBitmap ) ; scriptC.forEach_PackFuzzyImage ( mAllocation ) ; mAllocation.copyTo ( mBitmap ) ; android.renderscript.cts.refocus.MediaStoreSaver.savePNG ( mBitmap , "fuzzyF32" , name , renderScript.getApplicationContext ( ) ) ; mAllocation.destroy ( ) ; }
Source:
public native void set ( long millis ) ;

Target:
public void copyFieldsToTime ( android.text.format.Time time ) { time.second = wallTime.getSecond ( ) ; time.minute = wallTime.getMinute ( ) ; time.hour = wallTime.getHour ( ) ; time.monthDay = wallTime.getMonthDay ( ) ; time.month = wallTime.getMonth ( ) ; time.year = wallTime.getYear ( ) ; time.weekDay = wallTime.getWeekDay ( ) ; time.yearDay = wallTime.getYearDay ( ) ; time.isDst = wallTime.getIsDst ( ) ; time.gmtoff = wallTime.getGmtOffset ( ) ; }
Source:
private void displayPage ( int index ) { org.eclipse.swt.widgets.Composite page = mPages.get ( index ) ; if ( page != null ) { mStackLayout.topControl = page ; mPagesRootComposite.layout ( true ) ; if ( ! ( mInternalPageChange ) ) { mInternalPageChange = true ; mPageList.setSelection ( index ) ; mInternalPageChange = false ; } } }

Target:
private void displayPage ( int index ) { org.eclipse.swt.widgets.Composite page = mPages.get ( index ) ; if ( page != null ) { mStackLayout.topControl = page ; mPagesRootComposite.layout ( true ) ; if ( ! ( mInternalPageChange ) ) { mInternalPageChange = true ; mPageList.setSelection ( index ) ; mInternalPageChange = false ; } if ( page instanceof com.android.sdkuilib.internal.repository.IPageListener ) { ( ( com.android.sdkuilib.internal.repository.IPageListener ) ( page ) ) . onPageSelected ( ) ; } } }
Source:
public void setSoWriteTimeout ( int writeTimeoutMilliseconds ) throws java.net.SocketException { this . writeTimeoutMilliseconds = writeTimeoutMilliseconds ; android.system.StructTimeval tv = android.system.StructTimeval.fromMillis ( writeTimeoutMilliseconds ) ; try { Libcore.os.setsockoptTimeval ( getFileDescriptor$ ( ) , android.system.OsConstants.SOL_SOCKET , android.system.OsConstants.SO_SNDTIMEO , tv ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
public void setSoWriteTimeout ( int writeTimeoutMilliseconds ) throws java.net.SocketException { this . writeTimeoutMilliseconds = writeTimeoutMilliseconds ; android.system.StructTimeval tv = android.system.StructTimeval.fromMillis ( writeTimeoutMilliseconds ) ; try { android.system.Os.setsockoptTimeval ( getFileDescriptor$ ( ) , android.system.OsConstants.SOL_SOCKET , android.system.OsConstants.SO_SNDTIMEO , tv ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
void foo1 ( int [ ] array , int start , int end , boolean expectInterpreter ) { for ( int i = start ; i < end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo1 ( int [ ] array , int start , int end , boolean expectInterpreter ) { if ( end < 0 ) throw new java.lang.Error ( "" ) ; for ( int i = start ; i < end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }
Source:
public void keyguardWaitingForActivityDrawn ( ) { enforceNotIsolatedCaller ( "keyguardWaitingForActivityDrawn" ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { if ( DEBUG_LOCKSCREEN ) logLockScreen ( "" ) ; mWindowManager.keyguardWaitingForActivityDrawn ( ) ; if ( ( mLockScreenShown ) == ( com.android.server.am.ActivityManagerService.LOCK_SCREEN_SHOWN ) ) { mLockScreenShown = com.android.server.am.ActivityManagerService.LOCK_SCREEN_LEAVING ; updateSleepIfNeededLocked ( ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }

Target:
public void keyguardWaitingForActivityDrawn ( ) { enforceNotIsolatedCaller ( "keyguardWaitingForActivityDrawn" ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { if ( com.android.server.am.ActivityManagerDebugConfig.DEBUG_LOCKSCREEN ) logLockScreen ( "" ) ; mWindowManager.keyguardWaitingForActivityDrawn ( ) ; if ( ( mLockScreenShown ) == ( com.android.server.am.ActivityManagerService.LOCK_SCREEN_SHOWN ) ) { mLockScreenShown = com.android.server.am.ActivityManagerService.LOCK_SCREEN_LEAVING ; updateSleepIfNeededLocked ( ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }
Source:
private boolean runPerformanceQuick ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s ) { boolean pass = true ; for ( com.android.rs.test.UT_reduce.TestDescription td : performanceTests ) { pass &= run ( td , RS , s , ( ( com.android.rs.test.UT_reduce.maxSeedsPerTest ) * ( td.seed ) ) , td.defSize ) ; } return pass ; }

Target:
private boolean runPerformanceQuick ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s ) { boolean pass = true ; for ( com.android.rs.test.UT_reduce.TestDescription td : performanceTests ) { pass &= run ( td , RS , s , ( ( com.android.rs.test.UT_reduce.maxSeedsPerTest ) * ( td.seed ) ) , td.defSize ) ; } return pass ; }
Source:
protected void runTestImpl ( final com.android.cts.Test test ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException { try { if ( ! ( mTestStop ) ) { mCurrentTestSuite = test.getTestSuite ( ) ; mCurrentTestSuite.run ( mDevice , test ) ; } } catch ( com.android.cts.DeviceDisconnectedException e ) { cleanUp ( ) ; throw e ; } }

Target:
protected void runTestImpl ( final com.android.cts.Test test , android.annotation.cts.Profile profile ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException { try { if ( ! ( mTestStop ) ) { mCurrentTestSuite = test.getTestSuite ( ) ; mCurrentTestSuite.run ( mDevice , test , profile ) ; } } catch ( com.android.cts.DeviceDisconnectedException e ) { cleanUp ( ) ; throw e ; } }
Source:
private void readStack ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , int stackIdx ) throws java.io.IOException , java.lang.IndexOutOfBoundsException { writeLocalRef ( getStackVariable ( frame , stackIdx ) ) ; }

Target:
private void readStack ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , int stackIdx ) throws java.io.IOException , java.lang.IndexOutOfBoundsException { com.android.jill.frontend.java.Variable stackVariable = getStackVariable ( frame , stackIdx ) ; if ( varWithCstValue.containsKey ( stackVariable ) ) { writeValue ( varWithCstValue.remove ( stackVariable ) , currentClass , currentLine ) ; } else { writeLocalRef ( stackVariable ) ; } }
Source:
public void testSet1_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.set ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testSubList1_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.subList ( ( - 1 ) , list.size ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public void remove ( @ javax.annotation.Nonnegative int index ) { index ++ ; plan.remove ( index ) ; currentTagValidityIdx = index - 1 ; constraintTagValidityIdx = index ; }

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