auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onRtlPropertiesChanged ( int layoutDirection ) { super . onRtlPropertiesChanged ( layoutDirection ) ; int max = getMax ( ) ; float scale = ( max > 0 ) ? ( ( float ) ( getProgress ( ) ) ) / ( ( float ) ( max ) ) : 0 ; android.graphics.drawable.Drawable thumb = mThumb ; if ( thumb != null ) { setThumbPos ( getWidth ( ) , thumb , scale , java.lang.Integer.MIN_VALUE ) ; invalidate ( ) ; } }

Target:
public void setProgress ( int progress , boolean fromUser ) { if ( isAnimationRunning ( ) ) { mPositionAnimator.cancel ( ) ; } super . setProgress ( progress , fromUser ) ; }
Source:
public synchronized void setMinimumFractionDigits ( int value ) { properties.setMinimumFractionDigits ( value ) ; refreshFormatter ( ) ; }

Target:
public synchronized void setMaximumIntegerDigits ( int value ) { int min = properties.getMinimumIntegerDigits ( ) ; if ( ( min >= 0 ) && ( min > value ) ) { properties.setMinimumIntegerDigits ( value ) ; } properties.setMaximumIntegerDigits ( value ) ; refreshFormatter ( ) ; }
Source:
public com.android.ide.common.api.IViewMetadata getMetadata ( final java.lang.String fqcn ) { return new com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadata ( mEditor.getLayoutEditor ( ) , fqcn ) ; }

Target:
public com.android.ide.common.api.IViewMetadata getMetadata ( final java.lang.String fqcn ) { return new com.android.ide.common.api.IViewMetadata ( ) { public java.lang.String getDisplayName ( ) { return fqcn.substring ( ( ( fqcn.lastIndexOf ( '.' ) ) + 1 ) ) ; } public com.android.ide.eclipse.adt.internal.editors.layout.gre.FillPreference getFillPreference ( ) { return com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.get ( ) . getFillPreference ( fqcn ) ; } } ; }
Source:
public void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; mRS = android.renderscript.RenderScript.create ( this ) ; RSTC = new com.android.rs.test.RSTestCore ( this ) ; RSTC.init ( mRS ) ; }

Target:
public void onCreate ( android.os.Bundle icicle ) { super . onCreate ( icicle ) ; android.os.StrictMode.setVmPolicy ( new android.os.StrictMode.VmPolicy.Builder ( ) . detectLeakedClosableObjects ( ) . penaltyLog ( ) . build ( ) ) ; mRS = android.renderscript.RenderScript.create ( this ) ; RSTC = new com.android.rs.test.RSTestCore ( this ) ; RSTC.init ( mRS ) ; }
Source:
public void tune ( android.net.Uri channelUri ) { mHandler.removeCallbacksAndMessages ( null ) ; mHandler.obtainMessage ( com.android.tv.tuner.tvinput.TunerRecordingSessionWorker.MSG_TUNE , channelUri ) . sendToTarget ( ) ; }

Target:
public void onEventDetected ( com.android.tv.tuner.data.TunerChannel channel , java.util.List < com.android.tv.tuner.data.PsipData.EitItem > items ) { if ( ( ( mChannel ) == null ) || ( ( mChannel.compareTo ( channel ) ) != 0 ) ) { return ; } mHandler.obtainMessage ( com.android.tv.tuner.tvinput.TunerRecordingSessionWorker.MSG_UPDATE_CC_INFO , new android.util.Pair ( channel , items ) ) . sendToTarget ( ) ; mChannelDataManager.notifyEventDetected ( channel , items ) ; }
Source:
public static java.text.DateFormat.Field ofCalendarField ( int calendarField ) { if ( ( calendarField < 0 ) || ( calendarField >= ( java.util.Calendar.FIELD_COUNT ) ) ) { throw new java.lang.IllegalArgumentException ( ) ; } return java.text.DateFormat.Field.table.get ( java.lang.Integer.valueOf ( calendarField ) ) ; }

Target:
public static java.text.DateFormat.Field ofCalendarField ( int calendarField ) { if ( ( calendarField < 0 ) || ( calendarField >= ( java.util.Calendar.FIELD_COUNT ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Field out of range: " + calendarField ) ) ; } return java.text.DateFormat.Field.table.get ( java.lang.Integer.valueOf ( calendarField ) ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof java.lang.reflect.AbstractMethod ) ) { return false ; } java.lang.reflect.AbstractMethod otherMethod = ( ( java.lang.reflect.AbstractMethod ) ( other ) ) ; return ( ( this . declaringClass ) == ( otherMethod.declaringClass ) ) && ( ( this . dexMethodIndex ) == ( otherMethod.dexMethodIndex ) ) ; }

Target:
public int getParameterCount ( ) { com.android.dex.Dex dex = declaringClassOfOverriddenMethod.getDex ( ) ; short [ ] types = dex.parameterTypeIndicesFromMethodIndex ( dexMethodIndex ) ; return types.length ; }
Source:
android.net.NetworkScoreManager getScoreManager ( ) { android.net.NetworkScoreManager scoreManager = mock ( android.net.NetworkScoreManager.class ) ; doAnswer ( new android.app.test.MockAnswerUtil.AnswerWithArguments ( ) { public void answer ( int networkType , android.net.INetworkScoreCache scoreCache ) { mScoreCache = ( ( com.android.server.wifi.WifiNetworkScoreCache ) ( scoreCache ) ) ; } } ) . when ( scoreManager ) . registerNetworkScoreCache ( anyInt ( ) , anyObject ( ) ) ; return scoreManager ; }

Target:
public void setUp ( ) throws java.lang.Exception { mResource = getResource ( ) ; mScoreManager = mock ( android.net.NetworkScoreManager.class ) ; mContext = getContext ( ) ; mScoreCache = new android.net.wifi.WifiNetworkScoreCache ( mContext ) ; mWifiConfigManager = getWifiConfigManager ( ) ; when ( mClock.getElapsedSinceBootMillis ( ) ) . thenReturn ( android.os.SystemClock.elapsedRealtime ( ) ) ; mThresholdQualifiedRssi2G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz ) ; mThresholdQualifiedRssi5G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz ) ; mExternalScoreEvaluator = new com.android.server.wifi.ExternalScoreEvaluator ( mContext , mWifiConfigManager , mScoreCache , mClock , null ) ; }
Source:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiNanNative.NAN_TERMINATED_REASON_COUNT_REACHED ) ; com.android.server.wifi.nan.WifiNanHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onSessionTerminatedNotification ( publishId , WifiNanDiscoverySessionCallback.TERMINATE_REASON_DONE , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testPublishTerminatedDone ( ) throws org.json.JSONException { final int publishId = 167 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "publish_id" , publishId ) ; args.putInt ( "reason" , WifiAwareNative.AWARE_TERMINATED_REASON_COUNT_REACHED ) ; com.android.server.wifi.aware.WifiAwareHalMock.callPublishTerminated ( com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mAwareStateManager ) . onSessionTerminatedNotification ( publishId , WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE , true ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAwareStateManager ) ; }
Source:
public void run ( ) { try { collect ( runData ) ; } catch ( java.lang.InterruptedException e ) { mTimer.cancel ( ) ; java.lang.Thread.currentThread ( ) . interrupt ( ) ; com.android.tradefed.log.LogUtil.CLog.e ( "Interrupted exception thrown from task:" ) ; com.android.tradefed.log.LogUtil.CLog.e ( e ) ; } }

Target:
public void run ( ) { try { collect ( runData ) ; } catch ( java.lang.InterruptedException e ) { mTimer.cancel ( ) ; java.lang.Thread.currentThread ( ) . interrupt ( ) ; com.android.tradefed.log.LogUtil.CLog.e ( "Interrupted exception thrown from task: %s" , e ) ; } }
Source:
public boolean getDataOnRoamingEnabled ( ) { try { final android.content.ContentResolver resolver = mPhone.getContext ( ) . getContentResolver ( ) ; return ( Settings.Secure.getInt ( resolver , Settings.Secure.DATA_ROAMING ) ) != 0 ; } catch ( android.provider.Settings.SettingNotFoundException snfe ) { return false ; } }

Target:
public void setDataOnRoamingEnabled ( boolean enabled ) { if ( ( getDataOnRoamingEnabled ( ) ) != enabled ) { final android.content.ContentResolver resolver = mPhone.getContext ( ) . getContentResolver ( ) ; Settings.Global.putInt ( resolver , Settings.Global.DATA_ROAMING , ( enabled ? 1 : 0 ) ) ; } }
Source:
public com.google.common.base.Optional < java.lang.String > formatToE164 ( com.android.dialer.DialerPhoneNumber number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; if ( number.hasDialerInternalPhoneNumber ( ) ) { com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = com.android.dialer.phonenumberproto.Converter.protoToPojo ( number.getDialerInternalPhoneNumber ( ) ) ; if ( phoneNumberUtil.isValidNumber ( phoneNumber ) ) { return com.google.common.base.Optional.fromNullable ( phoneNumberUtil.format ( phoneNumber , PhoneNumberFormat.E164 ) ) ; } } return com.google.common.base.Optional.absent ( ) ; }

Target:
public com.google.common.base.Optional < java.lang.String > formatToValidE164 ( com.android.dialer.DialerPhoneNumber number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; if ( number.hasDialerInternalPhoneNumber ( ) ) { com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = com.android.dialer.phonenumberproto.Converter.protoToPojo ( number.getDialerInternalPhoneNumber ( ) ) ; if ( phoneNumberUtil.isValidNumber ( phoneNumber ) ) { return com.google.common.base.Optional.fromNullable ( phoneNumberUtil.format ( phoneNumber , PhoneNumberFormat.E164 ) ) ; } } return com.google.common.base.Optional.absent ( ) ; }
Source:
public void stopStreaming ( java.lang.String serviceId ) { com.android.phone.testapps.embmsmw.AppActiveStreams.StreamCallbackWithState entry = mStreamStates.get ( serviceId ) ; if ( entry != null ) { try { entry.setState ( StreamingService.STATE_STOPPED ) ; entry.getCallback ( ) . streamStateChanged ( StreamingService.STATE_STOPPED ) ; } catch ( android.os.RemoteException e ) { dispose ( serviceId ) ; } } }

Target:
public void stopStreaming ( java.lang.String serviceId ) { com.android.phone.testapps.embmsmw.AppActiveStreams.StreamCallbackWithState entry = mStreamStates.get ( serviceId ) ; if ( entry != null ) { try { if ( ( entry.getState ( ) ) != ( android.telephony.mbms.StreamingService.STATE_STOPPED ) ) { entry.setState ( StreamingService.STATE_STOPPED ) ; entry.getCallback ( ) . streamStateChanged ( StreamingService.STATE_STOPPED ) ; } } catch ( android.os.RemoteException e ) { dispose ( serviceId ) ; } } }
Source:
public static libcore.java.net.FtpURLConnectionTest.CountingProxy start ( ) throws java.io.IOException { libcore.java.net.FtpURLConnectionTest.CountingProxy result = new libcore.java.net.FtpURLConnectionTest.CountingProxy ( ) ; result.serverThread.start ( ) ; return result ; }

Target:
public static libcore.java.net.FtpURLConnectionTest.CountingProxy start ( ) throws java.io.IOException { libcore.java.net.FtpURLConnectionTest.CountingProxy result = new libcore.java.net.FtpURLConnectionTest.CountingProxy ( ) ; result.serverThread.start ( ) ; try { java.lang.Thread.sleep ( 300 ) ; } catch ( java.lang.InterruptedException e ) { throw new java.io.IOException ( "Unexpectedly interrupted" , e ) ; } return result ; }
Source:
public com.android.ims.ImsCallProfile getRemoteCallProfile ( ) throws com.android.ims.ImsException { synchronized ( mLockObj ) { if ( ( mSession ) == null ) { throw new com.android.ims.ImsException ( "No call session" , ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } try { return mSession.getRemoteCallProfile ( ) ; } catch ( java.lang.Throwable t ) { loge ( "getRemoteCallProfile :: " , t ) ; throw new com.android.ims.ImsException ( "getRemoteCallProfile()" , t , 0 ) ; } } }

Target:
public android.telephony.ims.ImsCallProfile getRemoteCallProfile ( ) throws com.android.ims.ImsException { synchronized ( mLockObj ) { if ( ( mSession ) == null ) { throw new com.android.ims.ImsException ( "No call session" , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } try { return mSession.getRemoteCallProfile ( ) ; } catch ( java.lang.Throwable t ) { loge ( "getRemoteCallProfile :: " , t ) ; throw new com.android.ims.ImsException ( "getRemoteCallProfile()" , t , 0 ) ; } } }
Source:
public void rejectBackgroundScanRequestWhenHalReturnsInvalidCapabilities ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; setupAndLoadDriver ( 0 ) ; android.os.Handler handler = mock ( android.os.Handler.class ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( handler ) ; org.mockito.InOrder order = inOrder ( handler ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.sendBackgroundScanRequest ( controlChannel , 122 , generateValidScanSettings ( ) , null ) ; mLooper.dispatchAll ( ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.verifyFailedResponse ( order , handler , 122 , WifiScanner.REASON_UNSPECIFIED , "not available" ) ; }

Target:
public void rejectBackgroundScanRequestWhenHalReturnsInvalidCapabilities ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; setupAndLoadDriver ( 0 ) ; android.os.Handler handler = org.mockito.Mockito.mock ( android.os.Handler.class ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( handler ) ; org.mockito.InOrder order = org.mockito.Mockito.inOrder ( handler ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.sendBackgroundScanRequest ( controlChannel , 122 , generateValidScanSettings ( ) , null ) ; mLooper.dispatchAll ( ) ; com.android.server.wifi.scanner.WifiScanningServiceTest.verifyFailedResponse ( order , handler , 122 , WifiScanner.REASON_UNSPECIFIED , "not available" ) ; }
Source:
public void onSizeChanged ( final int w , final int h , final int ow , final int oh ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onSizeChanged ( w , h , ow , oh ) ; } } ) ; return ; } mAwContents.onSizeChanged ( w , h , ow , oh ) ; }

Target:
public void onVisibilityChanged ( final android.view.View changedView , final int visibility ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onVisibilityChanged ( changedView , visibility ) ; } } ) ; return ; } mAwContents.onVisibilityChanged ( changedView , visibility ) ; }
Source:
public void testV1SignedAttrsWrongDigest ( ) throws java.lang.Exception { com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verify ( "v1-only-with-signed-attrs-wrong-digest.apk" ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; }

Target:
public void testV1SignedAttrsWrongDigest ( ) throws java.lang.Exception { java.lang.String apk = "v1-only-with-signed-attrs-wrong-digest.apk" ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMaxSdkVersion ( apk , ( ( com.android.apksig.internal.util.AndroidSdkVersion.N ) - 1 ) ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.N ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; apk = "v1-only-with-signed-attrs-signerInfo1-wrong-digest-signerInfo2-good.apk" ; com.android.apksig.ApkVerifierTest.assertVerificationFailure ( verifyForMaxSdkVersion ( apk , ( ( com.android.apksig.internal.util.AndroidSdkVersion.N ) - 1 ) ) , Issue.JAR_SIG_DID_NOT_VERIFY ) ; com.android.apksig.ApkVerifierTest.assertVerified ( verifyForMinSdkVersion ( apk , AndroidSdkVersion.N ) ) ; }
Source:
public static java.lang.String toASCII ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toASCII ( input , flags ) ; }

Target:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToUnicode ( input , result , info ) ; if ( info.hasErrors ( ) ) { return input ; } return result.toString ( ) ; }
Source:
private void dumpJackLibraryProperties ( @ javax.annotation.CheckForNull java.util.zip.ZipOutputStream zos ) { if ( zos != null ) { dumpPropertiesToZip ( zos , jackLibraryProperties ) ; } else { dumpPropertiesToFile ( new java.io.File ( options.getOutput ( ) , com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES ) , jackLibraryProperties ) ; } }

Target:
private void dumpJackLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.VFS baseVFS ) { try { @ java.lang.SuppressWarnings ( value = "resource" ) com.android.sched.vfs.OutputVFS goVFS = new com.android.sched.vfs.GenericOutputVFS ( baseVFS ) ; com.android.sched.vfs.OutputVFile libraryPropertiesOut = goVFS.getRootOutputVDir ( ) . createOutputVFile ( new com.android.sched.vfs.VPath ( com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES , '/' ) ) ; try ( java.io.OutputStream os = libraryPropertiesOut.getOutputStream ( ) ) { jackLibraryProperties.store ( os , "Library Properties" ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseException ( libraryPropertiesOut , e ) ; } } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotCloseException e ) { throw new com.android.jill.JillException ( e ) ; } }
Source:
private static void cache ( java.lang.String charsetName , java.nio.charset.Charset cs ) { java.nio.charset.Charset.cache2 = java.nio.charset.Charset.cache1 ; java.nio.charset.Charset.cache1 = new java.lang.Object [ ] { charsetName , cs } ; }

Target:
private static java.nio.charset.Charset lookup ( java.lang.String charsetName ) { if ( charsetName == null ) throw new java.lang.IllegalArgumentException ( "Null charset name" ) ; if ( ( ( java.nio.charset.Charset.cache1 ) != null ) && ( charsetName.equals ( java.nio.charset.Charset.cache1.getKey ( ) ) ) ) return java.nio.charset.Charset.cache1.getValue ( ) ; return java.nio.charset.Charset.lookup2 ( charsetName ) ; }
Source:
void setUp ( ) { createChannel ( ) ; sendNotifications ( ) ; status = READY ; delay ( ) ; }

Target:
void test ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList ( com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . mPosted ) ; if ( ( result.size ( ) ) == 0 ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } next ( ) ; }
Source:
public void log ( java.lang.Throwable exception , java.lang.String format , java.lang.Object ... args ) { if ( exception != null ) { exception.printStackTrace ( ) ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; if ( format != null ) { sb.append ( java.lang.String.format ( format , args ) ) ; } if ( exception != null ) { sb.append ( exception.toString ( ) ) ; } fail ( sb.toString ( ) ) ; }

Target:
public void log ( java.lang.Throwable exception , java.lang.String format , java.lang.Object ... args ) { if ( exception != null ) { exception.printStackTrace ( ) ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; if ( format != null ) { sb.append ( java.lang.String.format ( format , args ) ) ; } if ( exception != null ) { sb.append ( exception.toString ( ) ) ; } java.lang.System.err.println ( sb ) ; }
Source:
public void testHasKey ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putBoolean ( "key" , true ) ; assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( "key" ) . matches ( bundle ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( org.hamcrest.Matchers.equalTo ( "key" ) ) . matches ( bundle ) ) ; }

Target:
public void hasKeyTesting ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putBoolean ( "key" , true ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( "key" ) . matches ( bundle ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( org.hamcrest.Matchers.equalTo ( "key" ) ) . matches ( bundle ) ) ; }
Source:
private void createFinalizableObject ( final java.util.concurrent.atomic.AtomicBoolean finalized ) { new libcore.java.lang.ref.FinalizeTest.X ( ) { @ java.lang.Override protected void finalize ( ) throws java.lang.Throwable { super . finalize ( ) ; finalized.set ( true ) ; } } ; }

Target:
private libcore.java.lang.ref.FinalizeTest.X createFinalizableObject ( final java.util.concurrent.atomic.AtomicBoolean finalized ) { libcore.java.lang.ref.FinalizeTest.X result = new libcore.java.lang.ref.FinalizeTest.X ( ) { @ java.lang.Override protected void finalize ( ) throws java.lang.Throwable { super . finalize ( ) ; finalized.set ( true ) ; } } ; libcore.java.lang.ref.FinalizationTester.induceFinalization ( ) ; boolean wasFinalized = finalized.get ( ) ; if ( wasFinalized ) { fail ( "finalizer called early" ) ; } return wasFinalized ? result : null ; }
Source:
public static java.lang.invoke.MethodHandle throwException ( java.lang.Class < ? > returnType , java.lang.Class < ? extends java.lang.Throwable > exType ) { if ( ! ( java.lang.Throwable.class . isAssignableFrom ( exType ) ) ) throw new java.lang.ClassCastException ( exType.getName ( ) ) ; throw new java.lang.UnsupportedOperationException ( "MethodHandles.throwException is not implemented" ) ; }

Target:
public static java.lang.invoke.MethodHandle throwException ( java.lang.Class < ? > returnType , java.lang.Class < ? extends java.lang.Throwable > exType ) { if ( ! ( java.lang.Throwable.class . isAssignableFrom ( exType ) ) ) throw new java.lang.ClassCastException ( exType.getName ( ) ) ; return new java.lang.invoke.Transformers.AlwaysThrow ( returnType , exType ) ; }
Source:
private void verifyMessageDispatchedOnce ( ) { verify ( mHandler , times ( 1 ) ) . handleMessage ( any ( android.os.Message.class ) ) ; assertEquals ( "what" , com.android.internal.util.WakeupMessageTest.TEST_CMD , mHandler.getLastMessage ( ) . what ) ; assertEquals ( "arg1" , com.android.internal.util.WakeupMessageTest.TEST_ARG1 , mHandler.getLastMessage ( ) . arg1 ) ; assertEquals ( "arg2" , com.android.internal.util.WakeupMessageTest.TEST_ARG2 , mHandler.getLastMessage ( ) . arg2 ) ; }

Target:
private void verifyMessageDispatchedOnce ( ) { verify ( mHandler , times ( 1 ) ) . handleMessage ( any ( android.os.Message.class ) ) ; assertEquals ( "what" , com.android.internal.util.WakeupMessageTest.TEST_CMD , mHandler.getLastMessage ( ) . what ) ; assertEquals ( "arg1" , com.android.internal.util.WakeupMessageTest.TEST_ARG1 , mHandler.getLastMessage ( ) . arg1 ) ; assertEquals ( "arg2" , com.android.internal.util.WakeupMessageTest.TEST_ARG2 , mHandler.getLastMessage ( ) . arg2 ) ; assertEquals ( "obj" , com.android.internal.util.WakeupMessageTest.TEST_OBJ , mHandler.getLastMessage ( ) . obj ) ; }
Source:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { checkNotFreed ( ) ; int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { checkIsAccessible ( ) ; int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }
Source:
private void doFollowReferencesTestRoot ( ) { Main.Verifier v = new Main.Verifier ( ) ; Main.TestConfig.tagClasses ( v ) ; Main.A a = Main.TestConfig.createTree ( v ) ; doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , null ) ; doFollowReferencesTestImpl ( a.foo2 , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , "3@1001" ) ; }

Target:
private void doFollowReferencesTestRoot ( ) { Main.Verifier v = new Main.Verifier ( ) ; Main.TestConfig.tagClasses ( v ) ; Main.A a = Main.TestConfig.createTree ( v ) ; doFollowReferencesTestImpl ( null , stopAfter , followSet , a , v , null ) ; doFollowReferencesTestImpl ( a.foo2 , stopAfter , followSet , a , v , "3@1001" ) ; }
Source:
public void test_getLong_TemporalField ( ) { org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.YEAR ) , 2008 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.MONTH_OF_YEAR ) , 6 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.YEAR_OF_ERA ) , 2008 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.ERA ) , 1 ) ; org.testng.Assert.assertEquals ( TEST_2008_06.getLong ( java.time.temporal.ChronoField.PROLEPTIC_MONTH ) , ( ( ( 2008 * 12 ) + 6 ) - 1 ) ) ; }

Target:
public void test_getLong_TemporalField ( ) { org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.getLong ( java.time.temporal.ChronoField.YEAR ) , 2008 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.getLong ( java.time.temporal.ChronoField.MONTH_OF_YEAR ) , 6 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.getLong ( java.time.temporal.ChronoField.YEAR_OF_ERA ) , 2008 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.getLong ( java.time.temporal.ChronoField.ERA ) , 1 ) ; org.testng.Assert.assertEquals ( tck.java.time.TCKYearMonth.TEST_2008_06.getLong ( java.time.temporal.ChronoField.PROLEPTIC_MONTH ) , ( ( ( 2008 * 12 ) + 6 ) - 1 ) ) ; }
Source:
public void checkValidity ( ) { if ( ! ( ( ( ( ( ( ( parent ) instanceof com.android.jack.ir.ast.JExpression ) || ( ( parent ) instanceof com.android.jack.ir.ast.JNameValuePair ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JAnnotationMethod ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JFieldInitializer ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JReturnStatement ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JSynchronizedBlock ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent" ) ; } }

Target:
public void checkValidity ( ) { if ( ! ( ( ( ( ( ( ( ( ( parent ) instanceof com.android.jack.ir.ast.JExpression ) || ( ( parent ) instanceof com.android.jack.ir.ast.JNameValuePair ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JAnnotationMethod ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JFieldInitializer ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JReturnStatement ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JSynchronizedBlock ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JLock ) ) || ( ( parent ) instanceof com.android.jack.ir.ast.JUnlock ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent" ) ; } }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.FLOAT_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy1DRangeFrom ( int off , int count , byte [ ] d ) { validateIsInt8 ( ) ; copy1DRangeFromUnchecked ( off , count , d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; int SDK_INT = android.os.Build.VERSION.SDK_INT ; if ( SDK_INT >= 19 ) { setImmersiveSticky ( ) ; android.view.View decorView = getWindow ( ) . getDecorView ( ) ; decorView.setOnSystemUiVisibilityChangeListener ( new android.view.View.OnSystemUiVisibilityChangeListener ( ) { @ java.lang.Override public void onSystemUiVisibilityChange ( int visibility ) { setImmersiveSticky ( ) ; } } ) ; } }
Source:
public void unregisterReceiver ( android.content.BroadcastReceiver receiver ) { synchronized ( mInterceptors ) { final java.util.Iterator < com.android.server.BroadcastInterceptingContext.BroadcastInterceptor > i = mInterceptors.iterator ( ) ; while ( i.hasNext ( ) ) { final com.android.server.BroadcastInterceptingContext.BroadcastInterceptor interceptor = i.next ( ) ; if ( receiver.equals ( interceptor.mReceiver ) ) { i.remove ( ) ; } } } }

Target:
public void unregisterReceiver ( android.content.BroadcastReceiver receiver ) { synchronized ( mInterceptors ) { final java.util.Iterator < com.android.internal.util.test.BroadcastInterceptingContext.BroadcastInterceptor > i = mInterceptors.iterator ( ) ; while ( i.hasNext ( ) ) { final com.android.internal.util.test.BroadcastInterceptingContext.BroadcastInterceptor interceptor = i.next ( ) ; if ( receiver.equals ( interceptor.mReceiver ) ) { i.remove ( ) ; } } } }
Source:
public final int initialize ( android.telephony.mbms.IMbmsStreamingManagerCallback listener , int subscriptionId ) throws android.os.RemoteException { return initialize ( new android.telephony.mbms.MbmsStreamingManagerCallback ( ) { @ java.lang.Override public void error ( int errorCode , java.lang.String message ) throws android.os.RemoteException { listener.error ( errorCode , message ) ; } @ java.lang.Override public void streamingServicesUpdated ( java.util.List < android.telephony.mbms.StreamingServiceInfo > services ) throws android.os.RemoteException { listener.streamingServicesUpdated ( services ) ; } @ java.lang.Override public void middlewareReady ( ) throws android.os.RemoteException { listener.middlewareReady ( ) ; } } , subscriptionId ) ; }

Target:
public void binderDied ( ) { onAppCallbackDied ( uid , subscriptionId ) ; }
Source:
public boolean hasResources ( com.android.resources.ResourceType type ) { java.util.List < com.android.resources.ResourceFolderType > folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; boolean valid = false ; for ( com.android.resources.ResourceFolderType rft : folderTypes ) { if ( rft == ( mType ) ) { valid = true ; break ; } } if ( valid ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { if ( f.hasResources ( type ) ) { return true ; } } } } return false ; }

Target:
public boolean hasResources ( com.android.resources.ResourceType type ) { java.util.List < com.android.resources.ResourceFolderType > folderTypes = com.android.resources.FolderTypeRelationship.getRelatedFolders ( type ) ; boolean valid = false ; for ( com.android.resources.ResourceFolderType rft : folderTypes ) { if ( rft == ( mType ) ) { valid = true ; break ; } } if ( valid ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { if ( f.hasResources ( type ) ) { return true ; } } } } return false ; }
Source:
protected void engineInitSign ( java.security.PrivateKey privateKey ) throws java.security.InvalidKeyException { }

Target:
protected void engineInitSign ( java.security.PrivateKey privateKey ) throws java.security.InvalidKeyException { org.bouncycastle.crypto.CipherParameters param ; param = org.bouncycastle.jcajce.provider.asymmetric.dsa.DSAUtil.generatePrivateKeyParameter ( privateKey ) ; org.bouncycastle.crypto.params.DSAParameters dsaParam = ( ( org.bouncycastle.crypto.params.DSAKeyParameters ) ( param ) ) . getParameters ( ) ; checkKey ( dsaParam ) ; if ( ( random ) != null ) { param = new org.bouncycastle.crypto.params.ParametersWithRandom ( param , random ) ; } digest.reset ( ) ; signer.init ( true , param ) ; }
Source:
public android.net.wifi.WifiConfiguration getMatchingWifiConfig ( android.net.wifi.ScanResult scanResult ) { enforceAccessPermission ( ) ; mLog.trace ( "getMatchingWifiConfig uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; return mWifiStateMachine.syncGetMatchingWifiConfig ( scanResult , mWifiStateMachineChannel ) ; }

Target:
public android.net.wifi.WifiConfiguration getMatchingWifiConfig ( android.net.wifi.ScanResult scanResult ) { enforceAccessPermission ( ) ; mLog.trace ( "getMatchingWifiConfig uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ! ( mContext.getResources ( ) . getBoolean ( com.android.internal.R.bool.config_wifi_hotspot2_enabled ) ) ) { throw new java.lang.UnsupportedOperationException ( "Passpoint not enabled" ) ; } return mWifiStateMachine.syncGetMatchingWifiConfig ( scanResult , mWifiStateMachineChannel ) ; }
Source:
public com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback callOnDropEnter ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , java.lang.String fqcn ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.onDropEnter ( targetNode , fqcn ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropEnter() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }

Target:
public com.android.ide.eclipse.adt.editors.layout.gscripts.DropFeedback callOnDropEnter ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.eclipse.adt.editors.layout.gscripts.IDragElement [ ] elements ) { com.android.ide.eclipse.adt.editors.layout.gscripts.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.onDropEnter ( targetNode , elements ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropEnter() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }
Source:
public java.util.List < java.lang.Integer > contactsGetIds ( ) { java.util.List < java.lang.Integer > result = new java.util.ArrayList < java.lang.Integer > ( ) ; java.lang.String [ ] columns = new java.lang.String [ ] { "_id" } ; android.database.Cursor cursor = mContentResolver.query ( com.googlecode.android_scripting.facade.ContactsFacade.CONTACTS_URI , columns , null , null , null ) ; if ( cursor != null ) { while ( cursor.moveToNext ( ) ) { result.add ( cursor.getInt ( 0 ) ) ; } cursor.close ( ) ; } return result ; }

Target:
public java.util.List < java.lang.Integer > contactsGetContactIds ( ) { java.util.List < java.lang.Integer > ids = new java.util.ArrayList < java.lang.Integer > ( ) ; java.lang.String [ ] columns = new java.lang.String [ ] { "_id" } ; android.database.Cursor cursor = mContentResolver.query ( com.googlecode.android_scripting.facade.ContactsFacade.CONTACTS_URI , columns , null , null , null ) ; if ( cursor != null ) { while ( cursor.moveToNext ( ) ) { ids.add ( cursor.getInt ( 0 ) ) ; } cursor.close ( ) ; } return ids ; }
Source:
public void run ( ) { for ( ; ; ) { try { java.net.Socket sock ; sock = debugSocket.accept ( ) ; android.util.Log.i ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "New connection; resetting radio" ) ; mCM.resetRadio ( null ) ; sock.close ( ) ; } catch ( java.io.IOException ex ) { android.util.Log.w ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "Exception accepting socket" , ex ) ; } } }

Target:
public void run ( ) { for ( ; ; ) { try { java.net.Socket sock ; sock = debugSocket.accept ( ) ; android.telephony.Rlog.i ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "New connection; resetting radio" ) ; mCM.resetRadio ( null ) ; sock.close ( ) ; } catch ( java.io.IOException ex ) { android.telephony.Rlog.w ( com.android.internal.telephony.gsm.GSMPhone.LOG_TAG , "Exception accepting socket" , ex ) ; } } }
Source:
private void release ( boolean cleartargetstate ) { if ( ( mMediaPlayer ) != null ) { mMediaPlayer.reset ( ) ; mMediaPlayer.release ( ) ; mMediaPlayer = null ; mPendingSubtitleTracks.clear ( ) ; mCurrentState = android.widget.VideoView.STATE_IDLE ; if ( cleartargetstate ) { mTargetState = android.widget.VideoView.STATE_IDLE ; } } }

Target:
private void release ( boolean cleartargetstate ) { if ( ( mMediaPlayer ) != null ) { mMediaPlayer.reset ( ) ; mMediaPlayer.release ( ) ; mMediaPlayer = null ; mPendingSubtitleTracks.clear ( ) ; mCurrentState = android.widget.VideoView.STATE_IDLE ; if ( cleartargetstate ) { mTargetState = android.widget.VideoView.STATE_IDLE ; } android.media.AudioManager am = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; am.abandonAudioFocus ( null ) ; } }
Source:
public void checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = sslSocket.getHandshakeSession ( ) ; if ( session == null ) { throw new java.security.cert.CertificateException ( "Not in handshake; no session available" ) ; } parameters = sslSocket.getSSLParameters ( ) ; } checkTrusted ( chain , authType , session , parameters , false ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.lang.String host ) throws java.security.cert.CertificateException { return checkTrusted ( chain , authType , host , false ) ; }
Source:
public void test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition ( ) { new org.apache.harmony.tests.java.text.Support_MessageFormat ( "test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition" ) . t_format_with_FieldPosition ( ) ; }

Target:
public void test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition ( ) { new org.apache.harmony.tests.java.text.Support_MessageFormat ( "test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition" ) . t_format_with_FieldPosition ( ) ; java.lang.String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s}." ; java.text.MessageFormat format = new java.text.MessageFormat ( pattern , java.util.Locale.US ) ; java.lang.Object [ ] objects = new java.lang.Object [ ] { "" , new java.lang.Integer ( 3 ) , 8 , "" } ; try { format.format ( objects , new java.lang.StringBuffer ( ) , new java.text.FieldPosition ( java.text.DateFormat.Field.AM_PM ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public void addRegistrationListener ( com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } addRegistrationCallback ( listener ) ; addCapabilitiesCallback ( new android.telephony.ims.internal.feature.ImsFeature.CapabilityCallback ( ) { @ java.lang.Override public void onCapabilitiesStatusChanged ( android.telephony.ims.internal.feature.ImsFeature.Capabilities config ) { listener.onFeatureCapabilityChangedAdapter ( getRegistrationTech ( ) , config ) ; } } ) ; com.android.ims.ImsManager.log ( "Registration Callback registered." ) ; }

Target:
public void addRegistrationListener ( com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } addRegistrationCallback ( listener ) ; addCapabilitiesCallback ( new android.telephony.ims.feature.ImsFeature.CapabilityCallback ( ) { @ java.lang.Override public void onCapabilitiesStatusChanged ( android.telephony.ims.feature.ImsFeature.Capabilities config ) { listener.onFeatureCapabilityChangedAdapter ( getRegistrationTech ( ) , config ) ; } } ) ; com.android.ims.ImsManager.log ( "Registration Callback registered." ) ; }
Source:
public void testSetCurrentNetworkBssid ( ) throws java.lang.Exception { java.lang.String bssidStr = "34:34:12:12:12:90" ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.eq ( bssidStr ) ) ) . thenReturn ( true ) ; executeAndValidateInitializationSequence ( ) ; assertFalse ( mDut.setCurrentNetworkBssid ( bssidStr ) ) ; executeAndValidateConnectSequence ( 4 , false , false ) ; assertTrue ( mDut.setCurrentNetworkBssid ( bssidStr ) ) ; }

Target:
public void testSetCurrentNetworkBssid ( ) throws java.lang.Exception { java.lang.String bssidStr = "34:34:12:12:12:90" ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.eq ( bssidStr ) ) ) . thenReturn ( true ) ; executeAndValidateInitializationSequence ( ) ; assertFalse ( mDut.setCurrentNetworkBssid ( bssidStr ) ) ; org.mockito.Mockito.verify ( mSupplicantStaNetworkMock , org.mockito.Mockito.never ( ) ) . setBssid ( org.mockito.Matchers.eq ( bssidStr ) ) ; executeAndValidateConnectSequence ( 4 , false , false ) ; assertTrue ( mDut.setCurrentNetworkBssid ( bssidStr ) ) ; org.mockito.Mockito.verify ( mSupplicantStaNetworkMock ) . setBssid ( org.mockito.Matchers.eq ( bssidStr ) ) ; }
Source:
public void getMemoryInfo ( android.os.Debug.MemoryInfo outInfo ) { android.os.Debug.getMemoryInfo ( outInfo ) ; }

Target:
public void dumpMemInfo ( java.io.FileDescriptor fd , android.os.Debug.MemoryInfo mem , boolean checkin , boolean dumpFullInfo , boolean dumpDalvik , java.lang.String [ ] args ) { java.io.FileOutputStream fout = new java.io.FileOutputStream ( fd ) ; java.io.PrintWriter pw = new com.android.internal.util.FastPrintWriter ( fout ) ; try { dumpMemInfo ( pw , mem , checkin , dumpFullInfo , dumpDalvik ) ; } finally { pw.flush ( ) ; } }
Source:
private static android.net.Uri getContactUri ( android.database.Cursor cursor ) { long contactId = cursor.getLong ( Projections.PHONE_ID ) ; java.lang.String lookupKey = cursor.getString ( Projections.PHONE_LOOKUP_KEY ) ; return ContactsContract.Contacts.getLookupUri ( contactId , lookupKey ) ; }

Target:
private static android.net.Uri getContactUri ( com.android.dialer.searchfragment.common.SearchCursor cursor ) { java.lang.String businessInfoJson = cursor.getString ( Projections.PHONE_LOOKUP_KEY ) ; return Contacts.CONTENT_LOOKUP_URI.buildUpon ( ) . appendPath ( Constants.LOOKUP_URI_ENCODED ) . appendQueryParameter ( ContactsContract.DIRECTORY_PARAM_KEY , java.lang.String.valueOf ( cursor.getDirectoryId ( ) ) ) . encodedFragment ( businessInfoJson ) . build ( ) ; }
Source:
private void writePath ( java.io.FileOutputStream fos , java.lang.String path ) throws java.io.IOException { byte [ ] pathBytes = path.getBytes ( com.google.common.base.Charsets.UTF_8 ) ; java.nio.ByteBuffer b = java.nio.ByteBuffer.allocate ( 4 ) ; b.putInt ( pathBytes.length ) ; fos.write ( b.array ( ) ) ; fos.write ( pathBytes ) ; }

Target:
private void writePath ( java.io.FileOutputStream fos , java.lang.String path ) throws java.io.IOException { byte [ ] pathBytes = path.getBytes ( com.google.common.base.Charsets.UTF_8 ) ; writeInt ( fos , pathBytes.length ) ; fos.write ( pathBytes ) ; }
Source:
private static com.android.server.wifi.nan.WifiNanStateManager installNewNanStateManager ( ) throws java.lang.Exception { java.lang.reflect.Constructor < com.android.server.wifi.nan.WifiNanStateManager > ctr = com.android.server.wifi.nan.WifiNanStateManager.class . getDeclaredConstructor ( ) ; ctr.setAccessible ( true ) ; com.android.server.wifi.nan.WifiNanStateManager nanStateManager = ctr.newInstance ( ) ; java.lang.reflect.Field field = com.android.server.wifi.nan.WifiNanStateManager.class . getDeclaredField ( "sNanStateManagerSingleton" ) ; field.setAccessible ( true ) ; field.set ( null , nanStateManager ) ; return com.android.server.wifi.nan.WifiNanStateManager.getInstance ( ) ; }

Target:
private static com.android.server.wifi.aware.WifiAwareStateManager installNewAwareStateManager ( ) throws java.lang.Exception { java.lang.reflect.Constructor < com.android.server.wifi.aware.WifiAwareStateManager > ctr = com.android.server.wifi.aware.WifiAwareStateManager.class . getDeclaredConstructor ( ) ; ctr.setAccessible ( true ) ; com.android.server.wifi.aware.WifiAwareStateManager awareStateManager = ctr.newInstance ( ) ; java.lang.reflect.Field field = com.android.server.wifi.aware.WifiAwareStateManager.class . getDeclaredField ( "sAwareStateManagerSingleton" ) ; field.setAccessible ( true ) ; field.set ( null , awareStateManager ) ; return com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) ; }
Source:
public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JParameterRef x ) { com.android.jack.ir.ast.JValueLiteral literal = paramValues.get ( x.getParameter ( ) ) ; if ( literal != null ) { literal = com.android.jack.optimizations.common.OptimizerUtils.cloneExpression ( literal ) ; literal.setSourceInfo ( x.getSourceInfo ( ) ) ; helper.replace ( x , literal , request ) ; tracer.getStatistic ( com.android.jack.optimizations.valuepropagation.argument.ARGUMENT_VALUES_PROPAGATED ) . incValue ( ) ; } }

Target:
public void endVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JParameterRef x ) { com.android.jack.ir.ast.JParameter parameter = x.getParameter ( ) ; com.android.jack.ir.ast.JValueLiteral literal = paramValues.get ( parameter ) ; if ( ( literal != null ) && ( parameter.getAnnotations ( disablingAnnotationType ) . isEmpty ( ) ) ) { literal = com.android.jack.optimizations.common.OptimizerUtils.cloneExpression ( literal ) ; literal.setSourceInfo ( x.getSourceInfo ( ) ) ; helper.replace ( x , literal , request ) ; tracer.getStatistic ( com.android.jack.optimizations.valuepropagation.argument.ARGUMENT_VALUES_PROPAGATED ) . incValue ( ) ; } }
Source:
public boolean hasNextShort ( int radix ) { java.util.regex.Pattern integerPattern = getIntegerPattern ( radix ) ; boolean isShortValue = false ; if ( hasNext ( integerPattern ) ) { java.lang.String intString = matcher.group ( ) ; intString = removeLocaleInfo ( intString , java.util.Scanner.DataType.INT ) ; try { cachedNextValue = java.lang.Short.valueOf ( intString , radix ) ; isShortValue = true ; } catch ( java.lang.NumberFormatException e ) { matchSuccessful = false ; } } return isShortValue ; }

Target:
public boolean hasNextLine ( ) { saveCurrentStatus ( ) ; java.lang.String result = findWithinHorizon ( java.util.Scanner.LINE_PATTERN , 0 ) ; recoverPreviousStatus ( ) ; return result != null ; }
Source:
public static org.apache.harmony.security.provider.cert.X509CertPathImpl getInstance ( java.io.InputStream in ) throws java.security.cert.CertificateException { try { return ( ( org.apache.harmony.security.provider.cert.X509CertPathImpl ) ( org.apache.harmony.security.provider.cert.X509CertPathImpl.ASN1.decode ( in ) ) ) ; } catch ( java.io.IOException e ) { throw new java.security.cert.CertificateException ( ( "Incorrect encoded form: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public static org.apache.harmony.security.provider.cert.X509CertPathImpl getInstance ( byte [ ] in ) throws java.security.cert.CertificateException { try { return ( ( org.apache.harmony.security.provider.cert.X509CertPathImpl ) ( org.apache.harmony.security.provider.cert.X509CertPathImpl.ASN1.decode ( in ) ) ) ; } catch ( java.io.IOException e ) { throw new java.security.cert.CertificateException ( "Failed to decode CertPath" , e ) ; } }