auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean hasIccCard ( ) { return hasIccCardUsingSlotId ( mSubscriptionController.getSlotId ( getDefaultSubscription ( ) ) ) ; }

Target:
public java.lang.String getMeidForSlot ( int slotIndex , java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "getMeidForSlot" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( slotIndex ) ; return phone == null ? null : phone.getMeid ( ) ; }
Source:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; debugLog ( ( "enable() - Enable called with quiet mode status = " + ( mQuietmode ) ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; return true ; }

Target:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; debugLog ( ( "enable() - Enable called with quiet mode status = " + ( mQuietmode ) ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; mBluetoothStartTime = java.lang.System.currentTimeMillis ( ) ; return true ; }
Source:
public void testSetToNow0 ( ) throws java.lang.Exception { android.text.format.Time t = new android.text.format.Time ( android.text.format.Time.TIMEZONE_UTC ) ; long currentTime = ( java.lang.System.currentTimeMillis ( ) ) / 1000 ; t.setToNow ( ) ; long time = ( t.toMillis ( false ) ) / 1000 ; if ( ( java.lang.Math.abs ( ( currentTime - time ) ) ) > 1 ) { fail ( ( ( ( "currentTime " + currentTime ) + " time " ) + time ) ) ; } }

Target:
public void testSetToNow ( ) throws java.lang.Exception { android.text.format.Time t = new android.text.format.Time ( android.text.format.Time.TIMEZONE_UTC ) ; long lowerBound = ( java.lang.System.currentTimeMillis ( ) ) / 1000 ; t.setToNow ( ) ; long upperBound = ( java.lang.System.currentTimeMillis ( ) ) / 1000 ; long actual = ( t.toMillis ( true ) ) / 1000 ; assertTrue ( ( ( lowerBound <= actual ) && ( actual <= upperBound ) ) ) ; }
Source:
public void callOnDropLeave ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , java.lang.String fqcn , com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback feedback ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onDropLeave ( targetNode , fqcn , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropLeave() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }

Target:
public void callOnDropLeave ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.eclipse.adt.editors.layout.gscripts.IDragElement [ ] elements , com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback feedback ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onDropLeave ( targetNode , elements , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropLeave() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }
Source:
public void copyFrom ( int [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFromUnchecked ( short [ ] d ) { copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public byte [ ] getExtensionValue ( java.lang.String oid ) { if ( ( "2.5.29.20" . equals ( oid ) ) && ( ( crlNumber ) != null ) ) { return org.apache.harmony.security.asn1.ASN1OctetString.getInstance ( ) . encode ( org.apache.harmony.security.asn1.ASN1Integer.getInstance ( ) . encode ( crlNumber.toByteArray ( ) ) ) ; } return null ; }

Target:
public byte [ ] getExtensionValue ( java.lang.String oid ) { if ( ( "2.5.29.20" . equals ( oid ) ) && ( ( crlNumber ) != null ) ) { sun.security.util.DerOutputStream out = new sun.security.util.DerOutputStream ( ) ; try { out.putOctetString ( new sun.security.x509.CRLNumberExtension ( crlNumber ) . getExtensionValue ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalStateException ( "Unexpected IOException" , e ) ; } return out.toByteArray ( ) ; } return null ; }
Source:
void addManufacturerData ( int company , int company_mask , byte [ ] data , byte [ ] data_mask ) { com.android.bluetooth.gatt.ScanFilterQueue.Entry entry = new com.android.bluetooth.gatt.ScanFilterQueue.Entry ( ) ; entry.type = com.android.bluetooth.gatt.ScanFilterQueue.TYPE_MANUFACTURER_DATA ; entry.company = company ; entry.company_mask = company_mask ; entry.data = data ; entry.data_mask = data_mask ; mEntries.add ( entry ) ; }

Target:
void addManufacturerData ( int company , int companyMask , byte [ ] data , byte [ ] dataMask ) { com.android.bluetooth.gatt.ScanFilterQueue.Entry entry = new com.android.bluetooth.gatt.ScanFilterQueue.Entry ( ) ; entry.type = com.android.bluetooth.gatt.ScanFilterQueue.TYPE_MANUFACTURER_DATA ; entry.company = company ; entry.company_mask = companyMask ; entry.data = data ; entry.data_mask = dataMask ; mEntries.add ( entry ) ; }
Source:
public java.util.List < com.android.sdklib.devices.Device > getUserDevices ( ) { synchronized ( this ) { if ( ( mUserDevices ) == null ) { mUserDevices = new java.util.ArrayList < com.android.sdklib.devices.Device > ( ) ; try { java.io.File userDevicesFile = new java.io.File ( com.android.prefs.AndroidLocation.getFolder ( ) , com.android.sdklib.SdkConstants.FN_DEVICES_XML ) ; mUserDevices.addAll ( loadDevices ( userDevicesFile ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { mLog.warning ( "Couldn't load user devices: %1$s" , e.getMessage ( ) ) ; } } } return mUserDevices ; }

Target:
public java.util.List < com.android.sdklib.devices.Device > getUserDevices ( ) { synchronized ( com.android.sdklib.devices.DeviceManager.lock ) { if ( ( com.android.sdklib.devices.DeviceManager.mUserDevices ) == null ) { com.android.sdklib.devices.DeviceManager.mUserDevices = new java.util.ArrayList < com.android.sdklib.devices.Device > ( ) ; try { java.io.File userDevicesFile = new java.io.File ( com.android.prefs.AndroidLocation.getFolder ( ) , com.android.sdklib.SdkConstants.FN_DEVICES_XML ) ; com.android.sdklib.devices.DeviceManager.mUserDevices.addAll ( loadDevices ( userDevicesFile ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { mLog.warning ( "Couldn't load user devices: %1$s" , e.getMessage ( ) ) ; } } } return java.util.Collections.unmodifiableList ( com.android.sdklib.devices.DeviceManager.mUserDevices ) ; }
Source:
public static java.lang.String stringAddrFromByteAddr ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { return null ; } java.util.StringJoiner j = new java.util.StringJoiner ( ":" ) ; for ( byte b : addr ) { j.add ( java.lang.Integer.toHexString ( com.android.internal.util.BitUtils.uint8 ( b ) ) ) ; } return j.toString ( ) ; }

Target:
private static java.lang.String stringAddrFromLongAddr ( long addr ) { return java.lang.String.format ( "%02x:%02x:%02x:%02x:%02x:%02x" , ( ( addr > > 40 ) & 255 ) , ( ( addr > > 32 ) & 255 ) , ( ( addr > > 24 ) & 255 ) , ( ( addr > > 16 ) & 255 ) , ( ( addr > > 8 ) & 255 ) , ( addr & 255 ) ) ; }
Source:
public static void run ( ) { java.lang.System.out.println ( "Hello, world!" ) ; if ( art.Test901.checkLivePhase ( ) ) { java.lang.System.out.println ( "Agent in live phase." ) ; } if ( art.Test901.checkUnattached ( ) ) { java.lang.System.out.println ( "Received expected error for unattached JVMTI calls" ) ; } art.Test901.set ( 0 ) ; art.Test901.set ( 1 ) ; art.Test901.set ( 2 ) ; art.Test901.set ( 4 ) ; art.Test901.set ( 8 ) ; }

Target:
public static void run ( ) { java.lang.System.out.println ( "Hello, world!" ) ; if ( art.Test901.checkLivePhase ( ) ) { java.lang.System.out.println ( "Agent in live phase." ) ; } if ( art.Test901.checkUnattached ( ) ) { java.lang.System.out.println ( "Received expected error for unattached JVMTI calls" ) ; } art.Test901.set ( 0 ) ; art.Test901.set ( 1 ) ; art.Test901.set ( 2 ) ; art.Test901.set ( 4 ) ; art.Test901.set ( 8 ) ; art.Test901.testErrorNames ( ) ; }
Source:
public com.android.apksigner.core.internal.util.ByteBufferDataSource slice ( long offset , long size ) { if ( ( offset == 0 ) && ( size == ( mSize ) ) ) { return this ; } checkChunkValid ( offset , size ) ; int chunkPosition = ( ( int ) ( offset ) ) ; int chunkLimit = ( ( int ) ( chunkPosition + size ) ) ; synchronized ( mBuffer ) { mBuffer.position ( 0 ) ; mBuffer.limit ( chunkLimit ) ; mBuffer.position ( chunkPosition ) ; return new com.android.apksigner.core.internal.util.ByteBufferDataSource ( mBuffer ) ; } }

Target:
public com.android.apksigner.core.internal.util.ByteBufferDataSource slice ( long offset , long size ) { if ( ( offset == 0 ) && ( size == ( mSize ) ) ) { return this ; } if ( ( size < 0 ) || ( size > ( mSize ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "size: " + size ) + ", source size: " ) + ( mSize ) ) ) ; } return new com.android.apksigner.core.internal.util.ByteBufferDataSource ( getByteBuffer ( offset , ( ( int ) ( size ) ) ) , false ) ; }
Source:
private void sendAddressedPlayerChanged ( int newAddrPlayerID ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "sendAddressedPlayerChanged: new PlayerID=" + newAddrPlayerID ) ) ; registerNotificationRspAddrPlayerChangedNative ( AvrcpConstants.NOTIFICATION_TYPE_CHANGED , newAddrPlayerID , com.android.bluetooth.avrcp.Avrcp.sUIDCounter ) ; }

Target:
private void setActiveMediaSession ( android.media.session.MediaSession.Token token ) { com.android.bluetooth.avrcp.MediaController activeController = new com.android.bluetooth.avrcp.MediaController ( mContext , token ) ; if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "Set active media session " + ( activeController.getPackageName ( ) ) ) ) ; addMediaPlayerController ( activeController ) ; setAddressedMediaSessionPackage ( activeController.getPackageName ( ) ) ; }
Source:
public java.util.Set < vogar.tasks.Task > installActionTasks ( vogar.Action action , java.io.File jar ) { return java.util.Collections.< vogar.tasks.Task > singleton ( new vogar.android.DexTask ( run.androidSdk , vogar.Classpath.of ( jar ) , run.benchmark , action.getName ( ) , jar , action , run.localDexFile ( action.getName ( ) ) ) ) ; }

Target:
private vogar.tasks.Task createCreateDexJarTask ( vogar.Classpath classpath , java.io.File classpathElement , java.lang.String name , vogar.Action action , java.io.File localDex ) { vogar.tasks.Task dex ; if ( run.useJack ) { dex = new vogar.android.JackDexTask ( run , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } else { dex = new vogar.android.DexTask ( run.androidSdk , classpath , run.benchmark , name , classpathElement , action , localDex ) ; } return dex ; }
Source:
public com.android.ahat.heapdump.Site getSite ( int id , int depth ) { com.android.ahat.heapdump.AhatInstance obj = findInstance ( id ) ; if ( obj == null ) { return mRootSite ; } com.android.ahat.heapdump.Site site = obj.getSite ( ) ; for ( int i = 0 ; ( i < depth ) && ( ( site.getParent ( ) ) != null ) ; i ++ ) { site = site.getParent ( ) ; } return site ; }

Target:
public com.android.ahat.heapdump.Site getSite ( long id ) { com.android.ahat.heapdump.Site site = mRootSite.findSite ( id ) ; return site == null ? mRootSite : site ; }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }

Target:
synchronized void nAllocationRead2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationRead2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
private com.android.build.gradle.tasks.ResourceUsageAnalyzer.Resource getResource ( @ com.android.annotations.NonNull com.android.resources.ResourceType type , @ com.android.annotations.NonNull java.lang.String name ) { java.util.Map < java.lang.String , com.android.build.gradle.tasks.ResourceUsageAnalyzer.Resource > nameMap = mTypeToName.get ( type ) ; if ( nameMap != null ) { return nameMap.get ( name ) ; } return null ; }

Target:
private com.android.build.gradle.tasks.ResourceUsageAnalyzer.Resource getResource ( @ com.android.annotations.NonNull com.android.resources.ResourceType type , @ com.android.annotations.NonNull java.lang.String name ) { java.util.Map < java.lang.String , com.android.build.gradle.tasks.ResourceUsageAnalyzer.Resource > nameMap = mTypeToName.get ( type ) ; if ( nameMap != null ) { return nameMap.get ( com.android.build.gradle.tasks.ResourceUsageAnalyzer.getFieldName ( name ) ) ; } return null ; }
Source:
public void setNetworkSelectionModeAutomatic ( int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setNetworkSelectionModeAutomatic ( subId ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeAutomatic RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeAutomatic NPE" , ex ) ; } }

Target:
public boolean setNetworkSelectionModeManual ( java.lang.String operatorNumeric , boolean persistSelection ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.setNetworkSelectionModeManual ( getSubId ( ) , operatorNumeric , persistSelection ) ; } } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual NPE" , ex ) ; } return false ; }
Source:
private android.content.Intent getIntent ( int position ) { android.widget.ListAdapter adapter = getListAdapter ( ) ; java.util.Map < java.lang.String , ? > data = ( ( java.util.Map < java.lang.String , ? > ) ( adapter.getItem ( position ) ) ) ; return ( ( android.content.Intent ) ( data.get ( com.android.cts.verifier.TestListActivity.TestListAdapter.INTENT ) ) ) ; }

Target:
protected void onListItemClick ( android.widget.ListView listView , android.view.View view , int position , long id ) { super . onListItemClick ( listView , view , position , id ) ; android.content.Intent intent = getIntent ( position ) ; startActivityForResult ( intent , com.android.cts.verifier.TestListActivity.LAUNCH_TEST_REQUEST_CODE ) ; }
Source:
public android.os.Bundle sendWallpaperCommand ( android.os.IBinder window , java.lang.String action , int x , int y , int z , android.os.Bundle extras , boolean sync ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return sendWindowWallpaperCommandLocked ( windowForClientLocked ( this , window ) , action , x , y , z , extras , sync ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }

Target:
public boolean performHapticFeedback ( android.view.IWindow window , int effectId , boolean always ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return mPolicy.performHapticFeedbackLw ( windowForClientLocked ( this , window , true ) , effectId , always ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
private static com.google.doclava.AnnotationInstanceInfo [ ] convertAnnotationInstances ( com.google.doclava.AnnotationDesc [ ] orig ) { int len = orig.length ; com.google.doclava.AnnotationInstanceInfo [ ] out = new com.google.doclava.AnnotationInstanceInfo [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { out [ i ] = com.google.doclava.Converter.obtainAnnotationInstance ( orig [ i ] ) ; } return out ; }

Target:
private static com.google.doclava.AnnotationInstanceInfo [ ] convertAnnotationInstances ( com.sun.javadoc.AnnotationDesc [ ] orig ) { int len = orig.length ; com.google.doclava.AnnotationInstanceInfo [ ] out = new com.google.doclava.AnnotationInstanceInfo [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { out [ i ] = com.google.doclava.Converter.obtainAnnotationInstance ( orig [ i ] ) ; } return out ; }
Source:
public void onStop ( ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Wi-Fi stopped" ) ; awareIsDown ( ) ; }

Target:
private void tryToGetAware ( ) { synchronized ( mLock ) { if ( ( mWifiNanIface ) != null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Already have a NAN interface" ) ; return ; } android.hardware.wifi.V1_0.IWifiNanIface iface = mHalDeviceManager.createNanIface ( mInterfaceDestroyedListener , mInterfaceAvailableForRequestListener , null ) ; if ( iface == null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Was not able to obtain an IWifiNanIface" ) ; } else { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Obtained an IWifiNanIface" ) ; mWifiNanIface = iface ; mWifiAwareStateManager.enableUsage ( ) ; } } }
Source:
private static android.icu.text.DateFormatSymbols getCannedDateFormatSymbols ( android.icu.util.ULocale uloc ) { android.icu.text.DateFormatSymbols dfs = new android.icu.text.DateFormatSymbols ( android.icu.util.GregorianCalendar.class , uloc ) ; java.lang.String key = uloc.toString ( ) ; dfs.setMonths ( ( ( java.lang.String [ ] ) ( android.icu.dev.test.serializable.FormatTests.cannedMonthNames.get ( key ) ) ) ) ; dfs.setShortMonths ( ( ( java.lang.String [ ] ) ( android.icu.dev.test.serializable.FormatTests.cannedShortMonthNames.get ( key ) ) ) ) ; return dfs ; }

Target:
private static android.icu.text.DateFormatSymbols getCannedDateFormatSymbols ( android.icu.util.ULocale uloc ) { android.icu.text.DateFormatSymbols dfs = new android.icu.text.DateFormatSymbols ( android.icu.util.GregorianCalendar.class , uloc ) ; java.lang.String key = uloc.toString ( ) ; dfs.setMonths ( ( ( java.lang.String [ ] ) ( android.icu.dev.test.serializable.FormatHandler.cannedMonthNames.get ( key ) ) ) ) ; dfs.setShortMonths ( ( ( java.lang.String [ ] ) ( android.icu.dev.test.serializable.FormatHandler.cannedShortMonthNames.get ( key ) ) ) ) ; return dfs ; }
Source:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericOutputVFS ( new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericOutputVFS ( new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( com.android.sched.util.file.CannotChangePermissionException | com.android.sched.util.file.NotDirectoryException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.FileAlreadyExistsException | com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public void oemHookRaw ( int indicationType , java.util.ArrayList < java.lang.Byte > var2 ) { }

Target:
public void oemHookRaw ( int indicationType , java.util.ArrayList < java.lang.Byte > data ) { mRil.processIndication ( indicationType ) ; byte [ ] response = com.android.internal.telephony.RIL.arrayListToPrimitiveArray ( data ) ; if ( RIL.RILJ_LOGD ) { mRil.unsljLogvRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_OEM_HOOK_RAW , com.android.internal.telephony.uicc.IccUtils.bytesToHexString ( response ) ) ; } if ( ( mRil.mUnsolOemHookRawRegistrant ) != null ) { mRil.mUnsolOemHookRawRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , response , null ) ) ; } }
Source:
private java.lang.String sanitizeLegacyVendor ( java.lang.String vendorDisplay ) { if ( ( vendorDisplay != null ) && ( ( vendorDisplay.length ( ) ) > 0 ) ) { java.lang.String vendor = vendorDisplay.trim ( ) ; vendor = vendor.replaceAll ( "[^a-zA-Z0-9-]+" , "_" ) ; if ( vendor.equals ( "_" ) ) { int h = vendor.hashCode ( ) ; vendor = java.lang.String.format ( "vendor%08x" , h ) ; } return vendor ; } return "" ; }

Target:
private java.lang.String sanitizeLegacyVendor ( java.lang.String vendorDisplay ) { if ( ( vendorDisplay != null ) && ( ! ( vendorDisplay.isEmpty ( ) ) ) ) { java.lang.String vendor = vendorDisplay.trim ( ) ; vendor = vendor.replaceAll ( "[^a-zA-Z0-9-]+" , "_" ) ; if ( vendor.equals ( "_" ) ) { int h = vendor.hashCode ( ) ; vendor = java.lang.String.format ( "vendor%08x" , h ) ; } return vendor ; } return "" ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; addPreferencesFromResource ( R.xml.assisted_dialing_setting ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; addPreferencesFromResource ( R.xml.assisted_dialing_setting ) ; android.preference.ListPreference countryChooserPref = ( ( android.preference.ListPreference ) ( findPreference ( getContext ( ) . getString ( R.string.assisted_dialing_setting_cc_key ) ) ) ) ; if ( ! ( android.text.TextUtils.isEmpty ( countryChooserPref.getEntry ( ) ) ) ) { countryChooserPref.setSummary ( countryChooserPref.getEntry ( ) ) ; } countryChooserPref.setOnPreferenceChangeListener ( this :: updateListSummary ) ; }
Source:
protected synchronized boolean cleanup ( ) { android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , "cleanup" ) ; if ( ! ( mCreated ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "cleanup() called before create()" ) ; return true ; } mCreated = false ; return true ; }

Target:
boolean startVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { return false ; } int connectionState = stateMachine.getConnectionState ( ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mVoiceRecognitionStarted = true ; stateMachine.sendMessage ( HeadsetStateMachine.VOICE_RECOGNITION_START , device ) ; } return true ; }
Source:
public void holdCall ( com.android.server.telecom.Call call ) { if ( ! ( mCalls.contains ( call ) ) ) { com.android.server.telecom.Log.w ( this , "Unknown call (%s) asked to be put on hold" , call ) ; } else { com.android.server.telecom.Log.d ( this , "Putting call on hold: (%s)" , call ) ; call.hold ( ) ; } }

Target:
public void holdCall ( com.android.server.telecom.Call call ) { if ( ! ( mCalls.contains ( call ) ) ) { android.telecom.Log.w ( this , "Unknown call (%s) asked to be put on hold" , call ) ; } else { android.telecom.Log.d ( this , "Putting call on hold: (%s)" , call ) ; call.hold ( ) ; } }
Source:
public void test_parseFloat_LString_Harmony6261 ( ) { float f = new java.lang.Float ( "2147483648" ) ; assertEquals ( "2.1474836E9" , java.lang.Float.toString ( f ) ) ; doTestCompareRawBits ( "123456790528.000000000000000f" , 1374024905 , "1.2345679E11" ) ; doTestCompareRawBits ( "8589934592" , 1342177280 , "8.5899346E9" ) ; doTestCompareRawBits ( "8606711808" , 1342193664 , "8.606712E9" ) ; }

Target:
public void test_parseFloat_LString_Harmony6261 ( ) { float f = new java.lang.Float ( "2147483648" ) ; assertTrue ( java.lang.Float.toString ( f ) . matches ( "2.14748365?E9" ) ) ; doTestCompareRawBits ( "123456790528.000000000000000f" , 1374024905 , "1.2345679E11" ) ; doTestCompareRawBits ( "8589934592" , 1342177280 , "8.5899346E9" ) ; doTestCompareRawBits ( "8606711808" , 1342193664 , "8.606712E9" ) ; }
Source:
public void setTime ( long time ) { this . time = java.util.zip.ZipEntry.javaToDosTime ( time ) ; }

Target:
public void setTime ( long time ) { this . xdostime = java.util.zip.ZipUtils.javaToExtendedDosTime ( time ) ; if ( ( ( xdostime ) != ( java.util.zip.ZipEntry.DOSTIME_BEFORE_1980 ) ) && ( time <= ( java.util.zip.ZipEntry.UPPER_DOSTIME_BOUND ) ) ) { this . mtime = null ; } else { this . mtime = java.nio.file.attribute.FileTime.from ( time , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } }
Source:
public static java.lang.String getClientKeyType ( byte keyType ) { switch ( keyType ) { case NativeCrypto.TLS_CT_RSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_RSA ; case NativeCrypto.TLS_CT_DSS_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DSA ; case NativeCrypto.TLS_CT_RSA_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_RSA ; case NativeCrypto.TLS_CT_DSS_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_DSA ; case NativeCrypto.TLS_CT_ECDSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC ; case NativeCrypto.TLS_CT_RSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_RSA ; case NativeCrypto.TLS_CT_ECDSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_EC ; default : return null ; } }

Target:
static java.lang.String getClientKeyType ( byte clientCertificateType ) { switch ( clientCertificateType ) { case NativeCrypto.TLS_CT_RSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_RSA ; case NativeCrypto.TLS_CT_DSS_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DSA ; case NativeCrypto.TLS_CT_RSA_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_RSA ; case NativeCrypto.TLS_CT_DSS_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_DSA ; case NativeCrypto.TLS_CT_ECDSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC ; case NativeCrypto.TLS_CT_RSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_RSA ; case NativeCrypto.TLS_CT_ECDSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_EC ; default : return null ; } }
Source:
private void compileCode ( java.lang.String packageName , java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input1 , java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input2 ) throws java.lang.Exception { boolean succ = true ; try { checkCompiledCode ( packageName , input1 ) ; } catch ( junit.framework.AssertionFailedError e ) { succ = false ; } if ( succ ) { return ; } succ = true ; try { checkCompiledCode ( packageName , input2 ) ; } catch ( junit.framework.AssertionFailedError e ) { succ = false ; } junit.framework.Assert.assertTrue ( succ ) ; }

Target:
private void compileCodeIncremental ( java.lang.String packageName , java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input ) throws java.lang.Exception { com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.IncrementalToolchain.class ) ; checkCompiledCode ( toolchain , packageName , input ) ; }
Source:
public boolean requestChildRectangleOnScreen ( final android.view.View child , final android.graphics.Rect rect , final boolean immediate ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestChildRectangleOnScreen ( child , rect , immediate ) ; } } ) ; return ret ; } return mAwContents.requestChildRectangleOnScreen ( child , rect , immediate ) ; }

Target:
public void setBackgroundColor ( final int color ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setBackgroundColor ( color ) ; } } ) ; return ; } mAwContents.setBackgroundColor ( color ) ; }
Source:
public void testEllipsizedTextMatcher ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.ellipsized ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.LayoutMatchers.hasEllipsizedText ( ) ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.wrap ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.LayoutMatchers.hasEllipsizedText ( ) ) ) ) ; }

Target:
public void ellipsizedTextMatcher ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.ellipsized ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.LayoutMatchers.hasEllipsizedText ( ) ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.wrap ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.LayoutMatchers.hasEllipsizedText ( ) ) ) ) ; }
Source:
private java.util.Map < java.io.File , java.io.File > getFilesByNameEntryFilter ( java.util.List < java.io.File > folders , java.lang.String extension ) { java.util.Map < java.io.File , java.io.File > sourceFiles = new java.util.HashMap < java.io.File , java.io.File > ( ) ; for ( java.io.File folder : folders ) { java.util.List < java.io.File > files = getFilesByNameEntryFilter ( folder , extension ) ; for ( java.io.File f : files ) { sourceFiles.put ( f , folder ) ; } } return sourceFiles ; }

Target:
private java.util.Map < java.io.File , java.io.File > getFilesByNameEntryFilter ( java.util.List < java.io.File > folders , java.lang.String extension ) { java.util.Map < java.io.File , java.io.File > sourceFiles = com.google.common.collect.Maps.newHashMap ( ) ; for ( java.io.File folder : folders ) { java.util.List < java.io.File > files = getFilesByNameEntryFilter ( folder , extension ) ; for ( java.io.File f : files ) { sourceFiles.put ( f , folder ) ; } } return sourceFiles ; }
Source:
private void writeBluetoothMaxConnectedAudioDevices ( java.lang.Object newValue ) { android.os.SystemProperties.set ( com.android.settings.development.DevelopmentSettings.BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY , newValue.toString ( ) ) ; int index = mBluetoothSelectMaxConnectedAudioDevices.findIndexOfValue ( newValue.toString ( ) ) ; if ( index >= 0 ) { java.lang.String [ ] titles = getResources ( ) . getStringArray ( R.array.bluetooth_max_connected_audio_devices ) ; mBluetoothSelectMaxConnectedAudioDevices.setSummary ( titles [ index ] ) ; } }

Target:
private void writeBluetoothMaxConnectedAudioDevices ( java.lang.Object newValue ) { java.lang.String newValueString = newValue.toString ( ) ; if ( ( mBluetoothSelectMaxConnectedAudioDevices.findIndexOfValue ( newValueString ) ) <= 0 ) { newValueString = "" ; } android.os.SystemProperties.set ( com.android.settings.development.DevelopmentSettings.BLUETOOTH_MAX_CONNECTED_AUDIO_DEVICES_PROPERTY , newValueString ) ; updateBluetoothMaxConnectedAudioDevicesPreference ( ) ; }
Source:
public void threadUnexpectedException ( java.lang.Throwable t ) { threadRecordFailure ( t ) ; t.printStackTrace ( ) ; if ( t instanceof java.lang.RuntimeException ) throw ( ( java.lang.RuntimeException ) ( t ) ) ; else if ( t instanceof java.lang.Error ) throw ( ( java.lang.Error ) ( t ) ) ; else { jsr166.AssertionFailedError afe = new jsr166.AssertionFailedError ( ( "unexpected exception: " + t ) ) ; afe.initCause ( t ) ; throw afe ; } }

Target:
public void threadUnexpectedException ( java.lang.Throwable t ) { threadRecordFailure ( t ) ; t.printStackTrace ( ) ; if ( t instanceof java.lang.RuntimeException ) throw ( ( java.lang.RuntimeException ) ( t ) ) ; else if ( t instanceof java.lang.Error ) throw ( ( java.lang.Error ) ( t ) ) ; else { junit.framework.AssertionFailedError afe = new junit.framework.AssertionFailedError ( ( "unexpected exception: " + t ) ) ; afe.initCause ( t ) ; throw afe ; } }
Source:
public static void computeAtanh ( android.renderscript.cts.TestAtanh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 128 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( ( ( java.lang.StrictMath.log ( ( 1 + x ) ) ) - ( java.lang.StrictMath.log ( ( 1 - x ) ) ) ) / 2 ) ) ; }

Target:
public static void computeAsinh ( android.renderscript.cts.TestAsinh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 5 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( x + ( java.lang.StrictMath.sqrt ( ( ( x * x ) + 1.0 ) ) ) ) ) ) ) ; }
Source:
private static com.google.doclava.AnnotationValueInfo obtainAnnotationValue ( com.google.doclava.AnnotationValue o , com.google.doclava.MethodInfo element ) { if ( o == null ) { return null ; } com.google.doclava.AnnotationValueInfo v = com.google.doclava.Converter.mAnnotationValues.get ( o ) ; if ( v != null ) return v ; v = new com.google.doclava.AnnotationValueInfo ( element ) ; com.google.doclava.Converter.mAnnotationValues.put ( o , v ) ; if ( ( com.google.doclava.Converter.mAnnotationValuesNeedingInit ) != null ) { com.google.doclava.Converter.mAnnotationValuesNeedingInit.add ( o ) ; } else { com.google.doclava.Converter.initAnnotationValue ( o , v ) ; } return v ; }

Target:
private static com.google.doclava.AnnotationValueInfo obtainAnnotationValue ( com.sun.javadoc.AnnotationValue o , com.google.doclava.MethodInfo element ) { if ( o == null ) { return null ; } com.google.doclava.AnnotationValueInfo v = com.google.doclava.Converter.mAnnotationValues.get ( o ) ; if ( v != null ) return v ; v = new com.google.doclava.AnnotationValueInfo ( element ) ; com.google.doclava.Converter.mAnnotationValues.put ( o , v ) ; if ( ( com.google.doclava.Converter.mAnnotationValuesNeedingInit ) != null ) { com.google.doclava.Converter.mAnnotationValuesNeedingInit.add ( o ) ; } else { com.google.doclava.Converter.initAnnotationValue ( o , v ) ; } return v ; }
Source:
private byte [ ] asRawByteArray ( int elementCount ) { getBuffer ( ) . setPosition ( mValuesOffset ) ; assert ( mType ) != ( Type.OBJECT ) ; byte [ ] bytes = new byte [ ( java.lang.Math.min ( elementCount , mLength ) ) * ( mType.getSize ( ) ) ] ; getBuffer ( ) . read ( bytes ) ; return bytes ; }

Target:
private byte [ ] asRawByteArray ( int start , int elementCount ) { getBuffer ( ) . setPosition ( mValuesOffset ) ; assert ( mType ) != ( Type.OBJECT ) ; assert ( start + elementCount ) <= ( mLength ) ; byte [ ] bytes = new byte [ elementCount * ( mType.getSize ( ) ) ] ; getBuffer ( ) . readSubSequence ( bytes , ( start * ( mType.getSize ( ) ) ) , ( elementCount * ( mType.getSize ( ) ) ) ) ; return bytes ; }
Source:
public void setOutputFile ( @ com.android.annotations.NonNull java.io.File outputFile ) { com.android.build.gradle.internal.variant.ApkVariantData variantData = getApkVariantData ( ) ; if ( ( variantData.zipAlignTask ) != null ) { variantData.zipAlignTask.setOutputFile ( outputFile ) ; } else { variantData.packageApplicationTask.setOutputFile ( outputFile ) ; } variantData.setOutputFile ( outputFile ) ; }

Target:
public void setOutputFile ( @ com.android.annotations.NonNull java.io.File outputFile ) { com.android.build.gradle.internal.variant.ApkVariantOutputData variantOutputData = getApkVariantData ( ) . getOutputs ( ) . get ( 0 ) ; if ( ( variantOutputData.zipAlignTask ) != null ) { variantOutputData.zipAlignTask.setOutputFile ( outputFile ) ; } else { variantOutputData.packageApplicationTask.setOutputFile ( outputFile ) ; } variantOutputData.setOutputFile ( outputFile ) ; }
Source:
static com.google.common.base.Optional < com.android.dialer.smartdial.map.SmartDialMap > getExtraMap ( android.content.Context context ) { java.lang.String languageCode = com.android.dialer.compat.CompatUtils.getLocale ( context ) . getISO3Language ( ) ; return com.android.dialer.smartdial.map.CompositeSmartDialMap.EXTRA_MAPS.containsKey ( languageCode ) ? com.google.common.base.Optional.of ( com.android.dialer.smartdial.map.CompositeSmartDialMap.EXTRA_MAPS.get ( languageCode ) ) : com.google.common.base.Optional.absent ( ) ; }

Target:
static com.google.common.base.Optional < com.android.dialer.smartdial.map.SmartDialMap > getExtraMap ( android.content.Context context ) { java.lang.String languageCode = com.android.dialer.i18n.LocaleUtils.getLocale ( context ) . getISO3Language ( ) ; return com.android.dialer.smartdial.map.CompositeSmartDialMap.EXTRA_MAPS.containsKey ( languageCode ) ? com.google.common.base.Optional.of ( com.android.dialer.smartdial.map.CompositeSmartDialMap.EXTRA_MAPS.get ( languageCode ) ) : com.google.common.base.Optional.absent ( ) ; }
Source:
public void iterate ( ) { int s = factories.size ( ) ; if ( s == 0 ) { factories = service.factories ( ) ; } else { int n = r.nextInt ( s ) ; android.icu.impl.ICUService.Factory f = ( ( android.icu.impl.ICUService.Factory ) ( factories.remove ( n ) ) ) ; boolean success = service.unregisterFactory ( f ) ; log.logln ( ( ( "factory: " + f ) + ( success ? " succeeded." : " *** failed." ) ) ) ; } }

Target:
public void iterate ( ) { int s = factories.size ( ) ; if ( s == 0 ) { factories = service.factories ( ) ; } else { int n = r.nextInt ( s ) ; android.icu.impl.ICUService.Factory f = ( ( android.icu.impl.ICUService.Factory ) ( factories.remove ( n ) ) ) ; boolean success = service.unregisterFactory ( f ) ; android.icu.dev.test.TestFmwk.logln ( ( ( "factory: " + f ) + ( success ? " succeeded." : " *** failed." ) ) ) ; } }
Source:
int [ ] getUsersLocked ( ) { com.android.server.pm.UserManagerService ums = getUserManagerLocked ( ) ; return ums != null ? ums.getUserIds ( ) : new int [ ] { 0 } ; }

Target:
final void runInBackgroundDisabled ( int uid ) { synchronized ( this ) { com.android.server.am.UidRecord uidRec = mActiveUids.get ( uid ) ; if ( uidRec != null ) { if ( uidRec.idle ) { doStopUidLocked ( uidRec.uid , uidRec ) ; } } else { doStopUidLocked ( uid , null ) ; } } }
Source:
void onScanParamSetupCompleted ( int status , int clientIf ) throws android.os.RemoteException { com.android.bluetooth.gatt.ClientMap.App app = mClientMap.getById ( clientIf ) ; if ( ( app == null ) || ( ( app.callback ) == null ) ) { android.util.Log.e ( com.android.bluetooth.gatt.GattService.TAG , "Advertise app or callback is null" ) ; return ; } android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "onScanParamSetupCompleted : " + status ) ) ; }

Target:
void onScanParamSetupCompleted ( int status , int scannerId ) throws android.os.RemoteException { com.android.bluetooth.gatt.ScannerMap.App app = mScannerMap.getById ( scannerId ) ; if ( ( app == null ) || ( ( app.callback ) == null ) ) { android.util.Log.e ( com.android.bluetooth.gatt.GattService.TAG , "Advertise app or callback is null" ) ; return ; } android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "onScanParamSetupCompleted : " + status ) ) ; }
Source:
void finishBatchEdit ( final android.widget.Editor.InputMethodState ims ) { mTextView.onEndBatchEdit ( ) ; if ( ( ims.mContentChanged ) || ( ims.mSelectionModeChanged ) ) { mTextView.updateAfterEdit ( ) ; reportExtractedText ( ) ; } else if ( ims.mCursorChanged ) { mTextView.invalidateCursor ( ) ; } }

Target:
void finishBatchEdit ( final android.widget.Editor.InputMethodState ims ) { mTextView.onEndBatchEdit ( ) ; if ( ( ims.mContentChanged ) || ( ims.mSelectionModeChanged ) ) { mTextView.updateAfterEdit ( ) ; reportExtractedText ( ) ; } else if ( ims.mCursorChanged ) { mTextView.invalidateCursor ( ) ; } sendUpdateSelection ( ) ; }
Source:
public void processBasicBlockElements ( ) { java.util.List < com.android.jack.ir.ast.cfg.JBasicBlockElement > elements = this . currentBasicBlock.getElements ( true ) ; instructions = com.google.common.collect.Lists.newArrayListWithExpectedSize ( ( ( int ) ( ( elements.size ( ) ) * 1.5 ) ) ) ; extraInstructions = com.google.common.collect.Lists.newArrayListWithExpectedSize ( ( ( int ) ( ( elements.size ( ) ) * 0.5 ) ) ) ; noMoreInstruction = false ; super . accept ( elements ) ; }

Target:
public void processBasicBlockElements ( ) { instructions = new java.util.LinkedList < > ( ) ; extraInstructions = new java.util.LinkedList < > ( ) ; noMoreInstruction = false ; java.util.ArrayList < com.android.jack.ir.ast.cfg.JBasicBlockElement > elements = com.google.common.collect.Lists.newArrayList ( this . currentBasicBlock.getElements ( true ) ) ; super . accept ( elements ) ; }
Source:
private int removeDataDirsLI ( java.lang.String volumeUuid , java.lang.String packageName ) { int [ ] users = com.android.server.pm.PackageManagerService.sUserManager.getUserIds ( ) ; int res = 0 ; for ( int user : users ) { int resInner = mInstaller.remove ( volumeUuid , packageName , user ) ; if ( resInner < 0 ) { res = resInner ; } } return res ; }

Target:
void scheduleWritePackageRestrictionsLocked ( int userId ) { final int [ ] userIds = ( userId == ( android.os.UserHandle.USER_ALL ) ) ? com.android.server.pm.PackageManagerService.sUserManager.getUserIds ( ) : new int [ ] { userId } ; for ( int nextUserId : userIds ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( nextUserId ) ) ) return ; mDirtyUsers.add ( nextUserId ) ; if ( ! ( mHandler.hasMessages ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS ) ) ) { mHandler.sendEmptyMessageDelayed ( com.android.server.pm.PackageManagerService.WRITE_PACKAGE_RESTRICTIONS , com.android.server.pm.PackageManagerService.WRITE_SETTINGS_DELAY ) ; } } }
Source:
public void add ( int index , int value ) { if ( ( index < 0 ) || ( index > ( mSize ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ) ; } ensureCapacity ( 1 ) ; if ( ( ( mSize ) - index ) != 0 ) { java.lang.System.arraycopy ( mValues , index , mValues , ( index + 1 ) , ( ( mSize ) - index ) ) ; } mValues [ index ] = value ; ( mSize ) ++ ; }

Target:
public void add ( int index , int value ) { ensureCapacity ( 1 ) ; int rightSegment = ( mSize ) - index ; ( mSize ) ++ ; checkBounds ( index ) ; if ( rightSegment != 0 ) { java.lang.System.arraycopy ( mValues , index , mValues , ( index + 1 ) , rightSegment ) ; } mValues [ index ] = value ; }
Source:
public void put ( E e ) throws java.lang.InterruptedException { java.util.concurrent.ArrayBlockingQueue.checkNotNull ( e ) ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == ( items.length ) ) notFull.await ( ) ; insert ( e ) ; } finally { lock.unlock ( ) ; } }

Target:
public boolean offer ( E e ) { java.util.concurrent.ArrayBlockingQueue.checkNotNull ( e ) ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lock ( ) ; try { if ( ( count ) == ( items.length ) ) return false ; else { enqueue ( e ) ; return true ; } } finally { lock.unlock ( ) ; } }
Source:
public synchronized int hashCode ( ) { return ( ( countryCode.hashCode ( ) ) + ( languageCode.hashCode ( ) ) ) + ( variantCode.hashCode ( ) ) ; }

Target:
public synchronized int hashCode ( ) { return ( ( ( ( countryCode.hashCode ( ) ) + ( languageCode.hashCode ( ) ) ) + ( variantCode.hashCode ( ) ) ) + ( scriptCode.hashCode ( ) ) ) + ( extensions.hashCode ( ) ) ; }
Source:
public void testAesCbcHmacSha512Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testCryptTcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , false , 1 , true ) ; }
Source:
public void testEnums ( ) throws java.lang.Exception { org.json.JSONArray a1 = new org.json.JSONArray ( java.lang.annotation.RetentionPolicy.values ( ) ) ; assertEquals ( "[\"SOURCE\",\"CLASS\",\"RUNTIME\"]" , a1.toString ( ) ) ; org.json.JSONArray a2 = new org.json.JSONArray ( org.json.JSONArrayTest.MyEnum.values ( ) ) ; assertEquals ( "[null, null, null]" , a2.toString ( ) ) ; }

Target:
public void testEnums ( ) throws java.lang.Exception { org.json.JSONArray a1 = new org.json.JSONArray ( java.lang.annotation.RetentionPolicy.values ( ) ) ; assertEquals ( "[\"SOURCE\",\"CLASS\",\"RUNTIME\"]" , a1.toString ( ) ) ; org.json.JSONArray a2 = new org.json.JSONArray ( org.json.JSONArrayTest.MyEnum.values ( ) ) ; assertEquals ( "[null,null,null]" , a2.toString ( ) ) ; }
Source:
public void hold ( ) { if ( ( mState ) == ( CallState.ACTIVE ) ) { if ( ( mConnectionService ) != null ) { mConnectionService.hold ( this ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "hold call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_HOLD ) ; } }

Target:
public void unhold ( java.lang.String reason ) { if ( ( mState ) == ( CallState.ON_HOLD ) ) { if ( ( mConnectionService ) != null ) { mConnectionService.unhold ( this ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "unhold call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_UNHOLD , reason ) ; } }