auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private int getApiLevel ( ) { if ( ( mApiLevel ) > 0 ) { return mApiLevel ; } try { mApiLevel = java.lang.Integer.parseInt ( getPropertyCacheOrSync ( com.android.ddmlib.PROP_BUILD_API_LEVEL ) ) ; return mApiLevel ; } catch ( java.lang.Exception e ) { return - 1 ; } }

Target:
private int getApiLevel ( ) { if ( ( mApiLevel ) > 0 ) { return mApiLevel ; } try { mApiLevel = java.lang.Integer.parseInt ( getSystemProperty ( com.android.ddmlib.PROP_BUILD_API_LEVEL ) . get ( ) ) ; return mApiLevel ; } catch ( java.lang.Exception e ) { return - 1 ; } }
Source:
com.android.bluetooth.gatt.AdvtFilterOnFoundOnLostInfo CreateonTrackAdvFoundLostObject ( int clientIf , int advPktLen , byte [ ] advPkt , int scanRspLen , byte [ ] scanRsp , int filtIndex , int advState , int advInfoPresent , java.lang.String address , int addrType , int txPower , int rssiValue , int timeStamp ) { return new com.android.bluetooth.gatt.AdvtFilterOnFoundOnLostInfo ( clientIf , advPktLen , advPkt , scanRspLen , scanRsp , filtIndex , advState , advInfoPresent , address , addrType , txPower , rssiValue , timeStamp ) ; }

Target:
com.android.bluetooth.gatt.AdvtFilterOnFoundOnLostInfo createOnTrackAdvFoundLostObject ( int clientIf , int advPktLen , byte [ ] advPkt , int scanRspLen , byte [ ] scanRsp , int filtIndex , int advState , int advInfoPresent , java.lang.String address , int addrType , int txPower , int rssiValue , int timeStamp ) { return new com.android.bluetooth.gatt.AdvtFilterOnFoundOnLostInfo ( clientIf , advPktLen , advPkt , scanRspLen , scanRsp , filtIndex , advState , advInfoPresent , address , addrType , txPower , rssiValue , timeStamp ) ; }
Source:
private boolean waitForState ( java.lang.String state ) { java.lang.String value = null ; for ( int i = 0 ; i < 20 ; i ++ ) { value = android.os.SystemProperties.get ( com.android.server.usb.UsbDeviceManager.USB_STATE_PROPERTY ) ; if ( state.equals ( value ) ) return true ; android.os.SystemClock.sleep ( 50 ) ; } android.util.Slog.e ( com.android.server.usb.UsbDeviceManager.TAG , ( ( ( "waitForState(" + state ) + ") FAILED: got " ) + value ) ) ; return false ; }

Target:
private boolean waitForState ( java.lang.String state ) { java.lang.String value = null ; for ( int i = 0 ; i < 20 ; i ++ ) { value = android.os.SystemProperties.get ( com.android.server.usb.UsbDeviceManager.UsbHandlerLegacy.USB_STATE_PROPERTY ) ; if ( state.equals ( value ) ) return true ; android.os.SystemClock.sleep ( 50 ) ; } android.util.Slog.e ( com.android.server.usb.UsbDeviceManager.TAG , ( ( ( "waitForState(" + state ) + ") FAILED: got " ) + value ) ) ; return false ; }
Source:
public void showInputMethodAndSubtypeEnabler ( java.lang.String imiId ) { synchronized ( mH ) { try { mService.showInputMethodAndSubtypeEnablerFromClient ( mClient , imiId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.view.inputmethod.InputMethodManager.TAG , ( "IME died: " + ( mCurId ) ) , e ) ; } } }

Target:
public void showInputMethodAndSubtypeEnabler ( java.lang.String imiId ) { synchronized ( mH ) { try { mService.showInputMethodAndSubtypeEnablerFromClient ( mClient , imiId ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public boolean addGpsStatusListener ( android.location.IGpsStatusListener listener ) { if ( ( mGpsStatusProvider ) == null ) { return false ; } if ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { throw new java.lang.SecurityException ( "Requires ACCESS_FINE_LOCATION permission" ) ; } try { mGpsStatusProvider.addGpsStatusListener ( listener ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "mGpsStatusProvider.addGpsStatusListener failed" , e ) ; return false ; } return true ; }

Target:
public boolean addGpsStatusListener ( android.location.IGpsStatusListener listener ) { if ( ( mGpsStatusProvider ) == null ) { return false ; } checkResolutionLevelIsSufficientForProviderUse ( getCallerAllowedResolutionLevel ( ) , LocationManager.GPS_PROVIDER ) ; try { mGpsStatusProvider.addGpsStatusListener ( listener ) ; } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "mGpsStatusProvider.addGpsStatusListener failed" , e ) ; return false ; } return true ; }
Source:
public void testFindByText ( ) throws java.lang.Exception { java.util.List < android.view.accessibility.AccessibilityNodeInfo > buttons = getInstrumentation ( ) . getUiAutomation ( ) . getRootInActiveWindow ( ) . findAccessibilityNodeInfosByText ( "b" ) ; assertEquals ( 9 , buttons.size ( ) ) ; }

Target:
public void testFindByText ( ) throws java.lang.Throwable { runTestOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { getActivity ( ) . findViewById ( R.id.added_content ) . setImportantForAccessibility ( View.IMPORTANT_FOR_ACCESSIBILITY_YES ) ; } } ) ; final android.view.accessibility.AccessibilityNodeInfo addedContent = getInstrumentation ( ) . getUiAutomation ( ) . getRootInActiveWindow ( ) . findAccessibilityNodeInfosByViewId ( android.accessibilityservice.cts.AccessibilityWindowQueryTest.CONTENT_VIEW_RES_NAME ) . get ( 0 ) ; java.util.List < android.view.accessibility.AccessibilityNodeInfo > buttons = addedContent.findAccessibilityNodeInfosByText ( "b" ) ; assertEquals ( 9 , buttons.size ( ) ) ; }
Source:
public void run ( ) { for ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction a2 : actionsMap.get ( action.getId ( ) ) ) { if ( a2 instanceof com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) { groovy.lang.Closure c = ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getAction ( ) ; if ( c != null ) { gre.callClosure ( ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getAction ( ) , action , null , ( ! isChecked ) ) ; } } } }

Target:
public void run ( ) { for ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction a2 : actions ) { if ( a2 instanceof com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) { groovy.lang.Closure c = ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getClosure ( ) ; if ( c != null ) { gre.callClosure ( ( ( com.android.ide.eclipse.adt.editors.layout.gscripts.MenuAction.Action ) ( a2 ) ) . getClosure ( ) , a2 , null , ( ! isChecked ) ) ; } } } }
Source:
private org.w3c.dom.Node findNode ( org.w3c.dom.Node node , java.lang.String nodeName ) { if ( node.getNodeName ( ) . equals ( nodeName ) ) { return node ; } org.w3c.dom.NodeList children = node.getChildNodes ( ) ; for ( int i = 0 , n = children.getLength ( ) ; i < n ; i ++ ) { org.w3c.dom.Node child = children.item ( i ) ; org.w3c.dom.Node result = findNode ( child , nodeName ) ; if ( result != null ) { return result ; } } return null ; }

Target:
private static org.w3c.dom.Node findNode ( org.w3c.dom.Node node , java.lang.String nodeName ) { if ( node.getNodeName ( ) . equals ( nodeName ) ) { return node ; } org.w3c.dom.NodeList children = node.getChildNodes ( ) ; for ( int i = 0 , n = children.getLength ( ) ; i < n ; i ++ ) { org.w3c.dom.Node child = children.item ( i ) ; org.w3c.dom.Node result = com.android.ide.common.xml.XmlPrettyPrinterTest.findNode ( child , nodeName ) ; if ( result != null ) { return result ; } } return null ; }
Source:
public com.android.jack.ir.ast.JAnnotationLiteral exportAsJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ExportSession exportSession ) throws com.android.jack.ir.ast.JTypeLookupException , com.android.jack.lookup.JMethodLookupException { assert ( retentionPolicy ) != null ; assert ( sourceInfo ) != null ; assert ( annotationType ) != null ; com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JAnnotationType type = exportSession.getLookup ( ) . getAnnotationType ( annotationType ) ; com.android.jack.ir.ast.JAnnotationLiteral jAnnotationLiteral = new com.android.jack.ir.ast.JAnnotationLiteral ( jSourceInfo , retentionPolicy , type ) ; for ( com.android.jack.jayce.v0002.nodes.NNameValuePair valuePair : elements ) { jAnnotationLiteral.put ( valuePair.exportAsJast ( exportSession ) ) ; } return jAnnotationLiteral ; }

Target:
public com.android.jack.ir.ast.JAnnotation exportAsJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.ExportSession exportSession ) throws com.android.jack.ir.ast.JTypeLookupException , com.android.jack.lookup.JMethodLookupException { assert ( retentionPolicy ) != null ; assert ( sourceInfo ) != null ; assert ( annotationType ) != null ; com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JAnnotationType type = exportSession.getLookup ( ) . getAnnotationType ( annotationType ) ; com.android.jack.ir.ast.JAnnotation jAnnotation = new com.android.jack.ir.ast.JAnnotation ( jSourceInfo , retentionPolicy , type ) ; for ( com.android.jack.jayce.v0002.nodes.NNameValuePair valuePair : elements ) { jAnnotation.put ( valuePair.exportAsJast ( exportSession ) ) ; } return jAnnotation ; }
Source:
private static Tapper.Status sendSingleTap ( android.support.test.espresso.UiController uiController , float [ ] coordinates , float [ ] precision ) { android.support.test.espresso.action.MotionEvents.DownResultHolder res = android.support.test.espresso.action.MotionEvents.sendDown ( uiController , coordinates , precision ) ; try { if ( ! ( android.support.test.espresso.action.MotionEvents.sendUp ( uiController , res.down ) ) ) { android.support.test.espresso.action.MotionEvents.sendCancel ( uiController , res.down ) ; return Tapper.Status.FAILURE ; } } finally { res.down.recycle ( ) ; } return res.longPress ? Tapper.Status.WARNING : Tapper.Status.SUCCESS ; }

Target:
private static Tapper.Status sendSingleTap ( android.support.test.espresso.UiController uiController , float [ ] coordinates , float [ ] precision , int inputDevice , int buttonState ) { android.support.test.espresso.action.MotionEvents.DownResultHolder res = android.support.test.espresso.action.MotionEvents.sendDown ( uiController , coordinates , precision , inputDevice , buttonState ) ; try { if ( ! ( android.support.test.espresso.action.MotionEvents.sendUp ( uiController , res.down ) ) ) { android.support.test.espresso.action.MotionEvents.sendCancel ( uiController , res.down ) ; return Tapper.Status.FAILURE ; } } finally { res.down.recycle ( ) ; } return res.longPress ? Tapper.Status.WARNING : Tapper.Status.SUCCESS ; }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = getResourceRepository ( ) ; verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = getResourceRepository ( ) ; verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/android:colorForegroundInverse" , "attr/blah" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }
Source:
private static com.google.common.base.Optional < java.lang.Long > getRawContactId ( android.content.ContentResolver contentResolver , long dataId ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; try ( android.database.Cursor cursor = contentResolver.query ( android.content.ContentUris.withAppendedId ( Data.CONTENT_URI , dataId ) , new java.lang.String [ ] { android.provider.ContactsContract.Data.RAW_CONTACT_ID } , null , null , null ) ) { if ( ( cursor == null ) || ( ! ( cursor.moveToFirst ( ) ) ) ) { return com.google.common.base.Optional.absent ( ) ; } return com.google.common.base.Optional.of ( cursor.getLong ( 0 ) ) ; } }

Target:
public abstract com.android.dialer.preferredsim.PreferredAccountWorker.Result.Builder setDataId ( java.lang.String dataId ) ;
Source:
public < V > java.util.concurrent.ScheduledFuture < V > schedule ( java.util.concurrent.Callable < V > callable , long delay , java.util.concurrent.TimeUnit unit ) { return delegate.schedule ( callable , delay , unit ) ; }

Target:
public < V > com.google.common.util.concurrent.ListenableScheduledFuture < V > schedule ( java.util.concurrent.Callable < V > callable , long delay , java.util.concurrent.TimeUnit unit ) { com.google.common.util.concurrent.ListenableFutureTask < V > task = com.google.common.util.concurrent.ListenableFutureTask.create ( callable ) ; java.util.concurrent.ScheduledFuture < ? > scheduled = delegate.schedule ( task , delay , unit ) ; return new com.google.common.util.concurrent.MoreExecutors.ScheduledListeningDecorator.ListenableScheduledTask < V > ( task , scheduled ) ; }
Source:
private android.os.ParcelFileDescriptor openReadInternal ( java.lang.String name ) throws java.io.IOException { assertPreparedAndNotSealed ( "openRead" ) ; try { if ( ! ( android.os.FileUtils.isValidExtFilename ( name ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Invalid name: " + name ) ) ; } final java.io.File target = new java.io.File ( resolveStageDir ( ) , name ) ; final java.io.FileDescriptor targetFd = Libcore.os.open ( target.getAbsolutePath ( ) , android.system.OsConstants.O_RDONLY , 0 ) ; return new android.os.ParcelFileDescriptor ( targetFd ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }

Target:
private android.os.ParcelFileDescriptor openReadInternal ( java.lang.String name ) throws java.io.IOException { assertPreparedAndNotSealed ( "openRead" ) ; try { if ( ! ( android.os.FileUtils.isValidExtFilename ( name ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Invalid name: " + name ) ) ; } final java.io.File target = new java.io.File ( resolveStageDir ( ) , name ) ; final java.io.FileDescriptor targetFd = android.system.Os.open ( target.getAbsolutePath ( ) , android.system.OsConstants.O_RDONLY , 0 ) ; return new android.os.ParcelFileDescriptor ( targetFd ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }
Source:
public com.android.ide.common.rendering.api.ILayoutPullParser getParser ( java.lang.String layoutName ) { if ( ( mResourceResolver ) != null ) { com.android.ide.common.rendering.api.ResourceValue value = mResourceResolver.getProjectResource ( ResourceType.LAYOUT , layoutName ) ; if ( value != null ) { return getParser ( value ) ; } } return getParser ( layoutName , null ) ; }

Target:
public com.android.ide.common.rendering.api.ILayoutPullParser getParser ( java.lang.String layoutName ) { boolean token = com.android.ide.common.rendering.RenderSecurityManager.enterSafeRegion ( mCredential ) ; try { if ( ( mResourceResolver ) != null ) { com.android.ide.common.rendering.api.ResourceValue value = mResourceResolver.getProjectResource ( ResourceType.LAYOUT , layoutName ) ; if ( value != null ) { return getParser ( value ) ; } } return getParser ( layoutName , null ) ; } finally { com.android.ide.common.rendering.RenderSecurityManager.exitSafeRegion ( token ) ; } }
Source:
public static com.google.common.net.HostAndPort fromParts ( java.lang.String host , int port ) { com.google.common.base.Preconditions.checkArgument ( com.google.common.net.HostAndPort.isValidPort ( port ) ) ; com.google.common.net.HostAndPort parsedHost = com.google.common.net.HostAndPort.fromString ( host ) ; com.google.common.base.Preconditions.checkArgument ( ( ! ( parsedHost.hasPort ( ) ) ) ) ; return new com.google.common.net.HostAndPort ( parsedHost.host , port , parsedHost.hasBracketlessColons ) ; }

Target:
public static com.google.common.net.HostAndPort fromParts ( java.lang.String host , int port ) { com.google.common.base.Preconditions.checkArgument ( com.google.common.net.HostAndPort.isValidPort ( port ) , "Port out of range: %s" , port ) ; com.google.common.net.HostAndPort parsedHost = com.google.common.net.HostAndPort.fromString ( host ) ; com.google.common.base.Preconditions.checkArgument ( ( ! ( parsedHost.hasPort ( ) ) ) , "Host has a port: %s" , host ) ; return new com.google.common.net.HostAndPort ( parsedHost.host , port , parsedHost.hasBracketlessColons ) ; }
Source:
private static java.lang.String createGithubRepository ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.project.Project project , @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String name , @ org.jetbrains.annotations.NotNull java.lang.String description , boolean isPrivate ) { try { org.jetbrains.plugins.github.GithubRepo response = org.jetbrains.plugins.github.GithubApiUtil.createRepo ( auth , name , description , ( ! isPrivate ) ) ; return response.getHtmlUrl ( ) ; } catch ( java.io.IOException e ) { org.jetbrains.plugins.github.GithubNotifications.showError ( project , "Failed to create GitHub Repository" , e ) ; return null ; } }

Target:
private static java.lang.String createGithubRepository ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.project.Project project , @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String name , @ org.jetbrains.annotations.NotNull java.lang.String description , boolean isPrivate ) { try { org.jetbrains.plugins.github.GithubRepo response = org.jetbrains.plugins.github.GithubApiUtil.createRepo ( auth , name , description , ( ! isPrivate ) ) ; return response.getHtmlUrl ( ) ; } catch ( java.io.IOException e ) { org.jetbrains.plugins.github.util.GithubNotifications.showError ( project , "Failed to create GitHub Repository" , e ) ; return null ; } }
Source:
public static org.bouncycastle.crypto.params.DHPrivateKeyParameters generateEphemeralServerKeyExchange ( java.security.SecureRandom random , org.bouncycastle.crypto.params.DHParameters dhParams , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.AsymmetricCipherKeyPair kp = org.bouncycastle.crypto.tls.TlsDHUtils.generateDHKeyPair ( random , dhParams ) ; org.bouncycastle.crypto.params.DHPublicKeyParameters dhPublicKey = ( ( org.bouncycastle.crypto.params.DHPublicKeyParameters ) ( kp.getPublic ( ) ) ) ; org.bouncycastle.crypto.tls.ServerDHParams params = new org.bouncycastle.crypto.tls.ServerDHParams ( dhPublicKey ) ; params.encode ( output ) ; return ( ( org.bouncycastle.crypto.params.DHPrivateKeyParameters ) ( kp.getPrivate ( ) ) ) ; }

Target:
public static org.bouncycastle.crypto.params.DHPrivateKeyParameters generateEphemeralClientKeyExchange ( java.security.SecureRandom random , org.bouncycastle.crypto.params.DHParameters dhParams , java.io.OutputStream output ) throws java.io.IOException { org.bouncycastle.crypto.AsymmetricCipherKeyPair kp = org.bouncycastle.crypto.tls.TlsDHUtils.generateDHKeyPair ( random , dhParams ) ; org.bouncycastle.crypto.params.DHPublicKeyParameters dhPublic = ( ( org.bouncycastle.crypto.params.DHPublicKeyParameters ) ( kp.getPublic ( ) ) ) ; org.bouncycastle.crypto.tls.TlsDHUtils.writeDHParameter ( dhPublic.getY ( ) , output ) ; return ( ( org.bouncycastle.crypto.params.DHPrivateKeyParameters ) ( kp.getPrivate ( ) ) ) ; }
Source:
public void test_getByName ( ) throws java.lang.Exception { for ( java.lang.String invalid : libcore.java.net.InetAddressTest.INVALID_IPv4_NUMERIC_ADDRESSES ) { try { java.net.InetAddress.getByName ( invalid ) ; fail ( invalid ) ; } catch ( java.net.UnknownHostException expected ) { } } }

Target:
public void test_getByName_invalid ( java.lang.String invalid ) throws java.lang.Exception { try { java.net.InetAddress.getByName ( invalid ) ; org.junit.Assert.fail ( ( "Invalid IP address incorrectly recognized as valid: " + invalid ) ) ; } catch ( java.net.UnknownHostException expected ) { } try { java.net.InetAddress.getByName ( invalid ) ; org.junit.Assert.fail ( ( "Invalid IP address incorrectly recognized as valid: " + invalid ) ) ; } catch ( java.lang.Exception expected ) { } }
Source:
public void calculateAndReportScoreSucceeds ( ) throws java.lang.Exception { int aggressiveHandover = 0 ; mWifiInfo.setRssi ( ( - 77 ) ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , aggressiveHandover , mWifiMetrics ) ; org.mockito.Mockito.verify ( mNetworkAgent ) . sendNetworkScore ( org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mWifiMetrics ) . incrementWifiScoreCount ( org.mockito.Mockito.anyInt ( ) ) ; }

Target:
public void giveUpOnBadRssiAggressively ( ) throws java.lang.Exception { mAggr = 1 ; mWifiInfo.setRssi ( ( - 83 ) ) ; mWifiScoreReport.calculateAndReportScore ( mWifiInfo , mNetworkAgent , mAggr , mWifiMetrics ) ; int score = mWifiInfo.score ; org.mockito.Mockito.verify ( mNetworkAgent , org.mockito.Mockito.atLeast ( 1 ) ) . sendNetworkScore ( score ) ; org.junit.Assert.assertTrue ( ( score < ( com.android.server.wifi.WifiScoreReportTest.CELLULAR_THRESHOLD_SCORE ) ) ) ; }
Source:
public void callOnDropped ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.eclipse.adt.editors.layout.gscripts.IDragElement [ ] elements , com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback feedback , com.android.ide.eclipse.adt.editors.layout.gscripts.Point where ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onDropped ( targetNode , elements , feedback , where ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropped() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }

Target:
public void callOnDropped ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements , com.android.ide.common.api.DropFeedback feedback , com.android.ide.common.api.Point where ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { rule.onDropped ( targetNode , elements , feedback , where ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropped() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } }
Source:
private static void addTimeUnit ( android.icu.impl.ICUResourceBundle timeUnitBundle , android.icu.text.RelativeDateTimeFormatter.RelativeUnit relativeUnit , java.util.EnumMap < android.icu.text.RelativeDateTimeFormatter.RelativeUnit , android.icu.text.QuantityFormatter [ ] > quantitativeUnitMap ) { android.icu.text.QuantityFormatter future = new android.icu.text.QuantityFormatter ( ) ; android.icu.text.QuantityFormatter past = new android.icu.text.QuantityFormatter ( ) ; timeUnitBundle = timeUnitBundle.getWithFallback ( "relativeTime" ) ; android.icu.text.RelativeDateTimeFormatter.Loader.addTimeUnit ( timeUnitBundle.getWithFallback ( "future" ) , future ) ; android.icu.text.RelativeDateTimeFormatter.Loader.addTimeUnit ( timeUnitBundle.getWithFallback ( "past" ) , past ) ; quantitativeUnitMap.put ( relativeUnit , new android.icu.text.QuantityFormatter [ ] { past , future } ) ; }

Target:
public UResource.TableSink getOrCreateTableSink ( android.icu.impl.UResource.Key key , int initialSize ) { if ( key.contentEquals ( "past" ) ) { pastFutureIndex = 0 ; } else if ( key.contentEquals ( "future" ) ) { pastFutureIndex = 1 ; } else { return null ; } if ( ( unit.relUnit ) == null ) { return null ; } return relativeTimeDetailSink ; }
Source:
private void verifyMeasurements ( double ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.sensorTestOperations.VerifyMeasurementsOperation verifyMeasurements = new android.hardware.cts.helpers.sensorTestOperations.VerifyMeasurementsOperation ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , expectations , 1.95F ) ; verifyMeasurements.execute ( ) ; logSuccess ( ) ; }

Target:
private void verifyMeasurements ( float ... expectations ) throws java.lang.Throwable { java.lang.Thread.sleep ( 500 ) ; android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation verifyMeasurements = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( getApplicationContext ( ) , android.hardware.Sensor.TYPE_ACCELEROMETER , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyMeasurements.verifyMean ( expectations , new float [ ] { 1.95F , 1.95F , 1.95F } ) ; verifyMeasurements.execute ( ) ; logSuccess ( ) ; }
Source:
public com.android.sched.vfs.OutputVFile createOutputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) { assert ! ( path.equals ( VPath.ROOT ) ) ; java.lang.String newEntryName = path.getPathAsString ( ZipUtils.IN_ZIP_SEPARATOR ) ; java.lang.String parentEntryName = entry.getName ( ) ; if ( ! ( parentEntryName.isEmpty ( ) ) ) { newEntryName = ( parentEntryName + ( ZipUtils.IN_ZIP_SEPARATOR ) ) + newEntryName ; } return new com.android.sched.vfs.OutputZipVFile ( vfs , new java.util.zip.ZipEntry ( newEntryName ) ) ; }

Target:
public com.android.sched.vfs.OutputVFile createOutputVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) { assert ! ( path.equals ( VPath.ROOT ) ) ; java.lang.String newEntryName = path.getPathAsString ( ZipUtils.ZIP_SEPARATOR ) ; java.lang.String parentEntryName = entry.getName ( ) ; if ( ! ( parentEntryName.isEmpty ( ) ) ) { newEntryName = ( parentEntryName + ( ZipUtils.ZIP_SEPARATOR ) ) + newEntryName ; } return new com.android.sched.vfs.OutputZipVFile ( vfs , new java.util.zip.ZipEntry ( newEntryName ) ) ; }
Source:
public final short getANibble ( ) { int a = getA ( ) ; if ( ( a & ( ~ 15 ) ) != 0 ) { throw new com.android.jack.dx.util.DexException ( ( "Register A out of range: " + ( com.android.jack.dx.util.Hex.u8 ( a ) ) ) ) ; } return ( ( short ) ( a ) ) ; }

Target:
public final short getSecondIndexUnit ( ) { assert ( secondIndexType ) != ( com.android.jack.dx.io.IndexType.NONE ) ; return ( ( short ) ( secondIndex ) ) ; }
Source:
private static com.android.jack.dx.rop.annotation.AnnotationVisibility getVisibility ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JRetentionPolicy retentionPolicy ) throws com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException { switch ( retentionPolicy ) { case CLASS : return com.android.jack.dx.rop.annotation.AnnotationVisibility.BUILD ; case RUNTIME : return com.android.jack.dx.rop.annotation.AnnotationVisibility.RUNTIME ; case SOURCE : throw com.android.jack.backend.dex.AnnotationBuilder.sourceAnnotationException ; case SYSTEM : return com.android.jack.dx.rop.annotation.AnnotationVisibility.SYSTEM ; default : throw new java.lang.AssertionError ( ) ; } }

Target:
private com.android.jack.dx.rop.annotation.AnnotationVisibility getVisibility ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JRetentionPolicy retentionPolicy ) throws com.android.jack.backend.dex.AnnotationBuilder.BuildAnnotationException , com.android.jack.backend.dex.AnnotationBuilder.SourceAnnotationException { switch ( retentionPolicy ) { case SOURCE : throw com.android.jack.backend.dex.AnnotationBuilder.sourceAnnotationException ; case CLASS : if ( enableBuildRetention ) { return com.android.jack.dx.rop.annotation.AnnotationVisibility.BUILD ; } else { throw com.android.jack.backend.dex.AnnotationBuilder.buildAnnotationException ; } case RUNTIME : return com.android.jack.dx.rop.annotation.AnnotationVisibility.RUNTIME ; case SYSTEM : return com.android.jack.dx.rop.annotation.AnnotationVisibility.SYSTEM ; default : throw new java.lang.AssertionError ( ) ; } }
Source:
public void setVar ( int index , double v ) { mRS.nScriptSetVarD ( getID ( mRS ) , index , v ) ; }

Target:
protected void invoke ( int slot , android.support.v8.renderscript.FieldPacker v ) { if ( v != null ) { mRS.nScriptInvokeV ( getID ( mRS ) , slot , v.getData ( ) , mUseIncSupp ) ; } else { mRS.nScriptInvoke ( getID ( mRS ) , slot , mUseIncSupp ) ; } }
Source:
static void testIntervalHole ( int arg , boolean test ) { Main.moveArgToCalleeSave ( ) ; if ( test ) { Main.staticField1 = arg ; Main.doStaticNativeCallLiveVreg ( ) ; } else { Main.staticField2 = arg ; Main.doStaticNativeCallLiveVreg ( ) ; } }

Target:
static void $opt$noinline$testIntervalHole ( int arg , boolean test ) { Main.moveArgToCalleeSave ( ) ; if ( test ) { Main.staticField1 = arg ; Main.doStaticNativeCallLiveVreg ( ) ; } else { Main.staticField2 = arg ; Main.doStaticNativeCallLiveVreg ( ) ; } if ( ( Main.staticField1 ) == 2 ) { throw new java.lang.Error ( "" ) ; } }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi-v4/icon" , "drawable/icon2" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/xliff_with_carriage_return" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen-sw600dp-v13/offset" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesWithNormalizationByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( true ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi-v4/icon" , "drawable/icon2" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/xliff_with_carriage_return" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen-sw600dp-v13/offset" , "id/item_id" , "integer/integer" ) ; }
Source:
public static java.lang.String getClientKeyType ( byte clientCertificateType ) { switch ( clientCertificateType ) { case NativeCrypto.TLS_CT_RSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_RSA ; case NativeCrypto.TLS_CT_RSA_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_RSA ; case NativeCrypto.TLS_CT_ECDSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC ; case NativeCrypto.TLS_CT_RSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_RSA ; case NativeCrypto.TLS_CT_ECDSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_EC ; default : return null ; } }

Target:
public static java.lang.String getClientKeyType ( byte clientCertificateType ) { switch ( clientCertificateType ) { case NativeConstants.TLS_CT_RSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_RSA ; case NativeConstants.TLS_CT_RSA_FIXED_DH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_DH_RSA ; case NativeConstants.TLS_CT_ECDSA_SIGN : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC ; case NativeConstants.TLS_CT_RSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_RSA ; case NativeConstants.TLS_CT_ECDSA_FIXED_ECDH : return org.conscrypt.SSLParametersImpl.KEY_TYPE_EC_EC ; default : return null ; } }
Source:
public static long getVideoCallingGroupId ( android.content.Context context ) { android.content.SharedPreferences eabPref = context.getSharedPreferences ( com.android.service.ims.presence.SharedPrefUtil.EAB_SHARED_PREF , Context.MODE_PRIVATE ) ; return eabPref.getLong ( com.android.service.ims.presence.SharedPrefUtil.VIDEO_CALLING_GROUP_ID , 0L ) ; }

Target:
private static long validateDeviceTimestamp ( android.content.Context context , long lastSyncedTimestamp ) { long deviceCurrentTimeMillis = java.lang.System.currentTimeMillis ( ) ; if ( ( lastSyncedTimestamp != 0 ) && ( lastSyncedTimestamp > deviceCurrentTimeMillis ) ) { android.content.SharedPreferences.Editor eabPref = context.getSharedPreferences ( com.android.service.ims.presence.SharedPrefUtil.EAB_SHARED_PREF , Context.MODE_PRIVATE ) . edit ( ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.CONTACT_CHANGED_PREF_KEY , 0 ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.CONTACT_DELETE_PREF_KEY , 0 ) ; eabPref.putLong ( com.android.service.ims.presence.SharedPrefUtil.CONTACT_PROFILE_CHANGED_PREF_KEY , 0 ) ; eabPref.commit ( ) ; lastSyncedTimestamp = 0 ; } return lastSyncedTimestamp ; }
Source:
public void screenTurningOn ( final com.android.internal.policy.impl.ScreenOnListener screenOnListener ) { android.util.EventLog.writeEvent ( 70000 , 1 ) ; if ( false ) { java.lang.RuntimeException here = new java.lang.RuntimeException ( "here" ) ; here.fillInStackTrace ( ) ; android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "Screen turning on..." , here ) ; } synchronized ( mLock ) { mScreenOnEarly = true ; updateOrientationListenerLp ( ) ; updateLockScreenTimeout ( ) ; } waitForKeyguard ( screenOnListener ) ; }

Target:
public void screenTurnedOff ( ) { if ( com.android.internal.policy.impl.PhoneWindowManager.DEBUG_WAKEUP ) android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "Screen turned off..." ) ; synchronized ( mLock ) { mScreenOnEarly = false ; mScreenOnFully = false ; mWindowManagerDrawComplete = false ; mScreenOnListener = null ; updateOrientationListenerLp ( ) ; } }
Source:
private java.util.List < com.android.bluetooth.avrcp.MediaController > getActiveControllersList ( ) { java.util.List < com.android.bluetooth.avrcp.MediaController > controllersList = new java.util.ArrayList < com.android.bluetooth.avrcp.MediaController > ( ) ; if ( ( mMediaSessionManager ) != null ) { controllersList = mMediaSessionManager.getActiveSessions ( null ) ; } android.util.Log.i ( com.android.bluetooth.avrcp.Avrcp.TAG , ( ( "getActiveControllersList: " + ( controllersList.size ( ) ) ) + " controllers" ) ) ; return controllersList ; }

Target:
public void onConnectionFailed ( ) { android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , ( ( "BrowsablePlayerListBuilder: " + ( mCurrentPlayer.packageName ) ) + " FAIL" ) ) ; connectNextPlayer ( ) ; }
Source:
public android.bluetooth.BluetoothClass getBluetoothClass ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Bluetooth Class" ) ; return null ; } try { int classInt = android.bluetooth.BluetoothDevice.sService.getRemoteClass ( this ) ; if ( classInt == ( BluetoothClass.ERROR ) ) return null ; return new android.bluetooth.BluetoothClass ( classInt ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }

Target:
public boolean isConnected ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return ( service.getConnectionState ( this ) ) != ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_DISCONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }
Source:
public static int toKeymaster ( @ android.security.KeyStoreKeyConstraints.AlgorithmEnum int algorithm ) { switch ( algorithm ) { case android.security.KeyStoreKeyConstraints.Algorithm.AES : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_AES ; case android.security.KeyStoreKeyConstraints.Algorithm.HMAC : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_HMAC ; case android.security.KeyStoreKeyConstraints.Algorithm.RSA : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_RSA ; case android.security.KeyStoreKeyConstraints.Algorithm.EC : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_ECDSA ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown algorithm: " + algorithm ) ) ; } }

Target:
public static int toKeymaster ( @ android.security.KeyStoreKeyConstraints.AlgorithmEnum int algorithm ) { switch ( algorithm ) { case android.security.KeyStoreKeyConstraints.Algorithm.AES : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_AES ; case android.security.KeyStoreKeyConstraints.Algorithm.HMAC : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_HMAC ; case android.security.KeyStoreKeyConstraints.Algorithm.RSA : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_RSA ; case android.security.KeyStoreKeyConstraints.Algorithm.EC : return android.security.keymaster.KeymasterDefs.KM_ALGORITHM_EC ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown algorithm: " + algorithm ) ) ; } }
Source:
private java.util.List < android.content.pm.ResolveInfo > filterIfNotPrimaryUser ( java.util.List < android.content.pm.ResolveInfo > resolveInfos , int userId ) { if ( userId == ( android.os.UserHandle.USER_OWNER ) ) { return resolveInfos ; } for ( int i = ( resolveInfos.size ( ) ) - 1 ; i >= 0 ; i -- ) { android.content.pm.ResolveInfo info = resolveInfos.get ( i ) ; if ( ( ( info.activityInfo.flags ) & ( android.content.pm.ActivityInfo.FLAG_PRIMARY_USER_ONLY ) ) != 0 ) { resolveInfos.remove ( i ) ; } } return resolveInfos ; }

Target:
private java.util.List < android.content.pm.ResolveInfo > filterIfNotSystemUser ( java.util.List < android.content.pm.ResolveInfo > resolveInfos , int userId ) { if ( userId == ( android.os.UserHandle.USER_SYSTEM ) ) { return resolveInfos ; } for ( int i = ( resolveInfos.size ( ) ) - 1 ; i >= 0 ; i -- ) { android.content.pm.ResolveInfo info = resolveInfos.get ( i ) ; if ( ( ( info.activityInfo.flags ) & ( android.content.pm.ActivityInfo.FLAG_SYSTEM_USER_ONLY ) ) != 0 ) { resolveInfos.remove ( i ) ; } } return resolveInfos ; }
Source:
public void createBitmaps ( ) { Bitmap.NativeWrapper dataA = Bitmap.allocNativeStorage ( 10 , 10 ) ; Bitmap.NativeWrapper dataB = Bitmap.allocNativeStorage ( 20 , 20 ) ; mBitmap1 = new Bitmap ( "one" , 10 , 10 , dataA ) ; mBitmap2 = new Bitmap ( "two" , 20 , 20 , dataB ) ; mBitmap3 = mBitmap4 = new Bitmap ( "three/four" , 20 , 20 , dataB ) ; }

Target:
public void createBitmaps ( ) { Bitmap.NativeWrapper dataA = Bitmap.allocNativeStorage ( 10 , 10 ) ; mFreeSignalA = dataA.mPhantomWrapper.mFreeSignal ; Bitmap.NativeWrapper dataB = Bitmap.allocNativeStorage ( 20 , 20 ) ; mFreeSignalB = dataB.mPhantomWrapper.mFreeSignal ; mBitmap1 = new Bitmap ( "one" , 10 , 10 , dataA ) ; mBitmap2 = new Bitmap ( "two" , 20 , 20 , dataB ) ; mBitmap3 = mBitmap4 = new Bitmap ( "three/four" , 20 , 20 , dataB ) ; }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.cellbroadcastreceiver.CellBroadcastListActivity.MENU_DELETE_ALL : confirmDeleteThread ( ( - 1 ) ) ; break ; case com.android.cellbroadcastreceiver.CellBroadcastListActivity.MENU_PREFERENCES : android.content.Intent intent = new android.content.Intent ( this , com.android.cellbroadcastreceiver.CellBroadcastSettings.class ) ; startActivityIfNeeded ( intent , ( - 1 ) ) ; break ; default : return true ; } return false ; }

Target:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_DELETE_ALL : confirmDeleteThread ( ( - 1 ) , false ) ; break ; case com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_PREFERENCES : android.content.Intent intent = new android.content.Intent ( getActivity ( ) , com.android.cellbroadcastreceiver.CellBroadcastSettings.class ) ; startActivity ( intent ) ; break ; default : return true ; } return false ; }
Source:
public void test_lock ( ) throws java.lang.Exception { org.apache.harmony.tests.java.nio.channels.FileChannelTest.MockFileChannel mockFileChannel = new org.apache.harmony.tests.java.nio.channels.FileChannelTest.MockFileChannel ( ) ; mockFileChannel.lock ( ) ; assertTrue ( mockFileChannel.isLockCalled ) ; }

Target:
public void test_lock ( ) throws java.lang.Exception { fileLock = writeOnlyFileChannel.lock ( ) ; assertTrue ( fileLock.isValid ( ) ) ; assertFalse ( fileLock.isShared ( ) ) ; assertSame ( writeOnlyFileChannel , fileLock.channel ( ) ) ; assertEquals ( java.lang.Long.MAX_VALUE , fileLock.size ( ) ) ; assertEquals ( 0 , fileLock.position ( ) ) ; }
Source:
private boolean isNitzSignalOffsetInfoBogus ( com.android.internal.telephony.util.TimeStampedValue < com.android.internal.telephony.NitzData > nitzSignal , java.lang.String isoCountryCode ) { if ( android.text.TextUtils.isEmpty ( isoCountryCode ) ) { return false ; } com.android.internal.telephony.NitzData newNitzData = nitzSignal.mValue ; boolean zeroOffsetNitz = ( ( newNitzData.getLocalOffsetMillis ( ) ) == 0 ) && ( ! ( newNitzData.isDst ( ) ) ) ; return zeroOffsetNitz && ( ! ( countryUsesUtc ( isoCountryCode , nitzSignal ) ) ) ; }

Target:
void handleNitzReceived ( com.android.internal.telephony.util.TimeStampedValue < com.android.internal.telephony.NitzData > nitzSignal ) ;
Source:
private static java.lang.String getFingerprint ( java.security.cert.X509Certificate cert ) { try { java.security.MessageDigest dgst = java.security.MessageDigest.getInstance ( "SHA512" ) ; byte [ ] encoded = cert.getPublicKey ( ) . getEncoded ( ) ; byte [ ] fingerprint = dgst.digest ( encoded ) ; return org.conscrypt.IntegralToString.bytesToHexString ( fingerprint , false ) ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
private static java.lang.String getFingerprint ( java.security.cert.X509Certificate cert ) { try { java.security.MessageDigest dgst = java.security.MessageDigest.getInstance ( "SHA512" ) ; byte [ ] encoded = cert.getPublicKey ( ) . getEncoded ( ) ; byte [ ] fingerprint = dgst.digest ( encoded ) ; return org.conscrypt.Hex.bytesToHexString ( fingerprint ) ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.lang.AssertionError ( e ) ; } }
Source:
public void getRulesState_nothingStaged ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; configureDeviceSystemRulesVersion ( "2016a" ) ; configureNoStagedOperation ( ) ; libcore.tzdata.shared2.DistroVersion installedDistroVersion = new libcore.tzdata.shared2.DistroVersion ( libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , ( ( libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MINOR_VERSION ) - 1 ) , "2016b" , 4 ) ; configureInstalledDistroVersion ( installedDistroVersion ) ; android.app.timezone.DistroRulesVersion installedDistroRulesVersion = new android.app.timezone.DistroRulesVersion ( installedDistroVersion.rulesVersion , installedDistroVersion.revision ) ; android.app.timezone.RulesState expectedRuleState = new android.app.timezone.RulesState ( "2016a" , RulesManagerService.DISTRO_FORMAT_VERSION_SUPPORTED , false , android.app.timezone.RulesState.STAGED_OPERATION_NONE , null , android.app.timezone.RulesState.DISTRO_STATUS_INSTALLED , installedDistroRulesVersion ) ; org.junit.Assert.assertEquals ( expectedRuleState , mRulesManagerService.getRulesState ( ) ) ; }

Target:
public void getRulesState_nothingStaged ( ) throws java.lang.Exception { configureCallerHasPermission ( ) ; configureDeviceSystemRulesVersion ( "2016a" ) ; configureNoStagedOperation ( ) ; com.android.timezone.distro.DistroVersion installedDistroVersion = new com.android.timezone.distro.DistroVersion ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION ) - 1 ) , "2016b" , 4 ) ; configureInstalledDistroVersion ( installedDistroVersion ) ; android.app.timezone.DistroRulesVersion installedDistroRulesVersion = new android.app.timezone.DistroRulesVersion ( installedDistroVersion.rulesVersion , installedDistroVersion.revision ) ; android.app.timezone.RulesState expectedRuleState = new android.app.timezone.RulesState ( "2016a" , RulesManagerService.DISTRO_FORMAT_VERSION_SUPPORTED , false , android.app.timezone.RulesState.STAGED_OPERATION_NONE , null , android.app.timezone.RulesState.DISTRO_STATUS_INSTALLED , installedDistroRulesVersion ) ; org.junit.Assert.assertEquals ( expectedRuleState , mRulesManagerService.getRulesState ( ) ) ; }
Source:
private com.android.dialer.simulator.portal.SimulatorPortalEntryGroup buildSimulatorRttCallPortal ( ) { return com.android.dialer.simulator.portal.SimulatorPortalEntryGroup.builder ( ) . setMethods ( com.google.common.collect.ImmutableMap.< java.lang.String , java.lang.Runnable > builder ( ) . put ( "Incoming call" , ( ) -> new com.android.dialer.simulator.impl.SimulatorRttCall ( context ) . addNewIncomingCall ( false ) ) . put ( "Outgoing call" , ( ) -> new com.android.dialer.simulator.impl.SimulatorRttCall ( context ) . addNewOutgoingCall ( ) ) . put ( "Emergency call" , ( ) -> new com.android.dialer.simulator.impl.SimulatorRttCall ( context ) . addNewEmergencyCall ( ) ) . build ( ) ) . build ( ) ; }

Target:
private com.android.dialer.simulator.impl.SimulatorPortalEntryGroup buildSimulatorRttCallPortal ( ) { return com.android.dialer.simulator.impl.SimulatorPortalEntryGroup.builder ( ) . setMethods ( com.google.common.collect.ImmutableMap.< java.lang.String , java.lang.Runnable > builder ( ) . put ( "Incoming call" , ( ) -> new com.android.dialer.simulator.impl.SimulatorRttCall ( context ) . addNewIncomingCall ( false ) ) . put ( "Outgoing call" , ( ) -> new com.android.dialer.simulator.impl.SimulatorRttCall ( context ) . addNewOutgoingCall ( ) ) . put ( "Emergency call" , ( ) -> new com.android.dialer.simulator.impl.SimulatorRttCall ( context ) . addNewEmergencyCall ( ) ) . build ( ) ) . build ( ) ; }
Source:
private java.lang.CharSequence getDialerTos ( ) { if ( ! ( isVoicemailTranscriptionEnabled ( ) ) ) { return "" ; } if ( isVvm3 ( ) ) { return context.getString ( R.string.dialer_terms_and_conditions_for_verizon_1_0 ) ; } else { java.lang.String learnMoreText = context.getString ( R.string.dialer_terms_and_conditions_learn_more ) ; return context.getString ( R.string.dialer_terms_and_conditions_1_0 , learnMoreText ) ; } }

Target:
private boolean hasAcceptedTos ( ) { if ( isVvm3 ( ) ) { return ( preferences.getInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_VVM3_TOS_VERSION_ACCEPTED_KEY , 0 ) ) >= ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_VVM3_TOS_VERSION ) ; } else { return ( preferences.getInt ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.PREF_DIALER_TOS_VERSION_ACCEPTED_KEY , 0 ) ) >= ( com.android.dialer.app.voicemail.error.VoicemailTosMessageCreator.CURRENT_DIALER_TOS_VERSION ) ; } }