auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public synchronized void stop ( ) { if ( ( mPhoneProxy ) != null ) { if ( com.android.bluetooth.hfp.HeadsetSystemInterface.DBG ) { android.util.Log.d ( com.android.bluetooth.hfp.HeadsetSystemInterface.TAG , "Unbinding phone proxy" ) ; } mPhoneProxy = null ; mHeadsetService.unbindService ( mPhoneProxyConnection ) ; } mHeadsetPhoneState.listenForPhoneState ( false ) ; mHeadsetPhoneState.cleanup ( ) ; }

Target:
public boolean isCallIdle ( ) { return ( ! ( isInCall ( ) ) ) && ( ! ( isRinging ( ) ) ) ; }
Source:
public boolean updatePublish ( short transactionId , android.net.wifi.aware.PublishConfig config ) { if ( ! ( mIsPublishSession ) ) { android.util.Log.e ( com.android.server.wifi.aware.WifiAwareDiscoverySessionState.TAG , "A SUBSCRIBE session is being used to publish" ) ; try { mCallback.onSessionConfigFail ( WifiAwareNative.AWARE_STATUS_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.aware.WifiAwareDiscoverySessionState.TAG , ( "updatePublish: RemoteException=" + e ) ) ; } return false ; } return com.android.server.wifi.aware.WifiAwareNative.getInstance ( ) . publish ( transactionId , mPubSubId , config ) ; }

Target:
public boolean updatePublish ( short transactionId , android.net.wifi.aware.PublishConfig config ) { if ( ! ( mIsPublishSession ) ) { android.util.Log.e ( com.android.server.wifi.aware.WifiAwareDiscoverySessionState.TAG , "A SUBSCRIBE session is being used to publish" ) ; try { mCallback.onSessionConfigFail ( WifiAwareNative.AWARE_STATUS_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.aware.WifiAwareDiscoverySessionState.TAG , ( "updatePublish: RemoteException=" + e ) ) ; } return false ; } return mWifiAwareNative.publish ( transactionId , mPubSubId , config ) ; }
Source:
public static void sort ( float [ ] a ) { java.util.DualPivotQuicksort.sort ( a ) ; }

Target:
public static void sort ( float [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) , null , 0 , 0 ) ; }
Source:
public void setComponentEnabledSetting ( android.content.ComponentName componentName , int newState , int flags ) { setEnabledSetting ( componentName.getPackageName ( ) , componentName.getClassName ( ) , newState , flags ) ; }

Target:
public void setComponentEnabledSetting ( android.content.ComponentName componentName , int newState , int flags , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; setEnabledSetting ( componentName.getPackageName ( ) , componentName.getClassName ( ) , newState , flags , userId ) ; }
Source:
private static void edgeSplitMoveExceptionsAndResults ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getInternalBlocksUnordered ( ) ) { if ( ( ( ! ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) ) && ( ( block.getPredecessorCount ( ) ) > 1 ) ) && ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock predecessor : com.google.common.collect.Lists.newArrayList ( block.getPredecessors ( ) ) ) { com.android.jack.transformations.ssa.SsaBasicBlockSplitter.insertNewSimpleSuccessor ( predecessor , block ) ; } } } }

Target:
private static void edgeSplitMoveExceptionsAndResults ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getReachableBlocksDepthFirst ( ) ) { if ( ( ( ! ( block instanceof com.android.jack.ir.ast.cfg.JExitBasicBlock ) ) && ( ( block.getPredecessorCount ( ) ) > 1 ) ) && ( block instanceof com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock predecessor : com.google.common.collect.Lists.newArrayList ( block.getPredecessors ( ) ) ) { com.android.jack.transformations.ssa.SsaBasicBlockSplitter.insertNewSimpleSuccessor ( predecessor , block ) ; } } } }
Source:
private void setAndBroadcastNetworkSetTime ( long time ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( ( ( "setAndBroadcastNetworkSetTime: time=" + time ) + "ms" ) ) ; android.os.SystemClock.setCurrentTimeMillis ( time ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_NETWORK_SET_TIME ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time" , time ) ; mPhone.getContext ( ) . sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; com.android.internal.telephony.metrics.TelephonyMetrics.getInstance ( ) . writeNITZEvent ( mPhone.getPhoneId ( ) , time ) ; }

Target:
private boolean networkCountryIsoChanged ( java.lang.String newCountryIsoCode , java.lang.String prevCountryIsoCode ) { if ( android.text.TextUtils.isEmpty ( newCountryIsoCode ) ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) { log ( "countryIsoChanged: no new country ISO code" ) ; } return false ; } if ( android.text.TextUtils.isEmpty ( prevCountryIsoCode ) ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) { log ( "countryIsoChanged: no previous country ISO code" ) ; } return true ; } return ! ( newCountryIsoCode.equals ( prevCountryIsoCode ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.System.setProperty ( "dexmaker.dexcache" , getContext ( ) . getCacheDir ( ) . toString ( ) ) ; com.android.server.BroadcastInterceptingContext context = new com.android.server.BroadcastInterceptingContext ( getContext ( ) ) ; mServerSocket = new android.net.LocalServerSocket ( com.android.server.NetworkManagementServiceTest.SOCKET_NAME ) ; mNMService = com.android.server.NetworkManagementService.create ( context , com.android.server.NetworkManagementServiceTest.SOCKET_NAME ) ; mSocket = mServerSocket.accept ( ) ; mOutputStream = mSocket.getOutputStream ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.System.setProperty ( "dexmaker.dexcache" , getContext ( ) . getCacheDir ( ) . toString ( ) ) ; com.android.internal.util.test.BroadcastInterceptingContext context = new com.android.internal.util.test.BroadcastInterceptingContext ( getContext ( ) ) ; mServerSocket = new android.net.LocalServerSocket ( com.android.server.NetworkManagementServiceTest.SOCKET_NAME ) ; mNMService = com.android.server.NetworkManagementService.create ( context , com.android.server.NetworkManagementServiceTest.SOCKET_NAME ) ; mSocket = mServerSocket.accept ( ) ; mOutputStream = mSocket.getOutputStream ( ) ; }
Source:
public static < T > T get ( java.util.Iterator < T > iterator , int position ) { com.google.common.collect.Iterators.checkNonnegative ( position ) ; int skipped = 0 ; while ( iterator.hasNext ( ) ) { T t = iterator.next ( ) ; if ( ( skipped ++ ) == position ) { return t ; } } throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( "position (" + position ) + ") must be less than the number of elements that remained (" ) + skipped ) + ")" ) ) ; }

Target:
public static < T > T get ( java.util.Iterator < T > iterator , int position ) { com.google.common.collect.Iterators.checkNonnegative ( position ) ; int skipped = com.google.common.collect.Iterators.advance ( iterator , position ) ; if ( ! ( iterator.hasNext ( ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( "position (" + position ) + ") must be less than the number of elements that remained (" ) + skipped ) + ")" ) ) ; } return iterator.next ( ) ; }
Source:
protected boolean processLayersFromFrontToFocus ( com.android.rs.test.BlurStack blurStack ) { for ( int targetLayer = 0 ; targetLayer < ( blurStack.getFocusLayer ( ) ) ; ++ targetLayer ) { com.android.rs.test.LayerInfo layerInfo = blurStack.getLayerInfo ( targetLayer ) ; setTargetLayer ( layerInfo ) ; int dilationRadius = com.android.rs.test.RefocusFilter.getKernelRadius ( layerInfo.frontDepth , blurStack ) ; setBlendInfo ( dilationRadius ) ; setKernelData ( targetLayer , blurStack ) ; computeLayerMatteInFrontOfFocalDepth ( ) ; filterLayerInFrontOfFocalDepth ( ) ; } finalizeFuzzyImageUsingSharpImage ( ) ; return true ; }

Target:
protected boolean processLayersFromFrontToFocus ( com.android.rs.refocus.BlurStack blurStack ) { for ( int targetLayer = 0 ; targetLayer < ( blurStack.getFocusLayer ( ) ) ; ++ targetLayer ) { com.android.rs.refocus.LayerInfo layerInfo = blurStack.getLayerInfo ( targetLayer ) ; setTargetLayer ( layerInfo ) ; int dilationRadius = com.android.rs.refocus.RefocusFilter.getKernelRadius ( layerInfo.frontDepth , blurStack ) ; setBlendInfo ( dilationRadius ) ; setKernelData ( targetLayer , blurStack ) ; computeLayerMatteInFrontOfFocalDepth ( ) ; filterLayerInFrontOfFocalDepth ( ) ; } finalizeFuzzyImageUsingSharpImage ( ) ; return true ; }
Source:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }

Target:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.Throwable thrown , java.util.function.Supplier < java.lang.String > msgSupplier ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msgSupplier.get ( ) ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.System.loadLibrary ( args [ 0 ] ) ; } catch ( java.lang.UnsatisfiedLinkError ule ) { Main.usingRI = true ; java.lang.System.out.println ( "JNI_OnLoad called" ) ; } Main.testClearDexCache ( ) ; Main.testMultiDex ( ) ; Main.testRacyLoader ( ) ; Main.testRacyLoader2 ( ) ; Main.testMisbehavingLoader ( ) ; Main.testRacyMisbehavingLoader ( ) ; Main.testRacyMisbehavingLoader2 ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.Class < ? > class_loader_class = java.lang.Class.forName ( "dalvik.system.PathClassLoader" ) ; java.lang.System.loadLibrary ( args [ 0 ] ) ; } catch ( java.lang.ClassNotFoundException e ) { Main.usingRI = true ; java.lang.System.out.println ( "JNI_OnLoad called" ) ; } Main.testClearDexCache ( ) ; Main.testMultiDex ( ) ; Main.testRacyLoader ( ) ; Main.testRacyLoader2 ( ) ; Main.testMisbehavingLoader ( ) ; Main.testRacyMisbehavingLoader ( ) ; Main.testRacyMisbehavingLoader2 ( ) ; }
Source:
void load ( java.lang.String absolutePath , java.lang.ClassLoader loader ) { java.lang.System.logE ( ( "java.lang.Runtime#load(String, ClassLoader)" + " is private and will be removed in a future Android release" ) ) ; if ( absolutePath == null ) { throw new java.lang.NullPointerException ( "absolutePath == null" ) ; } java.lang.String error = doLoad ( absolutePath , loader ) ; if ( error != null ) { throw new java.lang.UnsatisfiedLinkError ( error ) ; } }

Target:
void load ( java.lang.String absolutePath , java.lang.ClassLoader loader ) { checkTargetSdkVersionForLoad ( "java.lang.Runtime#load(String, ClassLoader)" ) ; java.lang.System.logE ( ( "java.lang.Runtime#load(String, ClassLoader)" + " is private and will be removed in a future Android release" ) ) ; if ( absolutePath == null ) { throw new java.lang.NullPointerException ( "absolutePath == null" ) ; } java.lang.String error = doLoad ( absolutePath , loader ) ; if ( error != null ) { throw new java.lang.UnsatisfiedLinkError ( error ) ; } }
Source:
public boolean connect ( ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , "connect()" ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.connect ( ) ; }

Target:
public boolean replyReport ( android.bluetooth.BluetoothDevice device , byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( ( ( ( ( "replyReport(): device=" + device ) + " type=" ) + type ) + " id=" ) + id ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.replyReport ( device , type , id , data ) ; }
Source:
public boolean dumpProfiles ( int uid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { return mInstalld.dumpProfiles ( uid , packageName , codePaths ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public boolean dumpProfiles ( int uid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return false ; try { return mInstalld.dumpProfiles ( uid , packageName , codePaths ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
static void rethrow ( final java.lang.Throwable ex ) { if ( ex != null ) { if ( ex instanceof java.lang.Error ) throw ( ( java.lang.Error ) ( ex ) ) ; if ( ex instanceof java.lang.RuntimeException ) throw ( ( java.lang.RuntimeException ) ( ex ) ) ; throw java.util.concurrent.ForkJoinTask.uncheckedThrowable ( ex , java.lang.RuntimeException.class ) ; } }

Target:
static < T extends java.lang.Throwable > void uncheckedThrow ( java.lang.Throwable t ) throws T { throw ( ( T ) ( t ) ) ; }
Source:
private void combineFiles ( java.lang.String Dest , java.lang.String Src ) throws java.io.IOException { java.io.FileInputStream is = new java.io.FileInputStream ( new java.io.File ( Src ) ) ; java.io.FileOutputStream os = new java.io.FileOutputStream ( new java.io.File ( Dest ) , true ) ; int rbyte ; while ( ( rbyte = is.read ( ) ) != ( - 1 ) ) { os.write ( rbyte ) ; } is.close ( ) ; os.close ( ) ; }

Target:
private static void appendTo ( java.lang.String dest , java.lang.String src ) throws java.io.IOException { try ( java.io.FileInputStream is = new java.io.FileInputStream ( new java.io.File ( src ) ) ; java.io.FileOutputStream os = new java.io.FileOutputStream ( new java.io.File ( dest ) ) ) { byte [ ] buf = new byte [ 1024 ] ; int len ; while ( ( len = is.read ( buf ) ) != ( - 1 ) ) { os.write ( buf , 0 , len ) ; } } }
Source:
public void setComment ( java.lang.String comment ) { if ( comment == null ) { this . commentBytes = null ; return ; } byte [ ] newCommentBytes = comment.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; if ( ( newCommentBytes.length ) > 65535 ) { throw new java.lang.IllegalArgumentException ( ( ( "Comment too long: " + ( newCommentBytes.length ) ) + " bytes" ) ) ; } this . commentBytes = newCommentBytes ; }

Target:
private void checkSizeIsWithinShort ( java.lang.String property , byte [ ] bytes ) { if ( ( bytes.length ) > 65535 ) { throw new java.lang.IllegalArgumentException ( ( ( ( ( ( property + " too long in " ) + ( charset ) ) + ":" ) + ( bytes.length ) ) + " bytes" ) ) ; } }
Source:
public void setSmscAddress ( java.lang.String address , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_SMSC_ADDRESS , result ) ; rr.mParcel.writeString ( address ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + address ) ) ; send ( rr ) ; }

Target:
public void explicitCallTransfer ( 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_EXPLICIT_CALL_TRANSFER , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.explicitCallTransfer ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "explicitCallTransfer" , e ) ; } } }
Source:
private void updateSampleRepo ( ) { org.eclipse.jgit.api.Git localGitRepo = getLocalRepo ( ) ; if ( localGitRepo == null ) { localGitRepo = cloneGithubRepo ( ) ; } else { try { localGitRepo.pull ( ) . call ( ) ; } catch ( org.eclipse.jgit.api.errors.GitAPIException e ) { com.google.gct.intellij.endpoints.synchronization.SampleSyncTask.LOG.error ( "Error syncing local sample repository" , e ) ; } } if ( localGitRepo != null ) { localGitRepo.getRepository ( ) . close ( ) ; } }

Target:
private void updateSampleRepo ( ) { org.eclipse.jgit.api.Git localGitRepo = getLocalRepo ( ) ; if ( localGitRepo == null ) { localGitRepo = cloneGithubRepo ( ) ; } else { try { localGitRepo.pull ( ) . call ( ) ; } catch ( org.eclipse.jgit.api.errors.GitAPIException e ) { com.google.gct.idea.appengine.synchronization.SampleSyncTask.LOG.error ( "Error syncing local sample repository" , e ) ; } } if ( localGitRepo != null ) { localGitRepo.getRepository ( ) . close ( ) ; } }
Source:
synchronized int getAudioState ( ) { com.android.internal.util.IState state = getCurrentState ( ) ; if ( state == ( mAudioConnecting ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; } else if ( ( state == ( mAudioDisconnecting ) ) || ( state == ( mAudioOn ) ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ; } else { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ; } }

Target:
int getAudioStateInt ( ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ; }
Source:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; if ( ( android.os.Looper.myLooper ( ) ) == null ) { android.os.Looper.prepare ( ) ; } mDevice1 = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . getRemoteDevice ( com.android.bluetooth.btservice.RemoteDevicesTest.TEST_BT_ADDR_1 ) ; mRemoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; }

Target:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; mDevice1 = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . getRemoteDevice ( com.android.bluetooth.btservice.RemoteDevicesTest.TEST_BT_ADDR_1 ) ; mHandlerThread = new android.os.HandlerThread ( "RemoteDevicesTestHandlerThread" ) ; mHandlerThread.start ( ) ; mTestLooperManager = android.support.test.InstrumentationRegistry.getInstrumentation ( ) . acquireLooperManager ( mHandlerThread.getLooper ( ) ) ; mRemoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService , mHandlerThread.getLooper ( ) ) ; }
Source:
private void milliSleep ( int millis ) { try { java.lang.Thread.sleep ( millis ) ; } catch ( java.lang.Exception e ) { } }

Target:
private void verifyStateChange ( int prevState , int currState , int callNumber , int timeoutMs ) { try { org.mockito.Mockito.verify ( mIBluetoothCallback , org.mockito.Mockito.timeout ( timeoutMs ) . times ( callNumber ) ) . onBluetoothStateChange ( prevState , currState ) ; } catch ( java.lang.Exception e ) { } }
Source:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUcharUcharUcharUchar args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( byte ) ( java.lang.StrictMath.min ( ( ( args.inMaxValue ) & 255 ) , java.lang.StrictMath.max ( ( ( args.inValue ) & 255 ) , ( ( args.inMinValue ) & 255 ) ) ) ) ) ; }

Target:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUcharUcharUcharUchar args ) { args.out = android.renderscript.cts.CoreMathVerifier.minU8 ( args.inMaxValue , android.renderscript.cts.CoreMathVerifier.maxU8 ( args.inValue , args.inMinValue ) ) ; }
Source:
public void notifySpeakerphone ( boolean isSpeakerphone ) { if ( ! ( mCallsManager.hasAnyCalls ( ) ) ) { isSpeakerphone = false ; } if ( ( mIsShowingSpeakerphone ) == isSpeakerphone ) { return ; } com.android.server.telecom.Log.d ( this , "Speakerphone status bar icon being set to %b" , isSpeakerphone ) ; if ( isSpeakerphone ) { mStatusBarManager.setIcon ( com.android.server.telecom.StatusBarNotifier.SLOT_SPEAKERPHONE , android.R.drawable.stat_sys_speakerphone , 0 , mContext.getString ( R.string.accessibility_speakerphone_enabled ) ) ; } else { mStatusBarManager.removeIcon ( com.android.server.telecom.StatusBarNotifier.SLOT_SPEAKERPHONE ) ; } mIsShowingSpeakerphone = isSpeakerphone ; }

Target:
public void notifySpeakerphone ( boolean isSpeakerphone ) { if ( ! ( mCallsManager.hasAnyCalls ( ) ) ) { isSpeakerphone = false ; } if ( ( mIsShowingSpeakerphone ) == isSpeakerphone ) { return ; } android.telecom.Log.d ( this , "Speakerphone status bar icon being set to %b" , isSpeakerphone ) ; if ( isSpeakerphone ) { mStatusBarManager.setIcon ( com.android.server.telecom.StatusBarNotifier.SLOT_SPEAKERPHONE , android.R.drawable.stat_sys_speakerphone , 0 , mContext.getString ( R.string.accessibility_speakerphone_enabled ) ) ; } else { mStatusBarManager.removeIcon ( com.android.server.telecom.StatusBarNotifier.SLOT_SPEAKERPHONE ) ; } mIsShowingSpeakerphone = isSpeakerphone ; }
Source:
private static void appendCamelCase ( java.lang.StringBuilder sb , @ com.android.annotations.Nullable java.lang.String word ) { if ( word != null ) { if ( ( sb.length ( ) ) == 0 ) { sb.append ( word ) ; } else { sb.append ( com.android.build.gradle.internal.StringHelper.capitalize ( word ) ) ; } } }

Target:
private static void appendCamelCase ( java.lang.StringBuilder sb , @ com.android.annotations.Nullable java.lang.String word ) { if ( word != null ) { if ( ( sb.length ( ) ) == 0 ) { sb.append ( word ) ; } else { sb.append ( com.android.utils.StringHelper.capitalize ( word ) ) ; } } }
Source:
public boolean logIn ( java.lang.String message ) { com.google.gdt.eclipse.login.common.GoogleLoginState state = createGoogleLoginState ( ) ; boolean loggedIn = state.logIn ( message ) ; com.google.gct.login.IGoogleLoginUpdateUser callback = new com.google.gct.login.IGoogleLoginUpdateUser ( ) { @ java.lang.Override public void updateUser ( ) { uiFacade.notifyStatusIndicator ( ) ; } } ; if ( loggedIn ) { users.addUser ( new com.google.gct.login.CredentialedUser ( state , callback ) ) ; } return loggedIn ; }

Target:
public void run ( ) { boolean loggedIn = state.logInWithLocalServer ( message ) ; if ( loggedIn ) { com.google.gct.login.IGoogleLoginUpdateUser callback = new com.google.gct.login.IGoogleLoginUpdateUser ( ) { @ java.lang.Override public void updateUser ( ) { uiFacade.notifyStatusIndicator ( ) ; } } ; users.addUser ( new com.google.gct.login.CredentialedUser ( state , callback ) ) ; } }
Source:
public com.android.ims.ImsUtInterface getSupplementaryServiceConfiguration ( ) throws com.android.ims.ImsException { if ( ( ( mUt ) != null ) && ( mUt.isBinderAlive ( ) ) ) { return mUt ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsUt iUt = mMmTelFeatureConnection.getUtInterface ( ) ; if ( iUt == null ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , ImsReasonInfo.CODE_UT_NOT_SUPPORTED ) ; } mUt = new com.android.ims.ImsUt ( iUt ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } return mUt ; }

Target:
public void removeRegistrationListener ( com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mMmTelFeatureConnection.removeRegistrationCallback ( listener ) ; com.android.ims.ImsManager.log ( "Registration Callback/Listener registered." ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "addRegistrationCallback()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public void setIncludePath ( org.apache.tools.ant.types.Path value ) { mIncludePath = value ; }

Target:
public void setIncludePathRefId ( java.lang.String refId ) { java.lang.Object path = getProject ( ) . getReference ( refId ) ; if ( path instanceof org.apache.tools.ant.types.Path ) { mIncludePath = ( ( org.apache.tools.ant.types.Path ) ( path ) ) ; } else if ( path != null ) { throw new org.apache.tools.ant.BuildException ( ( refId + " is expected to reference a Path object." ) ) ; } }
Source:
public java.lang.String toString ( ) { java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream ( ) ; final long bioCtx = org.conscrypt.NativeCrypto.create_BIO_OutputStream ( os ) ; try { org.conscrypt.NativeCrypto.X509_CRL_print ( bioCtx , mContext ) ; return os.toString ( ) ; } finally { org.conscrypt.NativeCrypto.BIO_free ( bioCtx ) ; } }

Target:
public java.lang.String toString ( ) { java.io.ByteArrayOutputStream os = new java.io.ByteArrayOutputStream ( ) ; final long bioCtx = org.conscrypt.NativeCrypto.create_BIO_OutputStream ( os ) ; try { org.conscrypt.NativeCrypto.X509_CRL_print ( bioCtx , mContext ) ; return os.toString ( ) ; } finally { org.conscrypt.NativeCrypto.BIO_free_all ( bioCtx ) ; } }
Source:
public void loadAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface loading , @ javax.annotation.Nonnull com.android.jack.jayce.JayceClassOrInterfaceLoader classOrInterfaceLoader ) { com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; com.android.jack.jayce.v0003.io.ExportSession exportSession = new com.android.jack.jayce.v0003.io.ExportSession ( session.getPhantomLookup ( ) , session , com.android.jack.jayce.NodeLevel.STRUCTURE ) ; for ( com.android.jack.jayce.v0003.nodes.NAnnotation annotation : annotations ) { com.android.jack.ir.ast.JAnnotation annotationLiteral = annotation.exportAsJast ( exportSession ) ; loading.addAnnotation ( annotationLiteral ) ; annotationLiteral.updateParents ( loading ) ; } }

Target:
public void loadAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface loading , @ javax.annotation.Nonnull com.android.jack.jayce.JayceClassOrInterfaceLoader classOrInterfaceLoader ) { if ( ! ( annotations.isEmpty ( ) ) ) { com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; com.android.jack.jayce.v0003.io.ExportSession exportSession = new com.android.jack.jayce.v0003.io.ExportSession ( session.getPhantomLookup ( ) , session , com.android.jack.jayce.NodeLevel.STRUCTURE ) ; for ( com.android.jack.jayce.v0003.nodes.NAnnotation annotation : annotations ) { com.android.jack.ir.ast.JAnnotation annotationLiteral = annotation.exportAsJast ( exportSession ) ; loading.addAnnotation ( annotationLiteral ) ; annotationLiteral.updateParents ( loading ) ; } } }
Source:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException , com.android.sched.util.file.CannotDeleteFileException { try { baseVFS.getRootInputVDir ( ) . delete ( fileType.buildFileVPath ( typePath ) ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException , com.android.sched.util.file.CannotDeleteFileException { try { inputVFS.getRootInputVDir ( ) . delete ( fileType.buildFileVPath ( typePath ) ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public void mousePressed ( java.awt.event.MouseEvent e ) { if ( isOverLink ( e.getX ( ) , e.getY ( ) ) ) { com.intellij.ide.BrowserUtil.browse ( "https://console.developers.google.com/project" ) ; com.android.tools.idea.stats.UsageTracker.getInstance ( ) . trackEvent ( GctTracking.CATEGORY , GctTracking.PROJECT_SELECTION , "create.new.project" , null ) ; } }

Target:
public void mousePressed ( java.awt.event.MouseEvent e ) { if ( isOverLink ( e.getX ( ) , e.getY ( ) ) ) { javax.swing.tree.TreeModel model = myTree.getModel ( ) ; if ( model instanceof com.google.gct.idea.elysium.ProjectSelector.SelectorTreeModel ) { ( ( com.google.gct.idea.elysium.ProjectSelector.SelectorTreeModel ) ( model ) ) . setModelNeedsRefresh ( true ) ; } com.intellij.ide.BrowserUtil.browse ( "https://console.developers.google.com/project" ) ; com.android.tools.idea.stats.UsageTracker.getInstance ( ) . trackEvent ( GctTracking.CATEGORY , GctTracking.PROJECT_SELECTION , "create.new.project" , null ) ; } }
Source:
public com.android.dialer.voicemail.listui.NewVoicemailViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_call_log_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailViewHolder newVoicemailViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailViewHolder ( view ) ; return newVoicemailViewHolder ; }

Target:
public com.android.dialer.voicemail.listui.NewVoicemailViewHolder onCreateViewHolder ( android.view.ViewGroup viewGroup , int viewType ) { android.view.LayoutInflater inflater = android.view.LayoutInflater.from ( viewGroup.getContext ( ) ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_entry , viewGroup , false ) ; com.android.dialer.voicemail.listui.NewVoicemailViewHolder newVoicemailViewHolder = new com.android.dialer.voicemail.listui.NewVoicemailViewHolder ( view ) ; return newVoicemailViewHolder ; }
Source:
public void listen ( android.telephony.PhoneStateListener listener , int events ) { if ( ( mContext ) == null ) return ; try { java.lang.Boolean notifyNow = ( getITelephony ( ) ) != null ; android.telephony.TelephonyManager.sRegistry.listenForSubscriber ( listener.mSubId , getOpPackageName ( ) , listener.callback , events , notifyNow ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public void listen ( android.telephony.PhoneStateListener listener , int events ) { if ( ( mContext ) == null ) return ; try { boolean notifyNow = ( getITelephony ( ) ) != null ; if ( ( listener.mSubId ) == null ) { listener.mSubId = mSubId ; } android.telephony.TelephonyManager.sRegistry.listenForSubscriber ( listener.mSubId , getOpPackageName ( ) , listener.callback , events , notifyNow ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }
Source:
private void handleRadioAvailable ( ) { mCi.getBasebandVersion ( obtainMessage ( com.android.internal.telephony.EVENT_GET_BASEBAND_VERSION_DONE ) ) ; if ( isPhoneTypeGsm ( ) ) { mCi.getIMEI ( obtainMessage ( com.android.internal.telephony.EVENT_GET_IMEI_DONE ) ) ; mCi.getIMEISV ( obtainMessage ( com.android.internal.telephony.EVENT_GET_IMEISV_DONE ) ) ; } else { mCi.getDeviceIdentity ( obtainMessage ( com.android.internal.telephony.EVENT_GET_DEVICE_IDENTITY_DONE ) ) ; } mCi.getRadioCapability ( obtainMessage ( com.android.internal.telephony.EVENT_GET_RADIO_CAPABILITY ) ) ; startLceAfterRadioIsAvailable ( ) ; }

Target:
public boolean supports3gppCallForwardingWhileRoaming ( ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( getContext ( ) . getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; android.os.PersistableBundle b = configManager.getConfig ( ) ; if ( b != null ) { return b.getBoolean ( CarrierConfigManager.KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL , true ) ; } else { return true ; } }
Source:
private void setSuspendOptimizations ( int reason , boolean enabled ) { if ( com.android.server.wifi.WifiStateMachine.DBG ) log ( ( ( ( "setSuspendOptimizations: " + reason ) + " " ) + enabled ) ) ; if ( enabled ) { mSuspendOptNeedsDisabled &= ~ reason ; } else { mSuspendOptNeedsDisabled |= reason ; } if ( com.android.server.wifi.WifiStateMachine.DBG ) log ( ( "mSuspendOptNeedsDisabled " + ( mSuspendOptNeedsDisabled ) ) ) ; }

Target:
private void setSuspendOptimizations ( int reason , boolean enabled ) { if ( mVerboseLoggingEnabled ) log ( ( ( ( "setSuspendOptimizations: " + reason ) + " " ) + enabled ) ) ; if ( enabled ) { mSuspendOptNeedsDisabled &= ~ reason ; } else { mSuspendOptNeedsDisabled |= reason ; } if ( mVerboseLoggingEnabled ) log ( ( "mSuspendOptNeedsDisabled " + ( mSuspendOptNeedsDisabled ) ) ) ; }
Source:
private int buildBatteryLevelInt ( ) { return ( ( ( ( ( int ) ( batteryLevel ) ) << 24 ) & - 16777216 ) | ( ( ( ( int ) ( batteryTemperature ) ) << 14 ) & 16760832 ) ) | ( ( ( int ) ( batteryVoltage ) ) & 16383 ) ; }

Target:
private int buildBatteryLevelInt ( ) { return ( ( ( ( ( int ) ( batteryLevel ) ) << 25 ) & - 33554432 ) | ( ( ( ( int ) ( batteryTemperature ) ) << 14 ) & 33538048 ) ) | ( ( ( int ) ( batteryVoltage ) ) & 16383 ) ; }
Source:
public void testCannotSetChunkedStreamingModeAfterFixedLengthStreamingMode ( ) throws java.lang.Exception { server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; connection.setFixedLengthStreamingMode ( 1 ) ; try { connection.setChunkedStreamingMode ( 1 ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }

Target:
public void testCannotSetFixedLengthStreamingModeAfterConnect ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "A" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; org.junit.Assert.assertEquals ( "A" , readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ) ; try { connection.setFixedLengthStreamingMode ( 1 ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }
Source:
private com.android.bluetooth.a2dp.A2dpService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.a2dp.A2dpService.TAG , "A2dp call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } return null ; }

Target:
private com.android.bluetooth.a2dp.A2dpService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.a2dp.A2dpService.TAG , "A2DP call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } return null ; }
Source:
public static java.lang.invoke.MethodHandle explicitCastArguments ( java.lang.invoke.MethodHandle target , java.lang.invoke.MethodType newType ) { java.lang.invoke.MethodHandles.explicitCastArgumentsChecks ( target , newType ) ; java.lang.invoke.MethodType oldType = target.type ( ) ; if ( oldType == newType ) return target ; if ( oldType.explicitCastEquivalentToAsType ( newType ) ) { return target.asFixedArity ( ) . asType ( newType ) ; } throw new java.lang.UnsupportedOperationException ( "MethodHandles.explicitCastArguments is not implemented" ) ; }

Target:
public static java.lang.invoke.MethodHandle explicitCastArguments ( java.lang.invoke.MethodHandle target , java.lang.invoke.MethodType newType ) { java.lang.invoke.MethodHandles.explicitCastArgumentsChecks ( target , newType ) ; java.lang.invoke.MethodType oldType = target.type ( ) ; if ( oldType == newType ) return target ; if ( oldType.explicitCastEquivalentToAsType ( newType ) ) { return target.asFixedArity ( ) . asType ( newType ) ; } return new java.lang.invoke.Transformers.ExplicitCastArguments ( target , newType ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; com.android.server.wifi.TestUtil.installWlanWifiNative ( mWifiNative ) ; mLooper = new android.os.test.TestLooper ( ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; mRttServiceImpl = new com.android.server.wifi.RttService.RttServiceImpl ( mContext , mLooper.getLooper ( ) , mWifiInjector ) ; mRttServiceImpl.startService ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mLooper = new android.os.test.TestLooper ( ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; org.mockito.Mockito.when ( mWifiInjector.getWifiNative ( ) ) . thenReturn ( mWifiNative ) ; mRttServiceImpl = new com.android.server.wifi.RttService.RttServiceImpl ( mContext , mLooper.getLooper ( ) , mWifiInjector ) ; mRttServiceImpl.startService ( ) ; }
Source:
public boolean disableNetwork ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "disableNetwork nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( "DISABLE_NETWORK " + netId ) ) ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getNetworkExtra ( int netId , java.lang.String name ) { final java.lang.String extraString = getNetworkVariable ( netId , name ) ; if ( ( ( extraString == null ) || ( ! ( extraString.startsWith ( "\"" ) ) ) ) || ( ! ( extraString.endsWith ( "\"" ) ) ) ) { return null ; } return com.android.server.wifi.WifiNative.parseNetworkExtra ( com.android.server.wifi.util.NativeUtil.removeEnclosingQuotes ( extraString ) ) ; }
Source:
protected void _initWith ( com.android.builder.model.BaseConfig that ) { mBuildConfigLines.clear ( ) ; mBuildConfigLines.addAll ( that.getBuildConfig ( ) ) ; mProguardFiles.clear ( ) ; mProguardFiles.addAll ( that.getProguardFiles ( ) ) ; }

Target:
protected void _initWith ( com.android.builder.model.BaseConfig that ) { mBuildConfigLines.clear ( ) ; mBuildConfigLines.addAll ( that.getBuildConfig ( ) ) ; mProguardFiles.clear ( ) ; mProguardFiles.addAll ( that.getProguardFiles ( ) ) ; mConsumerProguardFiles.clear ( ) ; mConsumerProguardFiles.addAll ( that.getConsumerProguardFiles ( ) ) ; }
Source:
public void testStageInstallWithErrorCode_withMissingDistroVersionFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withMissingDistroVersionFile ( ) throws java.lang.Exception { byte [ ] distroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . clearVersionForTests ( ) . buildUnvalidatedBytes ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distroBytes ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public java.util.List < com.android.ide.common.api.MenuAction > getContextMenu ( com.android.ide.common.api.INode selectedNode ) { return super . getContextMenu ( selectedNode ) ; }

Target:
public void handle ( com.android.ide.common.api.INode n ) { java.lang.String attribute = ( actionId.equals ( com.android.ide.common.layout.BaseLayoutRule.ACTION_FILL_WIDTH ) ) ? com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH : com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT ; java.lang.String value ; if ( newValue ) { if ( supportsMatchParent ( ) ) { value = com.android.ide.common.layout.LayoutConstants.VALUE_MATCH_PARENT ; } else { value = com.android.ide.common.layout.LayoutConstants.VALUE_FILL_PARENT ; } } else { value = com.android.ide.common.layout.LayoutConstants.VALUE_WRAP_CONTENT ; } for ( com.android.ide.common.api.INode child : targets ) { child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , attribute , value ) ; } }
Source:
private static boolean featureProvidedByGradle ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.Nullable java.lang.String minGradleVersion ) { if ( minGradleVersion == null ) { return false ; } com.android.builder.model.AndroidProject gradleModel = context.getProject ( ) . getGradleProjectModel ( ) ; if ( gradleModel != null ) { com.android.repository.Revision gradleModelVersion = com.android.repository.Revision.parseRevision ( gradleModel.getModelVersion ( ) ) ; if ( ( gradleModelVersion.compareTo ( com.android.repository.Revision.parseRevision ( minGradleVersion ) , Revision.PreviewComparison.IGNORE ) ) >= 0 ) { return true ; } } return false ; }

Target:
private static boolean featureProvidedByGradle ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.Nullable java.lang.String minGradleVersionString ) { if ( minGradleVersionString == null ) { return false ; } com.android.ide.common.repository.GradleVersion gradleModelVersion = context.getProject ( ) . getGradleModelVersion ( ) ; if ( gradleModelVersion != null ) { com.android.ide.common.repository.GradleVersion minVersion = com.android.ide.common.repository.GradleVersion.tryParse ( minGradleVersionString ) ; if ( ( minVersion != null ) && ( ( gradleModelVersion.compareIgnoringQualifiers ( minVersion ) ) >= 0 ) ) { return true ; } } return false ; }
Source:
public void testAesCbcHmacSha1Udp6 ( ) 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_SHA1 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha256Udp6 ( ) 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_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mReceiver = new com.android.ddmlib.BatteryFetcher.SysFsBatteryLevelReceiver ( ) ; java.util.Random r = new java.util.Random ( java.lang.System.currentTimeMillis ( ) ) ; mExpected1 = r.nextInt ( 101 ) ; mExpected2 = r.nextInt ( 101 ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mReceiver = new com.android.ddmlib.Device.SysFsBatteryLevelReceiver ( ) ; java.util.Random r = new java.util.Random ( java.lang.System.currentTimeMillis ( ) ) ; mExpected1 = r.nextInt ( 101 ) ; mExpected2 = r.nextInt ( 101 ) ; }
Source:
public void exit ( ) { mIPv6TetherSvc.stop ( ) ; try { mNMService.untetherInterface ( mIfaceName ) ; } catch ( java.lang.Exception e ) { mLastError = android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR ; android.util.Log.e ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( "Failed to untether interface: " + ( e.toString ( ) ) ) ) ; } configureIfaceIp ( false ) ; }

Target:
public void exit ( ) { mIPv6TetherSvc.stop ( ) ; try { mNMService.untetherInterface ( mIfaceName ) ; } catch ( java.lang.Exception e ) { mLastError = android.net.ConnectivityManager.TETHER_ERROR_UNTETHER_IFACE_ERROR ; mLog.e ( ( "Failed to untether interface: " + e ) ) ; } configureIfaceIp ( false ) ; }
Source:
public void testGetRestrictBackgroundStatus_whitelisted ( ) throws java.lang.Exception { if ( ! ( isSupported ( ) ) ) return ; setRestrictBackground ( true ) ; assertRestrictBackgroundChangedReceived ( 1 ) ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED ) ; addRestrictBackgroundWhitelist ( mUid ) ; assertRestrictBackgroundChangedReceived ( 2 ) ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED ) ; removeRestrictBackgroundWhitelist ( mUid ) ; assertRestrictBackgroundChangedReceived ( 3 ) ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED ) ; assertsForegroundAlwaysHasNetworkAccess ( ) ; assertDataSaverStatusOnBackground ( android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED ) ; }

Target:
protected boolean isSupported ( ) throws java.lang.Exception { if ( ! ( mIsDataSaverSupported ) ) { android.util.Log.i ( com.android.cts.net.hostside.TAG , ( ( ( ( "Skipping " + ( getClass ( ) ) ) + "." ) + ( getName ( ) ) ) + "() because device does not support Data Saver Mode" ) ) ; } return ( mIsDataSaverSupported ) && ( super . isSupported ( ) ) ; }
Source:
public void run ( ) { com.android.ddmuilib.logcat.LogPanel.PsOutputReceiver psor = new com.android.ddmuilib.logcat.LogPanel.PsOutputReceiver ( md.pid , newFilter , newTabItem ) ; try { mCurrentLoggedDevice.executeShellCommand ( "ps" , psor ) ; } catch ( java.io.IOException e ) { } }

Target:
public void run ( ) { com.android.ddmuilib.logcat.LogPanel.PsOutputReceiver psor = new com.android.ddmuilib.logcat.LogPanel.PsOutputReceiver ( md.pid , newFilter , newTabItem ) ; try { mCurrentLoggedDevice.executeShellCommand ( "ps" , psor ) ; } catch ( java.io.IOException e ) { } catch ( com.android.ddmlib.TimeoutException e ) { } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { } catch ( com.android.ddmlib.ShellCommandUnresponsiveException e ) { } }