auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testCannotAccessScanResults_NoCoarseLocationPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mLocationModeSetting = Settings.Secure.LOCATION_MODE_HIGH_ACCURACY ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }

Target:
public void testCannotAccessScanResults_NoCoarseLocationPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mLocationModeSetting = Settings.Secure.LOCATION_MODE_HIGH_ACCURACY ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScorerAppManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }
Source:
static void writeXml ( com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneMapping timeZoneId , javax.xml.stream.XMLStreamWriter writer ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_ID_ELEMENT ) ; if ( ! ( timeZoneId.showInPicker ) ) { writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_SHOW_IN_PICKER_ATTRIBUTE , com.android.libcore.timezone.tzlookup.TzLookupFile.encodeBooleanAttribute ( false ) ) ; } writer.writeCharacters ( timeZoneId.olsonId ) ; writer.writeEndElement ( ) ; }

Target:
static void writeXml ( com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneMapping timeZoneId , javax.xml.stream.XMLStreamWriter writer ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_ID_ELEMENT ) ; if ( ! ( timeZoneId.showInPicker ) ) { writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_SHOW_IN_PICKER_ATTRIBUTE , com.android.libcore.timezone.tzlookup.TzLookupFile.encodeBooleanAttribute ( false ) ) ; } if ( ( timeZoneId.notUsedAfterInclusive ) != null ) { writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.ZONE_NOT_USED_AFTER_ATTRIBUTE , com.android.libcore.timezone.tzlookup.TzLookupFile.encodeLongAttribute ( timeZoneId.notUsedAfterInclusive.toEpochMilli ( ) ) ) ; } writer.writeCharacters ( timeZoneId.olsonId ) ; writer.writeEndElement ( ) ; }
Source:
public void testReplaceMatchMoreCertsReplaceSomeCerts ( ) { android.content.pm.PackageManagerTests.InstallParams ip = replaceCerts ( APP1_CERT1 , APP1_CERT1_CERT2 , false , true , PackageManager.INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES ) ; try { int rFlags = PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , APP1_CERT1 , rFlags , false , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_UNSPECIFIED ) ; } catch ( java.lang.Exception e ) { failStr ( e.getMessage ( ) ) ; } finally { if ( ip != null ) { cleanUpInstall ( ip ) ; } } }

Target:
public void testReplaceMatchMoreCertsReplaceSomeCerts ( ) { android.content.pm.PackageManagerTests.InstallParams ip = replaceCerts ( APP1_CERT1 , APP1_CERT1_CERT2 , false , true , PackageManager.INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES ) ; try { int rFlags = android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , APP1_CERT1 , rFlags , false , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_UNSPECIFIED ) ; } catch ( java.lang.Exception e ) { failStr ( e.getMessage ( ) ) ; } finally { if ( ip != null ) { cleanUpInstall ( ip ) ; } } }
Source:
public boolean registerRemoteController ( android.media.IRemoteControlDisplay rcd , int w , int h , android.content.ComponentName listenerComp ) { return mMediaFocusControl.registerRemoteController ( rcd , w , h , listenerComp ) ; }

Target:
private void sendEncodedSurroundMode ( int encodedSurroundMode ) { int forceSetting = android.media.AudioSystem.NUM_FORCE_CONFIG ; switch ( encodedSurroundMode ) { case Settings.Global.ENCODED_SURROUND_OUTPUT_AUTO : forceSetting = android.media.AudioSystem.FORCE_NONE ; break ; case Settings.Global.ENCODED_SURROUND_OUTPUT_NEVER : forceSetting = android.media.AudioSystem.FORCE_ENCODED_SURROUND_NEVER ; break ; case Settings.Global.ENCODED_SURROUND_OUTPUT_ALWAYS : forceSetting = android.media.AudioSystem.FORCE_ENCODED_SURROUND_ALWAYS ; break ; default : android.util.Log.e ( com.android.server.audio.AudioService.TAG , ( "updateSurroundSoundSettings: illegal value " + encodedSurroundMode ) ) ; break ; } if ( forceSetting != ( android.media.AudioSystem.NUM_FORCE_CONFIG ) ) { com.android.server.audio.AudioService.sendMsg ( mAudioHandler , com.android.server.audio.AudioService.MSG_SET_FORCE_USE , com.android.server.audio.AudioService.SENDMSG_QUEUE , AudioSystem.FOR_ENCODED_SURROUND , forceSetting , null , 0 ) ; } }
Source:
private void reinitialize ( ) { android.telecom.CallAudioState initState = getInitialAudioState ( ) ; mAvailableRoutes = initState.getSupportedRouteMask ( ) ; mIsMuted = initState.isMuted ( ) ; setMuteOn ( mIsMuted ) ; mWasOnSpeaker = false ; mHasUserExplicitlyLeftBluetooth = false ; mLastKnownCallAudioState = initState ; transitionTo ( mRouteCodeToQuiescentState.get ( initState.getRoute ( ) ) ) ; }

Target:
private void reinitialize ( ) { android.telecom.CallAudioState initState = getInitialAudioState ( ) ; mDeviceSupportedRoutes = initState.getSupportedRouteMask ( ) ; mAvailableRoutes = ( mDeviceSupportedRoutes ) & ( getCurrentCallSupportedRoutes ( ) ) ; mIsMuted = initState.isMuted ( ) ; setMuteOn ( mIsMuted ) ; mWasOnSpeaker = false ; mHasUserExplicitlyLeftBluetooth = false ; mLastKnownCallAudioState = initState ; transitionTo ( mRouteCodeToQuiescentState.get ( initState.getRoute ( ) ) ) ; }
Source:
public void addSession ( com.android.server.wifi.nan.WifiNanDiscoverySessionState session ) { int sessionId = session.getSessionId ( ) ; if ( ( mSessions.get ( sessionId ) ) != null ) { android.util.Log.w ( com.android.server.wifi.nan.WifiNanClientState.TAG , ( "createSession: sessionId already exists (replaced) - " + sessionId ) ) ; } mSessions.put ( sessionId , session ) ; }

Target:
public void addSession ( com.android.server.wifi.aware.WifiAwareDiscoverySessionState session ) { int sessionId = session.getSessionId ( ) ; if ( ( mSessions.get ( sessionId ) ) != null ) { android.util.Log.w ( com.android.server.wifi.aware.WifiAwareClientState.TAG , ( "createSession: sessionId already exists (replaced) - " + sessionId ) ) ; } mSessions.put ( sessionId , session ) ; }
Source:
public android.net.IpSecTransform.Builder setSpi ( @ android.net.IpSecTransform.TransformDirection int direction , android.net.IpSecManager.SecurityParameterIndex spi ) { if ( ( spi.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid SecurityParameterIndex" ) ; } mConfig.setSpiResourceId ( direction , spi.getResourceId ( ) ) ; return this ; }

Target:
public android.net.IpSecTransform.Builder setAuthenticatedEncryption ( @ android.annotation.NonNull android.net.IpSecAlgorithm algo ) { com.android.internal.util.Preconditions.checkNotNull ( algo ) ; mConfig.setAuthenticatedEncryption ( algo ) ; return this ; }
Source:
public void visitMethod ( com.intellij.psi.PsiMethod psiMethod ) { if ( ! ( isEndpointClass ( psiMethod ) ) ) { return ; } if ( hasTransformer ( psiMethod ) ) { return ; } if ( ! ( isApiMethod ( psiMethod ) ) ) { return ; } com.intellij.psi.PsiParameterList parameterList = psiMethod.getParameterList ( ) ; java.util.Map < java.lang.String , com.intellij.psi.PsiParameter > methodNames = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.intellij.psi.PsiParameter aParameter : parameterList.getParameters ( ) ) { validateMethodNameUnique ( aParameter , methodNames ) ; } }

Target:
public void visitMethod ( com.intellij.psi.PsiMethod psiMethod ) { if ( ! ( com.google.gct.idea.appengine.util.EndpointUtilities.isEndpointClass ( psiMethod ) ) ) { return ; } if ( hasTransformer ( psiMethod ) ) { return ; } if ( ! ( com.google.gct.idea.appengine.util.EndpointUtilities.isApiMethod ( psiMethod ) ) ) { return ; } com.intellij.psi.PsiParameterList parameterList = psiMethod.getParameterList ( ) ; java.util.Map < java.lang.String , com.intellij.psi.PsiParameter > methodNames = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.intellij.psi.PsiParameter aParameter : parameterList.getParameters ( ) ) { validateMethodNameUnique ( aParameter , methodNames ) ; } }
Source:
static com.android.builder.model.ProductFlavorContainer createProductFlavorContainer ( @ com.android.annotations.NonNull com.android.build.gradle.internal.ProductFlavorData productFlavorData , @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SourceProviderContainer > sourceProviderContainers ) { java.util.List < com.android.builder.model.SourceProviderContainer > clonedContainer = com.android.build.gradle.internal.model.SourceProviderContainerImpl.cloneCollection ( sourceProviderContainers ) ; for ( com.android.builder.core.VariantType variantType : com.android.builder.core.VariantType.getTestingTypes ( ) ) { clonedContainer.add ( com.android.build.gradle.internal.model.SourceProviderContainerImpl.create ( variantType.getArtifactName ( ) , productFlavorData.getTestSourceSet ( variantType ) ) ) ; } return new com.android.build.gradle.internal.model.ProductFlavorContainerImpl ( com.android.build.gradle.internal.model.ProductFlavorImpl.cloneFlavor ( productFlavorData.getProductFlavor ( ) , null , null ) , com.android.build.gradle.internal.model.SourceProviderImpl.cloneProvider ( productFlavorData.getSourceSet ( ) ) , clonedContainer ) ; }

Target:
static com.android.builder.model.ProductFlavorContainer createProductFlavorContainer ( @ com.android.annotations.NonNull com.android.build.gradle.internal.ProductFlavorData productFlavorData , @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SourceProviderContainer > sourceProviderContainers ) { java.util.List < com.android.builder.model.SourceProviderContainer > clonedContainers = com.android.build.gradle.internal.model.SourceProviderContainerImpl.cloneCollection ( sourceProviderContainers ) ; for ( com.android.builder.core.VariantType variantType : com.android.builder.core.VariantType.getTestingTypes ( ) ) { clonedContainers.add ( com.android.build.gradle.internal.model.SourceProviderContainerImpl.create ( variantType.getArtifactName ( ) , productFlavorData.getTestSourceSet ( variantType ) ) ) ; } return new com.android.build.gradle.internal.model.ProductFlavorContainerImpl ( com.android.build.gradle.internal.model.ProductFlavorImpl.cloneFlavor ( productFlavorData.getProductFlavor ( ) , null , null ) , com.android.build.gradle.internal.model.SourceProviderImpl.cloneProvider ( productFlavorData.getSourceSet ( ) ) , clonedContainers ) ; }
Source:
public boolean matches ( java.lang.String fullIMSI ) { if ( mPrefix ) { return mImsi.regionMatches ( false , 0 , fullIMSI , 0 , mImsi.length ( ) ) ; } else { return mImsi.equals ( fullIMSI ) ; } }

Target:
public boolean matchesImsi ( java.lang.String fullIMSI ) { if ( fullIMSI == null ) { return false ; } if ( mPrefix ) { return mImsi.regionMatches ( false , 0 , fullIMSI , 0 , mImsi.length ( ) ) ; } else { return mImsi.equals ( fullIMSI ) ; } }
Source:
private java.lang.String cameraFormatForPixelFormat ( int pixel_format ) { switch ( pixel_format ) { case android.graphics.ImageFormat.NV16 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422SP ; case android.graphics.ImageFormat.NV21 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV420SP ; case android.graphics.ImageFormat.YUY2 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422I ; case android.graphics.ImageFormat.RGB_565 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_RGB565 ; case android.graphics.ImageFormat.JPEG : return android.hardware.Camera.Parameters.PIXEL_FORMAT_JPEG ; default : return null ; } }

Target:
private java.lang.String cameraFormatForPixelFormat ( int pixel_format ) { switch ( pixel_format ) { case android.graphics.ImageFormat.NV16 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422SP ; case android.graphics.ImageFormat.NV21 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV420SP ; case android.graphics.ImageFormat.YUY2 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV422I ; case android.graphics.ImageFormat.YV12 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_YUV420P ; case android.graphics.ImageFormat.RGB_565 : return android.hardware.Camera.Parameters.PIXEL_FORMAT_RGB565 ; case android.graphics.ImageFormat.JPEG : return android.hardware.Camera.Parameters.PIXEL_FORMAT_JPEG ; case android.graphics.ImageFormat.BAYER_RGGB : return android.hardware.Camera.Parameters.PIXEL_FORMAT_BAYER_RGGB ; default : return null ; } }
Source:
public void enter ( ) { setWifiState ( android.net.wifi.WifiManager.WIFI_STATE_ENABLED ) ; mNetworkInfo.setIsAvailable ( true ) ; if ( ( mNetworkAgent ) != null ) mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; setNetworkDetailedState ( DetailedState.DISCONNECTED ) ; mWifiConnectivityManager.setWifiEnabled ( true ) ; mWifiMetrics.setWifiState ( WifiMetricsProto.WifiLog.WIFI_DISCONNECTED ) ; p2pSendMessage ( com.android.server.wifi.WifiStateMachine.CMD_ENABLE_P2P ) ; }

Target:
public void enter ( ) { if ( ! ( mWifiNative.removeAllNetworks ( ) ) ) { loge ( "Failed to remove networks on entering connect mode" ) ; } setWifiState ( android.net.wifi.WifiManager.WIFI_STATE_ENABLED ) ; mNetworkInfo.setIsAvailable ( true ) ; if ( ( mNetworkAgent ) != null ) mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; setNetworkDetailedState ( DetailedState.DISCONNECTED ) ; mWifiConnectivityManager.setWifiEnabled ( true ) ; mWifiMetrics.setWifiState ( WifiMetricsProto.WifiLog.WIFI_DISCONNECTED ) ; p2pSendMessage ( com.android.server.wifi.WifiStateMachine.CMD_ENABLE_P2P ) ; }
Source:
public java.util.List < com.android.tv.dvr.ScheduledRecording > getScheduledRecordings ( java.lang.String inputId ) { java.util.List < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( android.text.TextUtils.equals ( r.getInputId ( ) , inputId ) ) { result.add ( r ) ; } } return result ; }

Target:
public java.util.List < com.android.tv.dvr.data.ScheduledRecording > getScheduledRecordings ( android.util.Range < java.lang.Long > period , @ com.android.tv.dvr.data.ScheduledRecording.RecordingState int state ) { java.util.List < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( ( r.isOverLapping ( period ) ) && ( ( r.getState ( ) ) == state ) ) { result.add ( r ) ; } } return result ; }
Source:
public void validateCertCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; cred.clientCertificateChain = new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } ; cred.clientPrivateKey = android.net.wifi.FakeKeys.RSA_KEY1 ; org.junit.Assert.assertTrue ( cred.validate ( ) ) ; }

Target:
public void validateCertCredential ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithCertificateCredential ( ) ; org.junit.Assert.assertTrue ( cred.validate ( ) ) ; }
Source:
private boolean sendDeviceListMonitoringRequest ( ) throws com.android.ddmlib.TimeoutException , java.io.IOException { byte [ ] request = com.android.ddmlib.AdbHelper.formAdbRequest ( "host:track-devices" ) ; try { com.android.ddmlib.AdbHelper.write ( mMainAdbConnection , request ) ; com.android.ddmlib.AdbHelper.AdbResponse resp = com.android.ddmlib.AdbHelper.readAdbResponse ( mMainAdbConnection , false ) ; if ( ! ( resp.okay ) ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , ( "adb refused request: " + ( resp.message ) ) ) ; } return resp.okay ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , "Sending Tracking request failed!" ) ; mMainAdbConnection.close ( ) ; throw e ; } }

Target:
private boolean sendDeviceListMonitoringRequest ( ) throws com.android.ddmlib.TimeoutException , java.io.IOException { byte [ ] request = com.android.ddmlib.AdbHelper.formAdbRequest ( com.android.ddmlib.DeviceMonitor.ADB_TRACK_DEVICES_COMMAND ) ; try { com.android.ddmlib.AdbHelper.write ( mMainAdbConnection , request ) ; com.android.ddmlib.AdbHelper.AdbResponse resp = com.android.ddmlib.AdbHelper.readAdbResponse ( mMainAdbConnection , false ) ; if ( ! ( resp.okay ) ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , ( "adb refused request: " + ( resp.message ) ) ) ; } return resp.okay ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.e ( "DeviceMonitor" , "Sending Tracking request failed!" ) ; mMainAdbConnection.close ( ) ; throw e ; } }
Source:
public static int forkSystemServer ( int uid , int gid , int [ ] gids , int runtimeFlags , int [ ] [ ] rlimits , long permittedCapabilities , long effectiveCapabilities ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; com.android.internal.os.Zygote.resetNicePriority ( ) ; int pid = com.android.internal.os.Zygote.nativeForkSystemServer ( uid , gid , gids , runtimeFlags , rlimits , permittedCapabilities , effectiveCapabilities ) ; if ( pid == 0 ) { android.os.Trace.setTracingEnabled ( true , runtimeFlags ) ; } com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }

Target:
public static int forkSystemServer ( int uid , int gid , int [ ] gids , int runtimeFlags , int [ ] [ ] rlimits , long permittedCapabilities , long effectiveCapabilities ) { runtimeFlags |= com.android.internal.os.Zygote.DISABLE_HIDDEN_API_CHECKS ; com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; com.android.internal.os.Zygote.resetNicePriority ( ) ; int pid = com.android.internal.os.Zygote.nativeForkSystemServer ( uid , gid , gids , runtimeFlags , rlimits , permittedCapabilities , effectiveCapabilities ) ; if ( pid == 0 ) { android.os.Trace.setTracingEnabled ( true , runtimeFlags ) ; } com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }
Source:
public static void atraceDumpAndSend ( android.content.Context context , java.lang.String tags , int bufferSizeKb ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; java.io.File file = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , file ) ; com.android.traceur.AtraceUtils.atraceDump ( tags , bufferSizeKb , file ) ; com.android.traceur.FileSender.postNotification ( context , file ) ; }

Target:
protected java.lang.Void doInBackground ( java.lang.Void ... params ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; java.io.File file = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , file ) ; com.android.traceur.AtraceUtils.atraceDump ( file ) ; com.android.traceur.FileSender.postNotification ( context , file ) ; return null ; }
Source:
public void testRegistrationCallbackGetRegistrationTechDisconnected ( ) throws android.os.RemoteException { com.android.ims.ImsReasonInfo info = new com.android.ims.ImsReasonInfo ( com.android.ims.ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; junit.framework.Assert.assertEquals ( ImsRegistrationImplBase.REGISTRATION_TECH_NONE , mRegBinder.getRegistrationTechnology ( ) ) ; }

Target:
public void testRegistrationCallbackSendCurrentStateDisconnected ( ) throws android.os.RemoteException { com.android.ims.ImsReasonInfo info = new com.android.ims.ImsReasonInfo ( com.android.ims.ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; mRegBinder.addRegistrationCallback ( mCallback2 ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; org.mockito.Mockito.verify ( mCallback2 ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; }
Source:
public void onChange ( boolean selfChange , android.net.Uri uri ) { if ( com.android.internal.telephony.CarrierIdentifier.CONTENT_URL_PREFER_APN.equals ( uri.getLastPathSegment ( ) ) ) { com.android.internal.telephony.CarrierIdentifier.logd ( ( "onChange URI: " + uri ) ) ; sendEmptyMessage ( com.android.internal.telephony.CarrierIdentifier.PREFER_APN_UPDATE_EVENT ) ; } else if ( CarrierIdentification.All.CONTENT_URI.equals ( uri ) ) { com.android.internal.telephony.CarrierIdentifier.logd ( ( "onChange URI: " + uri ) ) ; sendEmptyMessage ( com.android.internal.telephony.CarrierIdentifier.CARRIER_ID_DB_UPDATE_EVENT ) ; } }

Target:
public void onChange ( boolean selfChange , android.net.Uri uri ) { if ( com.android.internal.telephony.CarrierIdentifier.CONTENT_URL_PREFER_APN.equals ( uri.getLastPathSegment ( ) ) ) { com.android.internal.telephony.CarrierIdentifier.logd ( ( "onChange URI: " + uri ) ) ; sendEmptyMessage ( com.android.internal.telephony.CarrierIdentifier.PREFER_APN_UPDATE_EVENT ) ; } else if ( CarrierId.All.CONTENT_URI.equals ( uri ) ) { com.android.internal.telephony.CarrierIdentifier.logd ( ( "onChange URI: " + uri ) ) ; sendEmptyMessage ( com.android.internal.telephony.CarrierIdentifier.CARRIER_ID_DB_UPDATE_EVENT ) ; } }
Source:
private java.net.URL addFileEntry ( java.lang.String filePath , byte [ ] fileContents ) { org.mockftpserver.fake.filesystem.FileEntry fileEntry = new org.mockftpserver.fake.filesystem.FileEntry ( ( ( ( libcore.java.net.FtpURLConnectionTest.USER_HOME_DIR ) + "/" ) + filePath ) ) ; fileEntry.setContents ( fileContents ) ; fileSystem.add ( fileEntry ) ; java.lang.String urlString = getFileUrlString ( filePath ) ; try { return new java.net.URL ( urlString ) ; } catch ( java.net.MalformedURLException e ) { fail ( ( "Malformed URL: " + urlString ) ) ; throw new java.lang.AssertionError ( "Can never happen" ) ; } }

Target:
private java.net.URL getFileUrlWithCredentials ( java.lang.String user , java.lang.String password , java.lang.String filePath ) { java.util.Objects.requireNonNull ( user ) ; java.util.Objects.requireNonNull ( filePath ) ; int serverPort = fakeFtpServer.getServerControlPort ( ) ; java.lang.String credentials = user + ( password == null ? "" : ":" + password ) ; java.lang.String urlString = java.lang.String.format ( java.util.Locale.US , "ftp://%s@%s:%s/%s" , credentials , libcore.java.net.FtpURLConnectionTest.SERVER_HOSTNAME , serverPort , filePath ) ; try { return new java.net.URL ( urlString ) ; } catch ( java.net.MalformedURLException e ) { fail ( ( "Malformed URL: " + urlString ) ) ; throw new java.lang.AssertionError ( "Can never happen" ) ; } }
Source:
public void wifiNanDestroyAll ( ) { synchronized ( mLock ) { for ( int i = 0 ; i < ( mSessions.size ( ) ) ; ++ i ) { mSessions.valueAt ( i ) . destroy ( ) ; } mSessions.clear ( ) ; mDiscoverySessions.clear ( ) ; mMessageStartTime.clear ( ) ; } }

Target:
public void wifiAwareDestroyAll ( ) { synchronized ( mLock ) { for ( int i = 0 ; i < ( mSessions.size ( ) ) ; ++ i ) { mSessions.valueAt ( i ) . destroy ( ) ; } mSessions.clear ( ) ; mDiscoverySessions.clear ( ) ; mMessageStartTime.clear ( ) ; } }
Source:
com.android.dx.ssa.back.RegisterSpecList ssaSetToSpecs ( com.android.dx.util.IntSet ssaSet ) { com.android.dx.ssa.back.RegisterSpecList result = new com.android.dx.ssa.back.RegisterSpecList ( ssaSet.elements ( ) ) ; com.android.dx.util.IntIterator iter = ssaSet.iterator ( ) ; int i = 0 ; while ( iter.hasNext ( ) ) { result.set ( ( i ++ ) , getDefinitionSpecForSsaReg ( iter.next ( ) ) ) ; } return result ; }

Target:
com.android.dx.rop.code.RegisterSpecList ssaSetToSpecs ( com.android.dx.util.IntSet ssaSet ) { com.android.dx.rop.code.RegisterSpecList result = new com.android.dx.rop.code.RegisterSpecList ( ssaSet.elements ( ) ) ; com.android.dx.util.IntIterator iter = ssaSet.iterator ( ) ; int i = 0 ; while ( iter.hasNext ( ) ) { result.set ( ( i ++ ) , getDefinitionSpecForSsaReg ( iter.next ( ) ) ) ; } return result ; }
Source:
public void setUp ( ) { mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( java.lang.Exception e ) { fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }

Target:
public void setUp ( ) { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; mAccount = new android.accounts.Account ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_ACCOUNT_NAME , mTargetContext.getString ( com.android.bluetooth.R.string.pbap_account_type ) ) ; try { mTestResources = mTargetContext.getPackageManager ( ) . getResourcesForApplication ( com.android.bluetooth.pbapclient.PbapParserTest.TEST_PACKAGE_NAME ) ; } catch ( android.content.pm.PackageManager e ) { org.junit.Assert.fail ( ( "Setup Failure Unable to get resources" + ( e.toString ( ) ) ) ) ; } cleanupCallLog ( ) ; }
Source:
private static com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadataCollection loadMetadataAndCloseInput ( java.io.ObjectInputStream source ) { final int MULTI_FILE_BUFFER_SIZE = 16 * 1024 ; com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadataCollection metadataCollection = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadataCollection ( ) ; try { metadataCollection.mergeFrom ( com.google.i18n.phonenumbers.MetadataManager.convertStreamToByteBuffer ( source , MULTI_FILE_BUFFER_SIZE ) ) ; } catch ( java.io.IOException e ) { com.google.i18n.phonenumbers.MultiFileMetadataSourceImpl.logger.log ( java.util.logging.Level.WARNING , "error reading input (ignored)" , e ) ; } finally { try { source.close ( ) ; } catch ( java.io.IOException e ) { com.google.i18n.phonenumbers.MultiFileMetadataSourceImpl.logger.log ( java.util.logging.Level.WARNING , "error closing input stream (ignored)" , e ) ; } } return metadataCollection ; }

Target:
private static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection loadMetadataAndCloseInput ( java.io.ObjectInputStream source ) { com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection metadataCollection = new com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection ( ) ; try { metadataCollection.readExternal ( source ) ; } catch ( java.io.IOException e ) { com.google.i18n.phonenumbers.MultiFileMetadataSourceImpl.logger.log ( java.util.logging.Level.WARNING , "error reading input (ignored)" , e ) ; } finally { try { source.close ( ) ; } catch ( java.io.IOException e ) { com.google.i18n.phonenumbers.MultiFileMetadataSourceImpl.logger.log ( java.util.logging.Level.WARNING , "error closing input stream (ignored)" , e ) ; } } return metadataCollection ; }
Source:
private void showProfileStatus ( ) { if ( ( mSelectedProfile ) != null ) { mProfileNameTx.setText ( mSelectedProfile.getName ( ) ) ; mProfileDescriptionTx.setText ( mSelectedProfile.getDescription ( ) ) ; } else { mProfileNameTx.setText ( "" ) ; mProfileDescriptionTx.setText ( "" ) ; } }

Target:
private void showProfileStatus ( ) { if ( com.android.cts.verifier.audio.USBAudioPeripheralActivity.DEBUG ) { android.util.Log.d ( com.android.cts.verifier.audio.USBAudioPeripheralActivity.TAG , ( "showProfileStatus()" + ( ( mSelectedProfile ) != null ) ) ) ; } if ( ( mSelectedProfile ) != null ) { mProfileNameTx.setText ( mSelectedProfile.getName ( ) ) ; mProfileDescriptionTx.setText ( mSelectedProfile.getDescription ( ) ) ; } else { mProfileNameTx.setText ( "" ) ; mProfileDescriptionTx.setText ( "" ) ; } }
Source:
public static void initLogging ( android.content.Context context ) { android.telecom.Log.setTag ( com.android.server.telecom.LogUtils.TAG ) ; android.telecom.Log.setSessionContext ( context ) ; android.telecom.Log.initMd5Sum ( ) ; for ( android.telecom.Logging.EventManager.TimedEventPair p : com.android.server.telecom.LogUtils.Events.Timings.sTimedEvents ) { android.telecom.Log.addRequestResponsePair ( p ) ; } }

Target:
public static void initLogging ( android.content.Context context ) { android.telecom.Log.setTag ( com.android.server.telecom.LogUtils.TAG ) ; android.telecom.Log.setSessionContext ( context ) ; android.telecom.Log.initMd5Sum ( ) ; for ( android.telecom.Logging.EventManager.TimedEventPair p : com.android.server.telecom.LogUtils.Events.Timings.sTimedEvents ) { android.telecom.Log.addRequestResponsePair ( p ) ; } android.telecom.Log.registerEventListener ( com.android.server.telecom.LogUtils :: eventRecordAdded ) ; android.telecom.Log.registerSessionListener ( Analytics :: addSessionTiming ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_rstime s = new com.android.rs.test.ScriptC_rstime ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.setTimeZone ( "America/Los_Angeles" ) ; s.invoke_test_rstime ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_rstime s = new com.android.rs.test.ScriptC_rstime ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.setTimeZone ( "America/Los_Angeles" ) ; s.invoke_test_rstime ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
public void testGetActivities ( ) { assertEquals ( 1 , mManifestTestApp.getActivities ( ) . length ) ; com.android.sdklib.xml.AndroidManifestParser.Activity activity = mManifestTestApp.getActivities ( ) [ 0 ] ; assertEquals ( com.android.ide.eclipse.adt.internal.project.AndroidManifestParserTest.ACTIVITY_NAME , activity.getName ( ) ) ; assertTrue ( activity.hasAction ( ) ) ; assertTrue ( activity.isHomeActivity ( ) ) ; assertTrue ( activity.hasAction ( ) ) ; assertEquals ( activity , mManifestTestApp.getActivities ( ) [ 0 ] ) ; }

Target:
public void testMinSdkVersion ( ) { assertEquals ( "7" , mManifestTestApp.getApiLevelRequirement ( ) ) ; }
Source:
public void setUp ( ) { java.util.Set names = java.nio.charset.Charset.availableCharsets ( ) . keySet ( ) ; for ( java.util.Iterator nameItr = names.iterator ( ) ; nameItr.hasNext ( ) ; ) { java.lang.String name = ( ( java.lang.String ) ( nameItr.next ( ) ) ) ; if ( name.toLowerCase ( ) . startsWith ( "x-" ) ) unknownRegisteredCharsets.add ( name ) ; else knownRegisteredCharsets.add ( name ) ; } }

Target:
public void setUp ( ) { java.util.Set names = java.nio.charset.Charset.availableCharsets ( ) . keySet ( ) ; for ( java.util.Iterator nameItr = names.iterator ( ) ; nameItr.hasNext ( ) ; ) { java.lang.String name = ( ( java.lang.String ) ( nameItr.next ( ) ) ) ; if ( name.toLowerCase ( java.util.Locale.ROOT ) . startsWith ( "x-" ) ) unknownRegisteredCharsets.add ( name ) ; else knownRegisteredCharsets.add ( name ) ; } }
Source:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }

Target:
synchronized void nScriptBindAllocation ( long script , long alloc , int slot , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptBindAllocation ( curCon , script , alloc , slot , mUseInc ) ; }
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 void unregisterForCarrierPrivilegeRulesLoaded ( android.os.Handler h ) { synchronized ( mLock ) { if ( ( mUiccProfile ) != null ) { mUiccProfile.unregisterForCarrierPrivilegeRulesLoaded ( h ) ; } else { loge ( "unregisterForCarrierPrivilegeRulesLoaded Failed!" ) ; } } }
Source:
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 ) ; } }

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 ) { android.telephony.data.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 void addObj ( android.support.v8.renderscript.BaseObj obj ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { if ( obj != null ) { mN.addObj ( obj.getNObj ( ) ) ; } else { mN.addObj ( null ) ; } return ; } if ( obj != null ) { addI32 ( obj.getID ( null ) ) ; } else { addI32 ( 0 ) ; } }

Target:
public void addF32 ( android.support.v8.renderscript.Float4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addF32 ( v ) ; return ; } addF32 ( v.x ) ; addF32 ( v.y ) ; addF32 ( v.z ) ; addF32 ( v.w ) ; }
Source:
public void testCheckReadPhoneState_hasPermissionWithoutAppOp ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertFalse ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneState_hasPermissionWithoutAppOp ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_PHONE_STATE , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.junit.Assert.assertFalse ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "name" , mName ) . add ( "debuggable" , mDebuggable ) . add ( "jniDebugBuild" , mJniDebugBuild ) . add ( "renderscriptDebugBuild" , mRenderscriptDebugBuild ) . add ( "renderscriptOptimLevel" , mRenderscriptOptimLevel ) . add ( "packageNameSuffix" , mPackageNameSuffix ) . add ( "versionNameSuffix" , mVersionNameSuffix ) . add ( "runProguard" , mRunProguard ) . add ( "zipAlign" , mZipAlign ) . add ( "signingConfig" , mSigningConfig ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "name" , mName ) . add ( "debuggable" , mDebuggable ) . add ( "testCoverageEnabled" , mTestCoverageEnabled ) . add ( "jniDebugBuild" , mJniDebugBuild ) . add ( "renderscriptDebugBuild" , mRenderscriptDebugBuild ) . add ( "renderscriptOptimLevel" , mRenderscriptOptimLevel ) . add ( "packageNameSuffix" , mPackageNameSuffix ) . add ( "versionNameSuffix" , mVersionNameSuffix ) . add ( "runProguard" , mRunProguard ) . add ( "zipAlign" , mZipAlign ) . add ( "signingConfig" , mSigningConfig ) . toString ( ) ; }
Source:
public boolean clearNetworkCandidateScanResult ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( "Clear network candidate scan result for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( null ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( java.lang.Integer.MIN_VALUE ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( false ) ; return true ; }

Target:
public boolean clearNetworkCandidateScanResult ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Clear network candidate scan result for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( null ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( java.lang.Integer.MIN_VALUE ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( false ) ; return true ; }
Source:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiNanNative.NAN_TERMINATED_REASON_FAILURE ) ; com.android.server.wifi.nan.WifiNanHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onSessionTerminatedNotification ( subscribeId , WifiNanDiscoverySessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_TERMINATED_REASON_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( subscribeId , WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
private static byte [ ] mergeLibraryDexBuffers ( byte [ ] outArray ) throws java.io.IOException { for ( byte [ ] libraryDexBuffer : com.android.dx.command.dexer.Main.libraryDexBuffers ) { if ( outArray == null ) { outArray = libraryDexBuffer ; continue ; } com.android.dx.io.DexBuffer a = new com.android.dx.io.DexBuffer ( outArray ) ; com.android.dx.io.DexBuffer b = new com.android.dx.io.DexBuffer ( libraryDexBuffer ) ; com.android.dx.io.DexBuffer ab = new com.android.dx.merge.DexMerger ( a , b , com.android.dx.merge.CollisionPolicy.FAIL ) . merge ( ) ; outArray = ab.getBytes ( ) ; } return outArray ; }

Target:
private static byte [ ] mergeLibraryDexBuffers ( byte [ ] outArray ) throws java.io.IOException { for ( byte [ ] libraryDex : com.android.dx.command.dexer.Main.libraryDexBuffers ) { if ( outArray == null ) { outArray = libraryDex ; continue ; } com.android.dex.Dex a = new com.android.dex.Dex ( outArray ) ; com.android.dex.Dex b = new com.android.dex.Dex ( libraryDex ) ; com.android.dex.Dex ab = new com.android.dx.merge.DexMerger ( a , b , com.android.dx.merge.CollisionPolicy.FAIL ) . merge ( ) ; outArray = ab.getBytes ( ) ; } return outArray ; }
Source:
private void restoreDefaultAPN ( ) { android.database.sqlite.SQLiteDatabase db = mOpenHelper.getWritableDatabase ( ) ; db.delete ( com.android.providers.telephony.TelephonyProvider.CARRIERS_TABLE , null , null ) ; setPreferredApnId ( ( ( long ) ( - 1 ) ) ) ; mOpenHelper.initDatabase ( db ) ; }

Target:
private void restoreDefaultAPN ( ) { android.database.sqlite.SQLiteDatabase db = mOpenHelper.getWritableDatabase ( ) ; try { db.delete ( com.android.providers.telephony.TelephonyProvider.CARRIERS_TABLE , null , null ) ; } catch ( android.database.SQLException e ) { android.util.Log.e ( com.android.providers.telephony.TelephonyProvider.TAG , ( "got exception when deleting to restore: " + e ) ) ; } setPreferredApnId ( ( ( long ) ( - 1 ) ) ) ; mOpenHelper.initDatabase ( db ) ; }
Source:
public static void wtf ( java.lang.String prefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { android.util.Log.wtf ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) , tr ) ; }

Target:
public static void e ( java.lang.Object objectPrefix , java.lang.Throwable tr , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.ERROR ) { android.util.Slog.e ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) , tr ) ; } }
Source:
private void loadViewServerInfoAndWindows ( final com.android.ddmlib.IDevice device ) { executeInBackground ( new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.device.DeviceBridge.ViewServerInfo viewServerInfo = com.android.hierarchyviewerlib.device.DeviceBridge.loadViewServerInfo ( device ) ; if ( viewServerInfo == null ) { return ; } com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.ComponentRegistry.getDeviceSelectionModel ( ) . addDevice ( device , windows ) ; if ( ( viewServerInfo.protocolVersion ) >= 3 ) { com.android.hierarchyviewerlib.device.WindowUpdater.startListenForWindowChanges ( com.android.hierarchyviewerlib.HierarchyViewerDirector.this , device ) ; focusChanged ( device ) ; } } } ) ; }

Target:
public static com.android.hierarchyviewerlib.HierarchyViewerDirector getDirector ( ) { return com.android.hierarchyviewerlib.HierarchyViewerDirector.director ; }
Source:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon2 , "tock tock tock" , java.lang.System.currentTimeMillis ( ) ) ; n.setLatestEventInfo ( this , "Persistent #2" , "Notify me!!!" , makeIntent ( ) ) ; n.defaults = android.app.Notification.DEFAULT_VIBRATE ; mNM.notify ( 2 , n ) ; }

Target:
public void run ( ) { android.app.Notification n = new android.app.Notification ( R.drawable.icon1 , "tick tick tick" , java.lang.System.currentTimeMillis ( ) ) ; n.setLatestEventInfo ( this , "Persistent #1" , "This is a notification!!!" , makeIntent ( ) ) ; mNM.notify ( 1 , n ) ; }
Source:
public int indexOf ( E e , int index ) { java.lang.Object [ ] elements = getArray ( ) ; return java.util.concurrent.CopyOnWriteArrayList.indexOf ( e , elements , index , elements.length ) ; }

Target:
public java.util.ListIterator < E > listIterator ( int index ) { java.lang.Object [ ] snapshot = elements ; if ( ( index < 0 ) || ( index > ( snapshot.length ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "index=" + index ) + ", length=" ) + ( snapshot.length ) ) ) ; } java.util.concurrent.CopyOnWriteArrayList.CowIterator < E > result = new java.util.concurrent.CopyOnWriteArrayList.CowIterator < E > ( snapshot , 0 , snapshot.length ) ; result.index = index ; return result ; }
Source:
public boolean isModified ( ) { return ( myServiceDirectoryPathModifiedByUser ) && ( ! ( com.intellij.openapi.util.Comparing.equal ( com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.normalizePath ( myServiceDirectoryPathField.getText ( ) ) , com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.normalizePath ( myInitialSettings.getServiceDirectoryPath ( ) ) ) ) ) ; }

Target:
public boolean isModified ( ) { return ( ( myServiceDirectoryPathModifiedByUser ) && ( ! ( com.intellij.openapi.util.Comparing.equal ( com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.normalizePath ( myServiceDirectoryPathField.getText ( ) ) , com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.normalizePath ( myInitialSettings.getServiceDirectoryPath ( ) ) ) ) ) ) || ( ! ( com.intellij.openapi.util.Comparing.equal ( org.jetbrains.plugins.gradle.service.settings.GradleSystemSettingsControl.trimIfPossible ( myGradleVmOptionsField.getText ( ) ) , org.jetbrains.plugins.gradle.service.settings.GradleSystemSettingsControl.trimIfPossible ( myInitialSettings.getGradleVmOptions ( ) ) ) ) ) ; }
Source:
public void blackListBssid ( java.lang.String bssid , java.lang.String [ ] bssidList ) { if ( mVerboseLoggingEnabled ) localLog ( ( "blackListBssid: " + bssid ) ) ; mWifiNative.addToBlacklist ( bssid ) ; mWifiNative.setBssidBlacklist ( bssidList ) ; }

Target:
public boolean setConfiguredNetworkBSSID ( java.lang.String bssid ) { if ( mVerboseLoggingEnabled ) localLog ( ( "setConfiguredNetworkBSSID: " + ( mSupplicantNetworkId ) ) ) ; if ( ! ( mWifiNative.setNetworkVariable ( mSupplicantNetworkId , WifiConfiguration.bssidVarName , bssid ) ) ) { loge ( ( "Set BSSID of network in wpa_supplicant failed on " + ( mSupplicantNetworkId ) ) ) ; return false ; } return true ; }