auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testLambdaClassConstructor ( ) throws java.lang.Exception { java.lang.Class < ? > anonymousClass = getLambdaClassWith1ParameterConstructor ( ) ; java.lang.reflect.Constructor < ? > constructor = anonymousClass.getDeclaredConstructor ( libcore.java.lang.reflect.ParameterTest.class ) ; libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( constructor ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( "[libcore.java.lang.reflect.ParameterTest arg0]" ) . checkParametersMetadataNotAvailable ( ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( libcore.java.lang.reflect.ParameterTest.class ) . checkGetParameterizedType ( "class libcore.java.lang.reflect.ParameterTest" ) ; }

Target:
public void testLambdaClassConstructor ( ) throws java.lang.Exception { java.lang.Class < ? > outerClass = libcore.java.lang.reflect.ParameterTest.class ; java.lang.Class < ? > innerClass = getLambdaClassWith1ParameterConstructor ( ) ; java.lang.reflect.Constructor < ? > constructor = innerClass.getDeclaredConstructor ( outerClass ) ; checkLambdaClassConstructor ( outerClass , constructor ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_noroot s = new com.android.rs.test.ScriptC_noroot ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_foo ( A , A ) ; s.invoke_verify_foo ( ) ; s.invoke_noroot_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_noroot s = new com.android.rs.test.ScriptC_noroot ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_foo ( A , A ) ; s.invoke_verify_foo ( ) ; s.invoke_noroot_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }
Source:
private java.lang.String getFileName ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode node ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository repository = com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.get ( ) ; java.lang.String fqn = repository.getFullClassName ( ( ( org.w3c.dom.Element ) ( node.getXmlNode ( ) ) ) ) ; return ( fqn.substring ( ( ( fqn.lastIndexOf ( '.' ) ) + 1 ) ) ) + ( com.android.ide.eclipse.adt.AndroidConstants.DOT_PNG ) ; }

Target:
private java.lang.String getFileName ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode node ) { com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository repository = com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepository.get ( ) ; java.lang.String fqn = repository.getFullClassName ( ( ( org.w3c.dom.Element ) ( node.getXmlNode ( ) ) ) ) ; return ( fqn.substring ( ( ( fqn.lastIndexOf ( '.' ) ) + 1 ) ) ) + ( com.android.ide.eclipse.adt.AdtConstants.DOT_PNG ) ; }
Source:
static void getUsage ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass , java.lang.StringBuilder usage ) { com.google.devtools.common.options.OptionsData data = com.google.devtools.common.options.OptionsParser.getOptionsDataInternal ( optionsClass ) ; java.util.List < com.google.devtools.common.options.OptionDefinition > optionDefinitions = new java.util.ArrayList ( data.getOptionDefinitionsFromClass ( optionsClass ) ) ; optionDefinitions.sort ( OptionDefinition.BY_OPTION_NAME ) ; for ( com.google.devtools.common.options.OptionDefinition optionDefinition : optionDefinitions ) { com.google.devtools.common.options.OptionsUsage.getUsage ( optionDefinition , usage , OptionsParser.HelpVerbosity.LONG , data ) ; } }

Target:
static void getUsage ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass , java.lang.StringBuilder usage ) { com.google.devtools.common.options.OptionsData data = com.google.devtools.common.options.OptionsParser.getOptionsDataInternal ( optionsClass ) ; java.util.List < com.google.devtools.common.options.OptionDefinition > optionDefinitions = new java.util.ArrayList ( com.google.devtools.common.options.OptionsData.getAllOptionDefinitionsForClass ( optionsClass ) ) ; optionDefinitions.sort ( OptionDefinition.BY_OPTION_NAME ) ; for ( com.google.devtools.common.options.OptionDefinition optionDefinition : optionDefinitions ) { com.google.devtools.common.options.OptionsUsage.getUsage ( optionDefinition , usage , OptionsParser.HelpVerbosity.LONG , data ) ; } }
Source:
private boolean ungrant ( byte [ ] key , byte [ ] uid ) { execute ( 'y' , key , uid ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; }

Target:
public boolean verify ( java.lang.String key , byte [ ] data , byte [ ] signature ) { try { return ( mBinder.verify ( key , data , signature ) ) == ( 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:
public char [ ] formatBigInteger ( java.math.BigInteger value , java.text.FieldPosition field ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator fpi = libcore.icu.NativeDecimalFormat.FieldPositionIterator.forFieldPosition ( field ) ; char [ ] result = libcore.icu.NativeDecimalFormat.formatDigitList ( this . address , value.toString ( 10 ) , fpi ) ; if ( fpi != null ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator.setFieldPosition ( fpi , field ) ; } return result ; }

Target:
public char [ ] formatLong ( long value , java.text.FieldPosition field ) { libcore.icu.NativeDecimalFormat.FieldPositionIterator fpi = libcore.icu.NativeDecimalFormat.FieldPositionIterator.forFieldPosition ( field ) ; char [ ] result = libcore.icu.NativeDecimalFormat.formatLong ( this . address , value , fpi ) ; if ( ( fpi != null ) && ( field != null ) ) { libcore.icu.NativeDecimalFormat.updateFieldPosition ( field , fpi ) ; } return result ; }
Source:
public void testValidMinorDistroVersion_newer ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; libcore.tzdata.shared2.DistroVersion newMajorDistroVersion = new libcore.tzdata.shared2.DistroVersion ( libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , ( ( libcore.tzdata.shared2.DistroVersion.CURRENT_FORMAT_MINOR_VERSION ) + 1 ) , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; libcore.tzdata.shared2.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( newMajorDistroVersion ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distro ) ; }

Target:
public void testValidMinorDistroVersion_newer ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion newMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION , ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION ) + 1 ) , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( newMajorDistroVersion ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDeviceDirContainsDistro ( dataCurrentDir , distro ) ; }
Source:
public void registerUidObserver ( android.app.IUidObserver observer ) { enforceCallingPermission ( android.Manifest.permission.SET_ACTIVITY_WATCHER , "registerUidObserver()" ) ; synchronized ( this ) { mUidObservers.register ( observer ) ; } }

Target:
private void startPersistentApps ( int matchFlags ) { if ( ( mFactoryTest ) == ( android.os.FactoryTest.FACTORY_TEST_LOW_LEVEL ) ) return ; synchronized ( this ) { try { final java.util.List < android.content.pm.ApplicationInfo > apps = android.app.AppGlobals.getPackageManager ( ) . getPersistentApplications ( ( ( com.android.server.am.ActivityManagerService.STOCK_PM_FLAGS ) | matchFlags ) ) . getList ( ) ; for ( android.content.pm.ApplicationInfo app : apps ) { if ( ! ( "android" . equals ( app.packageName ) ) ) { addAppLocked ( app , false , null ) ; } } } catch ( android.os.RemoteException ex ) { } } }
Source:
public void getLastDataCallFailCause ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void getPreferredVoicePrivacy ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE , result , mRILDefaultWorkSource ) ; send ( rr ) ; }
Source:
private void stopListeningForCalls ( ) { resetImsCapabilities ( ) ; if ( ( mImsManager ) != null ) { try { mImsManager.getConfigInterface ( ) . removeConfigCallback ( mConfigCallback ) ; } catch ( com.android.ims.ImsException e ) { android.util.Log.w ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.LOG_TAG , "stopListeningForCalls: unable to remove config callback." ) ; } mImsManager.close ( ) ; } }

Target:
private void stopListeningForCalls ( ) { log ( "stopListeningForCalls" ) ; resetImsCapabilities ( ) ; if ( ( mImsManager ) != null ) { try { mImsManager.getConfigInterface ( ) . removeConfigCallback ( mConfigCallback ) ; } catch ( com.android.ims.ImsException e ) { android.util.Log.w ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.LOG_TAG , "stopListeningForCalls: unable to remove config callback." ) ; } mImsManager.close ( ) ; } }
Source:
public static java.lang.String retrieveJavaTimeFieldValueName ( java.lang.String id , int field , int value , int style , java.util.Locale locale ) { sun.util.locale.provider.LocaleServiceProviderPool pool = sun.util.locale.provider.LocaleServiceProviderPool.getPool ( java.util.spi.CalendarNameProvider.class ) ; java.lang.String name ; name = pool.getLocalizedObject ( sun.util.locale.provider.CalendarDataUtility.CalendarFieldValueNameGetter.INSTANCE , locale , sun.util.locale.provider.CalendarDataUtility.normalizeCalendarType ( id ) , field , value , style , true ) ; if ( name == null ) { name = pool.getLocalizedObject ( sun.util.locale.provider.CalendarDataUtility.CalendarFieldValueNameGetter.INSTANCE , locale , sun.util.locale.provider.CalendarDataUtility.normalizeCalendarType ( id ) , field , value , style , false ) ; } return name ; }

Target:
public static java.lang.String retrieveFieldValueName ( java.lang.String id , int field , int value , int style , java.util.Locale locale ) { return null ; }
Source:
private void notifyInterfaceStatusChanged ( java.lang.String iface , boolean up ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . interfaceStatusChanged ( iface , up ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void invokeForAllObservers ( com.android.server.NetworkManagementService.NetworkManagementEventCallback eventCallback ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { eventCallback.sendCallback ( mObservers.getBroadcastItem ( i ) ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }
Source:
public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { if ( ( existingDesc == null ) || ( ! ( getType ( ) . equals ( existingDesc.getType ( ) ) ) ) ) { return false ; } int diff = version.compareTo ( existingDesc.getAndroidVersion ( ) ) ; return ( diff > 0 ) || ( ( diff == 0 ) && ( ( revision.compareTo ( existingDesc.getMajorRevision ( ) ) ) > 0 ) ) ; }

Target:
public boolean isUpdateFor ( com.android.sdklib.repository.descriptors.PkgDesc thisPkgDesc , com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { if ( ( existingDesc == null ) || ( ! ( thisPkgDesc.getType ( ) . equals ( existingDesc.getType ( ) ) ) ) ) { return false ; } int diff = thisPkgDesc.getAndroidVersion ( ) . compareTo ( existingDesc.getAndroidVersion ( ) ) ; return ( diff > 0 ) || ( ( diff == 0 ) && ( ( thisPkgDesc.getMajorRevision ( ) . compareTo ( existingDesc.getMajorRevision ( ) ) ) > 0 ) ) ; }
Source:
static com.android.builder.resources.ResourceSet getBaseResourceSet ( ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { if ( ( com.android.builder.resources.ResourceSetTest.sBaseResourceSet ) == null ) { java.io.File root = com.android.builder.TestUtils.getRoot ( "resources" , "baseSet" ) ; com.android.builder.resources.ResourceSetTest.sBaseResourceSet = new com.android.builder.resources.ResourceSet ( "main" ) ; com.android.builder.resources.ResourceSetTest.sBaseResourceSet.addSource ( root ) ; com.android.builder.resources.ResourceSetTest.sBaseResourceSet.loadFromFiles ( ) ; } return com.android.builder.resources.ResourceSetTest.sBaseResourceSet ; }

Target:
static com.android.builder.resources.ResourceSet getBaseResourceSet ( ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { if ( ( com.android.builder.resources.ResourceSetTest.sBaseResourceSet ) == null ) { java.io.File root = com.android.builder.TestUtils.getRoot ( "resources" , "baseSet" ) ; com.android.builder.resources.ResourceSetTest.sBaseResourceSet = new com.android.builder.resources.ResourceSet ( "main" ) ; com.android.builder.resources.ResourceSetTest.sBaseResourceSet.addSource ( root ) ; com.android.builder.resources.RecordingLogger logger = new com.android.builder.resources.RecordingLogger ( ) ; com.android.builder.resources.ResourceSetTest.sBaseResourceSet.loadFromFiles ( logger ) ; checkLogger ( logger ) ; } return com.android.builder.resources.ResourceSetTest.sBaseResourceSet ; }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { com.google.common.base.Preconditions.checkArgument ( com.google.devtools.build.android.desugar.BitFlags.isSet ( access , Opcodes.ACC_INTERFACE ) ) ; com.google.common.base.Preconditions.checkState ( ( ( stubbedInterfaceName ) == null ) ) ; stubbedInterfaceName = name ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { com.google.common.base.Preconditions.checkArgument ( com.google.devtools.build.android.desugar.io.BitFlags.isSet ( access , Opcodes.ACC_INTERFACE ) ) ; com.google.common.base.Preconditions.checkState ( ( ( stubbedInterfaceName ) == null ) ) ; stubbedInterfaceName = name ; }
Source:
public static com.android.bluetooth.avrcp.Metadata toMetadata ( android.media.session.MediaSession.QueueItem item ) { if ( item == null ) { return com.android.bluetooth.avrcp.Util.empty_data ( ) ; } android.os.Bundle bundle = com.android.bluetooth.avrcp.Util.descriptionToBundle ( item.getDescription ( ) ) ; if ( com.android.bluetooth.avrcp.Util.DEBUG ) { for ( java.lang.String key : bundle.keySet ( ) ) { android.util.Log.d ( com.android.bluetooth.avrcp.Util.TAG , ( "toMetadata: QueueItem: ContainsKey: " + key ) ) ; } } com.android.bluetooth.avrcp.Metadata ret = com.android.bluetooth.avrcp.Util.bundleToMetadata ( bundle ) ; ret.mediaId = "NowPlayingId" + ( item.getQueueId ( ) ) ; return ret ; }

Target:
public static com.android.bluetooth.avrcp.Metadata toMetadata ( android.media.session.MediaSession.QueueItem item ) { if ( item == null ) { return com.android.bluetooth.avrcp.Util.empty_data ( ) ; } android.os.Bundle bundle = com.android.bluetooth.avrcp.Util.descriptionToBundle ( item.getDescription ( ) ) ; if ( com.android.bluetooth.avrcp.Util.DEBUG ) { for ( java.lang.String key : bundle.keySet ( ) ) { android.util.Log.d ( com.android.bluetooth.avrcp.Util.TAG , ( "toMetadata: QueueItem: ContainsKey: " + key ) ) ; } } com.android.bluetooth.avrcp.Metadata ret = com.android.bluetooth.avrcp.Util.bundleToMetadata ( bundle ) ; ret.mediaId = ( com.android.bluetooth.avrcp.Util.NOW_PLAYING_PREFIX ) + ( item.getQueueId ( ) ) ; return ret ; }
Source:
private void setNewPhone ( com.android.internal.telephony.PhoneBase phone ) { mCurrentPhone = phone ; if ( phone instanceof com.android.internal.telephony.gsm.GSMPhone ) { if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "New phone is GSMPhone" ) ; updateCurrentCard ( IccCard.CARD_IS_3GPP ) ; } else if ( phone instanceof com.android.internal.telephony.cdma.CDMALTEPhone ) { if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "New phone type is CDMALTEPhone" ) ; updateCurrentCard ( IccCard.CARD_IS_3GPP ) ; } else if ( phone instanceof com.android.internal.telephony.cdma.CDMAPhone ) { if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "New phone type is CDMAPhone" ) ; updateCurrentCard ( IccCard.CARD_IS_NOT_3GPP ) ; } else { android.util.Log.e ( com.android.internal.telephony.uicc.UiccController.LOG_TAG , "Unhandled phone type. Critical error!" ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.internal.telephony.uicc.UiccController.EVENT_ICC_STATUS_CHANGED : if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "Received EVENT_ICC_STATUS_CHANGED, calling getIccCardStatus" ) ; mCi.getIccCardStatus ( obtainMessage ( com.android.internal.telephony.uicc.UiccController.EVENT_GET_ICC_STATUS_DONE ) ) ; break ; case com.android.internal.telephony.uicc.UiccController.EVENT_GET_ICC_STATUS_DONE : if ( com.android.internal.telephony.uicc.UiccController.DBG ) log ( "Received EVENT_GET_ICC_STATUS_DONE" ) ; android.os.AsyncResult ar = ( ( android.os.AsyncResult ) ( msg.obj ) ) ; onGetIccCardStatusDone ( ar ) ; break ; default : android.util.Log.e ( com.android.internal.telephony.uicc.UiccController.LOG_TAG , ( " Unknown Event " + ( msg.what ) ) ) ; } }
Source:
public boolean setNetworkSelectionModeManual ( int subId , com.android.internal.telephony.OperatorInfo operator , boolean persistSelection ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setNetworkSelectionModeManual ( subId , operator , persistSelection ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual NPE" , ex ) ; } return false ; }

Target:
public android.telephony.ims.aidl.IImsRegistration getImsRegistration ( int slotIndex , int feature ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsRegistration ( slotIndex , feature ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsRegistration, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
public void testKeyStore_ContainsAliases_CAOnly_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should contain added CA certificate" , mKeyStore.containsAlias ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ) ; }

Target:
public void testKeyStore_ContainsAliases_CAOnly_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ) , android.security.AndroidKeyStoreTest.FAKE_RSA_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should contain added CA certificate" , mKeyStore.containsAlias ( android.security.AndroidKeyStoreTest.TEST_ALIAS_2 ) ) ; }
Source:
public int hashCode ( ) { return ( singleKey.hashCode ( ) ) ^ ( singleValue.hashCode ( ) ) ; }

Target:
public com.google.common.collect.ImmutableBiMap < V , K > inverse ( ) { com.google.common.collect.ImmutableBiMap < V , K > result = inverse ; if ( result == null ) { return inverse = new com.google.common.collect.SingletonImmutableBiMap < V , K > ( singleValue , singleKey , this ) ; } else { return result ; } }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , byte [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , data.length ) ; }

Target:
private void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , java.lang.Object array , android.support.v8.renderscript.Element.DataType dt , int arrayLen ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , array , ( arrayLen * ( dt.mSize ) ) , dt ) ; }
Source:
public void conference ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CONFERENCE , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void hangupForegroundResumeBackground ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilHangup ( mInstanceId , rr.mSerial , ( - 1 ) ) ; send ( rr ) ; }
Source:
public void tearDown ( ) { com.android.dialer.common.LogUtil.d ( "InCallPresenter.tearDown" , "tearDown" ) ; mCallList.clearOnDisconnect ( ) ; mServiceConnected = false ; mContext.getSystemService ( android.telephony.TelephonyManager.class ) . listen ( mPhoneStateListener , PhoneStateListener.LISTEN_NONE ) ; attemptCleanup ( ) ; com.android.incallui.VideoPauseController.getInstance ( ) . tearDown ( ) ; }

Target:
public void tearDown ( ) { com.android.dialer.common.LogUtil.d ( "InCallPresenter.tearDown" , "tearDown" ) ; mCallList.clearOnDisconnect ( ) ; mServiceConnected = false ; mContext.getSystemService ( android.telephony.TelephonyManager.class ) . listen ( mPhoneStateListener , PhoneStateListener.LISTEN_NONE ) ; attemptCleanup ( ) ; com.android.incallui.VideoPauseController.getInstance ( ) . tearDown ( ) ; com.android.incallui.audiomode.AudioModeProvider.getInstance ( ) . removeListener ( this ) ; }
Source:
protected void tearDown ( ) { if ( notExist.exists ( ) ) { notExist.delete ( ) ; } if ( fileWithContent.exists ( ) ) { fileWithContent.delete ( ) ; } if ( readOnly.exists ( ) ) { readOnly.delete ( ) ; } if ( secret.exists ( ) ) { secret.delete ( ) ; } java.util.TimeZone.setDefault ( defaultTimeZone ) ; }

Target:
protected void tearDown ( ) { if ( notExist.exists ( ) ) { notExist.delete ( ) ; } if ( fileWithContent.exists ( ) ) { fileWithContent.delete ( ) ; } if ( readOnly.exists ( ) ) { readOnly.delete ( ) ; } if ( secret.exists ( ) ) { secret.delete ( ) ; } java.util.Locale.setDefault ( defaultLocale ) ; java.util.TimeZone.setDefault ( defaultTimeZone ) ; }
Source:
public void finish ( vogar.Outcome outcome ) { vogar.commands.Command command = currentCommand ; if ( ( command != null ) && ( ( run.smallTimeoutSeconds ) != 0 ) ) { command.scheduleTimeout ( run.smallTimeoutSeconds ) ; } lastFinishedOutcome = toQualifiedOutcomeName ( outcome.getName ( ) ) ; run.driver.recordOutcome ( new vogar.Outcome ( lastFinishedOutcome , outcome.getResult ( ) , outcome.getOutputLines ( ) ) ) ; }

Target:
public void finish ( vogar.Outcome outcome ) { vogar.commands.Command command = currentCommand ; if ( ( command != null ) && ( ( timeoutSeconds ) != 0 ) ) { command.scheduleTimeout ( timeoutSeconds ) ; } lastFinishedOutcome = toQualifiedOutcomeName ( outcome.getName ( ) ) ; run.driver.recordOutcome ( new vogar.Outcome ( lastFinishedOutcome , outcome.getResult ( ) , outcome.getOutputLines ( ) ) ) ; }
Source:
public java.lang.String getPropertySync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( ) ; executeShellCommand ( java.lang.String.format ( "getprop '%s'" , name ) , receiver , com.android.ddmlib.Device.GETPROP_TIMEOUT ) ; java.lang.String value = receiver.getOutput ( ) . trim ( ) ; if ( value.isEmpty ( ) ) { return null ; } return value ; }

Target:
public java.lang.String getPropertySync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( latch ) ; executeShellCommand ( java.lang.String.format ( "getprop '%s'" , name ) , receiver , com.android.ddmlib.Device.GETPROP_TIMEOUT ) ; try { latch.await ( com.android.ddmlib.Device.GETPROP_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { return null ; } java.lang.String value = receiver.getOutput ( ) . trim ( ) ; if ( value.isEmpty ( ) ) { return null ; } return value ; }
Source:
public static java.lang.String getOtherLabel ( int which ) { switch ( which ) { case 0 : return "Cursor" ; case 1 : return "Ashmem" ; case 2 : return "Other dev" ; case 3 : return ".so mmap" ; case 4 : return ".jar mmap" ; case 5 : return ".apk mmap" ; case 6 : return ".ttf mmap" ; case 7 : return ".dex mmap" ; case 8 : return "Other mmap" ; default : return "????" ; } }

Target:
public static java.lang.String getOtherLabel ( int which ) { switch ( which ) { case 0 : return "Stack" ; case 1 : return "Cursor" ; case 2 : return "Ashmem" ; case 3 : return "Other dev" ; case 4 : return ".so mmap" ; case 5 : return ".jar mmap" ; case 6 : return ".apk mmap" ; case 7 : return ".ttf mmap" ; case 8 : return ".dex mmap" ; case 9 : return "Other mmap" ; default : return "????" ; } }
Source:
private java.lang.String getReportName ( java.lang.String suiteName ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return java.lang.String.format ( "%s-%s-%s-%s-%s-%s" , date , suiteName , Build.MANUFACTURER , Build.PRODUCT , Build.DEVICE , Build.ID ) ; }

Target:
private java.lang.String getReportName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return java.lang.String.format ( "%s-%s-%s-%s-%s" , date , Build.MANUFACTURER , Build.PRODUCT , Build.DEVICE , Build.ID ) ; }
Source:
public void testSuccessfulFollowOnUpdate ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData1 = createValidTzDataBundle ( "2030a" ) ; assertTrue ( install ( tzData1 ) ) ; assertTzDataInstalled ( tzData1 ) ; libcore.tzdata.update2.ConfigBundle tzData2 = createValidTzDataBundle ( "2030b" ) ; assertTrue ( install ( tzData2 ) ) ; assertTzDataInstalled ( tzData2 ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { libcore.tzdata.update2.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { libcore.tzdata.update2.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { libcore.tzdata.update2.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }
Source:
private void processConnectionEvent ( int state , android.bluetooth.BluetoothDevice device ) { switch ( state ) { case HeadsetClientHalConstants.CONNECTION_STATE_DISCONNECTED : if ( mCurrentDevice.equals ( device ) ) { processAudioEvent ( HeadsetClientHalConstants.AUDIO_STATE_DISCONNECTED , device ) ; broadcastConnectionState ( mCurrentDevice , BluetoothProfile.STATE_DISCONNECTED , BluetoothProfile.STATE_CONNECTED ) ; transitionTo ( mDisconnected ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "Disconnected from unknown device: " + device ) ) ; } break ; default : android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "Connection State Device: " + device ) + " bad state: " ) + state ) ) ; break ; } }

Target:
public void exit ( ) { if ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "Exit AudioOn: " + ( getCurrentMessage ( ) . what ) ) ) ; } mPrevState = this ; broadcastAudioState ( mCurrentDevice , BluetoothHeadsetClient.STATE_AUDIO_DISCONNECTED , BluetoothHeadsetClient.STATE_AUDIO_CONNECTED ) ; }
Source:
public void testNotifyPackageDataDestroyForAll ( ) { notifyDexLoad ( mBarUser0 , mBarUser0.getSecondaryDexPaths ( ) , mUser0 ) ; notifyDexLoad ( mBarUser1 , mBarUser1.getSecondaryDexPaths ( ) , mUser1 ) ; mDexManager.notifyPackageDataDestroyed ( mBarUser0.getPackageName ( ) , UserHandle.USER_ALL ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mBarUser0 ) ; org.junit.Assert.assertNull ( pui ) ; }

Target:
public void testNotifyPackageDataDestroyForAll ( ) { notifyDexLoad ( mBarUser0 , mBarUser0.getSecondaryDexPaths ( ) , mUser0 ) ; notifyDexLoad ( mBarUser1 , mBarUser1.getSecondaryDexPaths ( ) , mUser1 ) ; mDexManager.notifyPackageDataDestroyed ( mBarUser0.getPackageName ( ) , UserHandle.USER_ALL ) ; assertNoUseInfo ( mBarUser0 ) ; }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_vector s = new com.android.rs.test.ScriptC_vector ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { failTest ( ) ; } else { s.invoke_vector_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; } pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_vector s = new com.android.rs.test.ScriptC_vector ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { failTest ( ) ; } else { s.invoke_vector_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; } pRS.destroy ( ) ; }
Source:
public void runTest ( ) { if ( mUseIntrinsic ) { mIntrinsic.forEach ( mOutPixelsAllocation ) ; } else { mScript.forEach_copyIn ( mInPixelsAllocation , mScratchPixelsAllocation1 ) ; mScript.forEach_horz ( mScratchPixelsAllocation2 ) ; mScript.forEach_vert ( mOutPixelsAllocation ) ; } }

Target:
public void runTest ( ) { if ( mUseIntrinsic ) { mIntrinsic.forEach ( mOutPixelsAllocation ) ; } else if ( mUseHalfPrecision ) { mScript_half.forEach_copyIn ( mInPixelsAllocation , mScratchPixelsAllocation1 ) ; mScript_half.forEach_horz ( mScratchPixelsAllocation2 ) ; mScript_half.forEach_vert ( mOutPixelsAllocation ) ; } else { mScript.forEach_copyIn ( mInPixelsAllocation , mScratchPixelsAllocation1 ) ; mScript.forEach_horz ( mScratchPixelsAllocation2 ) ; mScript.forEach_vert ( mOutPixelsAllocation ) ; } }
Source:
public void onServiceDisconnected ( android.content.ComponentName name ) { com.android.server.telecom.Log.startSession ( "ICSBC.oSD" ) ; synchronized ( mLock ) { try { com.android.server.telecom.Log.d ( this , "onDisconnected: %s" , name ) ; mIsBound = false ; onDisconnected ( ) ; } finally { com.android.server.telecom.Log.endSession ( ) ; } } }

Target:
public void onServiceDisconnected ( android.content.ComponentName name ) { android.telecom.Log.startSession ( "ICSBC.oSD" ) ; synchronized ( mLock ) { try { android.telecom.Log.d ( this , "onDisconnected: %s" , name ) ; mIsBound = false ; onDisconnected ( ) ; } finally { android.telecom.Log.endSession ( ) ; } } }
Source:
public void testCheckReadPhoneNumber_hasReadSms ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_SMS , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.mockito.Mockito.when ( mMockAppOps.noteOp ( AppOpsManager.OP_READ_SMS , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE ) ) . thenReturn ( AppOpsManager.MODE_ALLOWED ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }

Target:
public void testCheckReadPhoneNumber_hasReadSms ( ) { org.mockito.Mockito.doNothing ( ) . when ( mMockContext ) . enforcePermission ( android.Manifest.permission.READ_SMS , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ; org.mockito.Mockito.when ( mMockAppOps.noteOp ( AppOpsManager.OP_READ_SMS , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE ) ) . thenReturn ( AppOpsManager.MODE_ALLOWED ) ; org.junit.Assert.assertTrue ( com.android.internal.telephony.TelephonyPermissions.checkReadPhoneNumber ( mMockContext , ( ) -> mMockTelephony , com.android.internal.telephony.TelephonyPermissionsTest.SUB_ID , com.android.internal.telephony.TelephonyPermissionsTest.PID , com.android.internal.telephony.TelephonyPermissionsTest.UID , com.android.internal.telephony.TelephonyPermissionsTest.PACKAGE , com.android.internal.telephony.TelephonyPermissionsTest.MSG ) ) ; }
Source:
public void setFocusData ( final org.eclipse.swt.graphics.Image image , final com.android.hierarchyviewerlib.device.ViewNode viewNode ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { if ( ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this . image ) != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . image.dispose ( ) ; } com.android.hierarchyviewerlib.models.PixelPerfectModel.this . image = image ; com.android.hierarchyviewerlib.models.PixelPerfectModel.this . viewNode = viewNode ; com.android.hierarchyviewerlib.models.PixelPerfectModel.this . selected = null ; } } } ) ; notifyFocusChanged ( ) ; }

Target:
public void setTree ( final com.android.hierarchyviewerlib.device.ViewNode viewNode ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . viewNode = viewNode ; com.android.hierarchyviewerlib.models.PixelPerfectModel.this . selected = null ; } } } ) ; notifyTreeChanged ( ) ; }
Source:
private java.lang.String getWifiMacAddress ( ) { android.net.wifi.WifiManager wifiManager = ( ( android.net.wifi.WifiManager ) ( getContext ( ) . getSystemService ( Context.WIFI_SERVICE ) ) ) ; boolean enabled = wifiManager.isWifiEnabled ( ) ; try { if ( ! enabled ) { wifiManager.setWifiEnabled ( true ) ; } android.net.wifi.WifiInfo wifiInfo = wifiManager.getConnectionInfo ( ) ; return wifiInfo.getMacAddress ( ) ; } finally { if ( ! enabled ) { wifiManager.setWifiEnabled ( false ) ; } } }

Target:
private java.lang.String getWifiMacAddress ( ) { android.net.wifi.WifiManager wifiManager = ( ( android.net.wifi.WifiManager ) ( android.telephony.cts.TelephonyManagerTest.getContext ( ) . getSystemService ( Context.WIFI_SERVICE ) ) ) ; boolean enabled = wifiManager.isWifiEnabled ( ) ; try { if ( ! enabled ) { wifiManager.setWifiEnabled ( true ) ; } android.net.wifi.WifiInfo wifiInfo = wifiManager.getConnectionInfo ( ) ; return wifiInfo.getMacAddress ( ) ; } finally { if ( ! enabled ) { wifiManager.setWifiEnabled ( false ) ; } } }
Source:
public static java.lang.String getAdbLocation ( ) { org.eclipse.jface.preference.IPreferenceStore store = com.android.ide.eclipse.pdt.PdtPlugin.sPlugin.getPreferenceStore ( ) ; java.lang.String devTree = store.getString ( PrefPage.PREFS_DEVTREE_DIR ) ; if ( ( devTree.length ( ) ) == 0 ) { devTree = java.lang.System.getenv ( "ANDROID_BUILD_TOP" ) ; } if ( ( devTree != null ) && ( ( devTree.length ( ) ) > 0 ) ) { return ( ( devTree + "/out/host/" ) + ( com.android.ide.eclipse.pdt.PdtPlugin.currentPlatform ( ) ) ) + "/bin/adb" ; } return null ; }

Target:
public static java.lang.String getDevTree ( ) { org.eclipse.jface.preference.IPreferenceStore store = com.android.ide.eclipse.pdt.PdtPlugin.sPlugin.getPreferenceStore ( ) ; java.lang.String devTree = store.getString ( PrefPage.PREFS_DEVTREE_DIR ) ; if ( ( devTree.length ( ) ) == 0 ) { devTree = java.lang.System.getenv ( "ANDROID_BUILD_TOP" ) ; } return devTree ; }
Source:
private void testInterruptWriter ( final java.io.PipedWriter writer ) throws java.lang.Exception { interruptMeLater ( ) ; try { while ( true ) { writer.write ( new char [ libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ] ) ; } } catch ( java.io.InterruptedIOException expected ) { } }

Target:
private void testInterruptWriter ( final java.io.PipedWriter writer ) throws java.lang.Exception { java.lang.Thread thread = interruptMeLater ( ) ; try { while ( true ) { writer.write ( new char [ libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ] ) ; } } catch ( java.io.InterruptedIOException expected ) { } finally { libcore.java.io.InterruptedStreamTest.confirmInterrupted ( thread ) ; } }
Source:
protected void buildToolbar ( @ org.jetbrains.annotations.Nullable java.util.List < com.intellij.diff.impl.AnAction > viewerActions ) { com.intellij.diff.impl.ActionGroup group = collectToolbarActions ( viewerActions ) ; com.intellij.diff.impl.ActionToolbar toolbar = com.intellij.diff.impl.ActionManager.getInstance ( ) . createActionToolbar ( ActionPlaces.DIFF_TOOLBAR , group , true ) ; myToolbarPanel.setContent ( toolbar.getComponent ( ) ) ; for ( com.intellij.diff.impl.AnAction action : group.getChildren ( null ) ) { action.registerCustomShortcutSet ( action.getShortcutSet ( ) , myMainPanel ) ; } }

Target:
protected void buildToolbar ( @ org.jetbrains.annotations.Nullable java.util.List < com.intellij.diff.impl.AnAction > viewerActions ) { com.intellij.diff.impl.ActionGroup group = collectToolbarActions ( viewerActions ) ; com.intellij.diff.impl.ActionToolbar toolbar = com.intellij.diff.impl.ActionManager.getInstance ( ) . createActionToolbar ( ActionPlaces.DIFF_TOOLBAR , group , true ) ; toolbar.setTargetComponent ( myMainPanel ) ; myToolbarPanel.setContent ( toolbar.getComponent ( ) ) ; for ( com.intellij.diff.impl.AnAction action : group.getChildren ( null ) ) { action.registerCustomShortcutSet ( action.getShortcutSet ( ) , myMainPanel ) ; } }
Source:
public void setDataEnabled ( int subId , boolean enable ) { try { android.util.Log.d ( android.telephony.TelephonyManager.TAG , ( "setDataEnabled: enabled=" + enable ) ) ; com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) telephony.setDataEnabled ( subId , enable ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#setDataEnabled" , e ) ; } }

Target:
private boolean isUserMobileDataEnabled ( int subId ) { boolean retVal = false ; try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.isUserDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isUserDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }
Source:
public static byte [ ] createMaxFragmentLengthExtension ( short maxFragmentLength ) throws java.io.IOException { if ( ! ( org.bouncycastle.crypto.tls.MaxFragmentLength.isValid ( maxFragmentLength ) ) ) { throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.internal_error ) ; } return new byte [ ] { ( ( byte ) ( maxFragmentLength ) ) } ; }

Target:
public static byte [ ] createMaxFragmentLengthExtension ( short maxFragmentLength ) throws java.io.IOException { org.bouncycastle.crypto.tls.TlsUtils.checkUint8 ( maxFragmentLength ) ; byte [ ] extensionData = new byte [ 1 ] ; org.bouncycastle.crypto.tls.TlsUtils.writeUint8 ( maxFragmentLength , extensionData , 0 ) ; return extensionData ; }
Source:
public void conference ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CONFERENCE , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void setPreferredVoicePrivacy ( boolean enable , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( enable ? 1 : 0 ) ) ; send ( rr ) ; }
Source:
public void onLayoutChange ( android.view.View v , int left , int top , int right , int bottom , int oldLeft , int oldTop , int oldRight , int oldBottom ) { updateCarrierLabelVisibility ( false ) ; }

