auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void updateOutlineSelection ( final java.util.List < com.android.ide.common.api.INode > nodes ) { org.eclipse.swt.widgets.Display.getDefault ( ) . asyncExec ( new java.lang.Runnable ( ) { public void run ( ) { selectDropped ( nodes ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage outlinePage = mCanvas.getOutlinePage ( ) ; org.eclipse.ui.IWorkbenchPartSite site = outlinePage.getEditor ( ) . getSite ( ) ; org.eclipse.jface.viewers.ISelectionProvider selectionProvider = site.getSelectionProvider ( ) ; org.eclipse.jface.viewers.ISelection selection = selectionProvider.getSelection ( ) ; if ( selection != null ) { outlinePage.setSelection ( selection ) ; } } } ) ; }

Target:
public void run ( ) { selectDropped ( nodes ) ; syncOutlineSelection ( ) ; }
Source:
public static < E extends java.lang.Enum < E > > com.google.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering < E > newInstanceWithExplicitOrdering ( java.lang.Class < E > enumClass , com.google.common.util.concurrent.CycleDetectingLockFactory.Policy policy ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.Map < E , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > lockGraphNodes = ( ( java.util.Map < E , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > ) ( com.google.common.util.concurrent.CycleDetectingLockFactory.lockGraphNodesPerType.get ( enumClass ) ) ) ; return new com.google.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering < E > ( policy , lockGraphNodes ) ; }

Target:
public static < E extends java.lang.Enum < E > > com.google.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering < E > newInstanceWithExplicitOrdering ( java.lang.Class < E > enumClass , com.google.common.util.concurrent.CycleDetectingLockFactory.Policy policy ) { com.google.common.base.Preconditions.checkNotNull ( enumClass ) ; com.google.common.base.Preconditions.checkNotNull ( policy ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.Map < E , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > lockGraphNodes = ( ( java.util.Map < E , com.google.common.util.concurrent.CycleDetectingLockFactory.LockGraphNode > ) ( com.google.common.util.concurrent.CycleDetectingLockFactory.getOrCreateNodes ( enumClass ) ) ) ; return new com.google.common.util.concurrent.CycleDetectingLockFactory.WithExplicitOrdering < E > ( policy , lockGraphNodes ) ; }
Source:
public static java.lang.String $noinline$floatToDoubleToIntPrint ( float value ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } double d = ( ( double ) ( value ) ) ; int i = ( ( int ) ( d ) ) ; return ( ( "d=" + d ) + ", i=" ) + i ; }

Target:
public static java.lang.String $noinline$intToDoubleToIntPrint ( int value ) { double d = ( ( double ) ( value ) ) ; int i = ( ( int ) ( d ) ) ; return ( ( "d=" + d ) + ", i=" ) + i ; }
Source:
public static java.lang.String toHexString ( byte [ ] data ) { if ( data == null ) { return "null" ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ( ( data.length ) * 3 ) ) ; boolean first = true ; for ( byte b : data ) { if ( first ) { first = false ; } else { sb.append ( ' ' ) ; } sb.append ( java.lang.String.format ( "%02x" , ( b & ( com.android.server.wifi.anqp.Constants.BYTE_MASK ) ) ) ) ; } return sb.toString ( ) ; }

Target:
public static java.lang.String toHexString ( byte [ ] data ) { if ( data == null ) { return "null" ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ( ( data.length ) * 3 ) ) ; boolean first = true ; for ( byte b : data ) { if ( first ) { first = false ; } else { sb.append ( ' ' ) ; } sb.append ( java.lang.String.format ( "%02x" , ( b & ( com.android.server.wifi.hotspot2.anqp.Constants.BYTE_MASK ) ) ) ) ; } return sb.toString ( ) ; }
Source:
public android.os.Bundle getCurrentAgFeatures ( android.bluetooth.BluetoothDevice device ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.getCurrentAgFeatures ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadsetClient.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadsetClient.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadsetClient.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadsetClient.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }

Target:
public android.os.Bundle getCurrentAgFeatures ( android.bluetooth.BluetoothDevice device ) { final android.bluetooth.IBluetoothHeadsetClient service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { return service.getCurrentAgFeatures ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadsetClient.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadsetClient.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadsetClient.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadsetClient.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }
Source:
private java.lang.String getReportName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return java.lang.String.format ( "%s-%s-%s-%s-%s" , date , Build.MANUFACTURER , Build.PRODUCT , Build.DEVICE , Build.ID ) ; }

Target:
private java.lang.String getReportName ( java.lang.String suiteName ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return java.lang.String.format ( "%s-%s-%s-%s-%s-%s" , date , suiteName , Build.MANUFACTURER , Build.PRODUCT , Build.DEVICE , Build.ID ) ; }
Source:
public boolean setCurrentInputMethodSubtype ( android.view.inputmethod.InputMethodSubtype subtype ) { synchronized ( mH ) { try { return mService.setCurrentInputMethodSubtype ( subtype ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; return false ; } } }

Target:
public void onReportFullscreenMode ( boolean fullScreen , boolean calledInBackground , java.lang.String inputMethodId ) { synchronized ( mH ) { if ( ( ! calledInBackground ) || ( android.text.TextUtils.equals ( mCurId , inputMethodId ) ) ) { mFullscreenMode = fullScreen ; } } }
Source:
public boolean nvResetConfig ( int resetType ) { enforceModifyPermissionOrCarrierPrivilege ( getDefaultSubscription ( ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvResetConfig: type " + resetType ) ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_RESET_CONFIG , resetType ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "nvResetConfig: type " + resetType ) + ' ' ) + ( success ? "ok" : "fail" ) ) ) ; return success ; }

Target:
public boolean nvResetConfig ( int resetType ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , getDefaultSubscription ( ) , "nvResetConfig" ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvResetConfig: type " + resetType ) ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_RESET_CONFIG , resetType ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "nvResetConfig: type " + resetType ) + ' ' ) + ( success ? "ok" : "fail" ) ) ) ; return success ; }
Source:
public void installAppAndLaunch ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; if ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) == 18 ) { return ; } com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "RsHelloCompute" ) ; org.junit.Assert.assertTrue ( testFramework.getDevice ( ) . findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.APP_IMAGE_VIEW_ID ) ) . exists ( ) ) ; }

