auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static com.google.common.collect.ImmutableList < com.google.devtools.build.android.desugar.InputFileProvider > toRegisteredInputFileProvider ( com.google.common.io.Closer closer , java.util.List < java.nio.file.Path > paths ) throws java.io.IOException { com.google.common.collect.ImmutableList.Builder < com.google.devtools.build.android.desugar.InputFileProvider > builder = new com.google.common.collect.ImmutableList.Builder < > ( ) ; for ( java.nio.file.Path path : paths ) { com.google.common.base.Preconditions.checkState ( ( ! ( java.nio.file.Files.isDirectory ( path ) ) ) , "Directory is not supported: %s" , path ) ; builder.add ( closer.register ( new com.google.devtools.build.android.desugar.ZipInputFileProvider ( path ) ) ) ; } return builder.build ( ) ; }

Target:
private static com.google.common.collect.ImmutableList < com.google.devtools.build.android.desugar.InputFileProvider > toRegisteredInputFileProvider ( com.google.common.io.Closer closer , java.util.List < java.nio.file.Path > paths ) throws java.io.IOException { com.google.common.collect.ImmutableList.Builder < com.google.devtools.build.android.desugar.InputFileProvider > builder = new com.google.common.collect.ImmutableList.Builder < > ( ) ; for ( java.nio.file.Path path : paths ) { builder.add ( closer.register ( com.google.devtools.build.android.desugar.Desugar.toInputFileProvider ( path ) ) ) ; } return builder.build ( ) ; }
Source:
public boolean connect ( com.android.server.telecom.Call call ) { if ( mIsConnected ) { com.android.server.telecom.Log.i ( this , "already connected" ) ; return true ; } else { if ( mCurrentConnection.connect ( call ) ) { mIsConnected = true ; return true ; } } return false ; }

Target:
public boolean connect ( com.android.server.telecom.Call call ) { if ( mIsConnected ) { android.telecom.Log.i ( this , "already connected" ) ; return true ; } else { if ( mCurrentConnection.connect ( call ) ) { mIsConnected = true ; return true ; } } return false ; }
Source:
public void onLoaderReset ( android.content.Loader < java.util.List < android.printservice.PrintServiceInfo > > loader ) { if ( ! ( isFinishing ( ) ) ) { switch ( loader.getId ( ) ) { case com.android.printspooler.ui.AddPrinterActivity.LOADER_ID_ENABLED_SERVICES : mEnabledServicesAdapter.updateData ( null ) ; break ; case com.android.printspooler.ui.AddPrinterActivity.LOADER_ID_DISABLED_SERVICES : mDisabledServicesAdapter.updateData ( null ) ; break ; case com.android.printspooler.ui.AddPrinterActivity.LOADER_ID_ALL_SERVICES : mRecommendedServicesAdapter.updateInstalledServices ( null ) ; break ; default : } } }

