auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testFilterByAppNameRegex ( ) { com.android.ddmuilib.logcat.LogCatFilter filter = new com.android.ddmuilib.logcat.LogCatFilter ( "" , "" , "" , "" , "dalvik.*" , com.android.ddmlib.Log.LogLevel.VERBOSE ) ; com.android.ddmuilib.logcat.LogCatMessage msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "dalvikvm1" , "" , "" , "" ) ; assertEquals ( true , filter.matches ( msg ) ) ; msg = new com.android.ddmuilib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "system" , "" , "" , "" ) ; assertEquals ( false , filter.matches ( msg ) ) ; }

Target:
public void testFilterByAppNameRegex ( ) { com.android.ddmuilib.logcat.LogCatFilter filter = new com.android.ddmuilib.logcat.LogCatFilter ( "" , "" , "" , "" , "dalvik.*" , com.android.ddmlib.Log.LogLevel.VERBOSE ) ; com.android.ddmlib.logcat.LogCatMessage msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "dalvikvm1" , "" , "" , "" ) ; assertEquals ( true , filter.matches ( msg ) ) ; msg = new com.android.ddmlib.logcat.LogCatMessage ( com.android.ddmlib.Log.LogLevel.VERBOSE , "" , "" , "system" , "" , "" , "" ) ; assertEquals ( false , filter.matches ( msg ) ) ; }
Source:
public boolean logOut ( ) { com.google.gct.login.CredentialedUser activeUser = users.getActiveUser ( ) ; if ( activeUser == null ) { return false ; } boolean loggedOut = activeUser.getGoogleLoginState ( ) . logOut ( ) ; if ( loggedOut ) { users.removeUser ( activeUser.getEmail ( ) ) ; } return loggedOut ; }

Target:
private void logOutAllUsers ( ) { for ( com.google.gct.login.CredentialedUser aUser : users.getAllUsers ( ) . values ( ) ) { aUser.getGoogleLoginState ( ) . logOut ( false ) ; } users.removeAllUsers ( ) ; }
Source:
public void visitNameAndTypeConstant ( proguard.classfile.visitor.Clazz clazz , proguard.classfile.visitor.NameAndTypeConstant nameAndTypeConstant ) { println ( ( ( ( ( ( ( visitorInfo ( nameAndTypeConstant ) ) + " NameAndType [" ) + ( clazz.getString ( nameAndTypeConstant.u2nameIndex ) ) ) + " " ) + ( clazz.getString ( nameAndTypeConstant.u2descriptorIndex ) ) ) + "]" ) ) ; }

Target:
public void visitNameAndTypeConstant ( proguard.classfile.visitor.Clazz clazz , proguard.classfile.visitor.NameAndTypeConstant nameAndTypeConstant ) { println ( ( ( ( ( ( ( visitorInfo ( nameAndTypeConstant ) ) + " NameAndType [" ) + ( nameAndTypeConstant.getName ( clazz ) ) ) + " " ) + ( nameAndTypeConstant.getType ( clazz ) ) ) + "]" ) ) ; }
Source:
public int hashCode ( ) { return ( ( ( ( ( this . a.hashCode ( ) ) ^ ( this . b.hashCode ( ) ) ) ^ ( m ) ) ^ ( k1 ) ) ^ ( k2 ) ) ^ ( k3 ) ; }

Target:
protected org.bouncycastle.math.ec.ECPoint createRawPoint ( org.bouncycastle.math.ec.ECFieldElement x , org.bouncycastle.math.ec.ECFieldElement y , org.bouncycastle.math.ec.ECFieldElement [ ] zs , boolean withCompression ) { return new org.bouncycastle.math.ec.ECPoint.F2m ( this , x , y , zs , withCompression ) ; }
Source:
public void onStateUpdated ( android.telephony.mbms.DownloadRequest request , android.telephony.mbms.FileInfo fileInfo , @ android.telephony.MbmsDownloadSession.DownloadStatus int state ) { try { callback.onStateUpdated ( request , fileInfo , state ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , downloadRequest.getSubscriptionId ( ) ) ; } }

Target:
public void onStateUpdated ( android.telephony.mbms.DownloadRequest request , android.telephony.mbms.FileInfo fileInfo , @ android.telephony.MbmsDownloadSession.DownloadStatus int state ) { if ( ! ( isFilterFlagSet ( android.telephony.mbms.vendor.STATE_UPDATES ) ) ) { return ; } try { mCallback.onStateUpdated ( request , fileInfo , state ) ; } catch ( android.os.RemoteException e ) { onRemoteException ( e ) ; } }
Source:
public void onReceivedHttpAuthRequest ( org.chromium.android_webview.AwHttpAuthHandler handler , java.lang.String host , java.lang.String realm ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedHttpAuthRequest=" + host ) ) ; mWebViewClient.onReceivedHttpAuthRequest ( mWebView , new com.android.webview.chromium.WebViewContentsClientAdapter.AwHttpAuthHandlerAdapter ( handler ) , host , realm ) ; org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void onReceivedHttpAuthRequest ( org.chromium.android_webview.AwHttpAuthHandler handler , java.lang.String host , java.lang.String realm ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedHttpAuthRequest=" + host ) ) ; mWebViewClient.onReceivedHttpAuthRequest ( mWebView , new com.android.webview.chromium.WebViewContentsClientAdapter.AwHttpAuthHandlerAdapter ( handler ) , host , realm ) ; org.chromium.base.TraceEvent.end ( ) ; }
Source:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , 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.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , 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.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }
Source:
public boolean isApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "isApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.isApplicationHidden ( admin , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public boolean isNotificationListenerServicePermitted ( @ android.annotation.NonNull java.lang.String packageName , @ android.annotation.UserIdInt int userId ) { if ( ( mService ) != null ) { try { return mService.isNotificationListenerServicePermitted ( packageName , userId ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return true ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int whichButton ) { switch ( whichButton ) { case android.content.DialogInterface.BUTTON1 : phone.sendUssdResponse ( inputText.getText ( ) . toString ( ) ) ; break ; case android.content.DialogInterface.BUTTON2 : if ( mmiCode.isCancelable ( ) ) { mmiCode.cancel ( ) ; } break ; } }

Target:
public void onClick ( android.content.DialogInterface dialog , int whichButton ) { switch ( whichButton ) { case android.content.DialogInterface.BUTTON_POSITIVE : phone.sendUssdResponse ( inputText.getText ( ) . toString ( ) ) ; break ; case android.content.DialogInterface.BUTTON_NEGATIVE : if ( mmiCode.isCancelable ( ) ) { mmiCode.cancel ( ) ; } break ; } }
Source:
public boolean tearDownInterfaces ( ) { if ( ( mWificond ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond handler" ) ; return false ; } try { mWificond.tearDownInterfaces ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to tear down interfaces via wificond" ) ; return false ; } return true ; }

Target:
public boolean disableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to disable supplicant due to remote exception" ) ; } return false ; }
Source:
protected void engineInit ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { if ( ( params != null ) && ( ( padding ) != ( NativeConstants.RSA_PKCS1_OAEP_PADDING ) ) ) { throw new java.security.InvalidAlgorithmParameterException ( ( "unknown param type: " + ( params.getClass ( ) . getName ( ) ) ) ) ; } engineInitInternal ( opmode , key ) ; }

Target:
protected void engineInit ( int opmode , java.security.Key key , java.security.SecureRandom random ) throws java.security.InvalidKeyException { try { engineInitInternal ( opmode , key , null ) ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.security.InvalidKeyException ( "Algorithm parameters rejected when none supplied" , e ) ; } }
Source:
private void startServices ( ) { android.content.Intent startIntent = new android.content.Intent ( mTargetContext , com.android.bluetooth.mapclient.MapClientService.class ) ; startIntent.putExtra ( AdapterService.EXTRA_ACTION , AdapterService.ACTION_SERVICE_STATE_CHANGED ) ; startIntent.putExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.STATE_ON ) ; try { mServiceRule.startService ( startIntent ) ; } catch ( java.util.concurrent.TimeoutException e ) { android.util.Log.e ( com.android.bluetooth.mapclient.MapClientTest.TAG , ( "startServices, timeout " + e ) ) ; org.junit.Assert.fail ( ) ; } mService = com.android.bluetooth.mapclient.MapClientService.getMapClientService ( ) ; org.junit.Assert.assertNotNull ( mService ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ! ( mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_mapmce ) ) ) { return ; } com.android.bluetooth.TestUtils.stopService ( mServiceRule , com.android.bluetooth.mapclient.MapClientService.class ) ; mService = com.android.bluetooth.mapclient.MapClientService.getMapClientService ( ) ; org.junit.Assert.assertNull ( mService ) ; com.android.bluetooth.TestUtils.clearAdapterService ( mAdapterService ) ; }
Source:
private boolean waitForFinalization ( ) { long startTime = java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingStartedNanos ; sleepFor ( startTime , java.lang.Daemons.MAX_FINALIZE_NANOS ) ; return ( ( java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingObject ) == null ) || ( ( java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingStartedNanos ) != startTime ) ; }

Target:
private java.lang.ref.FinalizerReference < ? > waitForFinalization ( ) { long startCount = java.lang.Daemons.FinalizerDaemon.INSTANCE.progressCounter.get ( ) ; sleepFor ( java.lang.Daemons.MAX_FINALIZE_NANOS ) ; if ( ( getNeedToWork ( ) ) && ( ( java.lang.Daemons.FinalizerDaemon.INSTANCE.progressCounter.get ( ) ) == startCount ) ) { java.lang.ref.FinalizerReference < ? > finalizing = java.lang.Daemons.FinalizerDaemon.INSTANCE.finalizingObject ; sleepFor ( java.lang.Daemons.NANOS_PER_SECOND ) ; if ( ( getNeedToWork ( ) ) && ( ( java.lang.Daemons.FinalizerDaemon.INSTANCE.progressCounter.get ( ) ) == startCount ) ) { return finalizing ; } } return null ; }
Source:
private static boolean isCLDRFieldName ( int index ) { if ( ( index < 0 ) && ( index >= ( android.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ) ) { return false ; } if ( ( android.icu.text.DateTimePatternGenerator.CLDR_FIELD_NAME [ index ] . charAt ( 0 ) ) == '*' ) { return false ; } else { return true ; } }

Target:
private static int getCLDRFieldNumber ( android.icu.impl.UResource.Key key ) { for ( int i = 0 ; i < ( android.icu.text.DateTimePatternGenerator.CLDR_FIELD_NAME.length ) ; ++ i ) { if ( key.contentEquals ( android.icu.text.DateTimePatternGenerator.CLDR_FIELD_NAME [ i ] ) ) { return i ; } } return - 1 ; }
Source:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( com.android.phone.CallHandlerServiceProxy.DBG ) { android.util.Log.d ( com.android.phone.CallHandlerServiceProxy.TAG , "Service Connected" ) ; } onCallHandlerServiceConnected ( ICallHandlerService.Stub.asInterface ( service ) ) ; resetConnectRetryCount ( ) ; }

Target:
public void onServiceConnected ( android.content.ComponentName className , android.os.IBinder service ) { if ( com.android.phone.CallHandlerServiceProxy.DBG ) { android.util.Log.d ( com.android.phone.CallHandlerServiceProxy.TAG , "Service Connected" ) ; } onCallHandlerServiceConnected ( ICallHandlerService.Stub.asInterface ( service ) ) ; removeMessages ( com.android.phone.CallHandlerServiceProxy.BIND_TIME_OUT ) ; if ( com.android.phone.CallHandlerServiceProxy.DBG ) { android.util.Log.d ( com.android.phone.CallHandlerServiceProxy.TAG , "Service Connected. Cancel timer" ) ; } resetConnectRetryCount ( ) ; }
Source:
public java.lang.StringBuilder formatAndAppend ( java.lang.StringBuilder appendTo , int [ ] offsets , java.lang.CharSequence ... values ) { return android.icu.impl.SimplePatternFormatter.formatAndAppend ( compiledPattern , appendTo , offsets , values ) ; }

Target:
public static java.lang.String formatRawPattern ( java.lang.String pattern , int min , int max , java.lang.CharSequence ... values ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; java.lang.String compiledPattern = android.icu.impl.SimpleFormatterImpl.compileToStringMinMaxArguments ( pattern , sb , min , max ) ; sb.setLength ( 0 ) ; return android.icu.impl.SimpleFormatterImpl.formatAndAppend ( compiledPattern , sb , null , values ) . toString ( ) ; }
Source:
public final java.nio.channels.FileLock lock ( long position , long size , boolean shared ) throws java.io.IOException { checkOpen ( ) ; java.nio.channels.FileLock resultLock = null ; { boolean completed = false ; try { begin ( ) ; resultLock = basicLock ( position , size , shared , true ) ; completed = true ; } finally { end ( completed ) ; } } return resultLock ; }

Target:
public final java.nio.channels.FileLock lock ( long position , long size , boolean shared ) throws java.io.IOException { checkOpen ( ) ; java.nio.channels.FileLock resultLock = null ; { boolean completed = false ; try { begin ( ) ; resultLock = basicLock ( position , size , shared , true ) ; completed = true ; } finally { try { end ( completed ) ; } catch ( java.nio.channels.ClosedByInterruptException e ) { throw new java.nio.channels.FileLockInterruptionException ( ) ; } } } return resultLock ; }
Source:
protected void runTest ( ) throws java.lang.Throwable { try { if ( ( testType ) == ( com.android.build.gradle.DeviceTest.TestType.CHECK ) ) { runTasksOnProject ( projectName , gradleVersion , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "connectedCheck" ) ; } else { runTasksOnProject ( projectName , gradleVersion , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "connectedCheck" , "mergeAndroidReports" ) ; } } finally { } }

Target:
protected void runTest ( ) throws java.lang.Throwable { try { switch ( testType ) { case CHECK : runTasksOnProject ( projectName , gradleVersion , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "connectedCheck" ) ; break ; case CHECK_AND_REPORT : runTasksOnProject ( projectName , gradleVersion , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "connectedCheck" , "mergeAndroidReports" ) ; break ; case INSTALL : runTasksOnProject ( projectName , gradleVersion , java.util.Collections.< java.lang.String > emptyList ( ) , "clean" , "installDebug" , "uninstallAll" ) ; break ; } } finally { } }
Source:
private void getStringValueFromCursor ( android.content.ContentValues cv , android.database.Cursor c , java.lang.String key ) { java.lang.String fromCursor = c.getString ( c.getColumnIndex ( key ) ) ; if ( ! ( android.text.TextUtils.isEmpty ( fromCursor ) ) ) { cv.put ( key , fromCursor ) ; } }

Target:
private void getStringValueFromCursor ( android.content.ContentValues cv , android.database.Cursor c , java.lang.String key ) { int columnIndex = c.getColumnIndex ( key ) ; if ( columnIndex != ( - 1 ) ) { java.lang.String fromCursor = c.getString ( columnIndex ) ; if ( ! ( android.text.TextUtils.isEmpty ( fromCursor ) ) ) { cv.put ( key , fromCursor ) ; } } }
Source:
public void testAssistantStackFinishToPreviousApp ( ) throws java.lang.Exception { launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; enableAssistant ( ) ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK , android.server.cts.ActivityManagerAssistantStackTests.EXTRA_FINISH_SELF , "true" ) ; disableAssistant ( ) ; mAmWmState.waitForValidState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.waitForActivityState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerState.STATE_RESUMED ) ; mAmWmState.assertFocusedActivity ( "TestActivity should be resumed" , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; mAmWmState.assertFrontStack ( "Fullscreen stack should be on top." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertFocusedStack ( "Fullscreen stack should be focused." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }

Target:
public void testAssistantStackFinishToPreviousApp ( ) throws java.lang.Exception { launchActivityOnDisplay ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerAssistantStackTests.mAssistantDisplayId ) ; enableAssistant ( ) ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK , android.server.cts.ActivityManagerAssistantStackTests.EXTRA_FINISH_SELF , "true" ) ; disableAssistant ( ) ; mAmWmState.waitForValidState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.waitForActivityState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerState.STATE_RESUMED ) ; mAmWmState.assertFocusedActivity ( "TestActivity should be resumed" , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; mAmWmState.assertFrontStack ( "Fullscreen stack should be on top." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertFocusedStack ( "Fullscreen stack should be focused." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }
Source:
public void onDestroy ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.VERBOSE ) android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Pbap Service onDestroy" ) ; super . onDestroy ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; closeService ( ) ; if ( ( mSessionStatusHandler ) != null ) { mSessionStatusHandler.removeCallbacksAndMessages ( null ) ; } }

Target:
protected void disconnect ( ) { synchronized ( this ) { if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) { if ( ( mServerSession ) != null ) { mServerSession.close ( ) ; mServerSession = null ; } closeConnectionSocket ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; } } }
Source:
private void checkFailure ( java.util.Map < java.lang.String , java.lang.String > replacements , java.lang.String regex ) throws java.lang.Exception { java.io.InputStream xmlStream = com.android.dvlib.DeviceSchemaTest.getReplacedStream ( replacements ) ; java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; assertFalse ( "Validation Assertion Failed, XML failed to validate when it was expected to pass\n" , com.android.dvlib.DeviceSchema.validate ( xmlStream , baos , null ) ) ; assertTrue ( java.lang.String.format ( "Regex Assertion Failed:\nExpected: %s\nActual: %s\n" , regex , baos.toString ( ) . trim ( ) ) , baos.toString ( ) . trim ( ) . matches ( regex ) ) ; }

Target:
private void checkFailure ( java.util.Map < java.lang.String , java.lang.String > replacements , java.lang.String regex ) throws java.lang.Exception { java.io.InputStream xmlStream = com.android.dvlib.DeviceSchemaTest.getReplacedStream ( replacements ) ; java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; assertFalse ( "Validation Assertion Failed, XML failed to validate when it was expected to pass\n" , com.android.dvlib.DeviceSchema.validate ( xmlStream , baos , null ) ) ; java.lang.String actual = baos.toString ( ) . trim ( ) ; actual = actual.replace ( "\r\n" , "\n" ) ; assertTrue ( java.lang.String.format ( "Regex Assertion Failed:\nExpected: %s\nActual: %s\n" , regex , actual ) , actual.matches ( regex ) ) ; }
Source:
public void testSubscribeCancel ( ) throws org.json.JSONException { final short transactionId = 12 ; final int subscribeId = 15 ; mDut.stopSubscribe ( transactionId , subscribeId ) ; org.mockito.Mockito.verify ( mNanHalMock ) . subscribeCancelHalMockNative ( org.mockito.Matchers.eq ( transactionId ) , mArgs.capture ( ) ) ; android.os.Bundle argsData = com.android.server.wifi.HalMockUtils.convertJsonToBundle ( mArgs.getValue ( ) ) ; collector.checkThat ( "subscribe_id" , argsData.getInt ( "subscribe_id" ) , org.hamcrest.core.IsEqual.equalTo ( subscribeId ) ) ; }

Target:
public void testSubscribeCancel ( ) throws org.json.JSONException { final short transactionId = 12 ; final int subscribeId = 15 ; mDut.stopSubscribe ( transactionId , subscribeId ) ; org.mockito.Mockito.verify ( mAwareHalMock ) . subscribeCancelHalMockNative ( org.mockito.Matchers.eq ( transactionId ) , mArgs.capture ( ) ) ; android.os.Bundle argsData = com.android.server.wifi.HalMockUtils.convertJsonToBundle ( mArgs.getValue ( ) ) ; collector.checkThat ( "subscribe_id" , argsData.getInt ( "subscribe_id" ) , org.hamcrest.core.IsEqual.equalTo ( subscribeId ) ) ; }
Source:
public java.nio.ByteBuffer put ( byte value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ( position ) == ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeByte ( ( ( offset ) + ( ( position ) ++ ) ) , value ) ; return this ; }

Target:
public java.nio.ByteBuffer put ( byte value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ( position ) == ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeByte ( ( ( offset ) + ( ( position ) ++ ) ) , value ) ; return this ; }
Source:
private static java.util.List < com.android.ide.eclipse.gltrace.state.transforms.IStateTransform > transformsForGlBindTexture ( com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg ) { com.android.ide.eclipse.gldebugger.GLEnum target = com.android.ide.eclipse.gldebugger.GLEnum.valueOf ( msg.getArgs ( 0 ) . getIntValue ( 0 ) ) ; java.lang.Integer texture = java.lang.Integer.valueOf ( msg.getArgs ( 1 ) . getIntValue ( 0 ) ) ; com.android.ide.eclipse.gltrace.state.transforms.IStateTransform transform = new com.android.ide.eclipse.gltrace.state.transforms.PropertyChangeTransform ( new com.android.ide.eclipse.gltrace.state.transforms.TextureUnitPropertyAccessor ( msg.getContextId ( ) , com.android.ide.eclipse.gltrace.state.transforms.StateTransformFactory.getTextureUnitTargetName ( target ) ) , texture ) ; return java.util.Collections.singletonList ( transform ) ; }

Target:
private static java.util.List < com.android.ide.eclipse.gltrace.state.transforms.IStateTransform > transformsForGlBindTexture ( com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg ) { com.android.ide.eclipse.gltrace.GLEnum target = com.android.ide.eclipse.gltrace.GLEnum.valueOf ( msg.getArgs ( 0 ) . getIntValue ( 0 ) ) ; java.lang.Integer texture = java.lang.Integer.valueOf ( msg.getArgs ( 1 ) . getIntValue ( 0 ) ) ; com.android.ide.eclipse.gltrace.state.transforms.IStateTransform transform = new com.android.ide.eclipse.gltrace.state.transforms.PropertyChangeTransform ( new com.android.ide.eclipse.gltrace.state.transforms.TextureUnitPropertyAccessor ( msg.getContextId ( ) , com.android.ide.eclipse.gltrace.state.transforms.StateTransformFactory.getTextureUnitTargetName ( target ) ) , texture ) ; return java.util.Collections.singletonList ( transform ) ; }
Source:
public static void test_Long_reverseBytes ( ) { junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( 0L ) , 0L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( - 1L ) , - 1L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( - 9223372036854775808L ) , 128L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( 128L ) , - 9223372036854775808L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( 81985529216486895L ) , - 1167088121787636991L ) ; }

Target:
public static void test_Long_reverseBytes ( ) { java.lang.Long.reverseBytes ( 1393753992385309920L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( 0L ) , 0L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( - 1L ) , - 1L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( - 9223372036854775808L ) , 128L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( 128L ) , - 9223372036854775808L ) ; junit.framework.Assert.assertEquals ( java.lang.Long.reverseBytes ( 81985529216486895L ) , - 1167088121787636991L ) ; }
Source:
public boolean hasNext ( java.util.regex.Pattern pattern ) { checkOpen ( ) ; checkNotNull ( pattern ) ; matchSuccessful = false ; saveCurrentStatus ( ) ; if ( ! ( setTokenRegion ( ) ) ) { recoverPreviousStatus ( ) ; return false ; } matcher.usePattern ( pattern ) ; boolean hasNext = false ; if ( matcher.matches ( ) ) { cachedNextIndex = findStartIndex ; matchSuccessful = true ; hasNext = true ; } recoverPreviousStatus ( ) ; return hasNext ; }

Target:
public boolean hasNext ( java.util.regex.Pattern pattern ) { checkOpen ( ) ; checkNotNull ( pattern ) ; matchSuccessful = false ; prepareForScan ( ) ; if ( ! ( setTokenRegion ( ) ) ) { recoverPreviousStatus ( ) ; return false ; } matcher.usePattern ( pattern ) ; boolean hasNext = false ; if ( matcher.matches ( ) ) { cachedNextIndex = findStartIndex ; matchSuccessful = true ; hasNext = true ; } recoverPreviousStatus ( ) ; return hasNext ; }
Source:
private void updateRoamingState ( boolean newRoaming ) { if ( ( mCT.getState ( ) ) == ( PhoneConstants.State.IDLE ) ) { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "updateRoamingState now: " + newRoaming ) ) ; mRoaming = newRoaming ; com.android.ims.ImsManager.setWfcMode ( mContext , com.android.ims.ImsManager.getWfcMode ( mContext , newRoaming ) , newRoaming ) ; } else { if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( "updateRoamingState postponed: " + newRoaming ) ) ; mCT.registerForVoiceCallEnded ( this , com.android.internal.telephony.imsphone.ImsPhone.EVENT_VOICE_CALL_ENDED , null ) ; } }

Target:
private void logv ( java.lang.String s ) { android.telephony.Rlog.v ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( ( ( "[" + ( mPhoneId ) ) + "] " ) + s ) ) ; }
Source:
public void dispose ( ) { final com.intellij.execution.console.EditorFactory editorFactory = com.intellij.execution.console.EditorFactory.getInstance ( ) ; editorFactory.releaseEditor ( myConsoleEditor ) ; editorFactory.releaseEditor ( myHistoryViewer ) ; final com.intellij.execution.console.FileEditorManager editorManager = com.intellij.execution.console.FileEditorManager.getInstance ( getProject ( ) ) ; if ( editorManager.isFileOpen ( myVirtualFile ) ) { editorManager.closeFile ( myVirtualFile ) ; } }

Target:
public void dispose ( ) { com.intellij.execution.console.EditorFactory editorFactory = com.intellij.execution.console.EditorFactory.getInstance ( ) ; editorFactory.releaseEditor ( myConsoleEditor ) ; editorFactory.releaseEditor ( myHistoryViewer ) ; if ( getProject ( ) . isOpen ( ) ) { com.intellij.execution.console.FileEditorManager editorManager = com.intellij.execution.console.FileEditorManager.getInstance ( getProject ( ) ) ; if ( editorManager.isFileOpen ( myVirtualFile ) ) { editorManager.closeFile ( myVirtualFile ) ; } } }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient" + ( mRemoteDevice ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getClient(): not allowed for non-active user" ) ; return null ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mState ) == ( android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ) ) { return null ; } return mRemoteDevice ; }

Target:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; return service.getState ( ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_noroot s = new com.android.rs.test.ScriptC_noroot ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_foo ( A , A ) ; s.invoke_verify_foo ( ) ; s.invoke_noroot_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_noroot s = new com.android.rs.test.ScriptC_noroot ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_foo ( A , A ) ; s.invoke_verify_foo ( ) ; s.invoke_noroot_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; A.getType ( ) . destroy ( ) ; A.destroy ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public void dumpDoesNotClearPendingConnectionTrace ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; getDumpString ( ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect" ) ) ; }

Target:
public void dumpDoesNotClearLastFailureData ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; getDumpString ( ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect" ) ) ; }
Source:
public static void computeModf ( android.renderscript.cts.TestModf.ArgumentsFloatFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; float ret = ( ( float ) ( ( int ) ( args.inX ) ) ) ; args.outIret = t.new32 ( ret ) ; args.out = t.new32 ( ( ( args.inX ) - ret ) ) ; }

Target:
public static void computeModf ( android.renderscript.cts.TestModf.ArgumentsFloatFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 0 , 0 , false ) ; float ret = ( ( float ) ( ( int ) ( args.inV ) ) ) ; args.outIntegralPart = t.new32 ( ret ) ; args.out = t.new32 ( ( ( args.inV ) - ret ) ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { }

Target:
public android.net.Uri getPlaybackUri ( ) throws android.telephony.mbms.MbmsException { try { return mService.getPlaybackUri ( mAppName , mSubscriptionId , mServiceInfo.getServiceId ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.telephony.mbms.StreamingService.LOG_TAG , ( "Caught remote exception calling getPlaybackUri: " + e ) ) ; throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_UNKNOWN_REMOTE_EXCEPTION ) ; } }
Source:
protected void collectExistingIds ( com.android.ide.common.api.INode root , java.util.Set < java.lang.String > existingIdSet ) { if ( root == null ) { return ; } java.lang.String id = root.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; if ( id != null ) { id = normalizeId ( id ) ; if ( ! ( existingIdSet.contains ( id ) ) ) { existingIdSet.add ( id ) ; } } for ( com.android.ide.common.api.INode child : root.getChildren ( ) ) { collectExistingIds ( child , existingIdSet ) ; } }

Target:
protected static void collectExistingIds ( com.android.ide.common.api.INode root , java.util.Set < java.lang.String > existingIdSet ) { if ( root == null ) { return ; } java.lang.String id = root.getStringAttr ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; if ( id != null ) { id = com.android.ide.common.layout.BaseLayoutRule.normalizeId ( id ) ; if ( ! ( existingIdSet.contains ( id ) ) ) { existingIdSet.add ( id ) ; } } for ( com.android.ide.common.api.INode child : root.getChildren ( ) ) { com.android.ide.common.layout.BaseLayoutRule.collectExistingIds ( child , existingIdSet ) ; } }
Source:
protected void configureShell ( org.eclipse.swt.widgets.Shell shell ) { super . configureShell ( shell ) ; shell.setText ( "Hierarchy Viewer" ) ; com.android.ddmuilib.ImageLoader imageLoader = com.android.ddmuilib.ImageLoader.getLoader ( com.android.hierarchyviewerlib.HierarchyViewerDirector.class ) ; org.eclipse.swt.graphics.Image image = imageLoader.loadImage ( "load-view-hierarchy.png" , org.eclipse.swt.widgets.Display.getDefault ( ) ) ; shell.setImage ( image ) ; }

Target:
protected void configureShell ( org.eclipse.swt.widgets.Shell shell ) { super . configureShell ( shell ) ; shell.setText ( "Hierarchy Viewer" ) ; com.android.ddmuilib.ImageLoader imageLoader = com.android.ddmuilib.ImageLoader.getLoader ( com.android.hierarchyviewerlib.HierarchyViewerDirector.class ) ; org.eclipse.swt.graphics.Image image = imageLoader.loadImage ( "sdk-hierarchyviewer-128.png" , org.eclipse.swt.widgets.Display.getDefault ( ) ) ; shell.setImage ( image ) ; }
Source:
private void setDefaultDialerFailureTestHelper ( ) throws java.lang.Exception { boolean exceptionThrown = false ; try { mTSIBinder.setDefaultDialer ( com.android.server.telecom.tests.TelecomServiceImplTest.DEFAULT_DIALER_PACKAGE ) ; } catch ( java.lang.SecurityException e ) { exceptionThrown = true ; } assertTrue ( exceptionThrown ) ; org.mockito.Mockito.verify ( mDefaultDialerCache , org.mockito.Mockito.never ( ) ) . setDefaultDialer ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.never ( ) ) . sendBroadcastAsUser ( org.mockito.Matchers.any ( android.content.Intent.class ) , org.mockito.Matchers.any ( android.os.UserHandle.class ) ) ; }

Target:
private void setDefaultDialerFailureTestHelper ( ) throws java.lang.Exception { boolean exceptionThrown = false ; try { mTSIBinder.setDefaultDialer ( com.android.server.telecom.tests.TelecomServiceImplTest.DEFAULT_DIALER_PACKAGE ) ; } catch ( java.lang.SecurityException e ) { exceptionThrown = true ; } org.junit.Assert.assertTrue ( exceptionThrown ) ; org.mockito.Mockito.verify ( mDefaultDialerCache , org.mockito.Mockito.never ( ) ) . setDefaultDialer ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.never ( ) ) . sendBroadcastAsUser ( org.mockito.Matchers.any ( android.content.Intent.class ) , org.mockito.Matchers.any ( android.os.UserHandle.class ) ) ; }
Source:
public void setHorizontalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHorizontalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setHorizontalScrollbarOverlay ( overlay ) ; }

Target:
public java.lang.ClassLoader getClassLoader ( ) { final java.lang.ClassLoader appCl = getBaseContext ( ) . getClassLoader ( ) ; final java.lang.ClassLoader webViewCl = this . getClass ( ) . getClassLoader ( ) ; return new java.lang.ClassLoader ( ) { @ java.lang.Override protected java.lang.Class < ? > findClass ( java.lang.String name ) throws java.lang.ClassNotFoundException { try { return webViewCl.loadClass ( name ) ; } catch ( java.lang.ClassNotFoundException e ) { return appCl.loadClass ( name ) ; } } } ; }
Source:
private java.lang.String getReportName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; BRANCH ( NaN ) ; com.android.cts.verifier.b Add ; com.android.cts.verifier.style files ; com.android.cts.verifier.CtsVerifier reports ; com.android.cts.verifier.Add util ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return ( ( ( ( ( ( ( ( ( "ctsVerifierReport" + "-" ) + date ) + "-" ) + ( android.os.Build.MANUFACTURER ) ) + "-" ) + ( android.os.Build.PRODUCT ) ) + "-" ) + ( android.os.Build.DEVICE ) ) + "-" ) + ( android.os.Build.ID ) ; }

Target:
private java.lang.String getReportBaseName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd-HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return ( ( ( ( ( ( ( ( ( "ctsVerifierReport" + "-" ) + date ) + "-" ) + ( android.os.Build.MANUFACTURER ) ) + "-" ) + ( android.os.Build.PRODUCT ) ) + "-" ) + ( android.os.Build.DEVICE ) ) + "-" ) + ( android.os.Build.ID ) ; }
Source:
public void test002c ( ) throws java.lang.Exception { java.io.File jackOutput = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; runTest002 ( jackOutput , false , "keep-first" ) ; checkResourceContent ( jackOutput , com.android.jack.fileconflict.FileConflictTests.RESOURCE1_LONGPATH , "Res1" ) ; checkResourceContent ( jackOutput , com.android.jack.fileconflict.FileConflictTests.RESOURCE2_LONGPATH , "Res2" ) ; checkResourceContent ( jackOutput , com.android.jack.fileconflict.FileConflictTests.RESOURCE3_LONGPATH , "Res3" ) ; }

Target:
public void test002c ( ) throws java.lang.Exception { java.io.File jackOutput ; java.io.ByteArrayOutputStream errOut = new java.io.ByteArrayOutputStream ( ) ; jackOutput = runTest002 ( false , "keep-first" , errOut , false , false ) ; checkResourceContent ( jackOutput , com.android.jack.fileconflict.FileConflictTests.RESOURCE1_LONGPATH , "Res1" ) ; checkResourceContent ( jackOutput , com.android.jack.fileconflict.FileConflictTests.RESOURCE2_LONGPATH , "Res2" ) ; checkResourceContent ( jackOutput , com.android.jack.fileconflict.FileConflictTests.RESOURCE3_LONGPATH , "Res3" ) ; junit.framework.Assert.assertTrue ( errOut.toString ( ) . isEmpty ( ) ) ; }
Source:
public static void warmupSharedPrefs ( android.app.Application application ) { if ( android.support.v4.os.UserManagerCompat.isUserUnlocked ( application ) ) { android.preference.PreferenceManager.getDefaultSharedPreferences ( application ) ; application.getSharedPreferences ( application.getPackageName ( ) , Context.MODE_PRIVATE ) ; } com.android.dialer.util.DialerUtils.getDefaultSharedPreferenceForDeviceProtectedStorageContext ( application ) ; }

Target:
public static void warmupSharedPrefs ( android.app.Application application ) { if ( android.support.v4.os.UserManagerCompat.isUserUnlocked ( application ) ) { android.preference.PreferenceManager.getDefaultSharedPreferences ( application ) ; application.getSharedPreferences ( application.getPackageName ( ) , Context.MODE_PRIVATE ) ; } com.android.dialer.storage.StorageComponent.get ( application ) . unencryptedSharedPrefs ( ) ; }
Source:
public static boolean isSymlink ( java.io.File file ) throws java.io.IOException { return ! ( file.getCanonicalPath ( ) . equals ( libcore.tzdata.update.FileUtils.canonicalizeDirPath ( file ) . getPath ( ) ) ) ; }

Target:
public static boolean isSymlink ( java.io.File file ) throws java.io.IOException { java.lang.String baseName = file.getName ( ) ; java.lang.String canonicalPathExceptBaseName = new java.io.File ( file.getParentFile ( ) . getCanonicalFile ( ) , baseName ) . getPath ( ) ; return ! ( file.getCanonicalPath ( ) . equals ( canonicalPathExceptBaseName ) ) ; }
Source:
public java.lang.String getAdbLocation ( ) { java.lang.String hvParentLocation = java.lang.System.getProperty ( "com.android.hierarchyviewer.bindir" ) ; if ( ( hvParentLocation != null ) && ( ( hvParentLocation.length ( ) ) != 0 ) ) { return ( hvParentLocation + ( java.io.File.separator ) ) + ( com.android.sdklib.SdkConstants.FN_ADB ) ; } return com.android.sdklib.SdkConstants.FN_ADB ; }

Target:
public java.lang.String getAdbLocation ( ) { java.lang.String hvParentLocation = java.lang.System.getProperty ( "com.android.hierarchyviewer.bindir" ) ; hvParentLocation = "/usr/local/google/android-ext/out/host/linux-x86/bin" ; java.lang.System.out.println ( hvParentLocation ) ; if ( ( hvParentLocation != null ) && ( ( hvParentLocation.length ( ) ) != 0 ) ) { return ( hvParentLocation + ( java.io.File.separator ) ) + ( com.android.sdklib.SdkConstants.FN_ADB ) ; } return com.android.sdklib.SdkConstants.FN_ADB ; }
Source:
public void sendInvalidCommand ( ) throws java.lang.Exception { startServiceAndLoadDriver ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; android.os.Handler handler = mock ( android.os.Handler.class ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( handler ) ; org.mockito.InOrder order = inOrder ( handler , mWifiScannerImpl ) ; controlChannel.sendMessage ( android.os.Message.obtain ( null , Protocol.BASE_WIFI_MANAGER ) ) ; mLooper.dispatchAll ( ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.verifyFailedResponse ( order , handler , 0 , WifiScanner.REASON_INVALID_REQUEST , "Invalid request" ) ; }

Target:
public void sendInvalidCommand ( ) throws java.lang.Exception { startServiceAndLoadDriver ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; android.os.Handler handler = org.mockito.Mockito.mock ( android.os.Handler.class ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( handler ) ; org.mockito.InOrder order = org.mockito.Mockito.inOrder ( handler , mWifiScannerImpl ) ; controlChannel.sendMessage ( android.os.Message.obtain ( null , Protocol.BASE_WIFI_MANAGER ) ) ; mLooper.dispatchAll ( ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.verifyFailedResponse ( order , handler , 0 , WifiScanner.REASON_INVALID_REQUEST , "Invalid request" ) ; }
Source:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.BlockingQueue < android.content.Intent > queue ) { try { android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }

Target:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.LinkedBlockingQueue < android.content.Intent > queue ) { try { org.junit.Assert.assertNotNull ( queue ) ; android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GSMPhone phone , com.android.internal.telephony.uicc.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.message = ussdMessage ; ret.isUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.isPendingUSSD = true ; ret.state = State.PENDING ; } else { ret.state = State.COMPLETE ; } return ret ; }

Target:
static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GSMPhone phone , com.android.internal.telephony.uicc.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.mMessage = ussdMessage ; ret.mIsUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.mIsPendingUSSD = true ; ret.mState = State.PENDING ; } else { ret.mState = State.COMPLETE ; } return ret ; }
Source:
public void testIterator ( boolean fair ) { final java.util.concurrent.SynchronousQueue q = new java.util.concurrent.SynchronousQueue ( fair ) ; java.util.Iterator it = q.iterator ( ) ; assertFalse ( it.hasNext ( ) ) ; try { java.lang.Object x = it.next ( ) ; shouldThrow ( ) ; } catch ( java.util.NoSuchElementException success ) { } }

Target:
public void testIterator ( boolean fair ) { assertIteratorExhausted ( new java.util.concurrent.SynchronousQueue ( fair ) . iterator ( ) ) ; }
Source:
private static com.android.dialer.glidephotomanager.PhotoInfo createPhotoInfoFromRow ( com.android.dialer.calllog.model.CoalescedRow row ) { com.android.dialer.glidephotomanager.PhotoInfo.Builder photoInfoBuilder = com.android.dialer.calllogutils.NumberAttributesConverter.toPhotoInfoBuilder ( row.numberAttributes ( ) ) . setIsVideo ( ( ( ( row.features ( ) ) & ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) == ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) ) ; if ( ! ( android.text.TextUtils.isEmpty ( row.formattedNumber ( ) ) ) ) { photoInfoBuilder.setFormattedNumber ( row.formattedNumber ( ) ) ; } return photoInfoBuilder.build ( ) ; }

Target:
private static com.android.dialer.glidephotomanager.PhotoInfo createPhotoInfoFromRow ( com.android.dialer.calllog.model.CoalescedRow row ) { com.android.dialer.glidephotomanager.PhotoInfo.Builder photoInfoBuilder = com.android.dialer.calllogutils.NumberAttributesConverter.toPhotoInfoBuilder ( row.numberAttributes ( ) ) . setIsVideo ( ( ( ( row.features ( ) ) & ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) == ( android.provider.CallLog.Calls.FEATURES_VIDEO ) ) ) . setIsVoicemail ( row.isVoicemailCall ( ) ) ; if ( ! ( android.text.TextUtils.isEmpty ( row.formattedNumber ( ) ) ) ) { photoInfoBuilder.setFormattedNumber ( row.formattedNumber ( ) ) ; } return photoInfoBuilder.build ( ) ; }
Source:
public static int computeSampleSizeLarger ( float scale ) { int initialSize = ( ( int ) ( android.util.FloatMath.floor ( ( 1.0F / scale ) ) ) ) ; if ( initialSize <= 1 ) return 1 ; return initialSize <= 8 ? com.android.gallery3d.common.Utils.prevPowerOf2 ( initialSize ) : ( initialSize / 8 ) * 8 ; }

Target:
public static int computeSampleSizeLarger ( float scale ) { int initialSize = ( ( int ) ( java.lang.Math.floor ( ( 1 / scale ) ) ) ) ; if ( initialSize <= 1 ) return 1 ; return initialSize <= 8 ? com.android.gallery3d.common.Utils.prevPowerOf2 ( initialSize ) : ( initialSize / 8 ) * 8 ; }