auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String onGetDefaultNumber ( com.android.phone.EditPhoneNumberPreference preference ) { if ( preference == ( mSubMenuVoicemailSettings ) ) { if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( "updating default for voicemail dialog" ) ; updateVoiceNumberField ( ) ; return null ; } java.lang.String vmDisplay = com.android.internal.telephony.PhoneFactory.getDefaultPhone ( ) . getVoiceMailNumber ( ) ; if ( android.text.TextUtils.isEmpty ( vmDisplay ) ) { return null ; } if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( "updating default for call forwarding dialogs" ) ; return ( ( getString ( R.string.voicemail_abbreviated ) ) + " " ) + vmDisplay ; }

Target:
public java.lang.String onGetDefaultNumber ( com.android.phone.EditPhoneNumberPreference preference ) { if ( preference == ( mSubMenuVoicemailSettings ) ) { if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( "updating default for voicemail dialog" ) ; updateVoiceNumberField ( ) ; return null ; } java.lang.String vmDisplay = mPhone.getVoiceMailNumber ( ) ; if ( android.text.TextUtils.isEmpty ( vmDisplay ) ) { return null ; } if ( com.android.phone.CallFeaturesSetting.DBG ) com.android.phone.CallFeaturesSetting.log ( "updating default for call forwarding dialogs" ) ; return ( ( getString ( R.string.voicemail_abbreviated ) ) + " " ) + vmDisplay ; }
Source:
public static byte [ ] serialize ( int dropped , java.util.List < android.net.ConnectivityMetricsEvent > events ) throws java.io.IOException { final com.android.server.connectivity.metrics.IpConnectivityLogClass.IpConnectivityLog log = new com.android.server.connectivity.metrics.IpConnectivityLogClass.IpConnectivityLog ( ) ; log.events = com.android.server.connectivity.IpConnectivityEventBuilder.toProto ( events ) ; log.droppedEvents = dropped ; return com.android.server.connectivity.metrics.IpConnectivityLogClass.IpConnectivityLog.toByteArray ( log ) ; }

Target:
public static byte [ ] serialize ( int dropped , java.util.List < android.net.ConnectivityMetricsEvent > events ) throws java.io.IOException { final com.android.server.connectivity.metrics.IpConnectivityLogClass.IpConnectivityLog log = new com.android.server.connectivity.metrics.IpConnectivityLogClass.IpConnectivityLog ( ) ; log.events = com.android.server.connectivity.IpConnectivityEventBuilder.toProto ( events ) ; log.droppedEvents = dropped ; if ( ( ( log.events.length ) > 0 ) || ( dropped > 0 ) ) { log.version = IpConnectivityMetrics.VERSION ; } return com.android.server.connectivity.metrics.IpConnectivityLogClass.IpConnectivityLog.toByteArray ( log ) ; }
Source:
public static boolean isBitmapFile ( @ com.android.annotations.NonNull java.io.File file ) { java.lang.String path = file.getPath ( ) ; return ( ( ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_PNG ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_JPG ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_GIF ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_JPEG ) ) ; }

Target:
public static boolean isBitmapFile ( @ com.android.annotations.NonNull java.io.File file ) { java.lang.String path = file.getPath ( ) ; return ( ( ( ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_PNG ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_JPG ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_GIF ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_JPEG ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_WEBP ) ) ; }
Source:
public void test_minus_Period ( ) { test.java.time.MockSimplePeriod period = test.java.time.MockSimplePeriod.of ( 7 , java.time.temporal.ChronoUnit.MONTHS ) ; java.time.OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus ( period ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2007 , 11 , 30 , 11 , 30 , 59 , 500 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }

Target:
public void test_minus_Period ( ) { test.java.time.MockSimplePeriod period = test.java.time.MockSimplePeriod.of ( 7 , java.time.temporal.ChronoUnit.MONTHS ) ; java.time.OffsetDateTime t = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.minus ( period ) ; org.testng.Assert.assertEquals ( t , java.time.OffsetDateTime.of ( 2007 , 11 , 30 , 11 , 30 , 59 , 500 , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }
Source:
private static libcore.tzdata.update2.tools.TimeZoneDistroBuilder createValidDistroBuilder ( ) throws java.lang.Exception { java.lang.String distroRulesVersion = com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ; libcore.tzdata.shared2.DistroVersion validDistroVersion = new libcore.tzdata.shared2.DistroVersion ( libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MINOR_VERSION , distroRulesVersion , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; return new libcore.tzdata.update2.tools.TimeZoneDistroBuilder ( ) . setDistroVersion ( validDistroVersion ) . setTzDataFile ( com.android.cts.tzdata.TzDataCheckTest.createValidTzDataBytes ( distroRulesVersion ) ) . setIcuDataFile ( new byte [ 10 ] ) ; }

Target:
private static com.android.timezone.distro.tools.TimeZoneDistroBuilder createValidDistroBuilder ( ) throws java.lang.Exception { java.lang.String distroRulesVersion = com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ; com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION , distroRulesVersion , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; return new com.android.timezone.distro.tools.TimeZoneDistroBuilder ( ) . setDistroVersion ( validDistroVersion ) . setTzDataFile ( com.android.cts.tzdata.TzDataCheckTest.createValidTzDataBytes ( distroRulesVersion ) ) . setIcuDataFile ( new byte [ 10 ] ) ; }
Source:
public void getSmdsAddress ( java.lang.String cardId , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.String > callback ) { try { getIEuiccCardController ( ) . getSmdsAddress ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetSmdsAddressCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , java.lang.String address ) { callback.onComplete ( resultCode , address ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getSmdsAddress" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void requestDefaultSmdpAddress ( java.lang.String cardId , java.util.concurrent.Executor executor , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.String > callback ) { try { getIEuiccCardController ( ) . getDefaultSmdpAddress ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetDefaultSmdpAddressCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , java.lang.String address ) { executor.execute ( ( ) -> callback.onComplete ( resultCode , address ) ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getDefaultSmdpAddress" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public char [ ] formatBigDecimal ( java.math.BigDecimal value , java.text.FieldPosition field ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator fpi = libcore.icu.NativeDecimalFormat.FieldPositionIterator.forFieldPosition ( field ) ; char [ ] result = libcore.icu.NativeDecimalFormat.formatDigitList ( this . address , value.toString ( ) , fpi ) ; if ( fpi != null ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator.setFieldPosition ( fpi , field ) ; } return result ; }

Target:
public char [ ] formatBigDecimal ( java.math.BigDecimal value , java.text.FieldPosition field ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator fpi = libcore.icu.NativeDecimalFormat.FieldPositionIterator.forFieldPosition ( field ) ; char [ ] result = libcore.icu.NativeDecimalFormat.formatDigitList ( this . address , value.toString ( ) , fpi ) ; if ( ( fpi != null ) && ( field != null ) ) { libcore.icu.NativeDecimalFormat.updateFieldPosition ( field , fpi ) ; } return result ; }
Source:
public android.view.CompatibilityInfoHolder getCompatibilityInfo ( int displayId ) { return displayId == ( android.view.Display.DEFAULT_DISPLAY ) ? mPackageInfo.mCompatibilityInfo : null ; }

Target:
public android.content.Context createConfigurationContext ( android.content.res.Configuration overrideConfiguration ) { if ( overrideConfiguration == null ) { throw new java.lang.IllegalArgumentException ( "overrideConfiguration must not be null" ) ; } android.app.ContextImpl c = new android.app.ContextImpl ( ) ; c.init ( mPackageInfo , null , mMainThread ) ; c.mResources = mResourcesManager.getTopLevelResources ( mPackageInfo.getResDir ( ) , mPackageInfo.getOverlayDirs ( ) , getDisplayId ( ) , overrideConfiguration , mResources.getCompatibilityInfo ( ) , mActivityToken ) ; return c ; }
Source:
public static int forkSystemServer ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , long permittedCapabilities , long effectiveCapabilities ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; int pid = com.android.internal.os.Zygote.nativeForkSystemServer ( uid , gid , gids , debugFlags , rlimits , permittedCapabilities , effectiveCapabilities ) ; if ( pid == 0 ) { android.os.Trace.setTracingEnabled ( true ) ; } com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }

Target:
public static int forkSystemServer ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , long permittedCapabilities , long effectiveCapabilities ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; com.android.internal.os.Zygote.resetNicePriority ( ) ; int pid = com.android.internal.os.Zygote.nativeForkSystemServer ( uid , gid , gids , debugFlags , rlimits , permittedCapabilities , effectiveCapabilities ) ; if ( pid == 0 ) { android.os.Trace.setTracingEnabled ( true ) ; } com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }
Source:
public void testGetConfig1 ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfig ( new java.lang.String [ ] { "values" , "en" , "rUS" } ) ; assertNotNull ( configForFolder ) ; assertEquals ( "en" , configForFolder.getLanguageQualifier ( ) . getValue ( ) ) ; assertEquals ( "US" , configForFolder.getRegionQualifier ( ) . getValue ( ) ) ; assertNull ( configForFolder.getScreenDimensionQualifier ( ) ) ; assertNull ( configForFolder.getLayoutDirectionQualifier ( ) ) ; }

Target:
public void testGetConfig1 ( ) { com.android.ide.common.resources.configuration.FolderConfiguration configForFolder = com.android.ide.common.resources.configuration.FolderConfiguration.getConfig ( new java.lang.String [ ] { "values" , "en" , "rUS" } ) ; assertNotNull ( configForFolder ) ; assertEquals ( "en" , configForFolder.getLocaleQualifier ( ) . getLanguage ( ) ) ; assertEquals ( "US" , configForFolder.getLocaleQualifier ( ) . getRegion ( ) ) ; assertNull ( configForFolder.getScreenDimensionQualifier ( ) ) ; assertNull ( configForFolder.getLayoutDirectionQualifier ( ) ) ; }
Source:
public void testHasImeAction ( ) { android.widget.EditText editText = new android.widget.EditText ( context ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasImeAction ( EditorInfo.IME_ACTION_GO ) . matches ( editText ) ) ; editText.setImeOptions ( EditorInfo.IME_ACTION_NEXT ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasImeAction ( EditorInfo.IME_ACTION_GO ) . matches ( editText ) ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasImeAction ( EditorInfo.IME_ACTION_NEXT ) . matches ( editText ) ) ; }

Target:
public void hasImeActionTest ( ) { android.widget.EditText editText = new android.widget.EditText ( context ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasImeAction ( EditorInfo.IME_ACTION_GO ) . matches ( editText ) ) ; editText.setImeOptions ( EditorInfo.IME_ACTION_NEXT ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasImeAction ( EditorInfo.IME_ACTION_GO ) . matches ( editText ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasImeAction ( EditorInfo.IME_ACTION_NEXT ) . matches ( editText ) ) ; }
Source:
public void onScheduledRecordingRemoved ( com.android.tv.dvr.ScheduledRecording ... scheduledRecordings ) { for ( com.android.tv.dvr.ScheduledRecording schedule : scheduledRecordings ) { com.android.tv.guide.ProgramManager.TableEntry oldEntry = getTableEntry ( schedule ) ; if ( oldEntry != null ) { com.android.tv.guide.ProgramManager.TableEntry newEntry = new com.android.tv.guide.ProgramManager.TableEntry ( oldEntry.channelId , oldEntry.program , null , oldEntry.entryStartUtcMillis , oldEntry.entryEndUtcMillis , oldEntry.isBlocked ( ) ) ; updateEntry ( oldEntry , newEntry ) ; } } }

Target:
public void onScheduledRecordingRemoved ( com.android.tv.dvr.data.ScheduledRecording ... scheduledRecordings ) { for ( com.android.tv.dvr.data.ScheduledRecording schedule : scheduledRecordings ) { com.android.tv.guide.ProgramManager.TableEntry oldEntry = getTableEntry ( schedule ) ; if ( oldEntry != null ) { com.android.tv.guide.ProgramManager.TableEntry newEntry = new com.android.tv.guide.ProgramManager.TableEntry ( oldEntry.channelId , oldEntry.program , null , oldEntry.entryStartUtcMillis , oldEntry.entryEndUtcMillis , oldEntry.isBlocked ( ) ) ; updateEntry ( oldEntry , newEntry ) ; } } }
Source:
static int optimalNumOfBits ( int n , double p ) { return ( ( int ) ( ( ( - n ) * ( java.lang.Math.log ( p ) ) ) / ( com.google.common.hash.BloomFilter.LN2_SQUARED ) ) ) ; }

Target:
static long optimalNumOfBits ( long n , double p ) { if ( p == 0 ) { p = java.lang.Double.MIN_VALUE ; } return ( ( long ) ( ( ( - n ) * ( java.lang.Math.log ( p ) ) ) / ( ( java.lang.Math.log ( 2 ) ) * ( java.lang.Math.log ( 2 ) ) ) ) ) ; }
Source:
public void write ( byte [ ] b , int off , int len ) throws java.io.IOException { try { mSignature.update ( b , off , len ) ; } catch ( java.security.SignatureException e ) { throw new java.io.IOException ( ( "SignatureException: " + e ) ) ; } super . write ( b , off , len ) ; }

Target:
public void write ( byte [ ] b , int off , int len ) throws java.io.IOException { try { mSignature.update ( b , off , len ) ; } catch ( java.security.SignatureException e ) { throw new java.io.IOException ( ( "SignatureException: " + e ) ) ; } super . write ( b , off , len ) ; mCount += len ; }
Source:
protected void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getSystemService ( Context.SENSOR_SERVICE ) ) ) ; mView = new com.example.android.apis.graphics.SensorTest.SampleView ( this ) ; setContentView ( mView ) ; }

Target:
protected void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getSystemService ( Context.SENSOR_SERVICE ) ) ) ; mSensor = mSensorManager.getDefaultSensor ( Sensor.TYPE_ACCELEROMETER ) ; mView = new com.example.android.apis.graphics.SensorTest.SampleView ( this ) ; setContentView ( mView ) ; if ( android.util.Config.LOGD ) android.util.Log.d ( TAG , ( "create " + ( mSensorManager ) ) ) ; }
Source:
public void testCurrencyUsageFractionOverrides ( ) { android.icu.text.NumberFormat df = android.icu.text.DecimalFormat.getCurrencyInstance ( ULocale.US ) ; expect2 ( df , 35.0 , "$35.00" ) ; df.setMinimumFractionDigits ( 3 ) ; expect2 ( df , 35.0 , "$35.000" ) ; df.setMaximumFractionDigits ( 3 ) ; expect2 ( df , 35.0 , "$35.000" ) ; df.setMinimumFractionDigits ( ( - 1 ) ) ; expect2 ( df , 35.0 , "$35" ) ; df.setMaximumFractionDigits ( ( - 1 ) ) ; expect2 ( df , 35.0 , "$35.00" ) ; }

Target:
public void TestCurrencyRoundingMinWithoutMax ( ) { android.icu.text.NumberFormat currencyFormat = android.icu.text.DecimalFormat.getCurrencyInstance ( java.util.Locale.US ) ; currencyFormat.setCurrency ( android.icu.util.Currency.getInstance ( "AUD" ) ) ; currencyFormat.setMinimumFractionDigits ( 0 ) ; expect ( currencyFormat , 0.001 , "A$0" ) ; currencyFormat = android.icu.text.DecimalFormat.getCurrencyInstance ( java.util.Locale.US ) ; currencyFormat.setCurrency ( android.icu.util.Currency.getInstance ( "CAD" ) ) ; ( ( android.icu.text.DecimalFormat ) ( currencyFormat ) ) . setCurrencyUsage ( CurrencyUsage.CASH ) ; currencyFormat.setMinimumFractionDigits ( 0 ) ; expect ( currencyFormat , 0.08 , "CA$0.10" ) ; }
Source:
public void test_forEachRemaining_iterator ( ) throws java.lang.Exception { libcore.java.util.ForEachRemainingTester.runTests ( java.util.ArrayDeque.class , new java.lang.String [ ] { "foo" , "bar" , "baz " } ) ; libcore.java.util.ForEachRemainingTester.runTests ( java.util.ArrayDeque.class , new java.lang.String [ ] { "foo" } ) ; }

Target:
public void test_forEachRemaining_iterator ( ) throws java.lang.Exception { libcore.java.util.ForEachRemainingTester.test_forEachRemaining ( new java.util.ArrayDeque < > ( ) , new java.lang.String [ ] { "foo" , "bar" , "baz " } ) ; libcore.java.util.ForEachRemainingTester.test_forEachRemaining_NPE ( new java.util.ArrayDeque < > ( ) , new java.lang.String [ ] { "foo" , "bar" , "baz " } ) ; }
Source:
private java.lang.String nextToken ( char separator ) { if ( ( lineCharIdx ) >= ( line.length ( ) ) ) { return null ; } char c ; java.lang.StringBuffer token = new java.lang.StringBuffer ( ) ; while ( ( ( lineCharIdx ) < ( line.length ( ) ) ) && ( ( c = line.charAt ( lineCharIdx ) ) != separator ) ) { token.append ( c ) ; ( lineCharIdx ) ++ ; } ( lineCharIdx ) ++ ; return token.toString ( ) ; }

Target:
public boolean hasNextToken ( ) { if ( ( lineCharIdx ) >= ( line.length ( ) ) ) { return false ; } return true ; }
Source:
public void test_wrap_ByteBuffer$ByteBuffer_04 ( ) throws java.lang.Exception { java.lang.String host = "new host" ; int port = 8080 ; java.nio.ByteBuffer bb = java.nio.ByteBuffer.allocate ( 10 ) ; java.nio.ByteBuffer [ ] bbA = new java.nio.ByteBuffer [ ] { java.nio.ByteBuffer.allocate ( 5 ) , java.nio.ByteBuffer.allocate ( 10 ) , java.nio.ByteBuffer.allocate ( 5 ) } ; javax.net.ssl.SSLEngine sse = getEngine ( host , port ) ; javax.net.ssl.SSLEngineResult result = sse.wrap ( bbA , bb ) ; assertEquals ( javax.net.ssl.SSLEngineResult.Status.BUFFER_OVERFLOW , result.getStatus ( ) ) ; }

Target:
public void test_wrap_ByteBuffer$ByteBuffer_04 ( ) throws java.lang.Exception { java.lang.String host = "new host" ; int port = 8080 ; java.nio.ByteBuffer bb = java.nio.ByteBuffer.allocate ( 10 ) ; java.nio.ByteBuffer [ ] bbA = new java.nio.ByteBuffer [ ] { java.nio.ByteBuffer.allocate ( 5 ) , java.nio.ByteBuffer.allocate ( 10 ) , java.nio.ByteBuffer.allocate ( 5 ) } ; javax.net.ssl.SSLEngine sse = getEngine ( host , port ) ; try { javax.net.ssl.SSLEngineResult result = sse.wrap ( bbA , bb ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }
Source:
private void responseVoid ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.lang.Object ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseString ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.lang.String str ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.lang.String ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = str ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public < T > T [ ] toArray ( T [ ] array ) { return standardToArray ( array ) ; }

Target:
public static < K , V > java.util.Map < K , java.util.SortedSet < V > > asMap ( com.google.common.collect.SortedSetMultimap < K , V > multimap ) { return ( ( java.util.Map < K , java.util.SortedSet < V > > ) ( ( java.util.Map < K , ? > ) ( multimap.asMap ( ) ) ) ) ; }
Source:
public boolean hasChildren ( java.lang.Object element ) { if ( element instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) { return ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( element ) ) . getChildren ( ) . size ( ) ) > 0 ; } return false ; }

Target:
public boolean hasChildren ( java.lang.Object element ) { if ( element instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo > children = ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo ) ( element ) ) . getChildren ( ) ; if ( children != null ) { return ( children.size ( ) ) > 0 ; } } return false ; }
Source:
private java.util.List < java.io.File > getFilesFromPathString ( @ javax.annotation.CheckForNull java.lang.String pathString ) { java.util.List < java.io.File > classpath = new java.util.ArrayList < java.io.File > ( ) ; if ( ( pathString != null ) && ( ! ( pathString.isEmpty ( ) ) ) ) { java.lang.String [ ] paths = pathString.split ( java.io.File.pathSeparator ) ; for ( java.lang.String path : paths ) { classpath.add ( new java.io.File ( path ) ) ; } } return classpath ; }

Target:
public java.util.List < java.io.File > getInputSources ( ) { return ( inputSources ) == null ? java.util.Collections.< java.io.File > emptyList ( ) : inputSources ; }
Source:
void write ( java.io.PrintWriter writer ) { if ( annotations.isEmpty ( ) ) { return ; } writer.print ( " <item name=\"" ) ; writer.print ( getSignature ( ) ) ; writer.println ( "\">" ) ; for ( com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotation : annotations ) { annotation.write ( writer ) ; } writer.print ( " </item>" ) ; writer.println ( ) ; }

Target:
void write ( java.io.PrintWriter writer ) { if ( ( ! ( isValid ( ) ) ) || ( annotations.isEmpty ( ) ) ) { return ; } writer.print ( " <item name=\"" ) ; writer.print ( getSignature ( ) ) ; writer.println ( "\">" ) ; for ( com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotation : annotations ) { annotation.write ( writer ) ; } writer.print ( " </item>" ) ; writer.println ( ) ; }
Source:
public void callDropFeedbackPaint ( com.android.ide.eclipse.adt.editors.layout.gscripts.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback feedback ) { if ( ( ( gc != null ) && ( feedback != null ) ) && ( ( feedback.painter ) != null ) ) { try { feedback.painter.paint ( gc , targetNode , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "DropFeedback.painter failed: %s" , e.toString ( ) ) ; } } }

Target:
public void callDropFeedbackPaint ( com.android.ide.common.api.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.DropFeedback feedback ) { if ( ( ( gc != null ) && ( feedback != null ) ) && ( ( feedback.painter ) != null ) ) { try { feedback.painter.paint ( gc , targetNode , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "DropFeedback.painter failed: %s" , e.toString ( ) ) ; } } }
Source:
public com.android.internal.telephony.CellNetworkScanResult getCellNetworkScanResults ( int subId ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "getCellNetworkScanResults: subId " + subId ) ) ; com.android.internal.telephony.CellNetworkScanResult result = ( ( com.android.internal.telephony.CellNetworkScanResult ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_PERFORM_NETWORK_SCAN , null , subId ) ) ) ; return result ; }

Target:
public com.android.internal.telephony.CellNetworkScanResult getCellNetworkScanResults ( int subId ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , subId , "getCellNetworkScanResults" ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "getCellNetworkScanResults: subId " + subId ) ) ; com.android.internal.telephony.CellNetworkScanResult result = ( ( com.android.internal.telephony.CellNetworkScanResult ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_PERFORM_NETWORK_SCAN , null , subId ) ) ) ; return result ; }
Source:
protected com.android.jack.test.toolchain.JackBasedToolchain getReferenceToolchain ( ) { com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; java.io.File internalJackOutputLib ; try { internalJackOutputLib = com.android.jack.TestTools.createTempDir ( "oneDexPerType" , "dex" ) ; toolchain.addProperty ( Options.EMIT_LINE_NUMBER_DEBUG_INFO.getName ( ) , java.lang.Boolean.toString ( withDebugInfos ) ) ; toolchain.addProperty ( ScheduleInstance.DEFAULT_RUNNER.getName ( ) , "single-threaded" ) ; toolchain.addProperty ( Options.INTERNAL_LIBRARY_OUTPUT_DIR.getName ( ) , internalJackOutputLib.getAbsolutePath ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } return toolchain ; }

Target:
protected com.android.jack.test.toolchain.JackBasedToolchain getReferenceToolchain ( ) { com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class ) ; java.io.File internalJackOutputLib ; try { internalJackOutputLib = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain.addProperty ( Options.EMIT_LINE_NUMBER_DEBUG_INFO.getName ( ) , java.lang.Boolean.toString ( withDebugInfos ) ) ; toolchain.addProperty ( ScheduleInstance.DEFAULT_RUNNER.getName ( ) , "single-threaded" ) ; toolchain.addProperty ( Options.LIBRARY_OUTPUT_DIR.getName ( ) , internalJackOutputLib.getAbsolutePath ( ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } return toolchain ; }
Source:
private java.util.concurrent.ConcurrentSkipListMap.Node < K , V > hiNode ( ) { if ( ( hi ) == null ) return m.findLast ( ) ; else if ( hiInclusive ) return m.findNear ( hi , ( ( m.LT ) | ( m.EQ ) ) ) ; else return m.findNear ( hi , m.LT ) ; }

Target:
private java.util.concurrent.ConcurrentSkipListMap.Node < K , V > loNode ( ) { if ( ( lo ) == null ) return m.findFirst ( ) ; else if ( loInclusive ) return m.findNear ( lo , ( ( java.util.concurrent.ConcurrentSkipListMap.GT ) | ( java.util.concurrent.ConcurrentSkipListMap.EQ ) ) ) ; else return m.findNear ( lo , java.util.concurrent.ConcurrentSkipListMap.GT ) ; }
Source:
public void testDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "build.gradle:5: Warning: Old buildToolsVersion 19.0.0; recommended version is 19.1.0 or later [GradleDependency]\n" + " buildToolsVersion \"19.0.0\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:24: Warning: A newer version of com.google.guava:guava than 11.0.2 is available: 18.0 [GradleDependency]\n" ) + " freeCompile \'com.google.guava:guava:11.0.2\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:25: Warning: A newer version of com.android.support:appcompat-v7 than 13.0.0 is available: 20.0.0 [GradleDependency]\n" ) + " compile \'com.android.support:appcompat-v7:13.0.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "gradle/Dependencies.gradle=>build.gradle" ) ) ; }

Target:
public void testDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( ( ( ( ( ( "" + ( ( ( ( ( ( "build.gradle:5: Warning: Old buildToolsVersion 19.0.0; recommended version is 19.1.0 or later [GradleDependency]\n" + " buildToolsVersion \"19.0.0\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:24: Warning: A newer version of com.google.guava:guava than 11.0.2 is available: 18.0 [GradleDependency]\n" ) + " freeCompile \'com.google.guava:guava:11.0.2\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "build.gradle:25: Warning: A newer version of com.android.support:appcompat-v7 than 13.0.0 is available: " ) ) + ( com.android.sdklib.SdkVersionInfo.HIGHEST_KNOWN_STABLE_API ) ) + ".0.0 [GradleDependency]\n" ) + " compile \'com.android.support:appcompat-v7:13.0.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) , lintProject ( "gradle/Dependencies.gradle=>build.gradle" ) ) ; }
Source:
protected java.lang.Iterable < org.jf.dexlib2.analysis.ClassDef > getDirectInterfaces ( ) { java.lang.Iterable < org.jf.dexlib2.analysis.ClassDef > directInterfaces = com.google.common.collect.Iterables.filter ( getInterfaces ( ) . values ( ) , com.google.common.base.Predicates.notNull ( ) ) ; if ( ! ( interfacesFullyResolved ) ) ; BRANCH ( 76.0 ) ; }

Target:
protected java.lang.Iterable < org.jf.dexlib2.analysis.ClassDef > getDirectInterfaces ( ) { java.lang.Iterable < org.jf.dexlib2.analysis.ClassDef > directInterfaces = com.google.common.collect.Iterables.filter ( getInterfaces ( ) . values ( ) , com.google.common.base.Predicates.notNull ( ) ) ; if ( ! ( interfacesFullyResolved ) ) { throw new org.jf.dexlib2.analysis.UnresolvedClassException ( "Interfaces for class %s not fully resolved: %s" , getType ( ) , com.google.common.base.Joiner.on ( ',' ) . join ( getUnresolvedInterfaces ( ) ) ) ; } return directInterfaces ; }
Source:
public final void init ( java.security.Key key , java.security.SecureRandom random ) throws java.security.InvalidKeyException { spiImpl.engineInit ( key , random ) ; }

Target:
private javax.crypto.KeyAgreementSpi getSpi ( java.security.Key key ) { synchronized ( initLock ) { if ( ( ( spiImpl ) != null ) && ( key == null ) ) { return spiImpl ; } final org.apache.harmony.security.fortress.Engine.SpiAndProvider sap = javax.crypto.KeyAgreement.tryAlgorithm ( key , specifiedProvider , algorithm ) ; if ( sap == null ) { throw new java.security.ProviderException ( ( "No provider for " + ( getAlgorithm ( ) ) ) ) ; } spiImpl = ( ( javax.crypto.KeyAgreementSpi ) ( sap.spi ) ) ; provider = sap.provider ; return spiImpl ; } }
Source:
void build ( ) { assert ( entry.getSuccessors ( ) . size ( ) ) == 1 ; com.android.jack.ir.ast.cfg.JBasicBlock block = buildBlock ( entry.getSuccessors ( ) . get ( 0 ) ) ; cfg.entry ( ) . replaceAllSuccessors ( cfg.exit ( ) , block ) ; }

Target:
void build ( ) { assert ( entry.getSuccessors ( ) . size ( ) ) == 1 ; com.android.jack.ir.ast.cfg.JBasicBlock block = buildBlock ( entry.getSuccessors ( ) . get ( 0 ) ) ; cfg.getEntryBlock ( ) . replaceAllSuccessors ( cfg.getExitBlock ( ) , block ) ; setUpCatchBlockReferences ( ) ; }
Source:
android.net.wifi.WifiInfo getWifiInfo ( ) { android.net.wifi.WifiInfo wifiInfo = mock ( android.net.wifi.WifiInfo.class ) ; when ( wifiInfo.is24GHz ( ) ) . thenReturn ( true ) ; when ( wifiInfo.is5GHz ( ) ) . thenReturn ( false ) ; when ( wifiInfo.getRssi ( ) ) . thenReturn ( ( - 70 ) ) ; when ( wifiInfo.getNetworkId ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; when ( wifiInfo.getBSSID ( ) ) . thenReturn ( null ) ; return wifiInfo ; }

Target:
private void setupWifiInfo ( ) { when ( mWifiInfo.is24GHz ( ) ) . thenReturn ( true ) ; when ( mWifiInfo.is5GHz ( ) ) . thenReturn ( false ) ; when ( mWifiInfo.getRssi ( ) ) . thenReturn ( ( - 70 ) ) ; when ( mWifiInfo.getNetworkId ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; when ( mWifiInfo.getBSSID ( ) ) . thenReturn ( null ) ; }
Source:
protected boolean stop ( ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "stop()" ) ; if ( ( mContactChangeObserver ) == null ) { android.util.Log.i ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Avoid unregister when receiver it is not registered" ) ; return true ; } try { unregisterReceiver ( mPbapReceiver ) ; getContentResolver ( ) . unregisterContentObserver ( mContactChangeObserver ) ; mContactChangeObserver = null ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Unable to unregister pbap receiver" , e ) ; } mSessionStatusHandler.obtainMessage ( com.android.bluetooth.pbap.BluetoothPbapService.SHUTDOWN ) . sendToTarget ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; return true ; }

Target:
protected boolean stop ( ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "stop()" ) ; if ( ( mContactChangeObserver ) == null ) { android.util.Log.i ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Avoid unregister when receiver it is not registered" ) ; return true ; } try { unregisterReceiver ( mPbapReceiver ) ; getContentResolver ( ) . unregisterContentObserver ( mContactChangeObserver ) ; mContactChangeObserver = null ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Unable to unregister pbap receiver" , e ) ; } mSessionStatusHandler.obtainMessage ( com.android.bluetooth.pbap.BluetoothPbapService.SHUTDOWN ) . sendToTarget ( ) ; setState ( BluetoothProfile.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; return true ; }
Source:
public com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult getContrastResult ( ) { com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult normalTest = getContrastResultForNormalText ( ) ; com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult largeTest = getContrastResultForLargeText ( ) ; if ( normalTest == largeTest ) { return normalTest ; } else if ( ( mTextSize ) == null ) { return com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult.INDETERMINATE ; } else if ( ( mTextSize ) <= ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.NORMAL_TEXT_SZ_PTS ) ) { return normalTest ; } else { return largeTest ; } }

Target:
public com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult getContrastResult ( ) { com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult normalTest = getContrastResultForNormalText ( ) ; com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult largeTest = getContrastResultForLargeText ( ) ; if ( normalTest == largeTest ) { return normalTest ; } else if ( ( mTextSize ) == null ) { return com.android.hierarchyviewerlib.models.EvaluateContrastModel.ContrastResult.INDETERMINATE ; } else if ( ( ( ( mTextSize ) >= ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.NORMAL_TEXT_BOLD_SZ_PTS ) ) && ( mIsBold ) ) || ( ( mTextSize ) > ( com.android.hierarchyviewerlib.models.EvaluateContrastModel.NORMAL_TEXT_SZ_PTS ) ) ) { return largeTest ; } else { return normalTest ; } }
Source:
static java.nio.ByteOrder byteOrder ( ) { if ( ( sun.nio.ch.NativeObject.byteOrder ) != null ) return sun.nio.ch.NativeObject.byteOrder ; long a = sun.nio.ch.NativeObject.unsafe.allocateMemory ( 8 ) ; try { sun.nio.ch.NativeObject.unsafe.putLong ( a , 72623859790382856L ) ; byte b = sun.nio.ch.NativeObject.unsafe.getByte ( a ) ; switch ( b ) { case 1 : sun.nio.ch.NativeObject.byteOrder = java.nio.ByteOrder.BIG_ENDIAN ; break ; case 8 : sun.nio.ch.NativeObject.byteOrder = java.nio.ByteOrder.LITTLE_ENDIAN ; break ; default : assert false ; } } finally { sun.nio.ch.NativeObject.unsafe.freeMemory ( a ) ; } return sun.nio.ch.NativeObject.byteOrder ; }

Target:
static java.nio.ByteOrder byteOrder ( ) { if ( ( sun.nio.ch.NativeObject.byteOrder ) != null ) return sun.nio.ch.NativeObject.byteOrder ; long a = sun.nio.ch.NativeObject.unsafe.allocateMemory ( 8 ) ; try { sun.nio.ch.NativeObject.unsafe.putLong$ ( a , 72623859790382856L ) ; byte b = sun.nio.ch.NativeObject.unsafe.getByte$ ( a ) ; switch ( b ) { case 1 : sun.nio.ch.NativeObject.byteOrder = java.nio.ByteOrder.BIG_ENDIAN ; break ; case 8 : sun.nio.ch.NativeObject.byteOrder = java.nio.ByteOrder.LITTLE_ENDIAN ; break ; default : assert false ; } } finally { sun.nio.ch.NativeObject.unsafe.freeMemory ( a ) ; } return sun.nio.ch.NativeObject.byteOrder ; }
Source:
public void report ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Severity severity , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.Nullable java.lang.Object data ) { java.lang.String s = ( ( ( ( "Found lint error: " + ( issue.getId ( ) ) ) + ": " ) + message ) + " at " ) + location ; job.setProperty ( ERROR_KEY , s ) ; fail ( s ) ; }

Target:
public void report ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Context context , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Severity severity , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.TextFormat format ) { java.lang.String s = ( ( ( ( "Found lint error: " + ( issue.getId ( ) ) ) + ": " ) + message ) + " at " ) + location ; job.setProperty ( ERROR_KEY , s ) ; fail ( s ) ; }
Source:
public void run ( ) { if ( ( mAutoScrollCount ) == 0 ) { mAutoScrollTimer.cancel ( ) ; return ; } if ( ( ( mAutoScrollCount ) % 2 ) == 0 ) { setSelectedPosition ( ( ( android.cts.jank.leanback.ui.MainFragment.NUM_ROWS ) - 1 ) ) ; } else { setSelectedPosition ( 0 ) ; } ( mAutoScrollCount ) -- ; }

Target:
public void run ( ) { if ( ( mAutoScrollCount ) == 0 ) { mAutoScrollTimer.cancel ( ) ; return ; } setSelectedPosition ( scrollPatternGenerator.next ( ) ) ; ( mAutoScrollCount ) -- ; }
Source:
public void testInstallWithBadlyFormedAndroidRevision ( ) 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_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 ( ) ; }
Source:
public static int getInt ( java.lang.String key , int def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } return android.os.SystemProperties.native_get_int ( key , def ) ; }

Target:
public static int getInt ( java.lang.String key , int def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; return android.os.SystemProperties.native_get_int ( key , def ) ; }
Source:
public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { android.view.accessibility.AccessibilityNodeProvider ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.view.accessibility.AccessibilityNodeProvider > ( ) { @ java.lang.Override public android.view.accessibility.AccessibilityNodeProvider call ( ) { return getAccessibilityNodeProvider ( ) ; } } ) ; return ret ; } return mAwContents.getAccessibilityNodeProvider ( ) ; }

Target:
public boolean shouldDelayChildPressedState ( ) { 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 shouldDelayChildPressedState ( ) ; } } ) ; return ret ; } return true ; }
Source:
public com.google.common.collect.ImmutableList < java.lang.String > digits ( ) { return com.google.common.collect.ImmutableList.of ( 0 , 4 ) . stream ( ) . map ( ( i ) -> i == 0 ? com.google.devtools.build.android.desugar.testdata.java8.ConcreteOverridesDefaultWithLambda.THREE : java.lang.String.valueOf ( i ) ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( com.google.common.collect.ImmutableList ) ) ; }

Target:
public java.util.List < java.lang.String > digits ( ) { return com.google.common.collect.ImmutableList.of ( 0 , 4 ) . stream ( ) . map ( ( i ) -> i == 0 ? com.google.devtools.build.android.desugar.testdata.java8.ConcreteOverridesDefaultWithLambda.THREE : java.lang.String.valueOf ( i ) ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
private void assertFastPathUtf8DecodedEquals ( java.lang.String expected , java.lang.String hexString ) throws java.io.UnsupportedEncodingException { java.lang.String actual = new java.lang.String ( libcore.java.lang.StringTest.hexStringtoBytes ( hexString ) ) ; assertEquals ( ( ( "Fast-path UTF-8 decoder decodes sequence [" + hexString ) + "] into unexpected String" ) , expected , actual ) ; }

Target:
private void assertFastPathUtf8DecodedEquals ( java.lang.String expected , java.lang.String hexString ) throws java.lang.Exception { java.lang.String actual = new java.lang.String ( libcore.java.lang.StringTest.hexStringtoBytes ( hexString ) ) ; assertEquals ( ( ( "Fast-path UTF-8 decoder decodes sequence [" + hexString ) + "] into unexpected String" ) , expected , actual ) ; java.nio.charset.CharsetDecoder decoder = java.nio.charset.StandardCharsets.UTF_8.newDecoder ( ) . onMalformedInput ( java.nio.charset.CodingErrorAction.REPLACE ) ; assertEquals ( ( ( ( "Fast-path UTF-8 decoder and UTF-8 CharsetDecoder has a different conversion" + " result for sequence [" ) + hexString ) + "]" ) , decoder.decode ( java.nio.ByteBuffer.wrap ( libcore.java.lang.StringTest.hexStringtoBytes ( hexString ) ) ) . toString ( ) , actual ) ; }
Source:
public com.android.jack.load.PackageLoader getLoaderForSubPackage ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage loading , @ javax.annotation.Nonnull java.lang.String simpleName ) throws com.android.jack.ir.ast.JPackageLookupException { for ( com.android.sched.vfs.InputVElement sub : dir.list ( ) ) { if ( ( sub.isVDir ( ) ) && ( sub.getName ( ) . equals ( simpleName ) ) ) { return new com.android.jack.jayce.JaycePackageLoader ( ( ( com.android.sched.vfs.InputVDir ) ( sub ) ) , lookup , defaultLoadLevel ) ; } } throw new com.android.jack.ir.ast.JPackageLookupException ( simpleName , loading ) ; }

Target:
public com.android.jack.load.PackageLoader getLoaderForSubPackage ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage loading , @ javax.annotation.Nonnull java.lang.String simpleName ) throws com.android.jack.ir.ast.JPackageLookupException { for ( com.android.sched.vfs.InputVElement sub : dir.list ( ) ) { if ( ( sub.isVDir ( ) ) && ( sub.getName ( ) . equals ( simpleName ) ) ) { return new com.android.jack.jayce.JaycePackageLoader ( inputJackLibrary , ( ( com.android.sched.vfs.InputVDir ) ( sub ) ) , lookup , defaultLoadLevel ) ; } } throw new com.android.jack.ir.ast.JPackageLookupException ( simpleName , loading ) ; }
Source:
public void test_ClassDescriptor ( ) throws java.io.IOException , java.lang.ClassNotFoundException { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectOutputStreamWithWriteDesc oos = new org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectOutputStreamWithWriteDesc ( baos ) ; oos.writeObject ( java.lang.String.class ) ; oos.close ( ) ; java.lang.Class cls = org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.TestClassForSerialization.class ; java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream ( baos.toByteArray ( ) ) ; org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectIutputStreamWithReadDesc ois = new org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectIutputStreamWithReadDesc ( bais , cls ) ; java.lang.Object obj = ois.readObject ( ) ; ois.close ( ) ; assertEquals ( cls , obj ) ; }

Target:
public void test_ClassDescriptor ( ) throws java.io.IOException , java.lang.ClassNotFoundException { java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream ( ) ; org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectOutputStreamWithWriteDesc oos = new org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectOutputStreamWithWriteDesc ( baos ) ; oos.writeObject ( java.lang.String.class ) ; oos.close ( ) ; java.lang.Class < ? > cls = org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.TestClassForSerialization.class ; java.io.ByteArrayInputStream bais = new java.io.ByteArrayInputStream ( baos.toByteArray ( ) ) ; org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectInputStreamWithReadDesc ois = new org.apache.harmony.luni.tests.java.io.ObjectInputStreamTest.ObjectInputStreamWithReadDesc ( bais , cls ) ; java.lang.Object obj = ois.readObject ( ) ; ois.close ( ) ; assertEquals ( cls , obj ) ; }
Source:
public void testInstallWithMissingBundleVersionFile ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createTzDataBundleWithoutFormatVersionFile ( "2030a" ) ; assertFalse ( install ( tzData ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstallWithInvalidBundleVersionFile ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createTzDataBundleWithInvalidBundleVersion ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertFalse ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }