auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < ( com.ibm.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ; ++ i ) { if ( ( original [ i ] . length ( ) ) != 0 ) result.append ( original [ i ] ) ; } return result.toString ( ) ; }

Target:
public static int getAppendFormatNumber ( com.ibm.icu.impl.UResource.Key key ) { for ( int i = 0 ; i < ( com.ibm.icu.text.DateTimePatternGenerator.CLDR_FIELD_APPEND.length ) ; ++ i ) { if ( key.contentEquals ( com.ibm.icu.text.DateTimePatternGenerator.CLDR_FIELD_APPEND [ i ] ) ) { return i ; } } return - 1 ; }
Source:
public boolean restoreconData ( ) { return ( execute ( "restorecondata" ) ) == 0 ; }

Target:
public boolean restoreconData ( java.lang.String pkgName , java.lang.String seinfo , int uid ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "restorecondata" ) ; builder.append ( ' ' ) ; builder.append ( pkgName ) ; builder.append ( ' ' ) ; builder.append ( ( seinfo != null ? seinfo : "!" ) ) ; builder.append ( ' ' ) ; builder.append ( uid ) ; return ( execute ( builder.toString ( ) ) ) == 0 ; }
Source:
public java.lang.annotation.Annotation [ ] getDeclaredAnnotations ( ) { java.util.List < java.lang.annotation.Annotation > result = libcore.reflect.AnnotationAccess.getDeclaredAnnotations ( this ) ; return result.toArray ( new java.lang.annotation.Annotation [ result.size ( ) ] ) ; }

Target:
private java.lang.String getSignatureAttribute ( ) { java.lang.String [ ] annotation = getSignatureAnnotation ( ) ; if ( annotation == null ) { return null ; } java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; for ( java.lang.String s : annotation ) { result.append ( s ) ; } return result.toString ( ) ; }
Source:
private int readLength ( java.nio.channels.SocketChannel socket , byte [ ] buffer ) throws java.io.IOException { java.lang.String msg = read ( socket , buffer ) ; if ( msg != null ) { try { return java.lang.Integer.parseInt ( msg , 16 ) ; } catch ( java.lang.NumberFormatException nfe ) { } } throw new java.io.IOException ( "Unable to read length" ) ; }

Target:
private static int readLength ( @ com.android.annotations.NonNull java.nio.channels.SocketChannel socket , @ com.android.annotations.NonNull byte [ ] buffer ) throws java.io.IOException { java.lang.String msg = com.android.ddmlib.DeviceMonitor.read ( socket , buffer ) ; if ( msg != null ) { try { return java.lang.Integer.parseInt ( msg , 16 ) ; } catch ( java.lang.NumberFormatException nfe ) { } } throw new java.io.IOException ( "Unable to read length" ) ; }
Source:
public void autoRoamSetBSSID ( int netId , java.lang.String bssid ) { autoRoamSetBSSID ( mWifiConfigManager.getWifiConfiguration ( netId ) , bssid ) ; }

Target:
private boolean setUserSelectNetwork ( int netId , int uid ) { if ( ! ( mWifiConfigManager.enableNetwork ( netId , true , uid ) ) ) { loge ( ( ( ( "connectToUserSelectNetwork uid " + uid ) + " did not have the permissions to enable=" ) + netId ) ) ; return false ; } if ( ( mWifiConnectivityManager ) != null ) { mWifiConnectivityManager.connectToUserSelectNetwork ( netId , true ) ; } return true ; }
Source:
protected void onIccRefreshInit ( ) { mAdnCache.reset ( ) ; com.android.internal.telephony.uicc.UiccCardApplication parentApp = mParentApp ; if ( ( parentApp != null ) && ( ( parentApp.getState ( ) ) == ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState.APPSTATE_READY ) ) ) { sendMessage ( obtainMessage ( com.android.internal.telephony.uicc.IccRecords.EVENT_APP_READY ) ) ; } }

Target:
protected void onIccRefreshInit ( ) { mAdnCache.reset ( ) ; mMncLength = com.android.internal.telephony.uicc.IccRecords.UNINITIALIZED ; com.android.internal.telephony.uicc.UiccCardApplication parentApp = mParentApp ; if ( ( parentApp != null ) && ( ( parentApp.getState ( ) ) == ( com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState.APPSTATE_READY ) ) ) { sendMessage ( obtainMessage ( com.android.internal.telephony.uicc.IccRecords.EVENT_APP_READY ) ) ; } }
Source:
public void testActionCall ( ) { android.net.Uri uri = android.net.Uri.parse ( "tel:123456" ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_CALL , uri ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; try { mContext.startActivity ( intent ) ; fail ( "startActivity(Intent.ACTION_CALL) did not throw SecurityException as expected" ) ; } catch ( java.lang.SecurityException e ) { } }

Target:
public void testActionCall ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { android.net.Uri uri = android.net.Uri.parse ( "tel:123456" ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_CALL , uri ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; try { mContext.startActivity ( intent ) ; fail ( "startActivity(Intent.ACTION_CALL) did not throw SecurityException as expected" ) ; } catch ( java.lang.SecurityException e ) { } } }
Source:
public void testRunNormalInput ( ) { mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockRunUtil ( "which" , "python" , CommandStatus.SUCCESS ) ) ; try { mTest.run ( mMockInvocationListener ) ; } catch ( java.lang.IllegalArgumentException e ) { fail ( ) ; e.printStackTrace ( ) ; } catch ( com.android.tradefed.device.DeviceNotAvailableException e ) { fail ( ) ; e.printStackTrace ( ) ; } }

Target:
public void testRunNormalInputCommandFailed ( ) { mTest.setDevice ( mMockITestDevice ) ; com.android.tradefed.util.CommandResult commandResult = new com.android.tradefed.util.CommandResult ( ) ; commandResult.setStatus ( CommandStatus.FAILED ) ; org.easymock.EasyMock.expect ( mRunUtil.runTimedCmd ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.TEST_TIMEOUT , mCommand ) ) . andReturn ( commandResult ) ; org.easymock.EasyMock.replay ( mRunUtil ) ; try { mTest.run ( mMockInvocationListener ) ; fail ( ) ; } catch ( java.lang.RuntimeException e ) { } catch ( com.android.tradefed.device.DeviceNotAvailableException e ) { fail ( ) ; e.printStackTrace ( ) ; } }
Source:
private com.android.server.am.BroadcastQueue isReceivingBroadcast ( com.android.server.am.ProcessRecord app ) { com.android.server.am.BroadcastRecord r = app.curReceiver ; if ( r != null ) { return r.queue ; } synchronized ( this ) { for ( com.android.server.am.BroadcastQueue queue : mBroadcastQueues ) { r = queue.mPendingBroadcast ; if ( ( r != null ) && ( ( r.curApp ) == app ) ) { return queue ; } } } return null ; }

Target:
private boolean isReceivingBroadcastLocked ( com.android.server.am.ProcessRecord app , android.util.ArraySet < com.android.server.am.BroadcastQueue > receivingQueues ) { if ( ! ( app.curReceivers.isEmpty ( ) ) ) { for ( com.android.server.am.BroadcastRecord r : app.curReceivers ) { receivingQueues.add ( r.queue ) ; } return true ; } for ( com.android.server.am.BroadcastQueue queue : mBroadcastQueues ) { final com.android.server.am.BroadcastRecord r = queue.mPendingBroadcast ; if ( ( r != null ) && ( ( r.curApp ) == app ) ) { receivingQueues.add ( queue ) ; } } return ! ( receivingQueues.isEmpty ( ) ) ; }
Source:
public void toggleMethodProfiling ( ) { if ( ( mCurrentClient ) != null ) { mCurrentClient.toggleMethodProfiling ( ) ; } }

Target:
public void toggleMethodProfiling ( ) { if ( ( mCurrentClient ) == null ) { return ; } try { toggleMethodProfiling ( mCurrentClient ) ; } catch ( java.io.IOException e ) { org.eclipse.jface.dialogs.MessageDialog.openError ( mTree.getShell ( ) , "Method Profiling" , ( "Unexpected I/O error while starting/stopping profiling: " + ( com.google.common.base.Throwables.getRootCause ( e ) . getMessage ( ) ) ) ) ; } }
Source:
public void run ( ) { com.android.hierarchyviewerlib.device.DeviceBridge.ViewServerInfo viewServerInfo = com.android.hierarchyviewerlib.device.DeviceBridge.loadViewServerInfo ( device ) ; com.android.hierarchyviewerlib.device.Window [ ] windows = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindows ( device ) ; com.android.hierarchyviewerlib.ComponentRegistry.getDeviceSelectionModel ( ) . addDevice ( device , windows ) ; if ( ( viewServerInfo.protocolVersion ) >= 3 ) { com.android.hierarchyviewerlib.device.WindowUpdater.startListenForWindowChanges ( this , device ) ; focusChanged ( device ) ; } }

Target:
public void run ( ) { try { java.lang.Thread.sleep ( 2000 ) ; } catch ( java.lang.InterruptedException e ) { com.android.ddmlib.Log.e ( com.android.hierarchyviewerlib.HierarchyViewerDirector.TAG , ( "Unable to debug device " + device ) ) ; com.android.hierarchyviewerlib.device.DeviceBridge.removeDeviceForward ( device ) ; return ; } if ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.startViewServer ( device ) ) ) { com.android.ddmlib.Log.e ( com.android.hierarchyviewerlib.HierarchyViewerDirector.TAG , ( "Unable to debug device " + device ) ) ; com.android.hierarchyviewerlib.device.DeviceBridge.removeDeviceForward ( device ) ; } else { loadViewServerInfoAndWindows ( device ) ; } }
Source:
public void onConfigurationChanged ( android.content.res.Configuration newConfig ) { mCachedOverlappingActionModeHeight = - 1 ; if ( ( mSelectingText ) && ( ( mOrientation ) != ( newConfig.orientation ) ) ) { selectionDone ( ) ; } mOrientation = newConfig.orientation ; if ( ( ( mWebViewCore ) != null ) && ( ! ( mBlockWebkitViewMessages ) ) ) { mWebViewCore.sendMessage ( EventHub.CLEAR_CONTENT ) ; } }

Target:
public void clearSelection ( ) { selectionDone ( ) ; if ( ( mWebViewCore ) != null ) { mWebViewCore.sendMessage ( EventHub.SELECT_TEXT , null ) ; } }
Source:
public java.security.Key engineGetKey ( java.lang.String alias , char [ ] password ) throws java.security.NoSuchAlgorithmException , java.security.UnrecoverableKeyException { if ( ! ( isKeyEntry ( alias ) ) ) { return null ; } final org.apache.harmony.xnet.provider.jsse.OpenSSLEngine engine = org.apache.harmony.xnet.provider.jsse.OpenSSLEngine.getInstance ( "keystore" ) ; try { return engine.getPrivateKeyById ( ( ( Credentials.USER_PRIVATE_KEY ) + alias ) ) ; } catch ( java.security.InvalidKeyException e ) { java.security.UnrecoverableKeyException t = new java.security.UnrecoverableKeyException ( "Can't get key" ) ; t.initCause ( e ) ; throw t ; } }

Target:
public java.security.Key engineGetKey ( java.lang.String alias , char [ ] password ) throws java.security.NoSuchAlgorithmException , java.security.UnrecoverableKeyException { if ( ! ( isKeyEntry ( alias ) ) ) { return null ; } final com.android.org.conscrypt.OpenSSLEngine engine = com.android.org.conscrypt.OpenSSLEngine.getInstance ( "keystore" ) ; try { return engine.getPrivateKeyById ( ( ( Credentials.USER_PRIVATE_KEY ) + alias ) ) ; } catch ( java.security.InvalidKeyException e ) { java.security.UnrecoverableKeyException t = new java.security.UnrecoverableKeyException ( "Can't get key" ) ; t.initCause ( e ) ; throw t ; } }
Source:
public java.lang.Boolean bluetoothPbapClientConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "device" , description = "Name or MAC address of a bluetooth device." ) java.lang.String deviceStr ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothPbapClientFacade.sPbapClientProfile ) == null ) return false ; try { android.bluetooth.BluetoothDevice device = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( BluetoothFacade.DiscoveredDevices , deviceStr ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( device.getAliasName ( ) ) ) ) ; return pbapClientConnect ( device ) ; } catch ( java.lang.Exception e ) { com.googlecode.android_scripting.Log.e ( ( ( ( "bluetoothPbapClientConnect failed on getDevice " + deviceStr ) + " with " ) + e ) ) ; return false ; } }

Target:
public java.lang.Boolean bluetoothPbapClientConnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "device" , description = "Name or MAC address of a bluetooth device." ) java.lang.String deviceStr ) throws java.lang.Exception { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothPbapClientFacade.sPbapClientProfile ) == null ) return false ; try { android.bluetooth.BluetoothDevice device = com.googlecode.android_scripting.facade.bluetooth.BluetoothFacade.getDevice ( mBluetoothAdapter.getBondedDevices ( ) , deviceStr ) ; com.googlecode.android_scripting.Log.d ( ( "Connecting to device " + ( device.getAliasName ( ) ) ) ) ; return pbapClientConnect ( device ) ; } catch ( java.lang.Exception e ) { com.googlecode.android_scripting.Log.e ( ( ( ( "bluetoothPbapClientConnect failed on getDevice " + deviceStr ) + " with " ) + e ) ) ; return false ; } }
Source:
private void addCatchBlockSuccessors ( @ javax.annotation.Nonnull java.util.List < com.android.jack.cfg.CatchBasicBlock > catchBlocks , @ javax.annotation.Nonnull com.android.jack.dx.util.IntList successors ) { for ( com.android.jack.cfg.CatchBasicBlock catchblock : catchBlocks ) { int catchTypeCount = 0 ; int catchTypesSize = catchblock.getCatchTypes ( ) . size ( ) ; while ( ( catchTypeCount ++ ) < catchTypesSize ) { successors.add ( catchblock.getId ( ) ) ; } } }

Target:
private void addCatchBlockSuccessors ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.cfg.JBasicBlock > catchBlocks , @ javax.annotation.Nonnull com.android.jack.dx.util.IntList successors ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock catchBlock : catchBlocks ) { int catchTypeCount = 0 ; int catchTypesSize = ( ( com.android.jack.ir.ast.cfg.JCatchBasicBlock ) ( catchBlock ) ) . getCatchTypes ( ) . size ( ) ; while ( ( catchTypeCount ++ ) < catchTypesSize ) { successors.add ( getBlockId ( catchBlock ) ) ; } } }
Source:
private boolean shouldTestThisNetworkType ( int networkTypeIndex , long tolerance ) throws java.lang.Exception { android.net.NetworkInfo networkInfo = mCm.getNetworkInfo ( android.app.usage.cts.NetworkUsageStatsTest.sNetworkTypesToTest [ networkTypeIndex ] ) ; if ( ( networkInfo == null ) || ( ! ( networkInfo.isAvailable ( ) ) ) ) { return false ; } mStartTime = ( java.lang.System.currentTimeMillis ( ) ) - tolerance ; exerciseRemoteHost ( android.app.usage.cts.NetworkUsageStatsTest.sTransportTypesToTest [ networkTypeIndex ] ) ; mEndTime = ( java.lang.System.currentTimeMillis ( ) ) + tolerance ; return true ; }

Target:
public void onAvailable ( android.net.Network network ) { try { mStartTime = ( java.lang.System.currentTimeMillis ( ) ) - ( mTolerance ) ; exerciseRemoteHost ( network ) ; mEndTime = ( java.lang.System.currentTimeMillis ( ) ) + ( mTolerance ) ; success = true ; synchronized ( this ) { this . notify ( ) ; } } catch ( java.lang.Exception e ) { android.util.Log.w ( android.app.usage.cts.NetworkUsageStatsTest.LOG_TAG , "exercising remote host failed." , e ) ; success = false ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ! ( obj instanceof com.android.sdklib.internal.repository.packages.ToolPackage ) ) { return false ; } com.android.sdklib.internal.repository.packages.ToolPackage other = ( ( com.android.sdklib.internal.repository.packages.ToolPackage ) ( obj ) ) ; if ( ( mMinPlatformToolsRevision ) != ( other.mMinPlatformToolsRevision ) ) { return false ; } return true ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( mMinPlatformToolsRevision ) == null ? 0 : mMinPlatformToolsRevision.hashCode ( ) ) ; return result ; }
Source:
public com.android.ide.common.rendering.api.ResourceValue resolveValue ( java.lang.String type , java.lang.String name , java.lang.String value , boolean isFrameworkValue ) { if ( value == null ) { return null ; } com.android.ide.common.rendering.api.ResourceValue resValue = findResValue ( value , isFrameworkValue ) ; if ( resValue == null ) { return new com.android.ide.common.rendering.api.ResourceValue ( type , name , value , isFrameworkValue ) ; } return resolveResValue ( resValue ) ; }

Target:
public com.android.ide.common.rendering.api.ResourceValue resolveValue ( com.android.resources.ResourceType type , java.lang.String name , java.lang.String value , boolean isFrameworkValue ) { if ( value == null ) { return null ; } com.android.ide.common.rendering.api.ResourceValue resValue = findResValue ( value , isFrameworkValue ) ; if ( resValue == null ) { return new com.android.ide.common.rendering.api.ResourceValue ( type , name , value , isFrameworkValue ) ; } return resolveResValue ( resValue ) ; }
Source:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false , null ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }

Target:
private com.android.ide.common.res2.MergedResourceWriter getConsumer ( ) { return getConsumer ( com.google.common.io.Files.createTempDir ( ) ) ; }
Source:
public static boolean isWfcEnabled ( android.content.Context context ) { boolean isEnabledByPlatform = com.android.ims.ImsManager.isWfcEnabledByPlatform ( context ) ; boolean isEnabledByUser = com.android.ims.ImsManager.isWfcEnabledByUser ( context ) ; if ( com.android.phone.ImsUtil.DBG ) android.util.Log.d ( com.android.phone.ImsUtil.LOG_TAG , ( "isWfcEnabled :: isEnabledByPlatform=" + isEnabledByPlatform ) ) ; if ( com.android.phone.ImsUtil.DBG ) android.util.Log.d ( com.android.phone.ImsUtil.LOG_TAG , ( "isWfcEnabled :: isEnabledByUser=" + isEnabledByUser ) ) ; return isEnabledByPlatform && isEnabledByUser ; }

Target:
public static boolean isWfcEnabled ( android.content.Context context ) { com.android.ims.ImsManager imsManager = com.android.phone.ImsUtil.getDefaultImsManagerInstance ( context ) ; boolean isEnabledByPlatform = imsManager.isWfcEnabledByPlatform ( ) ; boolean isEnabledByUser = imsManager.isWfcEnabledByUser ( ) ; if ( com.android.phone.ImsUtil.DBG ) android.util.Log.d ( com.android.phone.ImsUtil.LOG_TAG , ( "isWfcEnabled :: isEnabledByPlatform=" + isEnabledByPlatform ) ) ; if ( com.android.phone.ImsUtil.DBG ) android.util.Log.d ( com.android.phone.ImsUtil.LOG_TAG , ( "isWfcEnabled :: isEnabledByUser=" + isEnabledByUser ) ) ; return isEnabledByPlatform && isEnabledByUser ; }
Source:
public void getCdmaSubscriptionSource ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void stopLceService ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_STOP_LCE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } try { radioProxy.stopLceService ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "stopLceService" , e ) ; } } }
Source:
private static void gatherJarDependenciesFromLibraries ( java.util.Set < com.android.build.gradle.internal.dependency.JarInfo > outJarInfos , java.util.Collection < com.android.build.gradle.internal.dependency.LibInfo > inLibraryDependencies , boolean compiled , boolean packaged ) { for ( com.android.build.gradle.internal.dependency.LibInfo libInfo : inLibraryDependencies ) { com.android.build.gradle.internal.DependencyManager.gatherJarDependencies ( outJarInfos , libInfo.getJarDependencies ( ) , compiled , packaged ) ; com.android.build.gradle.internal.DependencyManager.gatherJarDependenciesFromLibraries ( outJarInfos , ( ( java.util.Collection < com.android.build.gradle.internal.dependency.LibInfo > ) ( ( java.util.Collection < ? > ) ( libInfo.getDependencies ( ) ) ) ) , compiled , packaged ) ; } }

Target:
private static void gatherJarDependenciesFromLibraries ( java.util.Set < com.android.build.gradle.internal.dependency.JarInfo > outJarInfos , java.util.Collection < com.android.build.gradle.internal.dependency.LibInfo > inLibraryDependencies ) { for ( com.android.build.gradle.internal.dependency.LibInfo libInfo : inLibraryDependencies ) { com.android.build.gradle.internal.DependencyManager.gatherJarDependencies ( outJarInfos , libInfo.getJarDependencies ( ) , true , ( ! ( libInfo.isOptional ( ) ) ) ) ; com.android.build.gradle.internal.DependencyManager.gatherJarDependenciesFromLibraries ( outJarInfos , libInfo.getLibInfoDependencies ( ) ) ; } }
Source:
public static java.io.File getAapt ( com.android.sdklib.repository.FullRevision fullRevision ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( com.android.build.gradle.integration.common.utils.SdkHelper.findSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( ( "Test requires build-tools " + ( fullRevision.toString ( ) ) ) ) ; } return new java.io.File ( buildToolInfo.getPath ( BuildToolInfo.PathId.AAPT ) ) ; }

Target:
public static java.io.File getBuildTool ( @ com.android.annotations.NonNull com.android.sdklib.repository.FullRevision fullRevision , @ com.android.annotations.NonNull com.android.sdklib.BuildToolInfo.PathId pathId ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( com.android.build.gradle.integration.common.utils.SdkHelper.findSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( ( "Test requires build-tools " + ( fullRevision.toString ( ) ) ) ) ; } return new java.io.File ( buildToolInfo.getPath ( pathId ) ) ; }
Source:
public void nowPlayingChangedRsp ( int type ) { if ( ! ( registerNotificationRspNowPlayingChangedNative ( type ) ) ) { android.util.Log.e ( com.android.bluetooth.avrcp.Avrcp.AvrcpMediaRsp.TAG , "registerNotificationRspNowPlayingChangedNative failed!" ) ; } }

Target:
public void nowPlayingChangedRsp ( int type ) { if ( ( mNowPlayingListChangedNT ) != ( AvrcpConstants.NOTIFICATION_TYPE_INTERIM ) ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.AvrcpMediaRsp.TAG , "NowPlayingListChanged: Not registered or requesting." ) ; return ; } if ( ! ( registerNotificationRspNowPlayingChangedNative ( type ) ) ) { android.util.Log.e ( com.android.bluetooth.avrcp.Avrcp.AvrcpMediaRsp.TAG , "registerNotificationRspNowPlayingChangedNative failed!" ) ; } mNowPlayingListChangedNT = AvrcpConstants.NOTIFICATION_TYPE_CHANGED ; }
Source:
public void testPerformGlobalActionRecents ( ) throws java.lang.Exception { assertTrue ( getInstrumentation ( ) . getUiAutomation ( ) . performGlobalAction ( AccessibilityService.GLOBAL_ACTION_RECENTS ) ) ; waitForIdle ( ) ; android.os.SystemClock.sleep ( 5000 ) ; getInstrumentation ( ) . getUiAutomation ( ) . performGlobalAction ( AccessibilityService.GLOBAL_ACTION_BACK ) ; waitForIdle ( ) ; }

Target:
public void testPerformGlobalActionRecents ( ) throws java.lang.Exception { boolean actionWasPerformed = getInstrumentation ( ) . getUiAutomation ( ) . performGlobalAction ( AccessibilityService.GLOBAL_ACTION_RECENTS ) ; waitForIdle ( ) ; if ( actionWasPerformed ) { android.os.SystemClock.sleep ( 5000 ) ; getInstrumentation ( ) . getUiAutomation ( ) . performGlobalAction ( AccessibilityService.GLOBAL_ACTION_BACK ) ; } waitForIdle ( ) ; }
Source:
public long getLong ( int tag , long defaultValue ) { if ( ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) != ( KeymasterDefs.KM_LONG ) ) { throw new java.lang.IllegalArgumentException ( ( "Tag is not a long type: " + tag ) ) ; } android.security.keymaster.KeymasterArgument arg = getArgumentByTag ( tag ) ; if ( arg == null ) { return defaultValue ; } return ( ( android.security.keymaster.KeymasterLongArgument ) ( arg ) ) . value ; }

Target:
public long getLong ( int tag , long defaultValue ) { switch ( android.security.keymaster.KeymasterDefs.getTagType ( tag ) ) { case KeymasterDefs.KM_LONG : break ; case KeymasterDefs.KM_LONG_REP : throw new java.lang.IllegalArgumentException ( ( "Repeatable tags must use getLongs: " + tag ) ) ; default : throw new java.lang.IllegalArgumentException ( ( "Tag is not a long type: " + tag ) ) ; } android.security.keymaster.KeymasterArgument arg = getArgumentByTag ( tag ) ; if ( arg == null ) { return defaultValue ; } return ( ( android.security.keymaster.KeymasterLongArgument ) ( arg ) ) . value ; }
Source:
private com.android.jack.dx.rop.annotation.AnnotationsList readAnnotationSetRefList ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dex , @ javax.annotation.Nonnegative int annotationSetRefListOffset ) { com.android.jack.dx.io.DexBuffer.Section annotationSetRefListIn = dex.open ( annotationSetRefListOffset ) ; int parameterCount = annotationSetRefListIn.readInt ( ) ; com.android.jack.dx.rop.annotation.AnnotationsList parameterAnnotationList = new com.android.jack.dx.rop.annotation.AnnotationsList ( parameterCount ) ; for ( int paramIdx = 0 ; paramIdx < parameterCount ; paramIdx ++ ) { com.android.jack.dx.rop.annotation.Annotations annotations = readAnnotationSet ( dex , annotationSetRefListIn.readInt ( ) ) ; annotations.setImmutable ( ) ; parameterAnnotationList.set ( paramIdx , annotations ) ; } return parameterAnnotationList ; }

Target:
private com.android.jack.dx.rop.annotation.AnnotationsList readAnnotationSetRefList ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dex , @ javax.annotation.Nonnegative int annotationSetRefListOffset , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstIndexMap cstIndexMap ) { com.android.jack.dx.io.DexBuffer.Section annotationSetRefListIn = dex.open ( annotationSetRefListOffset ) ; int parameterCount = annotationSetRefListIn.readInt ( ) ; com.android.jack.dx.rop.annotation.AnnotationsList parameterAnnotationList = new com.android.jack.dx.rop.annotation.AnnotationsList ( parameterCount ) ; for ( int paramIdx = 0 ; paramIdx < parameterCount ; paramIdx ++ ) { com.android.jack.dx.rop.annotation.Annotations annotations = readAnnotationSet ( dex , annotationSetRefListIn.readInt ( ) , cstIndexMap ) ; annotations.setImmutable ( ) ; parameterAnnotationList.set ( paramIdx , annotations ) ; } return parameterAnnotationList ; }
Source:
public void disconnect ( ) { synchronized ( this ) { if ( mConnected ) { if ( false ) { android.util.Log.v ( android.media.MediaScannerConnection.TAG , "Disconnecting from Media Scanner" ) ; } try { mContext.unbindService ( this ) ; } catch ( java.lang.IllegalArgumentException ex ) { if ( false ) { android.util.Log.v ( android.media.MediaScannerConnection.TAG , ( "disconnect failed: " + ex ) ) ; } } mConnected = false ; } } }

Target:
public void disconnect ( ) { synchronized ( this ) { if ( mConnected ) { if ( false ) { android.util.Log.v ( android.media.MediaScannerConnection.TAG , "Disconnecting from Media Scanner" ) ; } try { mContext.unbindService ( this ) ; if ( ( mClient ) instanceof android.media.MediaScannerConnection.ClientProxy ) { mClient = null ; } mService = null ; } catch ( java.lang.IllegalArgumentException ex ) { if ( false ) { android.util.Log.v ( android.media.MediaScannerConnection.TAG , ( "disconnect failed: " + ex ) ) ; } } mConnected = false ; } } }
Source:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , notes = "Test setPageSize(long)" , method = "setPageSize" , args = { long . class } ) } ) public void testAccessPageSize ( ) { mDatabaseFile = new java.io.File ( mDatabaseDir , "database.db" ) ; if ( mDatabaseFile.exists ( ) ) { mDatabaseFile.delete ( ) ; } mDatabase = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase ( mDatabaseFile.getPath ( ) , null ) ; long initialValue = mDatabase.getPageSize ( ) ; mDatabase.setPageSize ( initialValue ) ; assertEquals ( initialValue , mDatabase.getPageSize ( ) ) ; }

Target:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , notes = "Test setPageSize(long)" , method = "setPageSize" , args = { long . class } ) } ) public void testAccessPageSize ( ) { java.io.File databaseFile = new java.io.File ( mDatabaseDir , "database.db" ) ; if ( databaseFile.exists ( ) ) { databaseFile.delete ( ) ; } android.database.sqlite.SQLiteDatabase database = null ; try { database = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase ( databaseFile.getPath ( ) , null ) ; long initialValue = database.getPageSize ( ) ; database.setPageSize ( initialValue ) ; assertEquals ( initialValue , database.getPageSize ( ) ) ; } finally { if ( database != null ) { database.close ( ) ; databaseFile.delete ( ) ; } } }
Source:
public java.util.List < com.android.tv.dvr.ScheduledRecording > getScheduledRecordings ( java.lang.String inputId ) { java.util.List < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( android.text.TextUtils.equals ( r.getInputId ( ) , inputId ) ) { result.add ( r ) ; } } return result ; }

Target:
public java.util.List < com.android.tv.dvr.data.ScheduledRecording > getScheduledRecordings ( java.lang.String inputId ) { java.util.List < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : mScheduledRecordings.values ( ) ) { if ( android.text.TextUtils.equals ( r.getInputId ( ) , inputId ) ) { result.add ( r ) ; } } return result ; }
Source:
public final void writeBlob ( byte [ ] b , int offset , int len ) { if ( b == null ) { writeInt ( ( - 1 ) ) ; return ; } java.util.Arrays.checkOffsetAndCount ( b.length , offset , len ) ; android.os.Parcel.nativeWriteBlob ( mNativePtr , b , offset , len ) ; }

Target:
public final void writeBlob ( byte [ ] b , int offset , int len ) { if ( b == null ) { writeInt ( ( - 1 ) ) ; return ; } libcore.util.ArrayUtils.throwsIfOutOfBounds ( b.length , offset , len ) ; android.os.Parcel.nativeWriteBlob ( mNativePtr , b , offset , len ) ; }
Source:
protected void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkMenuActivity.LOG_TAG , ( "onRestoreInstanceState: " + ( mSlotId ) ) ) ; mState = savedInstanceState.getInt ( "STATE" ) ; mStkMenu = savedInstanceState.getParcelable ( "MENU" ) ; mAcceptUsersInput = savedInstanceState.getBoolean ( "ACCEPT_USERS_INPUT" ) ; }

Target:
protected void onRestoreInstanceState ( android.os.Bundle savedInstanceState ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkMenuActivity.LOG_TAG , ( "onRestoreInstanceState: " + ( mSlotId ) ) ) ; mState = savedInstanceState.getInt ( "STATE" ) ; mStkMenu = savedInstanceState.getParcelable ( "MENU" ) ; mAcceptUsersInput = savedInstanceState.getBoolean ( "ACCEPT_USERS_INPUT" ) ; if ( ! ( mAcceptUsersInput ) ) { if ( ( ( mState ) == ( com.android.stk.StkMenuActivity.STATE_MAIN ) ) && ( appService.isMainMenuAvailable ( mSlotId ) ) ) { mAcceptUsersInput = true ; } else { showProgressBar ( true ) ; } } }
Source:
private void dispatchChange ( boolean selfChange , android.net.Uri uri , int userId ) { if ( ( mHandler ) == null ) { onChange ( selfChange , uri , userId ) ; } else { mHandler.post ( new android.database.ContentObserver.NotificationRunnable ( selfChange , uri , userId ) ) ; } }

Target:
private void dispatchChange ( boolean selfChange , android.net.Uri uri , int userId ) { if ( ( mHandler ) == null ) { synchronized ( mLock ) { if ( ( mTransport ) == null ) { return ; } } onChange ( selfChange , uri , userId ) ; } else { mHandler.post ( new android.database.ContentObserver.NotificationRunnable ( selfChange , uri , userId ) ) ; } }
Source:
public com.android.jack.ir.ast.JDynamicCastOperation 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 ( sourceInfo ) != null ; assert ( castType ) != null ; assert ( expr ) != null ; com.android.jack.ir.ast.JType jType = exportSession.getLookup ( ) . getType ( castType ) ; com.android.jack.ir.ast.JExpression jExpr = expr.exportAsJast ( exportSession ) ; com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JDynamicCastOperation jDynamicCastOperation = new com.android.jack.ir.ast.JDynamicCastOperation ( jSourceInfo , jType , jExpr ) ; return jDynamicCastOperation ; }

Target:
public com.android.jack.ir.ast.JDynamicCastOperation 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 ( sourceInfo ) != null ; assert ( castType ) != null ; assert ( expr ) != null ; com.android.jack.ir.ast.JType jType = exportSession.getLookup ( ) . getType ( castType ) ; com.android.jack.ir.ast.JExpression jExpr = expr.exportAsJast ( exportSession ) ; com.android.jack.ir.sourceinfo.SourceInfo jSourceInfo = sourceInfo.exportAsJast ( exportSession ) ; com.android.jack.ir.ast.JDynamicCastOperation castOperation = new com.android.jack.ir.ast.JDynamicCastOperation ( jSourceInfo , jExpr , jType ) ; return castOperation ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , data.length , Element.DataType.SIGNED_8 ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.FLOAT_32 , data.length ) ; }
Source:
public void testCanAccessScanResults_UserOrProfileNotCurrent ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mPermissionsList.put ( mInteractAcrossUsersFullPermission , mUid ) ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanAccessScanResults_UserOrProfileNotCurrent ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mPermissionsList.put ( mInteractAcrossUsersFullPermission , mUid ) ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScorerAppManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public boolean equals ( java.lang.Object thatObject ) { if ( thatObject == ( this ) ) { return true ; } else if ( ( thatObject == null ) || ( ( thatObject.getClass ( ) ) != ( com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP.class ) ) ) { return false ; } else { return ( ( ( com.android.server.wifi.hotspot2.anqp.eap.InnerAuthEAP ) ( thatObject ) ) . getEAPMethodID ( ) ) == ( getEAPMethodID ( ) ) ; } }

Target:
public java.lang.String toString ( ) { return ( "InnerAuthEAP{mEAPMethodID=" + ( mEAPMethodID ) ) + "}" ; }
Source:
public void copyTo ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt8 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
private void copyTo ( java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , array , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public void run ( ) { try { server.setNeedClientAuth ( true ) ; server.startHandshake ( ) ; fail ( ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } catch ( java.lang.RuntimeException e ) { throw e ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { try { server.setNeedClientAuth ( true ) ; server.startHandshake ( ) ; fail ( ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } return null ; }
Source:
android.net.INetworkPolicyListener waitAndVerify ( ) { assertNotNull ( "waitAndVerify() called before expect()" , latch ) ; try { assertTrue ( "callback not called in 5 seconds" , latch.await ( 5 , java.util.concurrent.TimeUnit.SECONDS ) ) ; } catch ( java.lang.InterruptedException e ) { fail ( "Thread interrupted before callback called" ) ; } finally { latch = null ; } return org.mockito.Mockito.verify ( listener , org.mockito.Mockito.atLeastOnce ( ) ) ; }

Target:
android.net.INetworkPolicyListener expect ( ) { org.junit.Assert.assertNull ( "expect() called before waitAndVerify()" , latch ) ; latch = new java.util.concurrent.CountDownLatch ( 1 ) ; return org.mockito.Mockito.doAnswer ( this ) . when ( listener ) ; }
Source:
private boolean findMinAbsNaNInf ( com.android.rs.test.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinAbs ( RS , createInputArrayFloatWithInfs ( size [ 0 ] , ( 1 + ( ( size [ 0 ] ) / 1000 ) ) , seed ) , "findMinAbsNaNInf" , ( com.android.rs.test.Allocation input ) -> s.reduce_findMinAbsNaN ( input ) . get ( ) ) ; }

Target:
private boolean findMinAbsNaNInf ( android.renderscript.RenderScript RS , com.android.rs.test.ScriptC_reduce s , int seed , int [ ] size ) { return findMinAbs ( RS , createInputArrayFloatWithInfs ( size [ 0 ] , ( 1 + ( ( size [ 0 ] ) / 1000 ) ) , seed ) , "findMinAbsNaNInf" , ( android.renderscript.Allocation input ) -> s.reduce_findMinAbsNaN ( input ) . get ( ) ) ; }
Source:
public void testBadDhcpPacket ( ) throws java.lang.Exception { final byte [ ] packet = com.android.internal.util.HexDump.hexStringToByteArray ( ( "450001518d0600004011144dc0a82b01c0a82bf7" + ( "00430044013d9ac7" + "02010600dfc23d1f0002000000000000c0a82bf7c0a82b0100000000" ) ) ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket offerPacket = android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , packet.length , android.net.dhcp.ENCAP_L3 ) ; } catch ( android.net.dhcp.DhcpPacket.DhcpPacket expected ) { assertDhcpErrorCodes ( DhcpErrorEvent.L3_TOO_SHORT , expected.errorCode ) ; return ; } fail ( "Dhcp packet parsing should have failed" ) ; }

Target:
public void testBadDhcpPacket ( ) throws java.lang.Exception { final byte [ ] packet = com.android.internal.util.HexDump.hexStringToByteArray ( ( "450001518d0600004011144dc0a82b01c0a82bf7" + ( "00430044013d9ac7" + "02010600dfc23d1f0002000000000000c0a82bf7c0a82b0100000000" ) ) ) ; try { android.net.dhcp.DhcpPacket.DhcpPacket offerPacket = android.net.dhcp.DhcpPacket.DhcpPacket.decodeFullPacket ( packet , packet.length , android.net.dhcp.ENCAP_L3 ) ; } catch ( android.net.dhcp.DhcpPacket.DhcpPacket expected ) { assertDhcpErrorCodes ( DhcpErrorEvent.L3_TOO_SHORT , expected.errorCode ) ; return ; } org.junit.Assert.fail ( "Dhcp packet parsing should have failed" ) ; }
Source:
public void testCallerDisplayNamePresentation ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } org.junit.Assert.assertThat ( mCall.getDetails ( ) . getCallerDisplayNamePresentation ( ) , org.hamcrest.CoreMatchers.is ( java.lang.Integer.class ) ) ; assertEquals ( android.telecom.cts.CallDetailsTest.CALLER_DISPLAY_NAME_PRESENTATION , mCall.getDetails ( ) . getCallerDisplayNamePresentation ( ) ) ; }

Target:
public void testCallerDisplayNamePresentation ( ) { if ( ! ( mShouldTestTelecom ) ) { return ; } org.junit.Assert.assertThat ( mCall.getDetails ( ) . getCallerDisplayNamePresentation ( ) , org.hamcrest.CoreMatchers.instanceOf ( java.lang.Integer.class ) ) ; assertEquals ( android.telecom.cts.CallDetailsTest.CALLER_DISPLAY_NAME_PRESENTATION , mCall.getDetails ( ) . getCallerDisplayNamePresentation ( ) ) ; }
Source:
public void sendDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.util.Log.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , ( ( "sendDtmf called with invalid character '" + c ) + "'" ) ) ; } else { if ( ( mCT.state ) == ( PhoneConstants.State.OFFHOOK ) ) { mCM.sendDtmf ( c , null ) ; } } }

Target:
public void sendDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , ( ( "sendDtmf called with invalid character '" + c ) + "'" ) ) ; } else { if ( ( mCT.state ) == ( PhoneConstants.State.OFFHOOK ) ) { mCM.sendDtmf ( c , null ) ; } } }
Source:
void addRootType ( java.lang.String type ) { if ( ( mRootTypes ) == null ) { mRootTypes = new java.util.ArrayList < java.lang.String > ( ) ; mRootTypes.add ( type ) ; } else if ( ! ( mRootTypes.contains ( type ) ) ) { mRootTypes.add ( type ) ; } }

Target:
public void setTemporaryUserData ( java.lang.Object state ) { mTemporaryUserData = state ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , int [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsInt32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private void checkPermissionsSafe ( java.lang.String provider ) { if ( ( LocationManager.GPS_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { throw new java.lang.SecurityException ( "Requires ACCESS_FINE_LOCATION permission" ) ; } if ( ( ( LocationManager.NETWORK_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) && ( ( mContext.checkCallingPermission ( com.android.server.LocationManagerService.ACCESS_COARSE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { throw new java.lang.SecurityException ( "Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission" ) ; } }

Target:
private void checkPermissionsSafe ( java.lang.String provider ) { if ( ( LocationManager.GPS_PROVIDER.equals ( provider ) ) && ( ( 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" ) ; } if ( ( ( LocationManager.NETWORK_PROVIDER.equals ( provider ) ) && ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.ACCESS_FINE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) && ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.ACCESS_COARSE_LOCATION ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) ) { throw new java.lang.SecurityException ( "Requires ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission" ) ; } }
Source:
public com.android.build.gradle.internal.test.report.TestResult addTest ( java.lang.String className , java.lang.String testName , long duration , java.lang.String device , java.lang.String project , java.lang.String flavor ) { com.android.build.gradle.internal.test.report.ClassTestResults classResults = addClass ( className , device , project , flavor ) ; return addTest ( classResults.addTest ( testName , duration , device , project , flavor ) ) ; }

Target:
public com.android.build.gradle.internal.test.report.TestResult addTest ( java.lang.String className , java.lang.String testName , long duration , java.lang.String device , java.lang.String project , java.lang.String flavor ) { com.android.build.gradle.internal.test.report.ClassTestResults classResults = addClass ( className ) ; com.android.build.gradle.internal.test.report.TestResult testResult = addTest ( classResults.addTest ( testName , duration , device , project , flavor ) ) ; addDevice ( device , testResult ) ; addVariant ( project , flavor , testResult ) ; return testResult ; }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedClass cls , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findClass ( cls ) ; if ( c == null ) { return null ; } if ( ( c.annotations ) != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : c.annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }

Target:
public java.util.Collection < com.intellij.psi.PsiAnnotation > getAnnotations ( @ com.android.annotations.NonNull org.eclipse.jdt.internal.compiler.lookup.MethodBinding method , int parameterIndex ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } if ( ( m.psiParameterAnnotations ) != null ) { return m.psiParameterAnnotations.get ( parameterIndex ) ; } return null ; }