auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean isEnabledByDefault ( ) { if ( ! ( isValid ( ) ) ) { return false ; } java.util.Set < java.lang.String > carrierPackages = getCarrierVvmPackageNames ( ) ; if ( carrierPackages == null ) { return true ; } for ( java.lang.String packageName : carrierPackages ) { try { context.getPackageManager ( ) . getPackageInfo ( packageName , 0 ) ; return false ; } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { } } return true ; }

Target:
public boolean isEnabledByDefault ( ) { if ( ! ( isValid ( ) ) ) { return false ; } return ! ( isCarrierAppInstalled ( ) ) ; }
Source:
protected java.io.File buildProject ( java.lang.String name , java.lang.String gradleVersion ) { java.io.File project = new java.io.File ( testDir , name ) ; java.io.File buildGradle = new java.io.File ( project , "build.gradle" ) ; if ( ! ( buildGradle.isFile ( ) ) ) { return null ; } runGradleTasks ( sdkDir , gradleVersion , project , "clean" , "assembleDebug" ) ; return project ; }

Target:
protected java.io.File runTasksOnProject ( java.lang.String name , java.lang.String gradleVersion , java.lang.String ... tasks ) { java.io.File project = new java.io.File ( testDir , name ) ; java.io.File buildGradle = new java.io.File ( project , "build.gradle" ) ; if ( ! ( buildGradle.isFile ( ) ) ) { return null ; } runGradleTasks ( sdkDir , gradleVersion , project , tasks ) ; return project ; }
Source:
public void end ( ) throws java.lang.InterruptedException { long startTime = java.lang.System.currentTimeMillis ( ) ; try { waitForAll ( ) ; mOutstandingJobs.clear ( ) ; mLogger.verbose ( "Job finished in %1$d" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; } finally { mCrunchingRequests.shutdown ( ) ; mLogger.verbose ( "Shutdown finished in %1$d" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; } }

Target:
public synchronized int start ( ) { refCount.incrementAndGet ( ) ; int key = keyProvider.incrementAndGet ( ) ; mOutstandingJobs.put ( key , new java.util.concurrent.ConcurrentLinkedQueue < com.android.builder.tasks.Job < com.android.builder.png.AaptProcess > > ( ) ) ; return key ; }
Source:
public java.io.OutputStream getOutputStream ( ) { if ( ( printer ) != null ) { return new com.android.sched.util.stream.UncloseableOutputStream ( printer ) ; } else { clearRemover ( ) ; try { return new java.io.FileOutputStream ( file , append ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } }

Target:
public java.io.OutputStream getOutputStream ( ) { if ( ( stream ) == null ) { clearRemover ( ) ; try { stream = new java.io.FileOutputStream ( file , append ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } return stream ; }
Source:
final void put ( char [ ] src , int srcOffset , int charCount ) { int byteCount = checkPutBounds ( SizeOf.CHAR , src.length , srcOffset , charCount ) ; this . block.pokeCharArray ( ( ( offset ) + ( position ) ) , src , srcOffset , charCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( char [ ] src , int srcOffset , int charCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.CHAR , src.length , srcOffset , charCount ) ; this . block.pokeCharArray ( ( ( offset ) + ( position ) ) , src , srcOffset , charCount , order.needsSwap ) ; position += byteCount ; }
Source:
private static java.lang.String getNewerVersionAvailableMessage ( com.android.ide.common.repository.GradleCoordinate dependency , com.android.sdklib.repository.FullRevision version ) { return com.android.tools.lint.checks.GradleDetector.getNewerVersionAvailableMessage ( dependency , version.toString ( ) ) ; }

Target:
private static java.lang.String getNewerVersionAvailableMessage ( com.android.ide.common.repository.GradleCoordinate dependency , com.android.sdklib.repository.FullRevision version , boolean includeMicro ) { java.lang.String versionString = ( ( includeMicro || ( ( version.getMicro ( ) ) != 0 ) ) || ( version.isPreview ( ) ) ) ? version.toString ( ) : ( ( version.getMajor ( ) ) + "." ) + ( version.getMinor ( ) ) ; return com.android.tools.lint.checks.GradleDetector.getNewerVersionAvailableMessage ( dependency , versionString ) ; }
Source:
public void onChange ( boolean selfChange ) { super . onChange ( selfChange ) ; synchronized ( mLock ) { if ( ( mUiAutomationService ) == null ) { handleAccessibilityEnabledSettingChangedLocked ( ) ; updateInputFilterLocked ( ) ; sendStateToClientsLocked ( ) ; } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( Intent.ACTION_USER_SWITCHED.equals ( action ) ) { switchUser ( intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ) ; } else if ( Intent.ACTION_USER_REMOVED.equals ( action ) ) { removeUser ( intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ) ; } else if ( Intent.ACTION_USER_PRESENT.equals ( action ) ) { restoreStateFromMementoIfNeeded ( ) ; } }
Source:
private void setNewPhone ( com.android.internal.telephony.PhoneBase phone ) { mCurrentPhone = phone ; if ( phone instanceof com.android.internal.telephony.gsm.GSMPhone ) { if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "New phone is GSMPhone" ) ; updateCurrentCard ( IccCard.CARD_IS_3GPP ) ; } else if ( phone instanceof com.android.internal.telephony.cdma.CDMALTEPhone ) { if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "New phone type is CDMALTEPhone" ) ; updateCurrentCard ( IccCard.CARD_IS_3GPP ) ; } else if ( phone instanceof com.android.internal.telephony.cdma.CDMAPhone ) { if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "New phone type is CDMAPhone" ) ; updateCurrentCard ( IccCard.CARD_IS_NOT_3GPP ) ; } else { android.util.Log.e ( com.android.internal.telephony.uicc.UiccController.LOG_TAG , "Unhandled phone type. Critical error!" ) ; } }

Target:
public void registerForIccChanged ( android.os.Handler h , int what , java.lang.Object obj ) { android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mIccChangedRegistrants.add ( r ) ; r.notifyRegistrant ( ) ; }
Source:
private static byte [ ] encode ( java.lang.String charsetName , java.lang.String s ) throws java.lang.Exception { java.nio.charset.CharsetEncoder encoder = java.nio.charset.Charset.forName ( charsetName ) . newEncoder ( ) ; return encoder.encode ( java.nio.CharBuffer.wrap ( s ) ) . array ( ) ; }

Target:
private static byte [ ] encode ( java.lang.String charsetName , java.lang.String s ) throws java.lang.Exception { java.nio.charset.CharsetEncoder encoder = java.nio.charset.Charset.forName ( charsetName ) . newEncoder ( ) ; java.nio.ByteBuffer buf = encoder.encode ( java.nio.CharBuffer.wrap ( s ) ) ; byte [ ] out = new byte [ buf.remaining ( ) ] ; buf.get ( out ) ; assertEquals ( 0 , buf.remaining ( ) ) ; return out ; }
Source:
public java.util.List < java.lang.String [ ] > getNavbarLinks ( javax.servlet.http.HttpServletRequest request ) { java.util.List < java.lang.String [ ] > links = new java.util.ArrayList < > ( ) ; com.android.vts.servlet.Page root = Page.HOME ; java.lang.String [ ] rootEntry = new java.lang.String [ ] { root.getUrl ( ) , root.getName ( ) } ; links.add ( rootEntry ) ; return links ; }

Target:
public java.util.List < com.android.vts.servlet.Page > getBreadcrumbLinks ( javax.servlet.http.HttpServletRequest request ) { return null ; }
Source:
public java.util.Set < vogar.tasks.Task > installActionTasks ( vogar.Action action , java.io.File jar ) { return java.util.Collections.< vogar.tasks.Task > singleton ( new vogar.android.DexTask ( run.androidSdk , vogar.Classpath.of ( jar ) , run.benchmark , action.getName ( ) , jar , action , run.localDexFile ( action.getName ( ) ) ) ) ; }

Target:
public java.util.Set < vogar.tasks.Task > installActionTasks ( vogar.Action action , java.io.File jar ) { java.io.File localDexFile = run.localDexFile ( action.getName ( ) ) ; vogar.tasks.Task createDexJarTask = createCreateDexJarTask ( vogar.Classpath.of ( jar ) , jar , action.getName ( ) , action , localDexFile ) ; return java.util.Collections.singleton ( createDexJarTask ) ; }
Source:
private void removeConferenceParticipant ( com.android.services.telephony.ConferenceParticipantConnection participant ) { android.telecom.Log.d ( this , "removeConferenceParticipant: %s" , participant ) ; participant.removeConnectionListener ( mParticipantListener ) ; synchronized ( mUpdateSyncRoot ) { mConferenceParticipantConnections.remove ( participant.getUserEntity ( ) ) ; } mTelephonyConnectionService.removeConnection ( participant ) ; }

Target:
private void disconnectConferenceParticipants ( ) { android.telecom.Log.v ( this , "disconnectConferenceParticipants" ) ; synchronized ( mUpdateSyncRoot ) { for ( com.android.services.telephony.ConferenceParticipantConnection connection : mConferenceParticipantConnections.values ( ) ) { connection.removeConnectionListener ( mParticipantListener ) ; connection.setDisconnected ( new android.telecom.DisconnectCause ( android.telecom.DisconnectCause.CANCELED ) ) ; mTelephonyConnectionService.removeConnection ( connection ) ; connection.destroy ( ) ; } mConferenceParticipantConnections.clear ( ) ; } }
Source:
private static com.android.jack.dx.rop.cst.CstString createSourceFile ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { com.android.jack.dx.rop.cst.CstString sourceFile = null ; com.android.jack.ir.sourceinfo.SourceInfo sourceInfo = type.getSourceInfo ( ) ; java.lang.String sourceFileName = sourceInfo.getFileName ( ) ; java.lang.String fileSeparator = com.android.jack.util.FileUtils.getFileSeparator ( ) ; int separatorPos = sourceFileName.lastIndexOf ( fileSeparator ) ; if ( separatorPos > 0 ) { sourceFileName = sourceFileName.substring ( ( separatorPos + 1 ) ) ; } sourceFile = new com.android.jack.dx.rop.cst.CstString ( sourceFileName ) ; return sourceFile ; }

Target:
private static com.android.jack.dx.rop.cst.CstString createSourceFile ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { com.android.jack.dx.rop.cst.CstString sourceFile = null ; com.android.jack.ir.sourceinfo.SourceInfo sourceInfo = type.getSourceInfo ( ) ; java.lang.String sourceFileName = sourceInfo.getFileName ( ) ; java.lang.String fileSeparator = com.android.sched.util.file.FileUtils.getFileSeparator ( ) ; int separatorPos = sourceFileName.lastIndexOf ( fileSeparator ) ; if ( separatorPos > 0 ) { sourceFileName = sourceFileName.substring ( ( separatorPos + 1 ) ) ; } sourceFile = new com.android.jack.dx.rop.cst.CstString ( sourceFileName ) ; return sourceFile ; }
Source:
public synchronized int getConnectionState ( ) { com.android.internal.util.IState currentState = getCurrentState ( ) ; if ( currentState == ( mConnecting ) ) { return android.bluetooth.BluetoothProfile.STATE_CONNECTING ; } else if ( currentState instanceof com.android.bluetooth.hfp.HeadsetStateMachine.ConnectedBase ) { return android.bluetooth.BluetoothProfile.STATE_CONNECTED ; } else if ( currentState == ( mDisconnecting ) ) { return android.bluetooth.BluetoothProfile.STATE_DISCONNECTING ; } return android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ; }

Target:
int getConnectionStateInt ( ) { return android.bluetooth.BluetoothProfile.STATE_CONNECTED ; }
Source:
protected void sleepDevice ( ) throws com.android.tradefed.device.DeviceNotAvailableException { int retriesLeft = 5 ; runCommandAndPrintOutput ( "input keyevent 26" ) ; do { if ( isDisplayOn ( ) ) { android.server.cts.StateLogger.log ( "***Waiting for display to turn off..." ) ; try { java.lang.Thread.sleep ( 1000 ) ; } catch ( java.lang.InterruptedException e ) { android.server.cts.StateLogger.log ( e.toString ( ) ) ; } } else { break ; } } while ( ( retriesLeft -- ) > 0 ) ; }

Target:
protected void sleepDevice ( ) throws com.android.tradefed.device.DeviceNotAvailableException { int retriesLeft = 5 ; runCommandAndPrintOutput ( "input keyevent SLEEP" ) ; do { if ( isDisplayOn ( ) ) { android.server.cts.StateLogger.log ( "***Waiting for display to turn off..." ) ; try { java.lang.Thread.sleep ( 1000 ) ; } catch ( java.lang.InterruptedException e ) { android.server.cts.StateLogger.log ( e.toString ( ) ) ; } } else { break ; } } while ( ( retriesLeft -- ) > 0 ) ; }
Source:
public void assertEventuallyTrue ( java.util.function.BooleanSupplier fn , long maxWaitingTimeMs ) throws java.lang.Exception { long start = android.os.SystemClock.elapsedRealtime ( ) ; while ( ( android.os.SystemClock.elapsedRealtime ( ) ) <= ( start + maxWaitingTimeMs ) ) { if ( fn.getAsBoolean ( ) ) { return ; } java.lang.Thread.sleep ( 10 ) ; } assertTrue ( fn.getAsBoolean ( ) ) ; }

Target:
public void assertEventuallyTrue ( java.util.function.BooleanSupplier fn , long maxWaitingTimeMs ) { long start = android.os.SystemClock.elapsedRealtime ( ) ; while ( ( android.os.SystemClock.elapsedRealtime ( ) ) <= ( start + maxWaitingTimeMs ) ) { if ( fn.getAsBoolean ( ) ) { return ; } com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; } assertTrue ( fn.getAsBoolean ( ) ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 2 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 2 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private void onSetPolicyDataEnabled ( boolean enabled ) { synchronized ( mDataEnabledSettings ) { final boolean prevEnabled = getAnyDataEnabled ( ) ; if ( ( mDataEnabledSettings.isPolicyDataEnabled ( ) ) != enabled ) { mDataEnabledSettings.setPolicyDataEnabled ( enabled ) ; if ( prevEnabled != ( getAnyDataEnabled ( ) ) ) { if ( ! prevEnabled ) { teardownRestrictedMeteredConnections ( ) ; onTrySetupData ( Phone.REASON_DATA_ENABLED ) ; } else { onCleanUpAllConnections ( Phone.REASON_DATA_SPECIFIC_DISABLED ) ; } } } } }

Target:
private void onSetPolicyDataEnabled ( boolean enabled ) { synchronized ( mDataEnabledSettings ) { final boolean prevEnabled = getAnyDataEnabled ( ) ; if ( ( mDataEnabledSettings.isPolicyDataEnabled ( ) ) != enabled ) { mDataEnabledSettings.setPolicyDataEnabled ( enabled ) ; if ( prevEnabled != ( getAnyDataEnabled ( ) ) ) { if ( ! prevEnabled ) { reevaluateDataConnections ( ) ; onTrySetupData ( Phone.REASON_DATA_ENABLED ) ; } else { onCleanUpAllConnections ( Phone.REASON_DATA_SPECIFIC_DISABLED ) ; } } } } }
Source:
private com.android.builder.VariantConfiguration getVariantWithManifestPackage ( final java.lang.String packageName ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override public java.lang.String getPackageFromManifest ( ) { return packageName ; } @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) ) ; return variant ; }

Target:
private com.android.builder.VariantConfiguration getVariantWithManifestPackage ( final java.lang.String packageName ) { com.android.builder.VariantConfiguration variant = new com.android.builder.VariantConfiguration ( mDefaultConfig , new com.android.builder.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) { @ java.lang.Override public java.lang.String getPackageFromManifest ( ) { return packageName ; } @ java.lang.Override protected void validate ( ) { } } ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
private boolean hasOutgoingGatewayCall ( ) { if ( ( primary ) == null ) { return false ; } return ( ( DialerCall.State.isDialing ( primary.getState ( ) ) ) && ( ( primary.getGatewayInfo ( ) ) != null ) ) && ( ! ( primary.getGatewayInfo ( ) . isEmpty ( ) ) ) ; }

Target:
private boolean hasOutgoingGatewayCall ( ) { if ( ( primary ) == null ) { return false ; } return ( ( com.android.incallui.call.state.DialerCallState.isDialing ( primary.getState ( ) ) ) && ( ( primary.getGatewayInfo ( ) ) != null ) ) && ( ! ( primary.getGatewayInfo ( ) . isEmpty ( ) ) ) ; }
Source:
public void onCallUssdMessageReceived ( com.android.ims.ImsCall call , int mode , java.lang.String ussdMessage ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "mImsUssdListener onCallUssdMessageReceived mode=" + mode ) ) ; int ussdMode = - 1 ; switch ( mode ) { case com.android.ims.ImsCall.USSD_MODE_REQUEST : ussdMode = com.android.internal.telephony.CommandsInterface.USSD_MODE_REQUEST ; break ; case com.android.ims.ImsCall.USSD_MODE_NOTIFY : ussdMode = com.android.internal.telephony.CommandsInterface.USSD_MODE_NOTIFY ; break ; } mPhone.onIncomingUSSD ( ussdMode , ussdMessage ) ; }

Target:
public void onRegistering ( @ android.telephony.ims.stub.ImsRegistrationImplBase.ImsRegistrationTech int imsRadioTech ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onImsProgressing imsRadioTech=" + imsRadioTech ) ) ; mPhone.setServiceState ( ServiceState.STATE_OUT_OF_SERVICE ) ; mPhone.setImsRegistered ( false ) ; mMetrics.writeOnImsConnectionState ( mPhone.getPhoneId ( ) , ImsConnectionState.State.PROGRESSING , null ) ; }
Source:
private void setupMocksForRoamSequence ( java.lang.String roamBssid ) throws java.lang.Exception { org.mockito.Mockito.doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public android.hardware.wifi.supplicant.V1_0.SupplicantStatus answer ( ) throws android.os.RemoteException { return mStatusSuccess ; } } ) . when ( mISupplicantStaIfaceMock ) . reassociate ( ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.eq ( roamBssid ) ) ) . thenReturn ( true ) ; }

Target:
public android.hardware.wifi.supplicant.V1_0.SupplicantStatus answer ( int id ) { assertTrue ( com.android.server.wifi.SupplicantStaIfaceHalTest.NETWORK_ID_TO_SSID.containsKey ( id ) ) ; return mStatusSuccess ; }
Source:
protected void _initWith ( @ com.android.annotations.NonNull com.android.builder.model.BaseConfig that ) { setBuildConfigFields ( that.getBuildConfigFields ( ) ) ; mProguardFiles.clear ( ) ; mProguardFiles.addAll ( that.getProguardFiles ( ) ) ; mConsumerProguardFiles.clear ( ) ; mConsumerProguardFiles.addAll ( that.getConsumerProguardFiles ( ) ) ; }

Target:
protected void _initWith ( @ com.android.annotations.NonNull com.android.builder.model.BaseConfig that ) { setBuildConfigFields ( that.getBuildConfigFields ( ) ) ; setResValues ( that.getResValues ( ) ) ; mProguardFiles.clear ( ) ; mProguardFiles.addAll ( that.getProguardFiles ( ) ) ; mConsumerProguardFiles.clear ( ) ; mConsumerProguardFiles.addAll ( that.getConsumerProguardFiles ( ) ) ; }
Source:
public void supplyNetworkDepersonalization ( java.lang.String netpin , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeString ( netpin ) ; send ( rr ) ; }

Target:
public void getCdmaSubscriptionSource ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getCdmaSubscriptionSource ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getCdmaSubscriptionSource" , e ) ; } } }
Source:
public boolean notifyInstantiation ( @ javax.annotation.Nonnull java.lang.Object object , @ javax.annotation.Nonnegative long size , int count , @ javax.annotation.Nonnull com.android.sched.util.log.EventType eventType ) { java.lang.Class < ? > type = object.getClass ( ) ; if ( count >= 0 ) { notifyArray ( type , size , count , eventType ) ; } return false ; }

Target:
public boolean notifyInstantiation ( @ javax.annotation.Nonnull java.lang.Object object , @ javax.annotation.Nonnegative long size , int count , @ javax.annotation.Nonnull com.android.sched.util.log.EventType eventType , @ javax.annotation.CheckForNull java.lang.StackTraceElement site ) { java.lang.Class < ? > type = object.getClass ( ) ; if ( count >= 0 ) { notifyArray ( type , size , count , eventType ) ; } return false ; }
Source:
private boolean startIPv6 ( ) { try { mNwService.setInterfaceIpv6PrivacyExtensions ( mInterfaceName , true ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( android.os.RemoteException re ) { android.util.Log.e ( mTag , ( "Unable to change interface settings: " + re ) ) ; return false ; } catch ( java.lang.IllegalStateException ie ) { android.util.Log.e ( mTag , ( "Unable to change interface settings: " + ie ) ) ; return false ; } return true ; }

Target:
private boolean startIPv6 ( ) { try { mNwService.setInterfaceIpv6PrivacyExtensions ( mInterfaceName , true ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( android.os.RemoteException re ) { logError ( "Unable to change interface settings: %s" , re ) ; return false ; } catch ( java.lang.IllegalStateException ie ) { logError ( "Unable to change interface settings: %s" , ie ) ; return false ; } return true ; }
Source:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . notifyFeatureRemoved ( org.mockito.Matchers.eq ( 0 ) ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . setImsFeatureStatusCallback ( null ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getImsFeatureMap ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( mTestImsService.getImsFeatureFromType ( features , ImsFeature.MMTEL ) ) ; }

Target:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . notifyFeatureRemoved ( org.mockito.Matchers.eq ( 0 ) ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . removeImsFeatureStatusCallback ( mTestCallback ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getImsFeatureMap ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( mTestImsService.getImsFeatureFromType ( features , ImsFeature.MMTEL ) ) ; }
Source:
int verifyRequest ( int expectedMessageType ) { org.mockito.Mockito.verify ( mServiceHandler , org.mockito.Mockito.timeout ( mTimeoutMs ) ) . handleMessage ( org.mockito.Mockito.any ( ) ) ; org.mockito.Mockito.reset ( mServiceHandler ) ; android.os.Message received = mServiceHandler.lastMessage ; org.junit.Assert.assertEquals ( android.net.nsd.NsdManager.nameOf ( expectedMessageType ) , android.net.nsd.NsdManager.nameOf ( received.what ) ) ; return received.arg2 ; }

Target:
int verifyRequest ( int expectedMessageType ) { mServiceHandler.waitForIdle ( mTimeoutMs ) ; org.mockito.Mockito.verify ( mServiceHandler , org.mockito.Mockito.timeout ( mTimeoutMs ) ) . handleMessage ( org.mockito.Mockito.any ( ) ) ; org.mockito.Mockito.reset ( mServiceHandler ) ; android.os.Message received = mServiceHandler.getLastMessage ( ) ; org.junit.Assert.assertEquals ( android.net.nsd.NsdManager.nameOf ( expectedMessageType ) , android.net.nsd.NsdManager.nameOf ( received.what ) ) ; return received.arg2 ; }
Source:
public void testSetWifiEnabledSuccess ( ) throws java.lang.Exception { when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ) ; verify ( mWifiController ) . obtainMessageAndSend ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }

Target:
public void testSetWifiEnabledSuccess ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_DISABLED ) ; when ( mSettingsStore.handleWifiToggled ( org.mockito.Matchers.eq ( true ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ) ; verify ( mWifiController ) . sendMessage ( org.mockito.Matchers.eq ( com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED ) ) ; }
Source:
protected void createButtonsForButtonBar ( org.eclipse.swt.widgets.Composite parent ) { createButton ( parent , IDialogConstants.CLOSE_ID , IDialogConstants.CLOSE_LABEL , false ) ; mFindNext = createButton ( parent , com.android.ddmuilib.FindDialog.FIND_NEXT_ID , "Find Next" , false ) ; mFindPrevious = createButton ( parent , com.android.ddmuilib.FindDialog.FIND_PREVIOUS_ID , "Find Previous" , true ) ; mFindNext.setEnabled ( false ) ; mFindPrevious.setEnabled ( false ) ; }

Target:
protected void createButtonsForButtonBar ( org.eclipse.swt.widgets.Composite parent ) { createButton ( parent , IDialogConstants.CLOSE_ID , IDialogConstants.CLOSE_LABEL , false ) ; mFindNext = createButton ( parent , com.android.ddmuilib.FindDialog.FIND_NEXT_ID , "Find Next" , ( ( mDefaultButtonId ) == ( com.android.ddmuilib.FindDialog.FIND_NEXT_ID ) ) ) ; mFindPrevious = createButton ( parent , com.android.ddmuilib.FindDialog.FIND_PREVIOUS_ID , "Find Previous" , ( ( mDefaultButtonId ) != ( com.android.ddmuilib.FindDialog.FIND_NEXT_ID ) ) ) ; mFindNext.setEnabled ( false ) ; mFindPrevious.setEnabled ( false ) ; }
Source:
public java.lang.String getNamespace ( ) { if ( ( mNamespace ) == null ) { mNamespace = com.android.SdkConstants.ANDROID_URI ; if ( ! ( layout.getFqcn ( ) . equals ( com.android.SdkConstants.FQCN_GRID_LAYOUT ) ) ) { mNamespace = mRulesEngine.getAppNameSpace ( ) ; } } return mNamespace ; }

Target:
public java.lang.String getNamespace ( ) { if ( ( mNamespace ) == null ) { mNamespace = com.android.SdkConstants.ANDROID_URI ; java.lang.String fqcn = layout.getFqcn ( ) ; if ( ( ! ( fqcn.equals ( com.android.SdkConstants.GRID_LAYOUT ) ) ) && ( ! ( fqcn.equals ( com.android.SdkConstants.FQCN_GRID_LAYOUT ) ) ) ) { mNamespace = mRulesEngine.getAppNameSpace ( ) ; } } return mNamespace ; }
Source:
public void afterHandshake ( long session , long ssl , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; assertEquals ( "ALPN should not enable cutthrough on the server" , 0 , ( ( org.conscrypt.NativeCrypto.SSL_get_mode ( ssl ) ) & ( org.conscrypt.NativeCrypto.SSL_MODE_HANDSHAKE_CUTTHROUGH ) ) ) ; super . afterHandshake ( session , ssl , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long ssl , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; assertEquals ( "ALPN should not enable cutthrough on the server" , 0 , ( ( org.conscrypt.NativeCrypto.SSL_get_mode ( ssl ) ) & ( org.conscrypt.NativeConstants.SSL_MODE_HANDSHAKE_CUTTHROUGH ) ) ) ; super . afterHandshake ( session , ssl , c , sock , fd , callback ) ; }
Source:
private void dumpPropertiesToZip ( @ javax.annotation.Nonnull java.util.zip.ZipOutputStream zos , @ javax.annotation.Nonnull java.util.Properties libraryProperties ) { try { java.util.zip.ZipEntry entry = new java.util.zip.ZipEntry ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES ) ; zos.putNextEntry ( entry ) ; libraryProperties.store ( zos , "Library Properties" ) ; } catch ( java.io.IOException e ) { throw new com.android.jill.JillException ( ( ( "Error writing '" + ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES ) ) + "' to output zip" ) , e ) ; } }

Target:
private void dumpJackLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.VFS baseVFS ) { try { @ java.lang.SuppressWarnings ( value = "resource" ) com.android.sched.vfs.OutputVFS goVFS = new com.android.sched.vfs.GenericOutputVFS ( baseVFS ) ; com.android.sched.vfs.OutputVFile libraryPropertiesOut = goVFS.getRootOutputVDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES , '/' ) ) ; try ( java.io.OutputStream os = libraryPropertiesOut.getOutputStream ( ) ) { jackLibraryProperties.store ( os , "Library Properties" ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseException ( libraryPropertiesOut , e ) ; } } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotCloseException e ) { throw new com.android.jill.JillException ( e ) ; } }
Source:
public void handleDataPathTimeout ( java.lang.String networkSpecifier ) { if ( com.android.server.wifi.nan.WifiNanDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( "handleDataPathTimeout: networkSpecifier=" + networkSpecifier ) ) ; com.android.server.wifi.nan.WifiNanDataPathStateManager.NanNetworkRequestInformation nnri = mNetworkRequestsCache.remove ( networkSpecifier ) ; if ( nnri == null ) { if ( com.android.server.wifi.nan.WifiNanDataPathStateManager.DBG ) { android.util.Log.d ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( "handleDataPathTimeout: network request not found for networkSpecifier=" + networkSpecifier ) ) ; } return ; } mMgr.endDataPath ( nnri.ndpId ) ; }

Target:
public void handleDataPathTimeout ( java.lang.String networkSpecifier ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "handleDataPathTimeout: networkSpecifier=" + networkSpecifier ) ) ; com.android.server.wifi.aware.WifiAwareDataPathStateManager.AwareNetworkRequestInformation nnri = mNetworkRequestsCache.remove ( networkSpecifier ) ; if ( nnri == null ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.DBG ) { android.util.Log.d ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "handleDataPathTimeout: network request not found for networkSpecifier=" + networkSpecifier ) ) ; } return ; } mMgr.endDataPath ( nnri.ndpId ) ; }
Source:
private void asyncDeleteDraftMmsMessage ( com.android.mms.data.Conversation conv ) { mHasMmsDraft = false ; final long threadId = conv.getThreadId ( ) ; if ( threadId > 0 ) { final java.lang.String where = ( ( android.provider.Telephony.Mms.THREAD_ID ) + " = " ) + threadId ; asyncDelete ( Mms.Draft.CONTENT_URI , where , null ) ; } }

Target:
private void asyncDeleteDraftMmsMessage ( com.android.mms.data.Conversation conv ) { mHasMmsDraft = false ; final long threadId = conv.getThreadId ( ) ; final java.lang.String where = ( android.provider.Telephony.Mms.THREAD_ID ) + ( threadId > 0 ? " = " + threadId : " IS NULL" ) ; asyncDelete ( Mms.Draft.CONTENT_URI , where , null ) ; }
Source:
public int size ( ) { return tableOfContents.stringIds.size ; }

Target:
private java.util.List < java.lang.String > readStrings ( ) { com.android.jack.dx.io.DexBuffer.Section strings = open ( tableOfContents.stringIds.off ) ; java.lang.String [ ] result = new java.lang.String [ tableOfContents.stringIds.size ] ; for ( int i = 0 ; i < ( tableOfContents.stringIds.size ) ; ++ i ) { result [ i ] = strings.readString ( ) ; } return java.util.Arrays.asList ( result ) ; }
Source:
private void createPatch ( ) throws com.intellij.updater.OperationCancelledException , java.io.IOException { com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; assertTrue ( myFile.exists ( ) ) ; }

Target:
protected com.intellij.updater.Patch createPatch ( ) throws com.intellij.updater.OperationCancelledException , java.io.IOException { com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; assertTrue ( myFile.exists ( ) ) ; return patch ; }
Source:
public void testWifiEnterpriseConfigNoChanges ( ) { com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfig = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CA_CERT0 , android.net.wifi.FakeKeys.CA_CERT1 } ) ; com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfigSame = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CA_CERT0 , android.net.wifi.FakeKeys.CA_CERT1 } ) ; assertFalse ( com.android.server.wifi.WifiConfigurationUtil.hasEnterpriseConfigChanged ( eapConfig.enterpriseConfig , eapConfigSame.enterpriseConfig ) ) ; }

Target:
public void testWifiEnterpriseConfigNoChanges ( ) { com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfig = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { FakeKeys.CA_CERT0 , FakeKeys.CA_CERT1 } ) ; com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig eapConfigSame = new com.android.server.wifi.WifiConfigurationUtilTest.EnterpriseConfig ( WifiEnterpriseConfig.Eap.TTLS ) . setPhase2 ( WifiEnterpriseConfig.Phase2.MSCHAPV2 ) . setIdentity ( "username" , "password" ) . setCaCerts ( new java.security.cert.X509Certificate [ ] { FakeKeys.CA_CERT0 , FakeKeys.CA_CERT1 } ) ; assertFalse ( com.android.server.wifi.WifiConfigurationUtil.hasEnterpriseConfigChanged ( eapConfig.enterpriseConfig , eapConfigSame.enterpriseConfig ) ) ; }
Source:
public void callSessionRemoveParticipantsRequestDelivered ( com.android.ims.internal.ImsCallSession session ) { logi ( "callSessionRemoveParticipantsRequestDelivered ::" ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( ( "callSessionRemoveParticipantsRequestDelivered :: not supported for " + "conference session=" ) + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( listener != null ) { try { listener.onCallRemoveParticipantsRequestDelivered ( this ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionRemoveParticipantsRequestDelivered :: " , t ) ; } } }

Target:
public void callSessionInviteParticipantsRequestFailed ( android.telephony.ims.ImsCallSession session , android.telephony.ims.ImsReasonInfo reasonInfo ) { loge ( ( "callSessionInviteParticipantsRequestFailed :: reasonInfo=" + reasonInfo ) ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( ( "callSessionInviteParticipantsRequestFailed :: not supported for " + "conference session=" ) + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( listener != null ) { try { listener.onCallInviteParticipantsRequestFailed ( this , reasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionInviteParticipantsRequestFailed :: " , t ) ; } } }
Source:
public java.lang.String getProperty ( java.lang.String name ) { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( 1 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } catch ( java.util.concurrent.TimeoutException e ) { } return null ; }

Target:
public java.lang.String getProperty ( java.lang.String name ) { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( com.android.ddmlib.Device.GET_PROP_TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } catch ( java.util.concurrent.TimeoutException e ) { } return null ; }
Source:
public static com.android.incallui.answer.protocol.AnswerScreen createAnswerScreen ( java.lang.String callId , boolean isRttCall , boolean isVideoCall , boolean isVideoUpgradeRequest , boolean isSelfManagedCamera , boolean allowAnswerAndRelease , boolean hasCallOnHold ) { return com.android.incallui.answer.impl.AnswerFragment.newInstance ( callId , isRttCall , isVideoCall , isVideoUpgradeRequest , isSelfManagedCamera , allowAnswerAndRelease , hasCallOnHold ) ; }

Target:
public static com.android.incallui.answer.protocol.AnswerScreen createAnswerScreen ( java.lang.String callId , boolean isRttCall , boolean isVideoCall , boolean isVideoUpgradeRequest , boolean isSelfManagedCamera , boolean allowAnswerAndRelease , boolean hasCallOnHold , boolean allowSpeakEasy ) { return com.android.incallui.answer.impl.AnswerFragment.newInstance ( callId , isRttCall , isVideoCall , isVideoUpgradeRequest , isSelfManagedCamera , allowAnswerAndRelease , hasCallOnHold , allowSpeakEasy ) ; }
Source:
public static boolean contains ( java.util.Iterator < ? > iterator , @ javax.annotation.Nullable java.lang.Object element ) { if ( element == null ) { while ( iterator.hasNext ( ) ) { if ( ( iterator.next ( ) ) == null ) { return true ; } } } else { while ( iterator.hasNext ( ) ) { if ( element.equals ( iterator.next ( ) ) ) { return true ; } } } return false ; }

Target:
public static boolean contains ( java.util.Iterator < ? > iterator , @ javax.annotation.Nullable java.lang.Object element ) { return com.google.common.collect.Iterators.any ( iterator , com.google.common.base.Predicates.equalTo ( element ) ) ; }
Source:
public void inputChanged ( org.eclipse.jface.viewers.Viewer viewer , java.lang.Object oldInput , java.lang.Object newInput ) { }

Target:
public void inputChanged ( org.eclipse.jface.viewers.Viewer viewer , java.lang.Object oldInput , java.lang.Object newInput ) { if ( ( ( newInput instanceof java.util.List < ? > ) && ( ( ( ( java.util.List < ? > ) ( newInput ) ) . size ( ) ) > 0 ) ) && ( ( ( ( java.util.List < ? > ) ( newInput ) ) . get ( 0 ) ) instanceof com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.LicenseEntry ) ) { mInput = ( ( java.util.List < com.android.sdkuilib.internal.repository.SdkUpdaterChooserDialog.LicenseEntry > ) ( newInput ) ) ; } else { mInput = null ; } }
Source:
private void sendIntentToReceiver ( final java.lang.String intentName , final java.lang.String extraName , final java.lang.String extraValue ) { android.content.Intent intent = new android.content.Intent ( intentName ) ; intent.setPackage ( BluetoothPbapService.THIS_PACKAGE_NAME ) ; if ( extraName != null ) { intent.putExtra ( extraName , extraValue ) ; } sendBroadcast ( intent ) ; }

Target:
private void sendIntentToReceiver ( final java.lang.String intentName , final java.lang.String extraName , final java.lang.String extraValue ) { android.content.Intent intent = new android.content.Intent ( intentName ) ; intent.setPackage ( BluetoothPbapService.THIS_PACKAGE_NAME ) ; intent.putExtra ( BluetoothPbapService.EXTRA_DEVICE , mDevice ) ; if ( extraName != null ) { intent.putExtra ( extraName , extraValue ) ; } sendBroadcast ( intent ) ; }
Source:
protected static void rolloverCounters ( ) { com.android.bluetooth.pbap.BluetoothPbapUtils.sDbIdentifier.set ( java.util.Calendar.getInstance ( ) . getTimeInMillis ( ) ) ; com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter ; com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter ; if ( com.android.bluetooth.pbap.BluetoothPbapUtils.V ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapUtils.TAG , ( "mDbIdentifier rolled over to:" + ( com.android.bluetooth.pbap.BluetoothPbapUtils.sDbIdentifier ) ) ) ; } }

Target:
static void rolloverCounters ( ) { com.android.bluetooth.pbap.BluetoothPbapUtils.sDbIdentifier.set ( java.util.Calendar.getInstance ( ) . getTimeInMillis ( ) ) ; com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.sPrimaryVersionCounter ; com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter = ( ( com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter ) < 0 ) ? 0 : com.android.bluetooth.pbap.BluetoothPbapUtils.sSecondaryVersionCounter ; if ( com.android.bluetooth.pbap.BluetoothPbapUtils.V ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapUtils.TAG , ( "DbIdentifier rolled over to:" + ( com.android.bluetooth.pbap.BluetoothPbapUtils.sDbIdentifier ) ) ) ; } }
Source:
public void registerRemoteVolumeObserverForRcc ( int rccId , android.media.IRemoteVolumeObserver rvo ) { mMediaFocusControl.registerRemoteVolumeObserverForRcc ( rccId , rvo ) ; }

Target:
public int setHdmiSystemAudioSupported ( boolean on ) { int device = AudioSystem.DEVICE_NONE ; if ( ( mHdmiManager ) != null ) { synchronized ( mHdmiManager ) { if ( ( mHdmiTvClient ) == null ) { android.util.Log.w ( android.media.AudioService.TAG , "Only Hdmi-Cec enabled TV device supports system audio mode." ) ; return device ; } synchronized ( mHdmiTvClient ) { if ( ( mHdmiSystemAudioSupported ) != on ) { mHdmiSystemAudioSupported = on ; android.media.AudioSystem.setForceUse ( AudioSystem.FOR_HDMI_SYSTEM_AUDIO , ( on ? AudioSystem.FORCE_HDMI_SYSTEM_AUDIO_ENFORCED : AudioSystem.FORCE_NONE ) ) ; } device = android.media.AudioSystem.getDevicesForStream ( AudioSystem.STREAM_MUSIC ) ; } } } return device ; }
Source:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] buffer = new byte [ 1 ] ; org.conscrypt.NativeCrypto.SSL_read ( s , fd , callback , buffer , 0 , 1 , 0 ) ; assertEquals ( 42 , buffer [ 0 ] ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long ssl , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; assertEquals ( "ALPN should not enable cutthrough on the server" , 0 , ( ( org.conscrypt.NativeCrypto.SSL_get_mode ( ssl ) ) & ( org.conscrypt.NativeCrypto.SSL_MODE_HANDSHAKE_CUTTHROUGH ) ) ) ; super . afterHandshake ( session , ssl , c , sock , fd , callback ) ; }
Source:
public boolean [ ] someBoolVectorMethod ( boolean [ ] x ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( ( "Baz someBoolVectorMethod(" + ( com.android.commands.hidl_test_java.HidlTestJava.toString ( x ) ) ) + ")" ) ) ; boolean [ ] out = new boolean [ x.length ] ; for ( int i = 0 ; i < ( x.length ) ; ++ i ) { out [ i ] = ! ( x [ i ] ) ; } return out ; }

Target:
public java.util.ArrayList < java.lang.Boolean > someBoolVectorMethod ( java.util.ArrayList < java.lang.Boolean > x ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( ( "Baz someBoolVectorMethod(" + ( com.android.commands.hidl_test_java.HidlTestJava.booleanVecToString ( x ) ) ) + ")" ) ) ; java.util.ArrayList < java.lang.Boolean > out = new java.util.ArrayList < java.lang.Boolean > ( ) ; for ( int i = 0 ; i < ( x.size ( ) ) ; ++ i ) { out.add ( ( ! ( x.get ( i ) ) ) ) ; } return out ; }
Source:
public void playDtmfTone ( com.android.server.telecom.Call call , char digit ) { if ( ! ( mCalls.contains ( call ) ) ) { com.android.server.telecom.Log.i ( this , "Request to play DTMF in a non-existent call %s" , call ) ; } else { call.playDtmfTone ( digit ) ; mDtmfLocalTonePlayer.playTone ( call , digit ) ; } }

Target:
public void playDtmfTone ( com.android.server.telecom.Call call , char digit ) { if ( ! ( mCalls.contains ( call ) ) ) { android.telecom.Log.i ( this , "Request to play DTMF in a non-existent call %s" , call ) ; } else { call.playDtmfTone ( digit ) ; mDtmfLocalTonePlayer.playTone ( call , digit ) ; } }
Source:
private void savePreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APP_PACKAGE , mAppPackageToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_ACTIVITY , mActivityToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , mTraceFilePath ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , mSelectedDevice ) ; try { prefs.flush ( ) ; } catch ( org.osgi.service.prefs.BackingStoreException e ) { } }

Target:
private void savePreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode ( GlTracePlugin.PLUGIN_ID ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APP_PACKAGE , mAppPackageToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_ACTIVITY , mActivityToTrace ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , mTraceFilePath ) ; prefs.put ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , mSelectedDevice ) ; try { prefs.flush ( ) ; } catch ( org.osgi.service.prefs.BackingStoreException e ) { } }