Target:
public void onLoaderReset ( android.content.Loader < java.util.List < android.printservice.PrintServiceInfo > > loader ) { if ( ! ( isFinishing ( ) ) ) { switch ( loader.getId ( ) ) { case com.android.printspooler.ui.AddPrinterActivity.LOADER_ID_ENABLED_SERVICES : mEnabledServicesAdapter.updateData ( null ) ; break ; case com.android.printspooler.ui.AddPrinterActivity.LOADER_ID_DISABLED_SERVICES : mDisabledServicesAdapter.updateData ( null ) ; break ; case com.android.printspooler.ui.AddPrinterActivity.LOADER_ID_ALL_SERVICES : if ( mHasVending ) { mRecommendedServicesAdapter.updateInstalledServices ( null ) ; } else { mNoPrintServiceMessageAdapter.updateInstalledServices ( null ) ; } break ; default : } } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "[ImsConference objId:" ) ; sb.append ( java.lang.System.identityHashCode ( this ) ) ; sb.append ( " state:" ) ; sb.append ( android.telecom.Connection.stateToString ( getState ( ) ) ) ; sb.append ( " hostConnection:" ) ; sb.append ( mConferenceHost ) ; sb.append ( " participants:" ) ; sb.append ( mConferenceParticipantConnections.size ( ) ) ; sb.append ( "]" ) ; return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "[ImsConference objId:" ) ; sb.append ( java.lang.System.identityHashCode ( this ) ) ; sb.append ( " telecomCallID:" ) ; sb.append ( getTelecomCallId ( ) ) ; sb.append ( " state:" ) ; sb.append ( android.telecom.Connection.stateToString ( getState ( ) ) ) ; sb.append ( " hostConnection:" ) ; sb.append ( mConferenceHost ) ; sb.append ( " participants:" ) ; sb.append ( mConferenceParticipantConnections.size ( ) ) ; sb.append ( "]" ) ; return sb.toString ( ) ; }
Source:
public boolean generate ( java.lang.String key , int uid ) { try { return ( mBinder.generate ( key , uid ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean importKey ( java.lang.String keyName , byte [ ] key , int uid , int flags ) { try { return ( mBinder.import_key ( keyName , key , uid , flags ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotDeleteFileException { baseVFS.getRootInputVDir ( ) . delete ( fileType.buildFileVPath ( typePath ) ) ; }

Target:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException , com.android.sched.util.file.CannotDeleteFileException { try { baseVFS.getRootInputVDir ( ) . delete ( fileType.buildFileVPath ( typePath ) ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public final byte [ ] doFinal ( byte [ ] input ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } return spiImpl.engineDoFinal ( input , 0 , input.length ) ; }

Target:
public final void updateAAD ( byte [ ] input ) { if ( input == null ) { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( ( input.length ) == 0 ) { return ; } getSpi ( ) . engineUpdateAAD ( input , 0 , input.length ) ; }
Source:
protected void doOKAction ( ) { myPackageName = myPackageNameField.getText ( ) . trim ( ) ; myModuleName = myModuleNameField.getText ( ) . trim ( ) ; super . doOKAction ( ) ; }

Target:
protected void doOKAction ( ) { myPackageName = myPackageNameField.getText ( ) . trim ( ) ; myModuleName = myModuleNameField.getText ( ) . trim ( ) ; myTemplate = ( ( com.google.gct.idea.appengine.wizard.AppEngineTemplates.TemplateInfo ) ( myTemplateBox.getSelectedItem ( ) ) ) . getFile ( ) ; super . doOKAction ( ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.tv.TvApplication.setCurrentRunningProcess ( context , true ) ; ( ( com.android.tv.TvApplication ) ( context.getApplicationContext ( ) ) ) . handleInputCountChanged ( ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.tv.TvApplication.setCurrentRunningProcess ( context , true ) ; ( ( com.android.tv.TvApplication ) ( context.getApplicationContext ( ) ) ) . handleInputCountChanged ( ) ; android.net.Uri uri = intent.getData ( ) ; final java.lang.String packageName = ( uri != null ) ? uri.getSchemeSpecificPart ( ) : null ; com.android.tv.util.Partner.reset ( context , packageName ) ; }
Source:
public void onLinkPropertiesChanged ( android.net.Network network , android.net.LinkProperties linkProperties ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLinkPropertiesChanged" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventBase ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) ) ; } }

Target:
public void onLinkPropertiesChanged ( android.net.Network network , android.net.LinkProperties linkProperties ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLinkPropertiesChanged" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventOnLinkPropertiesChanged ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) , linkProperties.getInterfaceName ( ) ) ) ; } }
Source:
public int getCurrentPhoneTypeForSlot ( int slotId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getActivePhoneTypeForSlot ( slotId ) ; } else { return getPhoneTypeFromProperty ( slotId ) ; } } catch ( android.os.RemoteException ex ) { return getPhoneTypeFromProperty ( slotId ) ; } catch ( java.lang.NullPointerException ex ) { return getPhoneTypeFromProperty ( slotId ) ; } }

Target:
private int getPhoneTypeFromProperty ( ) { return getPhoneTypeFromProperty ( getPhoneId ( ) ) ; }
Source:
protected vogar.Result execute ( ) throws java.lang.Exception { vogar.Classpath cp = vogar.Classpath.of ( jar ) ; vogar.Classpath dependentCp = classpath ; if ( ( benchmark ) && ( ( action ) != null ) ) { cp.addAll ( classpath ) ; dependentCp = new vogar.Classpath ( ) ; } androidSdk.dex ( multidex , localDex , localTempDir , cp , dependentCp ) ; return vogar.Result.SUCCESS ; }

Target:
protected vogar.Result execute ( ) throws java.lang.Exception { vogar.Classpath cp = vogar.Classpath.of ( jar ) ; vogar.Classpath dependentCp = classpath ; if ( ( benchmark ) && ( ( action ) != null ) ) { cp.addAll ( classpath ) ; dependentCp = new vogar.Classpath ( ) ; } androidSdk.dex ( multidex , localDex , localTempDir , cp , dependentCp , dexer ) ; return vogar.Result.SUCCESS ; }
Source:
java.util.Map.Entry < K , java.util.Collection < V > > transform ( final K key ) { return new com.google.common.collect.AbstractMapEntry < K , java.util.Collection < V > > ( ) { @ java.lang.Override public K getKey ( ) { return key ; } @ java.lang.Override public java.util.Collection < V > getValue ( ) { return get ( key ) ; } } ; }

Target:
java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ( ) { return map.entrySet ( ) . iterator ( ) ; }
Source:
public void duplicateCacheMiss ( ) throws java.lang.Exception { com.android.volley.mock.MockRequest secondRequest = new com.android.volley.mock.MockRequest ( ) ; mRequest.setSequence ( 1 ) ; secondRequest.setSequence ( 2 ) ; mCacheQueue.add ( mRequest ) ; mCacheQueue.add ( secondRequest ) ; mCacheQueue.waitUntilEmpty ( com.android.volley.CacheDispatcherTest.TIMEOUT_MILLIS ) ; assertTrue ( ( ( mNetworkQueue.size ( ) ) == 1 ) ) ; assertFalse ( mDelivery.postResponse_called ) ; }

Target:
public void duplicateCacheMiss ( ) throws java.lang.Exception { com.android.volley.toolbox.StringRequest secondRequest = new com.android.volley.toolbox.StringRequest ( Request.Method.GET , "http://foo" , null , null ) ; mRequest.setSequence ( 1 ) ; secondRequest.setSequence ( 2 ) ; mDispatcher.processRequest ( mRequest ) ; mDispatcher.processRequest ( secondRequest ) ; org.mockito.Mockito.verify ( mNetworkQueue ) . put ( mRequest ) ; com.android.volley.CacheDispatcherTest.verifyNoResponse ( mDelivery ) ; }
Source:
void bondStateChanged ( android.bluetooth.BluetoothDevice device , int bondState ) { if ( com.android.bluetooth.hearingaid.HearingAidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hearingaid.HearingAidService.TAG , ( ( ( "Bond state changed for device: " + device ) + " state: " ) + bondState ) ) ; } if ( bondState != ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) { return ; } }

Target:
void bondStateChanged ( android.bluetooth.BluetoothDevice device , int bondState ) { if ( com.android.bluetooth.hearingaid.HearingAidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hearingaid.HearingAidService.TAG , ( ( ( "Bond state changed for device: " + device ) + " state: " ) + bondState ) ) ; } if ( bondState != ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) { return ; } synchronized ( mStateMachines ) { com.android.bluetooth.hearingaid.HearingAidStateMachine sm = mStateMachines.get ( device ) ; if ( sm == null ) { return ; } if ( ( sm.getConnectionState ( ) ) != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { return ; } removeStateMachine ( device ) ; } }
Source:
private static boolean isDeviceOnline ( android.net.Uri uri ) { try ( java.net.Socket socket = new java.net.Socket ( ) ) { java.net.InetSocketAddress a = new java.net.InetSocketAddress ( uri.getHost ( ) , uri.getPort ( ) ) ; socket.connect ( a , com.android.bips.ipp.GetCapabilitiesTask.ONLINE_TIMEOUT_MILLIS ) ; return true ; } catch ( java.io.IOException e ) { return false ; } }

Target:
private boolean isDeviceOnline ( android.net.Uri uri ) { try ( java.net.Socket socket = new java.net.Socket ( ) ) { java.net.InetSocketAddress a = new java.net.InetSocketAddress ( uri.getHost ( ) , uri.getPort ( ) ) ; socket.connect ( a , ( ( int ) ( mTimeout ) ) ) ; return true ; } catch ( java.io.IOException e ) { return false ; } }
Source:
public com.android.jack.load.PackageLoader getLoaderForSubPackage ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage loading , @ javax.annotation.Nonnull java.lang.String simpleName ) throws com.android.jack.ir.ast.JPackageLookupException { for ( com.android.sched.vfs.InputVElement sub : packageVDir.list ( ) ) { if ( ( sub.isVDir ( ) ) && ( sub.getName ( ) . equals ( simpleName ) ) ) { return new com.android.jack.jayce.JaycePackageLoader ( inputJackLibrary , ( ( com.android.sched.vfs.InputVDir ) ( sub ) ) , lookup , defaultLoadLevel ) ; } } throw new com.android.jack.ir.ast.JPackageLookupException ( simpleName , loading ) ; }

Target:
public com.android.jack.load.PackageLoader getLoaderForSubPackage ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage loading , @ javax.annotation.Nonnull java.lang.String simpleName ) throws com.android.jack.ir.ast.JPackageLookupException { try { return new com.android.jack.jayce.JaycePackageLoader ( inputJackLibrary , packageVDir.getInputVDir ( new com.android.sched.vfs.VPath ( simpleName , '/' ) ) , lookup , defaultLoadLevel ) ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.jack.ir.ast.JPackageLookupException ( simpleName , loading ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.ir.ast.JPackageLookupException ( simpleName , loading ) ; } }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "wrongparams.xml:11: Warning: Invalid layout param in a FrameLayout: layout_weight\n" + ( ( ( ( ( "wrongparams.xml:23: Warning: Invalid layout param in a LinearLayout: layout_alignParentLeft\n" + "wrongparams.xml:24: Warning: Invalid layout param in a LinearLayout: layout_alignParentTop\n" ) + "wrongparams.xml:33: Warning: Invalid layout param in a LinearLayout: layout_alignBottom\n" ) + "wrongparams.xml:34: Warning: Invalid layout param in a LinearLayout: layout_toRightOf\n" ) + "wrongparams.xml:42: Warning: Invalid layout param in a LinearLayout: layout_alignLeft\n" ) + "wrongparams.xml:43: Warning: Invalid layout param in a LinearLayout: layout_below" ) ) , lintProject ( "res/layout/wrongparams.xml" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "res/layout/wrongparams.xml:11: Warning: Invalid layout param in a FrameLayout: layout_weight [ObsoleteLayoutParam]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " android:layout_weight=\"1\"\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/wrongparams.xml:23: Warning: Invalid layout param in a LinearLayout: layout_alignParentLeft [ObsoleteLayoutParam]\n" ) + " android:layout_alignParentLeft=\"true\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/wrongparams.xml:24: Warning: Invalid layout param in a LinearLayout: layout_alignParentTop [ObsoleteLayoutParam]\n" ) + " android:layout_alignParentTop=\"true\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/wrongparams.xml:33: Warning: Invalid layout param in a LinearLayout: layout_alignBottom [ObsoleteLayoutParam]\n" ) + " android:layout_alignBottom=\"@+id/button1\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/wrongparams.xml:34: Warning: Invalid layout param in a LinearLayout: layout_toRightOf [ObsoleteLayoutParam]\n" ) + " android:layout_toRightOf=\"@+id/button1\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/wrongparams.xml:42: Warning: Invalid layout param in a LinearLayout: layout_alignLeft [ObsoleteLayoutParam]\n" ) + " android:layout_alignLeft=\"@+id/button1\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/wrongparams.xml:43: Warning: Invalid layout param in a LinearLayout: layout_below [ObsoleteLayoutParam]\n" ) + " android:layout_below=\"@+id/button1\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 7 warnings\n" ) + "" ) ) , lintProject ( "res/layout/wrongparams.xml" ) ) ; }
Source:
public java.nio.ShortBuffer put ( java.nio.ShortBuffer src ) { if ( src == ( this ) ) { throw new java.lang.IllegalArgumentException ( ) ; } if ( ( src.remaining ( ) ) > ( remaining ( ) ) ) { throw new java.nio.BufferOverflowException ( ) ; } short [ ] contents = new short [ src.remaining ( ) ] ; src.get ( contents ) ; put ( contents ) ; return this ; }

Target:
public java.nio.ShortBuffer put ( java.nio.ShortBuffer src ) { if ( src == ( this ) ) { throw new java.lang.IllegalArgumentException ( "src == this" ) ; } if ( ( src.remaining ( ) ) > ( remaining ( ) ) ) { throw new java.nio.BufferOverflowException ( ) ; } short [ ] contents = new short [ src.remaining ( ) ] ; src.get ( contents ) ; put ( contents ) ; return this ; }
Source:
public void testInstallEmptySystemExists ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.installCertificate ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }

Target:
public void testInstallEmptyDeletedSystemExists ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.installCertificate ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }
Source:
public com.android.jack.dx.rop.type.Type getArrayType ( ) { if ( ( arrayType ) == null ) { arrayType = com.android.jack.dx.rop.type.Type.putIntern ( new com.android.jack.dx.rop.type.Type ( ( '[' + ( descriptor ) ) , com.android.jack.dx.rop.type.Type.BT_OBJECT ) ) ; } return arrayType ; }

Target:
public java.lang.String getPackageName ( ) { java.lang.String descriptor = getDescriptor ( ) . getString ( ) ; int lastSlash = descriptor.lastIndexOf ( '/' ) ; int lastLeftSquare = descriptor.lastIndexOf ( '[' ) ; if ( lastSlash == ( - 1 ) ) { return "default" ; } else { return descriptor.substring ( ( lastLeftSquare + 2 ) , lastSlash ) . replace ( '/' , '.' ) ; } }
Source:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( java.lang.String name ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { com.android.tools.perflib.heap.ClassObj theClass = mHeap.getClass ( name ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
public void testAssertNoOverlaps ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.length ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noOverlaps ( ) ) ; } catch ( junit.framework.AssertionFailedError expected ) { return ; } fail ( "Overlaps are not detected" ) ; }

Target:
public void assertNoOverlaps ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.length ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; expectedException.expect ( junit.framework.AssertionFailedError.class ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noOverlaps ( ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.InstanceUtilsTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SortTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }
Source:
private void registerAllAppEvents ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) log ( "registerUiccCardEvents: registering for EVENT_APP_READY" ) ; app.registerForReady ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_APP_READY , null ) ; com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ir != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) log ( "registerUiccCardEvents: registering for EVENT_RECORDS_LOADED" ) ; ir.registerForRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_RECORDS_LOADED , null ) ; ir.registerForRecordsEvents ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_RECORD_EVENTS , null ) ; } } } }

Target:
private void registerAllAppEvents ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) com.android.internal.telephony.uicc.UiccProfile.log ( "registerUiccCardEvents: registering for EVENT_APP_READY" ) ; app.registerForReady ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_APP_READY , null ) ; com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ir != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) com.android.internal.telephony.uicc.UiccProfile.log ( "registerUiccCardEvents: registering for EVENT_RECORDS_LOADED" ) ; ir.registerForRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_RECORDS_LOADED , null ) ; ir.registerForRecordsEvents ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_RECORD_EVENTS , null ) ; } } } }
Source:
public boolean visitConstructorInvocation ( lombok.ast.ConstructorInvocation node ) { lombok.ast.NormalTypeBody anonymous = node.astAnonymousClassBody ( ) ; if ( anonymous != null ) { mFoundInnerClass = true ; } return super . visitConstructorInvocation ( node ) ; }

Target:
public void visitMethodCallExpression ( com.intellij.psi.PsiMethodCallExpression expression ) { super . visitMethodCallExpression ( expression ) ; com.intellij.psi.PsiReferenceExpression methodExpression = expression.getMethodExpression ( ) ; com.intellij.psi.PsiExpression qualifier = methodExpression.getQualifierExpression ( ) ; com.intellij.psi.PsiField dataBinder = com.android.tools.lint.checks.RecyclerViewDetector.getDataBinderReference ( qualifier ) ; if ( dataBinder != null ) { if ( ( mDataBinders ) == null ) { mDataBinders = com.google.common.collect.Lists.newArrayList ( ) ; } mDataBinders.add ( expression ) ; } }
Source:
public void receiveSessionModifyRequest ( android.telecom.VideoProfile videoProfile ) { try { com.android.server.telecom.Log.startSession ( "VPP.rSMR" ) ; synchronized ( mLock ) { logFromVideoProvider ( ( "receiveSessionModifyRequest: " + videoProfile ) ) ; for ( com.android.server.telecom.VideoProviderProxy.Listener listener : mListeners ) { listener.onSessionModifyRequestReceived ( mCall , videoProfile ) ; } this . receiveSessionModifyRequest ( videoProfile ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void receiveSessionModifyRequest ( android.telecom.VideoProfile videoProfile ) { try { android.telecom.Log.startSession ( "VPP.rSMR" ) ; synchronized ( mLock ) { logFromVideoProvider ( ( "receiveSessionModifyRequest: " + videoProfile ) ) ; for ( com.android.server.telecom.VideoProviderProxy.Listener listener : mListeners ) { listener.onSessionModifyRequestReceived ( mCall , videoProfile ) ; } this . receiveSessionModifyRequest ( videoProfile ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void testParseAaptOutputWithRange2 ( ) throws java.io.IOException { createTempXmlFile ( ) ; writeToFile ( "<manifest xmlns:android='http://schemas.android.com/apk/res/android'" , " android:versionCode='12' android:versionName='2.0' package='com.android.tests.basic'>" , " <uses-sdk android:minSdkVersion='16' android:targetSdkVersion='16'/>" , " <application android:icon='@drawable/icon' android:label=" , " '@string/app_name2'>" ) ; java.lang.String messageText = "No resource found that matches the given name (at 'label' with value " + "'@string/app_name2')." ; java.lang.String err = ( ( sourceFilePath ) + ":4: error: Error: " ) + messageText ; java.util.Collection < com.android.ide.common.blame.output.GradleMessage > messages = parser.parseToolOutput ( err ) ; assertHasCorrectErrorMessage ( messages , messageText , 5 , 8 ) ; }

Target:
public void testParseAaptOutputWithRange2 ( ) throws java.io.IOException { createTempXmlFile ( ) ; writeToFile ( "<manifest xmlns:android='http://schemas.android.com/apk/res/android'" , " android:versionCode='12' android:versionName='2.0' package='com.android.tests.basic'>" , " <uses-sdk android:minSdkVersion='16' android:targetSdkVersion='16'/>" , " <application android:icon='@drawable/icon' android:label=" , " '@string/app_name2'>" ) ; java.lang.String messageText = "No resource found that matches the given name (at 'label' with value " + "'@string/app_name2')." ; java.lang.String err = ( ( sourceFilePath ) + ":4: error: Error: " ) + messageText ; java.util.Collection < com.android.ide.common.blame.Message > messages = parser.parseToolOutput ( err ) ; assertHasCorrectErrorMessage ( messages , messageText , 5 , 8 ) ; }
Source:
public java.lang.String getDeviceId ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getDeviceId" ) ) ) { return null ; } final com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( 0 ) ; if ( phone != null ) { return phone.getDeviceId ( ) ; } else { return null ; } }

Target:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , mPhone.getSubId ( ) , callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { mDefault = new com.android.builder.ProductFlavor ( "default" ) ; mDefault2 = new com.android.builder.ProductFlavor ( "default2" ) ; mCustom = new com.android.builder.ProductFlavor ( "custom" ) ; mCustom.setMinSdkVersion ( 42 ) ; mCustom.setTargetSdkVersion ( 43 ) ; mCustom.setRenderscriptTargetApi ( 17 ) ; mCustom.setVersionCode ( 44 ) ; mCustom.setVersionName ( "42.0" ) ; mCustom.setPackageName ( "com.forty.two" ) ; mCustom.setTestPackageName ( "com.forty.two.test" ) ; mCustom.setTestInstrumentationRunner ( "com.forty.two.test.Runner" ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mDefault = new com.android.builder.DefaultProductFlavor ( "default" ) ; mDefault2 = new com.android.builder.DefaultProductFlavor ( "default2" ) ; mCustom = new com.android.builder.DefaultProductFlavor ( "custom" ) ; mCustom.setMinSdkVersion ( 42 ) ; mCustom.setTargetSdkVersion ( 43 ) ; mCustom.setRenderscriptTargetApi ( 17 ) ; mCustom.setVersionCode ( 44 ) ; mCustom.setVersionName ( "42.0" ) ; mCustom.setPackageName ( "com.forty.two" ) ; mCustom.setTestPackageName ( "com.forty.two.test" ) ; mCustom.setTestInstrumentationRunner ( "com.forty.two.test.Runner" ) ; }
Source:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ! ( versionSuffix.isEmpty ( ) ) ) ) { if ( versionName == null ) { if ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }

Target:
public java.lang.String getIdOverride ( ) { java.lang.String idName = mMergedFlavor.getApplicationId ( ) ; java.lang.String idSuffix = mBuildType.getApplicationIdSuffix ( ) ; if ( ( idSuffix != null ) && ( ! ( idSuffix.isEmpty ( ) ) ) ) { if ( idName == null ) { idName = getPackageFromManifest ( ) ; } if ( ( idSuffix.charAt ( 0 ) ) == '.' ) { idName = idName + idSuffix ; } else { idName = ( idName + '.' ) + idSuffix ; } } return idName ; }
Source:
public static void setSocketTimeout ( java.net.Socket s , long timeoutMillis ) throws java.net.SocketException { android.system.StructTimeval tv = android.system.StructTimeval.fromMillis ( timeoutMillis ) ; try { android.system.Os.setsockoptTimeval ( s.getFileDescriptor$ ( ) , android.system.OsConstants.SOL_SOCKET , android.system.OsConstants.SO_SNDTIMEO , tv ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
public static void setSocketWriteTimeout ( java.net.Socket s , long timeoutMillis ) throws java.net.SocketException { android.system.StructTimeval tv = android.system.StructTimeval.fromMillis ( timeoutMillis ) ; try { android.system.Os.setsockoptTimeval ( s.getFileDescriptor$ ( ) , android.system.OsConstants.SOL_SOCKET , android.system.OsConstants.SO_SNDTIMEO , tv ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
public java.lang.String getImei ( int slotId ) { int [ ] subId = android.telephony.SubscriptionManager.getSubId ( slotId ) ; try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getImeiForSubscriber ( subId [ 0 ] , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getDeviceSoftwareVersion ( int slotIndex ) { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; try { return telephony.getDeviceSoftwareVersionForSlot ( slotIndex , getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
public void screenTurnedOff ( int why ) { android.util.EventLog.writeEvent ( 70000 , 0 ) ; synchronized ( mLock ) { mScreenOnEarly = false ; mScreenOnFully = false ; } if ( ( mKeyguardDelegate ) != null ) { mKeyguardDelegate.onScreenTurnedOff ( why ) ; } synchronized ( mLock ) { updateOrientationListenerLp ( ) ; updateLockScreenTimeout ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_DOCK_EVENT.equals ( intent.getAction ( ) ) ) { mDockMode = intent.getIntExtra ( Intent.EXTRA_DOCK_STATE , Intent.EXTRA_DOCK_STATE_UNDOCKED ) ; } else { try { android.app.IUiModeManager uiModeService = IUiModeManager.Stub.asInterface ( android.os.ServiceManager.getService ( Context.UI_MODE_SERVICE ) ) ; mUiMode = uiModeService.getCurrentModeType ( ) ; } catch ( android.os.RemoteException e ) { } } updateRotation ( true ) ; synchronized ( mLock ) { updateOrientationListenerLp ( ) ; } }
Source:
public void run ( ) { try { java.net.InetSocketAddress unreachableIp = new java.net.InetSocketAddress ( "192.0.2.0" , 80 ) ; s.connect ( unreachableIp , 0 ) ; fail ( ( "Connect returned unexpectedly for: " + unreachableIp ) ) ; } catch ( java.net.SocketException expected ) { assertTrue ( expected.getMessage ( ) . contains ( "Socket closed" ) ) ; signal.countDown ( ) ; } catch ( java.io.IOException e ) { fail ( ( "Unexpected exception: " + e ) ) ; } }

Target:
public java.util.List < java.net.Proxy > select ( java.net.URI uri ) { fail ( "ProxySelector#select was called" ) ; return null ; }
Source:
private static long createTime ( java.util.TimeZone timeZone , int year , int monthOfYear , int dayOfMonth , int hourOfDay , int minuteOfHour , int secondOfMinute ) { java.util.Calendar cal = new java.util.GregorianCalendar ( timeZone ) ; cal.clear ( ) ; cal.set ( year , ( monthOfYear - 1 ) , dayOfMonth , hourOfDay , minuteOfHour , secondOfMinute ) ; return cal.getTimeInMillis ( ) ; }

Target:
private static long createUtcTime ( int year , int monthInYear , int day , int hourOfDay , int minute , int second ) { android.icu.util.Calendar cal = new android.icu.util.GregorianCalendar ( android.icu.util.TimeZone.getTimeZone ( "Etc/UTC" ) ) ; cal.clear ( ) ; cal.set ( year , ( monthInYear - 1 ) , day , hourOfDay , minute , second ) ; return cal.getTimeInMillis ( ) ; }
Source:
private void onRespondToDataPathSetupRequestResponseLocal ( android.os.Message command , boolean success , int reasonOnFailure ) { if ( com.android.server.wifi.aware.WifiAwareStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareStateManager.TAG , ( ( ( ( ( "onRespondToDataPathSetupRequestResponseLocal: command=" + command ) + ", success=" ) + success ) + ", reasonOnFailure=" ) + reasonOnFailure ) ) ; } }

Target:
private void onRespondToDataPathSetupRequestResponseLocal ( android.os.Message command , boolean success , int reasonOnFailure ) { if ( com.android.server.wifi.aware.WifiAwareStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareStateManager.TAG , ( ( ( ( ( "onRespondToDataPathSetupRequestResponseLocal: command=" + command ) + ", success=" ) + success ) + ", reasonOnFailure=" ) + reasonOnFailure ) ) ; } mDataPathMgr.onRespondToDataPathRequest ( command.arg2 , success ) ; }
Source:
public void copyFromUnchecked ( byte [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFrom ( byte [ ] d ) { validateIsInt8 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
private static java.lang.String decodeLatin ( byte [ ] data , int offset , int numFields ) throws com.android.internal.telephony.cdma.sms.BearerData.CodingException { if ( ( numFields < 0 ) || ( ( numFields + offset ) > ( data.length ) ) ) { throw new com.android.internal.telephony.cdma.sms.BearerData.CodingException ( "ISO-8859-1 decode failed: offset or length out of range" ) ; } try { return new java.lang.String ( data , offset , numFields , "ISO-8859-1" ) ; } catch ( java.io.UnsupportedEncodingException ex ) { throw new com.android.internal.telephony.cdma.sms.BearerData.CodingException ( ( "ISO-8859-1 decode failed: " + ex ) ) ; } }

Target:
private static java.lang.String decodeLatin ( byte [ ] data , int offset , int numFields ) throws com.android.internal.telephony.cdma.sms.BearerData.CodingException { return com.android.internal.telephony.cdma.sms.BearerData.decodeCharset ( data , offset , numFields , 1 , "ISO-8859-1" ) ; }
Source:
private void sendNotificationThroughDefaultDialer ( com.android.server.telecom.ui.CallInfo callInfo , android.os.UserHandle userHandle ) { int count = mMissedCallCounts.get ( userHandle ) . get ( ) ; android.content.Intent intent = getShowMissedCallIntentForDefaultDialer ( userHandle ) . setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) . putExtra ( TelecomManager.EXTRA_NOTIFICATION_COUNT , count ) . putExtra ( TelecomManager.EXTRA_NOTIFICATION_PHONE_NUMBER , ( callInfo == null ? null : callInfo.getPhoneNumber ( ) ) ) ; com.android.server.telecom.Log.w ( this , "Showing missed calls through default dialer." ) ; mContext.sendBroadcastAsUser ( intent , userHandle , android.Manifest.permission.READ_PHONE_STATE ) ; }

Target:
private void sendNotificationThroughDefaultDialer ( com.android.server.telecom.ui.CallInfo callInfo , android.os.UserHandle userHandle ) { int count = mMissedCallCounts.get ( userHandle ) . get ( ) ; android.content.Intent intent = getShowMissedCallIntentForDefaultDialer ( userHandle ) . setFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) . putExtra ( TelecomManager.EXTRA_NOTIFICATION_COUNT , count ) . putExtra ( TelecomManager.EXTRA_NOTIFICATION_PHONE_NUMBER , ( callInfo == null ? null : callInfo.getPhoneNumber ( ) ) ) ; android.telecom.Log.w ( this , "Showing missed calls through default dialer." ) ; mContext.sendBroadcastAsUser ( intent , userHandle , android.Manifest.permission.READ_PHONE_STATE ) ; }
Source:
public void testStageInstallWithErrorCode_withMissingDistroVersionFile ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withMissingDistroVersionFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { try { com.android.uiautomator.UiAutomatorViewer window = new com.android.uiautomator.UiAutomatorViewer ( ) ; window.setBlockOnOpen ( true ) ; window.open ( ) ; com.android.uiautomator.UiAutomatorModel.getModel ( ) . cleanUp ( ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { com.android.uiautomator.DebugBridge.init ( ) ; try { com.android.uiautomator.UiAutomatorViewer window = new com.android.uiautomator.UiAutomatorViewer ( ) ; window.setBlockOnOpen ( true ) ; window.open ( ) ; com.android.uiautomator.UiAutomatorModel.getModel ( ) . cleanUp ( ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } finally { com.android.uiautomator.DebugBridge.terminate ( ) ; } }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { if ( android.telephony.CellIdentityLte.DBG ) log ( ( "writeToParcel(Parcel, int): " + ( toString ( ) ) ) ) ; super . writeToParcel ( dest , android.telephony.TYPE_LTE ) ; dest.writeInt ( mCi ) ; dest.writeInt ( mPci ) ; dest.writeInt ( mTac ) ; dest.writeInt ( mEarfcn ) ; dest.writeString ( mAlphaLong ) ; dest.writeString ( mAlphaShort ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { if ( android.telephony.CellIdentityLte.DBG ) log ( ( "writeToParcel(Parcel, int): " + ( toString ( ) ) ) ) ; super . writeToParcel ( dest , android.telephony.TYPE_LTE ) ; dest.writeInt ( mCi ) ; dest.writeInt ( mPci ) ; dest.writeInt ( mTac ) ; dest.writeInt ( mEarfcn ) ; dest.writeInt ( mBandwidth ) ; dest.writeString ( mAlphaLong ) ; dest.writeString ( mAlphaShort ) ; }
Source:
public void resetSimResponse ( int token , int resultCode ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( ( ( "resetSimResponse: token " + token ) + " resultCode " ) + resultCode ) ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_RESET_SIM_RESP ) ; sapMessage.setResultCode ( resultCode ) ; removeOngoingReqAndSendMessage ( token , sapMessage ) ; }

Target:
public void resetSimResponse ( int token , int resultCode ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( ( ( "resetSimResponse: token " + token ) + " resultCode " ) + resultCode ) ) ; com.android.bluetooth.sap.SapService.notifyUpdateWakeLock ( mSapServiceHandler ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_RESET_SIM_RESP ) ; sapMessage.setResultCode ( resultCode ) ; removeOngoingReqAndSendMessage ( token , sapMessage ) ; }
Source:
public void testCanUninstallAllUserCaCerts ( ) throws java.security.cert.CertificateException { assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_RSA_1.caCertificate ) ) ; assertTrue ( mDevicePolicyManager.installCaCert ( getWho ( ) , FAKE_DSA_1.caCertificate ) ) ; mDevicePolicyManager.uninstallAllUserCaCerts ( getWho ( ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_RSA_1.caCertificate ) ) ; assertFalse ( hasCaCertInstalled ( FAKE_DSA_1.caCertificate ) ) ; }

Target:
private void assertUninstalled ( byte [ ] caBytes ) throws java.security.GeneralSecurityException , java.security.cert.CertificateException { java.security.cert.Certificate caCert = com.android.cts.deviceowner.CaCertManagementTest.readCertificate ( caBytes ) ; assertFalse ( isCaCertInstalledAndTrusted ( caCert ) ) ; }
Source:
public void testPackageSubstitution_noDot ( ) { org.mockito.Mockito.when ( mAttr.getValue ( ) ) . thenReturn ( "ActivityOne" ) ; assertNotNull ( new com.android.manifmerger.XmlAttribute ( mXmlElement , mAttr , new com.android.manifmerger.AttributeModel ( "ActivityOne" , true , null , null ) ) ) ; org.mockito.Mockito.verify ( mAttr ) . setValue ( "com.foo.bar.ActivityOne" ) ; }

Target:
public void testPackageSubstitution_noDot ( ) { org.mockito.Mockito.when ( mAttr.getValue ( ) ) . thenReturn ( "ActivityOne" ) ; assertNotNull ( new com.android.manifmerger.XmlAttribute ( mXmlElement , mAttr , com.android.manifmerger.AttributeModel.newModel ( "ActivityOne" ) . setIsPackageDependent ( ) . build ( ) ) ) ; org.mockito.Mockito.verify ( mAttr ) . setValue ( "com.foo.bar.ActivityOne" ) ; }
Source:
public static double nextDown ( double d ) { if ( ( sun.misc.FpUtils.isNaN ( d ) ) || ( d == ( java.lang.Double.NEGATIVE_INFINITY ) ) ) return d ; else { if ( d == 0.0 ) return - ( java.lang.Double.MIN_VALUE ) ; else return java.lang.Double.longBitsToDouble ( ( ( java.lang.Double.doubleToRawLongBits ( d ) ) + ( d > 0.0 ? - 1L : + 1L ) ) ) ; } }

Target:
public static double nextDown ( double d ) { return java.lang.Math.nextDown ( d ) ; }
Source:
public void testKeyStore_SetCertificate_CA_Success ( ) throws java.lang.Exception { final java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; final java.security.cert.Certificate actual = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; mKeyStore.load ( null , null ) ; mKeyStore.setCertificateEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , actual ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; java.security.cert.Certificate retrieved = mKeyStore.getCertificate ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ; assertEquals ( "Retrieved certificate should be the same as the one inserted" , actual , retrieved ) ; }

Target:
public void testKeyStore_SetCertificate_CA_Encrypted_Success ( ) throws java.lang.Exception { final java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; final java.security.cert.Certificate actual = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; setupPassword ( ) ; mKeyStore.load ( null , null ) ; mKeyStore.setCertificateEntry ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , actual ) ; assertAliases ( new java.lang.String [ ] { android.security.AndroidKeyStoreTest.TEST_ALIAS_1 } ) ; java.security.cert.Certificate retrieved = mKeyStore.getCertificate ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ; assertEquals ( "Retrieved certificate should be the same as the one inserted" , actual , retrieved ) ; }