auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testReverting ( ) throws java.lang.Exception { createPatch ( ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; preparationResult.patch.getActions ( ) . add ( new com.intellij.updater.PatchFileCreatorTest.MyFailOnApplyPatchAction ( ) ) ; assertNothingHasChanged ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) ) ; }

Target:
public void testApplyingWithAbsentFileToDelete ( ) throws java.lang.Exception { com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; new java.io.File ( myOlderDir , "bin/idea.bat" ) . delete ( ) ; assertAppliedAndRevertedCorrectly ( patch , com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }
Source:
private static java.lang.String makeString ( java.lang.String [ ] strings ) { final java.util.StringJoiner sj = new java.util.StringJoiner ( "," , "[" , "]" ) ; for ( java.lang.String s : strings ) sj.add ( s ) ; return sj.toString ( ) ; }

Target:
private static java.lang.String makeString ( java.lang.String [ ] strings ) { if ( strings == null ) return "null" ; final java.util.StringJoiner sj = new java.util.StringJoiner ( "," , "[" , "]" ) ; for ( java.lang.String s : strings ) sj.add ( s ) ; return sj.toString ( ) ; }
Source:
private static org.bouncycastle.crypto.params.DHParameters fromPGQ ( java.lang.String hexP , java.lang.String hexG , java.lang.String hexQ ) { java.math.BigInteger p = new java.math.BigInteger ( 1 , org.bouncycastle.util.encoders.Hex.decode ( hexP ) ) ; java.math.BigInteger g = new java.math.BigInteger ( 1 , org.bouncycastle.util.encoders.Hex.decode ( hexG ) ) ; java.math.BigInteger q = new java.math.BigInteger ( 1 , org.bouncycastle.util.encoders.Hex.decode ( hexQ ) ) ; return new org.bouncycastle.crypto.params.DHParameters ( p , g , q ) ; }

Target:
private static org.bouncycastle.crypto.params.DHParameters fromPGQ ( java.lang.String hexP , java.lang.String hexG , java.lang.String hexQ ) { return new org.bouncycastle.crypto.params.DHParameters ( org.bouncycastle.crypto.agreement.DHStandardGroups.fromHex ( hexP ) , org.bouncycastle.crypto.agreement.DHStandardGroups.fromHex ( hexG ) , org.bouncycastle.crypto.agreement.DHStandardGroups.fromHex ( hexQ ) ) ; }
Source:
public javax.net.ssl.SSLEngine engineCreateSSLEngine ( java.lang.String host , int port ) { if ( ( sslParameters ) == null ) { throw new java.lang.IllegalStateException ( "SSLContext is not initialized." ) ; } org.conscrypt.SSLParametersImpl p = ( ( org.conscrypt.SSLParametersImpl ) ( sslParameters.clone ( ) ) ) ; p.setUseClientMode ( false ) ; return new org.conscrypt.SSLEngineImpl ( host , port , p ) ; }

Target:
public javax.net.ssl.SSLEngine engineCreateSSLEngine ( java.lang.String host , int port ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
public void testSubList3_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.subList ( 3 , 1 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testRemove2_IndexOutOfBounds ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.remove ( list.size ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public boolean setInterfaceUp ( boolean up ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.setInterfaceUpNative ( up ) ; } else { return false ; } } }

Target:
public boolean equals ( java.lang.Object otherObj ) { if ( ( this ) == otherObj ) { return true ; } else if ( ( otherObj == null ) || ( ( getClass ( ) ) != ( otherObj.getClass ( ) ) ) ) { return false ; } com.android.server.wifi.WifiNative.HiddenNetwork other = ( ( com.android.server.wifi.WifiNative.HiddenNetwork ) ( otherObj ) ) ; return java.util.Objects.equals ( ssid , other.ssid ) ; }
Source:
public static java.nio.DoubleBuffer wrap ( double [ ] array , int start , int doubleCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , doubleCount ) ; java.nio.DoubleBuffer buf = new java.nio.ReadWriteDoubleArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + doubleCount ; return buf ; }

Target:
public static java.nio.DoubleBuffer wrap ( double [ ] array , int start , int doubleCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , doubleCount ) ; java.nio.DoubleBuffer buf = new java.nio.DoubleArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + doubleCount ; return buf ; }
Source:
private static org.eclipse.jdt.internal.compiler.impl.CompilerOptions getCompilerOptions ( ) { org.eclipse.jdt.internal.compiler.impl.CompilerOptions options = new org.eclipse.jdt.internal.compiler.impl.CompilerOptions ( ) ; options.complianceLevel = org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7 ; options.sourceLevel = org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7 ; options.targetJDK = org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7 ; options.parseLiteralExpressionsAsConstants = true ; options.analyseResourceLeaks = false ; options.docCommentSupport = false ; options.defaultEncoding = "UTF-8" ; options.suppressOptionalErrors = true ; options.generateClassFiles = false ; options.isAnnotationBasedNullAnalysisEnabled = false ; options.reportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable = false ; options.reportUnusedDeclaredThrownExceptionIncludeDocCommentReference = false ; options.reportUnusedDeclaredThrownExceptionWhenOverriding = false ; options.reportUnusedParameterIncludeDocCommentReference = false ; options.reportUnusedParameterWhenImplementingAbstract = false ; options.reportUnusedParameterWhenOverridingConcrete = false ; options.suppressWarnings = true ; options.processAnnotations = true ; options.verbose = false ; return options ; }

Target:
private static org.eclipse.jdt.internal.compiler.impl.CompilerOptions getCompilerOptions ( ) { org.eclipse.jdt.internal.compiler.impl.CompilerOptions options = new org.eclipse.jdt.internal.compiler.impl.CompilerOptions ( ) ; options.complianceLevel = org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7 ; options.sourceLevel = org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7 ; options.targetJDK = org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7 ; options.parseLiteralExpressionsAsConstants = true ; options.analyseResourceLeaks = false ; options.docCommentSupport = false ; options.defaultEncoding = com.android.SdkConstants.UTF_8 ; options.suppressOptionalErrors = true ; options.generateClassFiles = false ; options.isAnnotationBasedNullAnalysisEnabled = false ; options.reportUnusedDeclaredThrownExceptionExemptExceptionAndThrowable = false ; options.reportUnusedDeclaredThrownExceptionIncludeDocCommentReference = false ; options.reportUnusedDeclaredThrownExceptionWhenOverriding = false ; options.reportUnusedParameterIncludeDocCommentReference = false ; options.reportUnusedParameterWhenImplementingAbstract = false ; options.reportUnusedParameterWhenOverridingConcrete = false ; options.suppressWarnings = true ; options.processAnnotations = true ; options.verbose = false ; return options ; }
Source:
public com.google.common.collect.MapMaker softKeys ( ) { return setKeyStrength ( com.google.common.collect.MapMakerInternalMap.Strength.SOFT ) ; }

Target:
com.google.common.collect.MapMaker setKeyStrength ( com.google.common.collect.MapMakerInternalMap.Strength strength ) { com.google.common.base.Preconditions.checkState ( ( ( keyStrength ) == null ) , "Key strength was already set to %s" , keyStrength ) ; keyStrength = com.google.common.base.Preconditions.checkNotNull ( strength ) ; com.google.common.base.Preconditions.checkArgument ( ( ( keyStrength ) != ( com.google.common.collect.MapMakerInternalMap.Strength.SOFT ) ) , "Soft keys are not supported" ) ; if ( strength != ( com.google.common.collect.MapMakerInternalMap.Strength.STRONG ) ) { useCustomMap = true ; } return this ; }
Source:
private void enforceVisualVoicemailPackage ( java.lang.String callingPackage , int subId ) { java.lang.String vvmPackage = com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; if ( ! ( callingPackage.equals ( vvmPackage ) ) ) { throw new java.lang.SecurityException ( ( ( "Caller not current active visual voicemail package[" + vvmPackage ) + "]" ) ) ; } }

Target:
private void enforceVisualVoicemailPackage ( java.lang.String callingPackage , int subId ) { android.content.ComponentName componentName = com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) ; if ( componentName == null ) { throw new java.lang.SecurityException ( "Caller not current active visual voicemail package[null]" ) ; } java.lang.String vvmPackage = componentName.getPackageName ( ) ; if ( ! ( callingPackage.equals ( vvmPackage ) ) ) { throw new java.lang.SecurityException ( ( ( "Caller not current active visual voicemail package[" + vvmPackage ) + "]" ) ) ; } }
Source:
public void setTargetPhoneAccount ( android.telecom.PhoneAccountHandle accountHandle ) { if ( ! ( java.util.Objects.equals ( mTargetPhoneAccountHandle , accountHandle ) ) ) { mTargetPhoneAccountHandle = accountHandle ; for ( com.android.server.telecom.Call.Listener l : mListeners ) { l.onTargetPhoneAccountChanged ( this ) ; } configureIsWorkCall ( ) ; checkIfVideoCapable ( ) ; } }

Target:
public boolean isLoggedSelfManaged ( ) { if ( ! ( isSelfManaged ( ) ) ) { return true ; } if ( ( getTargetPhoneAccount ( ) ) == null ) { return false ; } android.telecom.PhoneAccount phoneAccount = mCallsManager.getPhoneAccountRegistrar ( ) . getPhoneAccountUnchecked ( getTargetPhoneAccount ( ) ) ; if ( phoneAccount == null ) { return false ; } return ( ( phoneAccount.getExtras ( ) ) != null ) && ( phoneAccount.getExtras ( ) . getBoolean ( PhoneAccount.EXTRA_LOG_SELF_MANAGED_CALLS , false ) ) ; }
Source:
public int getCallStateForSlot ( int slotId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return android.telephony.TelephonyManager.CALL_STATE_IDLE ; return telephony.getCallStateForSlot ( slotId ) ; } catch ( android.os.RemoteException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } catch ( java.lang.NullPointerException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } }

Target:
public int getCallStateForSlot ( int slotIndex ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return android.telephony.TelephonyManager.CALL_STATE_IDLE ; return telephony.getCallStateForSlot ( slotIndex ) ; } catch ( android.os.RemoteException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } catch ( java.lang.NullPointerException ex ) { return android.telephony.TelephonyManager.CALL_STATE_IDLE ; } }
Source:
public void onLinkPropertiesChanged ( android.net.Network network , android.net.LinkProperties linkProperties ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLinkPropertiesChanged" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) { mEventFacade.postEvent ( TelephonyConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.telephony.TelephonyEvents.NetworkCallbackEvent ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE ) ) ; } }

Target:
public void onLinkPropertiesChanged ( android.net.Network network , android.net.LinkProperties linkProperties ) { com.googlecode.android_scripting.Log.d ( "NetworkCallback onLinkPropertiesChanged" ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventOnLinkPropertiesChanged ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_LINK_PROPERTIES_CHANGED ) , linkProperties.getInterfaceName ( ) ) ) ; } }
Source:
public void sendDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , ( ( "sendDtmf called with invalid character '" + c ) + "'" ) ) ; } else { if ( ( mCT.state ) == ( PhoneConstants.State.OFFHOOK ) ) { mCM.sendDtmf ( c , null ) ; } } }

Target:
public void sendDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , ( ( "sendDtmf called with invalid character '" + c ) + "'" ) ) ; } else { if ( ( mCT.mState ) == ( PhoneConstants.State.OFFHOOK ) ) { mCi.sendDtmf ( c , null ) ; } } }
Source:
private boolean shouldTurnOffFullNetworkUpdate ( ) { return ( mIsPowerSaveOn ) || ( ( ( ! ( mIsCharging ) ) && ( ! ( mIsScreenOn ) ) ) && ( ! ( mIsTetheringOn ) ) ) ; }

Target:
private boolean shouldTurnOffFullNetworkUpdate ( ) { if ( mIsPowerSaveOn ) { return true ; } if ( ( ( ( mIsCharging ) || ( mIsScreenOn ) ) || ( mIsTetheringOn ) ) || ( ( mUpdateModes.get ( TelephonyManager.INDICATION_FILTER_FULL_NETWORK_STATE ) ) == ( android.telephony.TelephonyManager.INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF ) ) ) { return false ; } return true ; }
Source:
public static void recordEnumeratedHistogram ( java.lang.String name , int sample , int boundary ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , boundary ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void recordEnumeratedHistogram ( java.lang.String name , int sample , int boundary ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , boundary ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public com.android.tools.lint.detector.api.Location getLocation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { return com.android.tools.lint.detector.api.Location.create ( context.file , pos , ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( pos.getEnd ( ) ) ) ) ; } return com.android.tools.lint.detector.api.Location.create ( context.file ) ; }

Target:
public com.android.tools.lint.detector.api.Location getLocation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { com.android.tools.lint.LintCliXmlParser.OffsetPosition pos = ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( mParser.getPosition ( node , ( - 1 ) , ( - 1 ) ) ) ) ; if ( pos != null ) { return com.android.tools.lint.detector.api.Location.create ( context.file , pos , ( ( com.android.tools.lint.LintCliXmlParser.OffsetPosition ) ( pos.getEnd ( ) ) ) ) ; } return com.android.tools.lint.detector.api.Location.create ( context.file ) ; }
Source:
public void stopStreaming ( ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { mService.stopStreaming ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.DeadObjectException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_SERVICE_LOST ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , ( "Caught remote exception calling stopStreaming: " + e ) ) ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } }

Target:
public void dispose ( ) throws android.telephony.mbms.MbmsException { if ( ( mService ) == null ) { throw new java.lang.IllegalStateException ( "No streaming service attached" ) ; } try { mService.disposeStream ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , "Remote process died" ) ; mService = null ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_SERVICE_LOST ) ; } }
Source:
void setPermissionsResult ( boolean accepted ) { if ( ! ( mSealed ) ) { throw new java.lang.SecurityException ( "Must be sealed to accept permissions" ) ; } if ( accepted ) { mPermissionsAccepted = true ; mHandler.obtainMessage ( com.android.server.pm.PackageInstallerSession.MSG_COMMIT ) . sendToTarget ( ) ; } else { destroyInternal ( ) ; dispatchSessionFinished ( android.content.pm.PackageManager.INSTALL_FAILED_ABORTED , "User rejected permissions" , null ) ; } }

Target:
void setPermissionsResult ( boolean accepted ) { if ( ! ( mSealed ) ) { throw new java.lang.SecurityException ( "Must be sealed to accept permissions" ) ; } if ( accepted ) { synchronized ( mLock ) { mPermissionsAccepted = true ; } mHandler.obtainMessage ( com.android.server.pm.PackageInstallerSession.MSG_COMMIT ) . sendToTarget ( ) ; } else { destroyInternal ( ) ; dispatchSessionFinished ( android.content.pm.PackageManager.INSTALL_FAILED_ABORTED , "User rejected permissions" , null ) ; } }
Source:
public void onCreate ( ) { super . setTheme ( mTheme ) ; super . onCreate ( ) ; mImm = ( ( android.view.inputmethod.InputMethodManager ) ( getSystemService ( android.inputmethodservice.INPUT_METHOD_SERVICE ) ) ) ; mInflater = ( ( android.view.LayoutInflater ) ( getSystemService ( Context.LAYOUT_INFLATER_SERVICE ) ) ) ; mWindow = new android.inputmethodservice.SoftInputWindow ( this , mTheme ) ; initViews ( ) ; mWindow.getWindow ( ) . setLayout ( android.view.ViewGroup.LayoutParams.FILL_PARENT , android.view.ViewGroup.LayoutParams.WRAP_CONTENT ) ; }

Target:
public void onCreate ( ) { super . setTheme ( mTheme ) ; super . onCreate ( ) ; mImm = ( ( android.view.inputmethod.InputMethodManager ) ( getSystemService ( android.inputmethodservice.INPUT_METHOD_SERVICE ) ) ) ; mInflater = ( ( android.view.LayoutInflater ) ( getSystemService ( Context.LAYOUT_INFLATER_SERVICE ) ) ) ; mWindow = new android.inputmethodservice.SoftInputWindow ( this , mTheme , mDispatcherState ) ; initViews ( ) ; mWindow.getWindow ( ) . setLayout ( android.view.ViewGroup.LayoutParams.FILL_PARENT , android.view.ViewGroup.LayoutParams.WRAP_CONTENT ) ; }
Source:
public void loadState ( org.jdom.Element state ) { myState.clear ( ) ; for ( org.jdom.Element action : state.getChildren ( "action" ) ) { final java.lang.String id = action.getAttributeValue ( "actionId" ) ; final java.lang.String clicks = action.getAttributeValue ( "clicks" ) ; try { final com.intellij.promoter.PromoterState info = new com.intellij.promoter.PromoterState ( ) ; info.setClicks ( java.lang.Integer.parseInt ( clicks ) ) ; myState.put ( id , info ) ; } catch ( java.lang.Exception ignore ) { } } }

Target:
public void loadState ( org.jdom.Element state ) { myState.clear ( ) ; for ( org.jdom.Element action : state.getChildren ( "action" ) ) { try { com.intellij.promoter.PromoterState info = new com.intellij.promoter.PromoterState ( ) ; info.setClicks ( com.intellij.openapi.util.text.StringUtil.parseInt ( action.getAttributeValue ( "clicks" ) , 0 ) ) ; myState.put ( action.getAttributeValue ( "actionId" ) , info ) ; } catch ( java.lang.Exception ignore ) { } } }
Source:
private static android.icu.util.GenderInfo load ( android.icu.util.ULocale ulocale ) { android.icu.util.UResourceBundle rb = android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , "genderList" , ICUResourceBundle.ICU_DATA_CLASS_LOADER , true ) ; android.icu.util.UResourceBundle genderList = rb.get ( "genderList" ) ; try { return new android.icu.util.GenderInfo ( android.icu.util.GenderInfo.ListGenderStyle.fromName ( genderList.getString ( ulocale.toString ( ) ) ) ) ; } catch ( java.util.MissingResourceException mre ) { return null ; } }

Target:
private static android.icu.util.GenderInfo load ( android.icu.util.ULocale ulocale ) { android.icu.util.UResourceBundle rb = android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , "genderList" , ICUResourceBundle.ICU_DATA_CLASS_LOADER , true ) ; android.icu.util.UResourceBundle genderList = rb.get ( "genderList" ) ; try { return new android.icu.util.GenderInfo ( android.icu.util.GenderInfo.ListGenderStyle.fromName ( genderList.getString ( ulocale.toString ( ) ) ) ) ; } catch ( java.util.MissingResourceException mre ) { return null ; } }
Source:
private static java.lang.String getNotificationText ( @ android.support.annotation.NonNull android.content.Context context , android.telecom.PhoneAccountHandle handle , java.lang.String voicemailNumber ) { if ( ( com.android.dialer.telecom.TelecomUtil.getCallCapablePhoneAccounts ( context ) . size ( ) ) > 1 ) { android.telecom.TelecomManager telecomManager = context.getSystemService ( android.telecom.TelecomManager.class ) ; android.telecom.PhoneAccount phoneAccount = telecomManager.getPhoneAccount ( handle ) ; return phoneAccount.getShortDescription ( ) . toString ( ) ; } else { return java.lang.String.format ( context.getString ( R.string.notification_voicemail_text_format ) , android.telephony.PhoneNumberUtils.formatNumber ( voicemailNumber ) ) ; } }

Target:
private static java.lang.String getNotificationText ( @ android.support.annotation.NonNull android.content.Context context , android.telecom.PhoneAccountHandle handle , java.lang.String voicemailNumber ) { if ( ( com.android.dialer.telecom.TelecomUtil.getCallCapablePhoneAccounts ( context ) . size ( ) ) > 1 ) { android.telecom.TelecomManager telecomManager = context.getSystemService ( android.telecom.TelecomManager.class ) ; android.telecom.PhoneAccount phoneAccount = telecomManager.getPhoneAccount ( handle ) ; return phoneAccount.getShortDescription ( ) . toString ( ) ; } else { return java.lang.String.format ( context.getString ( R.string.notification_voicemail_text_format ) , com.android.dialer.phonenumberutil.PhoneNumberHelper.formatNumber ( context , voicemailNumber , com.android.dialer.location.GeoUtil.getCurrentCountryIso ( context ) ) ) ; } }
Source:
public void factoryReset ( int subId ) { enforceConnectivityInternalPermission ( ) ; if ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_NETWORK_RESET ) ) { return ; } final long identity = android.os.Binder.clearCallingIdentity ( ) ; try { if ( ( android.telephony.SubscriptionManager.isUsableSubIdValue ( subId ) ) && ( ! ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS ) ) ) ) { setDataEnabled ( subId , true ) ; setNetworkSelectionModeAutomatic ( subId ) ; setPreferredNetworkType ( subId , Phone.PREFERRED_NT_MODE ) ; mPhone.setDataRoamingEnabled ( false ) ; } } finally { android.os.Binder.restoreCallingIdentity ( identity ) ; } }

Target:
public void factoryReset ( int subId ) { enforceConnectivityInternalPermission ( ) ; if ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_NETWORK_RESET ) ) { return ; } final long identity = android.os.Binder.clearCallingIdentity ( ) ; try { if ( ( android.telephony.SubscriptionManager.isUsableSubIdValue ( subId ) ) && ( ! ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS ) ) ) ) { setUserDataEnabled ( subId , true ) ; setNetworkSelectionModeAutomatic ( subId ) ; setPreferredNetworkType ( subId , Phone.PREFERRED_NT_MODE ) ; mPhone.setDataRoamingEnabled ( false ) ; } } finally { android.os.Binder.restoreCallingIdentity ( identity ) ; } }
Source:
public static void computeTrunc ( android.renderscript.cts.TestTrunc.ArgumentsFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; int sign = ( ( java.lang.Float.floatToIntBits ( args.in ) ) > > 31 ) & 1 ; float trunc = ( ( int ) ( args.in ) ) ; if ( ( sign == 1 ) && ( trunc == ( + 0.0F ) ) ) { trunc = - 0.0F ; } args.out = trunc ; }

Target:
public static void computeCos ( android.renderscript.cts.TestCos.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.cos ( args.in ) , 4 , 128 ) ; }
Source:
public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { android.view.inputmethod.InputMethodManager imm = ( ( android.view.inputmethod.InputMethodManager ) ( getInstrumentation ( ) . getTargetContext ( ) . getSystemService ( Context.INPUT_METHOD_SERVICE ) ) ) ; imm.showSoftInput ( view , 0 ) ; uiController.loopMainThreadUntilIdle ( ) ; }

Target:
public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { android.view.inputmethod.InputMethodManager imm = ( ( android.view.inputmethod.InputMethodManager ) ( android.support.test.InstrumentationRegistry.getInstrumentation ( ) . getTargetContext ( ) . getSystemService ( Context.INPUT_METHOD_SERVICE ) ) ) ; imm.showSoftInput ( view , 0 ) ; uiController.loopMainThreadUntilIdle ( ) ; }
Source:
public void requestLinkProperties ( android.net.ConnectivityManager.NetworkCallback networkCallback ) { try { mService.requestLinkProperties ( networkCallback.networkRequest ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void requestNetwork ( android.net.NetworkRequest request , android.net.ConnectivityManager.NetworkCallback networkCallback , int timeoutMs ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( ( "Non-positive timeoutMs: " + timeoutMs ) ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , getDefaultHandler ( ) ) ; }
Source:
public final void readAnnotation ( ) { int typeIndex = com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ; int size = com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ; visitAnnotation ( typeIndex , size ) ; for ( int i = 0 ; i < size ; i ++ ) { visitAnnotationName ( com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ) ; readValue ( ) ; } }

Target:
public int readArray ( ) { checkType ( com.android.dx.io.EncodedValueReader.ENCODED_ARRAY ) ; type = com.android.dx.io.EncodedValueReader.MUST_READ ; return com.android.dx.util.Leb128Utils.readUnsignedLeb128 ( in ) ; }
Source:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps" ) ; }

Target:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { android.support.test.uiautomator.UiDevice device = android.support.test.uiautomator.UiDevice.getInstance ( instrumentation ) ; if ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) >= 26 ) { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps & notifications" ) ; device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( "App info" ) ) . clickAndWaitForNewWindow ( ) ; } else { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps" ) ; } }
Source:
public void onHideCustomView ( ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onHideCustomView" ) ; mWebChromeClient.onHideCustomView ( ) ; } org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onHideCustomView ( ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onHideCustomView" ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onHideCustomView" ) ; mWebChromeClient.onHideCustomView ( ) ; } } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onHideCustomView" ) ; } }
Source:
public void testTagKeyword ( ) { com.android.ddmuilib.logcat.LogCatMessage msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "" , "tag" , "" , "sample message" ) ; assertEquals ( false , search ( "t.*" , msg ) ) ; assertEquals ( true , search ( "tag:t.*" , msg ) ) ; }

Target:
public void testTagKeyword ( ) { com.android.ddmlib.logcat.LogCatMessage msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "" , "tag" , "" , "sample message" ) ; assertEquals ( false , search ( "t.*" , msg ) ) ; assertEquals ( true , search ( "tag:t.*" , msg ) ) ; }
Source:
public void addMessageToConsole ( java.lang.String message , int lineNumber , java.lang.String sourceID ) { com.android.browser.ErrorConsoleView errorConsole = mTabControl.getCurrentErrorConsole ( true ) ; errorConsole.addErrorMessage ( message , sourceID , lineNumber ) ; if ( ( mShouldShowErrorConsole ) && ( ( errorConsole.getShowState ( ) ) != ( ErrorConsoleView.SHOW_MAXIMIZED ) ) ) { errorConsole.showConsole ( ErrorConsoleView.SHOW_MINIMIZED ) ; } android.util.Log.w ( com.android.browser.BrowserActivity.LOGTAG , ( ( ( ( ( "Console: " + message ) + " " ) + sourceID ) + ":" ) + lineNumber ) ) ; }

Target:
public void onConsoleMessage ( java.lang.String message , int lineNumber , java.lang.String sourceID ) { com.android.browser.ErrorConsoleView errorConsole = mTabControl.getCurrentErrorConsole ( true ) ; errorConsole.addErrorMessage ( message , sourceID , lineNumber ) ; if ( ( mShouldShowErrorConsole ) && ( ( errorConsole.getShowState ( ) ) != ( ErrorConsoleView.SHOW_MAXIMIZED ) ) ) { errorConsole.showConsole ( ErrorConsoleView.SHOW_MINIMIZED ) ; } android.util.Log.w ( com.android.browser.BrowserActivity.LOGTAG , ( ( ( ( ( "Console: " + message ) + " " ) + sourceID ) + ":" ) + lineNumber ) ) ; }
Source:
public java.lang.String getIsimImpi ( ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimImpi ( ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getIsimImpi ( ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimImpi ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
public void testWildcardMatchingEmptySubstring ( ) { assertTrue ( verifier.verifyHostName ( "imap.google.com" , "imap*.google.com" ) ) ; }

Target:
public void testWildcardsRejectedForIpAddress ( ) { assertFalse ( verifyWithServerCertificate ( "1.2.3.4" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=*.2.3.4" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "1.2.3.4" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=*.2.3.4" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "*.2.3.4" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "*.2.3.4" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "2001:1234::1" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=*:1234::1" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "2001:1234::1" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=*:1234::1" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_IPA_NAME , "*:1234::1" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "*:1234::1" ) ) ) ; }
Source:
public java.util.Iterator < java.util.Map.Entry < K , java.util.Collection < V > > > iterator ( ) { return entryIterator ( ) ; }

Target:
public java.util.Iterator < java.util.Map.Entry < K , java.util.Collection < V > > > iterator ( ) { return com.google.common.collect.Maps.asMapEntryIterator ( multimap.keySet ( ) , new com.google.common.base.Function < K , java.util.Collection < V > > ( ) { @ java.lang.Override public java.util.Collection < V > apply ( K key ) { return multimap.get ( key ) ; } } ) ; }
Source:
static com.google.currysrc.api.transform.TransformRule [ ] getRepackagingRules ( ) { return new com.google.currysrc.api.transform.TransformRule [ ] { com.android.icu4j.srcgen.Icu4jTransformRules.createMandatoryRule ( new com.google.currysrc.transformers.InsertHeader ( com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.SOURCE_CODE_HEADER ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createMandatoryRule ( new com.google.currysrc.transformers.RenamePackage ( com.android.icu4j.srcgen.Icu4jTransform.ORIGINAL_ICU_PACKAGE , com.android.icu4j.srcgen.Icu4jTransform.ANDROID_ICU_PACKAGE ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.ModifyQualifiedNames ( com.android.icu4j.srcgen.Icu4jTransform.ORIGINAL_ICU_PACKAGE , com.android.icu4j.srcgen.Icu4jTransform.ANDROID_ICU_PACKAGE ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.ModifyStringLiterals ( com.android.icu4j.srcgen.Icu4jTransform.ORIGINAL_ICU_PACKAGE , com.android.icu4j.srcgen.Icu4jTransform.ANDROID_ICU_PACKAGE ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.transformers.ModifyStringLiterals ( "com/ibm/icu" , "android/icu" ) ) } ; }

Target:
static com.google.currysrc.api.process.Rule [ ] getRepackagingRules ( ) { return new com.google.currysrc.api.process.Rule [ ] { com.android.icu4j.srcgen.Icu4jTransformRules.createMandatoryRule ( new com.google.currysrc.processors.InsertHeader ( com.android.icu4j.srcgen.Icu4jTransform.Icu4jRules.SOURCE_CODE_HEADER ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createMandatoryRule ( new com.google.currysrc.processors.RenamePackage ( com.android.icu4j.srcgen.Icu4jTransform.ORIGINAL_ICU_PACKAGE , com.android.icu4j.srcgen.Icu4jTransform.ANDROID_ICU_PACKAGE ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.processors.ModifyQualifiedNames ( com.android.icu4j.srcgen.Icu4jTransform.ORIGINAL_ICU_PACKAGE , com.android.icu4j.srcgen.Icu4jTransform.ANDROID_ICU_PACKAGE ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.processors.ModifyStringLiterals ( com.android.icu4j.srcgen.Icu4jTransform.ORIGINAL_ICU_PACKAGE , com.android.icu4j.srcgen.Icu4jTransform.ANDROID_ICU_PACKAGE ) ) , com.android.icu4j.srcgen.Icu4jTransformRules.createOptionalRule ( new com.google.currysrc.processors.ModifyStringLiterals ( "com/ibm/icu" , "android/icu" ) ) } ; }
Source:
public final void dumpInstanceCounts ( ) { for ( com.android.tools.perflib.heap.ClassObj theClass : mClassesById.values ( ) ) { int count = theClass.mInstances.size ( ) ; if ( count > 0 ) { java.lang.System.out.println ( ( ( theClass + ": " ) + count ) ) ; } } }

Target:
public final com.android.tools.perflib.heap.ClassObj getClass ( long id ) { return mClassesById.get ( id ) ; }
Source:
protected java.security.PublicKey engineGeneratePublic ( java.security.spec.KeySpec keySpec ) throws java.security.spec.InvalidKeySpecException { if ( keySpec == null ) { throw new java.security.spec.InvalidKeySpecException ( "keySpec == null" ) ; } if ( keySpec instanceof java.security.spec.ECPublicKeySpec ) { return new org.conscrypt.OpenSSLECPublicKey ( ( ( java.security.spec.ECPublicKeySpec ) ( keySpec ) ) ) ; } else if ( keySpec instanceof java.security.spec.X509EncodedKeySpec ) { return org.conscrypt.OpenSSLKey.getPublicKey ( ( ( java.security.spec.X509EncodedKeySpec ) ( keySpec ) ) , NativeCrypto.EVP_PKEY_EC ) ; } throw new java.security.spec.InvalidKeySpecException ( ( "Must use ECPublicKeySpec or X509EncodedKeySpec; was " + ( keySpec.getClass ( ) . getName ( ) ) ) ) ; }

Target:
protected java.security.PublicKey engineGeneratePublic ( java.security.spec.KeySpec keySpec ) throws java.security.spec.InvalidKeySpecException { if ( keySpec == null ) { throw new java.security.spec.InvalidKeySpecException ( "keySpec == null" ) ; } if ( keySpec instanceof java.security.spec.ECPublicKeySpec ) { return new org.conscrypt.OpenSSLECPublicKey ( ( ( java.security.spec.ECPublicKeySpec ) ( keySpec ) ) ) ; } else if ( keySpec instanceof java.security.spec.X509EncodedKeySpec ) { return org.conscrypt.OpenSSLKey.getPublicKey ( ( ( java.security.spec.X509EncodedKeySpec ) ( keySpec ) ) , NativeConstants.EVP_PKEY_EC ) ; } throw new java.security.spec.InvalidKeySpecException ( ( "Must use ECPublicKeySpec or X509EncodedKeySpec; was " + ( keySpec.getClass ( ) . getName ( ) ) ) ) ; }
Source:
public int getProfileConnectionState ( int profile ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return BluetoothProfile.STATE_DISCONNECTED ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.getProfileConnectionState ( profile ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "getProfileConnectionState:" , e ) ; } return BluetoothProfile.STATE_DISCONNECTED ; }

Target:
public int getProfileConnectionState ( int profile ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return BluetoothProfile.STATE_DISCONNECTED ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.getProfileConnectionState ( profile ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "getProfileConnectionState:" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return BluetoothProfile.STATE_DISCONNECTED ; }
Source:
private void reportTestRunStarted ( com.android.ddmlib.testrunner.InstrumentationResultParser.TestResult testInfo ) { if ( ( ! ( mTestStartReported ) ) && ( ( testInfo.mNumTests ) != null ) ) { for ( com.android.ddmlib.testrunner.ITestRunListener listener : mTestListeners ) { listener.testRunStarted ( testInfo.mNumTests ) ; } mNumTestsExpected = testInfo.mNumTests ; mTestStartReported = true ; } }

Target:
private void reportTestRunStarted ( com.android.ddmlib.testrunner.InstrumentationResultParser.TestResult testInfo ) { if ( ( ! ( mTestStartReported ) ) && ( ( testInfo.mNumTests ) != null ) ) { for ( com.android.ddmlib.testrunner.ITestRunListener listener : mTestListeners ) { listener.testRunStarted ( mTestRunName , testInfo.mNumTests ) ; } mNumTestsExpected = testInfo.mNumTests ; mTestStartReported = true ; } }
Source:
public void run ( ) { lock.lock ( ) ; try { startUp ( ) ; runningTask = scheduler ( ) . schedule ( delegate , executorService , task ) ; notifyStarted ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } finally { lock.unlock ( ) ; } }

Target:
public java.lang.String get ( ) { return ( ( serviceName ( ) ) + " " ) + ( state ( ) ) ; }
Source:
public boolean listCurrentCalls ( ) throws android.os.RemoteException { synchronized ( mLock ) { enforceModifyPermission ( ) ; com.android.server.telecom.Log.startSession ( "BPSI.lCC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { boolean logQuery = mHeadsetUpdatedRecently ; mHeadsetUpdatedRecently = false ; if ( logQuery ) { com.android.server.telecom.Log.i ( com.android.server.telecom.BluetoothPhoneServiceImpl.TAG , "listcurrentCalls" ) ; } sendListOfCalls ( logQuery ) ; return true ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } } }

Target:
public boolean listCurrentCalls ( ) throws android.os.RemoteException { synchronized ( mLock ) { enforceModifyPermission ( ) ; android.telecom.Log.startSession ( "BPSI.lCC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { boolean logQuery = mHeadsetUpdatedRecently ; mHeadsetUpdatedRecently = false ; if ( logQuery ) { android.telecom.Log.i ( com.android.server.telecom.BluetoothPhoneServiceImpl.TAG , "listcurrentCalls" ) ; } sendListOfCalls ( logQuery ) ; return true ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } } }
Source:
protected static org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier ( java.security.PublicKey key ) throws java.security.cert.CertPathValidatorException { try { org.bouncycastle.asn1.ASN1InputStream aIn = new org.bouncycastle.asn1.ASN1InputStream ( key.getEncoded ( ) ) ; org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info = org.bouncycastle.asn1.x509.SubjectPublicKeyInfo.getInstance ( aIn.readObject ( ) ) ; return info.getAlgorithmId ( ) ; } catch ( java.lang.Exception e ) { throw new org.bouncycastle.jce.exception.ExtCertPathValidatorException ( "Subject public key cannot be decoded." , e ) ; } }

Target:
protected static org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier ( java.security.PublicKey key ) throws java.security.cert.CertPathValidatorException { try { org.bouncycastle.asn1.ASN1InputStream aIn = new org.bouncycastle.asn1.ASN1InputStream ( key.getEncoded ( ) ) ; org.bouncycastle.asn1.x509.SubjectPublicKeyInfo info = org.bouncycastle.asn1.x509.SubjectPublicKeyInfo.getInstance ( aIn.readObject ( ) ) ; return info.getAlgorithm ( ) ; } catch ( java.lang.Exception e ) { throw new org.bouncycastle.jce.exception.ExtCertPathValidatorException ( "Subject public key cannot be decoded." , e ) ; } }
Source:
public void visitClass ( com.google.gct.idea.appengine.validation.PsiClass aClass ) { if ( ! ( com.google.gct.idea.appengine.util.EndpointUtilities.isEndpointClass ( aClass ) ) ) { return ; } com.google.gct.idea.appengine.validation.PsiMethod [ ] allMethods = aClass.getMethods ( ) ; java.util.Map < java.lang.String , com.google.gct.idea.appengine.validation.PsiMethod > restfulSignatures = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gct.idea.appengine.validation.PsiMethod aMethod : allMethods ) { validateRestSignatureUnique ( aMethod , restfulSignatures ) ; } }

Target:
public void visitClass ( com.google.gct.idea.appengine.validation.PsiClass aClass ) { if ( ! ( com.google.gct.idea.appengine.util.EndpointUtilities.isEndpointClass ( aClass ) ) ) { return ; } if ( hasTransformer ( aClass ) ) { return ; } com.google.gct.idea.appengine.validation.PsiMethod [ ] allMethods = aClass.getMethods ( ) ; java.util.Map < java.lang.String , com.google.gct.idea.appengine.validation.PsiMethod > restfulSignatures = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gct.idea.appengine.validation.PsiMethod aMethod : allMethods ) { validateRestSignatureUnique ( aMethod , restfulSignatures ) ; } }
Source:
public void testReadAdvancesPosition ( ) throws java.lang.Exception { com.android.apksig.internal.asn1.ber.BerDataValueReader reader = createReader ( "37018f050001020304" ) ; com.android.apksig.internal.test.MoreAsserts.assertByteBufferEquals ( com.android.apksig.internal.test.HexEncoding.decode ( "37018f" ) , reader.readDataValue ( ) . getEncoded ( ) ) ; com.android.apksig.internal.test.MoreAsserts.assertByteBufferEquals ( com.android.apksig.internal.test.HexEncoding.decode ( "0500" ) , reader.readDataValue ( ) . getEncoded ( ) ) ; com.android.apksig.internal.test.MoreAsserts.assertByteBufferEquals ( com.android.apksig.internal.test.HexEncoding.decode ( "01020304" ) , reader.readDataValue ( ) . getEncoded ( ) ) ; org.junit.Assert.assertNull ( reader.readDataValue ( ) ) ; }

Target:
public void testReadAdvancesPosition ( ) throws java.lang.Exception { com.android.apksig.internal.asn1.ber.BerDataValueReader reader = createReader ( "37018f050001020304" ) ; com.android.apksig.internal.test.MoreAsserts.assertByteBufferEquals ( com.android.apksig.internal.util.HexEncoding.decode ( "37018f" ) , reader.readDataValue ( ) . getEncoded ( ) ) ; com.android.apksig.internal.test.MoreAsserts.assertByteBufferEquals ( com.android.apksig.internal.util.HexEncoding.decode ( "0500" ) , reader.readDataValue ( ) . getEncoded ( ) ) ; com.android.apksig.internal.test.MoreAsserts.assertByteBufferEquals ( com.android.apksig.internal.util.HexEncoding.decode ( "01020304" ) , reader.readDataValue ( ) . getEncoded ( ) ) ; org.junit.Assert.assertNull ( reader.readDataValue ( ) ) ; }
Source:
static void addItem ( java.util.List < java.util.Map < java.lang.String , ? > > tests , java.lang.String title , android.content.Intent intent ) { java.util.HashMap item = new java.util.HashMap ( 2 ) ; item.put ( com.android.cts.verifier.TestListActivity.TestListAdapter.TITLE , title ) ; item.put ( com.android.cts.verifier.TestListActivity.TestListAdapter.INTENT , intent ) ; tests.add ( item ) ; }

Target:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case R.id.clear : handleClearItemSelected ( ) ; return true ; default : return super . onOptionsItemSelected ( item ) ; } }
Source:
public java.util.SortedSet < E > elementSet ( ) { return ( ( java.util.SortedSet < E > ) ( super . elementSet ( ) ) ) ; }

Target:
public static < E > com.google.common.collect.Multiset < E > filter ( com.google.common.collect.Multiset < E > unfiltered , com.google.common.base.Predicate < ? super E > predicate ) { if ( unfiltered instanceof com.google.common.collect.Multisets.FilteredMultiset ) { com.google.common.collect.Multisets.FilteredMultiset < E > filtered = ( ( com.google.common.collect.Multisets.FilteredMultiset < E > ) ( unfiltered ) ) ; com.google.common.base.Predicate < E > combinedPredicate = com.google.common.base.Predicates.< E > and ( filtered.predicate , predicate ) ; return new com.google.common.collect.Multisets.FilteredMultiset < E > ( filtered.unfiltered , combinedPredicate ) ; } return new com.google.common.collect.Multisets.FilteredMultiset < E > ( unfiltered , predicate ) ; }
Source:
public void testIntWriteBytesTo ( ) { byte [ ] dest = new byte [ 4 ] ; com.google.common.hash.HashCodes.fromInt ( 42 ) . writeBytesTo ( dest , 0 , 4 ) ; assertTrue ( com.google.common.jdk5backport.Arrays.equals ( com.google.common.hash.HashCodes.fromInt ( 42 ) . asBytes ( ) , dest ) ) ; }

Target:
public void testIntWriteBytesTo ( ) { byte [ ] dest = new byte [ 4 ] ; com.google.common.hash.HashCode.fromInt ( 42 ) . writeBytesTo ( dest , 0 , 4 ) ; assertTrue ( com.google.common.jdk5backport.Arrays.equals ( com.google.common.hash.HashCode.fromInt ( 42 ) . asBytes ( ) , dest ) ) ; }