auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void registerRecommendationSettingObserverIfNeeded ( ) { final java.util.List < java.lang.String > providerPackages = mNetworkScorerAppManager.getPotentialRecommendationProviderPackages ( ) ; if ( ! ( providerPackages.isEmpty ( ) ) ) { final android.content.ContentResolver resolver = mContext.getContentResolver ( ) ; final android.net.Uri uri = android.provider.Settings.Global.getUriFor ( Global.NETWORK_RECOMMENDATIONS_ENABLED ) ; resolver.registerContentObserver ( uri , false , new com.android.server.NetworkScoreService.SettingsObserver ( ) ) ; } }

Target:
public void refreshRecommendationRequestTimeoutMs ( ) { final android.content.ContentResolver cr = mContext.getContentResolver ( ) ; long timeoutMs = Settings.Global.getLong ( cr , Global.NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS , ( - 1L ) ) ; if ( timeoutMs < 0 ) { timeoutMs = android.util.TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS ; } if ( com.android.server.NetworkScoreService.DBG ) android.util.Log.d ( com.android.server.NetworkScoreService.TAG , ( ( "Updating the recommendation request timeout to " + timeoutMs ) + " ms" ) ) ; mRecommendationRequestTimeoutMs = timeoutMs ; }
Source:
public void test_allocateInstance ( ) throws java.lang.Exception { sun.misc.UnsafeTest.AllocateInstanceTestClass i = ( ( sun.misc.UnsafeTest.AllocateInstanceTestClass ) ( sun.misc.UnsafeTest.getUnsafe ( ) . allocateInstance ( sun.misc.UnsafeTest.AllocateInstanceTestClass.class ) ) ) ; assertEquals ( 0 , i.i ) ; assertEquals ( null , i.s ) ; assertEquals ( i , i.getThis ( ) ) ; }

Target:
public void test_allocateInstance ( ) throws java.lang.Exception { libcore.sun.misc.UnsafeTest.AllocateInstanceTestClass i = ( ( libcore.sun.misc.UnsafeTest.AllocateInstanceTestClass ) ( libcore.sun.misc.UnsafeTest.getUnsafe ( ) . allocateInstance ( libcore.sun.misc.UnsafeTest.AllocateInstanceTestClass.class ) ) ) ; assertEquals ( 0 , i.i ) ; assertEquals ( null , i.s ) ; assertEquals ( i , i.getThis ( ) ) ; }
Source:
private void onRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRoamingOff" ) ; if ( ! ( mDataEnabledSettings.isUserDataEnabled ( ) ) ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }

Target:
private void onDataRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOff" ) ; if ( ! ( getDataRoamingEnabled ( ) ) ) { setInitialAttachApn ( ) ; setDataProfilesAsNeeded ( ) ; notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }
Source:
private static com.android.sdklib.util.Pair < java.io.File , java.lang.Integer > findValueDefinition ( java.io.File resourceDir , com.android.ide.eclipse.adt.internal.resources.ResourceType type , java.lang.String name ) { java.io.File [ ] children = resourceDir.listFiles ( ) ; if ( children == null ) { return null ; } for ( java.io.File resource : children ) { if ( resource.getName ( ) . endsWith ( com.android.ide.eclipse.adt.AndroidConstants.EXT_XML ) ) { com.android.sdklib.util.Pair < java.io.File , java.lang.Integer > target = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.findValueInXml ( type , name , resource ) ; if ( target != null ) { return target ; } } } return null ; }

Target:
private static com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources getResources ( org.eclipse.core.resources.IProject project , boolean framework ) { if ( framework ) { com.android.sdklib.IAndroidTarget target = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getTarget ( project ) ; if ( target == null ) { return null ; } com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData data = com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTargetData ( target ) ; if ( data == null ) { return null ; } return data.getFrameworkResources ( ) ; } else { return com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getInstance ( ) . getProjectResources ( project ) ; } }
Source:
private static void cache ( java.lang.String charsetName , java.nio.charset.Charset cs ) { java.nio.charset.Charset.cache2 = java.nio.charset.Charset.cache1 ; java.nio.charset.Charset.cache1 = new java.lang.Object [ ] { charsetName , cs } ; }

Target:
private static void cache ( java.lang.String charsetName , java.nio.charset.Charset cs ) { synchronized ( java.nio.charset.Charset.cache2 ) { java.lang.String canonicalName = cs.name ( ) ; java.nio.charset.Charset.cache2.put ( canonicalName , cs ) ; for ( java.lang.String alias : cs.aliases ( ) ) { java.nio.charset.Charset.cache2.put ( alias , cs ) ; } } java.nio.charset.Charset.cache1 = new java.util.AbstractMap.SimpleImmutableEntry < > ( charsetName , java.nio.charset.Charset.cache2.get ( charsetName ) ) ; }
Source:
public static void configurePlatforms ( org.gradle.platform.base.PlatformContainer platforms , com.android.build.gradle.internal.NdkHandler ndkHandler ) { for ( com.android.build.gradle.internal.core.Abi abi : ndkHandler.getSupportedAbis ( ) ) { org.gradle.nativeplatform.platform.NativePlatform platform = platforms.maybeCreate ( abi.getName ( ) , org.gradle.nativeplatform.platform.NativePlatform ) ; platform.architecture = platform.operatingSystem ; } }

Target:
public static void configurePlatforms ( org.gradle.platform.base.PlatformContainer platforms , com.android.build.gradle.internal.NdkHandler ndkHandler ) { for ( com.android.build.gradle.internal.core.Abi abi : ndkHandler.getSupportedAbis ( ) ) { org.gradle.nativeplatform.platform.NativePlatform platform = platforms.maybeCreate ( abi.getName ( ) , org.gradle.nativeplatform.platform.NativePlatform.class ) ; platform.architecture ( "ppc" ) ; platform.operatingSystem ( "linux" ) ; } }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , android.support.v8.renderscript.Allocation data , int dataXoff , int dataYoff ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data.getID ( mRS ) , dataXoff , dataYoff , data.mSelectedLOD , data.mSelectedFace.mID ) ; }

Target:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , float [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 4 ) ) ; }
Source:
protected com.android.sched.util.location.Location getVFSLocation ( ) { return vfs.getLocation ( ) ; }

Target:
public com.android.sched.vfs.InputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { com.android.sched.vfs.InputVFS currentSectionVFS = getSectionVFS ( fileType ) ; return currentSectionVFS.getRootInputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { p.visitMethodInsn ( opcode , owner , name , desc ) ; super . visitMethodInsn ( opcode , owner , name , desc ) ; }

Target:
public void visitMethodInsn ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { if ( ( api ) >= ( org.objectweb.asm.Opcodes.ASM5 ) ) { super . visitMethodInsn ( opcode , owner , name , desc ) ; return ; } p.visitMethodInsn ( opcode , owner , name , desc ) ; if ( ( mv ) != null ) { mv.visitMethodInsn ( opcode , owner , name , desc ) ; } }
Source:
public void updateHostState ( android.hardware.usb.UsbPort port , android.hardware.usb.UsbPortStatus status ) { boolean hostConnected = ( status.getCurrentDataRole ( ) ) == ( android.hardware.usb.UsbPort.DATA_ROLE_HOST ) ; boolean sourcePower = ( status.getCurrentPowerRole ( ) ) == ( android.hardware.usb.UsbPort.POWER_ROLE_SOURCE ) ; obtainMessage ( com.android.server.usb.UsbDeviceManager.MSG_UPDATE_HOST_STATE , ( hostConnected ? 1 : 0 ) , ( sourcePower ? 1 : 0 ) ) . sendToTarget ( ) ; }

Target:
public void sendMessage ( int what , java.lang.Object arg , boolean arg1 ) { removeMessages ( what ) ; android.os.Message m = android.os.Message.obtain ( this , what ) ; m.obj = arg ; m.arg1 = ( arg1 ) ? 1 : 0 ; sendMessage ( m ) ; }
Source:
public void testConnectWithConfig ( ) { android.net.wifi.nan.ConfigRequest configRequest = new android.net.wifi.nan.ConfigRequest.Builder ( ) . setMasterPreference ( 55 ) . build ( ) ; java.lang.String callingPackage = "com.google.somePackage" ; mDut.connect ( mBinderMock , callingPackage , mCallbackMock , configRequest , false ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . connect ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.eq ( callingPackage ) , org.mockito.Matchers.eq ( mCallbackMock ) , org.mockito.Matchers.eq ( configRequest ) , org.mockito.Matchers.eq ( false ) ) ; }

Target:
public void testConnectWithConfig ( ) { android.net.wifi.aware.ConfigRequest configRequest = new android.net.wifi.aware.ConfigRequest.Builder ( ) . setMasterPreference ( 55 ) . build ( ) ; java.lang.String callingPackage = "com.google.somePackage" ; mDut.connect ( mBinderMock , callingPackage , mCallbackMock , configRequest , false ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . connect ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.eq ( callingPackage ) , org.mockito.Matchers.eq ( mCallbackMock ) , org.mockito.Matchers.eq ( configRequest ) , org.mockito.Matchers.eq ( false ) ) ; }
Source:
synchronized void nScriptInvoke ( long id , int slot ) { validate ( ) ; rsnScriptInvoke ( mContext , id , slot ) ; }

Target:
synchronized void nScriptSetVarVE ( long id , int slot , byte [ ] val , long e , int [ ] dims , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptSetVarVE ( curCon , id , slot , val , e , dims , mUseInc ) ; }
Source:
private void handleUnassociatedParameters ( ) { int szSsaRegs = ssaMeth.getRegCount ( ) ; for ( int ssaReg = 0 ; ssaReg < szSsaRegs ; ssaReg ++ ) { if ( ssaRegsMapped.get ( ssaReg ) ) { continue ; } int paramIndex = getParameterIndexForReg ( ssaReg ) ; com.android.dx.ssa.back.RegisterSpec ssaSpec = getDefinitionSpecForSsaReg ( ssaReg ) ; if ( paramIndex >= 0 ) { addMapping ( ssaSpec , paramIndex ) ; } } }

Target:
private void handleUnassociatedParameters ( ) { int szSsaRegs = ssaMeth.getRegCount ( ) ; for ( int ssaReg = 0 ; ssaReg < szSsaRegs ; ssaReg ++ ) { if ( ssaRegsMapped.get ( ssaReg ) ) { continue ; } int paramIndex = getParameterIndexForReg ( ssaReg ) ; com.android.dx.rop.code.RegisterSpec ssaSpec = getDefinitionSpecForSsaReg ( ssaReg ) ; if ( paramIndex >= 0 ) { addMapping ( ssaSpec , paramIndex ) ; } } }
Source:
public final void updateAAD ( java.nio.ByteBuffer src ) { checkCipherState ( ) ; if ( src == null ) { throw new java.lang.IllegalArgumentException ( "src ByteBuffer is null" ) ; } chooseFirstProvider ( ) ; if ( ( src.remaining ( ) ) == 0 ) { return ; } spi.engineUpdateAAD ( src ) ; }

Target:
public final void updateAAD ( java.nio.ByteBuffer src ) { checkCipherState ( ) ; if ( src == null ) { throw new java.lang.IllegalArgumentException ( "src ByteBuffer is null" ) ; } updateProviderIfNeeded ( ) ; if ( ( src.remaining ( ) ) == 0 ) { return ; } spi.engineUpdateAAD ( src ) ; }
Source:
public void testRemove ( ) { java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; full.remove ( one ) ; assertFalse ( full.contains ( one ) ) ; assertEquals ( 2 , full.size ( ) ) ; }

Target:
public void testRemoveAll ( ) { java.util.Set full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; assertTrue ( full.removeAll ( java.util.Arrays.asList ( one , two ) ) ) ; assertEquals ( 1 , full.size ( ) ) ; assertFalse ( full.removeAll ( java.util.Arrays.asList ( one , two ) ) ) ; assertEquals ( 1 , full.size ( ) ) ; }
Source:
public boolean releaseActivityInstance ( android.os.IBinder token ) { synchronized ( this ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r == null ) { return false ; } return r.task.stack.safelyDestroyActivityLocked ( r , "app-req" ) ; } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }

Target:
public final int startActivityFromRecents ( int taskId , android.os.Bundle bOptions ) { if ( ( checkCallingPermission ( android.Manifest.permission.START_TASKS_FROM_RECENTS ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { java.lang.String msg = "Permission Denial: startActivityFromRecents called without " + ( android.Manifest.permission.START_TASKS_FROM_RECENTS ) ; android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , msg ) ; throw new java.lang.SecurityException ( msg ) ; } final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { return mStackSupervisor.startActivityFromRecentsInner ( taskId , bOptions ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public java.util.Locale.Builder removeUnicodeLocaleAttribute ( java.lang.String attribute ) { try { localeBuilder.removeUnicodeLocaleAttribute ( attribute ) ; } catch ( sun.util.locale.LocaleSyntaxException e ) { throw new java.util.IllformedLocaleException ( e.getMessage ( ) , e.getErrorIndex ( ) ) ; } return this ; }

Target:
public java.util.Locale.Builder removeUnicodeLocaleAttribute ( java.lang.String attribute ) { if ( attribute == null ) { throw new java.lang.NullPointerException ( "attribute == null" ) ; } try { localeBuilder.removeUnicodeLocaleAttribute ( attribute ) ; } catch ( sun.util.locale.LocaleSyntaxException e ) { throw new java.util.IllformedLocaleException ( e.getMessage ( ) , e.getErrorIndex ( ) ) ; } return this ; }
Source:
public android.app.IActivityContainer createVirtualActivityContainer ( android.os.IBinder parentActivityToken , android.app.IActivityContainerCallback callback ) throws android.os.RemoteException { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "createActivityContainer()" ) ; synchronized ( this ) { if ( parentActivityToken == null ) { throw new java.lang.IllegalArgumentException ( "parent token must not be null" ) ; } com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.forTokenLocked ( parentActivityToken ) ; if ( r == null ) { return null ; } if ( callback == null ) { throw new java.lang.IllegalArgumentException ( "callback must not be null" ) ; } return mStackSupervisor.createVirtualActivityContainer ( r , callback ) ; } }

Target:
public void clearGrantedUriPermissions ( java.lang.String packageName , int userId ) { enforceCallingPermission ( android.Manifest.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS , "clearGrantedUriPermissions" ) ; removeUriPermissionsForPackageLocked ( packageName , userId , true ) ; }
Source:
public void test007 ( ) throws java.lang.Exception { compileAndValidate ( com.android.jack.optimizations.lambdas.LambdaTests.PKG_007 , com.android.jack.optimizations.lambdas.LambdaTests.config ( LambdaGroupingScope.TYPE , false , false ) , new com.android.jack.optimizations.lambdas.LambdaClassesValidator ( com.android.jack.optimizations.lambdas.LambdaTests.TEST007_DEFAULT ) ) ; compileAndValidate ( com.android.jack.optimizations.lambdas.LambdaTests.PKG_007 , com.android.jack.optimizations.lambdas.LambdaTests.config ( LambdaGroupingScope.TYPE , true , false ) , new com.android.jack.optimizations.lambdas.LambdaClassesValidator ( com.android.jack.optimizations.lambdas.LambdaTests.TEST007_MERGE_INTERFACES ) ) ; }

Target:
public void test007 ( ) throws java.lang.Exception { compileAndValidate ( com.android.jack.optimizations.lambdas.LambdaTests.PKG_007 , com.android.jack.optimizations.lambdas.LambdaTests.config ( LambdaGroupingScope.TYPE , false , false ) . excludeJillToolchain ( ) , new com.android.jack.optimizations.lambdas.LambdaClassesValidator ( com.android.jack.optimizations.lambdas.LambdaTests.TEST007_DEFAULT ) ) ; compileAndValidate ( com.android.jack.optimizations.lambdas.LambdaTests.PKG_007 , com.android.jack.optimizations.lambdas.LambdaTests.config ( LambdaGroupingScope.TYPE , true , false ) . excludeJillToolchain ( ) , new com.android.jack.optimizations.lambdas.LambdaClassesValidator ( com.android.jack.optimizations.lambdas.LambdaTests.TEST007_MERGE_INTERFACES ) ) ; }
Source:
public boolean isUserRunning ( int userId , boolean orStopped ) { if ( ( checkCallingPermission ( android.Manifest.permission.INTERACT_ACROSS_USERS ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { java.lang.String msg = ( ( ( ( "Permission Denial: isUserRunning() from pid=" + ( android.os.Binder.getCallingPid ( ) ) ) + ", uid=" ) + ( android.os.Binder.getCallingUid ( ) ) ) + " requires " ) + ( android.Manifest.permission.INTERACT_ACROSS_USERS ) ; android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , msg ) ; throw new java.lang.SecurityException ( msg ) ; } synchronized ( this ) { return isUserRunningLocked ( userId , orStopped ) ; } }

Target:
final void runInBackgroundDisabled ( int uid ) { synchronized ( this ) { com.android.server.am.UidRecord uidRec = mActiveUids.get ( uid ) ; if ( uidRec != null ) { if ( uidRec.idle ) { doStopUidLocked ( uidRec.uid , uidRec ) ; } } else { doStopUidLocked ( uid , null ) ; } } }
Source:
private java.net.URL getUrl ( ) { java.lang.String url = getIntent ( ) . getStringExtra ( ConnectivityManager.EXTRA_CAPTIVE_PORTAL_URL ) ; if ( url == null ) { url = mCm.getCaptivePortalServerUrl ( ) ; } try { return new java.net.URL ( url ) ; } catch ( java.net.MalformedURLException e ) { android.util.Log.e ( com.android.captiveportallogin.CaptivePortalLoginActivity.TAG , ( "Invalid captive portal URL " + url ) ) ; } return null ; }

Target:
private java.net.URL getUrl ( ) { java.lang.String url = getIntent ( ) . getStringExtra ( ConnectivityManager.EXTRA_CAPTIVE_PORTAL_URL ) ; if ( url == null ) { url = mCm.getCaptivePortalServerUrl ( ) ; } return com.android.captiveportallogin.CaptivePortalLoginActivity.makeURL ( url ) ; }
Source:
public boolean saveProperties ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.util.Properties props , @ com.android.annotations.NonNull java.lang.String comments ) { java.io.OutputStream fos = null ; try { fos = newFileOutputStream ( file ) ; props.store ( fos , comments ) ; return true ; } catch ( java.io.IOException ignore ) { } finally { if ( fos != null ) { try { fos.close ( ) ; } catch ( java.io.IOException e ) { } } } return false ; }

Target:
public boolean saveProperties ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.util.Properties props , @ com.android.annotations.NonNull java.lang.String comments ) { java.io.OutputStream fos = null ; try { fos = newFileOutputStream ( file ) ; props.store ( fos , comments ) ; return true ; } catch ( java.io.IOException ignore ) { } finally { com.google.common.io.Closeables.closeQuietly ( fos ) ; } return false ; }
Source:
private static java.util.Map < com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType , com.android.server.wifi.hotspot2.anqp.ANQPElement > buildAnqpResult ( ) { java.util.Map < com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType , com.android.server.wifi.hotspot2.anqp.ANQPElement > elements = new java.util.HashMap < > ( ) ; java.util.List < com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType > list = java.util.Arrays.asList ( Constants.ANQPElementType.class . getEnumConstants ( ) ) ; for ( final com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType type : list ) { com.android.server.wifi.hotspot2.anqp.ANQPElement element = new com.android.server.wifi.hotspot2.anqp.ANQPElement ( type ) { @ java.lang.Override public Constants.ANQPElementType getID ( ) { return super . getID ( ) ; } } ; elements.put ( type , element ) ; } return elements ; }

Target:
public void addAndGetEntry ( ) throws java.lang.Exception { mCache.addEntry ( com.android.server.wifi.hotspot2.AnqpCacheTest.ENTRY_KEY , null ) ; com.android.server.wifi.hotspot2.ANQPData data = mCache.getEntry ( com.android.server.wifi.hotspot2.AnqpCacheTest.ENTRY_KEY ) ; org.junit.Assert.assertNotNull ( data ) ; org.junit.Assert.assertTrue ( data.getElements ( ) . isEmpty ( ) ) ; }
Source:
public void run ( ) { appNotResponding ( proc , activity , parent , aboveSystem , annotation ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false , false , false , 0 , "query restart" ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } } }
Source:
private static java.lang.String getErrorMessage ( java.lang.String owner ) { if ( com.android.tools.lint.checks.CleanupDetector.FRAGMENT_MANAGER_CLS.equals ( owner ) ) { return "This transaction should be completed with a commit() call" ; } java.lang.String className = owner.substring ( ( ( owner.lastIndexOf ( '/' ) ) + 1 ) ) ; return java.lang.String.format ( "This %1$s should be recycled after use with #recycle()" , className ) ; }

Target:
private static java.lang.String getErrorMessage ( java.lang.String owner ) { if ( ( com.android.tools.lint.checks.CleanupDetector.FRAGMENT_TRANSACTION_CLS.equals ( owner ) ) || ( com.android.tools.lint.checks.CleanupDetector.FRAGMENT_TRANSACTION_V4_CLS.equals ( owner ) ) ) { return "This transaction should be completed with a commit() call" ; } java.lang.String className = owner.substring ( ( ( owner.lastIndexOf ( '/' ) ) + 1 ) ) ; return java.lang.String.format ( "This %1$s should be recycled after use with #recycle()" , className ) ; }
Source:
public java.lang.String getErrorLog ( ) { java.lang.StringBuilder errorBuilder = new java.lang.StringBuilder ( ) ; if ( ( mErrorLines.size ( ) ) > 0 ) { errorBuilder.append ( ( ( "In " + ( mFileName ) ) + ":\n" ) ) ; } for ( java.lang.String log : mErrorLines ) { errorBuilder.append ( log ) ; } return errorBuilder.toString ( ) ; }

Target:
public java.lang.String getErrorLog ( ) { java.lang.StringBuilder errorBuilder = new java.lang.StringBuilder ( ) ; if ( ! ( mErrorLines.isEmpty ( ) ) ) { errorBuilder.append ( ( ( "In " + ( mFileName ) ) + ":\n" ) ) ; } for ( java.lang.String log : mErrorLines ) { errorBuilder.append ( log ) ; } return errorBuilder.toString ( ) ; }
Source:
public static void startBinding ( android.content.Context context , java.lang.String serviceAction , android.content.ServiceConnection serviceConnection ) throws android.telephony.mbms.MbmsException { android.content.Intent bindIntent = new android.content.Intent ( ) ; android.content.pm.ServiceInfo mbmsServiceInfo = android.telephony.mbms.MbmsUtils.getMiddlewareServiceInfo ( context , serviceAction ) ; if ( mbmsServiceInfo == null ) { throw new android.telephony.mbms.MbmsException ( MbmsException.ERROR_NO_UNIQUE_MIDDLEWARE ) ; } bindIntent.setComponent ( android.telephony.mbms.MbmsUtils.toComponentName ( mbmsServiceInfo ) ) ; context.bindService ( bindIntent , serviceConnection , Context.BIND_AUTO_CREATE ) ; }

Target:
public static int startBinding ( android.content.Context context , java.lang.String serviceAction , android.content.ServiceConnection serviceConnection ) { android.content.Intent bindIntent = new android.content.Intent ( ) ; android.content.pm.ServiceInfo mbmsServiceInfo = android.telephony.mbms.MbmsUtils.getMiddlewareServiceInfo ( context , serviceAction ) ; if ( mbmsServiceInfo == null ) { return MbmsException.ERROR_NO_UNIQUE_MIDDLEWARE ; } bindIntent.setComponent ( android.telephony.mbms.MbmsUtils.toComponentName ( mbmsServiceInfo ) ) ; context.bindService ( bindIntent , serviceConnection , Context.BIND_AUTO_CREATE ) ; return MbmsException.SUCCESS ; }
Source:
public void onFeatureReady ( ) { android.util.Log.i ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , "onFeatureReady called!" ) ; android.content.IntentFilter intentFilter = new android.content.IntentFilter ( com.android.ims.ImsManager.ACTION_IMS_INCOMING_CALL ) ; mContext.registerReceiver ( mReceiver , intentFilter ) ; try { mSessionId = mCompatFeature.startSession ( createIncomingCallPendingIntent ( ) , null ) ; mCompatFeature.addRegistrationListener ( mListener ) ; mCompatFeature.addRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "Couldn't start compat feature: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public void onFeatureRemoved ( ) { mContext.unregisterReceiver ( mReceiver ) ; try { mCompatFeature.endSession ( mSessionId ) ; mCompatFeature.removeRegistrationListener ( mListener ) ; if ( ( mRegCompatAdapter ) != null ) { mCompatFeature.removeRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "onFeatureRemoved: Couldn't end session: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
protected boolean generateSourceProperties ( com.android.sdklib.internal.repository.archives.Archive archive , java.io.File unzipDestFolder ) { java.util.Properties props = new java.util.Properties ( ) ; archive.saveProperties ( props ) ; java.lang.Package pkg = archive.getParentPackage ( ) ; if ( pkg != null ) { pkg.saveProperties ( props ) ; } try { mFileOp.saveProperties ( new java.io.File ( unzipDestFolder , com.android.SdkConstants.FN_SOURCE_PROP ) , props , "## Android Tool: Source of this archive." ) ; return true ; } catch ( java.io.IOException ignore ) { return false ; } }

Target:
public synchronized java.util.Enumeration < java.lang.Object > keys ( ) { java.util.Set < java.lang.Object > sortedSet = new java.util.TreeSet < java.lang.Object > ( keySet ( ) ) ; final java.util.Iterator < java.lang.Object > it = sortedSet.iterator ( ) ; return new java.util.Enumeration < java.lang.Object > ( ) { @ java.lang.Override public boolean hasMoreElements ( ) { return it.hasNext ( ) ; } @ java.lang.Override public java.lang.Object nextElement ( ) { return it.next ( ) ; } } ; }
Source:
protected void createNotificationChannel ( ) { android.app.NotificationManager mNotificationManager = ( ( android.app.NotificationManager ) ( getSystemService ( Context.NOTIFICATION_SERVICE ) ) ) ; java.lang.CharSequence name = getString ( R.string.notification_channel_name ) ; java.lang.String description = getString ( R.string.notification_channel_description ) ; int importance = android.app.NotificationManager.IMPORTANCE_DEFAULT ; android.app.NotificationChannel channel = new android.app.NotificationChannel ( com.googlecode.android_scripting.activity.TriggerService.CHANNEL_ID , name , importance ) ; channel.setDescription ( description ) ; channel.enableLights ( false ) ; channel.enableVibration ( false ) ; mNotificationManager.createNotificationChannel ( channel ) ; }

Target:
protected void createNotificationChannel ( ) { android.app.NotificationManager notificationManager = getNotificationManager ( ) ; java.lang.CharSequence name = getString ( R.string.notification_channel_name ) ; java.lang.String description = getString ( R.string.notification_channel_description ) ; int importance = android.app.NotificationManager.IMPORTANCE_DEFAULT ; android.app.NotificationChannel channel = new android.app.NotificationChannel ( com.googlecode.android_scripting.activity.TriggerService.CHANNEL_ID , name , importance ) ; channel.setDescription ( description ) ; channel.enableLights ( false ) ; channel.enableVibration ( false ) ; notificationManager.createNotificationChannel ( channel ) ; }
Source:
final void get ( long [ ] dst , int dstOffset , int longCount ) { int byteCount = checkGetBounds ( SizeOf.LONG , dst.length , dstOffset , longCount ) ; this . block.peekLongArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , longCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void get ( long [ ] dst , int dstOffset , int longCount ) { checkNotFreed ( ) ; int byteCount = checkGetBounds ( SizeOf.LONG , dst.length , dstOffset , longCount ) ; this . block.peekLongArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , longCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void testStageInstallWithErrorCode_withNewerDistroVersion ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_FORMAT_VERSION , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withNewerDistroVersion ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_FORMAT_VERSION , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public void checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , javax.net.ssl.SSLEngine engine ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = engine.getHandshakeSession ( ) ; if ( session == null ) { throw new java.security.cert.CertificateException ( "Not in handshake; no session available" ) ; } checkTrusted ( chain , authType , session , engine.getSSLParameters ( ) , false ) ; }

Target:
public void checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { getTrustedChainForServer ( chain , authType , socket ) ; }
Source:
public void enableVerboseLogging ( int verbose ) { enforceAccessPermission ( ) ; mFacade.setIntegerSetting ( mContext , Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED , verbose ) ; enableVerboseLoggingInternal ( verbose ) ; }

Target:
public void enableVerboseLogging ( int verbose ) { enforceAccessPermission ( ) ; mLog.trace ( "enableVerboseLogging uid=% verbose=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . c ( verbose ) . flush ( ) ; mFacade.setIntegerSetting ( mContext , Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED , verbose ) ; enableVerboseLoggingInternal ( verbose ) ; }
Source:
public java.lang.reflect.Type getGenericType ( ) { java.lang.String signatureAttribute = libcore.reflect.AnnotationAccess.getSignature ( this ) ; java.lang.Class < ? > declaringClass = getDeclaringClass ( ) ; java.lang.ClassLoader cl = declaringClass.getClassLoader ( ) ; libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( cl ) ; parser.parseForField ( declaringClass , signatureAttribute ) ; java.lang.reflect.Type genericType = parser.fieldType ; if ( genericType == null ) { genericType = getType ( ) ; } return genericType ; }

Target:
public java.lang.reflect.Type getGenericType ( ) { java.lang.String signatureAttribute = getSignatureAttribute ( ) ; java.lang.Class < ? > declaringClass = getDeclaringClass ( ) ; java.lang.ClassLoader cl = declaringClass.getClassLoader ( ) ; libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( cl ) ; parser.parseForField ( declaringClass , signatureAttribute ) ; java.lang.reflect.Type genericType = parser.fieldType ; if ( genericType == null ) { genericType = getType ( ) ; } return genericType ; }
Source:
public com.ibm.icu.text.DisplayContext getContext ( com.ibm.icu.text.DisplayContext.Type type ) { com.ibm.icu.text.DisplayContext result ; switch ( type ) { case DIALECT_HANDLING : result = ( ( dialectHandling ) == ( DialectHandling.STANDARD_NAMES ) ) ? com.ibm.icu.text.DisplayContext.STANDARD_NAMES : com.ibm.icu.text.DisplayContext.DIALECT_NAMES ; break ; case CAPITALIZATION : result = capitalization ; break ; case DISPLAY_LENGTH : result = nameLength ; break ; default : result = com.ibm.icu.text.DisplayContext.STANDARD_NAMES ; break ; } return result ; }

Target:
public com.ibm.icu.text.DisplayContext getContext ( com.ibm.icu.text.DisplayContext.Type type ) { com.ibm.icu.text.DisplayContext result ; switch ( type ) { case DIALECT_HANDLING : result = ( ( dialectHandling ) == ( DialectHandling.STANDARD_NAMES ) ) ? com.ibm.icu.text.DisplayContext.STANDARD_NAMES : com.ibm.icu.text.DisplayContext.DIALECT_NAMES ; break ; case CAPITALIZATION : result = capitalization ; break ; case DISPLAY_LENGTH : result = nameLength ; break ; case SUBSTITUTE_HANDLING : result = substituteHandling ; break ; default : result = com.ibm.icu.text.DisplayContext.STANDARD_NAMES ; break ; } return result ; }
Source:
private void checkPendingIntent ( android.app.PendingIntent intent ) { if ( intent == null ) { throw new java.lang.IllegalArgumentException ( ( "invalid pending intent: " + intent ) ) ; } if ( ! ( intent.isTargetedToPackage ( ) ) ) { java.lang.IllegalArgumentException e = new java.lang.IllegalArgumentException ( "pending intent msut be targeted to package" ) ; if ( ( mContext.getApplicationInfo ( ) . targetSdkVersion ) > ( Build.VERSION_CODES.JELLY_BEAN ) ) { throw e ; } else { android.util.Log.w ( android.location.LocationManager.TAG , e ) ; } } }

Target:
private void checkPendingIntent ( android.app.PendingIntent intent ) { if ( intent == null ) { throw new java.lang.IllegalArgumentException ( ( "invalid pending intent: " + intent ) ) ; } if ( ! ( intent.isTargetedToPackage ( ) ) ) { java.lang.IllegalArgumentException e = new java.lang.IllegalArgumentException ( "pending intent must be targeted to package" ) ; if ( ( mContext.getApplicationInfo ( ) . targetSdkVersion ) > ( Build.VERSION_CODES.JELLY_BEAN ) ) { throw e ; } else { android.util.Log.w ( android.location.LocationManager.TAG , e ) ; } } }
Source:
public void testEmptyXml ( ) throws java.lang.Exception { java.lang.String document = "<?xml version=\"1.0\"?>" ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "Premature end of file.*" , e.getMessage ( ) ) ; return ; } handler.verify ( ) ; fail ( ) ; }

Target:
public void testEmptyXml ( ) throws java.lang.Exception { java.lang.String document = "<?xml version=\"1.0\"?>" ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler handler = new com.android.sdklib.repository.SdkRepositoryTest.CaptureErrorHandler ( ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , handler ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "Premature end of file.*" , e.getMessage ( ) ) ; return ; } handler.verify ( ) ; fail ( ) ; }
Source:
private void libToCommon ( @ javax.annotation.Nonnull java.io.File ... in ) throws java.lang.Exception { apiV01Config.setClasspath ( classpath ) ; java.util.List < java.io.File > importedLibs = new java.util.ArrayList < java.io.File > ( staticLibs ) ; java.util.Collections.addAll ( importedLibs , in ) ; apiV01Config.setImportedJackLibraryFiles ( importedLibs ) ; apiV01Config.setResourceDirs ( resImport ) ; apiV01Config.setProguardConfigFiles ( proguardFlags ) ; if ( ( jarjarRules ) != null ) { apiV01Config.setJarJarConfigFile ( jarjarRules ) ; } }

Target:
private void libToCommon ( @ javax.annotation.Nonnull java.io.File ... in ) throws java.lang.Exception { apiV01Config.setClasspath ( classpath ) ; java.util.List < java.io.File > importedLibs = new java.util.ArrayList < java.io.File > ( staticLibs ) ; java.util.Collections.addAll ( importedLibs , in ) ; apiV01Config.setImportedJackLibraryFiles ( importedLibs ) ; apiV01Config.setResourceDirs ( resImport ) ; apiV01Config.setProguardConfigFiles ( proguardFlags ) ; if ( ( jarjarRules ) != null ) { apiV01Config.setJarJarConfigFiles ( jarjarRules ) ; } }
Source:
public static com.android.internal.telephony.uicc.UiccController make ( android.content.Context c , com.android.internal.telephony.CommandsInterface [ ] ci ) { synchronized ( com.android.internal.telephony.uicc.UiccController.mLock ) { if ( ( com.android.internal.telephony.uicc.UiccController.mInstance ) != null ) { throw new java.lang.RuntimeException ( "MSimUiccController.make() should only be called once" ) ; } com.android.internal.telephony.uicc.UiccController.mInstance = new com.android.internal.telephony.uicc.UiccController ( c , ci ) ; return com.android.internal.telephony.uicc.UiccController.mInstance ; } }

Target:
public static com.android.internal.telephony.uicc.UiccController make ( android.content.Context c , com.android.internal.telephony.CommandsInterface [ ] ci ) { synchronized ( com.android.internal.telephony.uicc.UiccController.mLock ) { if ( ( com.android.internal.telephony.uicc.UiccController.mInstance ) != null ) { throw new java.lang.RuntimeException ( "UiccController.make() should only be called once" ) ; } com.android.internal.telephony.uicc.UiccController.mInstance = new com.android.internal.telephony.uicc.UiccController ( c , ci ) ; return com.android.internal.telephony.uicc.UiccController.mInstance ; } }
Source:
public void testGetActivitiesForNonProfileFails ( ) throws java.lang.Exception { if ( ! ( mMultiUserSupported ) ) { return ; } installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testGetActivitiesForUserFails" , 0 , ( "-e testUser " + ( mSecondaryUserSerialNumber ) ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }

Target:
public void testNoLauncherCallbackPackageAddedSecondaryUser ( ) throws java.lang.Exception { if ( ( ! ( mMultiUserSupported ) ) || ( mHasLiveTvFeature ) ) { return ; } startCallbackService ( ) ; installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testNoPackageAddedCallbackForUser" , 0 , ( "-e testUser " + ( mSecondaryUserSerialNumber ) ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }
Source:
void reset ( ) { java.util.Locale.setDefault ( mDefaultLocale ) ; java.lang.System.setProperty ( "user.home" , mUserHome ) ; java.lang.System.setProperty ( "java.io.tmpdir" , mJavaIoTmpDir ) ; java.net.Authenticator.setDefault ( null ) ; java.net.CookieHandler.setDefault ( null ) ; java.net.ResponseCache.setDefault ( null ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( mHostnameVerifier ) ; javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory ( mSslSocketFactory ) ; }

Target:
void reset ( ) { java.util.Locale.setDefault ( mDefaultLocale ) ; java.util.TimeZone.setDefault ( mDefaultTimeZone ) ; java.lang.System.setProperty ( "user.home" , mUserHome ) ; java.lang.System.setProperty ( "java.io.tmpdir" , mJavaIoTmpDir ) ; java.net.Authenticator.setDefault ( null ) ; java.net.CookieHandler.setDefault ( null ) ; java.net.ResponseCache.setDefault ( null ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( mHostnameVerifier ) ; javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory ( mSslSocketFactory ) ; }
Source:
synchronized boolean replyReport ( byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( "replyReport(): type=" + type ) + " id=" ) + id ) ) ; return replyReportNative ( type , id , data ) ; }

Target:
synchronized boolean replyReport ( android.bluetooth.BluetoothDevice device , byte type , byte id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( ( ( "replyReport(): device=" + device ) + " type=" ) + type ) + " id=" ) + id ) ) ; if ( ! ( checkDevice ( device ) ) ) { return false ; } return replyReportNative ( type , id , data ) ; }
Source:
public java.lang.String getStringValue ( ) throws com.android.apksigner.AndroidBinXmlParser.XmlParserException { switch ( mValueType ) { case com.android.apksigner.AndroidBinXmlParser.Attribute.TYPE_STRING : return mStringPool.getString ( ( ( mValueData ) & 4294967295L ) ) ; case com.android.apksigner.AndroidBinXmlParser.Attribute.TYPE_INT_DEC : return java.lang.Integer.toString ( mValueData ) ; case com.android.apksigner.AndroidBinXmlParser.Attribute.TYPE_INT_HEX : return "0x" + ( java.lang.Integer.toHexString ( mValueData ) ) ; case com.android.apksigner.AndroidBinXmlParser.Attribute.TYPE_INT_BOOLEAN : return java.lang.Boolean.toString ( ( ( mValueData ) != 0 ) ) ; case com.android.apksigner.AndroidBinXmlParser.Attribute.TYPE_REFERENCE : return "@" + ( java.lang.Integer.toHexString ( mValueData ) ) ; default : throw new com.android.apksigner.AndroidBinXmlParser.XmlParserException ( ( "Cannot coerce to string: value type " + ( mValueType ) ) ) ; } }

Target:
public java.lang.String getStringValue ( ) throws com.android.apksig.apk.AndroidBinXmlParser.XmlParserException { switch ( mValueType ) { case com.android.apksig.apk.AndroidBinXmlParser.Attribute.TYPE_STRING : return mStringPool.getString ( ( ( mValueData ) & 4294967295L ) ) ; case com.android.apksig.apk.AndroidBinXmlParser.Attribute.TYPE_INT_DEC : return java.lang.Integer.toString ( mValueData ) ; case com.android.apksig.apk.AndroidBinXmlParser.Attribute.TYPE_INT_HEX : return "0x" + ( java.lang.Integer.toHexString ( mValueData ) ) ; case com.android.apksig.apk.AndroidBinXmlParser.Attribute.TYPE_INT_BOOLEAN : return java.lang.Boolean.toString ( ( ( mValueData ) != 0 ) ) ; case com.android.apksig.apk.AndroidBinXmlParser.Attribute.TYPE_REFERENCE : return "@" + ( java.lang.Integer.toHexString ( mValueData ) ) ; default : throw new com.android.apksig.apk.AndroidBinXmlParser.XmlParserException ( ( "Cannot coerce to string: value type " + ( mValueType ) ) ) ; } }
Source:
public void testNonResizeableNotDocked ( ) throws java.lang.Exception { launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.NON_RESIZEABLE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.NON_RESIZEABLE_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertDoesNotContainStack ( "Must not contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; mAmWmState.assertFrontStack ( "Fullscreen stack must be front stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }

Target:
public void testNonResizeableNotDocked ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no split multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.NON_RESIZEABLE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.NON_RESIZEABLE_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertDoesNotContainStack ( "Must not contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; mAmWmState.assertFrontStack ( "Fullscreen stack must be front stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }
Source:
private void test_dropSourceSpecific_twice ( java.net.InetAddress groupAddress , java.net.InetAddress sourceAddress , java.net.NetworkInterface networkInterface ) throws java.lang.Exception { if ( ! ( supportsMulticast ) ) { return ; } java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; java.nio.channels.MembershipKey membershipKey = dc.join ( groupAddress , networkInterface , sourceAddress ) ; assertTrue ( membershipKey.isValid ( ) ) ; membershipKey.drop ( ) ; assertFalse ( membershipKey.isValid ( ) ) ; membershipKey.drop ( ) ; dc.close ( ) ; }

Target:
private void check_dropSourceSpecific_twice ( java.net.InetAddress groupAddress , java.net.InetAddress sourceAddress , java.net.NetworkInterface networkInterface ) throws java.lang.Exception { if ( ! ( supportsMulticast ) ) { return ; } java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; java.nio.channels.MembershipKey membershipKey = dc.join ( groupAddress , networkInterface , sourceAddress ) ; assertTrue ( membershipKey.isValid ( ) ) ; membershipKey.drop ( ) ; assertFalse ( membershipKey.isValid ( ) ) ; membershipKey.drop ( ) ; dc.close ( ) ; }
Source:
public android.telephony.VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings ( java.lang.String packageName , int subId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getSystemVisualVoicemailSmsFilterSettings ( packageName , subId ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }

Target:
public java.lang.String getVisualVoicemailPackageName ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getVisualVoicemailPackageName ( mContext.getOpPackageName ( ) , getSubId ( ) ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }