auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addProjects ( java.io.File dir , java.util.List < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > projects ) { if ( dir.isDirectory ( ) ) { if ( com.android.tools.lint.detector.api.LintUtils.isProjectDir ( dir ) ) { projects.add ( new com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject ( dir ) ) ; } java.io.File [ ] children = dir.listFiles ( ) ; if ( children != null ) { for ( java.io.File child : children ) { addProjects ( child , projects ) ; } } } }

Target:
private java.util.List < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > searchForProjects ( java.io.File dir ) { java.util.List < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > projects = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.wizards.newproject.ImportedProject > ( ) ; addProjects ( dir , projects , ( ( dir.getPath ( ) . length ( ) ) + 1 ) ) ; return projects ; }
Source:
static android.content.Intent intentForActivity ( android.content.pm.ResolveInfo app ) { final android.content.ComponentName component = new android.content.ComponentName ( app.activityInfo.packageName , app.activityInfo.name ) ; final android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_MAIN ) ; intent.setComponent ( component ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED ) ; return intent ; }

Target:
android.content.Intent intentForActivity ( android.content.pm.ResolveInfo app ) { final android.content.ComponentName component = new android.content.ComponentName ( app.activityInfo.packageName , app.activityInfo.name ) ; if ( ( getContext ( ) . getPackageManager ( ) . getComponentEnabledSetting ( component ) ) == ( android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ) ) { return null ; } final android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_MAIN ) ; intent.setComponent ( component ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED ) ; return intent ; }
Source:
public void setVisible ( boolean visible ) { mVisible = visible ; }

Target:
public void setVisible ( boolean visible ) { if ( visible != ( mVisible ) ) { mVisible = visible ; if ( mVisible ) { if ( ( mDirty ) != 0 ) { configurationChanged ( mDirty ) ; } else { updateForkStatus ( ) ; } } } }
Source:
protected java.util.List < com.android.tv.dvr.ScheduledRecording > getRecordingsWithState ( @ com.android.tv.dvr.ScheduledRecording.RecordingState int ... states ) { java.util.List < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : mScheduledRecordings.values ( ) ) { for ( int state : states ) { if ( ( r.getState ( ) ) == state ) { result.add ( r ) ; break ; } } } return result ; }

Target:
protected java.util.List < com.android.tv.dvr.data.ScheduledRecording > getRecordingsWithState ( @ com.android.tv.dvr.data.ScheduledRecording.RecordingState int ... states ) { java.util.List < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : mScheduledRecordings.values ( ) ) { for ( int state : states ) { if ( ( r.getState ( ) ) == state ) { result.add ( r ) ; break ; } } } return result ; }
Source:
protected void addPackage ( com.google.doclava.PackageInfo pInfo ) { mPackages.put ( pInfo.name ( ) , pInfo ) ; for ( com.google.doclava.ClassInfo cl : pInfo.allClasses ( ) . values ( ) ) { mAllClasses.put ( cl.qualifiedName ( ) , cl ) ; } }

Target:
protected void addPackage ( com.google.doclava.PackageInfo pInfo ) { pInfo.setContainingApi ( this ) ; mPackages.put ( pInfo.name ( ) , pInfo ) ; for ( com.google.doclava.ClassInfo cl : pInfo.allClasses ( ) . values ( ) ) { mAllClasses.put ( cl.qualifiedName ( ) , cl ) ; } }
Source:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 150 ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent , 150 ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; }
Source:
private void tryToGetAware ( ) { synchronized ( mLock ) { android.hardware.wifi.V1_0.IWifiNanIface iface = mHalDeviceManager.createNanIface ( mInterfaceDestroyedListener , mInterfaceAvailableForRequestListener , null ) ; if ( iface == null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Was not able to obtain an IWifiNanIface" ) ; } else { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Obtained an IWifiNanIface" ) ; mWifiNanIface = iface ; mWifiAwareStateManager.enableUsage ( ) ; } } }

Target:
private void tryToGetAware ( ) { synchronized ( mLock ) { if ( ( mWifiNanIface ) != null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Already have a NAN interface" ) ; return ; } android.hardware.wifi.V1_0.IWifiNanIface iface = mHalDeviceManager.createNanIface ( mInterfaceDestroyedListener , mInterfaceAvailableForRequestListener , null ) ; if ( iface == null ) { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Was not able to obtain an IWifiNanIface" ) ; } else { if ( com.android.server.wifi.aware.WifiAwareNativeManager.DBG ) android.util.Log.d ( com.android.server.wifi.aware.WifiAwareNativeManager.TAG , "Obtained an IWifiNanIface" ) ; mWifiNanIface = iface ; mWifiAwareStateManager.enableUsage ( ) ; } } }
Source:
private com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt ( int x , int y , com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { org.eclipse.swt.graphics.Rectangle r = canvasViewInfo.getSelectionRect ( ) ; if ( r.contains ( x , y ) ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo child : canvasViewInfo.getChildren ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo v = findViewInfoAt ( x , y , child ) ; if ( v != null ) { return v ; } } return canvasViewInfo ; } return null ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo findViewInfoAt_Recursive ( int x , int y , com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { if ( canvasViewInfo == null ) { return null ; } org.eclipse.swt.graphics.Rectangle r = canvasViewInfo.getSelectionRect ( ) ; if ( r.contains ( x , y ) ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo child : canvasViewInfo.getChildren ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo v = findViewInfoAt_Recursive ( x , y , child ) ; if ( v != null ) { return v ; } } return canvasViewInfo ; } return null ; }
Source:
public boolean removeUser ( int userId ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can remove users" ) ; if ( ( userId == 0 ) || ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) ) { return false ; } cleanUpUser ( userId ) ; if ( com.android.server.pm.PackageManagerService.sUserManager.removeUser ( userId ) ) { android.content.Intent addedIntent = new android.content.Intent ( android.content.Intent.ACTION_USER_REMOVED ) ; addedIntent.putExtra ( Intent.EXTRA_USERID , userId ) ; mContext.sendBroadcast ( addedIntent , android.Manifest.permission.MANAGE_ACCOUNTS ) ; } com.android.server.pm.PackageManagerService.sUserManager.removePackageFolders ( userId ) ; return true ; }

Target:
public void resetPreferredActivities ( int userId ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.SET_PREFERRED_APPLICATIONS , null ) ; synchronized ( mPackages ) { int user = android.os.UserHandle.getCallingUserId ( ) ; clearPackagePreferredActivitiesLPw ( null , user ) ; mSettings.readDefaultPreferredAppsLPw ( this , user ) ; mSettings.writePackageRestrictionsLPr ( user ) ; scheduleWriteSettingsLocked ( ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }
Source:
private void 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 = isDataEnabled ( ) ; if ( ( mDataEnabledSettings.isPolicyDataEnabled ( ) ) != enabled ) { mDataEnabledSettings.setPolicyDataEnabled ( enabled ) ; if ( prevEnabled != ( isDataEnabled ( ) ) ) { if ( ! prevEnabled ) { reevaluateDataConnections ( ) ; onTrySetupData ( Phone.REASON_DATA_ENABLED ) ; } else { onCleanUpAllConnections ( Phone.REASON_DATA_SPECIFIC_DISABLED ) ; } } } } }
Source:
com.google.common.cache.LocalCache.ValueReference < K , V > newValueReference ( com.google.common.cache.LocalCache.ReferenceEntry < K , V > entry , V value , int weight ) { int hash = entry.getHash ( ) ; return valueStrength.referenceValue ( segmentFor ( hash ) , entry , value , weight ) ; }

Target:
com.google.common.cache.LocalCache.ValueReference < K , V > newValueReference ( com.google.common.cache.LocalCache.ReferenceEntry < K , V > entry , V value , int weight ) { int hash = entry.getHash ( ) ; return valueStrength.referenceValue ( segmentFor ( hash ) , entry , com.google.common.base.Preconditions.checkNotNull ( value ) , weight ) ; }
Source:
public void add ( int index , long value ) { if ( ( index < 0 ) || ( index > ( mSize ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ) ; } ensureCapacity ( 1 ) ; if ( ( ( mSize ) - index ) != 0 ) { java.lang.System.arraycopy ( mValues , index , mValues , ( index + 1 ) , ( ( mSize ) - index ) ) ; } mValues [ index ] = value ; ( mSize ) ++ ; }

Target:
public void resize ( int newSize ) { com.android.internal.util.Preconditions.checkArgumentNonnegative ( newSize ) ; if ( newSize <= ( mValues.length ) ) { java.util.Arrays.fill ( mValues , newSize , mValues.length , 0 ) ; } else { ensureCapacity ( ( newSize - ( mSize ) ) ) ; } mSize = newSize ; }
Source:
public void test_getSoTimeout ( ) throws java.io.IOException { s = new java.net.ServerSocket ( 0 ) ; try { s.setSoTimeout ( 100 ) ; assertEquals ( "Returned incorrect sotimeout" , 100 , s.getSoTimeout ( ) ) ; } finally { s.close ( ) ; } }

Target:
public void test_getSoTimeout ( ) throws java.io.IOException { s = new java.net.ServerSocket ( 0 ) ; final int timeoutSet = 100 ; try { s.setSoTimeout ( timeoutSet ) ; int actualTimeout = s.getSoTimeout ( ) ; assertTrue ( "Returned incorrect sotimeout" , ( ( java.lang.Math.abs ( ( timeoutSet - actualTimeout ) ) ) <= 10 ) ) ; } finally { s.close ( ) ; } }
Source:
private boolean isStagedStatus ( java.lang.String requiredStatus , java.lang.String versionString ) { try { return ( getStagedOperationType ( ) . equals ( requiredStatus ) ) && ( getStagedInstallVersion ( ) . equals ( versionString ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.AssertionError ( "Failed to read staged status" , e ) ; } }

Target:
private boolean isStagedInstall ( java.lang.String versionString ) { try { return ( getStagedOperationType ( ) . equals ( com.android.timezone.xts.TimeZoneUpdateHostTest.STAGED_OPERATION_INSTALL ) ) && ( getStagedInstallVersion ( ) . equals ( versionString ) ) ; } catch ( java.lang.Exception e ) { throw new java.lang.AssertionError ( "Failed to read staged status" , e ) ; } }
Source:
public void testAesCbcHmacMd5Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1000 , false ) ; }
Source:
public java.lang.invoke.VarHandle unreflectVarHandle ( java.lang.reflect.Field f ) throws java.lang.IllegalAccessException { java.lang.invoke.MethodHandles.unsupported ( "MethodHandles.Lookup.unreflectVarHandle()" ) ; return null ; }

Target:
public java.lang.invoke.VarHandle unreflectVarHandle ( java.lang.reflect.Field f ) throws java.lang.IllegalAccessException { final boolean isStatic = java.lang.reflect.Modifier.isStatic ( f.getModifiers ( ) ) ; final boolean performAccessChecks = true ; commonFieldChecks ( f , f.getDeclaringClass ( ) , f.getType ( ) , isStatic , performAccessChecks ) ; return java.lang.invoke.FieldVarHandle.create ( f ) ; }
Source:
void found ( ) { mLastSeenTime = java.lang.System.currentTimeMillis ( ) ; mFound = true ; android.net.Uri printerUri = mDiscoveredPrinter.getUri ( ) ; com.android.bips.jni.LocalPrinterCapabilities capabilities = mPrintService.getCapabilitiesCache ( ) . get ( printerUri ) ; if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( ( ( "Printer " + ( mDiscoveredPrinter ) ) + " has caps=" ) + capabilities ) ) ; if ( capabilities != null ) { onCapabilities ( mDiscoveredPrinter , capabilities ) ; } else { mSession.handlePrinter ( this ) ; requestCapabilities ( ) ; } }

Target:
public void onConnectionDelayed ( boolean delayed ) { if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( "connection delayed=" + delayed ) ) ; if ( delayed ) { android.widget.Toast.makeText ( mPrintService , R.string.connect_hint_text , Toast.LENGTH_LONG ) . show ( ) ; } }
Source:
private void onDensityChange ( ) { int index = mDensity.getSelectionIndex ( ) ; if ( index != ( - 1 ) ) { mSelectedConfiguration.setPixelDensityQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ( com.android.sdklib.resources.Density.getByIndex ( index ) ) ) ; } else { mSelectedConfiguration.setPixelDensityQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ( ) ) ; } onChange ( true ) ; }

Target:
private void onDensityChange ( ) { int index = mDensity.getSelectionIndex ( ) ; if ( index != ( - 1 ) ) { mSelectedConfiguration.setPixelDensityQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ( com.android.resources.Density.getByIndex ( index ) ) ) ; } else { mSelectedConfiguration.setPixelDensityQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier ( ) ) ; } onChange ( true ) ; }
Source:
public void onResume ( ) { super . onResume ( ) ; final android.content.Intent intent = new android.content.Intent ( this , android.server.app.TestActivity.class ) ; intent.setFlags ( ( ( android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) ) ) ; final android.app.ActivityOptions options = android.app.ActivityOptions.makeBasic ( ) ; options.setLaunchBounds ( new android.graphics.Rect ( 0 , 0 , 500 , 500 ) ) ; this . startActivity ( intent , options.toBundle ( ) ) ; }

Target:
public void onResume ( ) { super . onResume ( ) ; final android.content.Intent intent = new android.content.Intent ( this , android.server.app.TestActivity.class ) ; intent.setFlags ( ( ( android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK ) | ( android.content.Intent.FLAG_ACTIVITY_NEW_TASK ) ) ) ; final android.app.ActivityOptions options = android.app.ActivityOptions.makeBasic ( ) ; options.setLaunchBounds ( new android.graphics.Rect ( 0 , 0 , 900 , 900 ) ) ; this . startActivity ( intent , options.toBundle ( ) ) ; }
Source:
private int getUrlChoice ( ) { if ( useProd.isSelected ( ) ) { return 0 ; } if ( useStaging.isSelected ( ) ) { return 1 ; } if ( useTest.isSelected ( ) ) { return 2 ; } if ( useCustom.isSelected ( ) ) { return 3 ; } throw new java.lang.RuntimeException ( "No URL option is selected!" ) ; }

Target:
private java.lang.String getToolResultsBackendUrl ( ) { switch ( getBackendOption ( ) ) { case STAGING : return "https://www-googleapis-staging.sandbox.google.com/" ; case TEST : return "https://www-googleapis-test.sandbox.google.com/" ; default : return "https://www.googleapis.com/" ; } }
Source:
public int getDownloadStatus ( android.telephony.mbms.DownloadRequest downloadRequest , android.telephony.mbms.FileInfo fileInfo ) { android.telephony.mbms.vendor.IMbmsDownloadService downloadService = mService.get ( ) ; if ( downloadService == null ) { throw new java.lang.IllegalStateException ( "Middleware not yet bound" ) ; } try { return downloadService.getDownloadStatus ( downloadRequest , fileInfo ) ; } catch ( android.os.RemoteException e ) { mService.set ( null ) ; sendErrorToApp ( MbmsErrors.ERROR_MIDDLEWARE_LOST , null ) ; return android.telephony.MbmsDownloadSession.STATUS_UNKNOWN ; } }

Target:
public int getDownloadStatus ( android.telephony.mbms.DownloadRequest downloadRequest , android.telephony.mbms.FileInfo fileInfo ) { android.telephony.mbms.vendor.IMbmsDownloadService downloadService = mService.get ( ) ; if ( downloadService == null ) { throw new java.lang.IllegalStateException ( "Middleware not yet bound" ) ; } try { return downloadService.getDownloadStatus ( downloadRequest , fileInfo ) ; } catch ( android.os.RemoteException e ) { mService.set ( null ) ; android.telephony.MbmsDownloadSession.sIsInitialized.set ( false ) ; sendErrorToApp ( MbmsErrors.ERROR_MIDDLEWARE_LOST , null ) ; return android.telephony.MbmsDownloadSession.STATUS_UNKNOWN ; } }
Source:
public void queryFacilityLock ( java.lang.String facility , java.lang.String password , int serviceClass , android.os.Message response ) { queryFacilityLockForApp ( facility , password , serviceClass , null , response ) ; }

Target:
public void getMute ( 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_GET_MUTE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getMute ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getMute" , e ) ; } } }
Source:
public boolean unplug ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "unplug(): device=" + device ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.unplug ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public boolean disconnect ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "disconnect(): device=" + device ) ) ; boolean result = false ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { result = service.disconnect ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
private static android.net.NetworkTemplate createTemplate ( int networkType , java.lang.String subscriberId ) { android.net.NetworkTemplate template = null ; switch ( networkType ) { case android.net.ConnectivityManager.TYPE_MOBILE : { template = android.net.NetworkTemplate.buildTemplateMobileAll ( subscriberId ) ; } break ; case android.net.ConnectivityManager.TYPE_WIFI : { template = android.net.NetworkTemplate.buildTemplateWifiWildcard ( ) ; } break ; default : { throw new java.lang.IllegalArgumentException ( ( ( ( ( "Cannot create template for network type " + networkType ) + ", subscriberId '" ) + ( android.net.NetworkIdentity.scrubSubscriberId ( subscriberId ) ) ) + "'." ) ) ; } } return template ; }

Target:
private static android.net.NetworkTemplate createTemplate ( int networkType , java.lang.String subscriberId ) { final android.net.NetworkTemplate template ; switch ( networkType ) { case android.net.ConnectivityManager.TYPE_MOBILE : template = ( subscriberId == null ) ? android.net.NetworkTemplate.buildTemplateMobileWildcard ( ) : android.net.NetworkTemplate.buildTemplateMobileAll ( subscriberId ) ; break ; case android.net.ConnectivityManager.TYPE_WIFI : template = android.net.NetworkTemplate.buildTemplateWifiWildcard ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( ( ( ( "Cannot create template for network type " + networkType ) + ", subscriberId '" ) + ( android.net.NetworkIdentity.scrubSubscriberId ( subscriberId ) ) ) + "'." ) ) ; } return template ; }
Source:
protected void syncWithBuildFile ( ) { com.google.gct.idea.appengine.gradle.facet.AppEngineGradleFacet facet = com.google.gct.idea.appengine.gradle.facet.AppEngineGradleFacet.getInstance ( moduleSelector.getModule ( ) ) ; if ( facet != null ) { com.google.appengine.gradle.model.AppEngineModel model = facet.getIdeaAppEngineProject ( ) . getDelegate ( ) ; myServerPortField.setText ( model.getHttpPort ( ) . toString ( ) ) ; myServerAddressField.setText ( model.getHttpAddress ( ) ) ; myAppEngineSdkField.setText ( model.getAppEngineSdkRoot ( ) ) ; myWarPathField.setText ( model.getWarDir ( ) . getAbsolutePath ( ) ) ; } }

Target:
protected void updateSync ( ) { boolean isSync = mySynchronizeWithBuildGradleCheckBox.isSelected ( ) ; if ( isSync ) { syncWithBuildFile ( ) ; } myWarPathField.setEditable ( ( ! isSync ) ) ; myServerAddressField.setEditable ( ( ! isSync ) ) ; myServerPortField.setEditable ( ( ! isSync ) ) ; myAppEngineSdkField.setEditable ( ( ! isSync ) ) ; }
Source:
final void decrementAssociatedCallCount ( ) { if ( ( mAssociatedCallCount ) > 0 ) { ( mAssociatedCallCount ) -- ; com.android.server.telecom.Log.v ( this , "Call count decrement %d, %s" , mAssociatedCallCount , mComponentName.flattenToShortString ( ) ) ; if ( ( mAssociatedCallCount ) == 0 ) { unbind ( ) ; } } else { com.android.server.telecom.Log.wtf ( this , "%s: ignoring a request to decrement mAssociatedCallCount below zero" , mComponentName.getClassName ( ) ) ; } }

Target:
final void decrementAssociatedCallCount ( ) { if ( ( mAssociatedCallCount ) > 0 ) { ( mAssociatedCallCount ) -- ; android.telecom.Log.v ( this , "Call count decrement %d, %s" , mAssociatedCallCount , mComponentName.flattenToShortString ( ) ) ; if ( ( mAssociatedCallCount ) == 0 ) { unbind ( ) ; } } else { android.telecom.Log.wtf ( this , "%s: ignoring a request to decrement mAssociatedCallCount below zero" , mComponentName.getClassName ( ) ) ; } }
Source:
private static void assertCannotParse ( java.util.Locale l , java.lang.String fmt , java.lang.String value ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( fmt , l ) ; java.text.ParsePosition pp = new java.text.ParsePosition ( 0 ) ; java.util.Date d = sdf.parse ( value , pp ) ; assertNull ( ( ( ( ( ( "Value " + value ) + " must not parse in locale " ) + l ) + " with format " ) + fmt ) , d ) ; }

Target:
private static void assertCannotParse ( java.util.Locale l , java.lang.String fmt , java.lang.String value ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( fmt , l ) ; sdf.setTimeZone ( libcore.java.text.SimpleDateFormatTest.UTC ) ; java.text.ParsePosition pp = new java.text.ParsePosition ( 0 ) ; java.util.Date d = sdf.parse ( value , pp ) ; assertNull ( ( ( ( ( ( "Value " + value ) + " must not parse in locale " ) + l ) + " with format " ) + fmt ) , d ) ; }
Source:
public void test_removeRangeII ( ) { tests.api.java.util.VectorTest.Mock_Vector mv = new tests.api.java.util.VectorTest.Mock_Vector ( ) ; mv.add ( "First" ) ; mv.add ( "Second" ) ; mv.add ( "One more" ) ; mv.add ( "Last" ) ; mv.removeRange ( 1 , 3 ) ; assertTrue ( mv.contains ( "First" ) ) ; assertFalse ( mv.contains ( "Second" ) ) ; assertFalse ( mv.contains ( "One more" ) ) ; assertTrue ( mv.contains ( "Last" ) ) ; }

Target:
public void test_removeRangeII ( ) { tests.api.java.util.VectorTest.MockVector mv = new tests.api.java.util.VectorTest.MockVector ( ) ; mv.add ( "First" ) ; mv.add ( "Second" ) ; mv.add ( "One more" ) ; mv.add ( "Last" ) ; mv.removeRange ( 1 , 3 ) ; assertTrue ( mv.contains ( "First" ) ) ; assertFalse ( mv.contains ( "Second" ) ) ; assertFalse ( mv.contains ( "One more" ) ) ; assertTrue ( mv.contains ( "Last" ) ) ; }
Source:
public void testNoLauncherCallbackPackageAddedSecondaryUser ( ) throws java.lang.Exception { if ( ! ( mMultiUserSupported ) ) { return ; } startCallbackService ( ) ; installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testNoPackageAddedCallbackForUser" , 0 , ( "-e testUser " + ( mSecondaryUserSerialNumber ) ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }

Target:
public void testGetActivitiesForNonProfileFails ( ) throws java.lang.Exception { if ( ( ! ( mMultiUserSupported ) ) || ( mHasLiveTvFeature ) ) { return ; } installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testGetActivitiesForUserFails" , 0 , ( "-e testUser " + ( mSecondaryUserSerialNumber ) ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }
Source:
public void testMarkup ( ) throws java.lang.Exception { checkFormat ( "res/values/strings.xml" , ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + ( ( ( ( ( ( ( ( "<resources>\n" + "\n" ) + "<string name=\"welcome\">Welcome to <b>Android</b>!</string>" ) + "<string name=\"glob_settings_top_text\"><b>To install a 24 Clock Widget, " ) + "please <i>long press</i> in Home Screen.</b> Configure the Global Settings " ) + "here.</string>" ) + "" ) + "\n" ) + "</resources>" ) ) , ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + ( ( ( ( ( ( "<resources>\n" + "\n" ) + " <string name=\"welcome\">Welcome to <b>Android</b>!</string>\n" ) + " <string name=\"glob_settings_top_text\"><b>To install a 24 Clock Widget, please <i>long press</i>\n" ) + " in Home Screen.</b> Configure the Global Settings here.</string>\n" ) + "\n" ) + "</resources>" ) ) ) ; }

Target:
public void testMarkup ( ) throws java.lang.Exception { checkFormat ( "res/values/strings.xml" , ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + ( ( ( ( ( ( ( ( "<resources>\n" + "\n" ) + "<string name=\"welcome\">Welcome to <b>Android</b>!</string>" ) + "<string name=\"glob_settings_top_text\"><b>To install a 24 Clock Widget, " ) + "please <i>long press</i> in Home Screen.</b> Configure the Global Settings " ) + "here.</string>" ) + "" ) + "\n" ) + "</resources>" ) ) , ( "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + ( ( ( ( ( ( ( "<resources>\n" + "\n" ) + " <string name=\"welcome\">Welcome to <b>Android</b>!</string>\n" ) + " <string name=\"glob_settings_top_text\"><b>To install a 24 Clock Widget, " ) + "please <i>long press</i> in Home Screen.</b> Configure the Global Settings " ) + "here.</string>\n" ) + "\n" ) + "</resources>" ) ) ) ; }
Source:
protected void clean ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { super . clean ( monitor ) ; org.eclipse.core.resources.IProject project = getProject ( ) ; com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; removeDerivedResources ( mGenFolder , monitor ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_XML ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_AIDL ) ; }

Target:
private void doClean ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , Messages.Removing_Generated_Classes ) ; if ( ( mGenFolder ) != null ) { removeDerivedResources ( mGenFolder , monitor ) ; } removeMarkersFromProject ( project , AndroidConstants.MARKER_AAPT_COMPILE ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_XML ) ; removeMarkersFromProject ( project , AndroidConstants.MARKER_AIDL ) ; }
Source:
public void processServerExtensions ( java.util.Hashtable serverExtensions ) throws java.io.IOException { if ( ! ( org.bouncycastle.crypto.tls.TlsUtils.hasExpectedEmptyExtensionData ( serverExtensions , TlsSRPUtils.EXT_SRP , AlertDescription.illegal_parameter ) ) ) { } }

Target:
public void processServerExtensions ( java.util.Hashtable serverExtensions ) throws java.io.IOException { if ( ! ( org.bouncycastle.crypto.tls.TlsUtils.hasExpectedEmptyExtensionData ( serverExtensions , TlsSRPUtils.EXT_SRP , AlertDescription.illegal_parameter ) ) ) { if ( requireSRPServerExtension ( ) ) { throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.illegal_parameter ) ; } } super . processServerExtensions ( serverExtensions ) ; }
Source:
public void testBasic ( ) { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; assertFalse ( "Library Project" , model.isLibrary ( ) ) ; assertEquals ( "Compile Target" , "android-15" , model.getCompileTarget ( ) ) ; assertFalse ( "Non empty bootclasspath" , model.getBootClasspath ( ) . isEmpty ( ) ) ; com.android.builder.model.JavaCompileOptions javaCompileOptions = model.getJavaCompileOptions ( ) ; assertEquals ( "1.6" , javaCompileOptions.getSourceCompatibility ( ) ) ; assertEquals ( "1.6" , javaCompileOptions.getTargetCompatibility ( ) ) ; }

Target:
public void testBasic ( ) { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; assertFalse ( "Library Project" , model.isLibrary ( ) ) ; assertEquals ( "Compile Target" , "android-19" , model.getCompileTarget ( ) ) ; assertFalse ( "Non empty bootclasspath" , model.getBootClasspath ( ) . isEmpty ( ) ) ; com.android.builder.model.JavaCompileOptions javaCompileOptions = model.getJavaCompileOptions ( ) ; assertEquals ( "1.6" , javaCompileOptions.getSourceCompatibility ( ) ) ; assertEquals ( "1.6" , javaCompileOptions.getTargetCompatibility ( ) ) ; }
Source:
public void unregisterListener ( ) { if ( ( mTestSensorEventListener ) == null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "No listener registered, returning." ) ; return ; } mSensorManager.unregisterListener ( mTestSensorEventListener , mEnvironment.getSensor ( ) ) ; mTestSensorEventListener.assertEventsReceivedInHandler ( ) ; mTestSensorEventListener = null ; }

Target:
public void unregisterListener ( ) { if ( ( mTestSensorEventListener ) == null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "No listener registered, returning." ) ; return ; } mSensorManager.unregisterListener ( mTestSensorEventListener , mEnvironment.getSensor ( ) ) ; mTestSensorEventListener.assertEventsReceivedInHandler ( ) ; mTestSensorEventListener.releaseWakeLock ( ) ; mTestSensorEventListener = null ; }
Source:
public boolean isVisualVoicemailEnabled ( java.lang.String callingPackage , android.telecom.PhoneAccountHandle phoneAccountHandle ) { if ( ! ( canReadPhoneState ( callingPackage , "isVisualVoicemailEnabled" ) ) ) { return false ; } return com.android.phone.settings.VisualVoicemailSettingsUtil.isEnabled ( mPhone.getContext ( ) , phoneAccountHandle ) ; }

Target:
private boolean isUssdApiAllowed ( int subId ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( mPhone.getContext ( ) . getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; if ( configManager == null ) { return false ; } android.os.PersistableBundle pb = configManager.getConfigForSubId ( subId ) ; if ( pb == null ) { return false ; } return pb.getBoolean ( CarrierConfigManager.KEY_ALLOW_USSD_REQUESTS_VIA_TELEPHONY_MANAGER_BOOL ) ; }
Source:
public void onSpeedDialSelected ( ) { hideAllFragments ( ) ; }

Target:
public void onSpeedDialSelected ( ) { hideAllFragments ( ) ; com.android.dialer.speeddial.SpeedDialFragment fragment = ( ( com.android.dialer.speeddial.SpeedDialFragment ) ( supportFragmentManager.findFragmentByTag ( com.android.dialer.main.impl.NewMainActivityPeer.MainBottomNavBarBottomNavTabListener.SPEED_DIAL_TAG ) ) ) ; if ( fragment == null ) { supportFragmentManager.beginTransaction ( ) . add ( R.id.fragment_container , com.android.dialer.speeddial.SpeedDialFragment.newInstance ( ) , com.android.dialer.main.impl.NewMainActivityPeer.MainBottomNavBarBottomNavTabListener.SPEED_DIAL_TAG ) . commit ( ) ; } else { supportFragmentManager.beginTransaction ( ) . show ( fragment ) . commit ( ) ; } }
Source:
private void responseLceData ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.LceDataInfo lceInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < java.lang.Integer > ret = com.android.internal.telephony.RIL.convertHalLceData ( lceInfo , mRil ) ; 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 responseCellInfoList_1_2 ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < com.android.internal.telephony.V1_2.CellInfo > cellInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < android.telephony.CellInfo > ret = com.android.internal.telephony.RIL.convertHalCellInfoList_1_2 ( cellInfo ) ; 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:
protected void tearDown ( ) throws java.lang.Exception { if ( ! ( android.net.wifi.aware.cts.TestUtils.shouldTestWifiAware ( getContext ( ) ) ) ) { super . tearDown ( ) ; return ; } super . tearDown ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( ! ( android.net.wifi.aware.cts.TestUtils.shouldTestWifiAware ( getContext ( ) ) ) ) { super . tearDown ( ) ; return ; } synchronized ( mLock ) { for ( android.net.wifi.aware.WifiAwareSession session : mSessions ) { session.destroy ( ) ; } mSessions.clear ( ) ; } super . tearDown ( ) ; }
Source:
public boolean importKey ( java.lang.String keyName , byte [ ] key ) { return importKey ( android.security.KeyStore.getKeyBytes ( keyName ) , key ) ; }

Target:
public boolean importKey ( java.lang.String keyName , byte [ ] key ) { try { return ( mBinder.import_key ( keyName , key ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void onLoadFinished ( ) { com.android.tv.util.SetupUtils.getInstance ( this ) . markNewChannelsBrowsable ( ) ; if ( mActivityResumed ) { resumeTvIfNeeded ( ) ; resumePipIfNeeded ( ) ; } mKeypadChannelSwitchView.setChannels ( mChannelTuner.getBrowsableChannelList ( ) ) ; }

Target:
public void onLoadFinished ( ) { com.android.tv.util.Debug.getTimer ( Debug.TAG_START_UP_TIMER ) . log ( "MainActivity.mChannelTunerListener.onLoadFinished" ) ; com.android.tv.util.SetupUtils.getInstance ( this ) . markNewChannelsBrowsable ( ) ; if ( mActivityResumed ) { resumeTvIfNeeded ( ) ; } mKeypadChannelSwitchView.setChannels ( mChannelTuner.getBrowsableChannelList ( ) ) ; }
Source:
private void handleAutoTimeZoneEnabled ( ) { java.lang.String tmpLog = "Reverting to NITZ TimeZone: tz=" + ( mSavedTimeZoneId ) ; if ( com.android.internal.telephony.NitzStateMachine.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.NitzStateMachine.LOG_TAG , tmpLog ) ; } mTimeZoneLog.log ( tmpLog ) ; if ( ( mSavedTimeZoneId ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZoneId ) ; } else { java.lang.String iso = mDeviceState.getNetworkCountryIsoForPhone ( ) ; if ( ! ( android.text.TextUtils.isEmpty ( iso ) ) ) { updateTimeZoneByNetworkCountryCode ( iso ) ; } } }

Target:
private void handleAutoTimeZoneEnabled ( ) { java.lang.String tmpLog = ( "handleAutoTimeZoneEnabled: Reverting to NITZ TimeZone:" + " mSavedTimeZoneId=" ) + ( mSavedTimeZoneId ) ; if ( com.android.internal.telephony.NitzStateMachine.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.NitzStateMachine.LOG_TAG , tmpLog ) ; } mTimeZoneLog.log ( tmpLog ) ; if ( ( mSavedTimeZoneId ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZoneId ) ; } else { java.lang.String iso = mDeviceState.getNetworkCountryIsoForPhone ( ) ; if ( ! ( android.text.TextUtils.isEmpty ( iso ) ) ) { updateTimeZoneByNetworkCountryCode ( iso ) ; } } }
Source:
private void markCallAsMerged ( boolean playDisconnectTone ) { if ( ! ( com.android.ims.ImsCall.isSessionAlive ( mSession ) ) ) { logi ( "markCallAsMerged" ) ; setIsMerged ( playDisconnectTone ) ; mSessionEndDuringMerge = true ; java.lang.String reasonInfo ; int reasonCode = ImsReasonInfo.CODE_UNSPECIFIED ; if ( playDisconnectTone ) { reasonCode = ImsReasonInfo.CODE_USER_TERMINATED_BY_REMOTE ; reasonInfo = "Call ended by network" ; } else { reasonCode = ImsReasonInfo.CODE_LOCAL_ENDED_BY_CONFERENCE_MERGE ; reasonInfo = "Call ended during conference merge process." ; } mSessionEndDuringMergeReasonInfo = new com.android.ims.ImsReasonInfo ( reasonCode , 0 , reasonInfo ) ; } }

Target:
private void markCallAsMerged ( boolean playDisconnectTone ) { if ( ! ( com.android.ims.ImsCall.isSessionAlive ( mSession ) ) ) { logi ( "markCallAsMerged" ) ; setIsMerged ( playDisconnectTone ) ; mSessionEndDuringMerge = true ; java.lang.String reasonInfo ; int reasonCode = android.telephony.ims.ImsReasonInfo.CODE_UNSPECIFIED ; if ( playDisconnectTone ) { reasonCode = android.telephony.ims.ImsReasonInfo.CODE_USER_TERMINATED_BY_REMOTE ; reasonInfo = "Call ended by network" ; } else { reasonCode = android.telephony.ims.ImsReasonInfo.CODE_LOCAL_ENDED_BY_CONFERENCE_MERGE ; reasonInfo = "Call ended during conference merge process." ; } mSessionEndDuringMergeReasonInfo = new android.telephony.ims.ImsReasonInfo ( reasonCode , 0 , reasonInfo ) ; } }
Source:
public void tearDown ( ) throws java.lang.Exception { mDispatcher.quit ( ) ; mDispatcher.join ( ) ; }

Target:
public void exceptionPostsError ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mNetwork.performRequest ( org.mockito.ArgumentMatchers.any ( com.android.volley.Request.class ) ) ) . thenThrow ( new com.android.volley.ServerError ( ) ) ; mDispatcher.processRequest ( mRequest ) ; org.mockito.Mockito.verify ( mDelivery ) . postError ( org.mockito.ArgumentMatchers.any ( com.android.volley.Request.class ) , org.mockito.ArgumentMatchers.any ( com.android.volley.VolleyError.class ) ) ; org.mockito.Mockito.verify ( mDelivery , org.mockito.Mockito.never ( ) ) . postResponse ( org.mockito.ArgumentMatchers.any ( com.android.volley.Request.class ) , org.mockito.ArgumentMatchers.any ( com.android.volley.Response.class ) ) ; }
Source:
protected final void doStart ( ) { executorService = executor ( ) ; executorService.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { lock.lock ( ) ; try { startUp ( ) ; runningTask = scheduler ( ) . schedule ( delegate , executorService , task ) ; notifyStarted ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } finally { lock.unlock ( ) ; } } } ) ; }