Target:
public void installAppAndLaunch ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; if ( ( testFramework.getApi ( ) ) == 18 ) { return ; } com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "RsHelloCompute" ) ; org.junit.Assert.assertTrue ( testFramework.getDevice ( ) . findObject ( new android.support.test.uiautomator.UiSelector ( ) . resourceId ( Res.APP_IMAGE_VIEW_ID ) ) . exists ( ) ) ; }
Source:
public void noteAudioTurnedOnLocked ( ) { if ( ! ( mAudioTurnedOn ) ) { mAudioTurnedOn = true ; if ( ( mAudioTurnedOnTimer ) == null ) { mAudioTurnedOnTimer = new com.android.internal.os.BatteryStatsImpl.StopwatchTimer ( this , AUDIO_TURNED_ON , null , mUnpluggables ) ; } mAudioTurnedOnTimer.startRunningLocked ( this ) ; } }

Target:
public void noteAudioTurnedOnLocked ( ) { if ( ! ( mAudioTurnedOn ) ) { mAudioTurnedOn = true ; createAudioTurnedOnTimerLocked ( ) . startRunningLocked ( this ) ; } }
Source:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( ids.mCallId ) ; }

Target:
public void testPullExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mCapabilities = android.telecom.Connection.CAPABILITY_CAN_PULL_CALL ; mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.any ( ) ) ; }
Source:
public java.util.concurrent.ScheduledFuture < ? > schedule ( java.lang.Runnable command , long delay , java.util.concurrent.TimeUnit unit ) { return delegate.schedule ( command , delay , unit ) ; }

Target:
public com.google.common.util.concurrent.ListenableScheduledFuture < ? > schedule ( java.lang.Runnable command , long delay , java.util.concurrent.TimeUnit unit ) { com.google.common.util.concurrent.ListenableFutureTask < java.lang.Void > task = com.google.common.util.concurrent.ListenableFutureTask.create ( command , null ) ; java.util.concurrent.ScheduledFuture < ? > scheduled = delegate.schedule ( task , delay , unit ) ; return new com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.ListenableScheduledTask < java.lang.Void > ( task , scheduled ) ; }
Source:
public boolean enableNetworkWithoutConnect ( int netId ) { if ( com.android.server.wifi.WifiNative.DBG ) logDbg ( ( "enableNetworkWithoutConnect nid=" + ( java.lang.Integer.toString ( netId ) ) ) ) ; return doBooleanCommand ( ( ( ( "ENABLE_NETWORK " + netId ) + " " ) + "no-connect" ) ) ; }

Target:
public boolean setP2pPowerSave ( java.lang.String iface , boolean enabled ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.setPowerSave ( iface , enabled ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( enabled ) { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 1" ) ) ; } else { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " P2P_SET ps 0" ) ) ; } } } }
Source:
private boolean contentEquals ( int start , java.lang.CharSequence cs , int n ) { for ( int i = 0 ; i < n ; ++ i ) { if ( ( bytes [ ( ( ( offset ) + start ) + i ) ] ) != ( cs.charAt ( i ) ) ) { return false ; } } return true ; }

Target:
private boolean regionMatches ( int start , java.lang.CharSequence cs , int n ) { for ( int i = 0 ; i < n ; ++ i ) { if ( ( bytes [ ( ( ( offset ) + start ) + i ) ] ) != ( cs.charAt ( i ) ) ) { return false ; } } return true ; }
Source:
public void loadFully ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface loaded ) { ensureHierarchy ( loaded ) ; ensureMarkers ( loaded ) ; ensureModifier ( loaded ) ; ensureAnnotations ( loaded ) ; ensureMethods ( loaded ) ; ensureFields ( loaded ) ; ensureEnclosing ( loaded ) ; ensureInners ( loaded ) ; if ( loaded instanceof com.android.jack.ir.ast.JDefinedAnnotation ) { ensureRetentionPolicy ( ( ( com.android.jack.ir.ast.JDefinedAnnotation ) ( loaded ) ) ) ; } assert ( loaded.getLoader ( ) ) != ( this ) ; }

Target:
public void loadFully ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface loaded ) { ensureHierarchy ( loaded ) ; ensureMarkers ( loaded ) ; ensureModifier ( loaded ) ; ensureAnnotations ( loaded ) ; ensureMethods ( loaded ) ; ensureFields ( loaded ) ; ensureEnclosing ( loaded ) ; ensureInners ( loaded ) ; if ( loaded instanceof com.android.jack.ir.ast.JDefinedAnnotationType ) { ensureRetentionPolicy ( ( ( com.android.jack.ir.ast.JDefinedAnnotationType ) ( loaded ) ) ) ; } assert ( loaded.getLoader ( ) ) != ( this ) ; }
Source:
public static final javax.crypto.KeyAgreement getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { if ( provider == null ) { throw new java.lang.IllegalArgumentException ( "provider == null" ) ; } if ( algorithm == null ) { throw new java.lang.NullPointerException ( "algorithm == null" ) ; } java.lang.Object spi = javax.crypto.KeyAgreement.ENGINE.getInstance ( algorithm , provider , null ) ; return new javax.crypto.KeyAgreement ( ( ( javax.crypto.KeyAgreementSpi ) ( spi ) ) , provider , algorithm ) ; }

Target:
public static final javax.crypto.KeyAgreement getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { if ( provider == null ) { throw new java.lang.IllegalArgumentException ( "provider == null" ) ; } return javax.crypto.KeyAgreement.getKeyAgreement ( algorithm , provider ) ; }
Source:
public boolean eglSwapBuffers ( javax.microedition.khronos.egl.EGLDisplay display , javax.microedition.khronos.egl.EGLSurface surface ) { begin ( "eglInitialize" ) ; arg ( "display" , display ) ; arg ( "surface" , surface ) ; end ( ) ; boolean result = mEgl10.eglSwapBuffers ( display , surface ) ; returns ( result ) ; checkError ( ) ; return result ; }

Target:
public boolean eglSwapBuffers ( javax.microedition.khronos.egl.EGLDisplay display , javax.microedition.khronos.egl.EGLSurface surface ) { begin ( "eglSwapBuffers" ) ; arg ( "display" , display ) ; arg ( "surface" , surface ) ; end ( ) ; boolean result = mEgl10.eglSwapBuffers ( display , surface ) ; returns ( result ) ; checkError ( ) ; return result ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { if ( ( androidMinApiLevel ) < ( com.android.jack.backend.dex.compatibility.AndroidCompatibilityChecker.N_API_LEVEL ) ) { if ( ( ( method.getEnclosingType ( ) ) instanceof com.android.jack.ir.ast.JInterface ) && ( method.isBridge ( ) ) ) { com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( method.getEnclosingType ( ) ) ; tr.append ( new com.android.jack.transformations.request.Remove ( method ) ) ; tr.commit ( ) ; } } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { if ( ( androidMinApiLevel.getReleasedLevel ( ) ) < ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) { if ( ( ( method.getEnclosingType ( ) ) instanceof com.android.jack.ir.ast.JInterface ) && ( method.isBridge ( ) ) ) { com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( method.getEnclosingType ( ) ) ; tr.append ( new com.android.jack.transformations.request.Remove ( method ) ) ; tr.commit ( ) ; } } }
Source:
public void setCallerDisplayName ( java.lang.String callId , java.lang.String callerDisplayName , int presentation ) { com.android.server.telecom.Log.startSession ( "CSW.sCDN" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setCallerDisplayName %s %s %d" , callId , callerDisplayName , presentation ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setCallerDisplayName ( callerDisplayName , presentation ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void setCallerDisplayName ( java.lang.String callId , java.lang.String callerDisplayName , int presentation ) { android.telecom.Log.startSession ( "CSW.sCDN" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setCallerDisplayName %s %s %d" , callId , callerDisplayName , presentation ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setCallerDisplayName ( callerDisplayName , presentation ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
public static com.android.dx.io.instructions.DecodedInstruction [ ] decodeAll ( short [ ] encodedInstructions ) { int size = encodedInstructions.length ; com.android.dx.io.instructions.DecodedInstruction [ ] decoded = new com.android.dx.io.instructions.DecodedInstruction [ size ] ; com.android.dx.io.instructions.ShortArrayCodeInput in = new com.android.dx.io.instructions.ShortArrayCodeInput ( encodedInstructions ) ; try { while ( in.hasMore ( ) ) { decoded [ in.cursor ( ) ] = com.android.dx.io.instructions.DecodedInstruction.decode ( in ) ; } } catch ( java.io.EOFException ex ) { throw new com.android.dx.util.DexException ( ex ) ; } return decoded ; }

Target:
public static com.android.dx.io.instructions.DecodedInstruction [ ] decodeAll ( short [ ] encodedInstructions ) { int size = encodedInstructions.length ; com.android.dx.io.instructions.DecodedInstruction [ ] decoded = new com.android.dx.io.instructions.DecodedInstruction [ size ] ; com.android.dx.io.instructions.ShortArrayCodeInput in = new com.android.dx.io.instructions.ShortArrayCodeInput ( encodedInstructions ) ; try { while ( in.hasMore ( ) ) { decoded [ in.cursor ( ) ] = com.android.dx.io.instructions.DecodedInstruction.decode ( in ) ; } } catch ( java.io.EOFException ex ) { throw new com.android.dex.DexException ( ex ) ; } return decoded ; }
Source:
public java.lang.Package getPackage ( ) { java.lang.Package pkg = super . getPackage ( ) ; if ( pkg == null ) { try { pkg = com.android.sdklib.internal.repository.packages.ExtraPackage.create ( null , getSourceProperties ( ) , mDesc.getVendorId ( ) , mDesc.getPath ( ) , 0 , null , null , null , getLocalDir ( ) . getPath ( ) ) ; setPackage ( pkg ) ; } catch ( java.lang.Exception e ) { appendLoadError ( "Failed to parse package: %1$s" , e.toString ( ) ) ; } } return pkg ; }

Target:
public java.lang.Package getPackage ( ) { java.lang.Package pkg = super . getPackage ( ) ; if ( pkg == null ) { try { pkg = com.android.sdklib.internal.repository.packages.ExtraPackage.create ( null , getSourceProperties ( ) , mDesc.getVendor ( ) . getId ( ) , mDesc.getPath ( ) , 0 , null , null , null , getLocalDir ( ) . getPath ( ) ) ; setPackage ( pkg ) ; } catch ( java.lang.Exception e ) { appendLoadError ( "Failed to parse package: %1$s" , e.toString ( ) ) ; } } return pkg ; }
Source:
public org.objectweb.asm.tree.analysis.SourceValue newOperation ( org.objectweb.asm.tree.AbstractInsnNode insn ) { if ( ( insn.getOpcode ( ) ) == ( org.objectweb.asm.Opcodes.NEW ) ) { java.lang.String desc = ( ( org.objectweb.asm.tree.TypeInsnNode ) ( insn ) ) . desc ; return new com.android.tools.lint.checks.JavaScriptInterfaceDetector.TypeValue ( 1 , desc ) ; } return super . newOperation ( insn ) ; }

Target:
public boolean visitNode ( lombok.ast.Node node ) { return ( mFoundCall ) || ( super . visitNode ( node ) ) ; }
Source:
public void onSupplementaryServiceIndication ( int indicationType , android.hardware.radio.V1_0.StkCcUnsolSsResult var2 ) { }

Target:
public void rilConnected ( int indicationType ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RIL_CONNECTED ) ; mRil.setRadioPower ( false , null ) ; mRil.setCdmaSubscriptionSource ( mRil.mCdmaSubscription , null ) ; mRil.setCellInfoListRate ( ) ; mRil.notifyRegistrantsRilConnectionChanged ( 15 ) ; mRil.updateScreenState ( true ) ; }
Source:
public static < W extends java.lang.Appendable & java.io.Closeable > void write ( java.lang.CharSequence from , com.google.common.io.OutputSupplier < W > to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; boolean threw = true ; W out = to.getOutput ( ) ; try { out.append ( from ) ; threw = false ; } finally { com.google.common.io.Closeables.close ( out , threw ) ; } }

Target:
public void write ( java.lang.String str ) { com.google.common.base.Preconditions.checkNotNull ( str ) ; }
Source:
private boolean findMinMat2 ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinMat ( RS , seed , size , 2 , com.android.rs.test.Element.MATRIX_2X2 ( RS ) , ( com.android.rs.test.Allocation input ) -> s.reduce_findMinMat2 ( input ) . get ( ) ) ; }

Target:
private boolean findMinMat2 ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinMat ( RS , seed , size , 2 , android.renderscript.Element.MATRIX_2X2 ( RS ) , ( android.renderscript.Allocation input ) -> s.reduce_findMinMat2 ( input ) . get ( ) ) ; }
Source:
private java.lang.String getCurrentOrientation ( final com.android.ide.common.api.INode node ) { java.lang.String orientation = node.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ; if ( ( orientation == null ) || ( ( orientation.length ( ) ) == 0 ) ) { orientation = com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL ; } return orientation ; }

Target:
private java.lang.String getCurrentOrientation ( final com.android.ide.common.api.INode node ) { java.lang.String orientation = node.getStringAttr ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ORIENTATION ) ; if ( ( orientation == null ) || ( ( orientation.length ( ) ) == 0 ) ) { orientation = com.android.ide.common.layout.LayoutConstants.VALUE_HORIZONTAL ; } return orientation ; }
Source:
public boolean addPowerSaveWhitelistAppInternal ( java.lang.String name ) { synchronized ( this ) { try { android.content.pm.ApplicationInfo ai = getContext ( ) . getPackageManager ( ) . getApplicationInfo ( name , 0 ) ; if ( ( mPowerSaveWhitelistUserApps.put ( name , android.os.UserHandle.getAppId ( ai.uid ) ) ) == null ) { reportPowerSaveWhitelistChangedLocked ( ) ; updateWhitelistAppIdsLocked ( ) ; writeConfigFileLocked ( ) ; } return true ; } catch ( android.content.pm.PackageManager e ) { return false ; } } }

Target:
public boolean addPowerSaveWhitelistAppInternal ( java.lang.String name ) { synchronized ( this ) { try { android.content.pm.ApplicationInfo ai = getContext ( ) . getPackageManager ( ) . getApplicationInfo ( name , ( ( ( android.content.pm.PackageManager.GET_UNINSTALLED_PACKAGES ) | ( android.content.pm.PackageManager.GET_DISABLED_COMPONENTS ) ) | ( android.content.pm.PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS ) ) ) ; if ( ( mPowerSaveWhitelistUserApps.put ( name , android.os.UserHandle.getAppId ( ai.uid ) ) ) == null ) { reportPowerSaveWhitelistChangedLocked ( ) ; updateWhitelistAppIdsLocked ( ) ; writeConfigFileLocked ( ) ; } return true ; } catch ( android.content.pm.PackageManager e ) { return false ; } } }
Source:
static < K , V > java.util.Iterator < K > keyIterator ( java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ) { return new com.google.common.collect.TransformedIterator < java.util.Map.Entry < K , V > , K > ( entryIterator ) { @ java.lang.Override K transform ( java.util.Map.Entry < K , V > entry ) { return entry.getKey ( ) ; } } ; }

Target:
private static < K , V > com.google.common.base.Predicate < java.util.Map.Entry < V , K > > inversePredicate ( final com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > forwardPredicate ) { return new com.google.common.base.Predicate < java.util.Map.Entry < V , K > > ( ) { @ java.lang.Override public boolean apply ( java.util.Map.Entry < V , K > input ) { return forwardPredicate.apply ( com.google.common.collect.Maps.immutableEntry ( input.getValue ( ) , input.getKey ( ) ) ) ; } } ; }
Source:
public java.lang.String getShortDescription ( ) { if ( ( ( mUiName ) != null ) && ( ( mUiName.length ( ) ) > 0 ) ) { java.lang.String host = "malformed URL" ; try { java.net.URL u = new java.net.URL ( mUrl ) ; host = u.getHost ( ) ; } catch ( java.net.MalformedURLException e ) { } return java.lang.String.format ( "%1$s (%2$s)" , mUiName , host ) ; } return mUrl ; }

Target:
public java.lang.String getShortDescription ( ) { if ( ( ( mUiName ) != null ) && ( ! ( mUiName.isEmpty ( ) ) ) ) { java.lang.String host = "malformed URL" ; try { java.net.URL u = new java.net.URL ( mUrl ) ; host = u.getHost ( ) ; } catch ( java.net.MalformedURLException e ) { } return java.lang.String.format ( "%1$s (%2$s)" , mUiName , host ) ; } return mUrl ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; com.intellij.updater.PatchSpec spec = new com.intellij.updater.PatchSpec ( ) . setOldFolder ( myOlderDir.getAbsolutePath ( ) ) . setNewFolder ( myNewerDir.getAbsolutePath ( ) ) ; myPatch = new com.intellij.updater.Patch ( spec , TEST_UI ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; com.intellij.updater.PatchSpec spec = new com.intellij.updater.PatchSpec ( ) . addOldFolder ( myOlderDir.getAbsolutePath ( ) ) . setNewFolder ( myNewerDir.getAbsolutePath ( ) ) ; myPatch = new com.intellij.updater.Patch ( spec , TEST_UI ) ; }
Source:
public boolean onPrepareOptionsMenu ( com.android.internal.telephony.cat.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean helpVisible = false ; boolean mainVisible = false ; if ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_SECONDARY ) ) { mainVisible = true ; } if ( ( mStkMenu ) != null ) { helpVisible = mStkMenu.helpAvailable ; } menu.findItem ( StkApp.MENU_ID_END_SESSION ) . setVisible ( mainVisible ) ; menu.findItem ( StkApp.MENU_ID_HELP ) . setVisible ( helpVisible ) ; return true ; }

Target:
public boolean onPrepareOptionsMenu ( com.android.internal.telephony.cat.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; boolean mainVisible = false ; if ( ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_SECONDARY ) ) && ( mAcceptUsersInput ) ) { mainVisible = true ; } menu.findItem ( StkApp.MENU_ID_END_SESSION ) . setVisible ( mainVisible ) ; return true ; }
Source:
public java.lang.Iterable < java.lang.Object > getConfigObjects ( ) { java.util.List < java.lang.Object > list = com.google.common.collect.Lists.newArrayListWithExpectedSize ( ( ( mFlavorConfigs.size ( ) ) + 2 ) ) ; list.add ( mDefaultConfig ) ; list.add ( mBuildType ) ; list.addAll ( mFlavorConfigs ) ; return list ; }

Target:
public java.util.List < java.io.File > getAidlSourceList ( ) { java.util.List < java.io.File > sourceList = com.google.common.collect.Lists.newArrayList ( ) ; sourceList.add ( mDefaultSourceProvider.getAidlDir ( ) ) ; if ( ( mType ) != ( com.android.builder.VariantConfiguration.Type.TEST ) ) { sourceList.add ( mBuildTypeSourceProvider.getAidlDir ( ) ) ; } if ( hasFlavors ( ) ) { for ( com.android.builder.SourceProvider flavorSourceSet : mFlavorSourceProviders ) { sourceList.add ( flavorSourceSet.getAidlDir ( ) ) ; } } return sourceList ; }
Source:
public void execute ( com.android.build.gradle.tasks.Lint lintTask ) { lintTask.setDescription ( "Runs lint on all variants." ) ; lintTask.setGroup ( JavaBasePlugin.VERIFICATION_GROUP ) ; lintTask.setLintOptions ( getExtension ( ) . getLintOptions ( ) ) ; lintTask.setSdkHome ( sdkHandler.getSdkFolder ( ) ) ; lintTask.setToolingRegistry ( toolingRegistry ) ; }

Target:
public void execute ( com.android.build.gradle.tasks.Lint lintTask ) { lintTask.setDescription ( "Runs lint on all variants." ) ; lintTask.setVariantName ( "" ) ; lintTask.setGroup ( JavaBasePlugin.VERIFICATION_GROUP ) ; lintTask.setLintOptions ( getExtension ( ) . getLintOptions ( ) ) ; lintTask.setSdkHome ( sdkHandler.getSdkFolder ( ) ) ; lintTask.setToolingRegistry ( toolingRegistry ) ; }
Source:
private javax.net.ssl.SSLSocketFactory makeSocketFactory ( javax.net.ssl.KeyManager [ ] keyManagers , javax.net.ssl.TrustManager [ ] trustManagers ) { try { com.android.org.conscrypt.OpenSSLContextImpl sslContext = new com.android.org.conscrypt.OpenSSLContextImpl ( ) ; sslContext.engineInit ( keyManagers , trustManagers , null ) ; sslContext.engineGetClientSessionContext ( ) . setPersistentCache ( mSessionCache ) ; return sslContext.engineGetSocketFactory ( ) ; } catch ( java.security.KeyManagementException e ) { android.util.Log.wtf ( android.net.SSLCertificateSocketFactory.TAG , e ) ; return ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; } }

Target:
private javax.net.ssl.SSLSocketFactory makeSocketFactory ( javax.net.ssl.KeyManager [ ] keyManagers , javax.net.ssl.TrustManager [ ] trustManagers ) { try { com.android.org.conscrypt.OpenSSLContextImpl sslContext = com.android.org.conscrypt.OpenSSLContextImpl.getPreferred ( ) ; sslContext.engineInit ( keyManagers , trustManagers , null ) ; sslContext.engineGetClientSessionContext ( ) . setPersistentCache ( mSessionCache ) ; return sslContext.engineGetSocketFactory ( ) ; } catch ( java.security.KeyManagementException e ) { android.util.Log.wtf ( android.net.SSLCertificateSocketFactory.TAG , e ) ; return ( ( javax.net.ssl.SSLSocketFactory ) ( javax.net.ssl.SSLSocketFactory.getDefault ( ) ) ) ; } }
Source:
public java.lang.String getType ( android.net.Uri uri ) { final int match = com.android.bookmarkprovider.BookmarkProvider.URI_MATCHER.match ( uri ) ; switch ( match ) { case com.android.bookmarkprovider.BookmarkProvider.LEGACY : case com.android.bookmarkprovider.BookmarkProvider.BOOKMARKS : return android.provider.BrowserContract.Bookmarks.CONTENT_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.LEGACY_ID : case com.android.bookmarkprovider.BookmarkProvider.BOOKMARKS_ID : return android.provider.BrowserContract.Bookmarks.CONTENT_ITEM_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.HISTORY : return android.provider.BrowserContract.History.CONTENT_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.HISTORY_ID : return android.provider.BrowserContract.History.CONTENT_ITEM_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.SEARCHES : return android.provider.BrowserContract.Searches.CONTENT_TYPE ; case com.android.bookmarkprovider.BookmarkProvider.SEARCHES_ID : return android.provider.BrowserContract.Searches.CONTENT_ITEM_TYPE ; } return null ; }

Target:
public int delete ( android.net.Uri uri , java.lang.String selection , java.lang.String [ ] selectionArgs ) { return 0 ; }
Source:
public void testAssertNoOverlapsViewNotFound ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.length ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "nonexistent" ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noOverlaps ( ) ) ; } catch ( android.support.test.espresso.NoMatchingViewException expected ) { return ; } fail ( "NoMatchingViewException should be thrown" ) ; }

Target:
public void assertNoOverlapsViewNotFound ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.length ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; expectedException.expect ( android.support.test.espresso.NoMatchingViewException.class ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "nonexistent" ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noOverlaps ( ) ) ; }
Source:
public void reloadViewHierarchy ( ) { com.android.hierarchyviewerlib.device.Window window = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getWindow ( ) ; if ( window != null ) { loadViewTreeData ( window ) ; } }

Target:
public void relayoutCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Request layout" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.requestLayout ( selectedNode.viewNode ) ; } } ) ; } }
Source:
public void testLaunchToSide ( ) throws java.lang.Exception { HEAD ( 5 ) ; android.server.cts.c121a Merge ; }

Target:
public void testDockActivity ( ) throws java.lang.Exception { if ( ( ! ( supportsMultiWindowMode ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
public void disconnectClientAfterStartingWifi ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( mock ( android.os.Handler.class ) ) ; mLooper.dispatchAll ( ) ; setupAndLoadDriver ( com.android.server.wifi.scanner.WifiScanningServiceTest.TEST_MAX_SCAN_BUCKETS_IN_CAPABILITIES ) ; controlChannel.disconnect ( ) ; mLooper.dispatchAll ( ) ; }

Target:
public void disconnectClientAfterStartingWifi ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( org.mockito.Mockito.mock ( android.os.Handler.class ) ) ; mLooper.dispatchAll ( ) ; setupAndLoadDriver ( com.android.server.wifi.scanner.WifiScanningServiceTest.TEST_MAX_SCAN_BUCKETS_IN_CAPABILITIES ) ; controlChannel.disconnect ( ) ; mLooper.dispatchAll ( ) ; }
Source:
private void queryProfileOwner ( boolean showToast ) { try { android.content.Intent intent = new android.content.Intent ( ByodHelperActivity.ACTION_QUERY_PROFILE_OWNER ) ; startActivityForResult ( intent , com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_PROFILE_OWNER_STATUS ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( TAG , "queryProfileOwner: ActivityNotFoundException" , e ) ; setTestResult ( mProfileOwnerInstalled , TestResult.TEST_RESULT_FAILED ) ; if ( showToast ) { showToast ( R.string.provisioning_byod_no_activity ) ; } } }

Target:
private void queryProfileOwner ( boolean showToast ) { try { android.content.Intent intent = new android.content.Intent ( ByodHelperActivity.ACTION_QUERY_PROFILE_OWNER ) ; startActivityForResult ( intent , com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_PROFILE_OWNER_STATUS ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.TAG , "queryProfileOwner: ActivityNotFoundException" , e ) ; setTestResult ( mProfileOwnerInstalled , TestResult.TEST_RESULT_FAILED ) ; if ( showToast ) { showToast ( R.string.provisioning_byod_no_activity ) ; } } }
Source:
public void open ( android.telephony.ims.feature.MmTelFeature.Listener listener ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } try { mMmTelFeatureConnection.openConnection ( listener ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "open()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public void open ( android.telephony.ims.feature.MmTelFeature.Listener listener ) throws com.android.ims.ImsException { checkAndThrowExceptionIfServiceUnavailable ( ) ; if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } try { mMmTelFeatureConnection.openConnection ( listener ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "open()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public void testOnFocusChanged ( ) { final android.widget.cts.GridViewTest.MockGridView mockGridView = new android.widget.cts.GridViewTest.MockGridView ( mActivity ) ; assertFalse ( mockGridView.hasCalledOnFocusChanged ( ) ) ; mockGridView.setAdapter ( new android.widget.cts.GridViewTest.MockGridViewAdapter ( 10 ) ) ; mockGridView.setFocusable ( true ) ; mockGridView.requestFocus ( ) ; assertTrue ( mockGridView.hasCalledOnFocusChanged ( ) ) ; mockGridView.reset ( ) ; assertFalse ( mockGridView.hasCalledOnFocusChanged ( ) ) ; mockGridView.clearFocus ( ) ; assertTrue ( mockGridView.hasCalledOnFocusChanged ( ) ) ; }

Target:
public void run ( ) { final android.widget.cts.GridViewTest.MockGridView mockGridView = new android.widget.cts.GridViewTest.MockGridView ( mActivity ) ; org.junit.Assert.assertFalse ( mockGridView.hasCalledOnFocusChanged ( ) ) ; mockGridView.setAdapter ( new android.widget.cts.GridViewTest.MockGridViewAdapter ( 10 ) ) ; mockGridView.setFocusable ( true ) ; mockGridView.requestFocus ( ) ; org.junit.Assert.assertTrue ( mockGridView.hasCalledOnFocusChanged ( ) ) ; mockGridView.reset ( ) ; org.junit.Assert.assertFalse ( mockGridView.hasCalledOnFocusChanged ( ) ) ; mockGridView.clearFocus ( ) ; org.junit.Assert.assertTrue ( mockGridView.hasCalledOnFocusChanged ( ) ) ; }
Source:
public void clearCache ( final boolean includeDiskFiles ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearCache ( includeDiskFiles ) ; } } ) ; return ; } mAwContents.clearCache ( includeDiskFiles ) ; }

Target:
public void onResume ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onResume ( ) ; } } ) ; return ; } mAwContents.onResume ( ) ; }
Source:
public java.lang.String getDeviceId ( ) { java.lang.String id = getMeid ( ) ; if ( ( id == null ) || ( id.matches ( "^0*$" ) ) ) { android.util.Log.d ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "getDeviceId(): MEID is not initialized use ESN" ) ; id = getEsn ( ) ; } return id ; }

Target:
public java.lang.String getDeviceId ( ) { java.lang.String id = getMeid ( ) ; if ( ( id == null ) || ( id.matches ( "^0*$" ) ) ) { android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "getDeviceId(): MEID is not initialized use ESN" ) ; id = getEsn ( ) ; } return id ; }
Source:
public void parseCacheHeaders_noHeaders ( ) { com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEquals ( 0 , entry.serverDate ) ; assertEquals ( 0 , entry.lastModified ) ; assertEquals ( 0 , entry.ttl ) ; assertEquals ( 0 , entry.softTtl ) ; }

Target:
public void parseCacheHeaders_noHeaders ( ) { com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; org.junit.Assert.assertNotNull ( entry ) ; org.junit.Assert.assertNull ( entry.etag ) ; org.junit.Assert.assertEquals ( 0 , entry.serverDate ) ; org.junit.Assert.assertEquals ( 0 , entry.lastModified ) ; org.junit.Assert.assertEquals ( 0 , entry.ttl ) ; org.junit.Assert.assertEquals ( 0 , entry.softTtl ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { final java.lang.Thread [ ] threads = new java.lang.Thread [ Main.numberOfThreads ] ; for ( int t = 0 ; t < ( threads.length ) ; t ++ ) { threads [ t ] = new java.lang.Thread ( new Main ( ) ) ; threads [ t ] . start ( ) ; } for ( java.lang.Thread t : threads ) { t.join ( ) ; } java.lang.System.out.println ( "Finishing" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { final java.lang.Thread [ ] threads = new java.lang.Thread [ Main.numberOfThreads ] ; Main.test_getStackTraces ( ) ; for ( int t = 0 ; t < ( threads.length ) ; t ++ ) { threads [ t ] = new java.lang.Thread ( new Main ( ) ) ; threads [ t ] . start ( ) ; } for ( java.lang.Thread t : threads ) { t.join ( ) ; } java.lang.System.out.println ( "Finishing" ) ; }
Source:
private void fetchRuimRecords ( ) { recordsRequested = true ; android.util.Log.v ( com.android.internal.telephony.cdma.RuimRecords.LOG_TAG , ( "RuimRecords:fetchRuimRecords " + ( recordsToLoad ) ) ) ; phone.getIccFileHandler ( ) . loadEFTransparent ( com.android.internal.telephony.cdma.EF_ICCID , obtainMessage ( com.android.internal.telephony.cdma.RuimRecords.EVENT_GET_ICCID_DONE ) ) ; ( recordsToLoad ) ++ ; }

Target:
private void fetchRuimRecords ( ) { recordsRequested = true ; android.util.Log.v ( com.android.internal.telephony.cdma.RuimRecords.LOG_TAG , ( "RuimRecords:fetchRuimRecords " + ( recordsToLoad ) ) ) ; phone.mCM.getIMSI ( obtainMessage ( com.android.internal.telephony.cdma.RuimRecords.EVENT_GET_IMSI_DONE ) ) ; ( recordsToLoad ) ++ ; phone.getIccFileHandler ( ) . loadEFTransparent ( com.android.internal.telephony.cdma.EF_ICCID , obtainMessage ( com.android.internal.telephony.cdma.RuimRecords.EVENT_GET_ICCID_DONE ) ) ; ( recordsToLoad ) ++ ; }
Source:
public void onProgressChanged ( int progress ) { 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 , ( "onProgressChanged=" + progress ) ) ; mWebChromeClient.onProgressChanged ( mWebView , progress ) ; } org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onProgressChanged ( int progress ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onProgressChanged" ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onProgressChanged=" + progress ) ) ; mWebChromeClient.onProgressChanged ( mWebView , progress ) ; } } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onProgressChanged" ) ; } }
Source:
public void hangupConnection ( int gsmIndex , android.os.Message result ) { boolean success ; success = simulatedCallState.onChld ( '1' , ( ( char ) ( '0' + gsmIndex ) ) ) ; if ( ! success ) { android.util.Log.i ( "GSM" , "[SimCmd] hangupConnection: resultFail" ) ; resultFail ( result , new java.lang.RuntimeException ( "Hangup Error" ) ) ; } else { android.util.Log.i ( "GSM" , "[SimCmd] hangupConnection: resultSuccess" ) ; resultSuccess ( result , null ) ; } }

Target:
public void hangupConnection ( int gsmIndex , android.os.Message result ) { boolean success ; success = simulatedCallState.onChld ( '1' , ( ( char ) ( '0' + gsmIndex ) ) ) ; if ( ! success ) { android.telephony.Rlog.i ( "GSM" , "[SimCmd] hangupConnection: resultFail" ) ; resultFail ( result , new java.lang.RuntimeException ( "Hangup Error" ) ) ; } else { android.telephony.Rlog.i ( "GSM" , "[SimCmd] hangupConnection: resultSuccess" ) ; resultSuccess ( result , null ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mServiceManagerMockedServices.put ( "isub" , mISubStub ) ; mGsmSmsDispatcherTestHandler = new com.android.internal.telephony.gsm.GsmSmsDispatcherTest.GsmSmsDispatcherTestHandler ( getClass ( ) . getSimpleName ( ) ) ; mGsmSmsDispatcherTestHandler.start ( ) ; waitUntilReady ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mServiceManagerMockedServices.put ( "isub" , mISubStub ) ; org.mockito.Mockito.doReturn ( mSmsUsageMonitor ) . when ( mSmsDispatchersController ) . getUsageMonitor ( ) ; mGsmSmsDispatcherTestHandler = new com.android.internal.telephony.gsm.GsmSmsDispatcherTest.GsmSmsDispatcherTestHandler ( getClass ( ) . getSimpleName ( ) ) ; mGsmSmsDispatcherTestHandler.start ( ) ; waitUntilReady ( ) ; }
Source:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return sendReportNative ( id , data ) ; }

Target:
synchronized boolean unregisterApp ( android.bluetooth.BluetoothHidDeviceAppConfiguration config ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp()" ) ; } if ( config == null ) { android.util.Log.w ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp: failed. The config in parameter should not be null" ) ; return false ; } if ( ( ( mAppConfig ) == null ) || ( ! ( config.equals ( mAppConfig ) ) ) ) { android.util.Log.w ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp: failed. The app configuration does not match the record" ) ; return false ; } return mHidDeviceNativeInterface.unregisterApp ( ) ; }
Source:
public void setRingerModeExternal ( int ringerMode , java.lang.String caller ) { setRingerMode ( ringerMode , caller , true ) ; }

Target:
public void setRingerModeExternal ( int ringerMode , java.lang.String caller ) { if ( ( ( isAndroidNPlus ( caller ) ) && ( wouldToggleZenMode ( ringerMode ) ) ) && ( ! ( mNm.isNotificationPolicyAccessGrantedForPackage ( caller ) ) ) ) { throw new java.lang.SecurityException ( "Not allowed to change Do Not Disturb state" ) ; } setRingerMode ( ringerMode , caller , true ) ; }