auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void test_getLast ( ) { assertTrue ( "Returned incorrect first element" , ll.getLast ( ) . equals ( objArray [ ( ( objArray.length ) - 1 ) ] ) ) ; ll.clear ( ) ; try { ll.getLast ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_peek ( ) { java.util.LinkedList list = new java.util.LinkedList ( ) ; assertNull ( "Should return null if this list is empty" , list.peek ( ) ) ; assertEquals ( "Returned incorrect first element" , ll.peek ( ) , objArray [ 0 ] ) ; assertEquals ( "Peek remove the head (first element) of this list" , ll.getFirst ( ) , objArray [ 0 ] ) ; }
Source:
public java.lang.String getPropertySync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( latch ) ; executeShellCommand ( java.lang.String.format ( "getprop '%s'" , name ) , receiver , com.android.ddmlib.Device.GETPROP_TIMEOUT ) ; try { latch.await ( com.android.ddmlib.Device.GETPROP_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { return null ; } java.lang.String value = receiver.getOutput ( ) . trim ( ) ; if ( value.isEmpty ( ) ) { return null ; } return value ; }

Target:
public java.lang.String getPropertySync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } return null ; }
Source:
private com.android.jack.ir.ast.JMethod findImplementation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodIdWide methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass receiverType ) { com.android.jack.ir.ast.JClass currentType = receiverType ; while ( currentType instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.ir.ast.JMethod foundMethod = findMethod ( methodId , currentType , returnType ) ; if ( foundMethod != null ) { return foundMethod ; } currentType = ( ( com.android.jack.ir.ast.JDefinedClass ) ( currentType ) ) . getSuperClass ( ) ; } return null ; }

Target:
private com.android.jack.ir.ast.JMethod findImplementationInInterfaces ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodIdWide methodId , @ javax.annotation.Nonnull com.android.jack.ir.ast.JType returnType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType ) { for ( com.android.jack.ir.ast.JInterface interfaze : receiverType.getImplements ( ) ) { com.android.jack.ir.ast.JMethod foundMethod = findMethod ( methodId , interfaze , returnType ) ; if ( foundMethod != null ) { return foundMethod ; } else if ( interfaze instanceof com.android.jack.ir.ast.JDefinedClassOrInterface ) { findImplementationInInterfaces ( methodId , returnType , ( ( com.android.jack.ir.ast.JDefinedClassOrInterface ) ( interfaze ) ) ) ; } } return null ; }
Source:
public void testNorwegian ( ) throws java.lang.Exception { assertEquals ( ( "typos.xml:10: Warning: \"altid\" is a common misspelling; did you mean \"alltid\" ?\n" + ( ( ( ( "typos.xml:12: Warning: \"Altid\" is a common misspelling; did you mean \"Alltid\" ?\n" + "typos.xml:18: Warning: \"karri¾re\" is a common misspelling; did you mean \"karrire\" ?\n" ) + "typos.xml:6: Warning: \"Andriod\" is a common misspelling; did you mean \"Android\" ?\n" ) + "typos.xml:6: Warning: \"morro\" is a common misspelling; did you mean \"moro\" ?\n" ) + "typos.xml:8: Warning: \"Parallel\" is a common misspelling; did you mean \"Parallell\" ?" ) ) , lintProject ( "res/values-nb/typos.xml" ) ) ; }

Target:
public void testNorwegian ( ) throws java.lang.Exception { assertEquals ( ( "res/values-nb/typos.xml:6: Warning: \"Andriod\" is a common misspelling; did you mean \"Android\" ? [Typos]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " <string name=\"s2\">Mer morro med Andriod</string>\n" + " ^\n" ) + "res/values-nb/typos.xml:6: Warning: \"morro\" is a common misspelling; did you mean \"moro\" ? [Typos]\n" ) + " <string name=\"s2\">Mer morro med Andriod</string>\n" ) + " ^\n" ) + "res/values-nb/typos.xml:8: Warning: \"Parallel\" is a common misspelling; did you mean \"Parallell\" ? [Typos]\n" ) + " <string name=\"s3\"> Parallel </string>\n" ) + " ^\n" ) + "res/values-nb/typos.xml:10: Warning: \"altid\" is a common misspelling; did you mean \"alltid\" ? [Typos]\n" ) + " <string name=\"s4\"><b>altid</b></string>\n" ) + " ^\n" ) + "res/values-nb/typos.xml:12: Warning: \"Altid\" is a common misspelling; did you mean \"Alltid\" ? [Typos]\n" ) + " <string name=\"s5\">Altid</string>\n" ) + " ^\n" ) + "res/values-nb/typos.xml:18: Warning: \"karri¾re\" is a common misspelling; did you mean \"karrire\" ? [Typos]\n" ) + " <string name=\"s7\">Koding er en spennende karri¾re</string>\n" ) + " ^\n" ) + "0 errors, 6 warnings\n" ) + "" ) ) , lintProject ( "res/values-nb/typos.xml" ) ) ; }
Source:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . description ( ( "Sign in " + email ) ) ) . exists ( ) ; }

Target:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { if ( ( com.android.devtools.systemimage.uitest.utils.SystemUtil.getApiLevel ( ) ) <= 24 ) { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . description ( ( "Sign in " + email ) ) ) . exists ( ) ; } else { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( ( "Sign in " + email ) ) ) . exists ( ) ; } }
Source:
private void setCallbackAction ( @ com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction int callbackAction ) { this . callbackAction = callbackAction ; switch ( callbackAction ) { case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.LIGHTBRINGER : case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.IMS_VIDEO : callbackButton.setVisibility ( View.VISIBLE ) ; callbackButton.setImageResource ( R.drawable.quantum_ic_videocam_vd_theme_24 ) ; break ; case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.VOICE : callbackButton.setVisibility ( View.VISIBLE ) ; callbackButton.setImageResource ( R.drawable.quantum_ic_call_vd_theme_24 ) ; break ; case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.NONE : callbackButton.setVisibility ( View.GONE ) ; break ; default : throw com.android.dialer.common.Assert.createIllegalStateFailException ( ( "Invalid action: " + callbackAction ) ) ; } }

Target:
private void setCallbackAction ( @ com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction int callbackAction ) { this . callbackAction = callbackAction ; switch ( callbackAction ) { case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.DUO : case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.IMS_VIDEO : callbackButton.setVisibility ( View.VISIBLE ) ; callbackButton.setImageResource ( R.drawable.quantum_ic_videocam_vd_theme_24 ) ; break ; case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.VOICE : callbackButton.setVisibility ( View.VISIBLE ) ; callbackButton.setImageResource ( R.drawable.quantum_ic_call_vd_theme_24 ) ; break ; case com.android.dialer.calllogutils.CallbackActionHelper.CallbackAction.NONE : callbackButton.setVisibility ( View.GONE ) ; break ; default : throw com.android.dialer.common.Assert.createIllegalStateFailException ( ( "Invalid action: " + callbackAction ) ) ; } }
Source:
protected void sendSubmitPdu ( com.android.internal.telephony.cdma.SmsMessage.SubmitPdu pdu , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , java.lang.String destAddr ) { if ( android.os.SystemProperties.getBoolean ( TelephonyProperties.PROPERTY_INECM_MODE , false ) ) { if ( sentIntent != null ) { try { sentIntent.send ( SmsManager.RESULT_ERROR_NO_SERVICE ) ; } catch ( android.app.PendingIntent.CanceledException ex ) { } } if ( false ) { android.util.Log.d ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.TAG , "Block SMS in Emergency Callback mode" ) ; } return ; } sendRawPdu ( pdu.encodedScAddress , pdu.encodedMessage , sentIntent , deliveryIntent , destAddr ) ; }

Target:
protected void sendSubmitPdu ( com.android.internal.telephony.cdma.SmsMessage.SubmitPdu pdu , android.app.PendingIntent sentIntent , android.app.PendingIntent deliveryIntent , java.lang.String destAddr ) { if ( android.os.SystemProperties.getBoolean ( TelephonyProperties.PROPERTY_INECM_MODE , false ) ) { if ( sentIntent != null ) { try { sentIntent.send ( SmsManager.RESULT_ERROR_NO_SERVICE ) ; } catch ( android.app.PendingIntent.CanceledException ex ) { } } if ( false ) { android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.TAG , "Block SMS in Emergency Callback mode" ) ; } return ; } sendRawPdu ( pdu.encodedScAddress , pdu.encodedMessage , sentIntent , deliveryIntent , destAddr ) ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( float [ ] d ) { validateIsFloat32 ( ) ; copyFromUnchecked ( d , Element.DataType.FLOAT_32 , d.length ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , byte [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , data.length , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , byte [ ] data ) { validateIsInt8 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_8 , data.length ) ; }
Source:
void pendingAssistExtrasTimedOut ( com.android.server.am.ActivityManagerService.PendingAssistExtras pae ) { com.android.internal.os.IResultReceiver receiver ; synchronized ( this ) { mPendingAssistExtras.remove ( pae ) ; receiver = pae.receiver ; } if ( receiver != null ) { try { pae.receiver.send ( 0 , null ) ; } catch ( android.os.RemoteException e ) { } } }

Target:
void pendingAssistExtrasTimedOut ( com.android.server.am.ActivityManagerService.PendingAssistExtras pae ) { com.android.internal.os.IResultReceiver receiver ; synchronized ( this ) { mPendingAssistExtras.remove ( pae ) ; receiver = pae.receiver ; } if ( receiver != null ) { android.os.Bundle sendBundle = new android.os.Bundle ( ) ; sendBundle.putBundle ( VoiceInteractionSession.KEY_RECEIVER_EXTRAS , pae.receiverExtras ) ; try { pae.receiver.send ( 0 , sendBundle ) ; } catch ( android.os.RemoteException e ) { } } }
Source:
synchronized int nScriptGroupCreate ( int [ ] kernels , int [ ] src , int [ ] dstk , int [ ] dstf , int [ ] types ) { validate ( ) ; return rsnScriptGroupCreate ( mContext , kernels , src , dstk , dstf , types ) ; }

Target:
synchronized long nScriptIntrinsicCreate ( int id , long eid ) { validate ( ) ; return rsnScriptIntrinsicCreate ( mContext , id , eid ) ; }
Source:
private void dumpMethodStats ( ) { java.lang.System.out.format ( "\nExclusive Inclusive Calls Method\n" ) ; for ( com.android.traceview.MethodData md : mSortedMethods ) { java.lang.System.out.format ( "%9d %9d %9s %s\n" , md.getElapsedExclusive ( ) , md.getElapsedInclusive ( ) , md.getCalls ( ) , md.getProfileName ( ) ) ; } }

Target:
private void dumpThreadTimes ( ) { java.lang.System.out.print ( "\nThread Times\n" ) ; java.lang.System.out.print ( "id t-start t-end g-start g-end name\n" ) ; for ( com.android.traceview.ThreadData threadData : mThreadMap.values ( ) ) { java.lang.System.out.format ( "%2d %8d %8d %8d %8d %s\n" , threadData.getId ( ) , threadData.mThreadStartTime , threadData.mThreadEndTime , threadData.mGlobalStartTime , threadData.mGlobalEndTime , threadData.getName ( ) ) ; } }
Source:
private void handleSetPreferredNetworkTypeResponse ( android.os.Message msg ) { android.os.AsyncResult ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; if ( ( ar.exception ) == null ) { int networkMode = java.lang.Integer.valueOf ( mButtonPreferredNetworkMode.getValue ( ) ) . intValue ( ) ; android.provider.Settings.Secure.putInt ( mPhone.getContext ( ) . getContentResolver ( ) , android.provider.Settings.Secure.PREFERRED_NETWORK_MODE , networkMode ) ; } else { mPhone.getPreferredNetworkType ( obtainMessage ( com.android.phone.MobileNetworkSettings.MyHandler.MESSAGE_GET_PREFERRED_NETWORK_TYPE ) ) ; } }

Target:
private void resetNetworkModeToDefault ( ) { mButtonPreferredNetworkMode.setValue ( java.lang.Integer.toString ( com.android.phone.MobileNetworkSettings.preferredNetworkMode ) ) ; android.provider.Settings.Global.putInt ( mPhone.getContext ( ) . getContentResolver ( ) , android.provider.Settings.Global.PREFERRED_NETWORK_MODE , com.android.phone.MobileNetworkSettings.preferredNetworkMode ) ; mPhone.setPreferredNetworkType ( com.android.phone.MobileNetworkSettings.preferredNetworkMode , this . obtainMessage ( com.android.phone.MobileNetworkSettings.MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE ) ) ; }
Source:
public void handlesImmediateInterfaceDown ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_BLUETOOTH ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_INTERFACE_DOWN ) ; org.mockito.Mockito.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_UNAVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }

Target:
public void handlesImmediateInterfaceDown ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_BLUETOOTH ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_INTERFACE_DOWN ) ; org.mockito.Mockito.verify ( mTetherHelper ) . updateInterfaceState ( mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_UNAVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verify ( mTetherHelper ) . updateLinkProperties ( org.mockito.Matchers.eq ( mTestedSm ) , org.mockito.Matchers.any ( android.net.LinkProperties.class ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNMService , mStatsService , mTetherHelper ) ; }
Source:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpLoadLibrary ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method setValue = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; setValue.invoke ( intHolder , Main.nativeLibraryName ) ; return new java.lang.ref.WeakReference ( loader ) ; }

Target:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpUnloadLoader ( java.lang.reflect.Constructor constructor , boolean waitForCompilation ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method setValue = intHolder.getDeclaredMethod ( "setValue" , java.lang.Integer.TYPE ) ; setValue.invoke ( intHolder , 2 ) ; if ( waitForCompilation ) { Main.waitForCompilation ( intHolder ) ; } return new java.lang.ref.WeakReference ( loader ) ; }
Source:
public void mouseDown ( org.eclipse.swt.events.MouseEvent e ) { boolean redraw = false ; synchronized ( this ) { if ( ( ( tree ) != null ) && ( ( viewport ) != null ) ) { dragging = true ; redraw = true ; handleMouseEvent ( transformPoint ( e.x , e.y ) ) ; } } if ( redraw ) { model.removeTreeChangeListener ( this ) ; model.setViewport ( viewport ) ; model.addTreeChangeListener ( this ) ; doRedraw ( ) ; } }

Target:
public void widgetDisposed ( org.eclipse.swt.events.DisposeEvent e ) { model.removeTreeChangeListener ( this ) ; transform.dispose ( ) ; inverse.dispose ( ) ; }
Source:
public void setEchoSuppressionEnabled ( boolean enabled ) { synchronized ( com.android.internal.telephony.sip.SipPhone.class ) { mForegroundCall.setAudioGroupMode ( ) ; } }

Target:
public void setEchoSuppressionEnabled ( ) { synchronized ( com.android.internal.telephony.sip.SipPhone.class ) { android.media.AudioManager audioManager = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; java.lang.String echoSuppression = audioManager.getParameters ( "ec_supported" ) ; if ( echoSuppression.contains ( "off" ) ) { mForegroundCall.setAudioGroupMode ( ) ; } } }
Source:
public boolean createNewFile ( ) throws java.io.IOException { java.io.FileDescriptor fd = null ; try { fd = Libcore.os.open ( path , ( ( ( O_RDWR ) | ( O_CREAT ) ) | ( O_EXCL ) ) , 384 ) ; return true ; } catch ( libcore.io.ErrnoException errnoException ) { if ( ( errnoException.errno ) == ( EEXIST ) ) { return false ; } throw errnoException.rethrowAsIOException ( ) ; } finally { libcore.io.IoUtils.close ( fd ) ; } }

Target:
public boolean createNewFile ( ) throws java.io.IOException { java.io.FileDescriptor fd = null ; try { fd = Libcore.os.open ( path , ( ( ( O_RDWR ) | ( O_CREAT ) ) | ( O_EXCL ) ) , 384 ) ; return true ; } catch ( android.system.ErrnoException errnoException ) { if ( ( errnoException.errno ) == ( EEXIST ) ) { return false ; } throw errnoException.rethrowAsIOException ( ) ; } finally { libcore.io.IoUtils.close ( fd ) ; } }
Source:
public void testMultiFilterWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "zzz" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "bar" , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "foo" , 3 ) ) ; java.util.List < com.android.build.OutputFile > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }

Target:
public void testMultiFilterWithNoMatch ( ) throws com.android.ide.common.process.ProcessException { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "zzz" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "bar" , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "foo" , 3 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( 0 , result.size ( ) ) ; }
Source:
public void test_init_and_run_for_SimpleTest2_limitting_to_1method_with_both_init_and_run_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.lang.String actionName = "actionName" ; runner.init ( monitor , actionName , "testSimple3" , target , skipPastReference , testEnvironment , 0 , false ) ; runner.run ( "" , null , new java.lang.String [ ] { "testSimple2" } ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple2" ) , actionName ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest2_limiting_to_1method_with_both_run_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.lang.String actionName = "actionName" ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , actionName , "testSimple3" , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , new java.lang.String [ ] { "testSimple2" } ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple2" ) , actionName ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
public void testAesCbcHmacMd5Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha1Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , getKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
private void addNewConfiguration ( com.google.gct.testing.CloudTestConfigurationImpl newConfiguration ) { newConfiguration.setIcon ( CloudTestConfigurationProviderImpl.DEFAULT_ICON ) ; int addIndex = ( ( selectedConfiguration ) == null ) ? editableConfigurations.size ( ) : ( editableConfigurations.indexOf ( selectedConfiguration ) ) + 1 ; editableConfigurations.add ( addIndex , newConfiguration ) ; addConfigurationToTree ( addIndex , newConfiguration , true ) ; selectedConfiguration = newConfiguration ; updateConfigurationTree ( ) ; }

Target:
private void addNewConfiguration ( com.google.gct.testing.CloudConfigurationImpl newConfiguration ) { newConfiguration.setIcon ( CloudConfigurationProviderImpl.DEFAULT_ICON ) ; int addIndex = ( ( selectedConfiguration ) == null ) ? editableConfigurations.size ( ) : ( editableConfigurations.indexOf ( selectedConfiguration ) ) + 1 ; editableConfigurations.add ( addIndex , newConfiguration ) ; addConfigurationToTree ( addIndex , newConfiguration , true ) ; selectedConfiguration = newConfiguration ; updateConfigurationTree ( ) ; }
Source:
public void testEmptyXml ( ) throws java.lang.Exception { java.lang.String document = "<?xml version=\"1.0\"?>" ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "Premature end of file.*" , e.getMessage ( ) ) ; return ; } handler.verify ( ) ; fail ( ) ; }

Target:
public void testValidateLocalRepositoryFile3 ( ) throws java.lang.Exception { java.io.InputStream xmlStream = this . getClass ( ) . getResourceAsStream ( "/com/android/sdklib/testdata/repository_sample_3.xml" ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( xmlStream ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getRepoValidator ( 3 , handler ) ; validator.validate ( source ) ; handler.verify ( ) ; }
Source:
public void testReceive_UnconnectedBufNotEmpty ( ) throws java.lang.Exception { assertFalse ( this . channel1.isConnected ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_NORMAL ) ; dst.put ( ( ( byte ) ( 88 ) ) ) ; assertEquals ( ( ( ( dst.position ( ) ) + ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_NORMAL ) ) - 1 ) , dst.limit ( ) ) ; assertNull ( this . channel1.receive ( dst ) ) ; }

Target:
public void testReceive_UnboundBufFull ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.isConnected ( ) ) ; assertFalse ( dc.socket ( ) . isBound ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ONE ) ; dst.put ( ( ( byte ) ( 88 ) ) ) ; assertEquals ( dst.position ( ) , dst.limit ( ) ) ; assertNull ( dc.receive ( dst ) ) ; }
Source:
private < T > void testCompareResult ( java.util.List < T > oldItems , java.util.List < T > newItems , java.util.List < T > expectRemoved , java.util.List < T > expectAdded ) { android.net.LinkProperties.CompareResult < T > result = new android.net.LinkProperties.CompareResult ( oldItems , newItems ) ; assertEquals ( new android.util.ArraySet ( expectAdded ) , new android.util.ArraySet ( result.added ) ) ; assertEquals ( new android.util.ArraySet ( expectRemoved ) , new android.util.ArraySet ( result.removed ) ) ; }

Target:
private < T > void compareResult ( java.util.List < T > oldItems , java.util.List < T > newItems , java.util.List < T > expectRemoved , java.util.List < T > expectAdded ) { android.net.LinkProperties.CompareResult < T > result = new android.net.LinkProperties.CompareResult ( oldItems , newItems ) ; org.junit.Assert.assertEquals ( new android.util.ArraySet ( expectAdded ) , new android.util.ArraySet ( result.added ) ) ; org.junit.Assert.assertEquals ( new android.util.ArraySet ( expectRemoved ) , new android.util.ArraySet ( result.removed ) ) ; }
Source:
public void testWildcardMatchingSubstring ( ) { assertTrue ( verifier.verifyHostName ( "b.c.d" , "b*.c.d" ) ) ; assertTrue ( verifier.verifyHostName ( "imap.google.com" , "ima*.google.com" ) ) ; }

Target:
public void testWildcardCharacterMustBeLeftMostLabelOnly ( ) { assertFalse ( verifyWithDomainNamePattern ( "test.www.example.com" , "test.*.example.com" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "www.*.com" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "www.example.*" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "*www.example.com" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "*w.example.com" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "w*w.example.com" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "w*.example.com" ) ) ; assertFalse ( verifyWithDomainNamePattern ( "www.example.com" , "www*.example.com" ) ) ; }
Source:
public void tearDown ( ) throws java.lang.Exception { setMobileDataAlwaysOn ( false ) ; if ( ( mCellNetworkAgent ) != null ) { mCellNetworkAgent.disconnect ( ) ; } if ( ( mWiFiNetworkAgent ) != null ) { mWiFiNetworkAgent.disconnect ( ) ; } mCellNetworkAgent = mWiFiNetworkAgent = null ; super . tearDown ( ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { setMobileDataAlwaysOn ( false ) ; if ( ( mCellNetworkAgent ) != null ) { mCellNetworkAgent.disconnect ( ) ; mCellNetworkAgent = null ; } if ( ( mWiFiNetworkAgent ) != null ) { mWiFiNetworkAgent.disconnect ( ) ; mWiFiNetworkAgent = null ; } if ( ( mEthernetNetworkAgent ) != null ) { mEthernetNetworkAgent.disconnect ( ) ; mEthernetNetworkAgent = null ; } super . tearDown ( ) ; }
Source:
public int compare ( com.android.server.AlarmManagerService.Alarm a1 , com.android.server.AlarmManagerService.Alarm a2 ) { long when1 = a1.when ; long when2 = a2.when ; if ( ( when1 - when2 ) > 0 ) { return 1 ; } if ( ( when1 - when2 ) < 0 ) { return - 1 ; } return 0 ; }

Target:
public int compare ( com.android.server.AlarmManagerService.Alarm a1 , com.android.server.AlarmManagerService.Alarm a2 ) { long when1 = a1.whenElapsed ; long when2 = a2.whenElapsed ; if ( when1 > when2 ) { return 1 ; } if ( when1 < when2 ) { return - 1 ; } return 0 ; }
Source:
public void nvResetConfig ( int resetType , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_NV_RESET_CONFIG , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( resetType ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ' ' ) + resetType ) ) ; send ( rr ) ; }

Target:
public void nvResetConfig ( int resetType , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_NV_RESET_CONFIG , response , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( resetType ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ' ' ) + resetType ) ) ; send ( rr ) ; }
Source:
public void onCapabilitiesChanged ( android.net.Network network , android.net.NetworkCapabilities networkCapabilities ) { com.googlecode.android_scripting.Log.d ( ( "NetworkCallback onCapabilitiesChanged. RSSI:" + ( networkCapabilities.getSignalStrength ( ) ) ) ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_CAPABILITIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_CAPABILITIES_CHANGED ) ) { mEventFacade.postEvent ( ConnectivityConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.ConnectivityEvents.NetworkCallbackEventOnCapabilitiesChanged ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_CAPABILITIES_CHANGED ) , networkCapabilities.getSignalStrength ( ) ) ) ; } }

Target:
public void onCapabilitiesChanged ( android.net.Network network , android.net.NetworkCapabilities networkCapabilities ) { com.googlecode.android_scripting.Log.d ( ( "NetworkCallback onCapabilitiesChanged. RSSI:" + ( networkCapabilities.getSignalStrength ( ) ) ) ) ; if ( ( ( mEvents ) & ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_CAPABILITIES_CHANGED ) ) == ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_CAPABILITIES_CHANGED ) ) { mEventFacade.postEvent ( TelephonyConstants.EventNetworkCallback , new com.googlecode.android_scripting.facade.telephony.TelephonyEvents.NetworkCallbackEvent ( mId , com.googlecode.android_scripting.facade.ConnectivityManagerFacade.getNetworkCallbackEventString ( com.googlecode.android_scripting.facade.ConnectivityManagerFacade.NetworkCallback.EVENT_CAPABILITIES_CHANGED ) , networkCapabilities.getSignalStrength ( ) , TelephonyEvents.NetworkCallbackEvent.INVALID_VALUE ) ) ; } }
Source:
private static org.w3c.dom.Document checkDocument ( @ com.android.annotations.NonNull java.lang.String xml , boolean namespaceAware ) { try { return com.android.utils.XmlUtils.parseDocument ( xml , namespaceAware ) ; } catch ( org.xml.sax.SAXException sax ) { com.android.build.gradle.tasks.annotations.Extractor.warning ( sax.toString ( ) ) ; } catch ( java.lang.Exception e ) { } return null ; }

Target:
private static org.w3c.dom.Document checkDocument ( @ com.android.annotations.NonNull java.lang.String pkg , @ com.android.annotations.NonNull java.lang.String xml , boolean namespaceAware ) { try { return com.android.utils.XmlUtils.parseDocument ( xml , namespaceAware ) ; } catch ( org.xml.sax.SAXException sax ) { com.android.build.gradle.tasks.annotations.Extractor.warning ( ( ( ( "Failed to parse document for package " + pkg ) + ": " ) + ( sax.toString ( ) ) ) ) ; } catch ( java.lang.Exception e ) { } return null ; }
Source:
public java.util.List < com.android.tv.dvr.ScheduledRecording > getScheduledRecordings ( android.util.Range < java.lang.Long > period , @ com.android.tv.dvr.ScheduledRecording.RecordingState int state ) { java.util.List < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( ( r.isOverLapping ( period ) ) && ( ( r.getState ( ) ) == state ) ) { result.add ( r ) ; } } return result ; }

Target:
public java.util.List < com.android.tv.dvr.data.ScheduledRecording > getScheduledRecordings ( java.lang.String inputId ) { java.util.List < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( android.text.TextUtils.equals ( r.getInputId ( ) , inputId ) ) { result.add ( r ) ; } } return result ; }
Source:
public void sendStartListenerMessage ( int masId ) { if ( ( mSessionStatusHandler ) != null ) { android.os.Message msg = mSessionStatusHandler.obtainMessage ( com.android.bluetooth.map.BluetoothMapService.START_LISTENER , masId , 0 ) ; mSessionStatusHandler.sendMessageDelayed ( msg , 20 ) ; } }

Target:
public void sendStartListenerMessage ( int masId ) { if ( ( ( mSessionStatusHandler ) != null ) && ( ! ( mSessionStatusHandler.hasMessages ( com.android.bluetooth.map.BluetoothMapService.START_LISTENER ) ) ) ) { android.os.Message msg = mSessionStatusHandler.obtainMessage ( com.android.bluetooth.map.BluetoothMapService.START_LISTENER , masId , 0 ) ; mSessionStatusHandler.sendMessageDelayed ( msg , 20 ) ; } else if ( ( mSessionStatusHandler ) != null ) { if ( com.android.bluetooth.map.BluetoothMapService.DEBUG ) android.util.Log.w ( com.android.bluetooth.map.BluetoothMapService.TAG , "mSessionStatusHandler START_LISTENER message already in Queue" ) ; } }
Source:
public void testResultReportingFastTests ( ) throws java.lang.Exception { mReporter.invocationStarted ( mBuildInfo ) ; mReporter.testRunStarted ( com.android.compatibility.common.tradefed.result.MetadataReporterTest.ID , 3 ) ; runFastTests ( ) ; java.util.Collection < com.android.compatibility.common.tradefed.result.MetadataReporter.TestMetadata > metadata = mReporter.getTestMetadata ( ) ; assertTrue ( metadata.isEmpty ( ) ) ; mReporter.testRunEnded ( 10 , new java.util.HashMap < java.lang.String , java.lang.String > ( ) ) ; mReporter.invocationEnded ( 10 ) ; }

Target:
public void testResultReportingSlowTests ( ) throws java.lang.Exception { mReporter.invocationStarted ( mBuildInfo ) ; mReporter.testRunStarted ( com.android.compatibility.common.tradefed.result.MetadataReporterTest.ID , 3 ) ; runTests ( 50L ) ; java.util.Collection < com.android.compatibility.common.tradefed.result.MetadataReporter.TestMetadata > metadata = mReporter.getTestMetadata ( ) ; assertEquals ( metadata.size ( ) , 2 ) ; mReporter.testRunEnded ( 10 , new java.util.HashMap < java.lang.String , java.lang.String > ( ) ) ; mReporter.invocationEnded ( 10 ) ; }
Source:
public boolean endCall ( ) { try { com.android.server.telecom.Log.startSession ( "TSI.eC" ) ; synchronized ( mLock ) { enforceModifyPermission ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { return endCallInternal ( ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public boolean endCall ( ) { try { android.telecom.Log.startSession ( "TSI.eC" ) ; synchronized ( mLock ) { enforceModifyPermission ( ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { return endCallInternal ( ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
private void clccResponse ( int index , int direction , int status , int mode , boolean mpty , java.lang.String number , int type ) { enforceCallingOrSelfPermission ( android.Manifest.permission.MODIFY_PHONE_STATE , null ) ; broadCastMessageToStateMachines ( HeadsetStateMachine.SEND_CCLC_RESPONSE , new com.android.bluetooth.hfp.HeadsetClccResponse ( index , direction , status , mode , mpty , number , type ) ) ; }

Target:
private void clccResponse ( int index , int direction , int status , int mode , boolean mpty , java.lang.String number , int type ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.HeadsetService.MODIFY_PHONE_STATE , null ) ; mStateMachine.sendMessage ( HeadsetStateMachine.SEND_CCLC_RESPONSE , new com.android.bluetooth.hfp.HeadsetClccResponse ( index , direction , status , mode , mpty , number , type ) ) ; }
Source:
public void testUngrant_Generated_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testUngrant_Generated_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; assertTrue ( "Should be able to ungrant key to other user" , mKeyStore.ungrant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
public boolean isVisualVoicemailEnabled ( android.telecom.PhoneAccountHandle phoneAccountHandle ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.isVisualVoicemailEnabled ( mContext.getOpPackageName ( ) , phoneAccountHandle ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return false ; }

Target:
public void setVisualVoicemailEnabled ( android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { }
Source:
public void newSmsOnSim ( int var1 , int var2 ) { }

Target:
public void newSmsOnSim ( int indicationType , int recordNumber ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM ) ; if ( ( mRil.mSmsOnSimRegistrant ) != null ) { mRil.mSmsOnSimRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , recordNumber , null ) ) ; } }
Source:
public com.android.jack.ir.ast.JMethodId get ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId method ) { com.android.jack.ir.ast.JMethodId found = virtualMethods.ceiling ( method ) ; if ( ( found != null ) && ( ( com.android.jack.frontend.VirtualMethodsMarker.methodIdComparator.compare ( method , found ) ) == 0 ) ) { return found ; } else { return null ; } }

Target:
public void add ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodId method ) { com.android.jack.frontend.VirtualMethodsMarker.ComparableMethodId comparable = new com.android.jack.frontend.VirtualMethodsMarker.ComparableMethodId ( method ) ; virtualMethods.put ( comparable , comparable ) ; }
Source:
public int setTempFileRootDirectory ( int subscriptionId , java.lang.String rootDirectoryPath ) { android.os.Bundle b = new android.os.Bundle ( ) ; b.putString ( android.telephony.cts.embmstestapp.CtsDownloadService.METHOD_NAME , android.telephony.cts.embmstestapp.CtsDownloadService.METHOD_SET_TEMP_FILE_ROOT ) ; b.putInt ( android.telephony.cts.embmstestapp.CtsDownloadService.ARGUMENT_SUBSCRIPTION_ID , subscriptionId ) ; b.putString ( android.telephony.cts.embmstestapp.CtsDownloadService.ARGUMENT_ROOT_DIRECTORY_PATH , rootDirectoryPath ) ; mReceivedCalls.add ( b ) ; return 0 ; }

Target:
public int setTempFileRootDirectory ( int subscriptionId , java.lang.String rootDirectoryPath ) { android.os.Bundle b = new android.os.Bundle ( ) ; b.putString ( android.telephony.cts.embmstestapp.CtsDownloadService.METHOD_NAME , android.telephony.cts.embmstestapp.CtsDownloadService.METHOD_SET_TEMP_FILE_ROOT ) ; b.putInt ( android.telephony.cts.embmstestapp.CtsDownloadService.ARGUMENT_SUBSCRIPTION_ID , subscriptionId ) ; b.putString ( android.telephony.cts.embmstestapp.CtsDownloadService.ARGUMENT_ROOT_DIRECTORY_PATH , rootDirectoryPath ) ; mReceivedCalls.add ( b ) ; mTempFileRootDirPath = rootDirectoryPath ; return 0 ; }
Source:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.String msg , java.lang.Object [ ] params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.server.telecom.Log.startSession ( "TSSwR.oR" ) ; try { int userHandleId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; android.os.UserHandle currentUserHandle = new android.os.UserHandle ( userHandleId ) ; mPhoneAccountRegistrar.setCurrentUserHandle ( currentUserHandle ) ; mCallsManager.onUserSwitch ( currentUserHandle ) ; } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { com.android.server.telecom.Log.startSession ( "TSSwR.oR" ) ; try { synchronized ( mLock ) { int userHandleId = intent.getIntExtra ( Intent.EXTRA_USER_HANDLE , 0 ) ; android.os.UserHandle currentUserHandle = new android.os.UserHandle ( userHandleId ) ; mPhoneAccountRegistrar.setCurrentUserHandle ( currentUserHandle ) ; mCallsManager.onUserSwitch ( currentUserHandle ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }
Source:
public java.lang.AbstractStringBuilder append ( java.lang.String str ) { if ( str == null ) str = "null" ; int len = str.length ( ) ; ensureCapacityInternal ( ( ( count ) + len ) ) ; str.getChars ( 0 , len , value , count ) ; count += len ; return this ; }

Target:
public java.lang.AbstractStringBuilder append ( java.lang.String str ) { if ( str == null ) str = "null" ; int len = str.length ( ) ; ensureCapacityInternal ( ( ( count ) + len ) ) ; str.getCharsNoCheck ( 0 , len , value , count ) ; count += len ; return this ; }
Source:
private void onDescriptorsChanged ( org.w3c.dom.Document document ) { mUnknownDescriptorMap.clear ( ) ; if ( document != null ) { mUiRootNode.loadFromXmlNode ( document ) ; } else { mUiRootNode.reloadFromXmlNode ( mUiRootNode.getXmlDocument ( ) ) ; } if ( ( mOutline ) != null ) { mOutline.reloadModel ( ) ; } if ( ( mGraphicalEditor ) != null ) { mGraphicalEditor.onTargetChange ( ) ; mGraphicalEditor.reloadPalette ( ) ; } }

Target:
private void onDescriptorsChanged ( org.w3c.dom.Document document ) { mUnknownDescriptorMap.clear ( ) ; if ( document != null ) { mUiRootNode.loadFromXmlNode ( document ) ; } else { mUiRootNode.reloadFromXmlNode ( mUiRootNode.getXmlDocument ( ) ) ; } if ( ( mOutline1 ) != null ) { mOutline1.reloadModel ( ) ; } if ( ( mGraphicalEditor ) != null ) { mGraphicalEditor.onTargetChange ( ) ; mGraphicalEditor.reloadPalette ( ) ; } }
Source:
public void test_setOption_SO_REUSEADDR_afterOpen ( ) throws java.lang.Exception { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; boolean initialValue = ssc.getOption ( java.net.StandardSocketOptions.SO_REUSEADDR ) ; ssc.setOption ( java.net.StandardSocketOptions.SO_REUSEADDR , ( ! initialValue ) ) ; assertEquals ( ( ! initialValue ) , ( ( boolean ) ( ssc.getOption ( java.net.StandardSocketOptions.SO_REUSEADDR ) ) ) ) ; assertEquals ( ( ! initialValue ) , ssc.socket ( ) . getReuseAddress ( ) ) ; ssc.close ( ) ; }

Target:
public void test_bind_unresolvedAddress ( ) throws java.io.IOException { java.nio.channels.ServerSocketChannel ssc = java.nio.channels.ServerSocketChannel.open ( ) ; try { ssc.socket ( ) . bind ( new java.net.InetSocketAddress ( "unresolvedname" , 31415 ) ) ; fail ( ) ; } catch ( java.net.SocketException expected ) { } assertNull ( ssc.socket ( ) . getLocalSocketAddress ( ) ) ; assertTrue ( ssc.isOpen ( ) ) ; ssc.close ( ) ; }
Source:
public final void update ( byte [ ] input ) throws java.lang.IllegalStateException { if ( ! ( isInitMac ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input != null ) { spiImpl.engineUpdate ( input , 0 , input.length ) ; } }

Target:
public final byte [ ] doFinal ( byte [ ] input ) throws java.lang.IllegalStateException { if ( ! ( isInitMac ) ) { throw new java.lang.IllegalStateException ( ) ; } javax.crypto.MacSpi spi = getSpi ( ) ; if ( input != null ) { spi.engineUpdate ( input , 0 , input.length ) ; } return spi.engineDoFinal ( ) ; }
Source:
public boolean connectAudio ( ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.connectAudio ( ) ; } 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 false ; }

Target:
public boolean disconnectAudio ( android.bluetooth.BluetoothDevice device ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.disconnectAudio ( 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 false ; }