auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void checkValidity ( ) { com.android.jack.ir.ast.JExpression instance = getInstance ( ) ; if ( instance == null ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Call to method with polymorphic signature must not be static" ) ; } if ( ! ( getReceiverType ( ) . isSameType ( instance.getType ( ) ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Receiver type mismatch with instance type" ) ; } }

Target:
public void checkValidity ( ) { com.android.jack.ir.ast.JExpression instance = getInstance ( ) ; if ( instance == null ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Call to method with polymorphic signature must not be static" ) ; } if ( ! ( getReceiverType ( ) . isSameType ( instance.getType ( ) ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Receiver type mismatch with instance type" ) ; } if ( ( callSiteParameterTypes.size ( ) ) != ( getArgs ( ) . size ( ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Number of method call arguments does not match the number of call site parameters" ) ; } }
Source:
private void updateLibraries ( ) { java.util.ArrayList < org.eclipse.core.resources.IProject > list = new java.util.ArrayList < org.eclipse.core.resources.IProject > ( ) ; synchronized ( mLibraries ) { for ( com.android.ide.eclipse.adt.internal.project.ProjectState.LibraryState state : mLibraries ) { if ( ( state.getProjectState ( ) ) != null ) { list.add ( state.getProjectState ( ) . getProject ( ) ) ; } } } mLibraryProjects = list.toArray ( new org.eclipse.core.resources.IProject [ list.size ( ) ] ) ; }

Target:
private void updateFullLibraryList ( ) { java.util.ArrayList < org.eclipse.core.resources.IProject > list = new java.util.ArrayList < org.eclipse.core.resources.IProject > ( ) ; synchronized ( mLibraries ) { buildFullLibraryDependencies ( mLibraries , list ) ; } mLibraryProjects = list.toArray ( new org.eclipse.core.resources.IProject [ list.size ( ) ] ) ; }
Source:
private void finishTestActivity ( android.app.Activity activity ) throws java.lang.Throwable { com.android.cts.verifier.TestResult.setPassedResult ( activity ) ; activity.finish ( ) ; mInstrumentation.waitForIdleSync ( ) ; android.content.ContentResolver resolver = mActivity.getContentResolver ( ) ; android.database.Cursor cursor = resolver.query ( TestResultsProvider.RESULTS_ALL_CONTENT_URI , TestResultsProvider.ALL_COLUMNS , null , null , null ) ; assertEquals ( 1 , cursor.getCount ( ) ) ; cursor.close ( ) ; }

Target:
private void finishTestActivity ( android.app.Activity activity ) throws java.lang.Throwable { com.android.cts.verifier.TestResult.setPassedResult ( activity ) ; activity.finish ( ) ; mInstrumentation.waitForIdleSync ( ) ; android.content.ContentResolver resolver = mActivity.getContentResolver ( ) ; android.database.Cursor cursor = resolver.query ( TestResultsProvider.RESULTS_CONTENT_URI , TestResultsProvider.ALL_COLUMNS , null , null , null ) ; assertEquals ( 1 , cursor.getCount ( ) ) ; cursor.close ( ) ; }
Source:
protected int getMinSdk ( com.android.tools.lint.detector.api.Context context ) { if ( ( mMinApi ) == ( - 1 ) ) { com.android.sdklib.AndroidVersion minSdkVersion = context.getMainProject ( ) . getMinSdkVersion ( ) ; mMinApi = minSdkVersion.getApiLevel ( ) ; if ( minSdkVersion.isPreview ( ) ) { ( mMinApi ) ++ ; } } return mMinApi ; }

Target:
protected int getMinSdk ( com.android.tools.lint.detector.api.Context context ) { if ( ( mMinApi ) == ( - 1 ) ) { com.android.sdklib.AndroidVersion minSdkVersion = context.getMainProject ( ) . getMinSdkVersion ( ) ; mMinApi = minSdkVersion.getFeatureLevel ( ) ; } return mMinApi ; }
Source:
public boolean execute ( com.android.server.NativeDaemonConnector.Command cmd ) { if ( com.android.server.NsdService.DBG ) { android.util.Slog.d ( com.android.server.NsdService.TAG , cmd.toString ( ) ) ; } try { mNativeConnector.execute ( cmd ) ; } catch ( com.android.server.NativeDaemonConnectorException e ) { android.util.Slog.e ( com.android.server.NsdService.TAG , ( "Failed to execute " + cmd ) , e ) ; return false ; } return true ; }

Target:
public void start ( ) { execute ( "start-service" ) ; }
Source:
private void broadcastIdleTime ( android.bluetooth.BluetoothDevice device , int idleTime ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothInputDevice.ACTION_IDLE_TIME_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothInputDevice.EXTRA_IDLE_TIME , idleTime ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; sendBroadcast ( intent , com.android.bluetooth.hid.BLUETOOTH_PERM ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { log ( ( ( ( "Idle time (" + device ) + "): " ) + idleTime ) ) ; } }

Target:
private void broadcastIdleTime ( android.bluetooth.BluetoothDevice device , int idleTime ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHidHost.ACTION_IDLE_TIME_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHidHost.EXTRA_IDLE_TIME , idleTime ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; sendBroadcast ( intent , com.android.bluetooth.hid.BLUETOOTH_PERM ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { log ( ( ( ( "Idle time (" + device ) + "): " ) + idleTime ) ) ; } }
Source:
private byte [ ] sign ( byte [ ] keyName , byte [ ] data ) { final java.util.ArrayList < byte [ ] > values = execute ( 'n' , keyName , data ) ; return ( values == null ) || ( values.isEmpty ( ) ) ? null : values.get ( 0 ) ; }

Target:
public boolean delKey ( java.lang.String key ) { try { return ( mBinder.del_key ( key ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
private static android.text.SpannableString getBoldedString ( java.lang.String s , int index , int numBolded ) { android.text.SpannableString span = new android.text.SpannableString ( s ) ; span.setSpan ( new android.text.style.StyleSpan ( android.graphics.Typeface.BOLD ) , index , ( index + numBolded ) , Spanned.SPAN_INCLUSIVE_EXCLUSIVE ) ; return span ; }

Target:
private static android.text.SpannableString getBoldedString ( java.lang.String s , int index , int numBolded ) { if ( ( numBolded + index ) > ( s.length ( ) ) ) { com.android.dialer.common.LogUtil.e ( "QueryBoldingUtil#getBoldedString" , "number of bolded characters exceeded length of string." ) ; numBolded = ( s.length ( ) ) - index ; } android.text.SpannableString span = new android.text.SpannableString ( s ) ; span.setSpan ( new android.text.style.StyleSpan ( android.graphics.Typeface.BOLD ) , index , ( index + numBolded ) , Spanned.SPAN_INCLUSIVE_EXCLUSIVE ) ; return span ; }
Source:
private static android.net.wifi.aware.WifiAwareCharacteristics getCharacteristics ( ) { com.android.server.wifi.aware.WifiAwareNative.Capabilities cap = new com.android.server.wifi.aware.WifiAwareNative.Capabilities ( ) ; cap.maxConcurrentAwareClusters = 1 ; cap.maxPublishes = 2 ; cap.maxSubscribes = 2 ; cap.maxServiceNameLen = com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ; cap.maxMatchFilterLen = com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ; cap.maxTotalMatchFilterLen = 255 ; cap.maxServiceSpecificInfoLen = com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ; cap.maxVsaDataLen = 255 ; cap.maxMeshDataLen = 255 ; cap.maxNdiInterfaces = 1 ; cap.maxNdpSessions = 1 ; cap.maxAppInfoLen = 255 ; cap.maxQueuedTransmitMessages = 6 ; return cap.toPublicCharacteristics ( ) ; }

Target:
private static android.net.wifi.aware.Characteristics getCharacteristics ( ) { com.android.server.wifi.aware.Capabilities cap = new com.android.server.wifi.aware.Capabilities ( ) ; cap.maxConcurrentAwareClusters = 1 ; cap.maxPublishes = 2 ; cap.maxSubscribes = 2 ; cap.maxServiceNameLen = com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ; cap.maxMatchFilterLen = com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ; cap.maxTotalMatchFilterLen = 255 ; cap.maxServiceSpecificInfoLen = com.android.server.wifi.aware.WifiAwareServiceImplTest.MAX_LENGTH ; cap.maxVsaDataLen = 255 ; cap.maxNdiInterfaces = 1 ; cap.maxNdpSessions = 1 ; cap.maxAppInfoLen = 255 ; cap.maxQueuedTransmitMessages = 6 ; return cap.toPublicCharacteristics ( ) ; }
Source:
static void writeToFile ( java.lang.String inFile , java.lang.String outFile ) throws java.io.FileNotFoundException , java.io.IOException , java.io.UnsupportedEncodingException { com.ibm.icu.text.BreakDictionary dictionary = new com.ibm.icu.text.BreakDictionary ( com.ibm.icu.impl.ICUBinary.getByteBufferFromInputStream ( new java.io.FileInputStream ( inFile ) ) ) ; java.io.PrintWriter out = null ; if ( outFile != null ) { out = new java.io.PrintWriter ( new java.io.OutputStreamWriter ( new java.io.FileOutputStream ( outFile ) , "UnicodeLittle" ) ) ; } dictionary.printWordList ( "" , 0 , out ) ; if ( out != null ) { out.close ( ) ; } }

Target:
static void writeToFile ( java.lang.String inFile , java.lang.String outFile ) throws java.io.FileNotFoundException , java.io.IOException , java.io.UnsupportedEncodingException { @ java.lang.SuppressWarnings ( value = "resource" ) com.ibm.icu.text.BreakDictionary dictionary = new com.ibm.icu.text.BreakDictionary ( com.ibm.icu.impl.ICUBinary.getByteBufferFromInputStreamAndCloseStream ( new java.io.FileInputStream ( inFile ) ) ) ; java.io.PrintWriter out = null ; if ( outFile != null ) { out = new java.io.PrintWriter ( new java.io.OutputStreamWriter ( new java.io.FileOutputStream ( outFile ) , "UnicodeLittle" ) ) ; } dictionary.printWordList ( "" , 0 , out ) ; if ( out != null ) { out.close ( ) ; } }
Source:
public static com.android.dialer.calllog.model.CoalescedRow.Builder builder ( ) { return new com.android.dialer.calllog.model.AutoValue_CoalescedRow.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setNumberPresentation ( 0 ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setCallType ( 0 ) . setNumberAttributes ( com.android.dialer.NumberAttributes.getDefaultInstance ( ) ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }

Target:
public static com.android.dialer.calllog.model.CoalescedRow.Builder builder ( ) { return new com.android.dialer.calllog.model.AutoValue_CoalescedRow.Builder ( ) . setId ( 0 ) . setTimestamp ( 0 ) . setNumber ( com.android.dialer.DialerPhoneNumber.getDefaultInstance ( ) ) . setNumberPresentation ( 0 ) . setIsRead ( false ) . setIsNew ( false ) . setPhoneAccountColor ( 0 ) . setFeatures ( 0 ) . setCallType ( 0 ) . setNumberAttributes ( com.android.dialer.NumberAttributes.getDefaultInstance ( ) ) . setIsVoicemailCall ( false ) . setCoalescedIds ( com.android.dialer.CoalescedIds.getDefaultInstance ( ) ) ; }
Source:
public java.lang.String getDefaultDialerPackage ( ) { try { com.android.server.telecom.Log.startSession ( "TSI.gDDP" ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { return mDefaultDialerManagerAdapter.getDefaultDialerApplication ( mContext ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public java.lang.String getDefaultDialerPackage ( ) { try { android.telecom.Log.startSession ( "TSI.gDDP" ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { return mDefaultDialerManagerAdapter.getDefaultDialerApplication ( mContext ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
private static void usage ( java.lang.String [ ] args ) { java.lang.System.err.println ( ( "Arguments: " + ( java.util.Arrays.asList ( args ) ) ) ) ; java.lang.System.err.println ( "Usage: cts-native-scanner -s SOURCE_DIR -t TEST_SUITE" ) ; java.lang.System.exit ( 1 ) ; }

Target:
private static void usage ( java.lang.String [ ] args ) { java.lang.System.err.println ( ( "Arguments: " + ( java.util.Arrays.asList ( args ) ) ) ) ; java.lang.System.err.println ( "Usage: cts-native-scanner -t TEST_SUITE" ) ; java.lang.System.err.println ( " This code reads from stdin the list of tests." ) ; java.lang.System.err.println ( " The format expected:" ) ; java.lang.System.err.println ( " TEST_CASE_NAME." ) ; java.lang.System.err.println ( " TEST_NAME" ) ; java.lang.System.exit ( 1 ) ; }
Source:
public void radioStateChanged ( int indicationType , int radioState ) { mRil.processIndication ( indicationType ) ; com.android.internal.telephony.CommandsInterface.RadioState newState = getRadioStateFromInt ( radioState ) ; mRil.riljLog ( ( "radioStateChanged: " + ( newState.toString ( ) ) ) ) ; mRil.setRadioState ( newState ) ; }

Target:
public void radioStateChanged ( int indicationType , int radioState ) { mRil.processIndication ( indicationType ) ; com.android.internal.telephony.CommandsInterface.RadioState newState = getRadioStateFromInt ( radioState ) ; mRil.unsljLogMore ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED , ( "radioStateChanged: " + ( newState.toString ( ) ) ) ) ; mRil.setRadioState ( newState ) ; }
Source:
public void installDrmEngine ( java.lang.String engineFilePath ) { if ( ( null == engineFilePath ) || ( engineFilePath.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( "Given engineFilePath: " + engineFilePath ) + "is not valid" ) ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } _installDrmEngine ( mUniqueId , engineFilePath ) ; }

Target:
public int removeRights ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _removeRights ( mUniqueId , path ) ; }
Source:
public void testKeyStore_GetCertificateAlias_NonExist_Empty_Failure ( ) throws java.lang.Exception { mKeyStore.load ( null , null ) ; java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.Certificate actual = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertNull ( "Stored certificate alias should not be found" , mKeyStore.getCertificateAlias ( actual ) ) ; }

Target:
public void testKeyStore_GetCertificateAlias_NonExist_Empty_Encrypted_Failure ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; java.security.cert.CertificateFactory f = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.Certificate actual = f.generateCertificate ( new java.io.ByteArrayInputStream ( android.security.AndroidKeyStoreTest.FAKE_CA_1 ) ) ; assertNull ( "Stored certificate alias should not be found" , mKeyStore.getCertificateAlias ( actual ) ) ; }
Source:
public void failing_test_formatToCharacterIteratorLjava_lang_Object ( ) { new org.apache.harmony.tests.java.text.Support_MessageFormat ( "test_formatToCharacterIteratorLjava_lang_Object" ) . t_formatToCharacterIterator ( ) ; }

Target:
public void test_formatToCharacterIteratorLjava_lang_Object ( ) { new org.apache.harmony.tests.java.text.Support_MessageFormat ( "test_formatToCharacterIteratorLjava_lang_Object" ) . t_formatToCharacterIterator ( ) ; try { new java.text.MessageFormat ( "{1, number}" ) . formatToCharacterIterator ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { new java.text.MessageFormat ( "{0, time}" ) . formatToCharacterIterator ( new java.lang.Object [ ] { "" } ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public org.xmlpull.v1.XmlPullParser newPullParser ( ) throws org.xmlpull.v1.XmlPullParserException { final org.xmlpull.v1.XmlPullParser pp = new org.kxml2.io.KXmlParser ( ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.Boolean > entry : features.entrySet ( ) ) { pp.setFeature ( entry.getKey ( ) , entry.getValue ( ) ) ; } return pp ; }

Target:
public org.xmlpull.v1.XmlPullParser newPullParser ( ) throws org.xmlpull.v1.XmlPullParserException { final org.xmlpull.v1.XmlPullParser pp = getParserInstance ( ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.Boolean > entry : features.entrySet ( ) ) { if ( entry.getValue ( ) ) { pp.setFeature ( entry.getKey ( ) , entry.getValue ( ) ) ; } } return pp ; }
Source:
public android.os.IBinder onBind ( android.content.Intent intent ) { android.util.Log.i ( android.telecom.cts.MockInCallService.LOG_TAG , "Service bounded" ) ; if ( ( getCallbacks ( ) ) != null ) { getCallbacks ( ) . setService ( this ) ; } android.telecom.cts.MockInCallService.mIsServiceUnbound = false ; return super . onBind ( intent ) ; }

Target:
public android.os.IBinder onBind ( android.content.Intent intent ) { android.util.Log.i ( android.telecom.cts.MockInCallService.LOG_TAG , "Service bounded" ) ; if ( ( getCallbacks ( ) ) != null ) { getCallbacks ( ) . setService ( this ) ; } android.telecom.cts.MockInCallService.mIsServiceBound = true ; return super . onBind ( intent ) ; }
Source:
public boolean setLockType ( int lockType ) { if ( ( ( lockType != ( com.android.tv.ui.ChannelBannerView.LOCK_NONE ) ) && ( lockType != ( com.android.tv.ui.ChannelBannerView.LOCK_CHANNEL_INFO ) ) ) && ( lockType != ( com.android.tv.ui.ChannelBannerView.LOCK_PROGRAM_DETAIL ) ) ) { throw new java.lang.IllegalArgumentException ( ( "No such lock type " + lockType ) ) ; } if ( ( mLockType ) != lockType ) { mLockType = lockType ; return true ; } return false ; }

Target:
public int setLockType ( int lockType ) { if ( ( ( lockType != ( com.android.tv.ui.ChannelBannerView.LOCK_NONE ) ) && ( lockType != ( com.android.tv.ui.ChannelBannerView.LOCK_CHANNEL_INFO ) ) ) && ( lockType != ( com.android.tv.ui.ChannelBannerView.LOCK_PROGRAM_DETAIL ) ) ) { throw new java.lang.IllegalArgumentException ( ( "No such lock type " + lockType ) ) ; } int previousLockType = mLockType ; mLockType = lockType ; return previousLockType ; }
Source:
public void testConfigurationUpdatesWhenResizedFromFullscreen ( ) throws java.lang.Exception { launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; final android.server.cts.ReportedSizes fullscreenSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; moveActivityToStack ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes dockedSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesAreSane ( fullscreenSizes , dockedSizes ) ; }

Target:
public void testConfigurationUpdatesWhenResizedFromFullscreen ( ) throws java.lang.Exception { if ( ! ( supportsMultiWindowMode ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInStack ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; final android.server.cts.ReportedSizes fullscreenSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; moveActivityToStack ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; final android.server.cts.ReportedSizes dockedSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.TEST_ACTIVITY_NAME , android.server.cts.DOCKED_STACK_ID ) ; android.server.cts.ActivityManagerAppConfigurationTests.assertSizesAreSane ( fullscreenSizes , dockedSizes ) ; }
Source:
protected void onPause ( ) { super . onPause ( ) ; com.android.incallui.audioroute.AudioRouteSelectorDialogFragment audioRouteSelectorDialogFragment = ( ( com.android.incallui.audioroute.AudioRouteSelectorDialogFragment ) ( getSupportFragmentManager ( ) . findFragmentByTag ( AudioRouteSelectorDialogFragment.TAG ) ) ) ; if ( audioRouteSelectorDialogFragment != null ) { audioRouteSelectorDialogFragment.dismiss ( ) ; } finish ( ) ; }

Target:
protected void onPause ( ) { super . onPause ( ) ; com.android.incallui.audioroute.AudioRouteSelectorDialogFragment audioRouteSelectorDialogFragment = ( ( com.android.incallui.audioroute.AudioRouteSelectorDialogFragment ) ( getSupportFragmentManager ( ) . findFragmentByTag ( AudioRouteSelectorDialogFragment.TAG ) ) ) ; if ( audioRouteSelectorDialogFragment != null ) { audioRouteSelectorDialogFragment.dismiss ( ) ; } if ( ! ( isChangingConfigurations ( ) ) ) { finish ( ) ; } }
Source:
public static long readSignedLong ( com.android.dx.util.ByteInput in , int zwidth ) { long result = 0 ; for ( int i = zwidth ; i >= 0 ; i -- ) { result = ( result > > > 8 ) | ( ( ( in.readByte ( ) ) & 255L ) << 56 ) ; } result >>= ( 7 - zwidth ) * 8 ; return result ; }

Target:
public static long readSignedLong ( com.android.dex.util.ByteInput in , int zwidth ) { long result = 0 ; for ( int i = zwidth ; i >= 0 ; i -- ) { result = ( result > > > 8 ) | ( ( ( in.readByte ( ) ) & 255L ) << 56 ) ; } result >>= ( 7 - zwidth ) * 8 ; return result ; }
Source:
public java.lang.String toString ( ) { int count = 0 ; for ( com.android.gallery3d.filtershow.filters.FilterGradRepresentation.Band point : mBands ) { if ( ! ( point.mask ) ) { count ++ ; } } return ( ( ( ( "c=" + ( mBands.indexOf ( mBands ) ) ) + "[" ) + ( mBands.size ( ) ) ) + "]" ) + count ; }

Target:
public java.lang.String toString ( ) { int count = 0 ; for ( com.android.gallery3d.filtershow.filters.FilterGradRepresentation.Band point : mBands ) { if ( ! ( point.mask ) ) { count ++ ; } } return ( ( ( ( "c=" + ( mBands.indexOf ( mCurrentBand ) ) ) + "[" ) + ( mBands.size ( ) ) ) + "]" ) + count ; }
Source:
public void readByteArray ( byte [ ] dst , int dstOffset , int byteCount ) { libcore.io.Memory.peekByteArray ( ( ( address ) + ( position ) ) , dst , dstOffset , byteCount ) ; position += byteCount ; }

Target:
public void readByteArray ( byte [ ] dst , int dstOffset , int byteCount ) { libcore.io.NioBufferIterator.checkDstBounds ( dstOffset , dst.length , byteCount ) ; file.checkNotClosed ( ) ; libcore.io.NioBufferIterator.checkReadBounds ( position , length , byteCount ) ; libcore.io.Memory.peekByteArray ( ( ( address ) + ( position ) ) , dst , dstOffset , byteCount ) ; position += byteCount ; }
Source:
public static void main ( java.lang.String [ ] args ) { junit.textui.TestRunner.run ( org.bouncycastle.cms.test.NewSignedDataTest.class ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { if ( ( java.security.Security.getProvider ( "BC" ) ) == null ) { java.security.Security.addProvider ( new org.bouncycastle.jce.provider.BouncyCastleProvider ( ) ) ; } org.bouncycastle.cms.test.NewSignedDataTest.init ( ) ; junit.textui.TestRunner.run ( org.bouncycastle.cms.test.NewSignedDataTest.class ) ; }
Source:
public static void computeFma ( android.renderscript.cts.TestFma.ArgumentsFloatFloatFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( float ) ( ( ( ( double ) ( args.inA ) ) * ( ( double ) ( args.inB ) ) ) + ( ( double ) ( args.inC ) ) ) ) ; }

Target:
public static void computeConvert ( android.renderscript.cts.TestConvert.ArgumentsCharUint args ) { args.out = android.renderscript.cts.CoreMathVerifier.convertCharToUint ( args.inV ) ; }
Source:
protected static java.lang.String cstComment ( com.android.jack.dx.dex.code.DalvInsn insn ) { com.android.jack.dx.dex.code.CstInsn ci = ( ( com.android.jack.dx.dex.code.CstInsn ) ( insn ) ) ; if ( ! ( ci.hasIndex ( ) ) ) { return "" ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( 20 ) ; int index = ci.getIndex ( ) ; sb.append ( ci.getConstant ( ) . typeName ( ) ) ; sb.append ( '@' ) ; if ( index < 65536 ) { sb.append ( com.android.jack.dx.util.Hex.u2 ( index ) ) ; } else { sb.append ( com.android.jack.dx.util.Hex.u4 ( index ) ) ; } return sb.toString ( ) ; }

Target:
protected static java.lang.String cstString ( @ javax.annotation.Nonnull com.android.jack.dx.dex.code.DualCstInsn insn ) { return ( ( insn.getFirstConstant ( ) . toHuman ( ) ) + ", " ) + ( insn.getSecondConstant ( ) . toHuman ( ) ) ; }
Source:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.util.ResourceBundle bundle , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr , bundle ) ; }
Source:
public void setUp ( ) { java.security.Provider [ ] providers = java.security.Security.getProviders ( ) ; for ( java.security.Provider p : providers ) { if ( ! ( p.getName ( ) . startsWith ( "AndroidKeyStore" ) ) ) { this . providers.add ( p ) ; } } }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; sun.security.jca.Providers.setMaximumAllowableApiLevelForBcDeprecation ( dalvik.system.VMRuntime.getRuntime ( ) . getTargetSdkVersion ( ) ) ; java.security.Provider [ ] providers = java.security.Security.getProviders ( ) ; for ( java.security.Provider p : providers ) { if ( ! ( p.getName ( ) . startsWith ( "AndroidKeyStore" ) ) ) { this . providers.add ( p ) ; } } }
Source:
static int smear ( int hashCode ) { hashCode ^= ( hashCode > > > 20 ) ^ ( hashCode > > > 12 ) ; return ( hashCode ^ ( hashCode > > > 7 ) ) ^ ( hashCode > > > 4 ) ; }

Target:
static int closedTableSize ( int expectedEntries , double loadFactor ) { expectedEntries = java.lang.Math.max ( expectedEntries , 2 ) ; int tableSize = java.lang.Integer.highestOneBit ( expectedEntries ) ; if ( expectedEntries > ( ( int ) ( loadFactor * tableSize ) ) ) { tableSize <<= 1 ; return tableSize > 0 ? tableSize : com.google.common.collect.Hashing.MAX_TABLE_SIZE ; } return tableSize ; }
Source:
public boolean isEncrypted ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return ( android.bluetooth.BluetoothDevice.sService.getConnectionState ( this ) ) > ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_CONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }

Target:
public boolean isEncrypted ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return ( service.getConnectionState ( this ) ) > ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_CONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }
Source:
private void testRaLifetime ( android.net.apf.ApfTest.TestApfFilter apfFilter , android.net.apf.ApfTest.MockIpManagerCallback ipManagerCallback , java.nio.ByteBuffer packet , int lifetime ) throws android.system.ErrnoException , java.io.IOException { ipManagerCallback.resetApfProgramWait ( ) ; apfFilter.pretendPacketReceived ( packet.array ( ) ) ; ipManagerCallback.getApfProgram ( ) ; verifyRaLifetime ( ipManagerCallback , packet , lifetime ) ; }

Target:
private void testRaLifetime ( android.net.apf.ApfTest.TestApfFilter apfFilter , android.net.apf.ApfTest.MockIpManagerCallback ipManagerCallback , java.nio.ByteBuffer packet , int lifetime ) throws android.system.ErrnoException , java.io.IOException { ipManagerCallback.resetApfProgramWait ( ) ; apfFilter.pretendPacketReceived ( packet.array ( ) ) ; byte [ ] program = ipManagerCallback.getApfProgram ( ) ; verifyRaLifetime ( program , packet , lifetime ) ; }
Source:
public void removeRegistrationListener ( com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mMmTelFeatureConnection.removeRegistrationCallback ( listener ) ; com.android.ims.ImsManager.log ( "Registration Callback/Listener registered." ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "addRegistrationCallback()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public void removeRegistrationListener ( com.android.ims.ImsConnectionStateListener listener ) throws com.android.ims.ImsException { if ( listener == null ) { throw new java.lang.NullPointerException ( "listener can't be null" ) ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { mMmTelFeatureConnection.removeRegistrationCallback ( listener ) ; com.android.ims.ImsManager.log ( "Registration Callback/Listener registered." ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "addRegistrationCallback()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public void releaseRecordingSession ( com.android.tv.InputSessionManager.RecordingSession session ) { mRecordingSessions.remove ( session ) ; session.release ( ) ; if ( com.android.tv.InputSessionManager.DEBUG ) android.util.Log.d ( com.android.tv.InputSessionManager.TAG , ( "Recording session released: " + session ) ) ; }

Target:
public void releaseRecordingSession ( com.android.tv.InputSessionManager.RecordingSession session ) { mRecordingSessions.remove ( session ) ; session.release ( ) ; if ( com.android.tv.InputSessionManager.DEBUG ) android.util.Log.d ( com.android.tv.InputSessionManager.TAG , ( "Recording session released: " + session ) ) ; for ( com.android.tv.InputSessionManager.OnRecordingSessionChangeListener listener : mOnRecordingSessionChangeListeners ) { listener.onRecordingSessionChange ( false , mRecordingSessions.size ( ) ) ; } }
Source:
private void getFolderItemsRequestFromNative ( byte [ ] address , byte scope , long startItem , long endItem , byte numAttr , int [ ] attrIds ) { com.android.bluetooth.avrcp.AvrcpCmd avrcpCmdobj = new com.android.bluetooth.avrcp.AvrcpCmd ( ) ; com.android.bluetooth.avrcp.AvrcpCmd.FolderItemsCmd folderObj = avrcpCmdobj.new com.android.bluetooth.avrcp.FolderItemsCmd ( address , scope , startItem , endItem , numAttr , attrIds ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_GET_FOLDER_ITEMS , 0 , 0 ) ; msg.obj = folderObj ; mHandler.sendMessage ( msg ) ; }

Target:
private void volumeChangeRequestFromNative ( byte [ ] address , int volume , int ctype ) { final com.android.bluetooth.avrcp.Avrcp.AvrcpMessageHandler handler = mHandler ; if ( handler == null ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "volumeChangeRequestFromNative: mHandler is already null" ) ; return ; } android.os.Message msg = handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_NATIVE_REQ_VOLUME_CHANGE , volume , ctype ) ; android.os.Bundle data = new android.os.Bundle ( ) ; data.putByteArray ( "BdAddress" , address ) ; msg.setData ( data ) ; handler.sendMessage ( msg ) ; }
Source:
public boolean test ( com.google.doclava.MethodInfo test ) { if ( ( test.isHiddenOrRemoved ( ) ) || ( test.containingClass ( ) . isHiddenOrRemoved ( ) ) ) { return false ; } final java.lang.String testApi = com.google.doclava.Stubs.writeMethodApiWithoutDefault ( test ) ; return api.equals ( testApi ) ; }

Target:
public boolean test ( com.google.doclava.MemberInfo test ) { return ( wrapped.test ( test ) ) && ( com.google.doclava.Stubs.writeMethodApiWithoutDefault ( ( ( com.google.doclava.MethodInfo ) ( test ) ) ) . equals ( methodRaw ) ) ; }
Source:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { for ( java.lang.String multiValue : multiValues ) { if ( multiValue.equals ( value ) ) { return true ; } } mergingReport.addError ( java.lang.String.format ( ( "Invalid value for attribute %1$s at %2$s, value=(%3$s), " + "acceptable values are (%4$s)" ) , attribute.getId ( ) , attribute.printPosition ( ) , value , allValues ) ) ; return false ; }

Target:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { for ( java.lang.String multiValue : multiValues ) { if ( multiValue.equals ( value ) ) { return true ; } } attribute.addMessage ( mergingReport , MergingReport.Record.Severity.ERROR , java.lang.String.format ( ( "Invalid value for attribute %1$s at %2$s, value=(%3$s), " + "acceptable values are (%4$s)" ) , attribute.getId ( ) , attribute.printPosition ( ) , value , allValues ) ) ; return false ; }
Source:
private static java.lang.String getFingerprint ( java.security.cert.X509Certificate cert ) throws java.security.NoSuchAlgorithmException { java.security.MessageDigest dgst = java.security.MessageDigest.getInstance ( "SHA512" ) ; byte [ ] encoded = cert.getPublicKey ( ) . getEncoded ( ) ; byte [ ] fingerprint = dgst.digest ( encoded ) ; return org.conscrypt.IntegralToString.bytesToHexString ( fingerprint , false ) ; }

Target:
private static java.lang.String getFingerprint ( java.security.cert.X509Certificate cert ) throws java.security.NoSuchAlgorithmException { java.security.MessageDigest dgst = java.security.MessageDigest.getInstance ( "SHA512" ) ; byte [ ] encoded = cert.getPublicKey ( ) . getEncoded ( ) ; byte [ ] fingerprint = dgst.digest ( encoded ) ; return org.conscrypt.Hex.bytesToHexString ( fingerprint ) ; }
Source:
protected void syncWithStore ( ) { com.intellij.util.io.PagedFileStorage pagedFileStorage = btree.storage.getPagedFileStorage ( ) ; myAddressInBuffer = pagedFileStorage.getOffsetInPage ( address ) ; myBuffer = pagedFileStorage.getByteBuffer ( address , false ) ; myIsDirty = false ; doInitFlags ( myBuffer.getInt ( myAddressInBuffer ) ) ; }

Target:
protected void syncWithStore ( ) { com.intellij.util.io.PagedFileStorage pagedFileStorage = btree.storage.getPagedFileStorage ( ) ; myAddressInBuffer = pagedFileStorage.getOffsetInPage ( address ) ; myBufferWrapper = pagedFileStorage.getByteBuffer ( address , false ) ; myBuffer = myBufferWrapper.getCachedBuffer ( ) ; myIsDirty = false ; doInitFlags ( myBuffer.getInt ( myAddressInBuffer ) ) ; }
Source:
private java.lang.String format ( double number , android.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; ruleSet.format ( number , result , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }

Target:
private java.lang.String format ( double number , android.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; if ( ( getRoundingMode ( ) ) != ( android.icu.math.BigDecimal.ROUND_UNNECESSARY ) ) { number = new android.icu.math.BigDecimal ( java.lang.Double.toString ( number ) ) . setScale ( getMaximumFractionDigits ( ) , roundingMode ) . doubleValue ( ) ; } ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }
Source:
public void onAbort ( ) { com.android.services.telephony.Log.v ( this , "onAbort" ) ; hangup ( android.telephony.DisconnectCause.LOCAL ) ; }

Target:
protected final void updateConnectionCapabilities ( ) { int newCapabilities = buildConnectionCapabilities ( ) ; newCapabilities = applyOriginalConnectionCapabilities ( newCapabilities ) ; newCapabilities = changeBitmask ( newCapabilities , com.android.services.telephony.CAPABILITY_CAN_PAUSE_VIDEO , ( ( mIsVideoPauseSupported ) && ( isVideoCapable ( ) ) ) ) ; newCapabilities = changeBitmask ( newCapabilities , com.android.services.telephony.CAPABILITY_CAN_PULL_CALL , ( ( isExternalConnection ( ) ) && ( isPullable ( ) ) ) ) ; newCapabilities = applyConferenceTerminationCapabilities ( newCapabilities ) ; if ( ( getConnectionCapabilities ( ) ) != newCapabilities ) { setConnectionCapabilities ( newCapabilities ) ; } }
Source:
public void runTest ( final com.android.cts.TestDevice device , final com.android.cts.Test test ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException , com.android.cts.InvalidApkPathException , com.android.cts.InvalidNameSpaceException { if ( test == null ) { return ; } mTestStop = false ; mIsInBatchMode = false ; println ( com.android.cts.TestPackage.PKG_LOG_SEPARATOR ) ; println ( ( "Test package: " + ( getAppPackageName ( ) ) ) ) ; setTestDevice ( device ) ; runTestImpl ( test ) ; }

Target:
public void runTest ( final com.android.cts.TestDevice device , final com.android.cts.Test test , android.annotation.cts.Profile profile ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException , com.android.cts.InvalidApkPathException , com.android.cts.InvalidNameSpaceException { if ( test == null ) { return ; } mTestStop = false ; mIsInBatchMode = false ; println ( com.android.cts.TestPackage.PKG_LOG_SEPARATOR ) ; println ( ( "Test package: " + ( getAppPackageName ( ) ) ) ) ; setTestDevice ( device ) ; runTestImpl ( test , profile ) ; }
Source:
public boolean isAssociated ( Value value , final int inputId ) { final java.lang.Object input = getInput ( value ) ; if ( input instanceof com.intellij.util.indexing.TIntHashSet ) { return ( ( com.intellij.util.indexing.TIntHashSet ) ( input ) ) . contains ( inputId ) ; } if ( input instanceof java.lang.Integer ) { return inputId == ( ( ( java.lang.Integer ) ( input ) ) . intValue ( ) ) ; } if ( input instanceof com.intellij.util.indexing.ValueContainerImpl.IdBitSet ) { return ( ( com.intellij.util.indexing.ValueContainerImpl.IdBitSet ) ( input ) ) . get ( inputId ) ; } return false ; }

Target:
public java.lang.Object getFileSetObject ( ) { return myInputIdMappingValue ; }
Source:
public void test_isReachable_by_ICMP ( ) throws java.lang.Exception { java.net.InetAddress [ ] inetAddresses = java.net.InetAddress.getAllByName ( "www.google.com" ) ; for ( java.net.InetAddress ia : inetAddresses ) { assertTrue ( ia.isReachableByICMP ( ( 5 * 1000 ) ) ) ; } final java.net.InetAddress blackholeAddress = java.net.InetAddress.getByName ( "100::1" ) ; assertFalse ( blackholeAddress.isReachable ( 1000 ) ) ; }

Target:
public void test_isReachable_by_ICMP ( ) throws java.lang.Exception { java.net.InetAddress [ ] inetAddresses = java.net.InetAddress.getAllByName ( "www.google.com" ) ; for ( java.net.InetAddress ia : inetAddresses ) { org.junit.Assert.assertTrue ( ia.isReachableByICMP ( ( 5 * 1000 ) ) ) ; } final java.net.InetAddress blackholeAddress = java.net.InetAddress.getByName ( "100::1" ) ; org.junit.Assert.assertFalse ( blackholeAddress.isReachable ( 1000 ) ) ; }
Source:
public void onLooperPrepared ( ) { mCTUT = new com.android.internal.telephony.imsphone.ImsPhoneCallTracker ( mImsPhone ) ; setReady ( true ) ; }

Target:
public void onLooperPrepared ( ) { mCTUT = new com.android.internal.telephony.imsphone.ImsPhoneCallTracker ( mImsPhone ) ; mCTUT.addReasonCodeRemapping ( null , "Wifi signal lost." , ImsReasonInfo.CODE_WIFI_LOST ) ; mCTUT.addReasonCodeRemapping ( 501 , "Call answered elsewhere." , ImsReasonInfo.CODE_ANSWERED_ELSEWHERE ) ; mCTUT.addReasonCodeRemapping ( 510 , "Call answered elsewhere." , ImsReasonInfo.CODE_ANSWERED_ELSEWHERE ) ; setReady ( true ) ; }
Source:
android.icu.text.DecimalFormat getDecimalFormat ( ) { if ( ( decimalFormat ) == null ) { decimalFormat = ( ( android.icu.text.DecimalFormat ) ( android.icu.text.NumberFormat.getInstance ( locale ) ) ) ; if ( ( decimalFormatSymbols ) != null ) { decimalFormat.setDecimalFormatSymbols ( decimalFormatSymbols ) ; } } return decimalFormat ; }

Target:
android.icu.text.DecimalFormat getDecimalFormat ( ) { if ( ( decimalFormat ) == null ) { java.lang.String pattern = getPattern ( locale , android.icu.text.NUMBERSTYLE ) ; decimalFormat = new android.icu.text.DecimalFormat ( pattern , getDecimalFormatSymbols ( ) ) ; } return decimalFormat ; }
Source:
public static java.util.concurrent.ScheduledExecutorService getExitingScheduledExecutorService ( java.util.concurrent.ScheduledThreadPoolExecutor executor , long terminationTimeout , java.util.concurrent.TimeUnit timeUnit ) { executor.setThreadFactory ( new com.google.common.util.concurrent.ThreadFactoryBuilder ( ) . setDaemon ( true ) . setThreadFactory ( executor.getThreadFactory ( ) ) . build ( ) ) ; java.util.concurrent.ScheduledExecutorService service = java.util.concurrent.Executors.unconfigurableScheduledExecutorService ( executor ) ; com.google.common.util.concurrent.MoreExecutors.addDelayedShutdownHook ( service , terminationTimeout , timeUnit ) ; return service ; }

Target:
private static void useDaemonThreadFactory ( java.util.concurrent.ThreadPoolExecutor executor ) { executor.setThreadFactory ( new com.google.common.util.concurrent.ThreadFactoryBuilder ( ) . setDaemon ( true ) . setThreadFactory ( executor.getThreadFactory ( ) ) . build ( ) ) ; }
Source:
public void test_SSL_check_private_key_cert_then_key ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }

Target:
public void test_SSL_check_private_key_key_then_cert ( ) throws java.lang.Exception { long c = org.conscrypt.NativeCrypto.SSL_CTX_new ( ) ; long s = org.conscrypt.NativeCrypto.SSL_new ( c ) ; org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , org.conscrypt.NativeCryptoTest.getServerPrivateKey ( ) . getPkeyContext ( ) ) ; try { org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; fail ( ) ; } catch ( javax.net.ssl.SSLException expected ) { } org.conscrypt.NativeCrypto.SSL_use_certificate ( s , org.conscrypt.NativeCryptoTest.getServerCertificates ( ) ) ; org.conscrypt.NativeCrypto.SSL_check_private_key ( s ) ; org.conscrypt.NativeCrypto.SSL_free ( s ) ; org.conscrypt.NativeCrypto.SSL_CTX_free ( c ) ; }
Source:
protected java.lang.String getDisplaySubject ( ) { java.lang.String name = ( ( internalCustomName ( ) ) == null ) ? "" : ( "\"" + ( internalCustomName ( ) ) ) + "\" " ; return ( ( name + "<" ) + ( getSubject ( ) . getName ( ) ) ) + ">" ; }

Target:
public com.google.common.truth.StringSubject textSymbolFile ( ) throws java.io.IOException { java.io.InputStream stream = getInputStream ( "R.txt" ) ; return new com.google.common.truth.StringSubject ( failureStrategy , com.google.common.io.CharStreams.toString ( new java.io.InputStreamReader ( stream , com.google.common.base.Charsets.UTF_8 ) ) ) ; }
Source:
private void blockingCallSpeak ( java.lang.String speech , com.android.speech.tts.MockableTextToSpeechService.IDelegate mock ) throws java.lang.InterruptedException { final java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.speech.tts.TextToSpeechTests.doCountDown ( latch ) . when ( mock ) . onSynthesizeText ( com.google.testing.littlemock.LittleMock.< android.speech.tts.SynthesisRequest > anyObject ( ) , com.google.testing.littlemock.LittleMock.< android.speech.tts.SynthesisCallback > anyObject ( ) ) ; mTts.speak ( speech , TextToSpeech.QUEUE_ADD , null ) ; com.android.speech.tts.TextToSpeechTests.awaitCountDown ( latch , 5 , java.util.concurrent.TimeUnit.SECONDS ) ; }

Target:
private void blockingCallSpeak ( java.lang.String speech , com.android.speech.tts.MockableTextToSpeechService.IDelegate mock ) throws java.lang.InterruptedException { final java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.speech.tts.TextToSpeechTests.doCountDown ( latch ) . when ( mock ) . onSynthesizeText ( org.mockito.Mockito.< android.speech.tts.SynthesisRequest > anyObject ( ) , org.mockito.Mockito.< android.speech.tts.SynthesisCallback > anyObject ( ) ) ; mTts.speak ( speech , TextToSpeech.QUEUE_ADD , null ) ; com.android.speech.tts.TextToSpeechTests.awaitCountDown ( latch , 5 , java.util.concurrent.TimeUnit.SECONDS ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { int [ ] a = new int [ 5 ] ; a = Main.bar ( a ) ; if ( ( a.length ) != 0 ) { throw new java.lang.Error ( ( "Expected 0, got " + ( a.length ) ) ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { int [ ] a = new int [ 5 ] ; int [ ] result = Main.bar ( a ) ; if ( ( result.length ) != 0 ) { throw new java.lang.Error ( ( "Expected 0, got " + ( result.length ) ) ) ; } result = Main.foo ( a ) ; if ( ( result.length ) != 4 ) { throw new java.lang.Error ( ( "Expected 5, got " + ( result.length ) ) ) ; } }
Source:
protected static void validateSelectedCipherSuite ( int selectedCipherSuite , short alertDescription ) throws java.io.IOException { switch ( selectedCipherSuite ) { case CipherSuite.TLS_RSA_EXPORT_WITH_RC4_40_MD5 : case CipherSuite.TLS_RSA_WITH_RC4_128_MD5 : case CipherSuite.TLS_RSA_WITH_RC4_128_SHA : case CipherSuite.TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 : case CipherSuite.TLS_DH_anon_WITH_RC4_128_MD5 : case CipherSuite.TLS_PSK_WITH_RC4_128_SHA : case CipherSuite.TLS_DHE_PSK_WITH_RC4_128_SHA : case CipherSuite.TLS_RSA_PSK_WITH_RC4_128_SHA : case CipherSuite.TLS_ECDH_ECDSA_WITH_RC4_128_SHA : case CipherSuite.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA : case CipherSuite.TLS_ECDH_RSA_WITH_RC4_128_SHA : case CipherSuite.TLS_ECDHE_RSA_WITH_RC4_128_SHA : case CipherSuite.TLS_ECDH_anon_WITH_RC4_128_SHA : throw new java.lang.IllegalStateException ( "RC4 MUST NOT be used with DTLS" ) ; } }

Target:
protected static void validateSelectedCipherSuite ( int selectedCipherSuite , short alertDescription ) throws java.io.IOException { switch ( org.bouncycastle.crypto.tls.TlsUtils.getEncryptionAlgorithm ( selectedCipherSuite ) ) { case EncryptionAlgorithm.RC4_40 : case EncryptionAlgorithm.RC4_128 : throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( alertDescription ) ; } }
Source:
public < E extends T > com.google.common.collect.ImmutableList < E > immutableSortedCopy ( java.lang.Iterable < E > iterable ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E [ ] elements = ( ( E [ ] ) ( com.google.common.collect.Iterables.toArray ( iterable ) ) ) ; for ( E e : elements ) { com.google.common.base.Preconditions.checkNotNull ( e ) ; } java.util.Arrays.sort ( elements , this ) ; return com.google.common.collect.ImmutableList.asImmutableList ( elements ) ; }

Target:
public < E extends T > java.util.List < E > sortedCopy ( java.lang.Iterable < E > elements ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E [ ] array = ( ( E [ ] ) ( com.google.common.collect.Iterables.toArray ( elements ) ) ) ; java.util.Arrays.sort ( array , this ) ; return com.google.common.collect.Lists.newArrayList ( java.util.Arrays.asList ( array ) ) ; }