Target:
protected final void doStop ( ) { runningTask.cancel ( false ) ; executorService.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { try { lock.lock ( ) ; try { if ( ( state ( ) ) != ( com.google.common.util.concurrent.Service.State.STOPPING ) ) { return ; } shutDown ( ) ; } finally { lock.unlock ( ) ; } notifyStopped ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } } } ) ; }
Source:
private int generateSamplingRateInUs ( int sensorType ) { int rate ; switch ( mGenerator.nextInt ( 5 ) ) { case 0 : rate = android.hardware.SensorManager.SENSOR_DELAY_FASTEST ; break ; case 1 : rate = android.hardware.SensorManager.SENSOR_DELAY_GAME ; break ; case 2 : rate = android.hardware.SensorManager.SENSOR_DELAY_NORMAL ; break ; case 3 : rate = android.hardware.SensorManager.SENSOR_DELAY_UI ; break ; case 4 : default : int maxSamplingRate = android.hardware.cts.helpers.SensorTestInformation.getMaxSamplingRateInUs ( this . getContext ( ) , sensorType ) ; rate = maxSamplingRate * ( mGenerator.nextInt ( 10 ) ) ; } return rate ; }

Target:
private int generateSamplingRateInUs ( int sensorType ) { int rate ; switch ( mGenerator.nextInt ( 5 ) ) { case 0 : rate = android.hardware.SensorManager.SENSOR_DELAY_FASTEST ; break ; case 1 : rate = android.hardware.SensorManager.SENSOR_DELAY_GAME ; break ; case 2 : rate = android.hardware.SensorManager.SENSOR_DELAY_NORMAL ; break ; case 3 : rate = android.hardware.SensorManager.SENSOR_DELAY_UI ; break ; case 4 : default : int maxSamplingRate = android.hardware.cts.helpers.SensorCtsHelper.getSensor ( getContext ( ) , sensorType ) . getMinDelay ( ) ; rate = maxSamplingRate * ( mGenerator.nextInt ( 10 ) ) ; } return rate ; }
Source:
void onOwnAddressRead ( int advertiser_id , int addressType , java.lang.String address ) throws android.os.RemoteException { if ( com.android.bluetooth.gatt.AdvertiseManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() advertiser_id=" + advertiser_id ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.AdvertiseManager.AdvertiserInfo > entry = findAdvertiser ( advertiser_id ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() - bad advertiser_id " + advertiser_id ) ) ; return ; } android.bluetooth.le.IAdvertisingSetCallback callback = entry.getValue ( ) . callback ; callback.onOwnAddressRead ( advertiser_id , addressType , address ) ; }

Target:
void onOwnAddressRead ( int advertiserId , int addressType , java.lang.String address ) throws android.os.RemoteException { if ( com.android.bluetooth.gatt.AdvertiseManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() advertiserId=" + advertiserId ) ) ; java.util.Map.Entry < android.os.IBinder , com.android.bluetooth.gatt.AdvertiseManager.AdvertiserInfo > entry = findAdvertiser ( advertiserId ) ; if ( entry == null ) { android.util.Log.i ( com.android.bluetooth.gatt.AdvertiseManager.TAG , ( "onOwnAddressRead() - bad advertiserId " + advertiserId ) ) ; return ; } android.bluetooth.le.IAdvertisingSetCallback callback = entry.getValue ( ) . callback ; callback.onOwnAddressRead ( advertiserId , addressType , address ) ; }
Source:
public boolean clearBlacklist ( ) { return doBooleanCommand ( "BLACKLIST clear" ) ; }

Target:
public java.lang.String startWpsPinDisplay ( java.lang.String iface , java.lang.String bssid ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPinDisplay ( iface , bssid ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doStringCommandNative ( ( ( "IFNAME=" + iface ) + " WPS_PIN any" ) ) ; } else { return doStringCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PIN " ) + bssid ) ) ; } } } }
Source:
private static void assertUnique ( java.util.LinkedHashSet < java.lang.Long > seen , java.lang.Long value ) { if ( ! ( seen.add ( value ) ) ) { fail ( ( ( ( "found duplicate time " + value ) + " in series " ) + ( seen.toString ( ) ) ) ) ; } }

Target:
private static void assertUnique ( java.util.LinkedHashSet < java.lang.Long > seen , java.lang.Long value ) { if ( ! ( seen.add ( value ) ) ) { org.junit.Assert.fail ( ( ( ( "found duplicate time " + value ) + " in series " ) + ( seen.toString ( ) ) ) ) ; } }