auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testProviderService_supportsParameter_SupportedKeyClasses_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 ( ) ) ; put ( "Signature.FOO SupportedKeyClasses" , java.security.interfaces.RSAPrivateKey.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 ( ) ) ; } }

Target:
public void testProviderService_supportsParameter_SupportedKeyFormats_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 ( ) ) ; put ( "Signature.FOO SupportedKeyFormats" , "Invalid" ) ; } } ; 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:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSample ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SAMPLES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinToolsRev ( ) { return minToolsRev ; } } ; }

Target:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSample ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision , @ com.android.annotations.NonNull final com.android.sdklib.repository.FullRevision minToolsRev ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SAMPLES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public com.android.sdklib.repository.FullRevision getMinToolsRev ( ) { return minToolsRev ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }
Source:
public void onEmptyViewActionButtonClicked ( ) { final android.app.Activity activity = getActivity ( ) ; if ( activity == null ) { return ; } java.lang.String [ ] deniedPermissions = com.android.dialer.util.PermissionsUtil.getPermissionsCurrentlyDenied ( getContext ( ) , PermissionsUtil.allContactsGroupPermissionsUsedInDialer ) ; if ( ( deniedPermissions.length ) > 0 ) { com.android.dialer.common.LogUtil.i ( "OldSpeedDialFragment.onEmptyViewActionButtonClicked" , ( "Requesting permissions: " + ( java.util.Arrays.toString ( deniedPermissions ) ) ) ) ; android.support.v13.app.FragmentCompat.requestPermissions ( this , deniedPermissions , com.android.dialer.app.list.OldSpeedDialFragment.READ_CONTACTS_PERMISSION_REQUEST_CODE ) ; } else { ( ( com.android.dialer.app.list.OldSpeedDialFragment.HostInterface ) ( activity ) ) . showAllContactsTab ( ) ; } }

Target:
public void onRequestPermissionsResult ( int requestCode , java.lang.String [ ] permissions , int [ ] grantResults ) { if ( requestCode == ( com.android.dialer.app.list.OldSpeedDialFragment.READ_CONTACTS_PERMISSION_REQUEST_CODE ) ) { if ( ( ( grantResults.length ) == 1 ) && ( ( android.content.pm.PackageManager.PERMISSION_GRANTED ) == ( grantResults [ 0 ] ) ) ) { com.android.dialer.util.PermissionsUtil.notifyPermissionGranted ( getContext ( ) , android.Manifest.permission.READ_CONTACTS ) ; } } }
Source:
public java.lang.Object [ ] getElements ( java.lang.Object inputElement ) { if ( inputElement instanceof com.android.ddmlib.Client ) { com.android.ddmlib.AllocationInfo [ ] allocs = ( ( com.android.ddmlib.Client ) ( inputElement ) ) . getClientData ( ) . getAllocations ( ) ; if ( allocs != null ) { return allocs ; } } return new java.lang.Object [ 0 ] ; }

Target:
public java.lang.Object [ ] getElements ( java.lang.Object inputElement ) { if ( inputElement instanceof com.android.ddmlib.Client ) { com.android.ddmlib.AllocationInfo [ ] allocs = ( ( com.android.ddmlib.Client ) ( inputElement ) ) . getClientData ( ) . getAllocations ( ) ; if ( allocs != null ) { java.util.Arrays.sort ( allocs , mSorter ) ; return allocs ; } } return new java.lang.Object [ 0 ] ; }
Source:
public int previousCodePoint ( ) { int ch1 = previous ( ) ; if ( android.icu.text.UTF16.isTrailSurrogate ( ( ( char ) ( ch1 ) ) ) ) { int ch2 = previous ( ) ; if ( android.icu.text.UTF16.isLeadSurrogate ( ( ( char ) ( ch2 ) ) ) ) { return android.icu.impl.UCharacterProperty.getRawSupplementary ( ( ( char ) ( ch2 ) ) , ( ( char ) ( ch1 ) ) ) ; } else if ( ch2 != ( DONE ) ) { next ( ) ; } } return ch1 ; }

Target:
public int previousCodePoint ( ) { int ch1 = previous ( ) ; if ( android.icu.text.UTF16.isTrailSurrogate ( ( ( char ) ( ch1 ) ) ) ) { int ch2 = previous ( ) ; if ( android.icu.text.UTF16.isLeadSurrogate ( ( ( char ) ( ch2 ) ) ) ) { return java.lang.Character.toCodePoint ( ( ( char ) ( ch2 ) ) , ( ( char ) ( ch1 ) ) ) ; } else if ( ch2 != ( DONE ) ) { next ( ) ; } } return ch1 ; }
Source:
public void dexopt ( java.lang.String apkPath , int uid , java.lang.String instructionSet , int dexoptNeeded , int dexFlags , java.lang.String compilerFilter , java.lang.String volumeUuid , java.lang.String sharedLibraries ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; mInstaller.dexopt ( apkPath , uid , instructionSet , dexoptNeeded , dexFlags , compilerFilter , volumeUuid , sharedLibraries ) ; }

