auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean assertEquals ( java.lang.String message , java.lang.Object expected , java.lang.Object actual ) { boolean result = ( expected == null ) ? actual == null : expected.equals ( actual ) ; return handleAssert ( result , message , stringFor ( expected ) , stringFor ( actual ) ) ; }

Target:
protected static boolean assertEquals ( java.lang.String message , java.lang.Object expected , java.lang.Object actual ) { boolean result = ( expected == null ) ? actual == null : expected.equals ( actual ) ; return com.ibm.icu.dev.test.TestFmwk.handleAssert ( result , message , com.ibm.icu.dev.test.TestFmwk.stringFor ( expected ) , com.ibm.icu.dev.test.TestFmwk.stringFor ( actual ) ) ; }
Source:
synchronized boolean unregisterApp ( android.bluetooth.BluetoothHidDeviceAppConfiguration config ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp()" ) ; } if ( config == null ) { android.util.Log.w ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp: failed. The config in parameter should not be null" ) ; return false ; } if ( ( ( mAppConfig ) == null ) || ( ! ( config.equals ( mAppConfig ) ) ) ) { android.util.Log.w ( com.android.bluetooth.hid.HidDeviceService.TAG , "unregisterApp: failed. The app configuration does not match the record" ) ; return false ; } return unregisterAppNative ( ) ; }

Target:
protected boolean start ( ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , "start()" ) ; } mHandler = new com.android.bluetooth.hid.HidDeviceService.HidDeviceServiceHandler ( ) ; com.android.bluetooth.hid.HidDeviceService.setHidDeviceService ( this ) ; mHidDeviceNativeInterface.init ( ) ; mNativeAvailable = true ; return true ; }
Source:
public void onUpgrade ( android.database.sqlite.SQLiteDatabase db , int oldVersion , int currentVersion ) { if ( Log.LOGV ) com.android.deskclock.Log.v ( ( ( ( ( "Upgrading alarms database from version " + oldVersion ) + " to " ) + currentVersion ) + ", which will destroy all old data" ) ) ; db.execSQL ( "DROP TABLE IF EXISTS alarms" ) ; onCreate ( db ) ; }

Target:
public void onUpgrade ( android.database.sqlite.SQLiteDatabase db , int oldVersion , int currentVersion ) { if ( Log.LOGV ) com.android.deskclock.Log.v ( ( ( ( ( "Upgrading alarms database from version " + oldVersion ) + " to " ) + currentVersion ) + ", which will destroy all old data" ) ) ; db.execSQL ( ( "DROP TABLE IF EXISTS " + ( com.android.deskclock.AlarmDatabaseHelper.TABLE_NAME ) ) ) ; onCreate ( db ) ; }
Source:
public static int booleanFieldEqualZero ( ) { return ( Main.booleanField ) != false ? 13 : 54 ; }

Target:
public static int runSmaliTest ( java.lang.String name , boolean input ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , new java.lang.Class [ ] { boolean . class } ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , input ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }
Source:
private void runInBatchMode ( final java.lang.String javaPkgName ) throws com.android.cts.DeviceDisconnectedException { mTimeOutTimer = new com.android.cts.HostTimer ( new com.android.cts.TestPackage.TimeOutTask ( this ) , HostConfig.Ints.batchStartTimeoutMs.value ( ) ) ; mTimeOutTimer.start ( ) ; mProgressObserver = new com.android.cts.ProgressObserver ( ) ; if ( ( javaPkgName != null ) && ( ( javaPkgName.length ( ) ) > 0 ) ) { runInBatchModeImpl ( javaPkgName ) ; } else { for ( java.lang.String pkgName : getPackageNames ( ) ) { runInBatchModeImpl ( pkgName ) ; } } }

Target:
private void runInBatchMode ( final java.lang.String javaPkgName , android.annotation.cts.Profile profile ) throws com.android.cts.DeviceDisconnectedException { mTimeOutTimer = new com.android.cts.HostTimer ( new com.android.cts.TestPackage.TimeOutTask ( this ) , HostConfig.Ints.batchStartTimeoutMs.value ( ) ) ; mTimeOutTimer.start ( ) ; mProgressObserver = new com.android.cts.ProgressObserver ( ) ; if ( ( javaPkgName != null ) && ( ( javaPkgName.length ( ) ) > 0 ) ) { runInBatchModeImpl ( javaPkgName , profile ) ; } else { for ( java.lang.String pkgName : getPackageNames ( ) ) { runInBatchModeImpl ( pkgName , profile ) ; } } }
Source:
public com.android.ide.eclipse.adt.internal.resources.ResourceType [ ] getAvailableResourceTypes ( ) { if ( ( mResourcesMap ) != null ) { java.util.Set < com.android.ide.eclipse.adt.internal.resources.ResourceType > types = mResourcesMap.keySet ( ) ; if ( types != null ) { return types.toArray ( new com.android.ide.eclipse.adt.internal.resources.ResourceType [ types.size ( ) ] ) ; } } return null ; }

Target:
public com.android.resources.ResourceType [ ] getAvailableResourceTypes ( ) { if ( ( mResourcesMap ) != null ) { java.util.Set < com.android.resources.ResourceType > types = mResourcesMap.keySet ( ) ; if ( types != null ) { return types.toArray ( new com.android.resources.ResourceType [ types.size ( ) ] ) ; } } return null ; }
Source:
protected void onDialogClosed ( boolean positiveResult ) { if ( ( ( mButtonClicked ) == ( android.content.DialogInterface.BUTTON1 ) ) || ( ( mButtonClicked ) == ( android.content.DialogInterface.BUTTON3 ) ) ) { setPhoneNumber ( getEditText ( ) . getText ( ) . toString ( ) ) ; super . onDialogClosed ( positiveResult ) ; setText ( getStringValue ( ) ) ; } else { super . onDialogClosed ( positiveResult ) ; } if ( ( mDialogOnClosedListener ) != null ) { mDialogOnClosedListener.onDialogClosed ( this , mButtonClicked ) ; } }

Target:
protected void onDialogClosed ( boolean positiveResult ) { if ( ( ( mButtonClicked ) == ( android.content.DialogInterface.BUTTON_POSITIVE ) ) || ( ( mButtonClicked ) == ( android.content.DialogInterface.BUTTON_NEUTRAL ) ) ) { setPhoneNumber ( getEditText ( ) . getText ( ) . toString ( ) ) ; super . onDialogClosed ( positiveResult ) ; setText ( getStringValue ( ) ) ; } else { super . onDialogClosed ( positiveResult ) ; } if ( ( mDialogOnClosedListener ) != null ) { mDialogOnClosedListener.onDialogClosed ( this , mButtonClicked ) ; } }
Source:
public final short short_literal ( ) throws org.jf.smali.RecognitionException { short value = 0 ; org.antlr.runtime.tree.CommonTree SHORT_LITERAL193 = null ; try { { SHORT_LITERAL193 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.SHORT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_SHORT_LITERAL_in_short_literal3279 ) ) ) ; value = org.jf.smali.LiteralTools.parseShort ( ( SHORT_LITERAL193 != null ? SHORT_LITERAL193.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final short short_literal ( ) throws org.jf.smali.RecognitionException { short value = 0 ; org.antlr.runtime.tree.CommonTree SHORT_LITERAL206 = null ; try { { SHORT_LITERAL206 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.SHORT_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_SHORT_LITERAL_in_short_literal3468 ) ) ) ; value = org.jf.smali.LiteralTools.parseShort ( ( SHORT_LITERAL206 != null ? SHORT_LITERAL206.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void testIntersectionType004 ( ) throws java.lang.Exception { try { new com.android.jack.test.helper.RuntimeTestHelper ( INTERSECTION_TYPE_004 ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.LAMBDA_TO_ANONYMOUS_CONVERTER.getName ( ) , java.lang.Boolean.TRUE.toString ( ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackCliToolchain.class ) . compileAndRunTest ( ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } }

Target:
public void testIntersectionType004 ( ) throws java.lang.Exception { try { new com.android.jack.test.helper.RuntimeTestHelper ( INTERSECTION_TYPE_004 ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addProperty ( Options.LAMBDA_TO_ANONYMOUS_CONVERTER.getName ( ) , java.lang.Boolean.TRUE.toString ( ) ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackCliToolchain.class ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException e ) { } }
Source:
public void onFindResultReceived ( int activeMatchOrdinal , int numberOfMatches , boolean isDoneCounting ) { if ( ( mFindListener ) == null ) return ; org.chromium.content.common.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onFindResultReceived" ) ; mFindListener.onFindResultReceived ( activeMatchOrdinal , numberOfMatches , isDoneCounting ) ; org.chromium.content.common.TraceEvent.end ( ) ; }

Target:
public void onFindResultReceived ( int activeMatchOrdinal , int numberOfMatches , boolean isDoneCounting ) { if ( ( mFindListener ) == null ) return ; org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onFindResultReceived" ) ; mFindListener.onFindResultReceived ( activeMatchOrdinal , numberOfMatches , isDoneCounting ) ; org.chromium.base.TraceEvent.end ( ) ; }
Source:
public boolean onPasswordInputComplete ( java.lang.String text , boolean obfuscate ) { if ( ( ! ( android.text.TextUtils.isEmpty ( text ) ) ) && ( ( text.length ( ) ) >= ( com.android.tv.settings.connectivity.FormPageDisplayer.PSK_MIN_LENGTH ) ) ) { android.os.Bundle result = new android.os.Bundle ( ) ; result.putString ( FormPage.DATA_KEY_SUMMARY_STRING , text ) ; if ( obfuscate ) { result.putString ( FormPage.DATA_KEY_SECONDARY_STRING , PasswordInputWizardFragment.OPTION_OBFUSCATE ) ; } listener.onBundlePageResult ( formPage , result ) ; return true ; } return false ; }

Target:
public boolean onPasswordInputComplete ( java.lang.String text , boolean obfuscate ) { if ( ( ! ( android.text.TextUtils.isEmpty ( text ) ) ) && ( ( text.length ( ) ) >= ( com.android.tv.settings.connectivity.FormPageDisplayer.WEP_MIN_LENGTH ) ) ) { android.os.Bundle result = new android.os.Bundle ( ) ; result.putString ( FormPage.DATA_KEY_SUMMARY_STRING , text ) ; if ( obfuscate ) { result.putString ( FormPage.DATA_KEY_SECONDARY_STRING , PasswordInputWizardFragment.OPTION_OBFUSCATE ) ; } listener.onBundlePageResult ( formPage , result ) ; return true ; } return false ; }
Source:
private com.android.build.gradle.tasks.ResourceUsageAnalyzer.Resource getResource ( @ com.android.annotations.NonNull java.lang.String possibleUrlReference ) { com.android.ide.common.resources.ResourceUrl url = com.android.ide.common.resources.ResourceUrl.parse ( possibleUrlReference ) ; if ( ( url != null ) && ( ! ( url.framework ) ) ) { return getResource ( url.type , url.name ) ; } return null ; }

Target:
private com.android.build.gradle.tasks.ResourceUsageAnalyzer.Resource getResourceFromUrl ( @ com.android.annotations.NonNull java.lang.String possibleUrlReference ) { com.android.ide.common.resources.ResourceUrl url = com.android.ide.common.resources.ResourceUrl.parse ( possibleUrlReference ) ; if ( ( url != null ) && ( ! ( url.framework ) ) ) { return getResource ( url.type , url.name ) ; } return null ; }
Source:
private static java.io.File replaceRepackageClassesValue ( @ javax.annotation.Nonnull java.io.File inFlags , @ javax.annotation.Nonnull java.lang.String flagNumber ) throws java.io.IOException { java.io.File result = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( ( "proguard" + flagNumber ) , ( ".flags" + flagNumber ) ) ; java.util.List < java.lang.String > lines = com.google.common.io.Files.readLines ( inFlags , java.nio.charset.StandardCharsets.UTF_8 ) ; java.lang.String fileAsOneLine = com.google.common.base.Joiner.on ( ' ' ) . join ( lines ) ; java.lang.String resultContent = fileAsOneLine.replaceAll ( "-repackageclasses\\s+\'.+\'" , "-repackageclasses ''" ) ; com.google.common.io.Files.write ( resultContent , result , java.nio.charset.StandardCharsets.UTF_8 ) ; return result ; }

Target:
private static java.io.File replaceRepackageClassesValue ( @ javax.annotation.Nonnull java.io.File inFlags , @ javax.annotation.Nonnull java.lang.String flagNumber ) throws java.io.IOException { java.io.File result = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( ( "proguard" + flagNumber ) , ( ".flags" + flagNumber ) ) ; java.util.List < java.lang.String > lines = com.google.common.io.Files.readLines ( inFlags , com.android.jack.shrob.RepackagingTest.UTF8 ) ; java.lang.String fileAsOneLine = com.google.common.base.Joiner.on ( ' ' ) . join ( lines ) ; java.lang.String resultContent = fileAsOneLine.replaceAll ( "-repackageclasses\\s+\'.+\'" , "-repackageclasses ''" ) ; com.google.common.io.Files.write ( resultContent , result , com.android.jack.shrob.RepackagingTest.UTF8 ) ; return result ; }
Source:
public void testAppLauncher ( ) throws java.lang.Exception { com.android.devtools.systemimage.uitest.utils.ShellUtil.ShellResult result = com.android.devtools.systemimage.uitest.utils.ShellUtil.invokeCommand ( "ls" ) ; assertTrue ( result.stderr , ( ( ( result.stdout.length ( ) ) > 0 ) && ( ( result.stderr.length ( ) ) == 0 ) ) ) ; }

Target:
public void testShellUtil ( ) throws java.lang.Exception { com.android.devtools.systemimage.uitest.utils.ShellUtil.ShellResult result = com.android.devtools.systemimage.uitest.utils.ShellUtil.invokeCommand ( "ls" ) ; org.junit.Assert.assertTrue ( result.stderr , ( ( ( result.stdout.length ( ) ) > 0 ) && ( ( result.stderr.length ( ) ) == 0 ) ) ) ; }
Source:
public void testConfigurationUpdatesWhenResizedFromDockedStack ( ) throws java.lang.Exception { if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes dockedSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; moveActivityToStack ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; final android.server.cts.ReportedSizes fullscreenSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesAreSane ( fullscreenSizes , dockedSizes ) ; }

Target:
public void testConfigurationUpdatesWhenResizedFromDockedStack ( ) throws java.lang.Exception { if ( ( ! ( supportsSplitScreenMultiWindow ( ) ) ) || ( ! ( supportsMultiWindowMode ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes dockedSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; moveActivityToStack ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; final android.server.cts.ReportedSizes fullscreenSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesAreSane ( fullscreenSizes , dockedSizes ) ; }
Source:
public int hashCode ( ) { int result = countryIso.hashCode ( ) ; result = ( 31 * result ) + ( ( defaultTimeZoneId ) != null ? defaultTimeZoneId.hashCode ( ) : 0 ) ; result = ( 31 * result ) + ( timeZoneIds.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { int result = countryIso.hashCode ( ) ; result = ( 31 * result ) + ( ( defaultTimeZoneId ) != null ? defaultTimeZoneId.hashCode ( ) : 0 ) ; result = ( 31 * result ) + ( timeZoneIds.hashCode ( ) ) ; result = ( 31 * result ) + ( everUsesUtc ? 1 : 0 ) ; return result ; }
Source:
public void testHashCode ( ) throws java.text.ParseException { { java.lang.String rule = "&9 < a < b < c < d" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } { java.lang.String rule = "&9 < a < b < c < d < e" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } }

Target:
public void testHashCode ( ) throws java.text.ParseException { java.lang.String rule = "&9 < a < b < c < d" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; java.text.RuleBasedCollator same = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( coll.hashCode ( ) , same.hashCode ( ) ) ; }
Source:
public void markBootComplete ( java.lang.String instructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.markBootComplete ( instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void freeCache ( java.lang.String uuid , long freeStorageSize ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.freeCache ( uuid , freeStorageSize ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public void testCheckAndSet ( ) { assertEquals ( true , lq.checkAndSet ( "b+kok" , config ) ) ; assertTrue ( ( ( config.getLocaleQualifier ( ) ) != null ) ) ; assertEquals ( "b+kok" , config.getLocaleQualifier ( ) . toString ( ) ) ; }

Target:
public void testCheckAndSet ( ) { assertEquals ( true , lq.checkAndSet ( "b+kok" , config ) ) ; assertTrue ( ( ( config.getLocaleQualifier ( ) ) != null ) ) ; assertEquals ( "kok" , config.getLocaleQualifier ( ) . toString ( ) ) ; }
Source:
private boolean isDevicesExtra ( java.io.File item ) { java.io.File properties = new java.io.File ( item , com.android.sdklib.SdkConstants.FN_SOURCE_PROP ) ; try { java.io.BufferedReader propertiesReader = new java.io.BufferedReader ( new java.io.FileReader ( properties ) ) ; java.lang.String line ; while ( ( line = propertiesReader.readLine ( ) ) != null ) { java.util.regex.Matcher m = com.android.sdklib.devices.DeviceManager.sPathPropertyPattern.matcher ( line ) ; if ( m.matches ( ) ) { return true ; } } } catch ( java.io.IOException e ) { return false ; } return false ; }

Target:
private boolean isDevicesExtra ( java.io.File item ) { java.io.File properties = new java.io.File ( item , com.android.sdklib.SdkConstants.FN_SOURCE_PROP ) ; try { java.io.BufferedReader propertiesReader = new java.io.BufferedReader ( new java.io.FileReader ( properties ) ) ; try { java.lang.String line ; while ( ( line = propertiesReader.readLine ( ) ) != null ) { java.util.regex.Matcher m = com.android.sdklib.devices.DeviceManager.sPathPropertyPattern.matcher ( line ) ; if ( m.matches ( ) ) { return true ; } } } finally { propertiesReader.close ( ) ; } } catch ( java.io.IOException ignore ) { } return false ; }
Source:
public void test_formatJLjava_lang_StringBufferLjava_text_FieldPosition_ArithmeticException ( ) { final java.text.DecimalFormatSymbols dfs = new java.text.DecimalFormatSymbols ( java.util.Locale.US ) ; java.text.DecimalFormat decimalFormat = new java.text.DecimalFormat ( "00.0#E0" , dfs ) ; decimalFormat.setRoundingMode ( java.math.RoundingMode.UNNECESSARY ) ; try { decimalFormat.format ( 99999 , new java.lang.StringBuffer ( ) , new java.text.FieldPosition ( 0 ) ) ; fail ( "ArithmeticException expected" ) ; } catch ( java.lang.ArithmeticException e ) { } }

Target:
public void test_format_roundingUnnecessaryArithmeticException ( ) { final java.text.DecimalFormatSymbols dfs = new java.text.DecimalFormatSymbols ( java.util.Locale.US ) ; java.text.DecimalFormat decimalFormat = new java.text.DecimalFormat ( "00.0#E0" , dfs ) ; decimalFormat.setRoundingMode ( java.math.RoundingMode.UNNECESSARY ) ; try { decimalFormat.format ( 99999 , new java.lang.StringBuffer ( ) , new java.text.FieldPosition ( 0 ) ) ; fail ( "ArithmeticException expected" ) ; } catch ( java.lang.ArithmeticException e ) { } }
Source:
public void testSetTextCharacterIterator ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( new java.util.Locale ( "es" , "" , "TRADITIONAL" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( new java.text.StringCharacterIterator ( "cha" ) ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; }

Target:
public void testSetTextCharacterIterator ( ) { java.text.RuleBasedCollator rbColl = ( ( java.text.RuleBasedCollator ) ( java.text.Collator.getInstance ( java.util.Locale.forLanguageTag ( "es-u-co-trad" ) ) ) ) ; java.lang.String text = "caa" ; java.text.CollationElementIterator iterator = rbColl.getCollationElementIterator ( text ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; iterator.setText ( new java.text.StringCharacterIterator ( "cha" ) ) ; iterator.setOffset ( 1 ) ; assertEquals ( 1 , iterator.getOffset ( ) ) ; }
Source:
public void setTrafficClass ( int value ) throws java.net.SocketException { checkOpenAndCreate ( true ) ; if ( ( value < 0 ) || ( value > 255 ) ) { throw new java.lang.IllegalArgumentException ( ) ; } impl.setOption ( java.net.SocketOptions.IP_TOS , java.lang.Integer.valueOf ( value ) ) ; }

Target:
public void setTrafficClass ( int value ) throws java.net.SocketException { checkOpenAndCreate ( true ) ; if ( ( value < 0 ) || ( value > 255 ) ) { throw new java.lang.IllegalArgumentException ( ( "Value doesn't fit in an unsigned byte: " + value ) ) ; } impl.setOption ( java.net.SocketOptions.IP_TOS , java.lang.Integer.valueOf ( value ) ) ; }
Source:
private java.util.Set < java.lang.Long > queryPhoneTableForContactIds ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > dialerPhoneNumbers ) { java.util.Set < java.lang.Long > contactIds = new android.support.v4.util.ArraySet ( ) ; com.android.dialer.phonelookup.cp2.Cp2PhoneLookup.PartitionedNumbers partitionedNumbers = new com.android.dialer.phonelookup.cp2.Cp2PhoneLookup.PartitionedNumbers ( dialerPhoneNumbers ) ; contactIds.addAll ( queryPhoneTableForContactIdsBasedOnE164 ( partitionedNumbers.validE164Numbers ( ) ) ) ; contactIds.addAll ( queryPhoneTableForContactIdsBasedOnRawNumber ( partitionedNumbers.unformattableNumbers ( ) ) ) ; return contactIds ; }

Target:
private java.util.Set < java.lang.Long > queryPhoneTableForContactIds ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > dialerPhoneNumbers ) { java.util.Set < java.lang.Long > contactIds = new android.support.v4.util.ArraySet ( ) ; com.android.dialer.phonenumberproto.PartitionedNumbers partitionedNumbers = new com.android.dialer.phonenumberproto.PartitionedNumbers ( dialerPhoneNumbers ) ; contactIds.addAll ( queryPhoneTableForContactIdsBasedOnE164 ( partitionedNumbers.validE164Numbers ( ) ) ) ; contactIds.addAll ( queryPhoneTableForContactIdsBasedOnRawNumber ( partitionedNumbers.unformattableNumbers ( ) ) ) ; return contactIds ; }
Source:
private void setUsbDataUnlocked ( boolean enable ) { if ( com.android.server.usb.UsbDeviceManager.DEBUG ) android.util.Slog.d ( com.android.server.usb.UsbDeviceManager.TAG , ( "setUsbDataUnlocked: " + enable ) ) ; mUsbDataUnlocked = enable ; updateUsbNotification ( ) ; updateUsbStateBroadcastIfNeeded ( ) ; setEnabledFunctions ( mCurrentFunctions , true ) ; }

Target:
public void sendMessage ( int what , java.lang.Object arg , boolean arg1 ) { removeMessages ( what ) ; android.os.Message m = android.os.Message.obtain ( this , what ) ; m.obj = arg ; m.arg1 = ( arg1 ) ? 1 : 0 ; sendMessage ( m ) ; }
Source:
public void open ( java.lang.String closer ) { if ( closer == null ) { throw new java.lang.NullPointerException ( "closer == null" ) ; } if ( ( ( this ) == ( dalvik.system.CloseGuard.NOOP ) ) || ( ! ( dalvik.system.CloseGuard.ENABLED ) ) ) { return ; } java.lang.String message = ( "Explicit termination method '" + closer ) + "' not called" ; allocationSite = new java.lang.Throwable ( message ) ; }

Target:
public void open ( java.lang.String closer ) { if ( closer == null ) { throw new java.lang.NullPointerException ( "closer == null" ) ; } if ( ( ( this ) == ( dalvik.system.CloseGuard.NOOP ) ) || ( ! ( dalvik.system.CloseGuard.ENABLED ) ) ) { return ; } java.lang.String message = ( "Explicit termination method '" + closer ) + "' not called" ; allocationSite = new java.lang.Throwable ( message ) ; dalvik.system.CloseGuard.currentTracker.open ( allocationSite ) ; }
Source:
public synchronized void addURL ( java.net.URL url ) { if ( closed ) return ; synchronized ( urls ) { if ( ( url == null ) || ( path.contains ( url ) ) ) return ; urls.add ( 0 , url ) ; path.add ( url ) ; } }

Target:
public synchronized void addURL ( java.net.URL url ) { if ( closed ) return ; synchronized ( urls ) { if ( ( url == null ) || ( path.contains ( url ) ) ) return ; urls.add ( 0 , url ) ; path.add ( url ) ; if ( ( lookupCacheURLs ) != null ) { sun.misc.URLClassPath.disableAllLookupCaches ( ) ; } } }
Source:
public V setValue ( V value ) { if ( value == null ) throw new java.lang.NullPointerException ( ) ; V v = super . setValue ( value ) ; this . put ( getKey ( ) , value ) ; return v ; }

Target:
public java.util.Enumeration < V > elements ( ) { java.util.concurrent.ConcurrentHashMap.Node < K , V > [ ] t ; int f = ( ( t = table ) == null ) ? 0 : t.length ; return new java.util.concurrent.ConcurrentHashMap.ValueIterator < K , V > ( t , f , 0 , f , this ) ; }
Source:
public void checkValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.util.Map.Entry < T , U > data ) throws com.android.sched.util.codec.CheckingException { com.android.sched.util.config.ChainedException.ChainedExceptionBuilder < com.android.sched.util.codec.CheckingException > exceptions = new com.android.sched.util.config.ChainedException.ChainedExceptionBuilder < com.android.sched.util.codec.CheckingException > ( ) ; try { keyParser.checkValue ( context , data.getKey ( ) ) ; } catch ( com.android.sched.util.codec.CheckingException e ) { exceptions.appendException ( e ) ; } try { valueParser.checkValue ( context , data.getValue ( ) ) ; } catch ( com.android.sched.util.codec.CheckingException e ) { exceptions.appendException ( e ) ; } exceptions.throwIfNecessary ( ) ; }

Target:
public java.lang.String formatValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.PairCodec.Pair < T , U > data ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( keyParser.formatValue ( data.getFirst ( ) ) ) ; sb.append ( separator ) ; sb.append ( valueParser.formatValue ( data.getSecond ( ) ) ) ; return sb.toString ( ) ; }
Source:
public void addListener ( com.android.tv.dvr.DvrWatchedPositionManager.WatchedPositionChangedListener listener , long recordedProgramId ) { if ( recordedProgramId == ( RecordedProgram.ID_NOT_SET ) ) { return ; } java.util.Set < com.android.tv.dvr.DvrWatchedPositionManager.WatchedPositionChangedListener > listenerSet = mListeners.get ( recordedProgramId ) ; if ( listenerSet == null ) { listenerSet = new java.util.concurrent.CopyOnWriteArraySet < > ( ) ; mListeners.put ( recordedProgramId , listenerSet ) ; } listenerSet.add ( listener ) ; }

Target:
public void addListener ( com.android.tv.dvr.DvrWatchedPositionManager.WatchedPositionChangedListener listener , long recordedProgramId ) { if ( recordedProgramId == ( com.android.tv.dvr.data.RecordedProgram.ID_NOT_SET ) ) { return ; } java.util.Set < com.android.tv.dvr.DvrWatchedPositionManager.WatchedPositionChangedListener > listenerSet = mListeners.get ( recordedProgramId ) ; if ( listenerSet == null ) { listenerSet = new java.util.concurrent.CopyOnWriteArraySet < > ( ) ; mListeners.put ( recordedProgramId , listenerSet ) ; } listenerSet.add ( listener ) ; }
Source:
public void testBindSocketOfNonSocketFdThrows ( ) throws java.lang.Exception { final java.io.File devNull = new java.io.File ( "/dev/null" ) ; assertTrue ( devNull.canRead ( ) ) ; final java.io.FileInputStream fis = new java.io.FileInputStream ( devNull ) ; assertTrue ( ( null != ( fis.getFD ( ) ) ) ) ; assertTrue ( fis.getFD ( ) . valid ( ) ) ; try { mNetwork.bindSocket ( fis.getFD ( ) ) ; fail ( "SocketException not thrown" ) ; } catch ( java.net.SocketException expected ) { } }

Target:
public void testBindSocketOfNonSocketFdThrows ( ) throws java.lang.Exception { final java.io.File devNull = new java.io.File ( "/dev/null" ) ; org.junit.Assert.assertTrue ( devNull.canRead ( ) ) ; final java.io.FileInputStream fis = new java.io.FileInputStream ( devNull ) ; org.junit.Assert.assertTrue ( ( null != ( fis.getFD ( ) ) ) ) ; org.junit.Assert.assertTrue ( fis.getFD ( ) . valid ( ) ) ; try { mNetwork.bindSocket ( fis.getFD ( ) ) ; org.junit.Assert.fail ( "SocketException not thrown" ) ; } catch ( java.net.SocketException expected ) { } }
Source:
public void testAesCbcHmacMd5Tcp4 ( ) 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 ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha512Tcp4 ( ) 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_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
private void setupNext ( ) { isNextLocale = false ; if ( isSpecLocale ) { nextSpec = spec ; int i = nextSpec.lastIndexOf ( android.icu.text.TransliteratorRegistry.LOCALE_SEP ) ; if ( i > 0 ) { nextSpec = spec.substring ( 0 , i ) ; isNextLocale = true ; } else { nextSpec = scriptName ; } } else { if ( ( nextSpec ) != ( scriptName ) ) { nextSpec = scriptName ; } else { nextSpec = null ; } } }

Target:
private void setupNext ( ) { isNextLocale = false ; if ( isSpecLocale ) { nextSpec = spec ; int i = nextSpec.lastIndexOf ( android.icu.text.TransliteratorRegistry.LOCALE_SEP ) ; if ( i > 0 ) { nextSpec = spec.substring ( 0 , i ) ; isNextLocale = true ; } else { nextSpec = scriptName ; } } else { if ( ! ( android.icu.impl.Utility.sameObjects ( nextSpec , scriptName ) ) ) { nextSpec = scriptName ; } else { nextSpec = null ; } } }
Source:
private com.android.ide.eclipse.gltrace.state.IGLProperty createVboState ( ) { com.android.ide.eclipse.gltrace.state.IGLProperty size = new com.android.ide.eclipse.gltrace.state.GLIntegerProperty ( GLStateType.BUFFER_SIZE , java.lang.Integer.valueOf ( 0 ) ) ; com.android.ide.eclipse.gltrace.state.IGLProperty usage = new com.android.ide.eclipse.gltrace.state.GLEnumProperty ( GLStateType.BUFFER_USAGE , com.android.ide.eclipse.gldebugger.GLEnum.GL_STATIC_DRAW ) ; com.android.ide.eclipse.gltrace.state.IGLProperty data = new com.android.ide.eclipse.gltrace.state.GLObjectProperty ( GLStateType.BUFFER_DATA , new byte [ 0 ] ) ; com.android.ide.eclipse.gltrace.state.IGLProperty type = new com.android.ide.eclipse.gltrace.state.GLEnumProperty ( GLStateType.BUFFER_TYPE , com.android.ide.eclipse.gldebugger.GLEnum.GL_ARRAY_BUFFER ) ; com.android.ide.eclipse.gltrace.state.IGLProperty perVboState = new com.android.ide.eclipse.gltrace.state.GLCompositeProperty ( GLStateType.VBO_COMPOSITE , size , usage , data , type ) ; return new com.android.ide.eclipse.gltrace.state.GLSparseArrayProperty ( GLStateType.VBO , perVboState ) ; }

Target:
private com.android.ide.eclipse.gltrace.state.IGLProperty createVboState ( ) { com.android.ide.eclipse.gltrace.state.IGLProperty size = new com.android.ide.eclipse.gltrace.state.GLIntegerProperty ( GLStateType.BUFFER_SIZE , java.lang.Integer.valueOf ( 0 ) ) ; com.android.ide.eclipse.gltrace.state.IGLProperty usage = new com.android.ide.eclipse.gltrace.state.GLEnumProperty ( GLStateType.BUFFER_USAGE , com.android.ide.eclipse.gltrace.GLEnum.GL_STATIC_DRAW ) ; com.android.ide.eclipse.gltrace.state.IGLProperty data = new com.android.ide.eclipse.gltrace.state.GLObjectProperty ( GLStateType.BUFFER_DATA , new byte [ 0 ] ) ; com.android.ide.eclipse.gltrace.state.IGLProperty type = new com.android.ide.eclipse.gltrace.state.GLEnumProperty ( GLStateType.BUFFER_TYPE , com.android.ide.eclipse.gltrace.GLEnum.GL_ARRAY_BUFFER ) ; com.android.ide.eclipse.gltrace.state.IGLProperty perVboState = new com.android.ide.eclipse.gltrace.state.GLCompositeProperty ( GLStateType.VBO_COMPOSITE , size , usage , data , type ) ; return new com.android.ide.eclipse.gltrace.state.GLSparseArrayProperty ( GLStateType.VBO , perVboState ) ; }
Source:
public void deriveValues ( java.util.Set < com.android.tools.idea.wizard.ScopedStateStore.Key > modified ) { super . deriveValues ( modified ) ; }

Target:
public void deriveValues ( java.util.Set < com.android.tools.idea.wizard.ScopedStateStore.Key > modified ) { super . deriveValues ( modified ) ; for ( com.android.tools.idea.wizard.ScopedStateStore.Key key : modified ) { if ( key == ( NewCloudModuleDynamicWizardPath.KEY_SELECTED_TEMPLATE_FILE ) ) { java.io.File templateFile = myState.get ( NewCloudModuleDynamicWizardPath.KEY_SELECTED_TEMPLATE_FILE ) ; if ( templateFile != null ) { setModuleDescriptionText ( templateFile ) ; setModuleTypeIcon ( templateFile ) ; } } } }
Source:
public final byte [ ] doFinal ( byte [ ] input , int inputOffset , int inputLen ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { checkCipherState ( ) ; if ( ( ( ( input == null ) || ( inputOffset < 0 ) ) || ( inputLen > ( ( input.length ) - inputOffset ) ) ) || ( inputLen < 0 ) ) { throw new java.lang.IllegalArgumentException ( "Bad arguments" ) ; } chooseFirstProvider ( ) ; return spi.engineDoFinal ( input , inputOffset , inputLen ) ; }

Target:
public final byte [ ] doFinal ( byte [ ] input , int inputOffset , int inputLen ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { checkCipherState ( ) ; if ( ( ( ( input == null ) || ( inputOffset < 0 ) ) || ( inputLen > ( ( input.length ) - inputOffset ) ) ) || ( inputLen < 0 ) ) { throw new java.lang.IllegalArgumentException ( "Bad arguments" ) ; } updateProviderIfNeeded ( ) ; return spi.engineDoFinal ( input , inputOffset , inputLen ) ; }
Source:
static void gc ( ) { final dalvik.system.VMRuntime runtime = dalvik.system.VMRuntime.getRuntime ( ) ; java.lang.System.gc ( ) ; runtime.runFinalizationSync ( ) ; java.lang.System.gc ( ) ; runtime.runFinalizationSync ( ) ; java.lang.System.gc ( ) ; runtime.runFinalizationSync ( ) ; }

Target:
static void gcAndFinalize ( ) { final dalvik.system.VMRuntime runtime = dalvik.system.VMRuntime.getRuntime ( ) ; java.lang.System.gc ( ) ; runtime.runFinalizationSync ( ) ; java.lang.System.gc ( ) ; }
Source:
public void testDistanceRecorder_unknownItemThrowsException ( ) { final android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > distanceRecorder = new android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > ( android.support.test.espresso.util.TreeIterablesTest.complexTree , new android.support.test.espresso.util.TreeIterablesTest.TestElementTreeViewer ( ) ) ; try { distanceRecorder.getDistance ( new android.support.test.espresso.util.TreeIterablesTest.TestElement ( "hello" ) ) ; fail ( "node should be unknown" ) ; } catch ( java.lang.RuntimeException expected ) { } }

Target:
public void distanceRecorder_unknownItemThrowsException ( ) { final android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > distanceRecorder = new android.support.test.espresso.util.TreeIterables.DistanceRecordingTreeViewer < android.support.test.espresso.util.TreeIterablesTest.TestElement > ( android.support.test.espresso.util.TreeIterablesTest.complexTree , new android.support.test.espresso.util.TreeIterablesTest.TestElementTreeViewer ( ) ) ; expectedException.expect ( java.lang.RuntimeException.class ) ; distanceRecorder.getDistance ( new android.support.test.espresso.util.TreeIterablesTest.TestElement ( "hello" ) ) ; }
Source:
public com.google.common.util.concurrent.ListenableFuture < com.android.dialer.phonelookup.PhoneLookupInfo.DialerBlockedNumberInfo > lookup ( com.android.dialer.DialerPhoneNumber dialerPhoneNumber ) { return executorService.submit ( ( ) -> queryNumbers ( com.google.common.collect.ImmutableSet.of ( dialerPhoneNumber ) ) . get ( dialerPhoneNumber ) ) ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < com.android.dialer.phonelookup.PhoneLookupInfo.DialerBlockedNumberInfo > lookup ( com.android.dialer.DialerPhoneNumber dialerPhoneNumber ) { if ( com.android.dialer.blocking.FilteredNumberCompat.useNewFiltering ( appContext ) ) { return com.google.common.util.concurrent.Futures.immediateFuture ( com.android.dialer.phonelookup.PhoneLookupInfo.DialerBlockedNumberInfo.getDefaultInstance ( ) ) ; } return executorService.submit ( ( ) -> queryNumbers ( com.google.common.collect.ImmutableSet.of ( dialerPhoneNumber ) ) . get ( dialerPhoneNumber ) ) ; }
Source:
public void dumpDisplayListForCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Dump displaylist" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.DeviceBridge.outputDisplayList ( selectedNode.viewNode ) ; } } ) ; } }

Target:
public void invalidateCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Invalidating view" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.invalidateView ( selectedNode.viewNode ) ; } } ) ; } }
Source:
java.lang.String getChild ( org.eclipse.core.resources.IProject project , java.lang.String root ) { if ( ( com.android.SdkConstants.SCROLL_VIEW.equals ( root ) ) || ( com.android.SdkConstants.HORIZONTAL_SCROLL_VIEW.equals ( root ) ) ) { return ( " <LinearLayout " + ( getDefaultAttrs ( project , root ) . replace ( '\n' , ' ' ) ) ) + "></LinearLayout>\n" ; } return null ; }

Target:
java.lang.String getChild ( org.eclipse.core.resources.IProject project , java.lang.String root ) { if ( ( com.android.SdkConstants.SCROLL_VIEW.equals ( root ) ) || ( com.android.SdkConstants.HORIZONTAL_SCROLL_VIEW.equals ( root ) ) ) { return ( ( " <LinearLayout " + ( getDefaultAttrs ( project , root ) . replace ( '\n' , ' ' ) ) ) + " android:orientation=\"vertical\"" ) + "></LinearLayout>\n" ; } return null ; }
Source:
public java.lang.String getApiLabel ( ) { com.android.sdklib.AndroidVersion key = ( ( com.android.sdklib.AndroidVersion ) ( getKey ( ) ) ) ; if ( key.equals ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategoryApi.KEY_TOOLS ) ) { return "TOOLS" ; } else if ( key.equals ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategoryApi.KEY_EXTRA ) ) { return "EXTRAS" ; } else { return key.toString ( ) ; } }

Target:
public java.lang.String getApiLabel ( ) { com.android.sdklib.AndroidVersion key = ( ( com.android.sdklib.AndroidVersion ) ( getKey ( ) ) ) ; if ( key.equals ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategoryApi.KEY_TOOLS ) ) { return "TOOLS" ; } else if ( key.equals ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategoryApi.KEY_TOOLS_PREVIEW ) ) { return "TOOLS-PREVIEW" ; } else if ( key.equals ( com.android.sdkuilib.internal.repository.sdkman2.PkgCategoryApi.KEY_EXTRA ) ) { return "EXTRAS" ; } else { return key.toString ( ) ; } }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { com.android.jack.shrob.seed.SeedMarker marker = type.getMarker ( com.android.jack.shrob.seed.SeedMarker.class ) ; if ( ( marker != null ) && ( ( marker.getModifier ( ) ) != ( com.android.jack.shrob.spec.KeepModifier.ALLOW_SHRINKING ) ) ) { com.android.jack.shrob.shrink.Keeper.Visitor visitor = new com.android.jack.shrob.shrink.Keeper.Visitor ( ) ; visitor.trace ( type ) ; } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { com.android.jack.shrob.seed.SeedMarker marker = type.getMarker ( com.android.jack.shrob.seed.SeedMarker.class ) ; if ( ( marker != null ) && ( ( marker.getModifier ( ) ) != ( com.android.jack.shrob.spec.KeepModifier.ALLOW_SHRINKING ) ) ) { tracer.trace ( type ) ; } }
Source:
public void sendMessage ( @ android.annotation.NonNull java.lang.Object peerHandle , int messageId , @ android.annotation.Nullable byte [ ] message , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mClientId , mSessionId , peerHandle , message , messageId , retryCount ) ; } }

Target:
public void sendMessage ( @ android.annotation.NonNull java.lang.Object peerHandle , int messageId , @ android.annotation.Nullable byte [ ] message , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiAwareManager" ) ; return ; } mgr.sendMessage ( mClientId , mSessionId , peerHandle , message , messageId , retryCount ) ; } }
Source:
public void updateOutlineSelection ( final java.util.List < com.android.ide.common.api.INode > nodes ) { org.eclipse.swt.widgets.Display.getDefault ( ) . asyncExec ( new java.lang.Runnable ( ) { public void run ( ) { selectDropped ( nodes ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage outlinePage = mCanvas.getOutlinePage ( ) ; org.eclipse.ui.IWorkbenchPartSite site = outlinePage.getEditor ( ) . getSite ( ) ; org.eclipse.jface.viewers.ISelectionProvider selectionProvider = site.getSelectionProvider ( ) ; org.eclipse.jface.viewers.ISelection selection = selectionProvider.getSelection ( ) ; if ( selection != null ) { outlinePage.setSelection ( selection ) ; } } } ) ; }

Target:
public void setOutlineSelection ( final java.util.List < com.android.ide.common.api.INode > nodes ) { org.eclipse.swt.widgets.Display.getDefault ( ) . asyncExec ( new java.lang.Runnable ( ) { public void run ( ) { selectDropped ( nodes ) ; syncOutlineSelection ( ) ; } } ) ; }
Source:
public static int frequency ( java.util.Iterator < ? > iterator , @ javax.annotation.Nullable java.lang.Object element ) { int result = 0 ; if ( element == null ) { while ( iterator.hasNext ( ) ) { if ( ( iterator.next ( ) ) == null ) { result ++ ; } } } else { while ( iterator.hasNext ( ) ) { if ( element.equals ( iterator.next ( ) ) ) { result ++ ; } } } return result ; }

Target:
static < T > T pollNext ( java.util.Iterator < T > iterator ) { if ( iterator.hasNext ( ) ) { T result = iterator.next ( ) ; iterator.remove ( ) ; return result ; } else { return null ; } }
Source:
static java.lang.String pseudoToU16 ( java.lang.String input ) { int len = input.length ( ) ; char [ ] output = new char [ len ] ; int i ; if ( ! ( android.icu.dev.test.bidi.BidiTest.tablesInitialized ) ) { android.icu.dev.test.bidi.BidiTest.buildPseudoTables ( ) ; } for ( i = 0 ; i < len ; i ++ ) output [ i ] = android.icu.dev.test.bidi.BidiTest.pseudoToUChar [ input.charAt ( i ) ] ; return new java.lang.String ( output ) ; }

Target:
static java.lang.String pseudoToU16 ( java.lang.String input ) { int len = input.length ( ) ; char [ ] output = new char [ len ] ; int i ; if ( ! ( android.icu.dev.test.bidi.BidiFmwk.tablesInitialized ) ) { android.icu.dev.test.bidi.BidiFmwk.buildPseudoTables ( ) ; } for ( i = 0 ; i < len ; i ++ ) output [ i ] = android.icu.dev.test.bidi.BidiFmwk.pseudoToUChar [ input.charAt ( i ) ] ; return new java.lang.String ( output ) ; }
Source:
public void run ( int i ) { android.net.Uri channelUri = channelUris.get ( i ) ; int j = 0 ; try ( android.database.Cursor cursor = mContentResolver.query ( android.media.tv.TvContract.buildProgramsUriForChannel ( channelUri , 0 , ( ( PROGRAM_DURATION_MS * TRANSACTION_SIZE ) / 2 ) ) , null , null , null , null ) ) { while ( cursor.moveToNext ( ) ) { ++ j ; } } }

Target:
public void run ( int i ) { try ( android.database.Cursor cursor = mContentResolver.query ( Programs.CONTENT_URI , null , null , null , null ) ) { while ( cursor.moveToNext ( ) ) { } } }
Source:
public void validateCertCredentialWithoutClientPrivateKey ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.certCredential = new android.net.wifi.hotspot2.pps.Credential.CertificateCredential ( ) ; cred.certCredential.certType = "x509v3" ; cred.certCredential.certSha256FingerPrint = java.security.MessageDigest.getInstance ( "SHA-256" ) . digest ( FakeKeys.CLIENT_CERT.getEncoded ( ) ) ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; cred.clientCertificateChain = new java.security.cert.X509Certificate [ ] { android.net.wifi.FakeKeys.CLIENT_CERT } ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateCertCredentialWithoutClientPrivateKey ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithCertificateCredential ( ) ; cred.setClientPrivateKey ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }