auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void appendNode ( java.lang.StringBuilder out , com.android.manifmerger.ActionRecorder.ActionType actionType , java.lang.String docString , int lineNumber ) { out.append ( actionType.toString ( ) ) . append ( " from " ) . append ( getClass ( ) . getSimpleName ( ) ) . append ( '#' ) . append ( docString ) . append ( ":" ) . append ( lineNumber ) . append ( "\n" ) ; }

Target:
private void appendNode ( java.lang.StringBuilder out , com.android.manifmerger.Actions.ActionType actionType , java.lang.String docString , int lineNumber ) { out.append ( actionType.toString ( ) ) . append ( " from " ) . append ( getClass ( ) . getSimpleName ( ) ) . append ( '#' ) . append ( docString ) . append ( ":" ) . append ( lineNumber ) . append ( "\n" ) ; }
Source:
public void testSetWifiDisabledWithoutPermission ( ) throws java.lang.Exception { doThrow ( new java.lang.SecurityException ( ) ) . when ( mContext ) . enforceCallingOrSelfPermission ( org.mockito.Matchers.eq ( android.Manifest.permission.CHANGE_WIFI_STATE ) , org.mockito.Matchers.eq ( "WifiService" ) ) ; mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ; }

Target:
public void testSetWifiDisabledWithoutPermission ( ) throws java.lang.Exception { when ( mWifiStateMachine.syncGetWifiApState ( ) ) . thenReturn ( WifiManager.WIFI_AP_STATE_DISABLED ) ; doThrow ( new java.lang.SecurityException ( ) ) . when ( mContext ) . enforceCallingOrSelfPermission ( org.mockito.Matchers.eq ( android.Manifest.permission.CHANGE_WIFI_STATE ) , org.mockito.Matchers.eq ( "WifiService" ) ) ; mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , false ) ; }
Source:
private static void recordCustomTimesHistogramMilliseconds ( java.lang.String name , long duration , long min , long max , int numBuckets ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordCustomTimesHistogramMilliseconds ( name , key , org.chromium.base.metrics.RecordHistogram.clampToInt ( duration ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( min ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( max ) , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
private static void recordCustomTimesHistogramMilliseconds ( java.lang.String name , long duration , long min , long max , int numBuckets ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordCustomTimesHistogramMilliseconds ( name , key , org.chromium.base.metrics.RecordHistogram.clampToInt ( duration ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( min ) , org.chromium.base.metrics.RecordHistogram.clampToInt ( max ) , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public static < T > org.hamcrest.org.hamcrest.Matcher < T > anything ( java.lang.String description ) { return org.hamcrest.core.IsAnything.anything ( description ) ; }

Target:
public static < T > org.hamcrest.org.hamcrest.Matcher < T > allOf ( org.hamcrest.org.hamcrest.Matcher < ? extends T > first , org.hamcrest.org.hamcrest.Matcher < ? extends T > second , org.hamcrest.org.hamcrest.Matcher < ? extends T > third , org.hamcrest.org.hamcrest.Matcher < ? extends T > fourth ) { return org.hamcrest.core.AllOf.< org.hamcrest.T > allOf ( first , second , third , fourth ) ; }
Source:
void test ( ) { if ( ( ( mNm.getEffectsSuppressor ( ) ) == null ) || ( ! ( mNm.getEffectsSuppressor ( ) . equals ( MockListener.COMPONENT_NAME ) ) ) ) { status = PASS ; } else { status = FAIL ; BRANCH ( ( ( 39808.0 - ( cts ) ) - ( dev ) ) ) ; } }

Target:
protected void test ( ) { if ( ( ( mNm.getEffectsSuppressor ( ) ) == null ) && ( ( ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) ) == null ) || ( ! ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . isConnected ) ) ) ) { status = PASS ; } else { if ( ( -- ( mRetries ) ) > 0 ) { sleep ( 100 ) ; status = RETEST ; } else { status = FAIL ; } } }
Source:
public void visit ( com.android.jack.dx.io.instructions.DecodedInstruction [ ] all , com.android.jack.dx.io.instructions.DecodedInstruction decodedInst ) { int newIndex = cstIndexMap.getRemappedCstStringIndex ( file , decodedInst.getIndex ( ) ) ; if ( ( ( decodedInst.getOpcode ( ) ) != ( com.android.jack.dx.io.Opcodes.CONST_STRING_JUMBO ) ) && ( newIndex > 65535 ) ) { throw new com.android.jack.dx.util.DexException ( ( ( "Cannot remap new index " + newIndex ) + " into a non-jumbo instruction!" ) ) ; } remappedInstructions [ ( ( remappingIndex ) ++ ) ] = decodedInst.withIndex ( newIndex ) ; }

Target:
public void visit ( com.android.jack.dx.io.instructions.DecodedInstruction [ ] all , com.android.jack.dx.io.instructions.DecodedInstruction decodedInst ) { int newIndex = cstIndexMap.getRemappedCstStringIndex ( file , decodedInst.getFirstIndex ( ) ) ; if ( ( ( decodedInst.getOpcode ( ) ) != ( com.android.jack.dx.io.Opcodes.CONST_STRING_JUMBO ) ) && ( newIndex > 65535 ) ) { throw new com.android.jack.dx.util.DexException ( ( ( "Cannot remap new index " + newIndex ) + " into a non-jumbo instruction!" ) ) ; } remappedInstructions [ ( ( remappingIndex ) ++ ) ] = decodedInst.withIndex ( newIndex ) ; }
Source:
public static < K extends java.lang.Comparable < ? super K > , V > com.google.common.collect.ImmutableSortedMap < K , V > of ( K k1 , V v1 , K k2 , V v2 ) { return new com.google.common.collect.ImmutableSortedMap.Builder < K , V > ( com.google.common.collect.Ordering.natural ( ) ) . put ( k1 , v1 ) . put ( k2 , v2 ) . build ( ) ; }

Target:
public static < K extends java.lang.Comparable < ? super K > , V > com.google.common.collect.ImmutableSortedMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 ) { return com.google.common.collect.ImmutableSortedMap.fromEntries ( com.google.common.collect.Ordering.natural ( ) , false , 3 , com.google.common.collect.ImmutableMap.entryOf ( k1 , v1 ) , com.google.common.collect.ImmutableMap.entryOf ( k2 , v2 ) , com.google.common.collect.ImmutableMap.entryOf ( k3 , v3 ) ) ; }
Source:
public boolean overlayHorizontalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }

Target:
public int computeVerticalScrollExtent ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeVerticalScrollExtent ( ) ; } } ) ; return ret ; } return mAwContents.computeVerticalScrollExtent ( ) ; }
Source:
public void testMaxSdkVersion ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "maxSdkVersion" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "assembleDebug" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f1-debug.apk" ) ) , "21" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f2-debug.apk" ) ) , "19" ) ; }

Target:
public void testMaxSdkVersion ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( regularDir , "maxSdkVersion" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "assembleDebug" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f1-debug.apk" ) ) , "21" ) ; checkMaxSdkVersion ( new java.io.File ( project , ( ( "build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/maxSdkVersion-f2-debug.apk" ) ) , "19" ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( obj instanceof android.net.NetworkTemplate ) { final android.net.NetworkTemplate other = ( ( android.net.NetworkTemplate ) ( obj ) ) ; return ( ( ( mMatchRule ) == ( other.mMatchRule ) ) && ( com.android.internal.util.Objects.equal ( mSubscriberId , other.mSubscriberId ) ) ) && ( com.android.internal.util.Objects.equal ( mNetworkId , other.mNetworkId ) ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( obj instanceof android.net.NetworkTemplate ) { final android.net.NetworkTemplate other = ( ( android.net.NetworkTemplate ) ( obj ) ) ; return ( ( ( mMatchRule ) == ( other.mMatchRule ) ) && ( java.util.Objects.equals ( mSubscriberId , other.mSubscriberId ) ) ) && ( java.util.Objects.equals ( mNetworkId , other.mNetworkId ) ) ; } return false ; }
Source:
private static void checkName ( @ com.android.annotations.NonNull java.lang.String name , @ com.android.annotations.NonNull java.lang.String displayName ) { if ( name.startsWith ( com.android.builder.core.BuilderConstants.ANDROID_TEST ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot start with '%2$s'" , displayName , com.android.builder.core.BuilderConstants.ANDROID_TEST ) ) ; } if ( name.startsWith ( com.android.builder.core.BuilderConstants.UI_TEST ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot start with %2$s" , displayName , com.android.builder.core.BuilderConstants.UI_TEST ) ) ; } if ( com.android.builder.core.BuilderConstants.LINT.equals ( name ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot be %2$s" , displayName , com.android.builder.core.BuilderConstants.LINT ) ) ; } }

Target:
private static void checkPrefix ( java.lang.String name , java.lang.String displayName , java.lang.String prefix ) { if ( name.startsWith ( prefix ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "%1$s names cannot start with '%2$s'" , displayName , prefix ) ) ; } }
Source:
public static java.lang.String prepareJenkinsTestSpecification ( org.jetbrains.android.run.testing.AndroidTestRunConfiguration testRunConfiguration ) { switch ( testRunConfiguration.TESTING_TYPE ) { case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_METHOD : return ( ( "class " + ( testRunConfiguration.CLASS_NAME ) ) + "#" ) + ( testRunConfiguration.METHOD_NAME ) ; case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_CLASS : return "class " + ( testRunConfiguration.CLASS_NAME ) ; case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_ALL_IN_PACKAGE : return "package " + ( testRunConfiguration.PACKAGE_NAME ) ; case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_ALL_IN_MODULE : return "" ; default : throw new java.lang.IllegalStateException ( ( "Unsupported testing type: " + ( testRunConfiguration.TESTING_TYPE ) ) ) ; } }

Target:
public static java.lang.String prepareTestSpecification ( org.jetbrains.android.run.testing.AndroidTestRunConfiguration testRunConfiguration ) { switch ( testRunConfiguration.TESTING_TYPE ) { case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_METHOD : return ( ( "class " + ( testRunConfiguration.CLASS_NAME ) ) + "#" ) + ( testRunConfiguration.METHOD_NAME ) ; case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_CLASS : return "class " + ( testRunConfiguration.CLASS_NAME ) ; case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_ALL_IN_PACKAGE : return "package " + ( testRunConfiguration.PACKAGE_NAME ) ; case org.jetbrains.android.run.testing.AndroidTestRunConfiguration.TEST_ALL_IN_MODULE : return "" ; default : throw new java.lang.IllegalStateException ( ( "Unsupported testing type: " + ( testRunConfiguration.TESTING_TYPE ) ) ) ; } }
Source:
public com.google.common.util.concurrent.ListenableFuture < com.google.common.collect.ImmutableMap < com.android.dialer.DialerPhoneNumber , com.android.dialer.spam.SpamStatus > > batchCheckSpamStatus ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > dialerPhoneNumbers ) { return backgroundExecutorService.submit ( ( ) -> { com.google.common.collect.ImmutableMap.Builder < com.android.dialer.DialerPhoneNumber , com.android.dialer.spam.SpamStatus > resultBuilder = new com.google.common.collect.ImmutableMap.Builder < > ( ) ; for ( com.android.dialer.DialerPhoneNumber dialerPhoneNumber : dialerPhoneNumbers ) { resultBuilder.put ( dialerPhoneNumber , com.android.dialer.spam.SimpleSpamStatus.notSpam ( ) ) ; } return resultBuilder.build ( ) ; } ) ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < com.google.common.collect.ImmutableMap < com.android.dialer.DialerPhoneNumber , com.android.dialer.spam.status.SpamStatus > > batchCheckSpamStatus ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > dialerPhoneNumbers ) { return backgroundExecutorService.submit ( ( ) -> { com.google.common.collect.ImmutableMap.Builder < com.android.dialer.DialerPhoneNumber , com.android.dialer.spam.status.SpamStatus > resultBuilder = new com.google.common.collect.ImmutableMap.Builder < > ( ) ; for ( com.android.dialer.DialerPhoneNumber dialerPhoneNumber : dialerPhoneNumbers ) { resultBuilder.put ( dialerPhoneNumber , com.android.dialer.spam.status.SimpleSpamStatus.notSpam ( ) ) ; } return resultBuilder.build ( ) ; } ) ; }
Source:
public void testDisableWifiFromSoftApModeState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mWifiStateMachinePrime.disableWifi ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "WifiDisabled" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testWificondNullWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( null ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.SOFT_AP_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }
Source:
public void testInstall_withBadlyFormedAndroidRevision ( ) throws java.lang.Exception { java.lang.String invalidAndroidRevision = "A01" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( BundleVersion.FULL_BUNDLE_FORMAT_VERSION , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , invalidAndroidRevision ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedBundleVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.BundleVersion validBundleVersion = new libcore.tzdata.update2.BundleVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidFormatVersionBytes = validBundleVersion.toBytes ( ) ; invalidFormatVersionBytes [ 0 ] = 'A' ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( invalidFormatVersionBytes ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public com.android.util.Pair < java.lang.Boolean , java.io.File > installExtraPackage ( java.lang.String vendor , java.lang.String path ) { mPackageFilter = com.android.sdkuilib.internal.repository.sdkman2.AdtUpdateDialog.createExtraFilter ( vendor , path ) ; open ( ) ; java.io.File installPath = null ; if ( ( mResultPaths ) != null ) { for ( java.util.Map.Entry < java.lang.Package , java.io.File > entry : mResultPaths.entrySet ( ) ) { if ( ( entry.getKey ( ) ) instanceof com.android.sdklib.internal.repository.ExtraPackage ) { installPath = entry.getValue ( ) ; break ; } } } return com.android.util.Pair.of ( mResultCode , installPath ) ; }

Target:
public com.android.util.Pair < java.lang.Boolean , java.io.File > installExtraPackage ( java.lang.String vendor , java.lang.String path ) { mPackageFilter = com.android.sdkuilib.internal.repository.sdkman2.AdtUpdateDialog.createExtraFilter ( vendor , path ) ; open ( ) ; java.io.File installPath = null ; if ( ( mResultPaths ) != null ) { for ( java.util.Map.Entry < java.lang.Package , java.io.File > entry : mResultPaths.entrySet ( ) ) { if ( ( entry.getKey ( ) ) instanceof com.android.sdklib.internal.repository.packages.ExtraPackage ) { installPath = entry.getValue ( ) ; break ; } } } return com.android.util.Pair.of ( mResultCode , installPath ) ; }
Source:
public com.android.ide.eclipse.adt.internal.editors.ui.DecorComposite setContent ( com.android.ide.eclipse.adt.internal.editors.ui.IDecorContent content ) { mContent = content ; content.createControl ( this ) ; com.android.ide.eclipse.adt.internal.editors.ui.GridDataBuilder.create ( content.getControl ( ) ) . hSpan ( 2 ) . grab ( ) . fill ( ) ; java.lang.String t = content.getTitle ( ) ; if ( t != null ) { setTitle ( t ) ; } org.eclipse.swt.graphics.Image i = content.getImage ( ) ; if ( i != null ) { setImage ( i ) ; } content.createToolbarItems ( mToolbar ) ; return this ; }

Target:
public com.android.ide.eclipse.adt.internal.editors.ui.DecorComposite setContent ( com.android.ide.eclipse.adt.internal.editors.ui.IDecorContent content ) { mContent = content ; content.createControl ( this ) ; com.android.sdkuilib.ui.GridDataBuilder.create ( content.getControl ( ) ) . hSpan ( 2 ) . grab ( ) . fill ( ) ; java.lang.String t = content.getTitle ( ) ; if ( t != null ) { setTitle ( t ) ; } org.eclipse.swt.graphics.Image i = content.getImage ( ) ; if ( i != null ) { setImage ( i ) ; } content.createToolbarItems ( mToolbar ) ; return this ; }
Source:
public static void render ( final com.android.ahat.AhatSnapshot snapshot , com.android.ahat.Doc doc , com.android.ahat.Query query , java.lang.String id , java.util.Collection < com.android.tools.perflib.heap.Instance > instances ) { java.util.List < com.android.tools.perflib.heap.Instance > insts = new java.util.ArrayList < com.android.tools.perflib.heap.Instance > ( instances ) ; java.util.Collections.sort ( insts , com.android.ahat.Sort.defaultInstanceCompare ( snapshot ) ) ; com.android.ahat.HeapTable.render ( doc , query , id , new com.android.ahat.DominatedList.TableConfig ( snapshot ) , snapshot , insts ) ; }

Target:
public static void render ( final com.android.ahat.heapdump.AhatSnapshot snapshot , com.android.ahat.Doc doc , com.android.ahat.Query query , java.lang.String id , java.util.Collection < com.android.ahat.heapdump.AhatInstance > instances ) { java.util.List < com.android.ahat.heapdump.AhatInstance > insts = new java.util.ArrayList < com.android.ahat.heapdump.AhatInstance > ( instances ) ; java.util.Collections.sort ( insts , com.android.ahat.Sort.defaultInstanceCompare ( snapshot ) ) ; com.android.ahat.HeapTable.render ( doc , query , id , new com.android.ahat.DominatedList.TableConfig ( ) , snapshot , insts ) ; }
Source:
public void nextBytes ( byte [ ] bytes ) { byte [ ] src = java.math.BigInteger.valueOf ( 1000 ) . toByteArray ( ) ; java.lang.System.arraycopy ( src , 0 , bytes , ( ( bytes.length ) - ( src.length ) ) , src.length ) ; }

Target:
public void nextBytes ( byte [ ] bytes ) { byte [ ] src = new java.math.BigInteger ( "e2eb6663f551331bda00b90f1272c09d980260c1a70cab1ec481f6c937f34b62" , 16 ) . toByteArray ( ) ; if ( ( src.length ) <= ( bytes.length ) ) { java.lang.System.arraycopy ( src , 0 , bytes , ( ( bytes.length ) - ( src.length ) ) , src.length ) ; } else { java.lang.System.arraycopy ( src , 0 , bytes , 0 , bytes.length ) ; } }
Source:
protected int engineUpdate ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.ShortBufferException { final int maximumLen = getOutputSize ( inputLen ) ; return updateInternal ( input , inputOffset , inputLen , output , outputOffset , maximumLen ) ; }

Target:
protected int engineUpdate ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.ShortBufferException { final int maximumLen = getOutputSizeForUpdate ( inputLen ) ; return updateInternal ( input , inputOffset , inputLen , output , outputOffset , maximumLen ) ; }
Source:
public java.util.List < android.content.pm.PackageInfo > getPreferredPackages ( int flags ) { return new java.util.ArrayList < android.content.pm.PackageInfo > ( ) ; }

Target:
private void updatePermissionsLPw ( android.content.pm.PackageParser.Package pkg , int flags ) { updatePermissionsLPw ( pkg.packageName , pkg , flags ) ; final int childCount = ( ( pkg.childPackages ) != null ) ? pkg.childPackages.size ( ) : 0 ; for ( int i = 0 ; i < childCount ; i ++ ) { android.content.pm.PackageParser.Package childPkg = pkg.childPackages.get ( i ) ; updatePermissionsLPw ( childPkg.packageName , childPkg , flags ) ; } }
Source:
public java.lang.String getPath ( ) { java.lang.String path = mPath.replaceAll ( "[^a-zA-Z0-9-]+" , "_" ) ; if ( ( ( path.length ( ) ) == 0 ) || ( path.equals ( "_" ) ) ) { int h = path.hashCode ( ) ; path = java.lang.String.format ( "extra%08x" , h ) ; } return path ; }

Target:
public java.lang.String getPath ( ) { java.lang.String path = mPath.replaceAll ( "[^a-zA-Z0-9-]+" , "_" ) ; if ( ( path.isEmpty ( ) ) || ( path.equals ( "_" ) ) ) { int h = path.hashCode ( ) ; path = java.lang.String.format ( "extra%08x" , h ) ; } return path ; }
Source:
public void testAddExternalCall ( ) { java.util.List < com.android.ims.ImsExternalCallState > dep = new java.util.ArrayList < > ( ) ; dep.add ( new com.android.ims.ImsExternalCallState ( com.android.internal.telephony.imsphone.ImsExternalCallTrackerTest.CALL_ID , com.android.internal.telephony.imsphone.ImsExternalCallTrackerTest.TEST_ADDRESS , false , com.android.ims.ImsExternalCallState.CALL_STATE_CONFIRMED , com.android.ims.ImsCallProfile.CALL_TYPE_VOICE , false ) ) ; mTracker.refreshExternalCallState ( dep ) ; org.mockito.ArgumentCaptor < com.android.internal.telephony.Connection > connectionArgumentCaptor = org.mockito.ArgumentCaptor.forClass ( com.android.internal.telephony.Connection.class ) ; org.mockito.Mockito.verify ( mCallNotifier ) . notifyUnknownConnection ( connectionArgumentCaptor.capture ( ) ) ; com.android.internal.telephony.Connection connection = connectionArgumentCaptor.getValue ( ) ; assert connection instanceof com.android.internal.telephony.imsphone.ImsExternalConnection ; }

Target:
public void testAddExternalCall ( ) { java.util.List < android.telephony.ims.ImsExternalCallState > dep = new java.util.ArrayList < > ( ) ; dep.add ( new android.telephony.ims.ImsExternalCallState ( com.android.internal.telephony.imsphone.ImsExternalCallTrackerTest.CALL_ID , com.android.internal.telephony.imsphone.ImsExternalCallTrackerTest.TEST_ADDRESS , false , android.telephony.ims.ImsExternalCallState.CALL_STATE_CONFIRMED , android.telephony.ims.ImsCallProfile.CALL_TYPE_VOICE , false ) ) ; mTracker.refreshExternalCallState ( dep ) ; org.mockito.ArgumentCaptor < com.android.internal.telephony.Connection > connectionArgumentCaptor = org.mockito.ArgumentCaptor.forClass ( com.android.internal.telephony.Connection.class ) ; org.mockito.Mockito.verify ( mCallNotifier ) . notifyUnknownConnection ( connectionArgumentCaptor.capture ( ) ) ; com.android.internal.telephony.Connection connection = connectionArgumentCaptor.getValue ( ) ; assert connection instanceof com.android.internal.telephony.imsphone.ImsExternalConnection ; }
Source:
public void testCanReadPeersMacAddressCurrentUserAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanReadPeersMacAddressCurrentUserAndAllPermissions ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
public void testAesCbcHmacSha256Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacMd5Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 ) ; }
Source:
public void findDifferentValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'20'" , "bar" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "Not true that <foo> has maxSdkVersion <14>. It is <20>" ) ; }

Target:
public void findDifferentValue ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "foo" , "maxSdkVersion:'20'" , "bar" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; failure.reset ( ) ; subject.checkMaxSdkVersion ( strings , 14 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "Not true that <foo> has maxSdkVersion <14>. It is <20>" ) ; }
Source:
public void processDisconnectReason ( com.android.ims.ImsReasonInfo imsReasonInfo ) { if ( ( ( imsReasonInfo.mCode ) == ( imsReasonInfo.CODE_REGISTRATION_ERROR ) ) && ( ( imsReasonInfo.mExtraMessage ) != null ) ) { if ( com.android.ims.ImsManager.isWfcEnabledByUser ( mContext ) ) { processWfcDisconnectForNotification ( imsReasonInfo ) ; } } }

Target:
void handleTimerInEmergencyCallbackMode ( int action ) { switch ( action ) { case com.android.internal.telephony.imsphone.ImsPhone.CANCEL_ECM_TIMER : removeCallbacks ( mExitEcmRunnable ) ; ( ( com.android.internal.telephony.GsmCdmaPhone ) ( mDefaultPhone ) ) . notifyEcbmTimerReset ( java.lang.Boolean.TRUE ) ; break ; case com.android.internal.telephony.imsphone.ImsPhone.RESTART_ECM_TIMER : long delayInMillis = android.os.SystemProperties.getLong ( TelephonyProperties.PROPERTY_ECM_EXIT_TIMER , com.android.internal.telephony.imsphone.ImsPhone.DEFAULT_ECM_EXIT_TIMER_VALUE ) ; postDelayed ( mExitEcmRunnable , delayInMillis ) ; ( ( com.android.internal.telephony.GsmCdmaPhone ) ( mDefaultPhone ) ) . notifyEcbmTimerReset ( java.lang.Boolean.FALSE ) ; break ; default : loge ( ( "handleTimerInEmergencyCallbackMode, unsupported action " + action ) ) ; } }
Source:
public void run ( @ javax.annotation.Nonnull final com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { com.android.jack.ir.ast.JMethod method = cfg.getMethod ( ) ; tracer.getStatistic ( com.android.jack.ir.ast.cfg.ControlFlowGraphSizeTracker.STATISTICS ) . add ( cfg.getBlocksDepthFirst ( false ) . size ( ) , ( ( ( ( formatter.getName ( method ) ) + " [" ) + ( formatter.getName ( method.getEnclosingType ( ) ) ) ) + "]" ) ) ; }

Target:
public void run ( @ javax.annotation.Nonnull final com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { com.android.jack.ir.ast.JMethod method = cfg.getMethod ( ) ; tracer.getStatistic ( com.android.jack.ir.ast.cfg.ControlFlowGraphSizeTracker.STATISTICS ) . add ( cfg.getAllBlocksUnordered ( ) . size ( ) , ( ( ( ( formatter.getName ( method ) ) + " [" ) + ( formatter.getName ( method.getEnclosingType ( ) ) ) ) + "]" ) ) ; }
Source:
public com.android.layoutlib.api.LayoutScene render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.layoutlib.LayoutLibrary layoutLib = getReadyLayoutLib ( true ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground ) ; }

Target:
public com.android.ide.common.rendering.api.RenderSession render ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode model , int width , int height , java.util.Set < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > explodeNodes , boolean transparentBackground ) { if ( ! ( ensureFileValid ( ) ) ) { return null ; } if ( ! ( ensureModelValid ( model ) ) ) { return null ; } com.android.ide.common.rendering.LayoutLibrary layoutLib = getReadyLayoutLib ( true ) ; org.eclipse.core.resources.IProject iProject = mEditedFile.getProject ( ) ; return renderWithBridge ( iProject , model , layoutLib , width , height , explodeNodes , transparentBackground ) ; }
Source:
public void removeUpdates ( android.location.ILocationListener listener , java.lang.String packageName ) { try { synchronized ( mLock ) { removeUpdatesLocked ( getReceiver ( listener , packageName ) ) ; } } 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 , "removeUpdates got exception:" , e ) ; } }

Target:
public boolean providerMeetsCriteria ( java.lang.String provider , android.location.Criteria criteria ) { com.android.server.location.LocationProviderInterface p = mProvidersByName.get ( provider ) ; if ( p == null ) { throw new java.lang.IllegalArgumentException ( ( "provider=" + provider ) ) ; } boolean result = android.location.LocationProvider.propertiesMeetCriteria ( p.getName ( ) , p.getProperties ( ) , criteria ) ; if ( com.android.server.LocationManagerService.D ) android.util.Log.d ( com.android.server.LocationManagerService.TAG , ( ( ( ( ( "providerMeetsCriteria(" + provider ) + ", " ) + criteria ) + ")=" ) + result ) ) ; return result ; }
Source:
private void editSlideshow ( ) { android.net.Uri dataUri = mWorkingMessage.saveAsMms ( false ) ; if ( dataUri == null ) { return ; } android.content.Intent intent = new android.content.Intent ( this , com.android.mms.ui.SlideshowEditActivity.class ) ; intent.setData ( dataUri ) ; startActivityForResult ( intent , com.android.mms.ui.ComposeMessageActivity.REQUEST_CODE_CREATE_SLIDESHOW ) ; }

Target:
public void run ( ) { if ( ( mTempMmsUri ) == null ) { return ; } android.content.Intent intent = new android.content.Intent ( this , com.android.mms.ui.SlideshowEditActivity.class ) ; intent.setData ( mTempMmsUri ) ; startActivityForResult ( intent , com.android.mms.ui.ComposeMessageActivity.REQUEST_CODE_CREATE_SLIDESHOW ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( "Service{" + ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( this ) ) ) ) + " " ) + ( getComponentShortName ( ) ) ) + "}" ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( "Service{" ) ; sb.append ( java.lang.Integer.toHexString ( java.lang.System.identityHashCode ( this ) ) ) ; sb.append ( ' ' ) ; appendComponentShortName ( sb ) ; sb.append ( '}' ) ; return sb.toString ( ) ; }
Source:
protected java.io.File getAapt ( com.android.sdklib.repository.FullRevision fullRevision ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( getSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( ( "Test requires build-tools " + ( fullRevision.toShortString ( ) ) ) ) ; } return new java.io.File ( buildToolInfo.getPath ( BuildToolInfo.PathId.AAPT ) ) ; }

Target:
public static void setup ( ) { com.android.builder.png.NinePatchAaptProcessorTest.mSourceAndCrunchedFiles = com.google.common.collect.Maps.newHashMap ( ) ; }
Source:
public int getRadioAccessFamily ( int phoneId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getRadioAccessFamily" ) ) ) { return android.telephony.RadioAccessFamily.RAF_UNKNOWN ; } return com.android.internal.telephony.ProxyController.getInstance ( ) . getRadioAccessFamily ( phoneId ) ; }

Target:
public int getRadioAccessFamily ( int phoneId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( phoneId ) ; if ( phone == null ) { return android.telephony.RadioAccessFamily.RAF_UNKNOWN ; } int subId = phone.getSubId ( ) ; if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getRadioAccessFamily" ) ) ) { return android.telephony.RadioAccessFamily.RAF_UNKNOWN ; } return com.android.internal.telephony.ProxyController.getInstance ( ) . getRadioAccessFamily ( phoneId ) ; }
Source:
public static void computeFma ( android.renderscript.cts.TestFma.ArgumentsFloatFloatFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( float ) ( ( ( ( double ) ( args.inA ) ) * ( ( double ) ( args.inB ) ) ) + ( ( double ) ( args.inC ) ) ) ) ; }

Target:
public static void computeFma ( android.renderscript.cts.TestFma.ArgumentsFloatFloatFloatFloat args ) { android.renderscript.cts.Floaty ab = android.renderscript.cts.Floaty.multiply ( new android.renderscript.cts.Floaty ( args.inA ) , new android.renderscript.cts.Floaty ( args.inB ) ) ; ab.add ( new android.renderscript.cts.Floaty ( args.inC ) ) ; args.out = ab ; }
Source:
public void run ( ) { while ( true ) { try { java.net.Socket socket = serverSocket.accept ( ) ; connectionAttempts.incrementAndGet ( ) ; socket.close ( ) ; } catch ( java.net.SocketException e ) { shutdownLatch.countDown ( ) ; return ; } catch ( java.io.IOException e ) { } } }

Target:
public void run ( ) { while ( true ) { try { java.net.Socket socket = serverSocket.accept ( ) ; connectionAttempts.release ( 1 ) ; socket.close ( ) ; } catch ( java.net.SocketException e ) { shutdownLatch.countDown ( ) ; return ; } catch ( java.io.IOException e ) { } } }
Source:
public void hideStatusIcon ( android.os.IBinder imeToken ) { try { mService.updateStatusIcon ( imeToken , null , 0 ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public java.util.List < android.view.inputmethod.InputMethodSubtype > getEnabledInputMethodSubtypeList ( android.view.inputmethod.InputMethodInfo imi , boolean allowsImplicitlySelectedSubtypes ) { try { return mService.getEnabledInputMethodSubtypeList ( ( imi == null ? null : imi.getId ( ) ) , allowsImplicitlySelectedSubtypes ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void run ( ) { com.google.gct.login.GoogleLogin.getInstance ( ) . logIn ( message ) ; }

Target:
public static void promptToLogIn ( final java.lang.String message ) throws com.google.gct.login.InvalidThreadTypeException { if ( ! ( com.google.gct.login.GoogleLogin.instance.isLoggedIn ( ) ) ) { if ( com.intellij.openapi.application.ApplicationManager.getApplication ( ) . isDispatchThread ( ) ) { com.google.gct.login.GoogleLogin.getInstance ( ) . logIn ( message ) ; } else { throw new com.google.gct.login.InvalidThreadTypeException ( "promptToLogin" ) ; } } }
Source:
protected java.io.File initCacheRoot ( ) { try { java.io.File root = new java.io.File ( com.android.prefs.AndroidLocation.getFolder ( ) ) ; root = new java.io.File ( root , com.android.SdkConstants.FD_CACHE ) ; if ( ! ( root.exists ( ) ) ) { root.mkdirs ( ) ; } return root ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { return null ; } }

Target:
protected java.io.File initCacheRoot ( ) { try { java.io.File root = new java.io.File ( com.android.prefs.AndroidLocation.getFolder ( ) ) ; root = new java.io.File ( root , com.android.SdkConstants.FD_CACHE ) ; if ( ! ( mFileOp.exists ( root ) ) ) { mFileOp.mkdirs ( root ) ; } return root ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { return null ; } }
Source:
public int getFeatureStatus ( int slotId , int featureType ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "getFeatureStatus" ) ; int status = android.telephony.ims.feature.ImsFeature.STATE_NOT_AVAILABLE ; synchronized ( mFeatures ) { android.util.SparseArray < android.telephony.ims.feature.ImsFeature > featureMap = mFeatures.get ( slotId ) ; if ( featureMap != null ) { android.telephony.ims.feature.ImsFeature feature = getImsFeatureFromType ( featureMap , featureType ) ; if ( feature != null ) { status = feature.getFeatureState ( ) ; } } } return status ; }

Target:
public int getFeatureStatus ( int slotId , int featureType ) throws android.os.RemoteException { enforceReadPhoneStatePermission ( "getFeatureStatus" ) ; int status = android.telephony.ims.feature.ImsFeature.STATE_NOT_AVAILABLE ; synchronized ( mFeatures ) { android.util.SparseArray < android.telephony.ims.feature.ImsFeature > featureMap = mFeatures.get ( slotId ) ; if ( featureMap != null ) { android.telephony.ims.feature.ImsFeature feature = getImsFeatureFromType ( featureMap , featureType ) ; if ( feature != null ) { status = feature.getFeatureState ( ) ; } } } return status ; }
Source:
public static java.net.InetAddress getSocketLocalAddress ( java.io.FileDescriptor fd ) throws java.net.SocketException { try { java.net.SocketAddress sa = Libcore.os.getsockname ( fd ) ; java.net.InetSocketAddress isa = ( ( java.net.InetSocketAddress ) ( sa ) ) ; return isa.getAddress ( ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
public static java.net.InetAddress getSocketLocalAddress ( java.io.FileDescriptor fd ) throws java.net.SocketException { try { java.net.SocketAddress sa = Libcore.os.getsockname ( fd ) ; java.net.InetSocketAddress isa = ( ( java.net.InetSocketAddress ) ( sa ) ) ; return isa.getAddress ( ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
public void testVerify_Success ( ) throws java.lang.Exception { mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; assertTrue ( "Signature should verify with same data" , mKeyStore.verify ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA , signature ) ) ; }

Target:
public void testVerify_Success ( ) throws java.lang.Exception { mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeConstants.EVP_PKEY_RSA , android.security.KeyStoreTest.RSA_KEY_SIZE , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; final byte [ ] signature = mKeyStore.sign ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA ) ; assertNotNull ( "Signature should not be null" , signature ) ; assertTrue ( "Signature should verify with same data" , mKeyStore.verify ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_DATA , signature ) ) ; }
Source:
public void testBatchAndFlush ( ) throws java.lang.Exception { try { mWakeLock.acquire ( ) ; for ( android.hardware.Sensor sensor : mSensorList ) { if ( ( sensor.getReportingMode ( ) ) != ( android.hardware.Sensor.REPORTING_MODE_ONE_SHOT ) ) { registerListenerCallFlush ( sensor , null ) ; } } } finally { mWakeLock.release ( ) ; } }

Target:
public void testSensorTimeStamps ( ) throws java.lang.Exception { java.util.ArrayList < java.lang.Throwable > errorsFound = new java.util.ArrayList < > ( ) ; for ( android.hardware.Sensor sensor : mSensorList ) { verifyLongActivation ( sensor , 0 , errorsFound ) ; verifyLongActivation ( sensor , ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( 10 ) ) ) , errorsFound ) ; } assertOnErrors ( errorsFound ) ; }
Source:
private boolean batchRemove ( java.util.Collection < ? > c , boolean complement ) { boolean modified = false ; java.util.Iterator < java.util.Map.Entry < K , V > > it = iterator ( ) ; while ( it.hasNext ( ) ) { if ( ( c.contains ( it.next ( ) ) ) != complement ) { it.remove ( ) ; modified = true ; } } return modified ; }

Target:
private boolean batchRemove ( java.util.Collection < ? > c , boolean complement ) { java.util.Objects.requireNonNull ( c ) ; boolean modified = false ; java.util.Iterator < java.util.Map.Entry < K , V > > it = iterator ( ) ; while ( it.hasNext ( ) ) { if ( ( c.contains ( it.next ( ) ) ) != complement ) { it.remove ( ) ; modified = true ; } } return modified ; }
Source:
public void testParceling ( ) { android.net.IpPrefix p ; p = new android.net.IpPrefix ( "2001:4860:db8::/64" ) ; assertParcelingIsLossless ( p ) ; p = new android.net.IpPrefix ( "192.0.2.0/25" ) ; assertParcelingIsLossless ( p ) ; }

Target:
public void testParceling ( ) { android.net.IpPrefix p ; p = new android.net.IpPrefix ( "2001:4860:db8::/64" ) ; assertParcelingIsLossless ( p ) ; org.junit.Assert.assertTrue ( p.isIPv6 ( ) ) ; p = new android.net.IpPrefix ( "192.0.2.0/25" ) ; assertParcelingIsLossless ( p ) ; org.junit.Assert.assertTrue ( p.isIPv4 ( ) ) ; }
Source:
private static com.google.common.collect.ImmutableSet < java.lang.Class < ? > > getRawTypes ( java.lang.reflect.Type [ ] types ) { com.google.common.collect.ImmutableSet.Builder < java.lang.Class < ? > > builder = com.google.common.collect.ImmutableSet.builder ( ) ; for ( java.lang.reflect.Type type : types ) { builder.addAll ( com.google.common.reflect.TypeToken.getRawTypes ( type ) ) ; } return builder.build ( ) ; }

Target:
void visitGenericArrayType ( java.lang.reflect.GenericArrayType t ) { builder.add ( com.google.common.reflect.Types.getArrayClass ( com.google.common.reflect.TypeToken.getRawType ( t.getGenericComponentType ( ) ) ) ) ; }
Source:
public void getEuiccChallenge ( android.telephony.euicc.EuiccCardManager.ResultCallback < byte [ ] > callback ) { try { getIEuiccCardController ( ) . getEuiccChallenge ( mContext.getOpPackageName ( ) , new com.android.internal.telephony.euicc.IGetEuiccChallengeCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , byte [ ] challenge ) { callback.onComplete ( resultCode , challenge ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getEuiccChallenge" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getEuiccChallenge ( java.lang.String cardId , android.telephony.euicc.EuiccCardManager.ResultCallback < byte [ ] > callback ) { try { getIEuiccCardController ( ) . getEuiccChallenge ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetEuiccChallengeCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , byte [ ] challenge ) { callback.onComplete ( resultCode , challenge ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getEuiccChallenge" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
private static void applyInvokeWithSecurityPolicy ( com.android.internal.os.ZygoteConnection.Arguments args , android.net.Credentials peer ) throws com.android.internal.os.ZygoteSecurityException { int peerUid = peer.getUid ( ) ; if ( ( ( ( args.invokeWith ) != null ) && ( peerUid != 0 ) ) && ( ( ( args.debugFlags ) & ( Zygote.DEBUG_ENABLE_JDWP ) ) == 0 ) ) { throw new com.android.internal.os.ZygoteSecurityException ( ( "Peer is permitted to specify an" + ( "explicit invoke-with wrapper command only for debuggable" + "applications." ) ) ) ; } }

Target:
public static void applyDebuggerSystemProperty ( com.android.internal.os.ZygoteConnection.Arguments args ) { if ( RoSystemProperties.DEBUGGABLE ) { args.runtimeFlags |= Zygote.DEBUG_ENABLE_JDWP ; } }
Source:
public void testAdd2 ( ) { java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; full.add ( one ) ; assertEquals ( 3 , full.size ( ) ) ; }

Target:
public void testAddAll2 ( ) { java.util.Set full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; assertTrue ( full.addAll ( java.util.Arrays.asList ( three , four , one ) ) ) ; assertEquals ( 5 , full.size ( ) ) ; assertFalse ( full.addAll ( java.util.Arrays.asList ( three , four , one ) ) ) ; assertEquals ( 5 , full.size ( ) ) ; }