auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testCleartextTrafficPolicyWithJarFtpURLConnection ( ) throws java.lang.Exception { libcore.net.NetworkSecurityPolicy.setCleartextTrafficPermitted ( true ) ; byte [ ] serverReplyOnConnect = "220\r\n" . getBytes ( "US-ASCII" ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( serverReplyOnConnect ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:ftp://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertDataTransmittedByClient ( ) ; } libcore.net.NetworkSecurityPolicy.setCleartextTrafficPermitted ( false ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( serverReplyOnConnect ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:ftp://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertNoDataTransmittedByClient ( ) ; } }

Target:
public void testCleartextTrafficPolicyWithJarFtpURLConnection ( ) throws java.lang.Exception { libcore.net.NetworkSecurityPolicy.setInstance ( new libcore.net.NetworkSecurityPolicyTest.TestNetworkSecurityPolicy ( true ) ) ; byte [ ] serverReplyOnConnect = "220\r\n" . getBytes ( "US-ASCII" ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( serverReplyOnConnect ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:ftp://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertDataTransmittedByClient ( ) ; } libcore.net.NetworkSecurityPolicy.setInstance ( new libcore.net.NetworkSecurityPolicyTest.TestNetworkSecurityPolicy ( false ) ) ; try ( libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket server = new libcore.net.NetworkSecurityPolicyTest.CapturingServerSocket ( serverReplyOnConnect ) ) { java.net.URL url = new java.net.URL ( ( ( "jar:ftp://localhost:" + ( server.getPort ( ) ) ) + "/test.jar!/" ) ) ; try { ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getManifest ( ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } server.assertNoDataTransmittedByClient ( ) ; } }
Source:
public static com.android.builder.model.AndroidArtifact createMockArtifact ( java.util.List < com.android.builder.model.AndroidLibrary > libraries ) { com.android.builder.model.Dependencies dependencies = org.easymock.EasyMock.createNiceMock ( com.android.builder.model.Dependencies.class ) ; org.easymock.EasyMock.expect ( dependencies.getLibraries ( ) ) . andReturn ( libraries ) . anyTimes ( ) ; org.easymock.EasyMock.replay ( dependencies ) ; com.android.builder.model.AndroidArtifact artifact = org.easymock.EasyMock.createNiceMock ( com.android.builder.model.AndroidArtifact.class ) ; org.easymock.EasyMock.expect ( artifact.getDependencies ( ) ) . andReturn ( dependencies ) . anyTimes ( ) ; org.easymock.EasyMock.replay ( artifact ) ; return artifact ; }

Target:
public static com.android.builder.model.AndroidArtifact createMockArtifact ( java.util.List < com.android.builder.model.AndroidLibrary > libraries ) { com.android.builder.model.Dependencies dependencies = org.mockito.Mockito.mock ( com.android.builder.model.Dependencies.class ) ; org.mockito.Mockito.when ( dependencies.getLibraries ( ) ) . thenReturn ( libraries ) ; com.android.builder.model.AndroidArtifact artifact = org.mockito.Mockito.mock ( com.android.builder.model.AndroidArtifact.class ) ; org.mockito.Mockito.when ( artifact.getDependencies ( ) ) . thenReturn ( dependencies ) ; return artifact ; }
Source:
public void onIconResponse ( long bssid , java.lang.String fileName , byte [ ] data ) { android.content.Intent intent = new android.content.Intent ( android.net.wifi.WifiManager.PASSPOINT_ICON_RECEIVED_ACTION ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_PASSPOINT_ICON_BSSID , bssid ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_PASSPOINT_ICON_FILE , fileName ) ; if ( data != null ) { intent.putExtra ( android.net.wifi.WifiManager.EXTRA_PASSPOINT_ICON_DATA , data ) ; } mContext.sendBroadcastAsUser ( intent , UserHandle.ALL ) ; }

Target:
public void onIconResponse ( long bssid , java.lang.String fileName , byte [ ] data ) { android.content.Intent intent = new android.content.Intent ( android.net.wifi.WifiManager.ACTION_PASSPOINT_ICON ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_BSSID_LONG , bssid ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_ICON_INFO , new android.net.wifi.IconInfo ( fileName , data ) ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.ALL , android.Manifest.permission.ACCESS_WIFI_STATE ) ; }
Source:
public void leave ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( lock.isHeldByCurrentThread ( ) ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } try { signalConditionsOfSatisfiedGuards ( null ) ; } finally { lock.unlock ( ) ; } }

Target:
public boolean hasWaiters ( com.google.common.util.concurrent.Monitor.Guard guard ) { return ( getWaitQueueLength ( guard ) ) > 0 ; }
Source:
public void testInCallShortPress_togglesMute ( ) throws java.lang.Exception { if ( ! ( mShouldTestTelecom ) ) { return ; } placeAndVerifyCall ( ) ; final android.telecom.cts.MockConnection connection = verifyConnectionForOutgoingCall ( ) ; final android.telecom.cts.MockInCallService incallService = mInCallCallbacks.getService ( ) ; assertMuteState ( incallService , false ) ; sendMediaButtonShortPress ( ) ; assertMuteState ( connection , true ) ; assertMuteState ( incallService , true ) ; sendMediaButtonShortPress ( ) ; assertMuteState ( connection , false ) ; assertMuteState ( incallService , false ) ; }

Target:
public void testInCallLongPress_togglesMute ( ) throws java.lang.Exception { if ( ! ( mShouldTestTelecom ) ) { return ; } placeAndVerifyCall ( ) ; final android.telecom.cts.MockConnection connection = verifyConnectionForOutgoingCall ( ) ; final android.telecom.cts.MockInCallService incallService = mInCallCallbacks.getService ( ) ; assertMuteState ( incallService , false ) ; sendMediaButtonLongPress ( ) ; assertMuteState ( connection , true ) ; assertMuteState ( incallService , true ) ; sendMediaButtonLongPress ( ) ; assertMuteState ( connection , false ) ; assertMuteState ( incallService , false ) ; }
Source:
public static void writeUint24 ( int i , java.io.OutputStream output ) throws java.io.IOException { output.write ( ( i > > 16 ) ) ; output.write ( ( i > > 8 ) ) ; output.write ( i ) ; }

Target:
public static void writeUint32 ( long i , java.io.OutputStream output ) throws java.io.IOException { output.write ( ( ( byte ) ( i > > > 24 ) ) ) ; output.write ( ( ( byte ) ( i > > > 16 ) ) ) ; output.write ( ( ( byte ) ( i > > > 8 ) ) ) ; output.write ( ( ( byte ) ( i ) ) ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JThrowBasicBlock bb ) { com.android.jack.dx.rop.code.InsnList il = createInsnList ( instructions , 0 ) ; il.setImmutable ( ) ; com.android.jack.dx.util.IntList successors = new com.android.jack.dx.util.IntList ( ) ; int primarySuccessor = - 1 ; if ( ! ( bb.getHandlers ( ) . isEmpty ( ) ) ) { addCatchBlockSuccessors ( bb.getHandlers ( ) , successors ) ; } successors.setImmutable ( ) ; ropBb.createBasicBlock ( getBlockId ( bb ) , il , successors , primarySuccessor ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JThrowBasicBlock bb ) { com.android.jack.dx.rop.code.InsnList il = createInsnList ( instructions , 0 ) ; il.setImmutable ( ) ; com.android.jack.dx.util.IntList successors = new com.android.jack.dx.util.IntList ( ) ; int primarySuccessor = - 1 ; if ( ! ( bb.getCatchBlocks ( ) . isEmpty ( ) ) ) { addCatchBlockSuccessors ( bb.getCatchBlocks ( ) , successors ) ; } successors.setImmutable ( ) ; ropBb.createBasicBlock ( getBlockId ( bb ) , il , successors , primarySuccessor ) ; return false ; }
Source:
public com.google.common.cache.CacheBuilder < K , V > refreshAfterWrite ( long duration , java.util.concurrent.TimeUnit unit ) { com.google.common.base.Preconditions.checkNotNull ( unit ) ; com.google.common.base.Preconditions.checkState ( ( ( refreshNanos ) == ( com.google.common.cache.CacheBuilder.UNSET_INT ) ) , "refresh was already set to %s ns" , refreshNanos ) ; com.google.common.base.Preconditions.checkArgument ( ( duration > 0 ) , "duration must be positive: %s %s" , duration , unit ) ; this . refreshNanos = unit.toNanos ( duration ) ; return this ; }

Target:
com.google.common.cache.CacheBuilder < K , V > valueEquivalence ( com.google.common.base.Equivalence < java.lang.Object > equivalence ) { com.google.common.base.Preconditions.checkState ( ( ( valueEquivalence ) == null ) , "value equivalence was already set to %s" , valueEquivalence ) ; this . valueEquivalence = com.google.common.base.Preconditions.checkNotNull ( equivalence ) ; return this ; }
Source:
private boolean checkOrDeferScanAllowed ( android.os.Message msg ) { long now = java.lang.System.currentTimeMillis ( ) ; if ( ( ( lastConnectAttemptTimestamp ) != 0 ) && ( ( now - ( lastConnectAttemptTimestamp ) ) < 10000 ) ) { android.os.Message dmsg = android.os.Message.obtain ( msg ) ; sendMessageDelayed ( dmsg , ( 11000 - ( now - ( lastConnectAttemptTimestamp ) ) ) ) ; return false ; } return true ; }

Target:
private boolean checkOrDeferScanAllowed ( android.os.Message msg ) { long now = mClock.getWallClockMillis ( ) ; if ( ( ( lastConnectAttemptTimestamp ) != 0 ) && ( ( now - ( lastConnectAttemptTimestamp ) ) < 10000 ) ) { android.os.Message dmsg = android.os.Message.obtain ( msg ) ; sendMessageDelayed ( dmsg , ( 11000 - ( now - ( lastConnectAttemptTimestamp ) ) ) ) ; return false ; } return true ; }
Source:
public java.util.List < java.lang.String > getAbis ( ) { java.util.List < java.lang.String > abis = com.google.common.collect.Lists.newArrayListWithExpectedSize ( 2 ) ; java.lang.String abi = iDevice.getProperty ( IDevice.PROP_DEVICE_CPU_ABI ) ; if ( abi != null ) { abis.add ( abi ) ; } abi = iDevice.getProperty ( IDevice.PROP_DEVICE_CPU_ABI2 ) ; if ( abi != null ) { abis.add ( abi ) ; } return abis ; }

Target:
public int getDensity ( ) { return iDevice.getDensity ( ) ; }
Source:
static java.io.File getSdkLocation ( org.apache.tools.ant.Project antProject ) { java.lang.String sdkOsPath = antProject.getProperty ( ProjectProperties.PROPERTY_SDK ) ; if ( ( sdkOsPath == null ) || ( ( sdkOsPath.length ( ) ) == 0 ) ) { throw new org.apache.tools.ant.BuildException ( "SDK Location is not set." ) ; } java.io.File sdk = new java.io.File ( sdkOsPath ) ; if ( ( sdk.isDirectory ( ) ) == false ) { throw new org.apache.tools.ant.BuildException ( java.lang.String.format ( "SDK Location '%s' is not valid." , sdkOsPath ) ) ; } return sdk ; }

Target:
static java.io.File getSdkLocation ( org.apache.tools.ant.Project antProject ) { java.lang.String sdkOsPath = antProject.getProperty ( ProjectProperties.PROPERTY_SDK ) ; if ( ( sdkOsPath == null ) || ( sdkOsPath.isEmpty ( ) ) ) { throw new org.apache.tools.ant.BuildException ( "SDK Location is not set." ) ; } java.io.File sdk = new java.io.File ( sdkOsPath ) ; if ( ( sdk.isDirectory ( ) ) == false ) { throw new org.apache.tools.ant.BuildException ( java.lang.String.format ( "SDK Location '%s' is not valid." , sdkOsPath ) ) ; } return sdk ; }
Source:
private void readObject ( java.io.ObjectInputStream s ) throws java.io.IOException , java.lang.ClassNotFoundException { s.defaultReadObject ( ) ; resetLock ( ) ; int len = s.readInt ( ) ; java.lang.Object [ ] elements = new java.lang.Object [ len ] ; for ( int i = 0 ; i < len ; i ++ ) elements [ i ] = s.readObject ( ) ; setArray ( elements ) ; }

Target:
private synchronized void readObject ( java.io.ObjectInputStream in ) throws java.io.IOException , java.lang.ClassNotFoundException { in.defaultReadObject ( ) ; java.lang.Object [ ] snapshot = new java.lang.Object [ in.readInt ( ) ] ; for ( int i = 0 ; i < ( snapshot.length ) ; i ++ ) { snapshot [ i ] = in.readObject ( ) ; } elements = snapshot ; }
Source:
public void doubleClick ( org.eclipse.jface.viewers.DoubleClickEvent event ) { org.eclipse.ui.IWorkbenchPage page = getSite ( ) . getPage ( ) ; try { page.showView ( IPageLayout.ID_PROP_SHEET , null , IWorkbenchPage.VIEW_ACTIVATE ) ; } catch ( org.eclipse.ui.PartInitException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "Could not activate property sheet" ) ; } }

Target:
public void doubleClick ( org.eclipse.jface.viewers.DoubleClickEvent event ) { org.eclipse.swt.widgets.TreeItem [ ] selection = getTreeViewer ( ) . getTree ( ) . getSelection ( ) ; if ( ( selection.length ) > 0 ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage.getViewInfo ( selection [ 0 ] . getData ( ) ) ; if ( vi != null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas canvas = mGraphicalEditorPart.getCanvasControl ( ) ; canvas.show ( vi ) ; } } }
Source:
private void responseSms ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SendSmsResult sms ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.SmsResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = new com.android.internal.telephony.SmsResponse ( sms.messageRef , sms.ackPDU , sms.errorCode ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseSetupDataCall ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SetupDataCallResult setupDataCallResult ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.dataconnection.DataCallResponse ret = com.android.internal.telephony.RIL.convertDataCallResult ( setupDataCallResult ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > successfulAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return new com.google.common.util.concurrent.Futures.ListFuture < V > ( com.google.common.collect.ImmutableList.copyOf ( futures ) , false , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < V > com.google.common.util.concurrent.ListenableFuture < java.util.List < V > > allAsList ( java.lang.Iterable < ? extends com.google.common.util.concurrent.ListenableFuture < ? extends V > > futures ) { return com.google.common.util.concurrent.Futures.listFuture ( com.google.common.collect.ImmutableList.copyOf ( futures ) , true , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }
Source:
public void testCannotSetDeviceOwnerWhenSecondaryUserPresent ( ) throws java.lang.Exception { if ( ( ! ( mHasFeature ) ) || ( ( getMaxNumberOfUsersSupported ( ) ) < 2 ) ) { return ; } int userId = - 1 ; installApp ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_APK ) ; try { userId = createUser ( ) ; assertFalse ( setDeviceOwner ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT ) ) ; } finally { removeUser ( userId ) ; runDeviceTests ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_PKG , com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_CLEAR ) ; } }

Target:
public void testCannotSetDeviceOwnerWhenAccountPresent ( ) throws java.lang.Exception { if ( ! ( mHasFeature ) ) { return ; } installAppAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.ACCOUNT_MANAGEMENT_APK , mPrimaryUserId ) ; installAppAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_APK , mPrimaryUserId ) ; try { assertTrue ( runDeviceTestsAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.ACCOUNT_MANAGEMENT_PKG , ".AccountUtilsTest" , "testAddAccountExplicitly" , mPrimaryUserId ) ) ; assertFalse ( setDeviceOwner ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT , mPrimaryUserId , true ) ) ; } finally { removeAdmin ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT , mPrimaryUserId ) ; assertTrue ( runDeviceTestsAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.ACCOUNT_MANAGEMENT_PKG , ".AccountUtilsTest" , "testRemoveAccountExplicitly" , mPrimaryUserId ) ) ; } }
Source:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JillBasedToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }

Target:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidCompatibilityChecker.N_API_LEVEL ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JillBasedToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }
Source:
public void screenTurningOn ( final com.android.internal.policy.impl.ScreenOnListener screenOnListener ) { android.util.EventLog.writeEvent ( 70000 , 1 ) ; if ( false ) { java.lang.RuntimeException here = new java.lang.RuntimeException ( "here" ) ; here.fillInStackTrace ( ) ; android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "Screen turning on..." , here ) ; } synchronized ( mLock ) { mScreenOnEarly = true ; updateOrientationListenerLp ( ) ; updateLockScreenTimeout ( ) ; } waitForKeyguard ( screenOnListener ) ; }

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 void TestBig ( ) { android.icu.text.CompactDecimalFormat cdf = android.icu.text.CompactDecimalFormat.getInstance ( ULocale.ENGLISH , CompactStyle.LONG ) ; java.math.BigInteger source_int = new java.math.BigInteger ( "31415926535897932384626433" ) ; assertEquals ( "BigInteger format wrong: " , "31,000,000,000,000 trillion" , cdf.format ( source_int ) ) ; java.math.BigDecimal source_dec = new java.math.BigDecimal ( source_int ) ; assertEquals ( "BigDecimal format wrong: " , "31,000,000,000,000 trillion" , cdf.format ( source_dec ) ) ; }

Target:
public void TestBig ( ) { android.icu.text.CompactDecimalFormat cdf = android.icu.text.CompactDecimalFormat.getInstance ( ULocale.ENGLISH , CompactStyle.LONG ) ; java.math.BigInteger source_int = new java.math.BigInteger ( "31415926535897932384626433" ) ; cdf.setMaximumFractionDigits ( 0 ) ; assertEquals ( "BigInteger format wrong: " , "31,415,926,535,898 trillion" , cdf.format ( source_int ) ) ; java.math.BigDecimal source_dec = new java.math.BigDecimal ( source_int ) ; assertEquals ( "BigDecimal format wrong: " , "31,415,926,535,898 trillion" , cdf.format ( source_dec ) ) ; }
Source:
public static void start ( @ com.android.annotations.NonNull org.eclipse.ui.IWorkbenchWindow window ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator coordinator = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator ( window ) ; org.eclipse.ui.IPartService service = window.getPartService ( ) ; if ( service != null ) { service.addPartListener ( coordinator ) ; } }

Target:
public static void start ( @ com.android.annotations.NonNull org.eclipse.ui.IWorkbenchWindow window ) { assert ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.sSingleton ) == null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator coordinator = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator ( window ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.sSingleton = coordinator ; org.eclipse.ui.IPartService service = window.getPartService ( ) ; if ( service != null ) { service.addPartListener ( coordinator ) ; } }
Source:
private void maybeShowErrorDialogOnDisconnect ( com.android.incallui.call.DialerCall call ) { if ( ( isActivityStarted ( ) ) && ( ( call.getState ( ) ) == ( DialerCall.State.DISCONNECTED ) ) ) { if ( ( ( call.getAccountHandle ( ) ) == null ) && ( ! ( call.isConferenceCall ( ) ) ) ) { setDisconnectCauseForMissingAccounts ( call ) ; } mInCallActivity.maybeShowErrorDialogOnDisconnect ( new com.android.incallui.disconnectdialog.DisconnectMessage ( mInCallActivity , call ) ) ; } }

Target:
private void showDialogOrToastForDisconnectedCall ( com.android.incallui.call.DialerCall call ) { if ( ( ! ( isActivityStarted ( ) ) ) || ( ( call.getState ( ) ) != ( DialerCall.State.DISCONNECTED ) ) ) { return ; } if ( ( ( call.getAccountHandle ( ) ) == null ) && ( ! ( call.isConferenceCall ( ) ) ) ) { setDisconnectCauseForMissingAccounts ( call ) ; } mInCallActivity.showDialogOrToastForDisconnectedCall ( new com.android.incallui.disconnectdialog.DisconnectMessage ( mInCallActivity , call ) ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { if ( android.telephony.CellIdentityCdma.DBG ) android.telephony.CellIdentityCdma.log ( ( "writeToParcel(Parcel, int): " + ( toString ( ) ) ) ) ; dest.writeInt ( mNetworkId ) ; dest.writeInt ( mSystemId ) ; dest.writeInt ( mBasestationId ) ; dest.writeInt ( mLongitude ) ; dest.writeInt ( mLatitude ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { if ( android.telephony.CellIdentityCdma.DBG ) android.telephony.CellIdentityCdma.log ( ( "writeToParcel(Parcel, int): " + ( toString ( ) ) ) ) ; dest.writeInt ( mNetworkId ) ; dest.writeInt ( mSystemId ) ; dest.writeInt ( mBasestationId ) ; dest.writeInt ( mLongitude ) ; dest.writeInt ( mLatitude ) ; dest.writeString ( mAlphaLong ) ; dest.writeString ( mAlphaShort ) ; }
Source:
public boolean sameItemAs ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.SystemImagePackage ) { com.android.sdklib.internal.repository.packages.SystemImagePackage newPkg = ( ( com.android.sdklib.internal.repository.packages.SystemImagePackage ) ( pkg ) ) ; return ( getAbi ( ) . equals ( newPkg.getAbi ( ) ) ) && ( getVersion ( ) . equals ( newPkg.getVersion ( ) ) ) ; } return false ; }

Target:
public boolean sameItemAs ( java.lang.Package pkg ) { if ( pkg instanceof com.android.sdklib.internal.repository.packages.SystemImagePackage ) { com.android.sdklib.internal.repository.packages.SystemImagePackage newPkg = ( ( com.android.sdklib.internal.repository.packages.SystemImagePackage ) ( pkg ) ) ; return ( getAbi ( ) . equals ( newPkg.getAbi ( ) ) ) && ( getAndroidVersion ( ) . equals ( newPkg.getAndroidVersion ( ) ) ) ; } return false ; }
Source:
public com.android.internal.telephony.IccFileHandler getIccFileHandler ( int family ) { if ( ( mUiccCard ) != null ) { com.android.internal.telephony.UiccCardApplication app = mUiccCard.getApplication ( family ) ; if ( app != null ) { return app.getIccFileHandler ( ) ; } } return null ; }

Target:
public com.android.internal.telephony.uicc.IccRecords getIccRecords ( int family ) { synchronized ( com.android.internal.telephony.uicc.UiccController.mLock ) { if ( ( mUiccCard ) != null ) { com.android.internal.telephony.uicc.UiccCardApplication app = mUiccCard.getApplication ( family ) ; if ( app != null ) { return app.getIccRecords ( ) ; } } return null ; } }
Source:
public static com.android.bluetooth.pbapclient.utils.ObexAppParameters fromHeaderSet ( javax.obex.HeaderSet headerset ) { try { byte [ ] raw = ( ( byte [ ] ) ( headerset.getHeader ( HeaderSet.APPLICATION_PARAMETER ) ) ) ; return new com.android.bluetooth.pbapclient.utils.ObexAppParameters ( raw ) ; } catch ( java.io.IOException e ) { } return null ; }

Target:
public static com.android.bluetooth.pbapclient.ObexAppParameters fromHeaderSet ( javax.obex.HeaderSet headerset ) { try { byte [ ] raw = ( ( byte [ ] ) ( headerset.getHeader ( HeaderSet.APPLICATION_PARAMETER ) ) ) ; return new com.android.bluetooth.pbapclient.ObexAppParameters ( raw ) ; } catch ( java.io.IOException e ) { } return null ; }
Source:
public void setZeroDigit ( char zeroDigit ) { if ( ( digits ) != null ) { this . digits [ 0 ] = zeroDigit ; for ( int i = 1 ; i < 10 ; i ++ ) { this . digits [ i ] = ( ( char ) ( zeroDigit + i ) ) ; } } else { this . zeroDigit = zeroDigit ; } }

Target:
public void setZeroDigit ( char zeroDigit ) { if ( ( digits ) != null ) { this . digits [ 0 ] = zeroDigit ; if ( ( java.lang.Character.digit ( zeroDigit , 10 ) ) == 0 ) { for ( int i = 1 ; i < 10 ; i ++ ) { this . digits [ i ] = ( ( char ) ( zeroDigit + i ) ) ; } } } else { this . zeroDigit = zeroDigit ; } }
Source:
public void test3 ( ) { com.android.utils.HtmlBuilder builder1 = new com.android.utils.HtmlBuilder ( ) ; builder1.addBold ( "This is bold" ) ; assertEquals ( "<B>This is bold</B>" , builder1.getHtml ( ) ) ; com.android.utils.HtmlBuilder builder2 = new com.android.utils.HtmlBuilder ( ) ; builder2.add ( "Plain. " ) ; builder2.beginBold ( ) ; builder2.add ( "Bold. " ) ; builder2.addLink ( "mylink" , "runnable:0" ) ; builder2.endBold ( ) ; assertEquals ( "Plain. <B>Bold. <A HREF=\"runnable:0\">mylink</A></B>" , builder2.getHtml ( ) ) ; }

Target:
public void testAddBold ( ) { com.android.utils.HtmlBuilder builder = new com.android.utils.HtmlBuilder ( ) ; builder.addBold ( "This is bold" ) ; assertEquals ( "<B>This is bold</B>" , builder.getHtml ( ) ) ; }
Source:
public com.android.dialer.speeddial.database.SpeedDialEntry.Channel getDeterministicVoiceChannel ( ) { if ( ( ( defaultChannel ( ) ) != null ) && ( ! ( defaultChannel ( ) . isVideoTechnology ( ) ) ) ) { return defaultChannel ( ) ; } com.android.dialer.speeddial.database.SpeedDialEntry.Channel voiceChannel = null ; for ( com.android.dialer.speeddial.database.SpeedDialEntry.Channel channel : channels ( ) ) { if ( ! ( channel.isVideoTechnology ( ) ) ) { if ( voiceChannel != null ) { return null ; } voiceChannel = channel ; } } return voiceChannel ; }

Target:
public com.android.dialer.speeddial.database.SpeedDialEntry.Channel getDefaultVoiceChannel ( ) { if ( ( ( defaultChannel ( ) ) != null ) && ( ! ( defaultChannel ( ) . isVideoTechnology ( ) ) ) ) { return defaultChannel ( ) ; } if ( ( channels ( ) . size ( ) ) == 1 ) { return channels ( ) . get ( 0 ) ; } return null ; }
Source:
public void setPlaybackInfoForRcc ( int rccId , int what , int value ) { mMediaFocusControl.setPlaybackInfoForRcc ( rccId , what , value ) ; }

Target:
private static void updateDefaultStreamOverrideDelay ( boolean touchExploreEnabled ) { if ( touchExploreEnabled ) { android.media.AudioService.StreamOverride.sDelayMs = android.media.AudioService.StreamOverride.TOUCH_EXPLORE_STREAM_TYPE_OVERRIDE_DELAY_MS ; } else { android.media.AudioService.StreamOverride.sDelayMs = android.media.AudioService.StreamOverride.DEFAULT_STREAM_TYPE_OVERRIDE_DELAY_MS ; } if ( android.media.AudioService.DEBUG_VOL ) android.util.Log.d ( android.media.AudioService.TAG , ( ( ( ( "Touch exploration enabled=" + touchExploreEnabled ) + " stream override delay is now " ) + ( android.media.AudioService.StreamOverride.sDelayMs ) ) + " ms" ) ) ; }
Source:
private boolean isSupportedDevice ( ) throws java.lang.Exception { final java.lang.String featureList = getDevice ( ) . executeShellCommand ( "pm list features" ) ; if ( ( featureList.contains ( "feature:android.hardware.type.watch\n" ) ) || ( featureList.contains ( "feature:android.hardware.type.television\n" ) ) ) { return false ; } else { return true ; } }

Target:
private boolean isSupportedDevice ( ) throws java.lang.Exception { final java.lang.String featureList = getDevice ( ) . executeShellCommand ( "pm list features" ) ; if ( ( featureList.contains ( "feature:android.hardware.type.watch\n" ) ) || ( featureList.contains ( "feature:android.hardware.type.television\n" ) ) ) { return false ; } final java.lang.String passwordActivity = getDevice ( ) . executeShellCommand ( ( "cmd package resolve-activity --components " + "-a android.app.action.SET_NEW_PASSWORD -c android.intent.category.DEFAULT" ) ) ; if ( passwordActivity.equals ( "No activity found\n" ) ) { return false ; } return true ; }
Source:
public void onVideoStateChanged ( int newVideoState ) { if ( ( mVideoPauseTracker.isPaused ( ) ) && ( ! ( android.telecom.VideoProfile.isPaused ( newVideoState ) ) ) ) { android.telecom.Log.i ( this , "onVideoStateChanged: newVideoState=%s, clearing pending pause requests." , android.telecom.VideoProfile.videoStateToString ( newVideoState ) ) ; mVideoPauseTracker.clearPauseRequests ( ) ; } }

Target:
public void onVideoStateChanged ( int newVideoState ) { if ( ( android.telecom.VideoProfile.isPaused ( mCurrentVideoState ) ) && ( ! ( android.telecom.VideoProfile.isPaused ( newVideoState ) ) ) ) { android.telecom.Log.i ( this , ( "onVideoStateChanged: currentVideoState=%s, newVideoState=%s, " + "clearing pending pause requests." ) , android.telecom.VideoProfile.videoStateToString ( mCurrentVideoState ) , android.telecom.VideoProfile.videoStateToString ( newVideoState ) ) ; mVideoPauseTracker.clearPauseRequests ( ) ; } else { android.telecom.Log.d ( this , "onVideoStateChanged: currentVideoState=%s, newVideoState=%s" , android.telecom.VideoProfile.videoStateToString ( mCurrentVideoState ) , android.telecom.VideoProfile.videoStateToString ( newVideoState ) ) ; } mCurrentVideoState = newVideoState ; }
Source:
public void onDetachedFromWindow ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onDetachedFromWindow ( ) ; } } ) ; return ; } mAwContents.onDetachedFromWindow ( ) ; }

Target:
public boolean onKeyUp ( final int keyCode , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyUp ( keyCode , event ) ; } } ) ; return ret ; } return mAwContents.onKeyUp ( keyCode , event ) ; }
Source:
public void test_close ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_SF_EntryAttributes.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; jarFile.close ( ) ; jarFile.close ( ) ; }

Target:
public void test_JarFile_Modified_SF_EntryAttributes ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_SF_EntryAttributes.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; try { jarFile.getInputStream ( zipEntry ) ; fail ( "should throw Security Exception" ) ; } catch ( java.lang.SecurityException e ) { } } } }
Source:
private void sendCallChangedIntent ( android.bluetooth.BluetoothHeadsetClientCall c ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "sendCallChangedIntent " + c ) ) ; android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadsetClient.ACTION_CALL_CHANGED ) ; intent.addFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.putExtra ( BluetoothHeadsetClient.EXTRA_CALL , c ) ; mService.sendBroadcast ( intent , ProfileService.BLUETOOTH_PERM ) ; }

Target:
private void sendCallChangedIntent ( android.bluetooth.BluetoothHeadsetClientCall c ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "sendCallChangedIntent " + c ) ) ; } android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadsetClient.ACTION_CALL_CHANGED ) ; intent.addFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.putExtra ( BluetoothHeadsetClient.EXTRA_CALL , c ) ; mService.sendBroadcast ( intent , ProfileService.BLUETOOTH_PERM ) ; }
Source:
public static java.nio.charset.CharsetDecoderICU newInstance ( java.nio.charset.Charset cs , java.lang.String icuCanonicalName ) { long address = 0 ; try { address = libcore.icu.NativeConverter.openConverter ( icuCanonicalName ) ; float averageCharsPerByte = libcore.icu.NativeConverter.getAveCharsPerByte ( address ) ; java.nio.charset.CharsetDecoderICU result = new java.nio.charset.CharsetDecoderICU ( cs , averageCharsPerByte , address ) ; address = 0 ; result.updateCallback ( ) ; return result ; } finally { if ( address != 0 ) { libcore.icu.NativeConverter.closeConverter ( address ) ; } } }

Target:
public static java.nio.charset.CharsetDecoderICU newInstance ( java.nio.charset.Charset cs , java.lang.String icuCanonicalName ) { long address = 0 ; java.nio.charset.CharsetDecoderICU result ; try { address = libcore.icu.NativeConverter.openConverter ( icuCanonicalName ) ; float averageCharsPerByte = libcore.icu.NativeConverter.getAveCharsPerByte ( address ) ; result = new java.nio.charset.CharsetDecoderICU ( cs , averageCharsPerByte , address ) ; } catch ( java.lang.Throwable t ) { if ( address != 0 ) { libcore.icu.NativeConverter.closeConverter ( address ) ; } throw t ; } libcore.icu.NativeConverter.registerConverter ( result , address ) ; result.updateCallback ( ) ; return result ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int which ) { synchronized ( mLock ) { if ( which == ( android.content.DialogInterface.BUTTON_POSITIVE ) ) { if ( com.android.internal.telephony.uicc.UiccCard.DBG ) log ( "Reboot due to SIM swap" ) ; android.os.PowerManager pm = ( ( android.os.PowerManager ) ( mContext.getSystemService ( Context.POWER_SERVICE ) ) ) ; pm.reboot ( "SIM is added." ) ; } } }

Target:
public boolean isApplicationOnIcc ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType type ) { synchronized ( mLock ) { if ( ( mUiccProfile ) != null ) { return mUiccProfile.isApplicationOnIcc ( type ) ; } else { return false ; } } }
Source:
public void updateUpstreamNetworkState ( android.net.NetworkState ns ) { if ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.VDBG ) { android.util.Log.d ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.TAG , ( "updateUpstreamNetworkState: " + ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.toDebugString ( ns ) ) ) ) ; } if ( ! ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.canTetherIPv6 ( ns , mLog ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; setUpstreamNetworkState ( null ) ; return ; } if ( ( ( mUpstreamNetworkState ) != null ) && ( ! ( ns.network.equals ( mUpstreamNetworkState.network ) ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; } setUpstreamNetworkState ( ns ) ; updateIPv6TetheringInterfaces ( ) ; }

Target:
public void updateUpstreamNetworkState ( android.net.NetworkState ns ) { if ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.VDBG ) { android.util.Log.d ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.TAG , ( "updateUpstreamNetworkState: " + ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.toDebugString ( ns ) ) ) ) ; } if ( ( com.android.server.connectivity.tethering.TetheringInterfaceUtils.getIPv6Interface ( ns ) ) == null ) { stopIPv6TetheringOnAllInterfaces ( ) ; setUpstreamNetworkState ( null ) ; return ; } if ( ( ( mUpstreamNetworkState ) != null ) && ( ! ( ns.network.equals ( mUpstreamNetworkState.network ) ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; } setUpstreamNetworkState ( ns ) ; updateIPv6TetheringInterfaces ( ) ; }
Source:
public void run ( ) { boolean loggedIn = state.logInWithLocalServer ( message ) ; if ( loggedIn ) { com.google.gct.login.IGoogleLoginCompletedCallback localCallback = new com.google.gct.login.IGoogleLoginCompletedCallback ( ) { @ java.lang.Override public void onLoginCompleted ( ) { uiFacade.notifyStatusIndicator ( ) ; if ( callback != null ) { callback.onLoginCompleted ( ) ; } } } ; users.addUser ( new com.google.gct.login.CredentialedUser ( state , localCallback ) ) ; } }

Target:
private void notifyOnComplete ( ) { if ( loggedIn ) { com.google.gct.login.IGoogleLoginCompletedCallback localCallback = new com.google.gct.login.IGoogleLoginCompletedCallback ( ) { @ java.lang.Override public void onLoginCompleted ( ) { uiFacade.notifyStatusIndicator ( ) ; if ( callback != null ) { callback.onLoginCompleted ( ) ; } } } ; users.addUser ( new com.google.gct.login.CredentialedUser ( state , localCallback ) ) ; } else if ( callback != null ) { callback.onLoginCompleted ( ) ; } }
Source:
protected void onRadioAvailable ( ) { if ( DBG ) log ( "onRadioAvailable" ) ; if ( ( mPhone.getSimulatedRadioControl ( ) ) != null ) { notifyDataConnection ( null ) ; log ( "onRadioAvailable: We're on the simulator; assuming data is connected" ) ; } if ( mPhone.mIccRecords.getRecordsLoaded ( ) ) { notifyOffApnsOfAvailability ( null ) ; } if ( ( getOverallState ( ) ) != ( DctConstants.State.IDLE ) ) { cleanUpConnection ( true , null ) ; } }

Target:
protected void onRadioAvailable ( ) { if ( DBG ) log ( "onRadioAvailable" ) ; if ( ( mPhone.getSimulatedRadioControl ( ) ) != null ) { notifyDataConnection ( null ) ; log ( "onRadioAvailable: We're on the simulator; assuming data is connected" ) ; } com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; if ( ( r != null ) && ( r.getRecordsLoaded ( ) ) ) { notifyOffApnsOfAvailability ( null ) ; } if ( ( getOverallState ( ) ) != ( DctConstants.State.IDLE ) ) { cleanUpConnection ( true , null ) ; } }
Source:
public void testDupResourceSet ( ) throws java.lang.Exception { java.io.File root = getRoot ( "dupResourceSet" ) ; com.android.builder.resources.ResourceSet set = new com.android.builder.resources.ResourceSet ( ) ; set.addSource ( new java.io.File ( root , "res1" ) ) ; boolean gotException = false ; try { set.addSource ( new java.io.File ( root , "res2" ) ) ; } catch ( com.android.builder.resources.DuplicateResourceException e ) { gotException = true ; } assertTrue ( gotException ) ; }

Target:
public void testDupResourceSet ( ) throws java.lang.Exception { java.io.File root = getRoot ( "dupResourceSet" ) ; com.android.builder.resources.ResourceSet set = new com.android.builder.resources.ResourceSet ( "main" ) ; set.addSource ( new java.io.File ( root , "res1" ) ) ; set.addSource ( new java.io.File ( root , "res2" ) ) ; boolean gotException = false ; try { set.loadFromFiles ( ) ; } catch ( com.android.builder.resources.DuplicateResourceException e ) { gotException = true ; } assertTrue ( gotException ) ; }
Source:
public void testCustomAssertionError ( ) { try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( new android.support.test.espresso.ViewAssertion ( ) { @ java.lang.Override public void check ( android.view.View view , android.support.test.espresso.NoMatchingViewException noViewFoundException ) { assertFalse ( true ) ; } } ) ; fail ( "Previous call expected to fail" ) ; } catch ( junit.framework.AssertionFailedError e ) { assertFailureStackContainsThisClass ( e ) ; } }

Target:
public void noMatchingViewException ( ) { expectedException.expect ( android.support.test.espresso.NoMatchingViewException.class ) ; expectedException.expect ( stackTraceContainsThisClass ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.base.DefaultFailureHandlerTest.withMatchesThatReturns ( false ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ) ; }
Source:
public final void init ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { checkMode ( opmode ) ; getSpi ( key ) . engineInit ( opmode , key , params , random ) ; mode = opmode ; }

Target:
public final void init ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { checkMode ( opmode ) ; getSpi ( new javax.crypto.Cipher.InitParams ( javax.crypto.Cipher.InitType.ALGORITHM_PARAMS , opmode , key , random , null , params ) ) ; mode = opmode ; }
Source:
public org.jdom.Element getState ( ) { final org.jdom.Element actions = new org.jdom.Element ( "actions" ) ; for ( java.lang.String id : myState.keySet ( ) ) { final org.jdom.Element action = new org.jdom.Element ( "action" ) ; action.setAttribute ( "actionId" , id ) ; action.setAttribute ( "clicks" , java.lang.String.valueOf ( myState.get ( id ) . getClicks ( ) ) ) ; actions.addContent ( action ) ; } return actions ; }

Target:
public void loadState ( org.jdom.Element state ) { myState.clear ( ) ; for ( org.jdom.Element action : state.getChildren ( "action" ) ) { try { com.intellij.promoter.PromoterState info = new com.intellij.promoter.PromoterState ( ) ; info.setClicks ( com.intellij.openapi.util.text.StringUtil.parseInt ( action.getAttributeValue ( "clicks" ) , 0 ) ) ; myState.put ( action.getAttributeValue ( "actionId" ) , info ) ; } catch ( java.lang.Exception ignore ) { } } }
Source:
public void onProgressUpdated ( android.telephony.mbms.DownloadRequest request , android.telephony.mbms.FileInfo fileInfo , int currentDownloadSize , int fullDownloadSize , int currentDecodedSize , int fullDecodedSize ) { try { callback.onProgressUpdated ( request , fileInfo , currentDownloadSize , fullDownloadSize , currentDecodedSize , fullDecodedSize ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , downloadRequest.getSubscriptionId ( ) ) ; } }

Target:
public void onStateUpdated ( android.telephony.mbms.DownloadRequest request , android.telephony.mbms.FileInfo fileInfo , @ android.telephony.MbmsDownloadSession.DownloadStatus int state ) { if ( ! ( isFilterFlagSet ( android.telephony.mbms.vendor.STATE_UPDATES ) ) ) { return ; } try { mCallback.onStateUpdated ( request , fileInfo , state ) ; } catch ( android.os.RemoteException e ) { onRemoteException ( e ) ; } }
Source:
public boolean isCallerActiveScorer ( int callingUid ) { android.net.NetworkScorerAppManager.NetworkScorerAppData defaultApp = getActiveScorer ( ) ; if ( defaultApp == null ) { return false ; } if ( callingUid != ( defaultApp.mPackageUid ) ) { return false ; } return ( mContext.checkCallingPermission ( Manifest.permission.SCORE_NETWORKS ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; }

Target:
public boolean isCallerActiveScorer ( int callingUid ) { android.net.NetworkScorerAppManager.NetworkScorerAppData defaultApp = getActiveScorer ( ) ; if ( defaultApp == null ) { return false ; } if ( callingUid != ( defaultApp.packageUid ) ) { return false ; } return ( mContext.checkCallingPermission ( Manifest.permission.SCORE_NETWORKS ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; }
Source:
private boolean canMarkDone ( java.lang.String args ) { if ( ( mRetrySessionId ) == null ) { return true ; } return ! ( ( ( ( ( RetryType.FAILED.equals ( mRetryType ) ) || ( args.contains ( CompatibilityTest.INCLUDE_FILTER_OPTION ) ) ) || ( args.contains ( CompatibilityTest.EXCLUDE_FILTER_OPTION ) ) ) || ( args.contains ( CompatibilityTest.SUBPLAN_OPTION ) ) ) || ( args.matches ( java.lang.String.format ( ".* (-%s|--%s) .*" , CompatibilityTest.TEST_OPTION_SHORT_NAME , CompatibilityTest.TEST_OPTION ) ) ) ) ; }

Target:
private boolean canMarkDone ( java.lang.String args ) { if ( ( mRetrySessionId ) == null ) { return true ; } return ! ( ( ( ( ( ( RetryType.FAILED.equals ( mRetryType ) ) || ( RetryType.CUSTOM.equals ( mRetryType ) ) ) || ( args.contains ( CompatibilityTest.INCLUDE_FILTER_OPTION ) ) ) || ( args.contains ( CompatibilityTest.EXCLUDE_FILTER_OPTION ) ) ) || ( args.contains ( CompatibilityTest.SUBPLAN_OPTION ) ) ) || ( args.matches ( java.lang.String.format ( ".* (-%s|--%s) .*" , CompatibilityTest.TEST_OPTION_SHORT_NAME , CompatibilityTest.TEST_OPTION ) ) ) ) ; }
Source:
public static boolean getBoolean ( android.security.keymaster.KeyCharacteristics keyCharacteristics , int tag ) { if ( keyCharacteristics.hwEnforced.containsTag ( tag ) ) { return keyCharacteristics.hwEnforced.getBoolean ( tag , false ) ; } else { return keyCharacteristics.swEnforced.getBoolean ( tag , false ) ; } }

Target:
public static int getKeymasterPaddingFromJcaSignaturePadding ( java.lang.String jcaPadding ) { if ( "PKCS#1" . equalsIgnoreCase ( jcaPadding ) ) { return android.security.keymaster.KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_SIGN ; } if ( "PSS" . equalsIgnoreCase ( jcaPadding ) ) { return android.security.keymaster.KeymasterDefs.KM_PAD_RSA_PSS ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported signature padding scheme: " + jcaPadding ) ) ; } }
Source:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; if ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_BLUETOOTH , UserHandle.SYSTEM ) ) { debugLog ( "enable() called when Bluetooth was disallowed" ) ; return false ; } debugLog ( ( "enable() - Enable called with quiet mode status = " + quietMode ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; return true ; }

Target:
boolean disable ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; debugLog ( ( "disable() called with mRunningProfiles.size() = " + ( mRunningProfiles.size ( ) ) ) ) ; mAdapterStateMachine.sendMessage ( AdapterState.BLE_TURN_OFF ) ; return true ; }