auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void connectionForPatchWithBodyRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.PatchWithBody request = new com.android.volley.mock.TestRequest.PatchWithBody ( ) ; assertEquals ( request.getMethod ( ) , Method.PATCH ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "PATCH" , mMockConnection.getRequestMethod ( ) ) ; assertTrue ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void executeRequestClosesConnection_connectionError ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockConnection.getResponseCode ( ) ) . thenThrow ( new java.net.SocketTimeoutException ( ) ) ; try { mHurlStack.executeRequest ( new com.android.volley.mock.TestRequest.Get ( ) , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; org.junit.Assert.fail ( "Should have thrown exception" ) ; } catch ( java.io.IOException e ) { org.mockito.Mockito.verify ( mMockConnection ) . disconnect ( ) ; } }
Source:
public void testFromStringFailsWithUpperCaseString ( ) { java.lang.String string = com.google.common.hash.Hashing.sha1 ( ) . hashString ( "foo" ) . toString ( ) . toUpperCase ( ) ; try { com.google.common.hash.HashCode.fromString ( string ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void testFromStringFailsWithUpperCaseString ( ) { java.lang.String string = com.google.common.hash.Hashing.sha1 ( ) . hashString ( "foo" , com.google.common.base.Charsets.US_ASCII ) . toString ( ) . toUpperCase ( ) ; try { com.google.common.hash.HashCode.fromString ( string ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public void imsNetworkStateChanged ( int indicationType ) { }

Target:
public void subscriptionStatusChanged ( int indicationType , boolean activate ) { mRil.processIndication ( indicationType ) ; int [ ] response = new int [ 1 ] ; response [ 0 ] = ( activate ) ? 1 : 0 ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED , response ) ; mRil.mSubscriptionStatusRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public static com.android.dialer.speeddial.SpeedDialCursor newInstance ( android.database.Cursor strequentCursor ) { if ( ( strequentCursor == null ) || ( ( strequentCursor.getCount ( ) ) == 0 ) ) { return null ; } com.android.dialer.speeddial.SpeedDialCursor cursor = new com.android.dialer.speeddial.SpeedDialCursor ( com.android.dialer.speeddial.SpeedDialCursor.buildCursors ( strequentCursor ) ) ; strequentCursor.close ( ) ; return cursor ; }

Target:
public static com.android.dialer.speeddial.SpeedDialCursor newInstance ( android.database.Cursor strequentCursor , java.util.List < com.android.dialer.speeddial.room.SpeedDialEntry > entries ) { if ( ( strequentCursor == null ) || ( ( strequentCursor.getCount ( ) ) == 0 ) ) { return null ; } com.android.dialer.speeddial.SpeedDialCursor cursor = new com.android.dialer.speeddial.SpeedDialCursor ( com.android.dialer.speeddial.SpeedDialCursor.buildCursors ( strequentCursor , entries ) ) ; strequentCursor.close ( ) ; return cursor ; }
Source:
public void add ( com.android.sdklib.internal.repository.SdkSource source ) { mSources.add ( source ) ; }

Target:
public boolean hasSourceUrl ( com.android.sdklib.internal.repository.SdkSource source ) { for ( java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list : mSources.values ( ) ) { for ( com.android.sdklib.internal.repository.SdkSource s : list ) { if ( s.equals ( source ) ) { return true ; } } } return false ; }
Source:
public void test_ConstructorII ( ) throws java.io.IOException { int freePortNumber = tests.support.Support_PortManager.getNextPort ( ) ; s = new java.net.ServerSocket ( freePortNumber , 1 ) ; s.setSoTimeout ( 2000 ) ; startClient ( freePortNumber ) ; sconn = s.accept ( ) ; sconn.close ( ) ; s.close ( ) ; }

Target:
public void test_ConstructorII ( ) throws java.io.IOException { s = new java.net.ServerSocket ( 0 , 1 ) ; s.setSoTimeout ( 2000 ) ; startClient ( s.getLocalPort ( ) ) ; sconn = s.accept ( ) ; sconn.close ( ) ; s.close ( ) ; }
Source:
public java.lang.String [ ] getForbiddenPlmns ( int subId , int appType ) { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , "Requires READ_PRIVILEGED_PHONE_STATE" ) ; if ( ( appType != ( android.telephony.TelephonyManager.APPTYPE_USIM ) ) && ( appType != ( android.telephony.TelephonyManager.APPTYPE_SIM ) ) ) { com.android.phone.PhoneInterfaceManager.loge ( "getForbiddenPlmnList(): App Type must be USIM or SIM" ) ; return null ; } java.lang.Object response = sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_GET_FORBIDDEN_PLMNS , new java.lang.Integer ( appType ) , subId ) ; if ( response instanceof java.lang.String [ ] ) { return ( ( java.lang.String [ ] ) ( response ) ) ; } return null ; }

Target:
public java.lang.String [ ] getForbiddenPlmns ( int subId , int appType ) { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "Requires READ_PHONE_STATE" ) ; if ( ( appType != ( android.telephony.TelephonyManager.APPTYPE_USIM ) ) && ( appType != ( android.telephony.TelephonyManager.APPTYPE_SIM ) ) ) { com.android.phone.PhoneInterfaceManager.loge ( "getForbiddenPlmnList(): App Type must be USIM or SIM" ) ; return null ; } java.lang.Object response = sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_GET_FORBIDDEN_PLMNS , new java.lang.Integer ( appType ) , subId ) ; if ( response instanceof java.lang.String [ ] ) { return ( ( java.lang.String [ ] ) ( response ) ) ; } return null ; }
Source:
java.lang.String attemptToFormatAccruedDigits ( ) { for ( com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat numberFormat : possibleFormats ) { java.util.regex.Matcher m = regexCache.getPatternForRegex ( numberFormat.pattern ) . matcher ( nationalNumber ) ; if ( m.matches ( ) ) { shouldAddSpaceAfterNationalPrefix = com.google.i18n.phonenumbers.AsYouTypeFormatter.NATIONAL_PREFIX_SEPARATORS_PATTERN.matcher ( numberFormat.nationalPrefixFormattingRule ) . find ( ) ; java.lang.String formattedNumber = m.replaceAll ( numberFormat.format ) ; return appendNationalNumber ( formattedNumber ) ; } } return "" ; }

Target:
java.lang.String attemptToFormatAccruedDigits ( ) { for ( com.google.i18n.phonenumbers.Phonemetadata.NumberFormat numberFormat : possibleFormats ) { java.util.regex.Matcher m = regexCache.getPatternForRegex ( numberFormat.getPattern ( ) ) . matcher ( nationalNumber ) ; if ( m.matches ( ) ) { shouldAddSpaceAfterNationalPrefix = com.google.i18n.phonenumbers.AsYouTypeFormatter.NATIONAL_PREFIX_SEPARATORS_PATTERN.matcher ( numberFormat.getNationalPrefixFormattingRule ( ) ) . find ( ) ; java.lang.String formattedNumber = m.replaceAll ( numberFormat.getFormat ( ) ) ; return appendNationalNumber ( formattedNumber ) ; } } return "" ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( ConnectivityManager.CONNECTIVITY_ACTION.equals ( intent.getAction ( ) ) ) { boolean isConnected = com.android.bips.util.WifiMonitor.isConnected ( context ) ; if ( ( ( mConnected ) == null ) || ( ( mConnected ) != isConnected ) ) { mConnected = isConnected ; mListener.onConnectionStateChanged ( mConnected ) ; } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( ConnectivityManager.CONNECTIVITY_ACTION.equals ( intent.getAction ( ) ) ) { android.net.NetworkInfo info = connectivityManager.getActiveNetworkInfo ( ) ; boolean isConnected = ( info != null ) && ( info.isConnected ( ) ) ; if ( ( ( mListener ) != null ) && ( ( ( mConnected ) == null ) || ( ( mConnected ) != isConnected ) ) ) { mConnected = isConnected ; mListener.onConnectionStateChanged ( mConnected ) ; } } }
Source:
private void addRemoteSysImg ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.descriptors.IdDisplay tag , java.lang.String abi ) { com.android.sdklib.repository.descriptors.IPkgDesc d = com.android.sdklib.repository.descriptors.PkgDesc.newSysImg ( version , tag , abi , revision ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteSysImg ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.descriptors.IdDisplay tag , java.lang.String abi ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newSysImg ( version , tag , abi , revision ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
public int read ( ) throws java.io.IOException { java.lang.Object traceContext = sun.misc.IoTrace.fileReadBegin ( path ) ; byte [ ] b = new byte [ 1 ] ; int res = - 1 ; try { res = read ( b , 0 , 1 ) ; } finally { sun.misc.IoTrace.fileReadEnd ( traceContext , res ) ; } return res != ( - 1 ) ? ( b [ 0 ] ) & 255 : - 1 ; }

Target:
private void open ( java.lang.String name ) throws java.io.FileNotFoundException { open0 ( name ) ; }
Source:
private void propagateVarRef ( com.android.jack.ir.ast.JSsaVariableDefRef lhs , com.android.jack.ir.ast.JSsaVariableUseRef rhs , com.android.jack.transformations.request.TransformationRequest tr ) { com.android.jack.ir.ast.JSsaVariableDefRef def = rhs.getDef ( ) ; for ( com.android.jack.ir.ast.JSsaVariableRef oldUse : com.google.common.collect.Lists.newArrayList ( lhs.getUses ( ) ) ) { com.android.jack.ir.ast.JSsaVariableRef newUse = def.makeRef ( oldUse.getSourceInfo ( ) ) ; newUse.addAllMarkers ( oldUse.getAllMarkers ( ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( oldUse , newUse ) ) ; } }

Target:
private void propagateVarRef ( com.android.jack.ir.ast.JSsaVariableDefRef lhs , com.android.jack.ir.ast.JSsaVariableUseRef rhs , com.android.jack.transformations.request.TransformationRequest tr ) { com.android.jack.ir.ast.JSsaVariableDefRef def = rhs.getDef ( ) ; for ( com.android.jack.ir.ast.JSsaVariableRef oldUse : com.google.common.collect.Lists.newArrayList ( lhs.getUses ( ) ) ) { com.android.jack.ir.ast.JSsaVariableRef newUse = def.makeRef ( oldUse.getSourceInfo ( ) ) ; newUse.addAllMarkers ( oldUse.getAllMarkers ( ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( oldUse , newUse ) ) ; } lhs.removeUses ( ) ; }
Source:
public void testOverlay1Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay1" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
public void testOverlay1Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( com.android.build.gradle.FOLDER_TEST_REGULAR , "overlay1" , BasePlugin.GRADLE_TEST_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/res/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }
Source:
public void onLooperPrepared ( ) { mEuiccCard = new com.android.internal.telephony.uicc.euicc.EuiccCard ( mContextFixture.getTestDouble ( ) , mMockCi , mMockIccCardStatus , 0 ) { @ java.lang.Override protected byte [ ] getDeviceId ( ) { return com.android.internal.telephony.uicc.IccUtils.bcdToBytes ( "987654321012345" ) ; } @ java.lang.Override protected void loadEidAndNotifyRegistrants ( ) { } } ; mHandler = new android.os.Handler ( mTestHandlerThread.getLooper ( ) ) ; setReady ( true ) ; }

Target:
protected android.content.res.Resources getResources ( ) { return mMockResources ; }
Source:
public void onCallTerminated ( com.android.ims.ImsCall imsCall , com.android.ims.ImsReasonInfo reasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "mImsUssdListener onCallTerminated reasonCode=" + ( reasonInfo.getCode ( ) ) ) ) ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_CHECK_FOR_WIFI_HANDOVER ) ; if ( imsCall == ( mUssdSession ) ) { mUssdSession = null ; if ( ( mPendingUssd ) != null ) { com.android.internal.telephony.CommandException ex = new com.android.internal.telephony.CommandException ( CommandException.Error.GENERIC_FAILURE ) ; android.os.AsyncResult.forMessage ( mPendingUssd , null , ex ) ; mPendingUssd.sendToTarget ( ) ; mPendingUssd = null ; } } imsCall.close ( ) ; }

Target:
public void onCallTerminated ( com.android.ims.ImsCall imsCall , android.telephony.ims.ImsReasonInfo reasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "mImsUssdListener onCallTerminated reasonCode=" + ( reasonInfo.getCode ( ) ) ) ) ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_CHECK_FOR_WIFI_HANDOVER ) ; if ( imsCall == ( mUssdSession ) ) { mUssdSession = null ; if ( ( mPendingUssd ) != null ) { com.android.internal.telephony.CommandException ex = new com.android.internal.telephony.CommandException ( CommandException.Error.GENERIC_FAILURE ) ; android.os.AsyncResult.forMessage ( mPendingUssd , null , ex ) ; mPendingUssd.sendToTarget ( ) ; mPendingUssd = null ; } } imsCall.close ( ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , data.length ) ; }

Target:
private void copyTo ( java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , array , dt ) ; }
Source:
public java.lang.String computeFullNameWithSplits ( @ com.android.annotations.NonNull java.lang.String splitName ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String flavorName = getFlavorName ( ) ; if ( ! ( flavorName.isEmpty ( ) ) ) { sb.append ( flavorName ) ; sb.append ( com.android.builder.internal.StringHelper.capitalize ( splitName ) ) ; } else { sb.append ( splitName ) ; } sb.append ( com.android.builder.internal.StringHelper.capitalize ( mBuildType.getName ( ) ) ) ; if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { sb.append ( "Test" ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String computeFullNameWithSplits ( @ com.android.annotations.NonNull java.lang.String splitName ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String flavorName = getFlavorName ( ) ; if ( ! ( flavorName.isEmpty ( ) ) ) { sb.append ( flavorName ) ; sb.append ( com.android.builder.internal.StringHelper.capitalize ( splitName ) ) ; } else { sb.append ( splitName ) ; } sb.append ( com.android.builder.internal.StringHelper.capitalize ( mBuildType.getName ( ) ) ) ; if ( mType.isForTesting ( ) ) { sb.append ( mType.getSuffix ( ) ) ; } return sb.toString ( ) ; }
Source:
private void refreshUI ( ) { int nFrames = 0 ; nFrames = ( ( mTrace ) == null ) ? 1 : mTrace.getFrames ( ) . size ( ) ; setFrameCount ( nFrames ) ; selectFrame ( 1 ) ; }

Target:
private void refreshUI ( ) { if ( ( ( mTrace ) == null ) || ( ( mTrace.getGLCalls ( ) . size ( ) ) == 0 ) ) { setFrameCount ( 0 ) ; return ; } setFrameCount ( mTrace.getFrames ( ) . size ( ) ) ; selectFrame ( 1 ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , d.length , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy1DRangeFrom ( int off , int count , java.lang.Object array ) { copy1DRangeFromUnchecked ( off , count , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
public void sendEmergencyCallStateChange ( boolean callActive ) { if ( mBroadcastEmergencyCallStateChanges ) { android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_EMERGENCY_CALL_STATE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_EMERGENCY_CALL , callActive ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManagerNative.broadcastStickyIntent ( intent , null , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , "sendEmergencyCallStateChange" ) ; } }

Target:
public void sendEmergencyCallStateChange ( boolean callActive ) { if ( mBroadcastEmergencyCallStateChanges ) { android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_EMERGENCY_CALL_STATE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_EMERGENCY_CALL , callActive ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManager.broadcastStickyIntent ( intent , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( "sendEmergencyCallStateChange: callActive " + callActive ) ) ; } }
Source:
private void readObject ( java.io.ObjectInputStream stream ) throws java.io.IOException , java.lang.ClassNotFoundException { stream.defaultReadObject ( ) ; byte [ ] encoded = ( ( byte [ ] ) ( stream.readObject ( ) ) ) ; key = new org.conscrypt.OpenSSLKey ( org.conscrypt.NativeCrypto.d2i_PKCS8_PRIV_KEY_INFO ( encoded ) ) ; final long origGroup = org.conscrypt.NativeCrypto.EC_KEY_get0_group ( key.getNativeRef ( ) ) ; group = new org.conscrypt.OpenSSLECGroupContext ( org.conscrypt.NativeCrypto.EC_GROUP_dup ( origGroup ) ) ; }

Target:
private void readObject ( java.io.ObjectInputStream stream ) throws java.io.IOException , java.lang.ClassNotFoundException { stream.defaultReadObject ( ) ; byte [ ] encoded = ( ( byte [ ] ) ( stream.readObject ( ) ) ) ; key = new org.conscrypt.OpenSSLKey ( org.conscrypt.NativeCrypto.d2i_PKCS8_PRIV_KEY_INFO ( encoded ) ) ; group = new org.conscrypt.OpenSSLECGroupContext ( new org.conscrypt.NativeRef.EC_GROUP ( org.conscrypt.NativeCrypto.EC_KEY_get1_group ( key.getNativeRef ( ) ) ) ) ; }
Source:
public void onSizeChanged ( final int w , final int h , final int ow , final int oh ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onSizeChanged ( w , h , ow , oh ) ; } } ) ; return ; } mAwContents.onSizeChanged ( w , h , ow , oh ) ; }

Target:
public void setHorizontalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHorizontalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setHorizontalScrollbarOverlay ( overlay ) ; }
Source:
private void addToPlayListRequestFromNative ( byte [ ] address , byte scope , byte [ ] uid , int uidCounter ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "addToPlayListRequestFromNative: scope=" + scope ) ) ; android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , "Add to NowPlayingList is not supported" ) ; addToNowPlayingRspNative ( address , AvrcpConstants.RSP_INTERNAL_ERR ) ; }

Target:
private void addToPlayListRequestFromNative ( byte [ ] address , byte scope , byte [ ] uid , int uidCounter ) { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "addToPlayListRequestFromNative: not supported! scope=" + scope ) ) ; addToNowPlayingRspNative ( address , AvrcpConstants.RSP_INTERNAL_ERR ) ; }
Source:
public short readShort ( ) { short result = libcore.io.Memory.peekShort ( ( ( address ) + ( position ) ) , swap ) ; position += SizeOf.SHORT ; return result ; }

Target:
public short readShort ( ) { file.checkNotClosed ( ) ; libcore.io.NioBufferIterator.checkReadBounds ( position , length , SizeOf.SHORT ) ; short result = libcore.io.Memory.peekShort ( ( ( address ) + ( position ) ) , swap ) ; position += SizeOf.SHORT ; return result ; }
Source:
public void testGetValues009_Object ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "OBJECT_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testGetValues003_Char ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.CHAR_SIGNAL ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.CHAR_PARAM_VALUE ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointChar" ) ; suspensionMethodInfo.addVariable ( "param" , expectedValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointChar" ) ; methodInfo.addVariable ( "param" , expectedValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public void visitInvokeDynamicConstant ( proguard.shrink.Clazz clazz , proguard.shrink.InvokeDynamicConstant invokeDynamicConstant ) { if ( shouldBeMarkedAsUsed ( invokeDynamicConstant ) ) { markAsUsed ( invokeDynamicConstant ) ; markConstant ( clazz , invokeDynamicConstant.u2nameAndTypeIndex ) ; clazz.attributesAccept ( new proguard.shrink.UsageMarker.MyBootStrapMethodUsageMarker ( invokeDynamicConstant.u2bootstrapMethodAttributeIndex ) ) ; } }

Target:
public void visitInvokeDynamicConstant ( proguard.shrink.Clazz clazz , proguard.shrink.InvokeDynamicConstant invokeDynamicConstant ) { if ( shouldBeMarkedAsUsed ( invokeDynamicConstant ) ) { markAsUsed ( invokeDynamicConstant ) ; markConstant ( clazz , invokeDynamicConstant.u2nameAndTypeIndex ) ; invokeDynamicConstant.referencedClassesAccept ( this ) ; clazz.attributesAccept ( new proguard.shrink.UsageMarker.MyBootStrapMethodUsageMarker ( invokeDynamicConstant.u2bootstrapMethodAttributeIndex ) ) ; } }
Source:
public com.android.jack.frontend.VirtualMethodsMarker clone ( ) { com.android.jack.frontend.VirtualMethodsMarker clone ; try { clone = ( ( com.android.jack.frontend.VirtualMethodsMarker ) ( super . clone ( ) ) ) ; clone.virtualMethods = ( ( java.util.TreeSet < com.android.jack.ir.ast.JMethodId > ) ( virtualMethods.clone ( ) ) ) ; return clone ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.AssertionError ( ) ; } }

Target:
public java.util.Iterator < com.android.jack.ir.ast.JMethodId > iterator ( ) { return new java.util.Iterator < com.android.jack.ir.ast.JMethodId > ( ) { @ javax.annotation.Nonnull private final java.util.Iterator < com.android.jack.frontend.VirtualMethodsMarker.ComparableMethodId > iterator = virtualMethods.values ( ) . iterator ( ) ; @ java.lang.Override public boolean hasNext ( ) { return iterator.hasNext ( ) ; } @ javax.annotation.Nonnull @ java.lang.Override public com.android.jack.ir.ast.JMethodId next ( ) { return iterator.next ( ) . methodId ; } @ java.lang.Override public void remove ( ) { throw new java.lang.UnsupportedOperationException ( ) ; } } ; }
Source:
public boolean equals ( java.lang.Object a , java.lang.Object b ) { if ( ( a instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) && ( b instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode keyA = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( a ) ) . getUiViewKey ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode keyB = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( b ) ) . getUiViewKey ( ) ; if ( keyA != null ) { return keyA.equals ( keyB ) ; } } if ( a != null ) { return a.equals ( b ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object a , java.lang.Object b ) { if ( ( a instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) && ( b instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode keyA = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( a ) ) . getUiViewNode ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode keyB = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( b ) ) . getUiViewNode ( ) ; if ( keyA != null ) { return keyA.equals ( keyB ) ; } } if ( a != null ) { return a.equals ( b ) ; } return false ; }
Source:
public void testOnSetUpAdapterSingleInstance ( ) throws java.lang.Exception { java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mPreparer.setUp ( mDevice , mBuildInfo ) ; java.lang.String adapterCmd = java.lang.String.format ( "%s /data/nativetest64/%s %s %s %d" , SCRIPT_PATH , TEST_HAL_ADAPTER_BINARY , "IFoo" , "default" , THREAD_COUNT_DEFAULT ) ; verify ( mDevice , times ( 1 ) ) . executeShellCommand ( eq ( adapterCmd ) ) ; }

Target:
public void testOnSetUpAdapterSingleInstance ( ) throws java.lang.Exception { java.io.File testAdapter = new java.io.File ( mTestDir , ( ( VTS_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ; testAdapter.createNewFile ( ) ; java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mPreparer.setUp ( mDevice , mBuildInfo ) ; verify ( mDevice , times ( 1 ) ) . pushFile ( eq ( testAdapter ) , eq ( ( ( TARGET_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ) ; java.lang.String adapterCmd = java.lang.String.format ( "%s /data/nativetest64/%s %s %s %d" , SCRIPT_PATH , TEST_HAL_ADAPTER_BINARY , "IFoo" , "default" , THREAD_COUNT_DEFAULT ) ; verify ( mDevice , times ( 1 ) ) . executeShellCommand ( eq ( adapterCmd ) ) ; }
Source:
com.android.internal.telephony.gsm.GsmConnection getConnectionByIndex ( com.android.internal.telephony.gsm.GsmCall call , int index ) throws com.android.internal.telephony.CallStateException { int count = call.connections.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.internal.telephony.gsm.GsmConnection cn = ( ( com.android.internal.telephony.gsm.GsmConnection ) ( call.connections.get ( i ) ) ) ; if ( ( cn.getGSMIndex ( ) ) == index ) { return cn ; } } return null ; }

Target:
com.android.internal.telephony.gsm.GsmConnection getConnectionByIndex ( com.android.internal.telephony.gsm.GsmCall call , int index ) throws com.android.internal.telephony.CallStateException { int count = call.mConnections.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.internal.telephony.gsm.GsmConnection cn = ( ( com.android.internal.telephony.gsm.GsmConnection ) ( call.mConnections.get ( i ) ) ) ; if ( ( cn.getGSMIndex ( ) ) == index ) { return cn ; } } return null ; }
Source:
private void startService ( ) throws java.util.concurrent.TimeoutException { android.content.Intent startIntent = new android.content.Intent ( android.support.test.InstrumentationRegistry.getTargetContext ( ) , com.android.bluetooth.a2dp.A2dpService.class ) ; startIntent.putExtra ( AdapterService.EXTRA_ACTION , AdapterService.ACTION_SERVICE_STATE_CHANGED ) ; startIntent.putExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.STATE_ON ) ; mServiceRule.startService ( startIntent ) ; verify ( mAdapterService , timeout ( com.android.bluetooth.a2dp.A2dpServiceTest.TIMEOUT_MS ) ) . onProfileServiceStateChanged ( eq ( com.android.bluetooth.a2dp.A2dpService.class . getName ( ) ) , eq ( BluetoothAdapter.STATE_ON ) ) ; mA2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; org.junit.Assert.assertNotNull ( mA2dpService ) ; }

Target:
private void startService ( ) throws java.util.concurrent.TimeoutException { com.android.bluetooth.TestUtils.startService ( mServiceRule , com.android.bluetooth.a2dp.A2dpService.class ) ; mA2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; org.junit.Assert.assertNotNull ( mA2dpService ) ; }
Source:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Boolean > isDirty ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > phoneNumbers , long lastModified ) { return null ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Boolean > isDirty ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > phoneNumbers , long lastModified ) { java.util.List < com.google.common.util.concurrent.ListenableFuture < java.lang.Boolean > > futures = new java.util.ArrayList < > ( ) ; for ( com.android.dialer.phonelookup.PhoneLookup phoneLookup : phoneLookups ) { futures.add ( phoneLookup.isDirty ( phoneNumbers , lastModified ) ) ; } return com.android.dialer.common.concurrent.DialerFutures.firstMatching ( futures , com.google.common.base.Preconditions :: checkNotNull , false ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mGridView = null ; mActivity = getActivity ( ) ; new android.cts.util.PollingCheck ( ) { @ java.lang.Override protected boolean check ( ) { return mActivity.hasWindowFocus ( ) ; } } . run ( ) ; mInstrumentation = getInstrumentation ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mGridView = null ; mActivity = mActivityRule.getActivity ( ) ; new android.cts.util.PollingCheck ( ) { @ java.lang.Override protected boolean check ( ) { return mActivity.hasWindowFocus ( ) ; } } . run ( ) ; mInstrumentation = android.support.test.InstrumentationRegistry.getInstrumentation ( ) ; }
Source:
public void testDeserializeUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( ( ( "3742453657269616c697a61626c65436f6e7461696e65723200000000000000000200014c000e7" + "56e73657269616c697a61626c657400334c6c6962636f72652f6a6176612f696f2f53657269616" ) + "c697a6174696f6e546573742457617353657269616c697a61626c653b7870737200316c6962636" ) + "f72652e6a6176612e696f2e53657269616c697a6174696f6e546573742457617353657269616c6" ) + "97a61626c65000000000000000002000149000169787000000000" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertTrue ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }

Target:
public void testDeserializeUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( ( ( "3742453657269616c697a61626c65436f6e7461696e65723200000000000000000200014c000e7" + "56e73657269616c697a61626c657400334c6c6962636f72652f6a6176612f696f2f53657269616" ) + "c697a6174696f6e546573742457617353657269616c697a61626c653b7870737200316c6962636" ) + "f72652e6a6176612e696f2e53657269616c697a6174696f6e546573742457617353657269616c6" ) + "97a61626c65000000000000000002000149000169787000000000" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; try { libcore.libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertTrue ( libcore.java.io.SerializationTest.serializableContainer2InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }
Source:
void createBinaries ( org.gradle.model.collection.CollectionBuilder < com.android.build.gradle.model.AndroidBinary > binaries , @ org.gradle.model.Path ( value = "android.buildTypes" ) org.gradle.model.collection.ManagedSet < com.android.build.gradle.managed.BuildType > buildTypes , com.android.build.gradle.model.List < com.android.build.gradle.internal.ProductFlavorCombo > flavorCombos , com.android.build.gradle.model.AndroidComponentSpec spec ) { if ( flavorCombos.isEmpty ( ) ) { flavorCombos.add ( new com.android.build.gradle.internal.ProductFlavorCombo ( ) ) ; } for ( com.android.build.gradle.managed.BuildType buildType : buildTypes ) ; flavorCombos.each = $missing$ ; com.android.build.gradle.internal.ProductFlavorCombo flavorCombo ; binaries.create ( com.android.build.gradle.model.AndroidComponentModelPlugin.Rules.getBinaryName ( buildType , flavorCombo ) ) ; com.android.build.gradle.model.def binary = it ; com.android.build.gradle.model.DefaultAndroidBinary binary ; com.android.build.gradle.model.DefaultAndroidBinary buildType = new com.android.build.gradle.managed.adaptor.BuildTypeAdaptor ( buildType ) ; binary.productFlavors = flavorCombo.flavorList ; }

Target:
public void execute ( com.android.build.gradle.model.AndroidBinary androidBinary ) { com.android.build.gradle.model.DefaultAndroidBinary binary = ( ( com.android.build.gradle.model.DefaultAndroidBinary ) ( androidBinary ) ) ; binary.setBuildType ( new com.android.build.gradle.managed.adaptor.BuildTypeAdaptor ( buildType ) ) ; binary.setProductFlavors ( flavorCombo.getFlavorList ( ) ) ; }
Source:
public void testBindFailureWhenBound ( ) { java.util.HashSet < android.util.Pair < java.lang.Integer , java.lang.Integer > > testFeatures = new java.util.HashSet < > ( ) ; testFeatures.add ( new android.util.Pair ( 1 , 1 ) ) ; bindAndConnectService ( testFeatures ) ; junit.framework.Assert.assertFalse ( mTestImsServiceController.bind ( testFeatures ) ) ; org.mockito.Mockito.verify ( mMockContext , org.mockito.Mockito.times ( 1 ) ) . bindService ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) , org.mockito.Matchers.anyInt ( ) ) ; }

Target:
public void testBindFailureWhenBound ( ) { java.util.HashSet < android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair > testFeatures = new java.util.HashSet < > ( ) ; testFeatures.add ( new android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair ( 1 , 1 ) ) ; bindAndConnectService ( testFeatures ) ; junit.framework.Assert.assertFalse ( mTestImsServiceController.bind ( testFeatures ) ) ; org.mockito.Mockito.verify ( mMockContext , org.mockito.Mockito.times ( 1 ) ) . bindService ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) , org.mockito.Matchers.anyInt ( ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "TestNode [fqn=" + ( mFqcn ) ) + ", infos=" ) + ( mAttributeInfos ) ) + ", attributes=" ) + ( mAttributes ) ) + ", bounds=" ) + ( mBounds ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { java.lang.String id = getStringAttr ( com.android.tools.lint.detector.api.LintConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; return ( ( ( ( ( ( ( ( ( "TestNode [id=" + ( id != null ? id : "?" ) ) + ", fqn=" ) + ( mFqcn ) ) + ", infos=" ) + ( mAttributeInfos ) ) + ", attributes=" ) + ( mAttributes ) ) + ", bounds=" ) + ( mBounds ) ) + "]" ; }
Source:
public void onResume ( ) { super . onResume ( ) ; startTimeOut ( mTextMsg.userClear ) ; }

Target:
public void onResume ( ) { super . onResume ( ) ; if ( ( ( ! ( mTextMsg.responseNeeded ) ) && ( ( com.android.stk.StkApp.calculateDurationInMilis ( mTextMsg.duration ) ) == 0 ) ) && ( mTextMsg.userClear ) ) { com.android.internal.telephony.cat.CatLog.d ( this , "User should clear text..show message forever" ) ; return ; } startTimeOut ( mTextMsg.userClear ) ; }
Source:
public android.net.wifi.WifiConfiguration buildWifiConfig ( java.lang.String uriString , java.lang.String mimeType , byte [ ] data ) { if ( mimeType.equals ( ConfigBuilder.WifiConfigType ) ) { try { return com.android.server.wifi.configparse.ConfigBuilder.buildConfig ( uriString , data , mContext ) ; } catch ( java.io.IOException | java.security.GeneralSecurityException | org.xml.sax.SAXException e ) { android.util.Log.e ( com.android.server.wifi.WifiServiceImpl.TAG , ( "Failed to parse wi-fi configuration: " + e ) ) ; } } else { android.util.Log.i ( com.android.server.wifi.WifiServiceImpl.TAG , ( "Unknown wi-fi config type: " + mimeType ) ) ; } return null ; }

Target:
public boolean addPasspointConfiguration ( android.net.wifi.hotspot2.PasspointConfiguration config ) { enforceChangePermission ( ) ; return mPasspointManager.addProvider ( config ) ; }
Source:
public boolean isBleScanAlwaysAvailable ( ) { try { return ( Settings.Global.getInt ( mContentResolver , Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE ) ) != 0 ; } catch ( android.provider.Settings.SettingNotFoundException e ) { } return false ; }

Target:
public boolean isBleScanAlwaysAvailable ( ) { if ( ( isAirplaneModeOn ( ) ) && ( ! ( mEnable ) ) ) { return false ; } try { return ( Settings.Global.getInt ( mContentResolver , Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE ) ) != 0 ; } catch ( android.provider.Settings.SettingNotFoundException e ) { } return false ; }
Source:
public void testCapitalize ( ) { assertEquals ( "UPPER" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "UPPER" ) ) ; assertEquals ( "Lower" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "lower" ) ) ; assertEquals ( "Capital" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "Capital" ) ) ; assertEquals ( "CamelCase" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "camelCase" ) ) ; assertEquals ( "" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "" ) ) ; }

Target:
public void testCapitalize ( ) { assertEquals ( "UPPER" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "UPPER" ) ) ; assertEquals ( "Lower" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "lower" ) ) ; assertEquals ( "Capital" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "Capital" ) ) ; assertEquals ( "CamelCase" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "camelCase" ) ) ; assertEquals ( "" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "" ) ) ; assertSame ( "Foo" , com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils.capitalize ( "Foo" ) ) ; }
Source:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_NoGrant_Failure ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertFalse ( "Should not be able to revoke not existent grant" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
private boolean checkAndroidProject ( org.eclipse.core.resources.IProject project ) throws org.eclipse.core.runtime.CoreException { if ( ( project.hasNature ( org.eclipse.jdt.core.JavaCore.NATURE_ID ) ) == false ) { java.lang.String msg = java.lang.String.format ( "%1$s is not a Java project!" , project.getName ( ) ) ; com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android Launch" , msg ) ; return false ; } if ( ( project.hasNature ( AndroidConstants.NATURE ) ) == false ) { java.lang.String msg = java.lang.String.format ( "%1$s is not an Android project!" , project.getName ( ) ) ; com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android Launch" , msg ) ; return false ; } return true ; }

Target:
private boolean checkAndroidProject ( org.eclipse.core.resources.IProject project ) throws org.eclipse.core.runtime.CoreException { if ( ( project.hasNature ( org.eclipse.jdt.core.JavaCore.NATURE_ID ) ) == false ) { java.lang.String msg = java.lang.String.format ( "%1$s is not a Java project!" , project.getName ( ) ) ; com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android Launch" , msg ) ; return false ; } if ( ( project.hasNature ( AndroidConstants.NATURE_DEFAULT ) ) == false ) { java.lang.String msg = java.lang.String.format ( "%1$s is not an Android project!" , project.getName ( ) ) ; com.android.ide.eclipse.adt.AdtPlugin.displayError ( "Android Launch" , msg ) ; return false ; } return true ; }
Source:
public void stop ( ) { if ( ! ( mStarted ) ) { return ; } mTvInputManager.unregisterCallback ( mInternalCallback ) ; mStarted = false ; mInputStateMap.clear ( ) ; mInputMap.clear ( ) ; mInputIdToPartnerInputMap.clear ( ) ; }

Target:
public void stop ( ) { if ( ! ( mStarted ) ) { return ; } mTvInputManager.unregisterCallback ( mInternalCallback ) ; mStarted = false ; mInputStateMap.clear ( ) ; mInputMap.clear ( ) ; mTvInputLabels.clear ( ) ; mTvInputCustomLabels.clear ( ) ; mTvInputApplicationLabels.clear ( ) ; mTvInputApplicationIcons.clear ( ) ; mTvInputAppliactionBanners.clear ( ) ; mInputIdToPartnerInputMap.clear ( ) ; }
Source:
private static com.android.manifmerger.NodeOperationType calculateNodeOperationType ( @ com.android.annotations.NonNull com.android.manifmerger.XmlElement higherPriority , @ com.android.annotations.NonNull com.android.manifmerger.XmlElement lowerPriority ) { com.android.manifmerger.NodeOperationType operationType = higherPriority.getOperationType ( ) ; if ( ( ( operationType.isSelectable ( ) ) && ( ( higherPriority.mSelector ) != null ) ) && ( ! ( higherPriority.mSelector.appliesTo ( lowerPriority ) ) ) ) { operationType = NodeOperationType.MERGE ; } return operationType ; }

Target:
private static com.android.manifmerger.NodeOperationType calculateNodeOperationType ( @ com.android.annotations.NonNull com.android.manifmerger.XmlElement higherPriority , @ com.android.annotations.NonNull com.android.manifmerger.XmlElement lowerPriority ) { com.android.manifmerger.NodeOperationType operationType = higherPriority.getOperationType ( ) ; if ( ( ( higherPriority.supportsSelector ( ) ) && ( ( higherPriority.mSelector ) != null ) ) && ( ! ( higherPriority.mSelector.appliesTo ( lowerPriority ) ) ) ) { operationType = NodeOperationType.MERGE ; } return operationType ; }
Source:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws org.eclipse.core.runtime.CoreException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IMarker [ ] markers = javaProject.getProject ( ) . findMarkers ( null , false , IResource.DEPTH_ZERO ) ; if ( ( markers.length ) > 0 ) { stopBuild ( "" ) ; } }

Target:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , null , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AIDL , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_ANDROID , IResource.DEPTH_ZERO ) ; }
Source:
private static com.google.common.collect.ImmutableSet < java.lang.Class < ? > > getRawTypes ( java.lang.reflect.Type [ ] types ) { com.google.common.collect.ImmutableSet.Builder < java.lang.Class < ? > > builder = com.google.common.collect.ImmutableSet.builder ( ) ; for ( java.lang.reflect.Type type : types ) { builder.addAll ( com.google.common.reflect.TypeToken.getRawTypes ( type ) ) ; } return builder.build ( ) ; }

Target:
void visitClass ( java.lang.Class < ? > t ) { builder.add ( t ) ; }
Source:
public static com.android.ide.eclipse.adt.internal.resources.configurations.CountryCodeQualifier getQualifier ( java.lang.String segment ) { java.util.regex.Matcher m = com.android.ide.eclipse.adt.internal.resources.configurations.CountryCodeQualifier.sCountryCodePattern.matcher ( segment ) ; if ( m.matches ( ) ) { java.lang.String v = m.group ( 1 ) ; int code = - 1 ; try { code = java.lang.Integer.parseInt ( v ) ; } catch ( java.lang.NumberFormatException e ) { return null ; } com.android.ide.eclipse.adt.internal.resources.configurations.CountryCodeQualifier qualifier = new com.android.ide.eclipse.adt.internal.resources.configurations.CountryCodeQualifier ( code ) ; return qualifier ; } return null ; }

Target:
public static com.android.ide.common.resources.configuration.CountryCodeQualifier getQualifier ( java.lang.String segment ) { java.util.regex.Matcher m = com.android.ide.common.resources.configuration.CountryCodeQualifier.sCountryCodePattern.matcher ( segment ) ; if ( m.matches ( ) ) { java.lang.String v = m.group ( 1 ) ; int code = - 1 ; try { code = java.lang.Integer.parseInt ( v ) ; } catch ( java.lang.NumberFormatException e ) { return null ; } com.android.ide.common.resources.configuration.CountryCodeQualifier qualifier = new com.android.ide.common.resources.configuration.CountryCodeQualifier ( code ) ; return qualifier ; } return null ; }