auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected synchronized byte [ ] engineGenerateSeed ( int numBytes ) { byte [ ] myBytes ; if ( numBytes < 0 ) { throw new java.lang.NegativeArraySizeException ( java.lang.Integer.toString ( numBytes ) ) ; } if ( numBytes == 0 ) { return libcore.util.EmptyArray.BYTE ; } if ( ( org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom ) == null ) { org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom = new org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl ( ) ; org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom.engineSetSeed ( org.apache.harmony.security.provider.crypto.RandomBitsSupplier.getRandomBits ( org.apache.harmony.security.provider.crypto.DIGEST_LENGTH ) ) ; } myBytes = new byte [ numBytes ] ; org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom.engineNextBytes ( myBytes ) ; return myBytes ; }

Target:
protected synchronized byte [ ] engineGenerateSeed ( int numBytes ) { byte [ ] myBytes ; if ( numBytes < 0 ) { throw new java.lang.NegativeArraySizeException ( java.lang.Integer.toString ( numBytes ) ) ; } if ( numBytes == 0 ) { return libcore.util.EmptyArray.BYTE ; } if ( ( org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom ) == null ) { org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom = new org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl ( ) ; org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom.engineSetSeed ( org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.getRandomBytes ( org.apache.harmony.security.provider.crypto.DIGEST_LENGTH ) ) ; } myBytes = new byte [ numBytes ] ; org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.myRandom.engineNextBytes ( myBytes ) ; return myBytes ; }
Source:
public void onTargetChange ( ) { com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData targetData = mConfigComposite.onXmlModelLoaded ( ) ; if ( targetData != null ) { com.android.ide.common.layoutlib.LayoutLibrary layoutLib = targetData.getLayoutLibrary ( ) ; setClippingSupport ( layoutLib.supports ( Capability.UNBOUND_RENDERING ) ) ; } mConfigListener.onConfigurationChange ( ) ; }

Target:
private void updateCapabilities ( com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData targetData ) { if ( targetData != null ) { com.android.ide.common.rendering.LayoutLibrary layoutLib = targetData.getLayoutLibrary ( ) ; setClippingSupport ( layoutLib.supports ( Capability.UNBOUND_RENDERING ) ) ; if ( ( ( mIncludedWithin ) != null ) && ( ! ( layoutLib.supports ( Capability.EMBEDDED_LAYOUT ) ) ) ) { showIn ( null ) ; } } }
Source:
private void initEnumOptimizationMarkers ( @ javax.annotation.Nonnull java.util.Set < com.android.jack.ir.ast.JDefinedEnum > enumsType ) { for ( com.android.jack.ir.ast.JDefinedEnum enumType : enumsType ) { if ( enumType.containsMarker ( com.android.jack.transformations.enums.opt.EnumOptimizationMarker.class ) ) { continue ; } com.android.jack.transformations.enums.opt.EnumOptimizationMarker enumOptMarker = new com.android.jack.transformations.enums.opt.EnumOptimizationMarker ( ) ; enumType.addMarker ( enumOptMarker ) ; for ( com.android.jack.ir.ast.JField enumField : enumType.getFields ( ) ) { if ( ! ( enumField instanceof com.android.jack.ir.ast.JEnumField ) ) { continue ; } enumOptMarker.addEnumField ( ( ( com.android.jack.ir.ast.JEnumField ) ( enumField ) ) ) ; } } }

Target:
private void initEnumFieldMarkers ( @ javax.annotation.Nonnull java.util.Set < com.android.jack.ir.ast.JDefinedEnum > enumsType ) { for ( com.android.jack.ir.ast.JDefinedEnum enumType : enumsType ) { if ( enumType.containsMarker ( com.android.jack.transformations.enums.opt.EnumFieldMarker.class ) ) { continue ; } com.android.jack.transformations.enums.opt.EnumFieldMarker enumFieldMarker = new com.android.jack.transformations.enums.opt.EnumFieldMarker ( ) ; enumType.addMarker ( enumFieldMarker ) ; for ( com.android.jack.ir.ast.JField enumField : enumType.getFields ( ) ) { if ( ! ( enumField instanceof com.android.jack.ir.ast.JEnumField ) ) { continue ; } enumFieldMarker.addEnumField ( ( ( com.android.jack.ir.ast.JEnumField ) ( enumField ) ) ) ; } } }
Source:
com.android.server.timezone.PackageStatus getPackageStatus ( ) { synchronized ( this ) { try { return getPackageStatusInternal ( ) ; } catch ( java.text.ParseException e ) { android.util.Slog.e ( com.android.server.timezone.PackageStatusStorage.LOG_TAG , "Package status invalid, resetting and retrying" , e ) ; recoverFromBadData ( e ) ; try { return getPackageStatusInternal ( ) ; } catch ( java.text.ParseException e2 ) { throw new java.lang.IllegalStateException ( "Recovery from bad file failed" , e2 ) ; } } } }

Target:
com.android.server.timezone.PackageStatus getPackageStatus ( ) { synchronized ( this ) { try { return getPackageStatusLocked ( ) ; } catch ( java.text.ParseException e ) { android.util.Slog.e ( com.android.server.timezone.PackageStatusStorage.LOG_TAG , "Package status invalid, resetting and retrying" , e ) ; recoverFromBadData ( e ) ; try { return getPackageStatusLocked ( ) ; } catch ( java.text.ParseException e2 ) { throw new java.lang.IllegalStateException ( "Recovery from bad file failed" , e2 ) ; } } } }
Source:
public void enableAutoConnect ( boolean enable ) { if ( enable ) { doBooleanCommand ( "STA_AUTOCONNECT 1" ) ; } else { doBooleanCommand ( "STA_AUTOCONNECT 0" ) ; } }

Target:
public boolean startWpsPbc ( java.lang.String iface , java.lang.String bssid ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.startWpsPbc ( iface , bssid ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doBooleanCommandNative ( ( ( "IFNAME=" + iface ) + " WPS_PBC" ) ) ; } else { return doBooleanCommandNative ( ( ( ( "IFNAME=" + iface ) + " WPS_PBC " ) + bssid ) ) ; } } } }
Source:
public void verifyCertificateChain ( byte [ ] [ ] asn1DerEncodedCertificateChain , java.lang.String authMethod ) throws java.security.cert.CertificateException { if ( org.conscrypt.NativeCryptoTest.DEBUG ) { java.lang.System.out.println ( ( ( ( ( ( ( "ssl=0x" + ( java.lang.Long.toString ( sslNativePointer , 16 ) ) ) + " verifyCertificateChain" ) + " asn1DerEncodedCertificateChain=" ) + asn1DerEncodedCertificateChain ) + " authMethod=" ) + authMethod ) ) ; } this . asn1DerEncodedCertificateChain = asn1DerEncodedCertificateChain ; this . authMethod = authMethod ; this . verifyCertificateChainCalled = true ; }

Target:
public void verifyCertificateChain ( long [ ] certChainRefs , java.lang.String authMethod ) throws java.security.cert.CertificateException { if ( org.conscrypt.NativeCryptoTest.DEBUG ) { java.lang.System.out.println ( ( ( ( ( ( ( "ssl=0x" + ( java.lang.Long.toString ( sslNativePointer , 16 ) ) ) + " verifyCertificateChain" ) + " asn1DerEncodedCertificateChain=" ) + ( java.util.Arrays.toString ( certChainRefs ) ) ) + " authMethod=" ) + authMethod ) ) ; } this . certificateChainRefs = certChainRefs ; this . authMethod = authMethod ; this . verifyCertificateChainCalled = true ; }
Source:
public java.lang.String getListDescription ( ) { boolean isDefaultTag = SystemImage.DEFAULT_TAG.equals ( mTag ) ; return java.lang.String.format ( "%1$s%2$s System Image%3$s" , ( isDefaultTag ? "" : ( mTag.getDisplay ( ) ) + " " ) , getAbiDisplayName ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; }

Target:
public java.lang.String getListDescription ( ) { boolean isDefaultTag = SystemImage.DEFAULT_TAG.equals ( mTag ) ; return java.lang.String.format ( "%1$s%2$sSystem Image%3$s" , ( isDefaultTag ? "" : ( mTag.getDisplay ( ) ) + " " ) , ( isDefaultTag ? ( getAbiDisplayName ( ) ) + " " : "" ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER1_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER2_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER3_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER1_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER2_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER3_PKG , getPrimaryUserId ( ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mSupportsBackup = getDevice ( ) . hasFeature ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.FEATURE_BACKUP ) ; if ( mSupportsBackup ) { clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER1_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER2_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.LAUNCHER3_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER1_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER2_PKG , getPrimaryUserId ( ) ) ; clearShortcuts ( android.content.pm.cts.shortcuthost.ShortcutManagerBackupTest.PUBLISHER3_PKG , getPrimaryUserId ( ) ) ; } }
Source:
public void testImportEmptyLibrary ( ) throws java.lang.Exception { java.io.File lib = createEmptyLibrary ( ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.addStaticLibs ( lib ) ; toolchain.srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "library001" , ".jack" ) , true , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.library.test001.jack" ) ) ; }

Target:
public void testImportEmptyLibrary ( ) throws java.lang.Exception { java.io.File lib = createEmptyLibrary ( ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.addStaticLibs ( lib ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "library001" , ".jack" ) , true , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.library.test001.jack" ) ) ; }
Source:
public void test_run_for_SimpleTest2_limiting_to_1method_with_both_run_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.lang.String actionName = "actionName" ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , actionName , "testSimple3" , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , new java.lang.String [ ] { "testSimple2" } ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple2" ) , actionName ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest2_limiting_to_1method_with_both_run_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , "testSimple3" , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , new java.lang.String [ ] { "testSimple2" } ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( vogar.target.junit.JUnitRunner.class , ( ( target.getName ( ) ) + "#testSimple2" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
protected java.lang.String getName ( ) { return com.android.bluetooth.hfp.HeadsetService.TAG ; }

Target:
void removeStateMachine ( android.bluetooth.BluetoothDevice device ) { synchronized ( mStateMachines ) { com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , ( ( "removeStateMachine(), " + device ) + " does not have a state machine" ) ) ; return ; } android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , ( "removeStateMachine(), removing state machine for device: " + device ) ) ; com.android.bluetooth.hfp.HeadsetObjectsFactory.getInstance ( ) . destroyStateMachine ( stateMachine ) ; mStateMachines.remove ( device ) ; } }
Source:
public static com.android.volley.RequestQueue newRequestQueue ( android.content.Context context ) { return com.android.volley.toolbox.Volley.newRequestQueue ( context , null ) ; }

Target:
private static com.android.volley.RequestQueue newRequestQueue ( android.content.Context context , com.android.volley.Network network ) { java.io.File cacheDir = new java.io.File ( context.getCacheDir ( ) , com.android.volley.toolbox.Volley.DEFAULT_CACHE_DIR ) ; com.android.volley.RequestQueue queue = new com.android.volley.RequestQueue ( new com.android.volley.toolbox.DiskBasedCache ( cacheDir ) , network ) ; queue.start ( ) ; return queue ; }
Source:
public void testGettersAndHandleUserSwitch ( ) { for ( android.net.wifi.WifiConfiguration config : com.android.server.wifi.ConfigurationMapTest.CONFIGS ) { org.junit.Assert.assertNull ( mConfigs.put ( config ) ) ; } verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; switchUser ( 10 ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; switchUser ( 11 ) ; verifyGetters ( com.android.server.wifi.ConfigurationMapTest.CONFIGS ) ; }

Target:
public void addNetworks ( java.util.List < android.net.wifi.WifiConfiguration > configs ) { for ( android.net.wifi.WifiConfiguration config : configs ) { org.junit.Assert.assertNull ( mConfigs.put ( config ) ) ; } }
Source:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Settings" ) ; android.support.test.uiautomator.UiScrollable itemList = new android.support.test.uiautomator.UiScrollable ( new android.support.test.uiautomator.UiSelector ( ) . resourceIdMatches ( Res.SETTINGS_LIST_CONTAINER_RES ) ) ; itemList.setAsVerticalList ( ) ; android.support.test.uiautomator.UiObject item = itemList.getChildByText ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.TextView" ) , "Apps" ) ; item.clickAndWaitForNewWindow ( ) ; }

Target:
public static void openAppList ( android.app.Instrumentation instrumentation ) throws android.support.test.uiautomator.UiObjectNotFoundException { com.android.devtools.systemimage.uitest.utils.SettingsUtil.openItem ( instrumentation , "Apps" ) ; }
Source:
private void scanBitmap ( com.android.tools.lint.detector.api.Context context , org.w3c.dom.Element element ) { java.lang.String tileMode = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_TILE_MODE ) ; if ( ! ( ( tileMode.equals ( com.android.SdkConstants.VALUE_DISABLED ) ) || ( ( tileMode.length ( ) ) == 0 ) ) ) { if ( ( mValidDrawables ) != null ) { java.lang.String resource = getDrawableResource ( context.file ) ; mValidDrawables.remove ( resource ) ; } } }

Target:
private void scanBitmap ( com.android.tools.lint.detector.api.Context context , org.w3c.dom.Element element ) { java.lang.String tileMode = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_TILE_MODE ) ; if ( ! ( ( tileMode.equals ( com.android.SdkConstants.VALUE_DISABLED ) ) || ( tileMode.isEmpty ( ) ) ) ) { if ( ( mValidDrawables ) != null ) { java.lang.String resource = com.android.tools.lint.checks.OverdrawDetector.getDrawableResource ( context.file ) ; mValidDrawables.remove ( resource ) ; } } }
Source:
static java.util.List < com.android.jack.ir.ast.JInterface > normalizeInterfaces ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JLambda > lambdas ) { java.util.ArrayList < com.android.jack.ir.ast.JInterface > interfaces = new java.util.ArrayList < > ( ) ; for ( com.android.jack.ir.ast.JLambda lambda : lambdas ) { interfaces.addAll ( lambda.getInterfaceBounds ( ) ) ; interfaces.add ( lambda.getType ( ) ) ; } return new java.util.ArrayList ( com.android.jack.transformations.lambda.LambdaInterfaceSignature.getNormalizedInterfacesMap ( interfaces ) . values ( ) ) ; }

Target:
static java.util.List < com.android.jack.ir.ast.JInterface > normalizeInterfaces ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.JLambda > lambdas ) { java.util.ArrayList < com.android.jack.ir.ast.JInterface > interfaces = new java.util.ArrayList < > ( ) ; for ( com.android.jack.ir.ast.JLambda lambda : lambdas ) { interfaces.addAll ( com.android.jack.transformations.lambda.LambdaInterfaceSignature.extractOrderedInterfaces ( lambda ) ) ; } return new java.util.ArrayList ( com.android.jack.transformations.lambda.LambdaInterfaceSignature.getNormalizedInterfacesMap ( interfaces ) . values ( ) ) ; }
Source:
public void testInstall_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( bundle.getBytes ( ) ) ) ; assertBundleInstalled ( bundle ) ; }

Target:
public void testInstall_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertBundleInstalled ( bundle ) ; }
Source:
public void addU8 ( short v ) { if ( ( v < 0 ) || ( v > 255 ) ) { throw new java.lang.IllegalArgumentException ( "Saving value out of range for type" ) ; } mData [ ( ( mPos ) ++ ) ] = ( ( byte ) ( v ) ) ; }

Target:
public void addU8 ( short v ) { if ( ( v < 0 ) || ( v > 255 ) ) { android.util.Log.e ( "rs" , ( ( "FieldPacker.addU8( " + v ) + " )" ) ) ; throw new java.lang.IllegalArgumentException ( "Saving value out of range for type" ) ; } mData [ ( ( mPos ) ++ ) ] = ( ( byte ) ( v ) ) ; }
Source:
public void testSecureRandomImplementationOrder ( ) { java.security.Provider srp = new libcore.java.security.ProviderTest.SRProvider ( ) ; try { int position = java.security.Security.insertProviderAt ( srp , 1 ) ; assertEquals ( 1 , position ) ; java.security.SecureRandom sr = new java.security.SecureRandom ( ) ; if ( ! ( sr.getAlgorithm ( ) . equals ( "SecureRandom1" ) ) ) { throw new java.lang.IllegalStateException ( "Expected SecureRandom1" ) ; } } finally { java.security.Security.removeProvider ( srp.getName ( ) ) ; } }

Target:
public void testSecureRandomImplementationOrder ( ) { java.security.Provider srp = new libcore.java.security.ProviderTest.SRProvider ( ) ; try { int position = java.security.Security.insertProviderAt ( srp , 1 ) ; assertEquals ( 1 , position ) ; java.security.SecureRandom sr = new java.security.SecureRandom ( ) ; if ( ! ( sr.getAlgorithm ( ) . equals ( "SecureRandom1" ) ) ) { throw new java.lang.IllegalStateException ( ( "Expected SecureRandom1 was " + ( sr.getAlgorithm ( ) ) ) ) ; } } finally { java.security.Security.removeProvider ( srp.getName ( ) ) ; } }
Source:
private static com.android.jack.ir.ast.JMethodIdWide getStaticMethodOrReportFailure ( com.android.jack.ir.ast.JClass cls , java.lang.String name , com.android.sched.util.config.id.PropertyId < java.lang.String > prop ) { try { return cls.getMethodIdWide ( name , java.util.Collections.< com.android.jack.ir.ast.JType > emptyList ( ) , MethodKind.STATIC ) ; } catch ( java.lang.Throwable e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , new com.android.jack.transformations.ast.BoostLockedRegionPriority.BadBoostLockedRegionPriorityConfigurationException ( prop , e ) ) ; com.android.jack.Jack.getSession ( ) . abortEventually ( ) ; return null ; } }

Target:
private static com.android.jack.ir.ast.JClass getClassOrReportFailure ( com.android.jack.lookup.JNodeLookup lookup , java.lang.String name , java.lang.String prop ) { try { return lookup.getClass ( name ) ; } catch ( java.lang.Throwable e ) { com.android.jack.Jack.getSession ( ) . getReporter ( ) . report ( Severity.FATAL , new com.android.jack.transformations.ast.BoostLockedRegionPriority.BadBoostLockedRegionPriorityConfigurationException ( prop , e ) ) ; com.android.jack.Jack.getSession ( ) . abortEventually ( ) ; return null ; } }
Source:
public static com.android.jack.Options parseCommandLine ( @ javax.annotation.Nonnull java.lang.String [ ] args ) throws org.kohsuke.args4j.CmdLineException { com.android.jack.Options options = new com.android.jack.Options ( ) ; org.kohsuke.args4j.CmdLineParser parser = new org.kohsuke.args4j.CmdLineParser ( options ) ; parser.setUsageWidth ( 100 ) ; parser.parseArgument ( args ) ; parser.stopOptionParsing ( ) ; return options ; }

Target:
public static com.android.jack.Options parseCommandLine ( @ javax.annotation.Nonnull java.util.List < java.lang.String > list ) throws org.kohsuke.args4j.CmdLineException { com.android.jack.Options options = new com.android.jack.Options ( ) ; org.kohsuke.args4j.CmdLineParser parser = new org.kohsuke.args4j.CmdLineParser ( options ) ; parser.setUsageWidth ( 100 ) ; parser.parseArgument ( list ) ; parser.stopOptionParsing ( ) ; return options ; }
Source:
public void fidelityWarning ( java.lang.String tag , java.lang.String message , java.lang.Throwable throwable , java.lang.Object data ) { if ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderLogger.sIgnoredFidelityWarnings ) != null ) && ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderLogger.sIgnoredFidelityWarnings.contains ( message ) ) ) { return ; } java.lang.String description = describe ( message ) ; com.android.ide.eclipse.adt.AdtPlugin.log ( throwable , "%1$s: %2$s" , mName , description ) ; if ( throwable != null ) { mHaveExceptions = true ; } addFidelityWarning ( tag , description ) ; }

Target:
public void fidelityWarning ( java.lang.String tag , java.lang.String message , java.lang.Throwable throwable , java.lang.Object data ) { if ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderLogger.sIgnoredFidelityWarnings ) != null ) && ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderLogger.sIgnoredFidelityWarnings.contains ( message ) ) ) { return ; } java.lang.String description = describe ( message ) ; appendToIdeLog ( throwable , IStatus.ERROR , description ) ; if ( throwable != null ) { mHaveExceptions = true ; } addFidelityWarning ( tag , description ) ; }
Source:
private static java.lang.String getLanguageLevelOption ( com.intellij.pom.java.LanguageLevel level ) { if ( level != null ) { switch ( level ) { case JDK_1_3 : return "1.3" ; case JDK_1_4 : return "1.4" ; case JDK_1_5 : return "1.5" ; case JDK_1_6 : return "1.6" ; case JDK_1_7 : return "1.7" ; case JDK_1_8 : return "8" ; } } return null ; }

Target:
private static java.lang.String getLanguageLevelOption ( com.intellij.pom.java.LanguageLevel level ) { if ( level != null ) { switch ( level ) { case JDK_1_3 : return "1.3" ; case JDK_1_4 : return "1.4" ; case JDK_1_5 : return "1.5" ; case JDK_1_6 : return "1.6" ; case JDK_1_7 : return "1.7" ; case JDK_1_8 : return "8" ; case JDK_1_9 : return "9" ; } } return null ; }
Source:
public java.lang.String getFqcn ( ) { if ( ( mNode ) != null ) { com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor desc = mNode.getDescriptor ( ) ; if ( desc instanceof com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) { return ( ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) ( desc ) ) . getFullClassName ( ) ; } } return null ; }

Target:
public java.lang.String getFqcn ( ) { if ( ( mNode ) != null ) { com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor desc = mNode.getDescriptor ( ) ; if ( desc instanceof com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) { return ( ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) ( desc ) ) . getFullClassName ( ) ; } } return "" ; }
Source:
public void testCheckAndSet ( ) { assertEquals ( true , lq.checkAndSet ( "en" , config ) ) ; assertTrue ( ( ( config.getLanguageQualifier ( ) ) != null ) ) ; assertEquals ( "en" , config.getLanguageQualifier ( ) . toString ( ) ) ; }

Target:
public void testCheckAndSet ( ) { assertEquals ( true , lq.checkAndSet ( "en" , config ) ) ; assertTrue ( ( ( config.getLanguageQualifier ( ) ) != null ) ) ; assertEquals ( "en" , config.getLanguageQualifier ( ) . toString ( ) ) ; assertEquals ( "en" , config.getEffectiveLanguage ( ) . toString ( ) ) ; }
Source:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , method = "onSaveInstanceState" , args = { } ) } ) public void testOnSaveInstanceState ( ) { startDialogActivity ( DialogStubActivity.TEST_ONSTART_AND_ONSTOP ) ; final android.app.cts.TestDialog d = ( ( android.app.cts.TestDialog ) ( mActivity.getDialog ( ) ) ) ; assertFalse ( d.isOnSaveInstanceStateCalled ) ; assertFalse ( TestDialog.isOnRestoreInstanceStateCalled ) ; android.app.cts.OrientationTestUtils.toggleOrientationSync ( mActivity , mInstrumentation ) ; assertTrue ( d.isOnSaveInstanceStateCalled ) ; assertTrue ( TestDialog.isOnRestoreInstanceStateCalled ) ; }

Target:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , method = "onSaveInstanceState" , args = { } ) } ) public void testOnSaveInstanceState ( ) { startDialogActivity ( DialogStubActivity.TEST_ONSTART_AND_ONSTOP ) ; final android.app.cts.TestDialog d = ( ( android.app.cts.TestDialog ) ( mActivity.getDialog ( ) ) ) ; assertFalse ( d.isOnSaveInstanceStateCalled ) ; assertFalse ( TestDialog.isOnRestoreInstanceStateCalled ) ; final android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; if ( ! ( ( pm.hasSystemFeature ( PackageManager.FEATURE_SCREEN_LANDSCAPE ) ) && ( pm.hasSystemFeature ( PackageManager.FEATURE_SCREEN_PORTRAIT ) ) ) ) { return ; } android.app.cts.OrientationTestUtils.toggleOrientationSync ( mActivity , mInstrumentation ) ; assertTrue ( d.isOnSaveInstanceStateCalled ) ; assertTrue ( TestDialog.isOnRestoreInstanceStateCalled ) ; }
Source:
public void reject ( boolean rejectWithMessage , java.lang.String textMessage ) { com.android.internal.util.Preconditions.checkNotNull ( mConnectionService ) ; if ( isRinging ( "reject" ) ) { mVideoStateHistory |= mVideoState ; mConnectionService.reject ( this , rejectWithMessage , textMessage ) ; com.android.server.telecom.Log.event ( this , Log.Events.REQUEST_REJECT ) ; } }

Target:
public void reject ( boolean rejectWithMessage , java.lang.String textMessage ) { com.android.internal.util.Preconditions.checkNotNull ( mConnectionService ) ; if ( isRinging ( "reject" ) ) { mVideoStateHistory |= mVideoState ; mConnectionService.reject ( this , rejectWithMessage , textMessage ) ; android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_REJECT ) ; } }
Source:
public java.util.List < com.android.tools.lint.Value > getValues ( ) { org.eclipse.jdt.internal.compiler.lookup.ElementValuePair [ ] pairs = mBinding.getElementValuePairs ( ) ; if ( ( pairs != null ) && ( ( pairs.length ) > 0 ) ) { java.util.List < com.android.tools.lint.Value > values = com.google.common.collect.Lists.newArrayListWithExpectedSize ( pairs.length ) ; for ( org.eclipse.jdt.internal.compiler.lookup.ElementValuePair pair : pairs ) { values.add ( new com.android.tools.lint.Value ( new java.lang.String ( pair.getName ( ) ) , pair.getValue ( ) ) ) ; } } return java.util.Collections.emptyList ( ) ; }

Target:
public java.util.List < com.android.tools.lint.Value > getValues ( ) { org.eclipse.jdt.internal.compiler.lookup.ElementValuePair [ ] pairs = mBinding.getElementValuePairs ( ) ; if ( ( pairs != null ) && ( ( pairs.length ) > 0 ) ) { java.util.List < com.android.tools.lint.Value > values = com.google.common.collect.Lists.newArrayListWithExpectedSize ( pairs.length ) ; for ( org.eclipse.jdt.internal.compiler.lookup.ElementValuePair pair : pairs ) { values.add ( new com.android.tools.lint.Value ( new java.lang.String ( pair.getName ( ) ) , getPairValue ( pair ) ) ) ; } } return java.util.Collections.emptyList ( ) ; }
Source:
public void testBasicWorkingSntpClientQuery ( ) throws java.lang.Exception { mServer.setServerReply ( libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ) ; assertTrue ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; android.net.ConnectivityManager mCM = getContext ( ) . getSystemService ( android.net.ConnectivityManager.class ) ; mNetwork = mCM.getActiveNetwork ( ) ; }
Source:
public void write ( byte [ ] keyBuffer , short keyOffset , byte [ ] valueBuffer , short valueOffset ) { javacard.framework.JCSystem.beginTransaction ( ) ; javacard.framework.Util.arrayCopy ( keyBuffer , keyOffset , mKey , ( ( short ) ( 0 ) ) , Consts.SLOT_KEY_BYTES ) ; javacard.framework.Util.arrayCopy ( valueBuffer , valueOffset , mValue , ( ( short ) ( 0 ) ) , Consts.SLOT_VALUE_BYTES ) ; mFailureCount = 0 ; javacard.framework.JCSystem.commitTransaction ( ) ; }

Target:
public void write ( byte [ ] keyBuffer , short keyOffset , byte [ ] valueBuffer , short valueOffset ) { javacard.framework.JCSystem.beginTransaction ( ) ; javacard.framework.Util.arrayCopy ( keyBuffer , keyOffset , mKey , ( ( short ) ( 0 ) ) , Consts.SLOT_KEY_BYTES ) ; javacard.framework.Util.arrayCopy ( valueBuffer , valueOffset , mValue , ( ( short ) ( 0 ) ) , Consts.SLOT_VALUE_BYTES ) ; mFailureCount = 0 ; mBackoffTimer = com.nxp.id.jcopx.util.DSTimer.getInstance ( ) ; javacard.framework.JCSystem.commitTransaction ( ) ; }
Source:
public void test_generateCertificate ( ) throws java.lang.Exception { java.security.Provider [ ] providers = java.security.Security.getProviders ( "CertificateFactory.X509" ) ; for ( java.security.Provider p : providers ) { java.security.cert.CertificateFactory cf = java.security.cert.CertificateFactory.getInstance ( "X509" , p ) ; try { test_generateCertificate ( cf ) ; testGenerateCertificate_InputStream_Offset_Correct ( cf ) ; } catch ( java.lang.Exception e ) { throw new java.lang.Exception ( ( "Problem testing " + ( p.getName ( ) ) ) , e ) ; } } }

Target:
public void test_generateCertificate ( ) throws java.lang.Exception { java.security.Provider [ ] providers = java.security.Security.getProviders ( "CertificateFactory.X509" ) ; for ( java.security.Provider p : providers ) { java.security.cert.CertificateFactory cf = java.security.cert.CertificateFactory.getInstance ( "X509" , p ) ; try { test_generateCertificate ( cf ) ; test_generateCertificate_InputStream_Offset_Correct ( cf ) ; test_generateCertificate_InputStream_Empty ( cf ) ; } catch ( java.lang.Exception e ) { throw new java.lang.Exception ( ( "Problem testing " + ( p.getName ( ) ) ) , e ) ; } } }
Source:
native void rsnAllocationElementRead ( long con , long id , int xoff , int yoff , int zoff , int mip , int compIdx , java.lang.Object d , int sizeBytes , int dt ) ;

Target:
synchronized void nAllocationRead2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationRead2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
private void addScreenshotComparisonPanel ( com.google.gct.testing.ConfigurationInstance configurationInstance ) { com.google.gct.testing.ScreenshotComparisonPanel screenshotComparisonPanel = new com.google.gct.testing.ScreenshotComparisonPanel ( this , testTreeRoot , configuration , configurationInstance , ( ( com.google.gct.testing.TestName ) ( myTestComboBox.getSelectedItem ( ) ) ) , step , results ) ; screenshotPanels.add ( screenshotComparisonPanel ) ; com.google.gct.testing.ui.WipePanel wipePanel = screenshotComparisonPanel.getPanel ( ) ; myAllScreenshotsPanel.add ( wipePanel ) ; wipePanel.instantReveal ( new com.google.gct.testing.ui.WipePanelCallback ( ) { @ java.lang.Override public void panelRevealed ( ) { fitWindow ( ) ; } } ) ; headerListeners.add ( screenshotComparisonPanel ) ; }

Target:
private void createFirstScreenshotComparisonPanel ( com.google.gct.testing.ConfigurationInstance configurationInstance ) { com.google.gct.testing.ScreenshotComparisonPanel screenshotComparisonPanel = new com.google.gct.testing.ScreenshotComparisonPanel ( this , null , testTreeRoot , configuration , configurationInstance , ( ( com.google.gct.testing.TestName ) ( myTestComboBox.getSelectedItem ( ) ) ) , step , results ) ; screenshotPanels.add ( screenshotComparisonPanel ) ; com.google.gct.testing.ui.WipePanel wipePanel = screenshotComparisonPanel.getPanel ( ) ; myAllScreenshotsPanel.add ( wipePanel ) ; wipePanel.instantReveal ( new com.google.gct.testing.ui.WipePanelCallback ( ) { @ java.lang.Override public void panelRevealed ( ) { fitWindow ( ) ; } } ) ; headerListeners.add ( screenshotComparisonPanel ) ; }
Source:
public WebView.HitTestResult getHitTestResult ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebView.HitTestResult ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebView.HitTestResult > ( ) { @ java.lang.Override public WebView.HitTestResult call ( ) { return getHitTestResult ( ) ; } } ) ; return ret ; } org.chromium.android_webview.AwContents.HitTestData data = mAwContents.getLastHitTestResult ( ) ; mHitTestResult.setType ( data.hitTestResultType ) ; mHitTestResult.setExtra ( data.hitTestResultExtraData ) ; return mHitTestResult ; }

Target:
public android.graphics.Picture capturePicture ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.graphics.Picture ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.graphics.Picture > ( ) { @ java.lang.Override public android.graphics.Picture call ( ) { return capturePicture ( ) ; } } ) ; return ret ; } return mAwContents.capturePicture ( ) ; }
Source:
public void testJustWarningAndError ( ) { com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . addWarning ( "something weird happened" ) . addError ( "something bad happened" ) . build ( ) ; assertEquals ( MergingReport.Result.ERROR , mergingReport.getResult ( ) ) ; }

Target:
public void testJustWarningAndError ( ) { com.android.manifmerger.MergingReport mergingReport = new com.android.manifmerger.MergingReport.Builder ( mLoggerMock ) . addMessage ( mSourceLocation , 0 , 0 , Severity.WARNING , "something weird happened" ) . addMessage ( mSourceLocation , 0 , 0 , Severity.ERROR , "something bad happened" ) . build ( ) ; assertEquals ( MergingReport.Result.ERROR , mergingReport.getResult ( ) ) ; }
Source:
public boolean p2pReinvoke ( int netId , java.lang.String deviceAddress ) { if ( ( android.text.TextUtils.isEmpty ( deviceAddress ) ) || ( netId < 0 ) ) return false ; if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.reinvoke ( netId , deviceAddress ) ; } else { return doBooleanCommand ( ( ( ( "P2P_INVITE persistent=" + netId ) + " peer=" ) + deviceAddress ) ) ; } }

Target:
public boolean p2pGroupAdd ( int netId ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.groupAdd ( netId , true ) ; } else { return doBooleanCommand ( ( "P2P_GROUP_ADD persistent=" + netId ) ) ; } }
Source:
public void getProperty_volatile ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , "[dev.bootcomplete]: [0]\r\n" ) ; injectShellResponse ( mockDevice , "[dev.bootcomplete]: [1]\r\n" ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertEquals ( "0" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; org.junit.Assert.assertEquals ( "1" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; }

Target:
public void getProperty_volatile ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , "[dev.bootcomplete]: [0]\r\n" ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , "[dev.bootcomplete]: [1]\r\n" ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertEquals ( "0" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; org.junit.Assert.assertEquals ( "1" , fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; }
Source:
public static float dist ( float x1 , float y1 , float x2 , float y2 ) { final float x = x2 - x1 ; final float y = y2 - y1 ; return ( ( float ) ( java.lang.Math.sqrt ( ( ( x * x ) + ( y * y ) ) ) ) ) ; }

Target:
public static float dist ( float x1 , float y1 , float x2 , float y2 ) { final float x = x2 - x1 ; final float y = y2 - y1 ; return ( ( float ) ( java.lang.Math.hypot ( x , y ) ) ) ; }
Source:
public void removeProximityAlert ( android.app.PendingIntent intent ) { try { synchronized ( mLock ) { removeProximityAlertLocked ( intent ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.IllegalArgumentException iae ) { throw iae ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "removeProximityAlert got exception:" , e ) ; } }

Target:
public void onPackageDisappeared ( java.lang.String packageName , int reason ) { synchronized ( mLock ) { java.util.ArrayList < com.android.server.LocationManagerService.Receiver > deadReceivers = null ; for ( com.android.server.LocationManagerService.Receiver receiver : mReceivers.values ( ) ) { if ( receiver.mPackageName.equals ( packageName ) ) { if ( deadReceivers == null ) { deadReceivers = new java.util.ArrayList < com.android.server.LocationManagerService.Receiver > ( ) ; } deadReceivers.add ( receiver ) ; } } if ( deadReceivers != null ) { for ( com.android.server.LocationManagerService.Receiver receiver : deadReceivers ) { removeUpdatesLocked ( receiver ) ; } } } }
Source:
public static int forkAndSpecialize ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , int mountExternal , java.lang.String seInfo , java.lang.String niceName , int [ ] fdsToClose ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; int pid = com.android.internal.os.Zygote.nativeForkAndSpecialize ( uid , gid , gids , debugFlags , rlimits , mountExternal , seInfo , niceName , fdsToClose ) ; com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }

Target:
public static int forkAndSpecialize ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , int mountExternal , java.lang.String seInfo , java.lang.String niceName , int [ ] fdsToClose , java.lang.String instructionSet ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; int pid = com.android.internal.os.Zygote.nativeForkAndSpecialize ( uid , gid , gids , debugFlags , rlimits , mountExternal , seInfo , niceName , fdsToClose , instructionSet ) ; com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }
Source:
public static int internalTypeSize ( java.lang.String internalType ) { if ( ( internalType.length ( ) ) == 1 ) { char internalPrimitiveType = internalType.charAt ( 0 ) ; if ( ( internalPrimitiveType == ( proguard.classfile.ClassConstants.INTERNAL_TYPE_LONG ) ) || ( internalPrimitiveType == ( proguard.classfile.ClassConstants.INTERNAL_TYPE_DOUBLE ) ) ) { return 2 ; } else if ( internalPrimitiveType == ( proguard.classfile.ClassConstants.INTERNAL_TYPE_VOID ) ) { return 0 ; } } return 1 ; }

Target:
public static int internalTypeSize ( java.lang.String internalType ) { if ( ( internalType.length ( ) ) == 1 ) { char internalPrimitiveType = internalType.charAt ( 0 ) ; if ( ( internalPrimitiveType == ( ClassConstants.TYPE_LONG ) ) || ( internalPrimitiveType == ( ClassConstants.TYPE_DOUBLE ) ) ) { return 2 ; } else if ( internalPrimitiveType == ( ClassConstants.TYPE_VOID ) ) { return 0 ; } } return 1 ; }
Source:
public static boolean hasCellularNetworkConnection ( android.app.Instrumentation instrumentation ) { android.telephony.TelephonyManager tm = ( ( android.telephony.TelephonyManager ) ( instrumentation.getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; return ( tm.getDataState ( ) ) != ( android.telephony.TelephonyManager.DATA_DISCONNECTED ) ; }

Target:
public static boolean hasCellularNetworkConnection ( android.app.Instrumentation instrumentation ) { android.telephony.TelephonyManager tm = ( ( android.telephony.TelephonyManager ) ( instrumentation.getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; android.util.Log.i ( "NetworkUtil" , ( "Cellular network state is: " + ( tm.getDataState ( ) ) ) ) ; return ( tm.getDataState ( ) ) != ( android.telephony.TelephonyManager.DATA_DISCONNECTED ) ; }
Source:
void initialize ( com.android.ahat.heapdump.AhatSnapshot snapshot , com.android.tools.perflib.heap.Instance inst , com.android.ahat.heapdump.Site site ) { mSize = new com.android.ahat.heapdump.Size ( inst.getSize ( ) , 0 ) ; mHeap = snapshot.getHeap ( inst.getHeap ( ) . getName ( ) ) ; com.android.tools.perflib.heap.ClassObj clsObj = inst.getClassObj ( ) ; if ( clsObj != null ) { mClassObj = snapshot.findClassObj ( clsObj.getId ( ) ) ; } mSite = site ; }

Target:
void initialize ( com.android.ahat.heapdump.AhatSnapshot snapshot , com.android.tools.perflib.heap.Instance inst , com.android.ahat.heapdump.Site site ) { site.addInstance ( this ) ; mSize = new com.android.ahat.heapdump.Size ( inst.getSize ( ) , 0 ) ; mHeap = snapshot.getHeap ( inst.getHeap ( ) . getName ( ) ) ; com.android.tools.perflib.heap.ClassObj clsObj = inst.getClassObj ( ) ; if ( clsObj != null ) { mClassObj = snapshot.findClassObj ( clsObj.getId ( ) ) ; } mSite = site ; }
Source:
private void setBinder ( android.os.IBinder binder ) { if ( ( mBinder ) != binder ) { mBinder = binder ; setServiceInterface ( binder ) ; if ( binder == null ) { for ( com.android.server.telecom.ServiceBinder.Listener l : mListeners ) { l.onUnbind ( this ) ; } } } }

Target:
private void setBinder ( android.os.IBinder binder ) { if ( ( mBinder ) != binder ) { if ( binder == null ) { removeServiceInterface ( ) ; mBinder = null ; for ( com.android.server.telecom.ServiceBinder.Listener l : mListeners ) { l.onUnbind ( this ) ; } } else { mBinder = binder ; setServiceInterface ( binder ) ; } } }
Source:
public void testKeyguardHidesActivity ( ) throws java.lang.Exception { if ( ! ( isHandheld ( ) ) ) { return ; } launchActivity ( "TestActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "TestActivity" } ) ; mAmWmState.assertVisibility ( "TestActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; assertShowingAndNotOccluded ( ) ; mAmWmState.assertVisibility ( "TestActivity" , false ) ; unlockDevice ( ) ; }

Target:
public void testKeyguardHidesActivity ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "TestActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "TestActivity" } ) ; mAmWmState.assertVisibility ( "TestActivity" , true ) ; gotoKeyguard ( ) ; mAmWmState.computeState ( mDevice , null ) ; assertShowingAndNotOccluded ( ) ; mAmWmState.assertVisibility ( "TestActivity" , false ) ; unlockDevice ( ) ; }
Source:
public int count ( @ javax.annotation.Nullable java.lang.Object element ) { try { if ( multimap ( ) . containsKey ( element ) ) { java.util.Collection < V > values = multimap ( ) . asMap ( ) . get ( element ) ; return values == null ? 0 : values.size ( ) ; } return 0 ; } catch ( java.lang.ClassCastException e ) { return 0 ; } catch ( java.lang.NullPointerException e ) { return 0 ; } }

Target:
public int count ( @ javax.annotation.Nullable java.lang.Object element ) { java.util.Collection < V > values = com.google.common.collect.Maps.safeGet ( multimap.asMap ( ) , element ) ; return values == null ? 0 : values.size ( ) ; }
Source:
protected void onDestroy ( ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.ToneDialog.LOG_TAG , "onDestroy" ) ; unregisterReceiver ( mFinishActivityReceiver ) ; super . onDestroy ( ) ; }

Target:
protected void onDestroy ( ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.ToneDialog.LOG_TAG , "onDestroy" ) ; super . onDestroy ( ) ; unregisterReceiver ( mFinishActivityReceiver ) ; if ( ( ( mAlertDialog ) != null ) && ( mAlertDialog.isShowing ( ) ) ) { mAlertDialog.dismiss ( ) ; mAlertDialog = null ; } }
Source:
public void selectNetworkManually ( com.android.internal.telephony.OperatorInfo network , android.os.Message response ) { com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage nsm = new com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage ( ) ; nsm.message = response ; nsm.operatorNumeric = network.getOperatorNumeric ( ) ; nsm.operatorAlphaLong = network.getOperatorAlphaLong ( ) ; android.os.Message msg = obtainMessage ( com.android.internal.telephony.gsm.EVENT_SET_NETWORK_MANUAL_COMPLETE , nsm ) ; mCM.setNetworkSelectionModeManual ( network.getOperatorNumeric ( ) , msg ) ; }

Target:
public void selectNetworkManually ( com.android.internal.telephony.OperatorInfo network , android.os.Message response ) { com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage nsm = new com.android.internal.telephony.gsm.GSMPhone.NetworkSelectMessage ( ) ; nsm.message = response ; nsm.operatorNumeric = network.getOperatorNumeric ( ) ; nsm.operatorAlphaLong = network.getOperatorAlphaLong ( ) ; android.os.Message msg = obtainMessage ( com.android.internal.telephony.gsm.EVENT_SET_NETWORK_MANUAL_COMPLETE , nsm ) ; mCi.setNetworkSelectionModeManual ( network.getOperatorNumeric ( ) , msg ) ; }