auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testInputUrl ( ) throws java.lang.Exception { byte [ ] fileContents = "abcdef 1234567890" . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; java.net.URL fileUrl = addFileEntry ( libcore.java.net.FtpURLConnectionTest.FILE_PATH , fileContents ) ; java.net.URLConnection connection = fileUrl.openConnection ( ) ; libcore.java.net.FtpURLConnectionTest.assertContents ( fileContents , connection.getInputStream ( ) ) ; }

Target:
public void testInputUrl ( ) throws java.lang.Exception { byte [ ] fileContents = "abcdef 1234567890" . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; addFileEntry ( libcore.java.net.FtpURLConnectionTest.FILE_PATH , fileContents ) ; java.net.URL fileUrl = getFileUrlWithCredentials ( libcore.java.net.FtpURLConnectionTest.VALID_USER , libcore.java.net.FtpURLConnectionTest.VALID_PASSWORD , libcore.java.net.FtpURLConnectionTest.FILE_PATH ) ; java.net.URLConnection connection = fileUrl.openConnection ( ) ; libcore.java.net.FtpURLConnectionTest.assertContents ( fileContents , connection.getInputStream ( ) ) ; }
Source:
public static java.awt.image.BufferedImage cropColor ( java.awt.image.BufferedImage image , final int blankRgba ) { return com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.crop ( image , new com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.CropFilter ( ) { public boolean crop ( java.awt.image.BufferedImage bufferedImage , int x , int y ) { return blankRgba == ( bufferedImage.getRGB ( x , y ) ) ; } } ) ; }

Target:
public static java.awt.image.BufferedImage cropColor ( java.awt.image.BufferedImage image , final int blankRgba , com.android.ide.common.api.Rect initialCrop ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.CropFilter filter = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.CropFilter ( ) { public boolean crop ( java.awt.image.BufferedImage bufferedImage , int x , int y ) { return blankRgba == ( bufferedImage.getRGB ( x , y ) ) ; } } ; return com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.crop ( image , filter , initialCrop ) ; }
Source:
public void sendEnvelope ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }

Target:
public void getDataCallList ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_DATA_CALL_LIST , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getDataCallList ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getDataCallList" , e ) ; } } }
Source:
public void onIsConferencedChanged ( com.android.server.telecom.Call call ) { if ( ( call.getParentCall ( ) ) != null ) { android.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from child call with new parent" ) ; return ; } if ( ( call.getChildCalls ( ) . size ( ) ) == 1 ) { android.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from parent with only one child call" ) ; return ; } updateHeadsetWithCallState ( false ) ; }

Target:
public void onIsConferencedChanged ( com.android.server.telecom.Call call ) { if ( call.isExternalCall ( ) ) { return ; } if ( ( call.getParentCall ( ) ) != null ) { android.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from child call with new parent" ) ; return ; } if ( ( call.getChildCalls ( ) . size ( ) ) == 1 ) { android.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from parent with only one child call" ) ; return ; } updateHeadsetWithCallState ( false ) ; }
Source:
public boolean isTetheringSupported ( ) { try { java.lang.String pkgName = mContext.getOpPackageName ( ) ; return mService.isTetheringSupported ( pkgName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public boolean isTetheringSupported ( ) { java.lang.String pkgName = mContext.getOpPackageName ( ) ; try { return mService.isTetheringSupported ( pkgName ) ; } catch ( java.lang.SecurityException e ) { return false ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
private com.android.internal.util.IState getCurrentState ( ) { try { java.lang.reflect.Method method = com.android.internal.util.StateMachine.class . getDeclaredMethod ( "getCurrentState" ) ; method.setAccessible ( true ) ; return ( ( com.android.internal.util.IState ) ( method.invoke ( mGsmInboundSmsHandler ) ) ) ; } catch ( java.lang.Exception e ) { fail ( e.toString ( ) ) ; return null ; } }

Target:
private com.android.internal.util.IState getCurrentState ( ) { try { java.lang.reflect.Method method = com.android.internal.util.StateMachine.class . getDeclaredMethod ( "getCurrentState" ) ; method.setAccessible ( true ) ; return ( ( com.android.internal.util.IState ) ( method.invoke ( mGsmInboundSmsHandler ) ) ) ; } catch ( java.lang.Exception e ) { org.junit.Assert.fail ( e.toString ( ) ) ; return null ; } }
Source:
private void onDisplayPasskey ( java.lang.String objectPath , int passkey , int nativeData ) { java.lang.String address = checkPairingRequestAndGetAddress ( objectPath , nativeData ) ; if ( address == null ) return ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mAdapter.getRemoteDevice ( address ) ) ; intent.putExtra ( BluetoothDevice.EXTRA_PASSKEY , passkey ) ; intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY ) ; mContext.sendBroadcast ( intent , android.server.BluetoothEventLoop.BLUETOOTH_ADMIN_PERM ) ; }

Target:
private void onDisplayPasskey ( java.lang.String objectPath , int passkey , int nativeData ) { java.lang.String address = checkPairingRequestAndGetAddress ( objectPath , nativeData ) ; if ( address == null ) return ; mWakeLock.acquire ( ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothDevice.ACTION_PAIRING_REQUEST ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , mAdapter.getRemoteDevice ( address ) ) ; intent.putExtra ( BluetoothDevice.EXTRA_PASSKEY , passkey ) ; intent.putExtra ( BluetoothDevice.EXTRA_PAIRING_VARIANT , BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY ) ; mContext.sendBroadcast ( intent , android.server.BluetoothEventLoop.BLUETOOTH_ADMIN_PERM ) ; mWakeLock.release ( ) ; }
Source:
public void installPackage ( @ com.android.annotations.NonNull java.io.File apkFile , int timeout ) throws com.android.builder.testing.api.DeviceException { try { iDevice.installPackage ( apkFile.getAbsolutePath ( ) , true ) ; } catch ( java.lang.Exception e ) { throw new com.android.builder.testing.api.DeviceException ( e ) ; } }

Target:
public void installPackage ( @ com.android.annotations.NonNull java.io.File apkFile , int timeout , com.android.utils.ILogger logger ) throws com.android.builder.testing.api.DeviceException { try { iDevice.installPackage ( apkFile.getAbsolutePath ( ) , true ) ; } catch ( java.lang.Exception e ) { logger.error ( e , ( "Unable to install " + ( apkFile.getAbsolutePath ( ) ) ) ) ; throw new com.android.builder.testing.api.DeviceException ( e ) ; } }
Source:
public boolean isInHomeStack ( int taskId ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "getStackInfo()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { com.android.server.am.TaskRecord tr = recentTaskForIdLocked ( taskId ) ; return ( ( tr != null ) && ( ( tr.stack ) != null ) ) && ( tr.stack.isHomeStack ( ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }

Target:
public boolean isInHomeStack ( int taskId ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "getStackInfo()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId ) ; return ( ( tr != null ) && ( ( tr.stack ) != null ) ) && ( tr.stack.isHomeStack ( ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
private void enforcePrivilegedPermissionOrCarrierPrivilege ( com.android.internal.telephony.Phone phone ) { int permissionResult = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE ) ; if ( permissionResult == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return ; } log ( "No read privileged phone permission, check carrier privilege next." ) ; com.android.internal.telephony.uicc.UiccCard uiccCard = phone.getUiccCard ( ) ; if ( uiccCard == null ) { throw new java.lang.SecurityException ( "No Carrier Privilege: No UICC" ) ; } if ( ( uiccCard.getCarrierPrivilegeStatusForCurrentTransaction ( mContext.getPackageManager ( ) ) ) != ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ) { throw new java.lang.SecurityException ( "No Carrier Privilege." ) ; } }

Target:
public java.lang.String getVoiceMailAlphaTagForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getVoiceMailAlphaTag" ) ) ) { return null ; } return phone.getVoiceMailAlphaTag ( ) ; } else { loge ( ( "getVoiceMailAlphaTag phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
public static java.net.InetAddress getSocketLocalAddress ( java.io.FileDescriptor fd ) { try { java.net.SocketAddress sa = Libcore.os.getsockname ( fd ) ; java.net.InetSocketAddress isa = ( ( java.net.InetSocketAddress ) ( sa ) ) ; return isa.getAddress ( ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw new java.lang.AssertionError ( errnoException ) ; } }

Target:
public static java.net.InetAddress getSocketLocalAddress ( java.io.FileDescriptor fd ) throws java.net.SocketException { try { java.net.SocketAddress sa = Libcore.os.getsockname ( fd ) ; java.net.InetSocketAddress isa = ( ( java.net.InetSocketAddress ) ( sa ) ) ; return isa.getAddress ( ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
private void loadFromWpaSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { mWifiNative.migrateNetworksFromSupplicant ( configurationMap , networkExtras ) ; if ( configurationMap.isEmpty ( ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "No wifi configurations found in wpa_supplicant" ) ; return ; } populateMaskedFieldsFromWpaSupplicantFile ( configurationMap ) ; }

Target:
private void loadFromWpaSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { if ( ! ( mWifiNative.migrateNetworksFromSupplicant ( configurationMap , networkExtras ) ) ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "Failed to load wifi configurations from wpa_supplicant" ) ; return ; } if ( configurationMap.isEmpty ( ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "No wifi configurations found in wpa_supplicant" ) ; return ; } populateMaskedFieldsFromWpaSupplicantFile ( configurationMap ) ; }
Source:
private boolean isCurrentFileBestMatchFor ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile match = mResources.getMatchingFile ( mEditedFile.getName ( ) , ResourceFolderType.LAYOUT , config ) ; if ( match != null ) { return match.getFile ( ) . equals ( mEditedFile ) ; } else { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , "Current file is not a match for the given config." ) ; } return false ; }

Target:
private boolean isCurrentFileBestMatchFor ( com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.ide.common.resources.ResourceFile match = mResources.getMatchingFile ( mEditedFile.getName ( ) , ResourceFolderType.LAYOUT , config ) ; if ( match != null ) { return match.getFile ( ) . equals ( mEditedFile ) ; } else { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , "Current file is not a match for the given config." ) ; } return false ; }
Source:
public void testPownF32 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandomInts ( 305419896 , 32 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n1 ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }

Target:
public void testPownF32 ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandomInts ( 305419896 , ( - 16 ) , 15 , n ) ; nAlloc.copyFrom ( n ) ; script_f32.set_n1 ( nAlloc ) ; doF32 ( 7432909 , 16 ) ; }
Source:
public void bluetoothMediaAvrcpMediaBrowserServiceStart ( ) { com.googlecode.android_scripting.Log.d ( ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothMediaFacade.TAG ) + "Staring BluetoothAvrcpMediaBrowserService" ) ) ; android.content.Intent startIntent = new android.content.Intent ( mContext , com.googlecode.android_scripting.facade.bluetooth.BluetoothAvrcpMediaBrowserService.class ) ; mContext.startService ( startIntent ) ; }

Target:
public void bluetoothMediaHandleMediaCommandOnPhone ( java.lang.String command ) { com.googlecode.android_scripting.facade.bluetooth.media.BluetoothSL4AAudioSrcMBS mbs = com.googlecode.android_scripting.facade.bluetooth.media.BluetoothSL4AAudioSrcMBS.getAvrcpMediaBrowserService ( ) ; if ( mbs != null ) { mbs.handleMediaCommand ( command ) ; } else { com.googlecode.android_scripting.Log.e ( ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothMediaFacade.TAG ) + " No BluetoothSL4AAudioSrcMBS running on the device" ) ) ; } }
Source:
protected void tearDown ( ) throws java.lang.Exception { if ( mShouldTestTelecom ) { cleanupCalls ( ) ; if ( ! ( android.text.TextUtils.isEmpty ( mPreviousDefaultDialer ) ) ) { android.telecom.cts.TestUtils.setDefaultDialer ( getInstrumentation ( ) , mPreviousDefaultDialer ) ; } tearDownConnectionService ( android.telecom.cts.BaseTelecomTestWithMockServices.TEST_PHONE_ACCOUNT_HANDLE ) ; assertMockInCallServiceUnbound ( ) ; } super . tearDown ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( mShouldTestTelecom ) { cleanupCalls ( ) ; if ( ! ( android.text.TextUtils.isEmpty ( mPreviousDefaultDialer ) ) ) { android.telecom.cts.TestUtils.setDefaultDialer ( getInstrumentation ( ) , mPreviousDefaultDialer ) ; } tearDownConnectionService ( TestUtils.TEST_PHONE_ACCOUNT_HANDLE ) ; assertMockInCallServiceUnbound ( ) ; } super . tearDown ( ) ; }
Source:
private static < K , V > com.google.common.collect.SortedMapDifference < K , V > sortedMapDifference ( boolean areEqual , java.util.SortedMap < K , V > onlyOnLeft , java.util.SortedMap < K , V > onlyOnRight , java.util.SortedMap < K , V > onBoth , java.util.SortedMap < K , com.google.common.collect.MapDifference.ValueDifference < V > > differences ) { return new com.google.common.collect.Maps.SortedMapDifferenceImpl < K , V > ( areEqual , java.util.Collections.unmodifiableSortedMap ( onlyOnLeft ) , java.util.Collections.unmodifiableSortedMap ( onlyOnRight ) , java.util.Collections.unmodifiableSortedMap ( onBoth ) , java.util.Collections.unmodifiableSortedMap ( differences ) ) ; }

Target:
public java.util.NavigableMap < K , V > subMap ( K fromKey , boolean fromInclusive , K toKey , boolean toInclusive ) { return com.google.common.collect.Maps.asMap ( set.subSet ( fromKey , fromInclusive , toKey , toInclusive ) , function ) ; }
Source:
public void testGetMergedDocument ( ) { com.android.manifmerger.XmlDocument xmlDocument = new com.android.manifmerger.XmlDocument ( new com.android.utils.PositionXmlParser ( ) , mSourceLocation , mKeyResolver , mPropertyResolver , mElement , XmlDocument.Type.MAIN ) ; com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . setMergedDocument ( xmlDocument ) . build ( ) ; assertTrue ( mergingReport.getMergedDocument ( ) . isPresent ( ) ) ; assertEquals ( xmlDocument , mergingReport.getMergedDocument ( ) . get ( ) ) ; }

Target:
public void testGetMergedDocument ( ) { com.android.manifmerger.XmlDocument xmlDocument = new com.android.manifmerger.XmlDocument ( new com.android.utils.PositionXmlParser ( ) , mSourceLocation , mKeyResolver , mPropertyResolver , mElement , XmlDocument.Type.MAIN , com.google.common.base.Optional.< java.lang.String > absent ( ) ) ; com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . setMergedDocument ( xmlDocument ) . build ( ) ; assertTrue ( mergingReport.getMergedDocument ( ) . isPresent ( ) ) ; assertEquals ( xmlDocument , mergingReport.getMergedDocument ( ) . get ( ) ) ; }
Source:
public final void testPkgTypePlatform ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_PLATFORMS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasTag ( ) ) ; assertFalse ( p.hasVendor ( ) ) ; assertTrue ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypePlatform ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_PLATFORM ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasTag ( ) ) ; assertFalse ( p.hasVendor ( ) ) ; assertTrue ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public boolean matchesNationalNumber ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc numberDesc , boolean allowPrefixMatch ) { java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.nationalNumberPattern ) . matcher ( nationalNumber ) ; return ( nationalNumberPatternMatcher.matches ( ) ) || ( allowPrefixMatch && ( nationalNumberPatternMatcher.lookingAt ( ) ) ) ; }

Target:
public boolean matchesNationalNumber ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc , boolean allowPrefixMatch ) { java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getNationalNumberPattern ( ) ) . matcher ( nationalNumber ) ; return ( nationalNumberPatternMatcher.matches ( ) ) || ( allowPrefixMatch && ( nationalNumberPatternMatcher.lookingAt ( ) ) ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

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:
public boolean isDefaultDialer ( android.content.Context context ) { final boolean result = android.text.TextUtils.equals ( context.getPackageName ( ) , com.android.dialer.telecom.TelecomUtil.getTelecomManager ( context ) . getDefaultDialerPackage ( ) ) ; if ( result ) { com.android.dialer.telecom.TelecomUtil.sWarningLogged = false ; } else { if ( ! ( com.android.dialer.telecom.TelecomUtil.sWarningLogged ) ) { com.android.dialer.common.LogUtil.w ( com.android.dialer.telecom.TelecomUtil.TAG , "Dialer is not currently set to be default dialer" ) ; com.android.dialer.telecom.TelecomUtil.sWarningLogged = true ; } } return result ; }

Target:
public boolean isDefaultDialer ( android.content.Context context ) { final boolean result = android.text.TextUtils.equals ( context.getPackageName ( ) , com.android.dialer.telecom.TelecomUtil.getTelecomManager ( context ) . getDefaultDialerPackage ( ) ) ; if ( result ) { com.android.dialer.telecom.TelecomUtil.warningLogged = false ; } else { if ( ! ( com.android.dialer.telecom.TelecomUtil.warningLogged ) ) { com.android.dialer.common.LogUtil.w ( com.android.dialer.telecom.TelecomUtil.TAG , "Dialer is not currently set to be default dialer" ) ; com.android.dialer.telecom.TelecomUtil.warningLogged = true ; } } return result ; }
Source:
private java.util.List < org.eclipse.jdt.core.search.SearchMatch > searchForMethod ( java.lang.String fqmn ) { if ( fqmn.endsWith ( com.android.SdkConstants.CONSTRUCTOR_NAME ) ) { fqmn = fqmn.substring ( 0 , ( ( ( fqmn.length ( ) ) - ( com.android.SdkConstants.CONSTRUCTOR_NAME.length ( ) ) ) - 1 ) ) ; return searchForPattern ( fqmn , org.eclipse.jdt.core.search.IJavaSearchConstants.CONSTRUCTOR , com.android.ide.eclipse.adt.SourceRevealer.MATCH_IS_METHOD_PREDICATE ) ; } return searchForPattern ( fqmn , org.eclipse.jdt.core.search.IJavaSearchConstants.METHOD , com.android.ide.eclipse.adt.SourceRevealer.MATCH_IS_METHOD_PREDICATE ) ; }

Target:
private java.util.List < org.eclipse.jdt.core.search.SearchMatch > searchForMethod ( java.lang.String fqmn ) { if ( fqmn.endsWith ( com.android.SdkConstants.CONSTRUCTOR_NAME ) ) { fqmn = fqmn.substring ( 0 , ( ( ( fqmn.length ( ) ) - ( com.android.SdkConstants.CONSTRUCTOR_NAME.length ( ) ) ) - 1 ) ) ; return searchForPattern ( fqmn , org.eclipse.jdt.core.search.IJavaSearchConstants.CONSTRUCTOR , com.android.ide.eclipse.adt.SourceRevealer.MATCH_IS_METHOD_PREDICATE ) ; } if ( fqmn.endsWith ( com.android.SdkConstants.CLASS_CONSTRUCTOR ) ) { return java.util.Collections.emptyList ( ) ; } return searchForPattern ( fqmn , org.eclipse.jdt.core.search.IJavaSearchConstants.METHOD , com.android.ide.eclipse.adt.SourceRevealer.MATCH_IS_METHOD_PREDICATE ) ; }
Source:
public void onCreate ( @ com.android.annotations.NonNull com.android.ide.common.api.INode node , @ com.android.annotations.NonNull com.android.ide.common.api.INode parent , @ com.android.annotations.NonNull com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { node.appendChild ( com.android.SdkConstants.FQCN_LINEAR_LAYOUT ) ; } }

Target:
public void onCreate ( @ com.android.annotations.NonNull com.android.ide.common.api.INode node , @ com.android.annotations.NonNull com.android.ide.common.api.INode parent , @ com.android.annotations.NonNull com.android.ide.common.api.InsertType insertType ) { super . onCreate ( node , parent , insertType ) ; if ( insertType.isCreate ( ) ) { com.android.ide.common.api.INode linear = node.appendChild ( com.android.SdkConstants.FQCN_LINEAR_LAYOUT ) ; linear.setAttribute ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_ORIENTATION , com.android.SdkConstants.VALUE_VERTICAL ) ; } }
Source:
public boolean hasResourceItem ( com.android.resources.ResourceType type , java.lang.String name ) { java.util.List < com.android.ide.common.resources.ResourceItem > list = mResourceMap.get ( type ) ; if ( list != null ) { for ( com.android.ide.common.resources.ResourceItem item : list ) { if ( name.equals ( item.getName ( ) ) ) { return true ; } } } return false ; }

Target:
public boolean hasResourceItem ( com.android.resources.ResourceType type , java.lang.String name ) { java.util.Map < java.lang.String , com.android.ide.common.resources.ResourceItem > map = mResourceMap.get ( type ) ; if ( map != null ) { com.android.ide.common.resources.ResourceItem resourceItem = map.get ( name ) ; if ( resourceItem != null ) { return true ; } } return false ; }
Source:
private boolean needFullRebuild ( ) { if ( ! ( options.isAutomaticFullRebuildEnabled ( ) ) ) { return false ; } long timestamp = new java.io.File ( options.getOutputDir ( ) , com.android.jack.backend.dex.DexFileWriter.DEX_FILENAME ) . lastModified ( ) ; for ( java.io.File lib : options.getClasspath ( ) ) { if ( isModifiedLibrary ( lib , timestamp ) ) { return true ; } } for ( java.io.File importedJackFiles : options.getJayceImport ( ) ) { if ( isModifiedLibrary ( importedJackFiles , timestamp ) ) { return true ; } } return false ; }

Target:
public java.util.List < com.android.jack.library.InputLibrary > getClasspath ( ) { return librariesOnClasspathFromCommandLine ; }
Source:
public static void genRandom ( long seed , int factor , int offset , float [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( ( r.nextFloat ( ) ) * factor ) + offset ; } }

Target:
public static void genRandomFloats ( long seed , int max , int offset , float [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( ( r.nextFloat ( ) ) * max ) + offset ; } }
Source:
public void testConnectTimeouts ( ) throws java.io.IOException { tests.net.StuckServer ss = new tests.net.StuckServer ( false ) ; int serverPort = ss.getLocalPort ( ) ; java.net.URLConnection urlConnection = new java.net.URL ( ( "http://localhost:" + serverPort ) ) . openConnection ( ) ; int timeout = 1000 ; urlConnection.setConnectTimeout ( timeout ) ; long start = java.lang.System.currentTimeMillis ( ) ; try { urlConnection.getInputStream ( ) ; fail ( ) ; } catch ( java.net.SocketTimeoutException expected ) { long elapsed = ( java.lang.System.currentTimeMillis ( ) ) - start ; int attempts = java.net.InetAddress.getAllByName ( "localhost" ) . length ; assertTrue ( ( ( ( ( ( "timeout=" + timeout ) + ", elapsed=" ) + elapsed ) + ", attempts=" ) + attempts ) , ( ( java.lang.Math.abs ( ( ( attempts * timeout ) - elapsed ) ) ) < 500 ) ) ; } finally { ss.close ( ) ; } }

Target:
public void testConnectTimeouts ( ) throws java.io.IOException { tests.net.StuckServer ss = new tests.net.StuckServer ( true ) ; int serverPort = ss.getLocalPort ( ) ; java.lang.String hostName = ss.getLocalSocketAddress ( ) . getAddress ( ) . getHostAddress ( ) ; java.net.URLConnection urlConnection = new java.net.URL ( ( ( ( ( "http://" + hostName ) + ":" ) + serverPort ) + "/" ) ) . openConnection ( ) ; int timeout = 1000 ; urlConnection.setConnectTimeout ( timeout ) ; long start = java.lang.System.currentTimeMillis ( ) ; try { urlConnection.getInputStream ( ) ; fail ( ) ; } catch ( java.net.SocketTimeoutException expected ) { long elapsed = ( java.lang.System.currentTimeMillis ( ) ) - start ; int attempts = java.net.InetAddress.getAllByName ( "localhost" ) . length ; assertTrue ( ( ( ( ( ( "timeout=" + timeout ) + ", elapsed=" ) + elapsed ) + ", attempts=" ) + attempts ) , ( ( java.lang.Math.abs ( ( ( attempts * timeout ) - elapsed ) ) ) < 500 ) ) ; } finally { ss.close ( ) ; } }
Source:
public void stopOffloadControl ( ) { if ( ( mOffloadControl ) == null ) return ; try { final android.hardware.tetheroffload.control.V1_0.IOffloadControl.stopOffloadCallback cb = new android.hardware.tetheroffload.control.V1_0.IOffloadControl.stopOffloadCallback ( ) { @ java.lang.Override public void onValues ( boolean success , java.lang.String errMsg ) { if ( success ) return ; android.util.Log.e ( com.android.server.connectivity.tethering.OffloadHardwareInterface.TAG , ( "stopOffload failed: " + errMsg ) ) ; } } ; mOffloadControl.stopOffload ( cb ) ; } catch ( android.os.RemoteException e ) { android.util.Log.d ( com.android.server.connectivity.tethering.OffloadHardwareInterface.TAG , ( "failed to stopOffload: " + e ) ) ; } mOffloadControl = null ; }

Target:
public void stopOffloadControl ( ) { if ( ( mOffloadControl ) != null ) { try { mOffloadControl.stopOffload ( ( boolean success , java.lang.String errMsg ) -> { if ( ! success ) mLog.e ( ( "stopOffload failed: " + errMsg ) ) ; } ) ; } catch ( android.os.RemoteException e ) { mLog.e ( ( "failed to stopOffload: " + e ) ) ; } } mOffloadControl = null ; mTetheringOffloadCallback = null ; mControlCallback = null ; }
Source:
public void testGetReplacements ( ) { java.lang.String s = "\"throught\" is a common misspelling; did you mean \"thought\" or " + "\"through\" or \"throughout\" ?\n" ; assertEquals ( "throught" , com.android.tools.lint.checks.TypoDetector.getTypo ( s ) ) ; assertEquals ( java.util.Arrays.asList ( "thought" , "through" , "throughout" ) , com.android.tools.lint.checks.TypoDetector.getSuggestions ( s ) ) ; }

Target:
public void testGetReplacements ( ) { java.lang.String s = "\"throught\" is a common misspelling; did you mean \"thought\" or " + "\"through\" or \"throughout\" ?\n" ; assertEquals ( "throught" , com.android.tools.lint.checks.TypoDetector.getTypo ( s , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertEquals ( java.util.Arrays.asList ( "thought" , "through" , "throughout" ) , com.android.tools.lint.checks.TypoDetector.getSuggestions ( s , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; }
Source:
public java.nio.ByteBuffer putChar ( int index , char value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.CHAR ) ; this . block.pokeShort ( ( ( offset ) + index ) , ( ( short ) ( value ) ) , order ) ; return this ; }

Target:
public java.nio.ByteBuffer putChar ( int index , char value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.CHAR ) ; this . block.pokeShort ( ( ( offset ) + index ) , ( ( short ) ( value ) ) , order ) ; return this ; }
Source:
public void testProviderService_supportsParameter_KnownService_NonKey_Failure ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; try { service.supportsParameter ( new java.lang.Object ( ) ) ; fail ( "Should throw when non-Key passed in" ) ; } catch ( java.security.InvalidParameterException expected ) { } } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }

Target:
public void testProviderService_supportsParameter_SupportedKeyClasses_NonKeyClass_Success ( ) throws java.lang.Exception { java.security.Provider provider = new libcore.java.security.ProviderTest.MockProvider ( "MockProvider" ) { public void setup ( ) { put ( "Signature.FOO" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; put ( "Signature.FOO SupportedKeyClasses" , libcore.java.security.ProviderTest.MockSpi.class . getName ( ) ) ; } } ; java.security.Security.addProvider ( provider ) ; try { java.security.Provider.Service service = provider.getService ( "Signature" , "FOO" ) ; assertFalse ( service.supportsParameter ( new libcore.javax.crypto.MockKey ( ) ) ) ; } finally { java.security.Security.removeProvider ( provider.getName ( ) ) ; } }
Source:
private void doAddFile ( java.io.File file , java.lang.String archivePath ) throws com.android.builder.packaging.DuplicateFileException , java.io.IOException { mLogger.verbose ( "%1$s => %2$s" , file , archivePath ) ; java.io.File duplicate = checkFileForDuplicate ( archivePath ) ; if ( duplicate != null ) { throw new com.android.builder.packaging.DuplicateFileException ( archivePath , duplicate , file ) ; } mAddedFiles.put ( archivePath , file ) ; mBuilder.writeFile ( file , archivePath ) ; }

Target:
private void doAddFile ( java.io.File file , java.lang.String archivePath ) throws com.android.builder.packaging.DuplicateFileException , java.io.IOException { if ( ! ( mFileFilter.apply ( archivePath ) ) ) { return ; } mLogger.verbose ( "%1$s => %2$s" , file , archivePath ) ; java.io.File duplicate = checkFileForDuplicate ( archivePath ) ; if ( duplicate != null ) { throw new com.android.builder.packaging.DuplicateFileException ( archivePath , duplicate , file ) ; } mAddedFiles.put ( archivePath , file ) ; mBuilder.writeFile ( file , archivePath ) ; }
Source:
void loadConfig ( android.net.wifi.WifiConfiguration config ) { if ( config.isPasspoint ( ) ) ssid = config.providerFriendlyName ; else ssid = ( ( config.SSID ) == null ) ? "" : com.android.settingslib.wifi.AccessPoint.removeDoubleQuotes ( config.SSID ) ; security = com.android.settingslib.wifi.AccessPoint.getSecurity ( config ) ; networkId = config.networkId ; mConfig = config ; }

Target:
void loadConfig ( android.net.wifi.WifiConfiguration config ) { if ( config.isPasspoint ( ) ) ssid = config.providerFriendlyName ; else ssid = ( ( config.SSID ) == null ) ? "" : com.android.settingslib.wifi.AccessPoint.removeDoubleQuotes ( config.SSID ) ; bssid = config.BSSID ; security = com.android.settingslib.wifi.AccessPoint.getSecurity ( config ) ; networkId = config.networkId ; mConfig = config ; }
Source:
public void accept ( org.objectweb.asm.ClassVisitor cv , org.objectweb.asm.Attribute [ ] attrs , int flags ) { cv = new org.objectweb.asm.commons.ClassRemapper ( cv , new org.objectweb.asm.commons.Remapper ( ) { @ java.lang.Override public java.lang.String map ( java.lang.String typeName ) { return prefix ( typeName ) ; } } ) ; super . accept ( cv , attrs , flags ) ; }

Target:
public void accept ( org.objectweb.asm.ClassVisitor cv , org.objectweb.asm.Attribute [ ] attrs , int flags ) { cv = new com.google.devtools.build.android.desugar.CoreLibraryRewriter.ClassRemapperWithBugFix ( cv , new org.objectweb.asm.commons.Remapper ( ) { @ java.lang.Override public java.lang.String map ( java.lang.String typeName ) { return prefix ( typeName ) ; } } ) ; super . accept ( cv , attrs , flags ) ; }
Source:
private static com.android.dialer.historyitemactions.HistoryItemActionModule createModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.numberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.numberAttributes ( ) . getLookupUri ( ) ) ) ; return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createDialerContactFromRow ( context , row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ; }

Target:
private static com.android.dialer.historyitemactions.HistoryItemActionModule createModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.numberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; boolean canSupportAssistedDialing = ! ( android.text.TextUtils.isEmpty ( row.numberAttributes ( ) . getLookupUri ( ) ) ) ; return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.coalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createCallDetailsHeaderInfoFromRow ( context , row ) , canReportAsInvalidNumber , canSupportAssistedDialing ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "DnsEvent(" ) . append ( netId ) . append ( ", " ) ; for ( int t : com.android.internal.util.BitUtils.unpackBits ( transports ) ) { builder.append ( android.net.NetworkCapabilities.transportNameOf ( t ) ) . append ( ", " ) ; } return builder.append ( eventCount ) . append ( " events)" ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "DnsEvent(" ) . append ( netId ) . append ( ", " ) ; for ( int t : com.android.internal.util.BitUtils.unpackBits ( transports ) ) { builder.append ( android.net.NetworkCapabilities.transportNameOf ( t ) ) . append ( ", " ) ; } builder.append ( java.lang.String.format ( "%d events, " , eventCount ) ) ; builder.append ( java.lang.String.format ( "%d success)" , successCount ) ) ; return builder.toString ( ) ; }
Source:
private void stopTest ( com.google.gct.testing.results.GoogleCloudTestProxy test , com.google.gct.testing.GoogleCloudTestingUtils.ConfigurationStopReason stopReason ) { switch ( stopReason ) { case FINISHED : test.setFinished ( ) ; break ; case INFRASTRUCTURE_FAILURE : test.setInfrastructureFailed ( ) ; break ; case TIMED_OUT : test.setTimeout ( ) ; break ; } fireOnTestFinished ( test ) ; }

Target:
private void stopTest ( com.google.gct.testing.results.GoogleCloudTestProxy test , com.google.gct.testing.GoogleCloudTestingUtils.ConfigurationStopReason stopReason ) { switch ( stopReason ) { case FINISHED : test.setFinished ( ) ; break ; case INFRASTRUCTURE_FAILURE : test.setInfrastructureFailed ( ) ; break ; case TRIGGERING_ERROR : test.setTriggeringError ( ) ; break ; case TIMED_OUT : test.setTimeout ( ) ; break ; } fireOnTestFinished ( test ) ; }
Source:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidCompatibilityChecker.N_API_LEVEL ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }

Target:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }
Source:
public void testAesCbcHmacSha384Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1000 , false ) ; }
Source:
public void testClearScores_notActiveScorer_hasBroadcastNetworkPermission ( ) throws android.os.RemoteException { org.mockito.Mockito.when ( mNetworkScorerAppManager.isCallerActiveScorer ( org.mockito.Matchers.anyInt ( ) ) ) . thenReturn ( false ) ; org.mockito.Mockito.when ( mContext.checkCallingOrSelfPermission ( permission.BROADCAST_NETWORK_PRIVILEGED ) ) . thenReturn ( PackageManager.PERMISSION_GRANTED ) ; mNetworkScoreService.registerNetworkScoreCache ( NetworkKey.TYPE_WIFI , mNetworkScoreCache ) ; mNetworkScoreService.clearScores ( ) ; org.mockito.Mockito.verify ( mNetworkScoreCache ) . clearScores ( ) ; }

Target:
public void testClearScores_notActiveScorer_hasBroadcastNetworkPermission ( ) throws android.os.RemoteException { org.mockito.Mockito.when ( mNetworkScorerAppManager.isCallerActiveScorer ( org.mockito.Matchers.anyInt ( ) ) ) . thenReturn ( false ) ; org.mockito.Mockito.when ( mContext.checkCallingOrSelfPermission ( permission.BROADCAST_NETWORK_PRIVILEGED ) ) . thenReturn ( PackageManager.PERMISSION_GRANTED ) ; mNetworkScoreService.registerNetworkScoreCache ( NetworkKey.TYPE_WIFI , mNetworkScoreCache , android.net.NetworkScoreManager.CACHE_FILTER_NONE ) ; mNetworkScoreService.clearScores ( ) ; org.mockito.Mockito.verify ( mNetworkScoreCache ) . clearScores ( ) ; }
Source:
private byte [ ] get ( byte [ ] key ) { java.util.ArrayList < byte [ ] > values = execute ( 'g' , key ) ; return ( values == null ) || ( values.isEmpty ( ) ) ? null : values.get ( 0 ) ; }

Target:
public static android.security.KeyStore getInstance ( ) { android.security.IKeystoreService keystore = IKeystoreService.Stub.asInterface ( android.os.ServiceManager.getService ( "android.security.keystore" ) ) ; return new android.security.KeyStore ( keystore ) ; }
Source:
public boolean getRoamingCapabilities ( com.android.server.wifi.WifiNative.RoamingCapabilities capabilities ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "getRoamingCapabilities " ) ; try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getRoamingCapabilities ( capabilities ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return false ; }

Target:
public boolean getRxPktFates ( com.android.server.wifi.WifiNative.RxFateReport [ ] reportBufs ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getRxPktFates ( reportBufs ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int res = com.android.server.wifi.WifiNative.getRxPktFatesNative ( com.android.server.wifi.WifiNative.sWlan0Index , reportBufs ) ; if ( res != ( com.android.server.wifi.WifiNative.WIFI_SUCCESS ) ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "getRxPktFatesNative returned " + res ) ) ; return false ; } else { return true ; } } else { return false ; } } } }
Source:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b , java.lang.Iterable < ? extends T > c , java.lang.Iterable < ? extends T > d ) { com.google.common.base.Preconditions.checkNotNull ( a ) ; com.google.common.base.Preconditions.checkNotNull ( b ) ; com.google.common.base.Preconditions.checkNotNull ( c ) ; com.google.common.base.Preconditions.checkNotNull ( d ) ; return com.google.common.collect.Iterables.concat ( java.util.Arrays.asList ( a , b , c , d ) ) ; }

Target:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b , java.lang.Iterable < ? extends T > c , java.lang.Iterable < ? extends T > d ) { return com.google.common.collect.Iterables.concat ( com.google.common.collect.ImmutableList.of ( a , b , c , d ) ) ; }
Source:
public static < T , C extends java.util.List < T > > com.google.common.truth.ListSubject < ? extends com.google.common.truth.ListSubject < ? , T , C > , T , C > assertThat ( java.util.List < T > target ) { return com.google.common.truth.Truth.assert_ ( ) . that ( target ) ; }

Target:
public static com.google.common.truth.ThrowableSubject assertThat ( @ com.android.annotations.Nullable java.lang.Throwable target ) { return com.google.common.truth.Truth.assert_ ( ) . that ( target ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mIccCardStatus.mApplications = new com.android.internal.telephony.uicc.IccCardApplicationStatus [ ] { } ; mIccCardStatus.mCdmaSubscriptionAppIndex = mIccCardStatus.mImsSubscriptionAppIndex = mIccCardStatus.mGsmUmtsSubscriptionAppIndex = - 1 ; mTestHandlerThread = new com.android.internal.telephony.uicc.UiccSlotTest.UiccSlotTestHandlerThread ( getClass ( ) . getSimpleName ( ) ) ; mTestHandlerThread.start ( ) ; waitUntilReady ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mContextFixture.putBooleanResource ( com.android.internal.R.bool.config_hotswapCapable , true ) ; mIccCardStatus.mApplications = new com.android.internal.telephony.uicc.IccCardApplicationStatus [ ] { } ; mIccCardStatus.mCdmaSubscriptionAppIndex = mIccCardStatus.mImsSubscriptionAppIndex = mIccCardStatus.mGsmUmtsSubscriptionAppIndex = - 1 ; mTestHandlerThread = new com.android.internal.telephony.uicc.UiccSlotTest.UiccSlotTestHandlerThread ( getClass ( ) . getSimpleName ( ) ) ; mTestHandlerThread.start ( ) ; waitUntilReady ( ) ; }
Source:
public void test001 ( ) throws java.lang.Exception { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.nopackage.test001.jack" ) ) ; }

Target:
public void test001 ( ) throws java.lang.Exception { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > exclude = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( ) ; exclude.add ( com.android.jack.test.toolchain.JillApiToolchainBase.class ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.IToolchain.class , exclude ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.nopackage.test001.jack" ) ) ; }
Source:
public java.lang.String getFolderName ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType folder ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( folder.getName ( ) ) ; for ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier : mQualifiers ) { if ( qualifier != null ) { java.lang.String segment = qualifier.getFolderSegment ( ) ; if ( ( segment != null ) && ( ( segment.length ( ) ) > 0 ) ) { result.append ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.QUALIFIER_SEP ) ; result.append ( segment ) ; } } } return result.toString ( ) ; }

Target:
public java.lang.String getFolderName ( com.android.resources.ResourceFolderType folder ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( folder.getName ( ) ) ; for ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier : mQualifiers ) { if ( qualifier != null ) { java.lang.String segment = qualifier.getFolderSegment ( ) ; if ( ( segment != null ) && ( ( segment.length ( ) ) > 0 ) ) { result.append ( AndroidConstants.RES_QUALIFIER_SEP ) ; result.append ( segment ) ; } } } return result.toString ( ) ; }