Target:
public boolean onTouch ( android.view.View v , android.view.MotionEvent event ) { checkUserAutohide ( v , event ) ; if ( ( event.getAction ( ) ) == ( android.view.MotionEvent.ACTION_DOWN ) ) { if ( mExpandedVisible ) { animateCollapsePanels ( ) ; } } return mStatusBarWindow.onTouchEvent ( event ) ; }
Source:
public void runTest ( ) { mScript.set_histogramSource ( mInPixelsAllocation ) ; mScript.set_histogramWidth ( mInPixelsAllocation.getType ( ) . getX ( ) ) ; mScript.set_histogramHeight ( mInPixelsAllocation.getType ( ) . getY ( ) ) ; mScript.invoke_prepareWhiteBalance ( ) ; mScript.forEach_whiteBalanceKernel ( mInPixelsAllocation , mOutPixelsAllocation ) ; }

Target:
public void createTest ( com.android.rs.imagejb.Resources res ) { mScript = new com.android.rs.imagejb.ScriptC_wbalance ( mRS ) ; mHist = android.renderscript.ScriptIntrinsicHistogram.create ( mRS , android.renderscript.Element.U8_4 ( mRS ) ) ; mSums = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32_3 ( mRS ) , 256 ) ; mHist.setOutput ( mSums ) ; mScript.set_histogramValues ( mSums ) ; }
Source:
private static void sourceIfExist ( org.gradle.platform.base.BinarySpec binary , com.android.build.gradle.model.AndroidComponentModelSourceSet projectSourceSet , java.lang.String sourceSetName ) { org.gradle.language.base.FunctionalSourceSet sourceSet = projectSourceSet.findByName ( sourceSetName ) ; if ( sourceSet != null ) { binary.source ( sourceSet ) ; } }

Target:
public void execute ( org.gradle.api.PolymorphicDomainObjectContainer < org.gradle.language.base.LanguageSourceSet > languageSourceSets ) { languageSourceSets.create ( ( sourceSetName + "C" ) , org.gradle.language.c.CSourceSet.class , new org.gradle.api.Action < org.gradle.language.base.LanguageSourceSet > ( ) { @ java.lang.Override public void execute ( org.gradle.language.base.LanguageSourceSet source ) { source.getSource ( ) . setSrcDirs ( jni.getSource ( ) . getSrcDirs ( ) ) ; source.getSource ( ) . include ( "**/*.c" ) ; } } ) ; languageSourceSets.create ( ( sourceSetName + "Cpp" ) , org.gradle.language.cpp.CppSourceSet.class , new org.gradle.api.Action < org.gradle.language.base.LanguageSourceSet > ( ) { @ java.lang.Override public void execute ( org.gradle.language.base.LanguageSourceSet source ) { source.getSource ( ) . setSrcDirs ( jni.getSource ( ) . getSrcDirs ( ) ) ; source.getSource ( ) . include ( "**/*.cpp" ) ; source.getSource ( ) . include ( "**/*.cc" ) ; source.getSource ( ) . include ( "**/*.cp" ) ; source.getSource ( ) . include ( "**/*.cxx" ) ; } } ) ; }
Source:
public boolean setNetworkConnectChoice ( int networkId , java.lang.String connectChoiceConfigKey , long timestamp ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setConnectChoice ( connectChoiceConfigKey ) ; config.getNetworkSelectionStatus ( ) . setConnectChoiceTimestamp ( timestamp ) ; return true ; }

Target:
public boolean setNetworkConnectChoice ( int networkId , java.lang.String connectChoiceConfigKey , long timestamp ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( ( ( "Set network connect choice " + connectChoiceConfigKey ) + " for " ) + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setConnectChoice ( connectChoiceConfigKey ) ; config.getNetworkSelectionStatus ( ) . setConnectChoiceTimestamp ( timestamp ) ; return true ; }
Source:
public void setCamera ( java.lang.String cameraId ) { mMessageHandler.obtainMessage ( android.telecom.Connection.VideoProvider.MSG_SET_CAMERA , cameraId ) . sendToTarget ( ) ; }

Target:
public void setCamera ( java.lang.String cameraId , java.lang.String callingPackageName ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = cameraId ; args.arg2 = callingPackageName ; args.argi1 = android.os.Binder.getCallingUid ( ) ; args.argi2 = android.os.Binder.getCallingPid ( ) ; mMessageHandler.obtainMessage ( android.telecom.Connection.VideoProvider.MSG_SET_CAMERA , args ) . sendToTarget ( ) ; }