auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.util.Properties createLoadedProps ( ) { java.util.Properties props = super . createProps ( ) ; props.setProperty ( PkgProps.EXTRA_VENDOR , "vendor" ) ; props.setProperty ( PkgProps.EXTRA_PATH , "the_path" ) ; props.setProperty ( PkgProps.EXTRA_OLD_PATHS , "old_path1;oldpath2" ) ; props.setProperty ( PkgProps.EXTRA_MIN_API_LEVEL , "11" ) ; props.setProperty ( PkgProps.EXTRA_PROJECT_FILES , ( ( ( ( "path1.jar" + ( com.android.sdklib.internal.repository.packages.ExtraPackageTest_v3.PS ) ) + "dir2/jar 2.jar" ) + ( com.android.sdklib.internal.repository.packages.ExtraPackageTest_v3.PS ) ) + "dir/3/path" ) ) ; return props ; }

Target:
private java.util.Properties createLoadedProps ( ) { java.util.Properties props = super . createExpectedProps ( ) ; props.setProperty ( PkgProps.EXTRA_VENDOR , "vendor" ) ; props.setProperty ( PkgProps.EXTRA_PATH , "the_path" ) ; props.setProperty ( PkgProps.EXTRA_OLD_PATHS , "old_path1;oldpath2" ) ; props.setProperty ( PkgProps.EXTRA_MIN_API_LEVEL , "11" ) ; props.setProperty ( PkgProps.EXTRA_PROJECT_FILES , ( ( ( ( "path1.jar" + ( com.android.sdklib.internal.repository.packages.ExtraPackageTest_v3.PS ) ) + "dir2/jar 2.jar" ) + ( com.android.sdklib.internal.repository.packages.ExtraPackageTest_v3.PS ) ) + "dir/3/path" ) ) ; return props ; }
Source:
final void put ( int [ ] src , int srcOffset , int intCount ) { checkNotFreed ( ) ; int byteCount = checkPutBounds ( SizeOf.INT , src.length , srcOffset , intCount ) ; this . block.pokeIntArray ( ( ( offset ) + ( position ) ) , src , srcOffset , intCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void put ( int [ ] src , int srcOffset , int intCount ) { checkIsAccessible ( ) ; int byteCount = checkPutBounds ( SizeOf.INT , src.length , srcOffset , intCount ) ; this . block.pokeIntArray ( ( ( offset ) + ( position ) ) , src , srcOffset , intCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void connectionForPostWithBodyRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.PostWithBody request = new com.android.volley.mock.TestRequest.PostWithBody ( ) ; assertEquals ( request.getMethod ( ) , Method.POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "POST" , mMockConnection.getRequestMethod ( ) ) ; assertTrue ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void connectionForTraceRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.Trace request = new com.android.volley.mock.TestRequest.Trace ( ) ; org.junit.Assert.assertEquals ( request.getMethod ( ) , Method.TRACE ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; org.mockito.Mockito.verify ( mMockConnection ) . setRequestMethod ( "TRACE" ) ; org.mockito.Mockito.verify ( mMockConnection , org.mockito.Mockito.never ( ) ) . setDoOutput ( true ) ; }
Source:
public boolean isImsUseEnabled ( ) { boolean imsUseEnabled = ( ( com.android.ims.ImsManager.isVolteEnabledByPlatform ( mContext ) ) && ( com.android.ims.ImsManager.isEnhanced4gLteModeSettingEnabledByUser ( mContext ) ) ) || ( ( ( com.android.ims.ImsManager.isWfcEnabledByPlatform ( mContext ) ) && ( com.android.ims.ImsManager.isWfcEnabledByUser ( mContext ) ) ) && ( com.android.ims.ImsManager.isNonTtyOrTtyOnVolteEnabled ( mContext ) ) ) ; return imsUseEnabled ; }

Target:
public boolean isImsUseEnabled ( ) { com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mContext , mPhoneId ) ; boolean imsUseEnabled = ( ( imsManager.isVolteEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) || ( ( ( imsManager.isWfcEnabledByPlatform ( ) ) && ( imsManager.isWfcEnabledByUser ( ) ) ) && ( imsManager.isNonTtyOrTtyOnVolteEnabled ( ) ) ) ; return imsUseEnabled ; }
Source:
public void coreToJayceFromJar ( ) throws java.lang.Exception { com.android.jill.Options options = new com.android.jill.Options ( ) ; options.setBinaryFile ( new java.io.File ( ( ( com.android.jack.test.TestsProperties.getAndroidRootDir ( ) . getPath ( ) ) + "/out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar" ) ) ) ; options.setVerbose ( true ) ; options.container = ContainerType.DIR ; options.outputDirOrZip = com.android.jill.JillTestTools.createTempDir ( "core_" , "_dir" ) ; new com.android.jill.Jill ( options , "0.1" ) . process ( options.getBinaryFile ( ) ) ; }

Target:
public void coreToJayceFromJar ( ) throws java.lang.Exception { com.android.jill.Options options = new com.android.jill.Options ( ) ; options.setBinaryFile ( new java.io.File ( ( ( com.android.jack.test.TestsProperties.getAndroidRootDir ( ) . getPath ( ) ) + "/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar" ) ) ) ; options.setVerbose ( true ) ; options.output = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "jillTest" , ".zip" ) ; new com.android.jill.Jill ( options , "0.1" ) . process ( options.getBinaryFile ( ) ) ; }
Source:
public void testProxyingPrivateMethods_NotIntercepted ( ) throws java.lang.Throwable { assertEquals ( "expected" , proxyFor ( com.google.dexmaker.stock.ProxyBuilderTest.HasPrivateMethod.class ) . build ( ) . result ( ) ) ; }

Target:
public void testProxyingPrivateMethods_NotIntercepted ( ) throws java.lang.Throwable { com.google.dexmaker.stock.ProxyBuilderTest.HasPrivateMethod proxy = proxyFor ( com.google.dexmaker.stock.ProxyBuilderTest.HasPrivateMethod.class ) . build ( ) ; try { proxy.getClass ( ) . getDeclaredMethod ( "result" ) ; fail ( ) ; } catch ( java.lang.NoSuchMethodException expected ) { } assertEquals ( "expected" , proxy.result ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { mAndroidJUnitRunner = new com.android.test.runner.AndroidJUnitRunner ( ) { @ java.lang.Override com.android.test.runner.TestRequestBuilder createTestRequestBuilder ( java.io.PrintStream writer , java.lang.String ... packageCodePaths ) { return mMockBuilder ; } @ java.lang.Override public android.content.Context getContext ( ) { return mMockContext ; } } ; mStubStream = new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ; com.google.testing.littlemock.LittleMock.initMocks ( this ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mAndroidJUnitRunner = new com.android.test.runner.AndroidJUnitRunner ( ) { @ java.lang.Override com.android.test.runner.TestRequestBuilder createTestRequestBuilder ( java.io.PrintStream writer , java.lang.String ... packageCodePaths ) { return mMockBuilder ; } @ java.lang.Override public android.content.Context getContext ( ) { return mMockContext ; } } ; mAndroidJUnitRunner.setArguments ( new android.os.Bundle ( ) ) ; mStubStream = new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ; com.google.testing.littlemock.LittleMock.initMocks ( this ) ; }
Source:
public java.lang.Object getSystemService ( java.lang.String name ) { if ( name.equals ( Context.LAYOUT_INFLATER_SERVICE ) ) { android.view.LayoutInflater i = ( ( android.view.LayoutInflater ) ( getBaseContext ( ) . getSystemService ( name ) ) ) ; return i.cloneInContext ( this ) ; } else { return getBaseContext ( ) . getSystemService ( name ) ; } }

Target:
public void run ( ) { setHorizontalScrollbarOverlay ( overlay ) ; }
Source:
public void run ( ) { try { method.right ( null , mSpannable ) ; } catch ( java.lang.NullPointerException e ) { } try { method.right ( mTextView , null ) ; } catch ( java.lang.NullPointerException e ) { } try { method.left ( null , mSpannable ) ; } catch ( java.lang.NullPointerException e ) { } try { method.left ( mTextView , null ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public void run ( ) { getActivity ( ) . setContentView ( mTextView ) ; }
Source:
public static long getUidTxPackets ( int uid ) { final int callingUid = android.net.android.os.Process.myUid ( ) ; if ( ( callingUid == android.net.android.os.Process ) || ( callingUid == uid ) ) { return android.net.TrafficStats.nativeGetUidStat ( uid , android.net.TrafficStats.TYPE_TX_PACKETS ) ; } else { return android.net.TrafficStats.UNSUPPORTED ; } }

Target:
public static long getLoopbackTxPackets ( ) { try { return android.net.TrafficStats.getStatsService ( ) . getIfaceStats ( android.net.TrafficStats.LOOPBACK_IFACE , android.net.TrafficStats.TYPE_TX_PACKETS ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public org.objectweb.asm.tree.analysis.SourceValue newValue ( org.objectweb.asm.Type type ) { if ( ( type != null ) && ( ( type.getSort ( ) ) == ( org.objectweb.asm.Type.VOID ) ) ) { return null ; } else if ( type != null ) { return new com.android.tools.lint.checks.JavaScriptInterfaceDetector.TypeValue ( 1 , type.getInternalName ( ) ) ; } return super . newValue ( type ) ; }

Target:
public void afterVisitConstructorInvocation ( @ com.android.annotations.NonNull lombok.ast.ConstructorInvocation node ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = mContext.resolve ( node ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) ( resolved ) ) ; mTypes.put ( node , method.getContainingClass ( ) ) ; } else { com.android.tools.lint.client.api.JavaParser.TypeDescriptor type = mContext.getType ( node ) ; if ( type != null ) { com.android.tools.lint.client.api.JavaParser.ResolvedClass typeClass = type.getTypeClass ( ) ; if ( typeClass != null ) { mTypes.put ( node , typeClass ) ; } } } }
Source:
public java.lang.Object getValue ( @ com.android.annotations.NonNull java.lang.String name ) { org.eclipse.jdt.internal.compiler.lookup.ElementValuePair [ ] pairs = mBinding.getElementValuePairs ( ) ; if ( pairs != null ) { for ( org.eclipse.jdt.internal.compiler.lookup.ElementValuePair pair : pairs ) { if ( com.android.tools.lint.EcjParser.sameChars ( name , pair.getName ( ) ) ) { return pair.getValue ( ) ; } } } return null ; }

Target:
public java.lang.Object getValue ( @ com.android.annotations.NonNull java.lang.String name ) { org.eclipse.jdt.internal.compiler.lookup.ElementValuePair [ ] pairs = mBinding.getElementValuePairs ( ) ; if ( pairs != null ) { for ( org.eclipse.jdt.internal.compiler.lookup.ElementValuePair pair : pairs ) { if ( com.android.tools.lint.EcjParser.sameChars ( name , pair.getName ( ) ) ) { return getPairValue ( pair ) ; } } } return null ; }
Source:
private void writeReturn ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , int stackIdx ) throws java.io.IOException { writeDebugBegin ( currentClass , currentLine ) ; writer.writeCatchBlockIds ( currentCatchList ) ; writer.writeKeyword ( Token.RETURN_STATEMENT ) ; writer.writeOpen ( ) ; if ( stackIdx == 0 ) { writer.writeNull ( ) ; } else { writeStackAccess ( frame , stackIdx ) ; } writeDebugEnd ( currentClass , currentLine ) ; writer.writeClose ( ) ; }

Target:
private void writeReturn ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , int stackIdx ) throws java.io.IOException { writeDebugBegin ( currentClass , currentLine ) ; writer.writeCatchBlockIds ( currentCatchList ) ; writer.writeKeyword ( Token.RETURN_STATEMENT ) ; writer.writeOpen ( ) ; if ( stackIdx == 0 ) { writer.writeNull ( ) ; } else { readStack ( frame , stackIdx ) ; } writeDebugEnd ( currentClass , currentLine ) ; writer.writeClose ( ) ; }
Source:
public void startsOutAvailable ( ) { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , android.net.ConnectivityManager.TETHERING_BLUETOOTH , mNMService , mStatsService , mTetherHelper ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mTetherHelper , mNMService , mStatsService ) ; }

Target:
public void startsOutAvailable ( ) { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , android.net.ConnectivityManager.TETHERING_BLUETOOTH , mNMService , mStatsService , mTetherHelper , mIPv6TetheringInterfaceServices ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mTetherHelper , mNMService , mStatsService ) ; }
Source:
public java.util.List < java.net.URI > getURIs ( ) { lock.lock ( ) ; try { java.util.List < java.net.URI > result = new java.util.ArrayList < java.net.URI > ( uriIndex.keySet ( ) ) ; result.remove ( null ) ; return java.util.Collections.unmodifiableList ( result ) ; } finally { lock.unlock ( ) ; } }

Target:
public java.util.List < java.net.URI > getURIs ( ) { java.util.List < java.net.URI > uris = new java.util.ArrayList < java.net.URI > ( ) ; lock.lock ( ) ; try { java.util.List < java.net.URI > result = new java.util.ArrayList < java.net.URI > ( uriIndex.keySet ( ) ) ; result.remove ( null ) ; return java.util.Collections.unmodifiableList ( result ) ; } finally { uris.addAll ( uriIndex.keySet ( ) ) ; lock.unlock ( ) ; } }
Source:
public void execute ( proguard.preverify.ClassPool programClassPool ) { programClassPool.classesAccept ( new proguard.preverify.ClassCleaner ( ) ) ; proguard.preverify.ClassVisitor inliner = new proguard.preverify.AllMethodVisitor ( new proguard.classfile.attribute.visitor.AllAttributeVisitor ( new proguard.preverify.CodeSubroutineInliner ( ) ) ) ; if ( ! ( configuration.microEdition ) ) { inliner = new proguard.preverify.ClassVersionFilter ( ClassConstants.INTERNAL_CLASS_VERSION_1_6 , inliner ) ; } programClassPool.classesAccept ( inliner ) ; }

Target:
public void execute ( proguard.preverify.ClassPool programClassPool ) { programClassPool.classesAccept ( new proguard.preverify.ClassCleaner ( ) ) ; proguard.preverify.ClassVisitor inliner = new proguard.preverify.AllMethodVisitor ( new proguard.classfile.attribute.visitor.AllAttributeVisitor ( new proguard.preverify.CodeSubroutineInliner ( ) ) ) ; if ( ! ( configuration.microEdition ) ) { inliner = new proguard.preverify.ClassVersionFilter ( ClassConstants.CLASS_VERSION_1_6 , inliner ) ; } programClassPool.classesAccept ( inliner ) ; }
Source:
private void cutDragSelection ( ) { java.util.List < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > selected = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasSelection cs : mDragSelection ) { selected.add ( cs.getViewInfo ( ) . getUiViewKey ( ) ) ; } com.android.ide.eclipse.adt.internal.editors.ui.tree.CopyCutAction action = new com.android.ide.eclipse.adt.internal.editors.ui.tree.CopyCutAction ( mLayoutEditor , getClipboard ( ) , null , selected , true ) ; action.run ( ) ; }

Target:
public void run ( ) { mLayoutEditor.editXmlModel ( new java.lang.Runnable ( ) { public void run ( ) { for ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasSelection cs : selection ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = cs.getViewInfo ( ) ; if ( vi != null ) { com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ui = vi.getUiViewKey ( ) ; if ( ui != null ) { ui.deleteXmlNode ( ) ; } } } } } ) ; }
Source:
public void onActivitySaveInstanceState ( android.app.Activity activity , android.os.Bundle outState ) { if ( BuildConfig.IS_DEBUG ) { assert ( ( java.lang.reflect.Proxy.isProxyClass ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_WRAPPER_CLASS ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS ) ) ; } }

Target:
public void onActivitySaveInstanceState ( android.app.Activity activity , android.os.Bundle outState ) { if ( BuildConfig.DCHECK_IS_ON ) { assert ( ( java.lang.reflect.Proxy.isProxyClass ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_WRAPPER_CLASS ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS ) ) ; } }
Source:
public void testAppReady ( ) { testPowerOn ( ) ; org.mockito.Mockito.when ( mUiccCard.getCardState ( ) ) . thenReturn ( CardState.CARDSTATE_PRESENT ) ; mIccCardProxyUT.sendMessage ( mIccCardProxyUT.obtainMessage ( com.android.internal.telephony.uicc.IccCardProxyTest.EVENT_ICC_CHANGED ) ) ; org.mockito.Mockito.when ( mUiccCardApplication.getState ( ) ) . thenReturn ( AppState.APPSTATE_READY ) ; org.mockito.Mockito.when ( mUiccCard.getApplication ( org.mockito.Mockito.anyInt ( ) ) ) . thenReturn ( mUiccCardApplication ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.IccCardProxyTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( mIccCardProxyUT.getState ( ) , State.READY ) ; }

Target:
public void testAppReady ( ) { testPowerOn ( ) ; org.mockito.Mockito.doReturn ( CardState.CARDSTATE_PRESENT ) . when ( mUiccCard ) . getCardState ( ) ; mIccCardProxyUT.sendMessage ( mIccCardProxyUT.obtainMessage ( com.android.internal.telephony.uicc.IccCardProxyTest.EVENT_ICC_CHANGED ) ) ; org.mockito.Mockito.doReturn ( AppState.APPSTATE_READY ) . when ( mUiccCardApplication ) . getState ( ) ; org.mockito.Mockito.doReturn ( mUiccCardApplication ) . when ( mUiccCard ) . getApplication ( org.mockito.Mockito.anyInt ( ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.IccCardProxyTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( mIccCardProxyUT.getState ( ) , State.READY ) ; }
Source:
public static long copy ( java.lang.Readable from , java.lang.Appendable to ) throws java.io.IOException { java.nio.CharBuffer buf = java.nio.CharBuffer.allocate ( com.google.common.io.CharStreams.BUF_SIZE ) ; long total = 0 ; while ( ( from.read ( buf ) ) != ( - 1 ) ) { buf.flip ( ) ; to.append ( buf ) ; total += buf.remaining ( ) ; buf.clear ( ) ; } return total ; }

Target:
public static long copy ( java.lang.Readable from , java.lang.Appendable to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; com.google.common.base.Preconditions.checkNotNull ( to ) ; java.nio.CharBuffer buf = java.nio.CharBuffer.allocate ( com.google.common.io.CharStreams.BUF_SIZE ) ; long total = 0 ; while ( ( from.read ( buf ) ) != ( - 1 ) ) { buf.flip ( ) ; to.append ( buf ) ; total += buf.remaining ( ) ; buf.clear ( ) ; } return total ; }
Source:
private static boolean isCLDRFieldName ( int index ) { if ( ( index < 0 ) && ( index >= ( com.ibm.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ) ) { return false ; } if ( ( com.ibm.icu.text.DateTimePatternGenerator.CLDR_FIELD_NAME [ index ] . charAt ( 0 ) ) == '*' ) { return false ; } else { return true ; } }

Target:
public java.lang.String toCanonicalString ( ) { return appendTo ( new java.lang.StringBuilder ( ) , true ) . toString ( ) ; }
Source:
private void loadFromStoreAndMigrateAfterUserSwitch ( int userId ) { mWifiConfigStore.switchUserStore ( mWifiConfigStore.createUserFile ( userId ) ) ; if ( loadFromStore ( ) ) { saveToStore ( true ) ; } }

Target:
public boolean loadFromUserStoreAfterUnlockOrSwitch ( int userId ) { com.android.server.wifi.WifiConfigStoreData storeData ; try { storeData = mWifiConfigStore.switchUserStoreAndRead ( mWifiConfigStore.createUserFile ( userId ) ) ; } catch ( java.io.IOException e ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigManager.TAG , "Reading from new store failed. All saved private networks are lost!" , e ) ; return false ; } catch ( org.xmlpull.v1.XmlPullParserException e ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigManager.TAG , ( "XML deserialization of store failed. All saved private networks are" + "lost!" ) , e ) ; return false ; } loadInternalDataFromUserStore ( storeData.getUserConfigurations ( ) , storeData.getDeletedEphemeralSSIDs ( ) ) ; return true ; }
Source:
public void loggedRun ( ) { synchronized ( mTelecomLock ) { if ( mIsPending ) { android.telecom.Log.addEvent ( mCall , LogUtils.Events.FILTERING_COMPLETED , mResult ) ; mListener.onCallFilteringComplete ( mCall , mResult ) ; mIsPending = false ; } } }

Target:
public void onCallFilteringComplete ( com.android.server.telecom.Call call , com.android.server.telecom.callfiltering.CallFilteringResult result ) { synchronized ( mTelecomLock ) { ( mNumPendingFilters ) -- ; mResult = result.combine ( mResult ) ; if ( ( mNumPendingFilters ) == 0 ) { mHandler.post ( new java.lang.Runnable ( "ICF.oCFC" , mTelecomLock ) { @ java.lang.Override public void loggedRun ( ) { if ( mIsPending ) { android.telecom.Log.addEvent ( mCall , LogUtils.Events.FILTERING_COMPLETED , mResult ) ; mListener.onCallFilteringComplete ( mCall , mResult ) ; mIsPending = false ; } } } . prepare ( ) ) ; } } }
Source:
public void migrateAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.migrateAppData ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void clearAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , long ceDataInode ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.clearAppData ( uuid , packageName , userId , flags , ceDataInode ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public void parseCacheHeaders_expiresInPast ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now - ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEqualsWithin ( entry.serverDate , now , com.android.volley.toolbox.HttpHeaderParserTest.ONE_MINUTE_MILLIS ) ; assertEquals ( 0 , entry.ttl ) ; assertEquals ( 0 , entry.softTtl ) ; }

Target:
public void parseCacheHeaders_expiresInPast ( ) { long now = java.lang.System.currentTimeMillis ( ) ; headers.put ( "Date" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( now ) ) ; headers.put ( "Expires" , com.android.volley.toolbox.HttpHeaderParserTest.rfc1123Date ( ( now - ( com.android.volley.toolbox.HttpHeaderParserTest.ONE_HOUR_MILLIS ) ) ) ) ; com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; org.junit.Assert.assertNotNull ( entry ) ; org.junit.Assert.assertNull ( entry.etag ) ; assertEqualsWithin ( entry.serverDate , now , com.android.volley.toolbox.HttpHeaderParserTest.ONE_MINUTE_MILLIS ) ; org.junit.Assert.assertEquals ( 0 , entry.ttl ) ; org.junit.Assert.assertEquals ( 0 , entry.softTtl ) ; }
Source:
public void int16 ( short v ) throws java.io.IOException { mBuffer [ 0 ] = ( ( byte ) ( ( v > > > 0 ) & 255 ) ) ; mBuffer [ 1 ] = ( ( byte ) ( ( v > > > 8 ) & 255 ) ) ; write ( 2 ) ; }

Target:
public void int8 ( byte v ) throws java.io.IOException { mBuffer [ 0 ] = v ; mOutputStream.write ( mBuffer , 0 , 1 ) ; }
Source:
private boolean handleSelect ( lombok.ast.Select select ) { if ( select.toString ( ) . startsWith ( com.android.SdkConstants.R_DRAWABLE_PREFIX ) ) { java.lang.String name = select.astIdentifier ( ) . astValue ( ) ; if ( ( mNotificationIcons ) == null ) { mNotificationIcons = com.google.common.collect.Sets.newHashSet ( ) ; } mNotificationIcons.add ( name ) ; return true ; } return false ; }

Target:
private boolean handleSelect ( com.intellij.psi.PsiElement select ) { com.android.ide.common.resources.ResourceUrl url = com.android.tools.lint.detector.api.ResourceEvaluator.getResourceConstant ( select ) ; if ( ( ( url != null ) && ( ( url.type ) == ( com.android.resources.ResourceType.DRAWABLE ) ) ) && ( ! ( url.framework ) ) ) { if ( ( mNotificationIcons ) == null ) { mNotificationIcons = com.google.common.collect.Sets.newHashSet ( ) ; } mNotificationIcons.add ( url.name ) ; return true ; } return false ; }
Source:
public void clearAccounts ( java.lang.String packageName ) { synchronized ( mLock ) { try { com.android.server.telecom.Log.startSession ( "TSI.cA" ) ; enforcePhoneAccountModificationForPackage ( packageName ) ; mPhoneAccountRegistrar.clearAccounts ( packageName , android.os.Binder.getCallingUserHandle ( ) ) ; } catch ( java.lang.Exception e ) { com.android.server.telecom.Log.e ( this , e , "clearAccounts %s" , packageName ) ; throw e ; } finally { com.android.server.telecom.Log.endSession ( ) ; } } }

Target:
public void clearAccounts ( java.lang.String packageName ) { synchronized ( mLock ) { try { android.telecom.Log.startSession ( "TSI.cA" ) ; enforcePhoneAccountModificationForPackage ( packageName ) ; mPhoneAccountRegistrar.clearAccounts ( packageName , android.os.Binder.getCallingUserHandle ( ) ) ; } catch ( java.lang.Exception e ) { android.telecom.Log.e ( this , e , "clearAccounts %s" , packageName ) ; throw e ; } finally { android.telecom.Log.endSession ( ) ; } } }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return false ; } return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getConnectedDevices" ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return new java.util.ArrayList < > ( 0 ) ; } return service.getConnectedDevices ( ) ; }
Source:
public boolean isRinging ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.iR" ) ; if ( ! ( canReadPhoneState ( callingPackage , "isRinging" ) ) ) { return false ; } synchronized ( mLock ) { return mCallsManager.hasRingingCall ( ) ; } } finally { android.telecom.Log.endSession ( ) ; } }

Target:
public boolean isRinging ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.iR" ) ; if ( ! ( isPrivilegedDialerCalling ( callingPackage ) ) ) { try { enforceModifyPermission ( "isRinging requires MODIFY_PHONE_STATE permission." ) ; } catch ( java.lang.SecurityException e ) { android.util.EventLog.writeEvent ( 1397638484 , "62347125" , ( "isRinging: " + callingPackage ) ) ; throw e ; } } synchronized ( mLock ) { return mCallsManager.hasRingingCall ( ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
boolean startTestIntent ( final com.android.cts.verifier.DialogTestListActivity.DialogTestListItem test ) { final android.content.Intent intent = test.intent ; try { startActivity ( intent ) ; } catch ( android.content.ActivityNotFoundException e ) { android.widget.Toast.makeText ( this , ( "Cannot start " + intent ) , Toast.LENGTH_LONG ) . show ( ) ; setTestResult ( test , TestResult.TEST_RESULT_FAILED ) ; return false ; } return true ; }

Target:
boolean startTestIntent ( final com.android.cts.verifier.DialogTestListActivity.DialogTestListItem test ) { final android.content.Intent intent = test.intent ; try { startActivity ( intent ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.w ( TAG , "Cannot start activity." , e ) ; android.widget.Toast.makeText ( this , ( "Cannot start " + intent ) , Toast.LENGTH_LONG ) . show ( ) ; setTestResult ( test , TestResult.TEST_RESULT_FAILED ) ; return false ; } return true ; }
Source:
int getStackPosition ( int stackId ) { for ( int i = 0 ; i < ( mStacks.size ( ) ) ; i ++ ) { if ( stackId == ( mStacks.get ( i ) . mStackId ) ) { return i ; } } return - 1 ; }

Target:
int getStackPosition ( int stackId ) { for ( java.lang.Integer displayId : mDisplayStacks.keySet ( ) ) { java.util.List < android.server.cts.ActivityManagerState.ActivityStack > stacks = mDisplayStacks.get ( displayId ) ; for ( int i = 0 ; i < ( stacks.size ( ) ) ; i ++ ) { if ( stackId == ( stacks.get ( i ) . mStackId ) ) { return i ; } } } return - 1 ; }
Source:
static sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator of ( java.lang.String s ) { switch ( s ) { case "==" : return sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator.EQ ; case "!=" : return sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator.NE ; case "<" : return sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator.LT ; case "<=" : return sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator.LE ; case ">" : return sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator.GT ; case ">=" : return sun.security.util.DisabledAlgorithmConstraints.KeySizeConstraint.Operator.GE ; } throw new java.lang.IllegalArgumentException ( ( s + " is not a legal Operator" ) ) ; }

Target:
public boolean permits ( java.security.Key key ) { if ( ( ( nextConstraint ) != null ) && ( nextConstraint.permits ( key ) ) ) { return true ; } if ( ( sun.security.util.DisabledAlgorithmConstraints.debug ) != null ) { sun.security.util.DisabledAlgorithmConstraints.debug.println ( ( "KeySizeConstraints.permits(): " + ( algorithm ) ) ) ; } return permitsImpl ( key ) ; }
Source:
public java.lang.String testStandardDeviation ( ) throws java.lang.Throwable { getTestLogger ( ) . logMessage ( R.string.snsr_mag_verify_std_dev ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation verifyStdDev = new android.hardware.cts.helpers.sensoroperations.TestSensorOperation ( environment , 100 ) ; verifyStdDev.addVerification ( new android.hardware.cts.helpers.sensorverification.StandardDeviationVerification ( new float [ ] { 2.0F , 2.0F , 2.0F } ) ) ; verifyStdDev.execute ( ) ; return null ; }

Target:
public java.lang.String testStandardDeviation ( ) throws java.lang.Throwable { getTestLogger ( ) . logMessage ( R.string.snsr_mag_verify_std_dev ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation verifyStdDev = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createOperation ( environment , 100 ) ; verifyStdDev.addVerification ( new android.hardware.cts.helpers.sensorverification.StandardDeviationVerification ( new float [ ] { 2.0F , 2.0F , 2.0F } ) ) ; verifyStdDev.execute ( getCurrentTestNode ( ) ) ; return null ; }
Source:
public final java.nio.ByteBuffer get ( byte [ ] dst , int dstOffset , int byteCount ) { checkGetBounds ( 1 , dst.length , dstOffset , byteCount ) ; this . block.peekByteArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , byteCount ) ; position += byteCount ; return this ; }

Target:
public final java.nio.ByteBuffer get ( byte [ ] dst , int dstOffset , int byteCount ) { checkNotFreed ( ) ; checkGetBounds ( 1 , dst.length , dstOffset , byteCount ) ; this . block.peekByteArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , byteCount ) ; position += byteCount ; return this ; }
Source:
public static com.android.tools.lint.checks.PermissionFinder.Result findRequiredPermissions ( @ com.android.annotations.NonNull com.android.tools.lint.checks.PermissionFinder.Operation operation , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.Node call , int parameterIndex ) { lombok.ast.Node arg = com.android.tools.lint.detector.api.JavaContext.getParameter ( call , parameterIndex ) ; if ( arg == null ) { return null ; } return new com.android.tools.lint.checks.PermissionFinder ( context , operation ) . search ( arg ) ; }

Target:
public static com.android.tools.lint.checks.PermissionFinder.Result findRequiredPermissions ( @ com.android.annotations.NonNull com.android.tools.lint.checks.PermissionFinder.Operation operation , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull lombok.ast.Node parameter ) { return new com.android.tools.lint.checks.PermissionFinder ( context , operation ) . search ( parameter ) ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { return com.android.jack.dx.io.instructions.InstructionCodec.decodeRegisterList ( this , opcodeUnit , in ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; int index = in.readInt ( ) ; com.android.jack.dx.io.IndexType indexType = com.android.jack.dx.io.OpcodeInfo.getIndexType ( opcode ) ; return new com.android.jack.dx.io.instructions.OneRegisterDecodedInstruction ( this , opcode , index , indexType , 0 , 0L , a ) ; }
Source:
private org.eclipse.core.resources.IFolder getDependencyFolder ( ) { return getJavaProject ( ) . getProject ( ) . getFolder ( SdkConstants.FD_OUTPUT ) ; }

Target:
private org.eclipse.core.resources.IFolder getDependencyFolder ( org.eclipse.core.resources.IFile sourceFile ) { org.eclipse.core.runtime.IPath sourceFolderPath = getSourceFolderFor ( sourceFile ) ; if ( sourceFolderPath != null ) { org.eclipse.core.runtime.IPath relative = sourceFile.getFullPath ( ) . makeRelativeTo ( sourceFolderPath ) ; relative = relative.removeLastSegments ( 1 ) ; return getGenFolder ( ) . getFolder ( relative ) ; } return null ; }
Source:
public void test_handshake_failsWithMissingSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; try { connection.doHandshake ( ) ; fail ( "SSLHandshakeException not thrown" ) ; } catch ( java.util.concurrent.ExecutionException e ) { assertEquals ( javax.net.ssl.SSLHandshakeException.class , e.getCause ( ) . getClass ( ) ) ; assertEquals ( java.security.cert.CertificateException.class , e.getCause ( ) . getCause ( ) . getClass ( ) ) ; } }

Target:
public void test_handshake_failsWithMissingSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; connection.doHandshake ( ) ; assertTrue ( ( ( connection.clientException ) instanceof javax.net.ssl.SSLHandshakeException ) ) ; assertTrue ( ( ( connection.clientException.getCause ( ) ) instanceof java.security.cert.CertificateException ) ) ; }
Source:
public void testSetTextCharacterIterator ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( java.util.Locale.forLanguageTag ( "es-u-co-trad" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( new java.text.StringCharacterIterator ( "cha" ) ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; }

Target:
public void testSetTextCharacterIterator ( ) { java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = traditionalSpanishColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( new java.text.StringCharacterIterator ( "cha" ) ) ; iterator.setOffset ( 1 ) ; assertEquals ( 0 , iterator.getOffset ( ) ) ; }
Source:
public void run ( ) { for ( com.android.volley.toolbox.ImageLoader.BatchedImageRequest bir : mBatchedResponses.values ( ) ) { for ( com.android.volley.toolbox.ImageLoader.ImageContainer container : bir.mContainers ) { if ( ( container.mListener ) == null ) { continue ; } if ( error == null ) { container.mBitmap = bir.mResponseBitmap ; container.mListener.onResponse ( container , false ) ; } else { container.mListener.onErrorResponse ( error ) ; } } } mBatchedResponses.clear ( ) ; mRunnable = null ; }

Target:
public void run ( ) { for ( com.android.volley.toolbox.ImageLoader.BatchedImageRequest bir : mBatchedResponses.values ( ) ) { for ( com.android.volley.toolbox.ImageLoader.ImageContainer container : bir.mContainers ) { if ( ( container.mListener ) == null ) { continue ; } if ( ( bir.getError ( ) ) == null ) { container.mBitmap = bir.mResponseBitmap ; container.mListener.onResponse ( container , false ) ; } else { container.mListener.onErrorResponse ( bir.getError ( ) ) ; } } } mBatchedResponses.clear ( ) ; mRunnable = null ; }
Source:
public void rejectCall ( com.android.internal.telephony.Call ringingCall ) throws com.android.internal.telephony.CallStateException { if ( com.android.internal.telephony.CallManager.VDBG ) { android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , ( ( "rejectCall(" + ringingCall ) + ")" ) ) ; android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , this . toString ( ) ) ; } com.android.internal.telephony.Phone ringingPhone = ringingCall.getPhone ( ) ; ringingPhone.rejectCall ( ) ; if ( com.android.internal.telephony.CallManager.VDBG ) { android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , ( ( "End rejectCall(" + ringingCall ) + ")" ) ) ; android.util.Log.d ( com.android.internal.telephony.CallManager.LOG_TAG , this . toString ( ) ) ; } }

Target:
public void stopDtmf ( ) { if ( com.android.internal.telephony.CallManager.VDBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.CallManager.LOG_TAG , " stopDtmf()" ) ; android.telephony.Rlog.d ( com.android.internal.telephony.CallManager.LOG_TAG , this . toString ( ) ) ; } if ( hasActiveFgCall ( ) ) getFgPhone ( ) . stopDtmf ( ) ; if ( com.android.internal.telephony.CallManager.VDBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.CallManager.LOG_TAG , "End stopDtmf()" ) ; android.telephony.Rlog.d ( com.android.internal.telephony.CallManager.LOG_TAG , this . toString ( ) ) ; } }
Source:
public void onManagerConnected ( int status ) { android.util.Log.v ( com.android.cts.verifier.sensors.helpers.OpenCVLibrary.TAG , ( "New Loading status: " + status ) ) ; switch ( status ) { case org.opencv.android.LoaderCallbackInterface.SUCCESS : { com.android.cts.verifier.sensors.helpers.OpenCVLibrary.mLoaded = true ; } break ; default : { super . onManagerConnected ( status ) ; } break ; } }

Target:
public void onManagerConnected ( int status ) { android.util.Log.v ( com.android.cts.verifier.sensors.helpers.OpenCVLibrary.TAG , ( "New Loading status: " + status ) ) ; switch ( status ) { case org.opencv.android.LoaderCallbackInterface.SUCCESS : { com.android.cts.verifier.sensors.helpers.OpenCVLibrary.sLoaded = true ; } break ; default : { android.util.Log.e ( com.android.cts.verifier.sensors.helpers.OpenCVLibrary.TAG , "Connecting OpenCV Manager failed" ) ; } break ; } done.countDown ( ) ; }
Source:
public int getSupportedFeatures ( ) { enforceAccessPermission ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetSupportedFeatures ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return 0 ; } }

Target:
public int getSupportedFeatures ( ) { enforceAccessPermission ( ) ; mLog.trace ( "getSupportedFeatures uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncGetSupportedFeatures ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return 0 ; } }
Source:
public void accept ( int result ) { if ( result == ( android.app.Activity.RESULT_OK ) ) { logFail ( ) ; status = FAIL ; } else { if ( ( mNm.getEffectsSuppressor ( ) ) == null ) { status = PASS ; } else { status = FAIL ; } } next ( ) ; }

Target:
public void accept ( int result ) { if ( result == ( android.app.Activity.RESULT_OK ) ) { logFail ( ) ; status = FAIL ; } else { if ( ( ( mNm.getEffectsSuppressor ( ) ) == null ) || ( ! ( mNm.getEffectsSuppressor ( ) . equals ( MockListener.COMPONENT_NAME ) ) ) ) { status = PASS ; } else { status = FAIL ; } } next ( ) ; }
Source:
public void testNoMatchingViewException ( ) { try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.base.DefaultFailureHandlerTest.withMatchesThatReturns ( false ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ) ; fail ( "Previous call expected to fail" ) ; } catch ( android.support.test.espresso.NoMatchingViewException e ) { assertFailureStackContainsThisClass ( e ) ; } }

Target:
public void ambiguousViewMatcherException ( ) { expectedException.expect ( android.support.test.espresso.AmbiguousViewMatcherException.class ) ; expectedException.expect ( stackTraceContainsThisClass ( ) ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.base.DefaultFailureHandlerTest.withMatchesThatReturns ( true ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; }
Source:
public void testHasFlagsDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( Intent.FLAG_DEBUG_LOG_RESOLUTION ) . matches ( intent ) ) ; intent.setFlags ( ( ( android.content.Intent.FLAG_DEBUG_LOG_RESOLUTION ) | ( android.content.Intent.FLAG_ACTIVITY_NO_HISTORY ) ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( ( ( android.content.Intent.FLAG_DEBUG_LOG_RESOLUTION ) | ( android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) ) ) . matches ( intent ) ) ; }

Target:
public void hasFlagsDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( Intent.FLAG_DEBUG_LOG_RESOLUTION ) . matches ( intent ) ) ; intent.setFlags ( ( ( android.content.Intent.FLAG_DEBUG_LOG_RESOLUTION ) | ( android.content.Intent.FLAG_ACTIVITY_NO_HISTORY ) ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( ( ( android.content.Intent.FLAG_DEBUG_LOG_RESOLUTION ) | ( android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS ) ) ) . matches ( intent ) ) ; }
Source:
public static java.io.File getRoot ( java.lang.String ... names ) { java.io.File root = null ; for ( java.lang.String name : names ) { if ( root == null ) { root = new java.io.File ( ( "src/test/resources/testData/" + name ) ) ; } else { root = new java.io.File ( root , name ) ; } junit.framework.TestCase.assertTrue ( ( ( "Test folder '" + name ) + "' does not exist!" ) , root.isDirectory ( ) ) ; } return root ; }

Target:
public static java.io.File getRoot ( java.lang.String ... names ) { java.io.File root = null ; for ( java.lang.String name : names ) { if ( root == null ) { root = new java.io.File ( ( "src/test/resources/testData/" + name ) ) ; } else { root = new java.io.File ( root , name ) ; } junit.framework.TestCase.assertTrue ( ( ( ( "Test folder '" + name ) + "' does not exist! " ) + "(Tip: Check unit test launch config pwd)" ) , root.isDirectory ( ) ) ; } return root ; }
Source:
public void requestNetwork ( android.net.NetworkRequest req , android.net.ConnectivityManager.NetworkCallback cb ) { org.junit.Assert.assertFalse ( requested.containsKey ( cb ) ) ; requested.put ( cb , req ) ; }

Target:
public void requestNetwork ( android.net.NetworkRequest req , android.net.ConnectivityManager.NetworkCallback cb , android.os.Handler h ) { org.junit.Assert.assertFalse ( allCallbacks.containsKey ( cb ) ) ; allCallbacks.put ( cb , h ) ; org.junit.Assert.assertFalse ( requested.containsKey ( cb ) ) ; requested.put ( cb , req ) ; }
Source:
static com.android.internal.telephony.gsm.stk.IconId retrieveIconId ( com.android.internal.telephony.gsm.stk.ComprehensionTlv ctlv ) throws com.android.internal.telephony.gsm.stk.ResultException { com.android.internal.telephony.gsm.stk.IconId id = new com.android.internal.telephony.gsm.stk.IconId ( ) ; byte [ ] rawValue = ctlv.getRawValue ( ) ; int valueIndex = ctlv.getValueIndex ( ) ; try { id.selfExplanatory = ( ( rawValue [ ( valueIndex ++ ) ] ) & 255 ) == 0 ; id.recordNumber = ( rawValue [ valueIndex ] ) & 255 ; } catch ( java.lang.IndexOutOfBoundsException e ) { throw new com.android.internal.telephony.gsm.stk.ResultException ( ResultCode.CMD_DATA_NOT_UNDERSTOOD ) ; } return id ; }

Target:
static com.android.internal.telephony.cat.IconId retrieveIconId ( com.android.internal.telephony.cat.ComprehensionTlv ctlv ) throws com.android.internal.telephony.cat.ResultException { com.android.internal.telephony.cat.IconId id = new com.android.internal.telephony.cat.IconId ( ) ; byte [ ] rawValue = ctlv.getRawValue ( ) ; int valueIndex = ctlv.getValueIndex ( ) ; try { id.selfExplanatory = ( ( rawValue [ ( valueIndex ++ ) ] ) & 255 ) == 0 ; id.recordNumber = ( rawValue [ valueIndex ] ) & 255 ; } catch ( java.lang.IndexOutOfBoundsException e ) { throw new com.android.internal.telephony.cat.ResultException ( ResultCode.CMD_DATA_NOT_UNDERSTOOD ) ; } return id ; }