Target:
public void onStart ( ) { if ( ( mInstaller ) != null ) { android.util.Slog.i ( com.android.server.pm.Installer.TAG , "Waiting for installd to be ready." ) ; mInstaller.waitForConnection ( ) ; } }
Source:
public void testSignalPoll ( ) throws java.lang.Exception { android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; android.net.wifi.IClientInterface clientInterface = org.mockito.Mockito.mock ( android.net.wifi.IClientInterface.class ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( wificond ) ; org.mockito.Mockito.when ( wificond.createClientInterface ( ) ) . thenReturn ( clientInterface ) ; mWificondControl.setupDriverForClientMode ( ) ; mWificondControl.signalPoll ( ) ; org.mockito.Mockito.verify ( clientInterface ) . signalPoll ( ) ; }

Target:
public void testSignalPoll ( ) throws java.lang.Exception { android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; android.net.wifi.IClientInterface clientInterface = getMockClientInterface ( ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( wificond ) ; org.mockito.Mockito.when ( wificond.createClientInterface ( ) ) . thenReturn ( clientInterface ) ; mWificondControl.setupDriverForClientMode ( ) ; mWificondControl.signalPoll ( ) ; org.mockito.Mockito.verify ( clientInterface ) . signalPoll ( ) ; }
Source:
private void updateAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager , mSdkLog ) ; avdManager.updateAvd ( avdName , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { errorAndExit ( e.getMessage ( ) ) ; } }

Target:
private void updateAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = getAvdManager ( ) ; avdManager.updateAvd ( avdName , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { errorAndExit ( e.getMessage ( ) ) ; } }
Source:
public boolean fetchUuidsWithSdp ( ) { android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ( isBluetoothEnabled ( ) ) == false ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot fetchUuidsWithSdp" ) ; return false ; } try { return service.fetchRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public android.os.ParcelUuid [ ] getUuids ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ! ( isBluetoothEnabled ( ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get remote device Uuids" ) ; return null ; } try { return service.getRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }
Source:
protected void engineInit ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { final byte [ ] iv ; if ( params instanceof javax.crypto.spec.IvParameterSpec ) { javax.crypto.spec.IvParameterSpec ivParams = ( ( javax.crypto.spec.IvParameterSpec ) ( params ) ) ; iv = ivParams.getIV ( ) ; } else { iv = null ; } engineInitInternal ( opmode , key , iv , random ) ; }

Target:
protected int getOutputSizeForFinal ( int inputLen ) { if ( ( modeBlockSize ) == 1 ) { return inputLen ; } else { final int buffered = org.conscrypt.NativeCrypto.get_EVP_CIPHER_CTX_buf_len ( cipherCtx ) ; if ( ( getPadding ( ) ) == ( org.conscrypt.OpenSSLCipher.Padding.NOPADDING ) ) { return buffered + inputLen ; } else { final int totalLen = ( inputLen + buffered ) + ( modeBlockSize ) ; return totalLen - ( totalLen % ( modeBlockSize ) ) ; } } }
Source:
private void sendImsFeatureCreatedCallback ( int slot , int feature ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureListener > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureListener callbacks = i.next ( ) ; try { callbacks.imsFeatureCreated ( slot , feature ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureCreatedCallback: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }

Target:
private void sendImsFeatureStatusChanged ( int slot , int feature , int status ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureCallback > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureCallback callbacks = i.next ( ) ; try { callbacks.imsStatusChanged ( slot , feature , status ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureStatusChanged: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }
Source:
void dispatchMediaKeyWithWakeLockToAudioService ( android.view.KeyEvent event ) { if ( android.app.ActivityManagerNative.isSystemReady ( ) ) { android.media.IAudioService audioService = com.android.internal.policy.impl.PhoneWindowManager.getAudioService ( ) ; if ( audioService != null ) { try { audioService.dispatchMediaKeyEventUnderWakelock ( event ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.policy.impl.PhoneWindowManager.TAG , ( "dispatchMediaKeyEvent threw exception " + e ) ) ; } } } }

Target:
public void screenTurningOn ( final com.android.internal.policy.impl.ScreenOnListener screenOnListener ) { if ( com.android.internal.policy.impl.PhoneWindowManager.DEBUG_WAKEUP ) android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "Screen turning on..." ) ; synchronized ( mLock ) { mScreenOnEarly = true ; mScreenOnFully = false ; mWindowManagerDrawComplete = false ; mScreenOnListener = screenOnListener ; updateOrientationListenerLp ( ) ; } mWindowManagerInternal.waitForAllWindowsDrawn ( mWindowManagerDrawCallback , com.android.internal.policy.impl.PhoneWindowManager.WAITING_FOR_DRAWN_TIMEOUT ) ; }
Source:
public static android.os.UserHandle checkUserHandle ( final int userId ) { final org.hamcrest.Matcher < android.os.UserHandle > m = new org.hamcrest.BaseMatcher < android.os.UserHandle > ( ) { @ java.lang.Override public boolean matches ( java.lang.Object item ) { if ( item == null ) return false ; return com.google.common.base.Objects.equal ( ( ( android.os.UserHandle ) ( item ) ) . getIdentifier ( ) , userId ) ; } @ java.lang.Override public void describeTo ( org.hamcrest.Description description ) { description.appendText ( ( ( "UserHandle: user-id= \"" + userId ) + "\"" ) ) ; } } ; return org.mockito.Mockito.argThat ( m ) ; }

Target:
public static android.os.UserHandle checkUserHandle ( final int userId ) { final org.hamcrest.Matcher < android.os.UserHandle > m = new org.hamcrest.BaseMatcher < android.os.UserHandle > ( ) { @ java.lang.Override public boolean matches ( java.lang.Object item ) { if ( item == null ) return false ; return com.google.common.base.Objects.equal ( ( ( android.os.UserHandle ) ( item ) ) . getIdentifier ( ) , userId ) ; } @ java.lang.Override public void describeTo ( org.hamcrest.Description description ) { description.appendText ( ( ( "UserHandle: user-id= \"" + userId ) + "\"" ) ) ; } } ; return org.mockito.hamcrest.MockitoHamcrest.argThat ( m ) ; }
Source:
public static com.android.ide.common.rendering.RenderSecurityManager getCurrent ( ) { if ( com.android.ide.common.rendering.RenderSecurityManager.sIsRenderThread.get ( ) ) { java.lang.SecurityManager securityManager = java.lang.System.getSecurityManager ( ) ; if ( securityManager instanceof com.android.ide.common.rendering.RenderSecurityManager ) { return ( ( com.android.ide.common.rendering.RenderSecurityManager ) ( securityManager ) ) ; } } return null ; }

Target:
public static com.android.ide.common.rendering.RenderSecurityManager getCurrent ( ) { if ( com.android.ide.common.rendering.RenderSecurityManager.sIsRenderThread.get ( ) ) { java.lang.SecurityManager securityManager = java.lang.System.getSecurityManager ( ) ; if ( securityManager instanceof com.android.ide.common.rendering.RenderSecurityManager ) { com.android.ide.common.rendering.RenderSecurityManager manager = ( ( com.android.ide.common.rendering.RenderSecurityManager ) ( securityManager ) ) ; return manager.isRelevant ( ) ? manager : null ; } } return null ; }
Source:
public void testWithHintResourceId ( ) { android.widget.TextView textView = new android.widget.TextView ( context ) ; textView.setHint ( R.string.something ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.withHint ( R.string.something ) . matches ( textView ) ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.withHint ( R.string.other_string ) . matches ( textView ) ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.withHint ( ( ( R.string.other_string ) + 100 ) ) . matches ( textView ) ) ; }

Target:
public void withHintResourceIdTest ( ) { android.widget.TextView textView = new android.widget.TextView ( context ) ; textView.setHint ( R.string.something ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.matcher.ViewMatchers.withHint ( R.string.something ) . matches ( textView ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.withHint ( R.string.other_string ) . matches ( textView ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.withHint ( ( ( R.string.other_string ) + 100 ) ) . matches ( textView ) ) ; }
Source:
public boolean removeHeaderView ( android.view.View v ) { if ( ( mHeaderViewInfos.size ( ) ) > 0 ) { boolean result = false ; if ( ( ( android.widget.HeaderViewListAdapter ) ( mAdapter ) ) . removeHeader ( v ) ) { mDataSetObserver.onChanged ( ) ; result = true ; } removeFixedViewInfo ( v , mHeaderViewInfos ) ; return result ; } return false ; }

Target:
public void addHeaderView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { if ( ( ( mAdapter ) != null ) && ( ! ( ( mAdapter ) instanceof android.widget.HeaderViewListAdapter ) ) ) { throw new java.lang.IllegalStateException ( "Cannot add header view to list -- setAdapter has already been called." ) ; } android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mHeaderViewInfos.add ( info ) ; if ( ( ( mAdapter ) != null ) && ( ( mDataSetObserver ) != null ) ) { mDataSetObserver.onChanged ( ) ; } }
Source:
public void test_isSocket ( ) throws java.lang.Exception { java.io.File f = new java.io.File ( "/dev/null" ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( f ) ; assertFalse ( fis.getFD ( ) . isSocket$ ( ) ) ; fis.close ( ) ; java.net.ServerSocket s = new java.net.ServerSocket ( ) ; assertTrue ( s.getImpl ( ) . getFileDescriptor ( ) . isSocket$ ( ) ) ; s.close ( ) ; }

Target:
public void test_isSocket ( ) throws java.lang.Exception { java.io.File f = new java.io.File ( "/dev/null" ) ; java.io.FileInputStream fis = new java.io.FileInputStream ( f ) ; assertFalse ( fis.getFD ( ) . isSocket$ ( ) ) ; fis.close ( ) ; java.net.ServerSocket s = new java.net.ServerSocket ( ) ; assertTrue ( s.getImpl ( ) . getFD$ ( ) . isSocket$ ( ) ) ; s.close ( ) ; }
Source:
public void setRttStreams ( boolean shouldBeRtt ) { boolean areStreamsInitialized = ( ( mInCallToConnectionServiceStreams ) != null ) && ( ( mConnectionServiceToInCallStreams ) != null ) ; if ( shouldBeRtt && ( ! areStreamsInitialized ) ) { try { mInCallToConnectionServiceStreams = android.os.ParcelFileDescriptor.createReliablePipe ( ) ; mConnectionServiceToInCallStreams = android.os.ParcelFileDescriptor.createReliablePipe ( ) ; } catch ( java.io.IOException e ) { android.telecom.Log.e ( this , e , "Failed to create pipes for RTT call." ) ; } } else if ( ( ! shouldBeRtt ) && areStreamsInitialized ) { closeRttPipes ( ) ; mInCallToConnectionServiceStreams = null ; mConnectionServiceToInCallStreams = null ; } }

Target:
private boolean areRttStreamsInitialized ( ) { return ( ( mInCallToConnectionServiceStreams ) != null ) && ( ( mConnectionServiceToInCallStreams ) != null ) ; }
Source:
private boolean addint1D_array ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { final int [ ] input = createInputArrayInt ( size [ 0 ] , seed , ( ( java.lang.Integer.MAX_VALUE ) / ( size [ 0 ] ) ) ) ; final int javaRslt = addint ( input ) ; final int rsRslt = s.reduce_addint ( input ) . get ( ) ; return result ( "addint1D_array" , new com.android.rs.test.UT_reduce.timing ( size [ 0 ] ) , javaRslt , rsRslt ) ; }

Target:
private boolean addint1D_array ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { final int [ ] input = createInputArrayInt ( size [ 0 ] , seed , ( ( java.lang.Integer.MAX_VALUE ) / ( size [ 0 ] ) ) ) ; final int javaResult = addint ( input ) ; final int rsResult = s.reduce_addint ( input ) . get ( ) ; return result ( "addint1D_array" , new com.android.rs.test.UT_reduce.timing ( size [ 0 ] ) , javaResult , rsResult ) ; }
Source:
private boolean shouldRunModule ( com.android.compatibility.common.util.IModuleResult module ) { if ( ( mResultTypes.contains ( com.android.compatibility.common.tradefed.result.SubPlanHelper.NOT_EXECUTED ) ) && ( ! ( module.isDone ( ) ) ) ) { return true ; } for ( com.android.compatibility.common.util.TestStatus status : getStatusesToRun ( ) ) { if ( ( module.countResults ( status ) ) > 0 ) { return true ; } } return false ; }

Target:
private boolean shouldRunModule ( com.android.compatibility.common.util.IModuleResult module ) { if ( ( mResultTypes.contains ( com.android.compatibility.common.tradefed.result.SubPlanCreator.NOT_EXECUTED ) ) && ( ! ( module.isDone ( ) ) ) ) { return true ; } for ( com.android.compatibility.common.util.TestStatus status : getStatusesToRun ( ) ) { if ( ( module.countResults ( status ) ) > 0 ) { return true ; } } return false ; }
Source:
public void run ( com.android.compatibility.common.tradefed.command.CaptureList args ) { java.lang.String arg = args.get ( 2 ) . get ( 0 ) ; int shards = java.lang.Integer.parseInt ( arg ) ; if ( shards <= 1 ) { printLine ( "number of shards should be more than 1" ) ; return ; } splitModules ( shards ) ; }

Target:
public void run ( ) { listSubPlans ( ) ; }
Source:
private int getNestedFormComponent ( org.jetbrains.asm4.commons.GeneratorAdapter generator , com.intellij.compiler.instrumentation.InstrumentationClassFinder.PseudoClass componentClass , int formLocal ) throws com.intellij.uiDesigner.compiler.CodeGenerationException { final com.intellij.uiDesigner.compiler.Type componentType = com.intellij.uiDesigner.compiler.Type.getType ( javax.swing.JComponent.class ) ; int componentLocal = generator.newLocal ( componentType ) ; generator.loadLocal ( formLocal ) ; generator.invokeVirtual ( com.intellij.uiDesigner.compiler.Type.getType ( componentClass.getDescriptor ( ) ) , new org.jetbrains.asm4.commons.Method ( com.intellij.uiDesigner.compiler.AsmCodeGenerator.GET_ROOT_COMPONENT_METHOD_NAME , componentType , new com.intellij.uiDesigner.compiler.Type [ 0 ] ) ) ; generator.storeLocal ( componentLocal ) ; return componentLocal ; }

Target:
private int getNestedFormComponent ( org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter generator , com.intellij.compiler.instrumentation.InstrumentationClassFinder.PseudoClass componentClass , int formLocal ) throws com.intellij.uiDesigner.compiler.CodeGenerationException { final com.intellij.uiDesigner.compiler.Type componentType = com.intellij.uiDesigner.compiler.Type.getType ( javax.swing.JComponent.class ) ; int componentLocal = generator.newLocal ( componentType ) ; generator.loadLocal ( formLocal ) ; generator.invokeVirtual ( com.intellij.uiDesigner.compiler.Type.getType ( componentClass.getDescriptor ( ) ) , new org.jetbrains.org.objectweb.asm.commons.Method ( com.intellij.uiDesigner.compiler.AsmCodeGenerator.GET_ROOT_COMPONENT_METHOD_NAME , componentType , new com.intellij.uiDesigner.compiler.Type [ 0 ] ) ) ; generator.storeLocal ( componentLocal ) ; return componentLocal ; }
Source:
public void testPullNonExternalCall ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) . never ( ) ) . pullExternalCall ( ids.mCallId ) ; }

Target:
public void testPullNonExternalCall ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; java.lang.Thread.sleep ( com.android.server.telecom.tests.TEST_TIMEOUT ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.never ( ) ) . pullExternalCall ( ids.mCallId ) ; }
Source:
public final byte byte_literal ( ) throws org.jf.smali.RecognitionException { byte value = 0 ; org.antlr.runtime.tree.CommonTree BYTE_LITERAL194 = null ; try { { BYTE_LITERAL194 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BYTE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BYTE_LITERAL_in_byte_literal3294 ) ) ) ; value = org.jf.smali.LiteralTools.parseByte ( ( BYTE_LITERAL194 != null ? BYTE_LITERAL194.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final float float_literal ( ) throws org.jf.smali.RecognitionException { float value = 0.0F ; org.antlr.runtime.tree.CommonTree FLOAT_LITERAL208 = null ; try { { FLOAT_LITERAL208 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.FLOAT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_FLOAT_LITERAL_in_float_literal3498 ) ) ) ; value = org.jf.smali.LiteralTools.parseFloat ( ( FLOAT_LITERAL208 != null ? FLOAT_LITERAL208.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
private void removeCycles ( java.util.Set < com.android.ide.common.api.INode > deps ) { for ( com.android.ide.common.api.INode node : mDraggedNodes ) { com.android.ide.common.layout.relative.DependencyGraph.ViewData view = mDependencyGraph.getView ( node ) ; if ( view != null ) { for ( com.android.ide.common.layout.relative.DependencyGraph.Constraint constraint : view.dependedOnBy ) { constraint.from.node.setAttribute ( com.android.util.XmlUtils.ANDROID_URI , constraint.type.name , null ) ; } } } }

Target:
private void removeCycles ( java.util.Set < com.android.ide.common.api.INode > deps ) { for ( com.android.ide.common.api.INode node : mDraggedNodes ) { com.android.ide.common.layout.relative.DependencyGraph.ViewData view = mDependencyGraph.getView ( node ) ; if ( view != null ) { for ( com.android.ide.common.layout.relative.DependencyGraph.Constraint constraint : view.dependedOnBy ) { constraint.from.node.setAttribute ( com.android.utils.XmlUtils.ANDROID_URI , constraint.type.name , null ) ; } } } }
Source:
public int getBondState ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get bond state" ) ; return android.bluetooth.BluetoothDevice.BOND_NONE ; } try { return android.bluetooth.BluetoothDevice.sService.getBondState ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } catch ( java.lang.NullPointerException npe ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , ( ( "NullPointerException for getBondState() of device (" + ( getAddress ( ) ) ) + ")" ) , npe ) ; } return android.bluetooth.BluetoothDevice.BOND_NONE ; }

Target:
public boolean isBondingInitiatedLocally ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.w ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled, isBondingInitiatedLocally failed" ) ; return false ; } try { return service.isBondingInitiatedLocally ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public void testVerify_SHA256withRSAPSS_Key_Success ( ) throws java.lang.Exception { java.security.KeyFactory kf = java.security.KeyFactory.getInstance ( "RSA" ) ; java.security.spec.RSAPublicKeySpec keySpec = new java.security.spec.RSAPublicKeySpec ( libcore.java.security.SignatureTest.RSA_2048_modulus , libcore.java.security.SignatureTest.RSA_2048_publicExponent ) ; java.security.PublicKey pubKey = kf.generatePublic ( keySpec ) ; java.security.Signature sig = java.security.Signature.getInstance ( "SHA256withRSA/PSS" ) ; sig.initVerify ( pubKey ) ; sig.update ( libcore.java.security.SignatureTest.Vector2Data ) ; assertTrue ( "Signature must verify" , sig.verify ( libcore.java.security.SignatureTest.SHA256withRSAPSS_Vector2Signature ) ) ; }

Target:
public void testVerify_SHA256withRSAPSS_Key_Success ( ) throws java.lang.Exception { java.security.KeyFactory kf = java.security.KeyFactory.getInstance ( "RSA" ) ; java.security.spec.RSAPublicKeySpec keySpec = new java.security.spec.RSAPublicKeySpec ( libcore.java.security.SignatureTest.RSA_2048_modulus , libcore.java.security.SignatureTest.RSA_2048_publicExponent ) ; java.security.PublicKey pubKey = kf.generatePublic ( keySpec ) ; java.security.Signature sig = java.security.Signature.getInstance ( "SHA256withRSA/PSS" ) ; sig.initVerify ( pubKey ) ; libcore.java.security.SignatureTest.assertPSSAlgorithmParametersEquals ( libcore.java.security.SignatureTest.SHA256withRSAPSS_Vector2Signature_ParameterSpec , sig.getParameters ( ) ) ; sig.update ( libcore.java.security.SignatureTest.Vector2Data ) ; assertTrue ( "Signature must verify" , sig.verify ( libcore.java.security.SignatureTest.SHA256withRSAPSS_Vector2Signature ) ) ; }
Source:
void onOwnAddressRead ( int advertiser_id , int addressType , java.lang.String address ) throws android.os.RemoteException { logd ( ( "onOwnAddressRead() advertiser_id=" + advertiser_id ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.AdvertiseManager.AdvertiserInfo > entry = findAdvertiser ( advertiser_id ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() - bad advertiser_id " + advertiser_id ) ) ; return ; } android.bluetooth.le.IAdvertisingSetCallback callback = entry.getValue ( ) . callback ; callback.onOwnAddressRead ( advertiser_id , addressType , address ) ; }

Target:
void onOwnAddressRead ( int advertiser_id , int addressType , java.lang.String address ) throws android.os.RemoteException { if ( com.android.bluetooth.gatt.AdvertiseManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() advertiser_id=" + advertiser_id ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.AdvertiseManager.AdvertiserInfo > entry = findAdvertiser ( advertiser_id ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() - bad advertiser_id " + advertiser_id ) ) ; return ; } android.bluetooth.le.IAdvertisingSetCallback callback = entry.getValue ( ) . callback ; callback.onOwnAddressRead ( advertiser_id , addressType , address ) ; }
Source:
public void loadComponentsInApMode ( ) throws java.lang.Exception { when ( mWifiNative.startHal ( anyBoolean ( ) ) ) . thenReturn ( true ) ; mWsm.setHostApRunning ( new android.net.wifi.WifiConfiguration ( ) , true ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( "SoftApState" , getCurrentState ( ) . getName ( ) ) ; verify ( mWifiNative ) . startHal ( eq ( false ) ) ; verify ( mSoftApManager ) . start ( ) ; }

Target:
public void shouldRequireSupplicantStartupToLeaveInitialState ( ) throws java.lang.Exception { when ( mWifiNative.enableSupplicant ( ) ) . thenReturn ( false ) ; mWsm.setSupplicantRunning ( true ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( "InitialState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
private void adjustOtherSinkPriorities ( com.android.bluetooth.a2dp.A2dpService a2dpService , java.util.List < android.bluetooth.BluetoothDevice > connectedDeviceList ) { for ( android.bluetooth.BluetoothDevice device : mAdapterService.getBondedDevices ( ) ) { if ( ( ( a2dpService.getPriority ( device ) ) >= ( android.bluetooth.BluetoothProfile.PRIORITY_AUTO_CONNECT ) ) && ( ! ( connectedDeviceList.contains ( device ) ) ) ) { com.android.bluetooth.btservice.PhonePolicy.debugLog ( ( ( "adjustOtherSinkPriorities, device " + device ) + " PRIORITY_ON" ) ) ; a2dpService.setPriority ( device , BluetoothProfile.PRIORITY_ON ) ; } } }

Target:
private void removeAutoConnectFromDisconnectedA2dpSinks ( com.android.bluetooth.a2dp.A2dpService a2dpService ) { java.util.List < android.bluetooth.BluetoothDevice > connectedDeviceList = a2dpService.getConnectedDevices ( ) ; for ( android.bluetooth.BluetoothDevice device : mAdapterService.getBondedDevices ( ) ) { if ( ( ( a2dpService.getPriority ( device ) ) >= ( android.bluetooth.BluetoothProfile.PRIORITY_AUTO_CONNECT ) ) && ( ! ( connectedDeviceList.contains ( device ) ) ) ) { com.android.bluetooth.btservice.PhonePolicy.debugLog ( ( ( "removeAutoConnectFromDisconnectedA2dpSinks, device " + device ) + " PRIORITY_ON" ) ) ; a2dpService.setPriority ( device , BluetoothProfile.PRIORITY_ON ) ; } } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; ( ( android.app.NotificationManager ) ( getSystemService ( Context.NOTIFICATION_SERVICE ) ) ) . cancel ( CellBroadcastAlertService.NOTIFICATION_ID ) ; android.app.FragmentManager fm = getFragmentManager ( ) ; if ( ( fm.findFragmentById ( android.R.id.content ) ) == null ) { com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment listFragment = new com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment ( ) ; fm.beginTransaction ( ) . add ( android.R.id.content , listFragment ) . commit ( ) ; } }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setTitle ( getString ( R.string.cb_list_activity_title ) ) ; ( ( android.app.NotificationManager ) ( getSystemService ( Context.NOTIFICATION_SERVICE ) ) ) . cancel ( CellBroadcastAlertService.NOTIFICATION_ID ) ; android.app.FragmentManager fm = getFragmentManager ( ) ; if ( ( fm.findFragmentById ( android.R.id.content ) ) == null ) { com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment listFragment = new com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment ( ) ; fm.beginTransaction ( ) . add ( android.R.id.content , listFragment ) . commit ( ) ; } }
Source:
public void onServiceConnected ( android.content.ComponentName name , android.os.IBinder service ) { synchronized ( mLock ) { if ( ! ( mLastBoundPaymentServiceName.equals ( name ) ) ) { return ; } mPaymentServiceName = name ; mPaymentService = new android.os.Messenger ( service ) ; mPaymentServiceBound = true ; } }

Target:
void bindPaymentServiceLocked ( int userId , android.content.ComponentName service ) { unbindPaymentServiceLocked ( ) ; android.content.Intent intent = new android.content.Intent ( android.nfc.cardemulation.HostApduService.SERVICE_INTERFACE ) ; intent.setComponent ( service ) ; mLastBoundPaymentServiceName = service ; if ( mContext.bindServiceAsUser ( intent , mPaymentConnection , Context.BIND_AUTO_CREATE , new android.os.UserHandle ( userId ) ) ) { mPaymentServiceBound = true ; } else { android.util.Log.e ( com.android.nfc.cardemulation.HostEmulationManager.TAG , "Could not bind (persistent) payment service." ) ; } }
Source:
private static java.util.ResourceBundle getBundle ( ) { java.util.ResourceBundle bundle = null ; if ( ( com.google.gct.intellij.endpoints.util.EndpointBundle.ourBundle ) != null ) { bundle = com.google.gct.intellij.endpoints.util.EndpointBundle.ourBundle.get ( ) ; } if ( bundle == null ) { bundle = java.util.ResourceBundle.getBundle ( com.google.gct.intellij.endpoints.util.EndpointBundle.BUNDLE_NAME ) ; com.google.gct.intellij.endpoints.util.EndpointBundle.ourBundle = new java.lang.ref.SoftReference < java.util.ResourceBundle > ( bundle ) ; } return bundle ; }

Target:
private static java.util.ResourceBundle getBundle ( ) { java.util.ResourceBundle bundle = null ; if ( ( com.google.gct.idea.appengine.util.EndpointBundle.ourBundle ) != null ) { bundle = com.google.gct.idea.appengine.util.EndpointBundle.ourBundle.get ( ) ; } if ( bundle == null ) { bundle = java.util.ResourceBundle.getBundle ( com.google.gct.idea.appengine.util.EndpointBundle.BUNDLE_NAME ) ; com.google.gct.idea.appengine.util.EndpointBundle.ourBundle = new java.lang.ref.SoftReference < java.util.ResourceBundle > ( bundle ) ; } return bundle ; }
Source:
public boolean visit ( org.eclipse.jdt.internal.compiler.ast.LocalDeclaration x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { curMethod.body.addLocal ( createLocal ( x ) ) ; return true ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }

Target:
public boolean visit ( org.eclipse.jdt.internal.compiler.ast.LocalDeclaration x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { curMethod.body.addLocal ( createLocal ( x ) ) ; return true ; } catch ( com.android.jack.ir.ast.JTypeLookupException e ) { throw translateException ( x , e ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public void addSuppressed ( java.lang.Throwable receiver , java.lang.Throwable suppressed ) { if ( suppressed == receiver ) { throw new java.lang.IllegalArgumentException ( "Self suppression is not allowed." , suppressed ) ; } if ( suppressed == null ) { throw new java.lang.NullPointerException ( "The suppressed exception cannot be null." ) ; } synchronized ( this ) { java.util.List < java.lang.Throwable > list = map.get ( receiver ) ; if ( list == null ) { list = new java.util.ArrayList < > ( 1 ) ; map.put ( receiver , list ) ; } list.add ( suppressed ) ; } }

Target:
public java.lang.Throwable [ ] getSuppressed ( java.lang.Throwable receiver ) { java.util.List < java.lang.Throwable > list = map.get ( receiver , false ) ; if ( ( list == null ) || ( list.isEmpty ( ) ) ) { return com.google.devtools.build.android.desugar.runtime.ThrowableExtension.AbstractDesugaringStrategy.EMPTY_THROWABLE_ARRAY ; } return list.toArray ( com.google.devtools.build.android.desugar.runtime.ThrowableExtension.AbstractDesugaringStrategy.EMPTY_THROWABLE_ARRAY ) ; }
Source:
public void bootAnimationComplete ( ) { final boolean callFinishBooting ; synchronized ( this ) { callFinishBooting = mCallFinishBooting ; mBootAnimationComplete = true ; } if ( callFinishBooting ) { finishBooting ( ) ; } }

Target:
public void bootAnimationComplete ( ) { final boolean callFinishBooting ; synchronized ( this ) { callFinishBooting = mCallFinishBooting ; mBootAnimationComplete = true ; } if ( callFinishBooting ) { android.os.Trace.traceBegin ( Trace.TRACE_TAG_ACTIVITY_MANAGER , "FinishBooting" ) ; finishBooting ( ) ; android.os.Trace.traceEnd ( Trace.TRACE_TAG_ACTIVITY_MANAGER ) ; } }
Source:
public static com.intellij.compiler.classFilesIndex.chainsSearch.context.TargetType create ( final com.intellij.compiler.classFilesIndex.chainsSearch.context.PsiArrayType arrayType ) { com.intellij.compiler.classFilesIndex.chainsSearch.context.PsiType currentComponentType = arrayType.getComponentType ( ) ; while ( currentComponentType instanceof com.intellij.compiler.classFilesIndex.chainsSearch.context.PsiArrayType ) { currentComponentType = ( ( com.intellij.compiler.classFilesIndex.chainsSearch.context.PsiArrayType ) ( currentComponentType ) ) . getComponentType ( ) ; } if ( ! ( currentComponentType instanceof com.intellij.compiler.classFilesIndex.chainsSearch.context.PsiClassType ) ) { return null ; } final java.lang.String targetQName = arrayType.getCanonicalText ( ) ; return new com.intellij.compiler.classFilesIndex.chainsSearch.context.TargetType ( targetQName , true , arrayType ) ; }

Target:
public static com.intellij.compiler.classFilesIndex.chainsSearch.context.TargetType create ( final com.intellij.psi.PsiArrayType arrayType ) { com.intellij.psi.PsiType currentComponentType = arrayType.getComponentType ( ) ; while ( currentComponentType instanceof com.intellij.psi.PsiArrayType ) { currentComponentType = ( ( com.intellij.psi.PsiArrayType ) ( currentComponentType ) ) . getComponentType ( ) ; } if ( ! ( currentComponentType instanceof com.intellij.psi.PsiClassType ) ) { return null ; } final java.lang.String targetQName = arrayType.getCanonicalText ( ) ; return new com.intellij.compiler.classFilesIndex.chainsSearch.context.TargetType ( targetQName , true , arrayType ) ; }
Source:
public void setOutput ( java.io.OutputStream os , java.lang.String encoding ) throws java.io.IOException { if ( os == null ) throw new java.lang.IllegalArgumentException ( ) ; setOutput ( ( encoding == null ? new java.io.OutputStreamWriter ( os ) : new java.io.OutputStreamWriter ( os , encoding ) ) ) ; this . encoding = encoding ; if ( ( encoding != null ) && ( encoding.toLowerCase ( java.util.Locale.US ) . startsWith ( "utf" ) ) ) { unicode = true ; } }

Target:
public void setOutput ( java.io.OutputStream os , java.lang.String encoding ) throws java.io.IOException { if ( os == null ) throw new java.lang.IllegalArgumentException ( "os == null" ) ; setOutput ( ( encoding == null ? new java.io.OutputStreamWriter ( os ) : new java.io.OutputStreamWriter ( os , encoding ) ) ) ; this . encoding = encoding ; if ( ( encoding != null ) && ( encoding.toLowerCase ( java.util.Locale.US ) . startsWith ( "utf" ) ) ) { unicode = true ; } }
Source:
public void testNoDebuggable ( ) { java.util.List < android.content.pm.ApplicationInfo > apps = getContext ( ) . getPackageManager ( ) . getInstalledApplications ( PackageManager.GET_UNINSTALLED_PACKAGES ) ; for ( android.content.pm.ApplicationInfo app : apps ) { java.lang.String appName = app.packageName ; assertTrue ( ( ( "Package " + appName ) + " is marked as debuggable." ) , ( ( ( app.flags ) & ( android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE ) ) == 0 ) ) ; } }

Target:
public void testNoDebuggable ( ) { java.util.List < android.content.pm.ApplicationInfo > apps = getContext ( ) . getPackageManager ( ) . getInstalledApplications ( PackageManager.GET_UNINSTALLED_PACKAGES ) ; for ( android.content.pm.ApplicationInfo app : apps ) { java.lang.String appName = app.packageName ; if ( ! ( android.permission.cts.DebuggableTest.WHITELISTED_APPS.contains ( appName ) ) ) { assertTrue ( ( ( "Package " + appName ) + " is marked as debuggable." ) , ( ( ( app.flags ) & ( android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE ) ) == 0 ) ) ; } } }
Source:
private java.lang.String getFileUrlString ( java.lang.String filePath ) { int serverPort = fakeFtpServer.getServerControlPort ( ) ; java.lang.String urlString = java.lang.String.format ( java.util.Locale.US , "ftp://%s:%s@%s:%s/%s" , libcore.java.net.FtpURLConnectionTest.USER , libcore.java.net.FtpURLConnectionTest.PASSWORD , libcore.java.net.FtpURLConnectionTest.SERVER_HOSTNAME , serverPort , filePath ) ; return urlString ; }

Target:
private java.net.URL getFileUrlWithCredentials ( java.lang.String user , java.lang.String password , java.lang.String filePath ) { java.util.Objects.requireNonNull ( user ) ; java.util.Objects.requireNonNull ( filePath ) ; int serverPort = fakeFtpServer.getServerControlPort ( ) ; java.lang.String credentials = user + ( password == null ? "" : ":" + password ) ; java.lang.String urlString = java.lang.String.format ( java.util.Locale.US , "ftp://%s@%s:%s/%s" , credentials , libcore.java.net.FtpURLConnectionTest.SERVER_HOSTNAME , serverPort , filePath ) ; try { return new java.net.URL ( urlString ) ; } catch ( java.net.MalformedURLException e ) { fail ( ( "Malformed URL: " + urlString ) ) ; throw new java.lang.AssertionError ( "Can never happen" ) ; } }
Source:
public void setPackageStoppedState ( java.lang.String packageName , boolean stopped , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; final int uid = android.os.Binder.getCallingUid ( ) ; final int permission = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE ) ; final boolean allowedByPermission = permission == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { if ( mSettings.setPackageStoppedStateLPw ( packageName , stopped , allowedByPermission , uid , userId ) ) { scheduleWritePackageRestrictionsLocked ( userId ) ; } } }

Target:
private java.lang.String getLibraryPathFromCodePath ( ) { return new java.io.File ( mAppLibInstallDir , com.android.server.pm.PackageManagerService.getApkName ( getCodePath ( ) ) ) . getPath ( ) ; }
Source:
private android.net.ConnectivityManager.NetworkCallback removeRequestForFeature ( android.net.NetworkCapabilities netCap ) { synchronized ( android.net.ConnectivityManager.sLegacyRequests ) { android.net.ConnectivityManager.LegacyRequest l = android.net.ConnectivityManager.sLegacyRequests.remove ( netCap ) ; if ( l == null ) return null ; return l.networkCallback ; } }

Target:
private boolean removeRequestForFeature ( android.net.NetworkCapabilities netCap ) { final android.net.ConnectivityManager.LegacyRequest l ; synchronized ( android.net.ConnectivityManager.sLegacyRequests ) { l = android.net.ConnectivityManager.sLegacyRequests.remove ( netCap ) ; } if ( l == null ) return false ; unregisterNetworkCallback ( l.networkCallback ) ; l.clearDnsBinding ( ) ; return true ; }
Source:
public android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeFormatterData get ( android.icu.util.ULocale locale ) { java.lang.String key = locale.toString ( ) ; android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeFormatterData result = cache.get ( key ) ; if ( result == null ) { result = new android.icu.text.RelativeDateTimeFormatter.Loader ( locale ) . load ( ) ; cache.put ( key , result ) ; } return result ; }

Target:
protected android.icu.text.RelativeDateTimeFormatter.RelativeDateTimeFormatterData createInstance ( java.lang.String key , android.icu.util.ULocale locale ) { return new android.icu.text.RelativeDateTimeFormatter.Loader ( locale ) . load ( ) ; }
Source:
public void testAbiOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 2 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }

Target:
public void testAbiOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 2 ) ) ; java.util.List < com.android.build.OutputFile > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }