auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static < K , V > com.google.common.collect.Multimap < K , V > filterFiltered ( com.google.common.collect.Multimaps.FilteredMultimap < K , V > map , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Predicate < java.util.Map.Entry < K , V > > predicate = com.google.common.base.Predicates.and ( map.predicate , entryPredicate ) ; return new com.google.common.collect.Multimaps.FilteredMultimap < K , V > ( map.unfiltered , predicate ) ; }

Target:
private static < K , V > com.google.common.collect.SetMultimap < K , V > filterFiltered ( com.google.common.collect.FilteredSetMultimap < K , V > multimap , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Predicate < java.util.Map.Entry < K , V > > predicate = com.google.common.base.Predicates.and ( multimap.entryPredicate ( ) , entryPredicate ) ; return new com.google.common.collect.FilteredEntrySetMultimap < K , V > ( multimap.unfiltered ( ) , predicate ) ; }
Source:
private boolean setIPv4Address ( android.net.LinkAddress address ) { final android.net.InterfaceConfiguration ifcg = new android.net.InterfaceConfiguration ( ) ; ifcg.setLinkAddress ( address ) ; try { mNwService.setInterfaceConfig ( mInterfaceName , ifcg ) ; if ( android.net.ip.IpManager.VDBG ) android.util.Log.d ( mTag , "IPv4 configuration succeeded" ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException e ) { android.util.Log.e ( mTag , "IPv4 configuration failed: " , e ) ; return false ; } return true ; }

Target:
private boolean setIPv4Address ( android.net.LinkAddress address ) { final android.net.InterfaceConfiguration ifcg = new android.net.InterfaceConfiguration ( ) ; ifcg.setLinkAddress ( address ) ; try { mNwService.setInterfaceConfig ( mInterfaceName , ifcg ) ; if ( android.net.ip.IpManager.VDBG ) android.util.Log.d ( mTag , "IPv4 configuration succeeded" ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException e ) { logError ( "IPv4 configuration failed: %s" , e ) ; return false ; } return true ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; boolean secondary = false ; if ( ( ( args.length ) > 0 ) && ( args [ ( ( args.length ) - 1 ) ] . equals ( "--secondary" ) ) ) { secondary = true ; } new Main ( secondary ) . run ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; boolean secondary = false ; boolean full_signatures = false ; for ( java.lang.String arg : args ) { if ( arg.equals ( "--secondary" ) ) { secondary = true ; } if ( arg.equals ( "--full-signatures" ) ) { full_signatures = true ; } } new Main ( secondary , full_signatures ) . run ( ) ; }
Source:
public static java.lang.invoke.MethodHandle dropArguments ( java.lang.invoke.MethodHandle target , int pos , java.util.List < java.lang.Class < ? > > valueTypes ) { java.lang.invoke.MethodType oldType = target.type ( ) ; int dropped = java.lang.invoke.MethodHandles.dropArgumentChecks ( oldType , pos , valueTypes ) ; java.lang.invoke.MethodType newType = oldType.insertParameterTypes ( pos , valueTypes ) ; throw new java.lang.UnsupportedOperationException ( "MethodHandles.dropArguments is not implemented" ) ; }

Target:
public static java.lang.invoke.MethodHandle dropArguments ( java.lang.invoke.MethodHandle target , int pos , java.util.List < java.lang.Class < ? > > valueTypes ) { java.lang.invoke.MethodType oldType = target.type ( ) ; int dropped = java.lang.invoke.MethodHandles.dropArgumentChecks ( oldType , pos , valueTypes ) ; java.lang.invoke.MethodType newType = oldType.insertParameterTypes ( pos , valueTypes ) ; if ( dropped == 0 ) { return target ; } return new java.lang.invoke.Transformers.DropArguments ( newType , target , pos , valueTypes.size ( ) ) ; }
Source:
private void dexAndPush ( java.util.Set < vogar.tasks.Task > tasks , java.lang.String name , java.io.File jar , vogar.Action action ) { java.io.File localDex = run.localDexFile ( name ) ; java.io.File deviceDex = run.targetDexFile ( name ) ; vogar.tasks.Task dex = new vogar.android.DexTask ( run.androidSdk , run.classpath , run.benchmark , name , jar , action , localDex ) ; tasks.add ( dex ) ; tasks.add ( run.target.pushTask ( localDex , deviceDex ) . afterSuccess ( dex ) ) ; }

Target:
private void addCreateDexJarAndPushTasks ( java.util.Set < vogar.tasks.Task > tasks , java.lang.String name , java.io.File jar , vogar.Action action ) { java.io.File localDex = run.localDexFile ( name ) ; java.io.File deviceDex = run.targetDexFile ( name ) ; vogar.tasks.Task createDexJarTask = newCreateDexJarTask ( run.classpath , jar , name , action , localDex ) ; tasks.add ( createDexJarTask ) ; tasks.add ( run.target.pushTask ( localDex , deviceDex ) . afterSuccess ( createDexJarTask ) ) ; }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { super . visit ( version , access , name , signature , superName , interfaces ) ; internalName = name ; shouldCurrentClassBeIgnored = com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { super . visit ( version , access , name , signature , superName , interfaces ) ; internalName = name ; shouldCurrentClassBeIgnored = com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ; com.google.common.base.Preconditions.checkState ( ( ( ! ( shouldCurrentClassBeIgnored ) ) || ( ! ( hasCloseResourceMethod ) ) ) , ( "The current class which will be ignored " + "contains $closeResource(Throwable, AutoCloseable)." ) ) ; }
Source:
void updateAssistedDialingInfo ( com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry callDetailsEntry ) { if ( ( callDetailsEntry != null ) && ( hasAssistedDialingFeature ( callDetailsEntry.getFeatures ( ) ) ) ) { showAssistedDialingContainer ( true ) ; callDetailsHeaderListener.createAssistedDialerNumberParserTask ( new com.android.dialer.calldetails.CallDetailsActivity.AssistedDialingNumberParseWorker ( ) , this :: updateAssistedDialingText , this :: onFailure ) ; } else { showAssistedDialingContainer ( false ) ; } }

Target:
void updateAssistedDialingInfo ( com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry callDetailsEntry ) { if ( ( callDetailsEntry != null ) && ( hasAssistedDialingFeature ( callDetailsEntry.getFeatures ( ) ) ) ) { showAssistedDialingContainer ( true ) ; callDetailsHeaderListener.createAssistedDialerNumberParserTask ( new com.android.dialer.calldetails.CallDetailsActivityCommon.AssistedDialingNumberParseWorker ( ) , this :: updateAssistedDialingText , this :: onFailure ) ; } else { showAssistedDialingContainer ( false ) ; } }
Source:
public void sendRttRequest ( ) { try { android.telecom.Log.startSession ( "ICA.sRR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }

Target:
public void sendRttRequest ( java.lang.String callId ) { try { android.telecom.Log.startSession ( "ICA.sRR" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.sendRttRequest ( ) ; } else { android.telecom.Log.w ( this , "stopRtt(): call %s not found" , callId ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
static void performReceive ( com.android.server.am.ProcessRecord app , android.content.IIntentReceiver receiver , android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) throws android.os.RemoteException { if ( ( app != null ) && ( ( app.thread ) != null ) ) { app.thread.scheduleRegisteredReceiver ( receiver , intent , resultCode , data , extras , ordered , sticky ) ; } else { receiver.performReceive ( intent , resultCode , data , extras , ordered , sticky ) ; } }

Target:
static void performReceiveLocked ( com.android.server.am.ProcessRecord app , android.content.IIntentReceiver receiver , android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) throws android.os.RemoteException { if ( ( app != null ) && ( ( app.thread ) != null ) ) { app.thread.scheduleRegisteredReceiver ( receiver , intent , resultCode , data , extras , ordered , sticky ) ; } else { receiver.performReceive ( intent , resultCode , data , extras , ordered , sticky ) ; } }
Source:
private void sendEmergencyCallbackModeChange ( ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_ECM_STATE , isInEcm ( ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManager.broadcastStickyIntent ( intent , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "sendEmergencyCallbackModeChange: isInEcm=" + ( isInEcm ( ) ) ) ) ; }

Target:
private void sendEmergencyCallbackModeChange ( ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_ECM_STATE , isInEcm ( ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManager.broadcastStickyIntent ( intent , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) logd ( ( "sendEmergencyCallbackModeChange: isInEcm=" + ( isInEcm ( ) ) ) ) ; }
Source:
private void updateAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager , mSdkLog ) ; avdManager.updateAvd ( avdName , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { errorAndExit ( e.getMessage ( ) ) ; } }

Target:
private void updateAvd ( ) { try { java.lang.String avdName = mSdkCommandLine.getParamName ( ) ; com.android.sdklib.internal.avd.AvdManager avdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager.getLocalSdk ( ) , mSdkLog ) ; avdManager.updateAvd ( avdName , mSdkLog ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { errorAndExit ( e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { errorAndExit ( e.getMessage ( ) ) ; } }
Source:
public int startSendingOffloadedPacket ( int slot , android.net.KeepalivePacketData keepAlivePacket , int period ) { java.lang.String [ ] macAddrStr = getMacAddress ( ) . split ( ":" ) ; byte [ ] srcMac = new byte [ 6 ] ; for ( int i = 0 ; i < 6 ; i ++ ) { java.lang.Integer hexVal = java.lang.Integer.parseInt ( macAddrStr [ i ] , 16 ) ; srcMac [ i ] = hexVal.byteValue ( ) ; } return mWifiVendorHal.startSendingOffloadedPacket ( slot , srcMac , keepAlivePacket , period ) ; }

Target:
public int startSendingOffloadedPacket ( int slot , byte [ ] dstMac , byte [ ] packet , int protocol , int period ) { byte [ ] srcMac = com.android.server.wifi.util.NativeUtil.macAddressToByteArray ( getMacAddress ( ) ) ; return mWifiVendorHal.startSendingOffloadedPacket ( slot , srcMac , dstMac , packet , protocol , period ) ; }
Source:
private static boolean isBatteryPower ( ) { if ( ( org.chromium.base.PowerMonitor.sInstance ) == null ) org.chromium.base.PowerMonitor.create ( ) ; return org.chromium.base.PowerMonitor.sInstance.mIsBatteryPower ; }

Target:
public static void onBatteryChargingChanged ( android.content.Intent intent ) { if ( ( org.chromium.base.PowerMonitor.sInstance ) == null ) { return ; } int chargePlug = intent.getIntExtra ( BatteryManager.EXTRA_PLUGGED , ( - 1 ) ) ; org.chromium.base.PowerMonitor.sInstance.mIsBatteryPower = ( chargePlug != ( android.os.BatteryManager.BATTERY_PLUGGED_USB ) ) && ( chargePlug != ( android.os.BatteryManager.BATTERY_PLUGGED_AC ) ) ; org.chromium.base.PowerMonitor.nativeOnBatteryChargingChanged ( ) ; }
Source:
public void testGetNetworkExtra ( ) { org.mockito.Mockito.when ( mWifiNative.getNetworkVariable ( com.android.server.wifi.WifiNativeTest.NETWORK_ID , com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_VARIABLE ) ) . thenReturn ( com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_SERIALIZED ) ; final java.util.Map < java.lang.String , java.lang.String > actualValues = mWifiNative.getNetworkExtra ( com.android.server.wifi.WifiNativeTest.NETWORK_ID , com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_VARIABLE ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiNativeTest.NETWORK_EXTRAS_VALUES , actualValues ) ; }

Target:
public void testSetupDriverForClientMode ( ) { android.net.wifi.IClientInterface clientInterface = org.mockito.Mockito.mock ( android.net.wifi.IClientInterface.class ) ; org.mockito.Mockito.when ( mWificondControl.setupDriverForClientMode ( ) ) . thenReturn ( clientInterface ) ; android.net.wifi.IClientInterface returnedClientInterface = mWifiNative.setupForClientMode ( ) ; org.junit.Assert.assertEquals ( clientInterface , returnedClientInterface ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . startVendorHal ( org.mockito.Mockito.eq ( true ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . setupDriverForClientMode ( ) ; }
Source:
public < T > T [ ] toArray ( T [ ] a ) { if ( ( a.length ) < ( size ) ) return ( ( T [ ] ) ( java.util.Arrays.copyOf ( queue , size , a.getClass ( ) ) ) ) ; java.lang.System.arraycopy ( queue , 0 , a , 0 , size ) ; if ( ( a.length ) > ( size ) ) a [ size ] = null ; return a ; }

Target:
private int getFence ( ) { int hi ; if ( ( hi = fence ) < 0 ) { expectedModCount = pq.modCount ; hi = fence = pq.size ; } return hi ; }
Source:
private static int getApiLevelFromAttribute ( java.lang.String attributeVersion ) { com.google.common.base.Preconditions.checkArgument ( ( ! ( com.google.common.base.Strings.isNullOrEmpty ( attributeVersion ) ) ) ) ; if ( java.lang.Character.isDigit ( attributeVersion.charAt ( 0 ) ) ) { return java.lang.Integer.parseInt ( attributeVersion ) ; } return com.android.ide.common.sdk.SdkVersionInfo.getApiByPreviewName ( attributeVersion , true ) ; }

Target:
private static int getApiLevelFromAttribute ( java.lang.String attributeVersion ) { com.google.common.base.Preconditions.checkArgument ( ( ! ( com.google.common.base.Strings.isNullOrEmpty ( attributeVersion ) ) ) ) ; if ( java.lang.Character.isDigit ( attributeVersion.charAt ( 0 ) ) ) { return java.lang.Integer.parseInt ( attributeVersion ) ; } return com.android.sdklib.SdkVersionInfo.getApiByPreviewName ( attributeVersion , true ) ; }
Source:
public static javax.net.ssl.SSLContext getSSLContext ( android.security.net.config.ConfigSource source ) throws java.lang.Exception { android.security.net.config.ApplicationConfig config = new android.security.net.config.ApplicationConfig ( source ) ; javax.net.ssl.SSLContext context = javax.net.ssl.SSLContext.getInstance ( "TLS" ) ; context.init ( null , new javax.net.ssl.TrustManager [ ] { config.getTrustManager ( ) } , null ) ; return context ; }

Target:
public static javax.net.ssl.SSLContext getSSLContext ( android.security.net.config.ConfigSource source ) throws java.lang.Exception { android.security.net.config.ApplicationConfig config = new android.security.net.config.ApplicationConfig ( source ) ; javax.net.ssl.TrustManagerFactory tmf = javax.net.ssl.TrustManagerFactory.getInstance ( "PKIX" , new android.security.net.config.NetworkSecurityConfigProvider ( ) ) ; tmf.init ( new android.security.net.config.RootTrustManagerFactorySpi.ApplicationConfigParameters ( config ) ) ; javax.net.ssl.SSLContext context = javax.net.ssl.SSLContext.getInstance ( "TLS" ) ; context.init ( null , tmf.getTrustManagers ( ) , null ) ; return context ; }
Source:
public void setRemoteFeatureMask ( int supportedFeatures ) { if ( com.android.bluetooth.map.BluetoothMapMasInstance.V ) android.util.Log.v ( TAG , ( "setRemoteFeatureMask : Curr: " + ( mRemoteFeatureMask ) ) ) ; mRemoteFeatureMask = supportedFeatures ; if ( ( ( mObserver ) != null ) && ( ( mObserver.getObserverRemoteFeatureMask ( ) ) != ( mRemoteFeatureMask ) ) ) { mObserver.setObserverRemoteFeatureMask ( mRemoteFeatureMask ) ; if ( com.android.bluetooth.map.BluetoothMapMasInstance.V ) android.util.Log.v ( TAG , ( "setRemoteFeatureMask : set: " + ( mRemoteFeatureMask ) ) ) ; } }

Target:
public void shutdown ( ) { if ( com.android.bluetooth.map.BluetoothMapMasInstance.D ) android.util.Log.d ( TAG , "MAP Service shutdown" ) ; if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } if ( ( mObserver ) != null ) { mObserver.deinit ( ) ; mObserver = null ; } removeSdpRecord ( ) ; closeConnectionSocket ( ) ; closeServerSockets ( true ) ; }
Source:
public static java.lang.String evaluateString ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.Node node , boolean allowUnknown ) { com.android.tools.lint.detector.api.ConstantEvaluator evaluator = new com.android.tools.lint.detector.api.ConstantEvaluator ( context ) ; if ( allowUnknown ) { evaluator.allowUnknowns ( ) ; } java.lang.Object value = evaluator.evaluate ( node ) ; return value instanceof java.lang.String ? ( ( java.lang.String ) ( value ) ) : null ; }

Target:
public static java.lang.String evaluateString ( @ com.android.annotations.Nullable com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull com.intellij.psi.PsiElement node , boolean allowUnknown ) { com.android.tools.lint.detector.api.ConstantEvaluator evaluator = new com.android.tools.lint.detector.api.ConstantEvaluator ( context ) ; if ( allowUnknown ) { evaluator.allowUnknowns ( ) ; } java.lang.Object value = evaluator.evaluate ( node ) ; return value instanceof java.lang.String ? ( ( java.lang.String ) ( value ) ) : null ; }
Source:
public boolean disconnectAudio ( ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.disconnectAudio ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }

Target:
public boolean disconnectAudio ( ) { final android.bluetooth.IBluetoothHeadset service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { return service.disconnectAudio ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }
Source:
protected int engineDoFinal ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( output == null ) { throw new java.lang.NullPointerException ( "output == null" ) ; } return doFinalInternal ( input , inputOffset , inputLen , output , outputOffset ) ; }

Target:
protected int engineDoFinal ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( output == null ) { throw new java.lang.NullPointerException ( "output == null" ) ; } final int maximumLen = getOutputSize ( inputLen ) ; return doFinalInternal ( input , inputOffset , inputLen , output , outputOffset , maximumLen ) ; }
Source:
java.security.MessageDigest createDigest ( org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgId ) throws java.security.GeneralSecurityException { java.security.MessageDigest dig ; try { dig = helper.createDigest ( org.bouncycastle.operator.jcajce.OperatorHelper.getDigestAlgName ( digAlgId.getAlgorithm ( ) ) ) ; } catch ( java.security.NoSuchAlgorithmException e ) { if ( ( org.bouncycastle.operator.jcajce.OperatorHelper.oids.get ( digAlgId.getAlgorithm ( ) ) ) != null ) { java.lang.String digestAlgorithm = ( ( java.lang.String ) ( org.bouncycastle.operator.jcajce.OperatorHelper.oids.get ( digAlgId.getAlgorithm ( ) ) ) ) ; dig = helper.createDigest ( digestAlgorithm ) ; } else { throw e ; } } return dig ; }

Target:
javax.crypto.Cipher createSymmetricWrapper ( org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm ) throws org.bouncycastle.operator.OperatorCreationException { try { java.lang.String cipherName = ( ( java.lang.String ) ( org.bouncycastle.operator.jcajce.OperatorHelper.symmetricWrapperAlgNames.get ( algorithm ) ) ) ; if ( cipherName != null ) { try { return helper.createCipher ( cipherName ) ; } catch ( java.security.NoSuchAlgorithmException e ) { } } return helper.createCipher ( algorithm.getId ( ) ) ; } catch ( java.security.GeneralSecurityException e ) { throw new org.bouncycastle.operator.OperatorCreationException ( ( "cannot create cipher: " + ( e.getMessage ( ) ) ) , e ) ; } }
Source:
public static void runFinalization ( ) { java.lang.Runtime.getRuntime ( ) . runFinalization ( ) ; }

Target:
public static void runFinalization ( ) { boolean shouldRunGC ; synchronized ( java.lang.System.lock ) { shouldRunGC = java.lang.System.runGC ; java.lang.System.runGC = false ; } if ( shouldRunGC ) { java.lang.Runtime.getRuntime ( ) . gc ( ) ; } java.lang.Runtime.getRuntime ( ) . runFinalization ( ) ; synchronized ( java.lang.System.lock ) { java.lang.System.justRanFinalization = true ; } }
Source:
public java.util.Date getDate ( ) { try { if ( ( time ) instanceof org.bouncycastle.asn1.DERUTCTime ) { return ( ( org.bouncycastle.asn1.DERUTCTime ) ( time ) ) . getAdjustedDate ( ) ; } else { return ( ( org.bouncycastle.asn1.DERGeneralizedTime ) ( time ) ) . getDate ( ) ; } } catch ( java.text.ParseException e ) { throw new java.lang.IllegalStateException ( ( "invalid date string: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public java.util.Date getDate ( ) { try { if ( ( time ) instanceof org.bouncycastle.asn1.ASN1UTCTime ) { return ( ( org.bouncycastle.asn1.ASN1UTCTime ) ( time ) ) . getAdjustedDate ( ) ; } else { return ( ( org.bouncycastle.asn1.ASN1GeneralizedTime ) ( time ) ) . getDate ( ) ; } } catch ( java.text.ParseException e ) { throw new java.lang.IllegalStateException ( ( "invalid date string: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public void testGetKeyCharacteristicsSuccess ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; java.lang.String name = "test" ; android.security.keymaster.KeyCharacteristics gen = generateRsaKey ( name ) ; android.security.keymaster.KeyCharacteristics call = new android.security.keymaster.KeyCharacteristics ( ) ; int result = mKeyStore.getKeyCharacteristics ( name , null , null , call ) ; assertEquals ( "getKeyCharacteristics should succeed" , KeyStore.NO_ERROR , result ) ; mKeyStore.delete ( "test" ) ; }

Target:
public void testGetKeyCharacteristicsSuccess ( ) throws java.lang.Exception { mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ; java.lang.String name = "test" ; android.security.keymaster.KeyCharacteristics gen = generateRsaKey ( name ) ; android.security.keymaster.KeyCharacteristics call = new android.security.keymaster.KeyCharacteristics ( ) ; int result = mKeyStore.getKeyCharacteristics ( name , null , null , call ) ; assertEquals ( "getKeyCharacteristics should succeed" , KeyStore.NO_ERROR , result ) ; mKeyStore.delete ( "test" ) ; }
Source:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { device.executeShellCommand ( "setenforce 1" ) ; if ( ( mDeviceInfoPath ) != null ) { com.android.tradefed.util.FileUtil.recursiveDelete ( mDeviceInfoPath ) ; device.executeShellCommand ( ( "rm -r " + ( com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_CONFIGURE_DST ) ) ) ; } }

Target:
public void tearDown ( com.android.tradefed.device.ITestDevice device , com.android.tradefed.build.IBuildInfo buildInfo , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( ! ( mEnforcingState.equals ( com.android.tradefed.targetprep.VtsCoveragePreparer.SELINUX_DISABLED ) ) ) { device.executeShellCommand ( ( "setenforce " + ( mEnforcingState ) ) ) ; } if ( ( mDeviceInfoPath ) != null ) { com.android.tradefed.util.FileUtil.recursiveDelete ( mDeviceInfoPath ) ; device.executeShellCommand ( ( "rm -r " + ( com.android.tradefed.targetprep.VtsCoveragePreparer.COVERAGE_CONFIGURE_DST ) ) ) ; } device.executeShellCommand ( "rm -rf /data/misc/trace/*" ) ; }
Source:
public static void $noinline$deopt ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 100000000 ; ++ i ) { } while ( ! ( Main.ensureInOsrCode ( ) ) ) { } DeoptimizationController.startDeoptimization ( ) ; }

Target:
public static void $noinline$deopt ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 100000 ; ++ i ) { } while ( ! ( Main.ensureInOsrCode ( ) ) ) { } DeoptimizationController.startDeoptimization ( ) ; }
Source:
private boolean is4gLtePrefEnabled ( android.os.PersistableBundle carrierConfig ) { return ( ( ( ( mTelephonyManager.getCallState ( ) ) == ( android.telephony.TelephonyManager.CALL_STATE_IDLE ) ) && ( ( mImsMgr ) != null ) ) && ( mImsMgr.isNonTtyOrTtyOnVolteEnabled ( ) ) ) && ( carrierConfig.getBoolean ( CarrierConfigManager.KEY_EDITABLE_ENHANCED_4G_LTE_BOOL ) ) ; }

Target:
private boolean is4gLtePrefEnabled ( android.os.PersistableBundle carrierConfig ) { return ( ( ( ( mTelephonyManager.getCallState ( mPhone.getSubId ( ) ) ) == ( android.telephony.TelephonyManager.CALL_STATE_IDLE ) ) && ( ( mImsMgr ) != null ) ) && ( mImsMgr.isNonTtyOrTtyOnVolteEnabled ( ) ) ) && ( carrierConfig.getBoolean ( CarrierConfigManager.KEY_EDITABLE_ENHANCED_4G_LTE_BOOL ) ) ; }
Source:
public void visitAnnotation ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Annotation annotation ) { java.lang.String typeName = clazz.getString ( annotation.u2typeIndex ) ; java.lang.String newTypeName = proguard.classfile.editor.ClassReferenceFixer.newDescriptor ( typeName , annotation.referencedClasses ) ; if ( ! ( typeName.equals ( newTypeName ) ) ) { annotation.u2typeIndex = new proguard.classfile.editor.ConstantPoolEditor ( ( ( proguard.classfile.editor.ProgramClass ) ( clazz ) ) ) . addUtf8Constant ( newTypeName ) ; } annotation.elementValuesAccept ( clazz , this ) ; }

Target:
public void visitAnnotation ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Annotation annotation ) { java.lang.String typeName = annotation.getType ( clazz ) ; java.lang.String newTypeName = proguard.classfile.editor.ClassReferenceFixer.newDescriptor ( typeName , annotation.referencedClasses ) ; if ( ! ( typeName.equals ( newTypeName ) ) ) { annotation.u2typeIndex = new proguard.classfile.editor.ConstantPoolEditor ( ( ( proguard.classfile.editor.ProgramClass ) ( clazz ) ) ) . addUtf8Constant ( newTypeName ) ; } annotation.elementValuesAccept ( clazz , this ) ; }
Source:
static com.android.builder.model.ProductFlavorContainer createProductFlavorContainer ( @ com.android.annotations.NonNull com.android.build.gradle.internal.ProductFlavorData productFlavorData , @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SourceProviderContainer > sourceProviderContainers ) { java.util.List < com.android.builder.model.SourceProviderContainer > clonedContainer = com.android.build.gradle.internal.model.SourceProviderContainerImpl.cloneCollection ( sourceProviderContainers ) ; com.android.builder.model.SourceProviderContainer testASP = com.android.build.gradle.internal.model.SourceProviderContainerImpl.create ( com.android.builder.model.AndroidProject.ARTIFACT_ANDROID_TEST , productFlavorData.getTestSourceSet ( VariantType.ANDROID_TEST ) ) ; clonedContainer.add ( testASP ) ; return new com.android.build.gradle.internal.model.ProductFlavorContainerImpl ( com.android.build.gradle.internal.model.ProductFlavorImpl.cloneFlavor ( productFlavorData.getProductFlavor ( ) , null , null ) , com.android.build.gradle.internal.model.SourceProviderImpl.cloneProvider ( productFlavorData.getSourceSet ( ) ) , clonedContainer ) ; }

Target:
static com.android.builder.model.ProductFlavorContainer createProductFlavorContainer ( @ com.android.annotations.NonNull com.android.build.gradle.internal.ProductFlavorData productFlavorData , @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SourceProviderContainer > sourceProviderContainers ) { java.util.List < com.android.builder.model.SourceProviderContainer > clonedContainer = com.android.build.gradle.internal.model.SourceProviderContainerImpl.cloneCollection ( sourceProviderContainers ) ; for ( com.android.builder.core.VariantType variantType : com.android.builder.core.VariantType.getTestingTypes ( ) ) { clonedContainer.add ( com.android.build.gradle.internal.model.SourceProviderContainerImpl.create ( variantType.getArtifactName ( ) , productFlavorData.getTestSourceSet ( variantType ) ) ) ; } return new com.android.build.gradle.internal.model.ProductFlavorContainerImpl ( com.android.build.gradle.internal.model.ProductFlavorImpl.cloneFlavor ( productFlavorData.getProductFlavor ( ) , null , null ) , com.android.build.gradle.internal.model.SourceProviderImpl.cloneProvider ( productFlavorData.getSourceSet ( ) ) , clonedContainer ) ; }
Source:
public com.android.ide.eclipse.adt.internal.editors.ui.DecorComposite setContent ( com.android.ide.eclipse.adt.internal.editors.ui.IDecorContent content ) { mContent = content ; content.createControl ( this ) ; com.android.ide.eclipse.adt.internal.editors.ui.GridDataBuilder.create ( content.getControl ( ) ) . hSpan ( 2 ) . grab ( ) . fill ( ) ; java.lang.String t = content.getTitle ( ) ; if ( t != null ) { setTitle ( t ) ; } org.eclipse.swt.graphics.Image i = content.getImage ( ) ; if ( i != null ) { setImage ( i ) ; } return this ; }

Target:
public com.android.ide.eclipse.adt.internal.editors.ui.DecorComposite setContent ( com.android.ide.eclipse.adt.internal.editors.ui.IDecorContent content ) { mContent = content ; content.createControl ( this ) ; com.android.ide.eclipse.adt.internal.editors.ui.GridDataBuilder.create ( content.getControl ( ) ) . hSpan ( 2 ) . grab ( ) . fill ( ) ; java.lang.String t = content.getTitle ( ) ; if ( t != null ) { setTitle ( t ) ; } org.eclipse.swt.graphics.Image i = content.getImage ( ) ; if ( i != null ) { setImage ( i ) ; } content.createToolbarItems ( mToolbar ) ; return this ; }
Source:
public void testEncode_CharBuffer_Normal ( ) throws java.lang.Exception { tests.api.java.nio.charset.CharsetTest.MockCharset c1 = new tests.api.java.nio.charset.CharsetTest.MockCharset ( "testEncode_CharBuffer_Normal_mock" , null ) ; java.nio.ByteBuffer bb = c1.encode ( java.nio.CharBuffer.wrap ( "abcdefg" ) ) ; assertEquals ( "abcdefg" , new java.lang.String ( bb.array ( ) , "iso8859-1" ) ) ; bb = c1.encode ( java.nio.CharBuffer.wrap ( "" ) ) ; assertEquals ( "" , new java.lang.String ( bb.array ( ) , "iso8859-1" ) ) ; }

Target:
public void testEncode_CharBuffer_Normal ( ) throws java.lang.Exception { org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset c1 = new org.apache.harmony.tests.java.nio.charset.CharsetTest.MockCharset ( "testEncode_CharBuffer_Normal_mock" , null ) ; java.nio.ByteBuffer bb = c1.encode ( java.nio.CharBuffer.wrap ( "abcdefg" ) ) ; assertEquals ( "abcdefg" , new java.lang.String ( bb.array ( ) , "iso8859-1" ) ) ; bb = c1.encode ( java.nio.CharBuffer.wrap ( "" ) ) ; assertEquals ( "" , new java.lang.String ( bb.array ( ) , "iso8859-1" ) ) ; }
Source:
private void setupSources ( ) { mUpdaterData.setupDefaultSources ( ) ; mRemotePackagesPage.onSdkReload ( ) ; }

Target:
private void createPages ( ) { mAvdManagerPage = new com.android.sdkuilib.internal.repository.AvdManagerPage ( mPagesRootComposite , mUpdaterData ) ; if ( ( java.lang.System.getenv ( "EXPERIMENTAL" ) ) != null ) { mPackagesPage = new com.android.sdkuilib.internal.repository.PackagesPage ( mPagesRootComposite , mUpdaterData ) ; } else { mLocalPackagePage = new com.android.sdkuilib.internal.repository.LocalPackagesPage ( mPagesRootComposite , mUpdaterData ) ; mRemotePackagesPage = new com.android.sdkuilib.internal.repository.RemotePackagesPage ( mPagesRootComposite , mUpdaterData ) ; } }
Source:
public java.lang.String getVisualVoicemailPackageName ( java.lang.String callingPackage , int subId ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( canReadPhoneState ( callingPackage , "getVisualVoicemailPackageName" ) ) ) { return null ; } return com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; }

Target:
public java.lang.String getVisualVoicemailPackageName ( java.lang.String callingPackage , int subId ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getVisualVoicemailPackageName" ) ) ) { return null ; } return com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; }
Source:
public void testRunner_LazyTestCreationTest ( ) throws java.lang.Exception { vogar.target.TestRunner runner = testRunnerRule.createTestRunner ( ) ; runner.run ( ) ; expectedResults ( ) . success ( "test1" , "Creating\n" ) . success ( "test2" , "Creating\n" ) . completedNormally ( ) ; }

Target:
public void testRunner_AnnotatedMethodsTest ( ) throws java.lang.Exception { vogar.target.TestRunner runner = testRunnerRule.createTestRunner ( ) ; runner.run ( ) ; expectedResults ( ) . text ( "Before Class\n" ) . success ( "test1" , "Before\nTest 1\nAfter\n" ) . success ( "test2" , "Before\nTest 2\nAfter\n" ) . text ( "After Class\n" ) . completedNormally ( ) ; }
Source:
public void loadEFImgTransparent ( int fileid , int highOffset , int lowOffset , int length , com.android.internal.telephony.uicc.Message onLoaded ) { com.android.internal.telephony.uicc.Message response = obtainMessage ( com.android.internal.telephony.uicc.EVENT_READ_ICON_DONE , fileid , 0 , onLoaded ) ; mCi.iccIOForApp ( com.android.internal.telephony.uicc.COMMAND_GET_RESPONSE , fileid , getEFPath ( fileid ) , 0 , 0 , com.android.internal.telephony.uicc.GET_RESPONSE_EF_IMG_SIZE_BYTES , null , null , mAid , response ) ; }

Target:
public void loadEFImgTransparent ( int fileid , int highOffset , int lowOffset , int length , com.android.internal.telephony.uicc.Message onLoaded ) { com.android.internal.telephony.uicc.Message response = obtainMessage ( com.android.internal.telephony.uicc.EVENT_READ_ICON_DONE , fileid , 0 , onLoaded ) ; mCi.iccIOForApp ( com.android.internal.telephony.uicc.COMMAND_GET_RESPONSE , fileid , getEFPath ( com.android.internal.telephony.uicc.EF_IMG ) , 0 , 0 , com.android.internal.telephony.uicc.GET_RESPONSE_EF_IMG_SIZE_BYTES , null , null , mAid , response ) ; }
Source:
public boolean hasCarrierPrivileges ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return ( telephony.getCarrierPrivilegeStatus ( ) ) == ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "hasCarrierPrivileges RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "hasCarrierPrivileges NPE" , ex ) ; } return false ; }

Target:
public boolean hasCarrierPrivileges ( int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return ( telephony.getCarrierPrivilegeStatus ( mSubId ) ) == ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ; } } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "hasCarrierPrivileges RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "hasCarrierPrivileges NPE" , ex ) ; } return false ; }
Source:
public void doneVisiting ( org.eclipse.core.resources.IProject project , java.util.List < org.eclipse.core.runtime.IPath > sourceFolders ) { if ( mDeltaVisitor.getForceCompile ( ) ) { buildCompilationList ( project , sourceFolders ) ; } else { mergeFileModifications ( mDeltaVisitor ) ; } mDeltaVisitor.reset ( ) ; saveState ( project ) ; }

Target:
public final boolean loadState ( org.eclipse.core.resources.IProject project ) { return com.android.ide.eclipse.adt.internal.project.ProjectHelper.loadBooleanProperty ( project , getSavePropertyName ( ) , true ) ; }
Source:
private static int linearWithVeryLargeNegativeStride ( ) { int [ ] x = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 } ; int result = 0 ; int k = 0 ; for ( int i = - 2 ; i > - 2147483648 ; i -= 195225786 ) { result += x [ ( k ++ ) ] ; } return result ; }

Target:
private static int linearWithVeryLargeNegativeStride ( ) { int [ ] x = new int [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 } ; int result = 0 ; int k = 0 ; for ( int i = - 2 ; i > ( java.lang.Integer.MIN_VALUE ) ; i -= 195225786 ) { result += x [ ( k ++ ) ] ; } return result ; }
Source:
public double getRxPacketRate ( ) { return mWifiInfo.rxSuccessRate ; }

Target:
public int syncGetSupportedFeatures ( com.android.internal.util.AsyncChannel channel ) { android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_GET_SUPPORTED_FEATURES ) ; int supportedFeatureSet = resultMsg.arg1 ; resultMsg.recycle ( ) ; boolean disableRtt = mPropertyService.getBoolean ( "config.disable_rtt" , false ) ; if ( disableRtt ) { supportedFeatureSet &= ~ ( ( android.net.wifi.WifiManager.WIFI_FEATURE_D2D_RTT ) | ( android.net.wifi.WifiManager.WIFI_FEATURE_D2AP_RTT ) ) ; } return supportedFeatureSet ; }
Source:
protected static java.io.File getJackFile ( @ javax.annotation.Nonnull java.lang.String typeName ) { return new java.io.File ( com.android.jack.experimental.incremental.JackIncremental.jackFilesFolder , ( ( ( FileType.JAYCE.getPrefix ( ) ) + ( java.io.File.separatorChar ) ) + ( new com.android.sched.vfs.VPath ( ( typeName + ( com.android.jack.backend.jayce.JayceFileImporter.JAYCE_FILE_EXTENSION ) ) , com.android.jack.experimental.incremental.JackIncremental.fileSeparator ) . getPathAsString ( java.io.File.separatorChar ) ) ) ) ; }

Target:
protected static java.io.File getDexFile ( @ javax.annotation.Nonnull java.lang.String typeName ) { assert ( com.android.jack.experimental.incremental.JackIncremental.incrementalInputLibrary ) != null ; return new java.io.File ( com.android.jack.experimental.incremental.JackIncremental.incrementalFolder , FileType.DEX.buildFileVPath ( new com.android.sched.vfs.VPath ( typeName , com.android.jack.experimental.incremental.JackIncremental.fileSeparator ) ) . getPathAsString ( java.io.File.separatorChar ) ) ; }
Source:
public final void updateAAD ( byte [ ] src , int offset , int len ) { checkCipherState ( ) ; if ( ( ( ( src == null ) || ( offset < 0 ) ) || ( len < 0 ) ) || ( ( len + offset ) > ( src.length ) ) ) { throw new java.lang.IllegalArgumentException ( "Bad arguments" ) ; } chooseFirstProvider ( ) ; if ( len == 0 ) { return ; } spi.engineUpdateAAD ( src , offset , len ) ; }

Target:
public final void updateAAD ( byte [ ] src , int offset , int len ) { checkCipherState ( ) ; if ( ( ( ( src == null ) || ( offset < 0 ) ) || ( len < 0 ) ) || ( ( len + offset ) > ( src.length ) ) ) { throw new java.lang.IllegalArgumentException ( "Bad arguments" ) ; } updateProviderIfNeeded ( ) ; if ( len == 0 ) { return ; } spi.engineUpdateAAD ( src , offset , len ) ; }
Source:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_TERMINATED_REASON_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( subscribeId , WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }

Target:
public void testSubscribeTerminatedFail ( ) throws org.json.JSONException { final int subscribeId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "subscribe_id" , subscribeId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_STATUS_INTERNAL_FAILURE ) ; com.android.server.wifi.aware.WifiAwareHalMock.callSubscribeTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( subscribeId , WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL , false ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public java.util.Set < ? extends javax.lang.model.element.Element > process ( com.google.common.collect.SetMultimap < java.lang.Class < ? extends java.lang.annotation.Annotation > , javax.lang.model.element.Element > elementsByAnnotation ) { for ( javax.lang.model.element.Element element : elementsByAnnotation.get ( com.android.dialer.inject.DialerRootComponent.class ) ) { if ( ( elementsByAnnotation.containsKey ( com.android.dialer.inject.InstallIn.class ) ) || ( elementsByAnnotation.containsKey ( com.android.dialer.inject.IncludeInDialerRoot.class ) ) ) { return elementsByAnnotation.get ( com.android.dialer.inject.DialerRootComponent.class ) ; } else { generateRootComponent ( com.google.auto.common.MoreElements.asType ( element ) ) ; } } return java.util.Collections.emptySet ( ) ; }

Target:
public java.util.Set < ? extends javax.lang.model.element.Element > process ( com.google.common.collect.SetMultimap < java.lang.Class < ? extends java.lang.annotation.Annotation > , javax.lang.model.element.Element > elementsByAnnotation ) { for ( javax.lang.model.element.Element element : elementsByAnnotation.get ( com.android.dialer.inject.DialerRootComponent.class ) ) { if ( shouldDeferRootComponent ( elementsByAnnotation ) ) { return elementsByAnnotation.get ( com.android.dialer.inject.DialerRootComponent.class ) ; } else { generateRootComponent ( com.google.auto.common.MoreElements.asType ( element ) ) ; } } return java.util.Collections.emptySet ( ) ; }
Source:
private long readLong ( java.lang.String path ) { try ( final java.io.FileInputStream fis = new java.io.FileInputStream ( path ) ; final java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.InputStreamReader ( fis ) ) ) { return java.lang.Long.parseLong ( reader.readLine ( ) ) ; } catch ( java.lang.Exception e ) { android.util.Slog.w ( android.os.storage.StorageManager.TAG , ( "Could not read " + path ) , e ) ; return 0 ; } }

Target:
private static long readLong ( java.lang.String path ) { try ( final java.io.FileInputStream fis = new java.io.FileInputStream ( path ) ; final java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.InputStreamReader ( fis ) ) ) { return java.lang.Long.parseLong ( reader.readLine ( ) ) ; } catch ( java.lang.Exception e ) { android.util.Slog.w ( android.os.storage.StorageManager.TAG , ( ( ( "readLong(): could not read " + path ) + ": " ) + e ) ) ; return 0 ; } }
Source:
public java.lang.String getLookupUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getLookupUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getLookupUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : return com.android.dialer.common.Assert.isNotNull ( phoneLookupInfo.getPeopleApiInfo ( ) . getLookupUri ( ) ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getLookupUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getLookupUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getLookupUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : return com.android.dialer.common.Assert.isNotNull ( phoneLookupInfo.getPeopleApiInfo ( ) . getLookupUri ( ) ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
public void testBaseResourceSetByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceSet resourceSet = com.android.ide.common.res2.ResourceSetTest.getBaseResourceSet ( ) ; verifyResourceExists ( resourceSet , "drawable/icon" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testBaseResourceSetByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceSet resourceSet = com.android.ide.common.res2.ResourceSetTest.getBaseResourceSet ( ) ; verifyResourceExists ( resourceSet , "drawable/icon" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }