auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void wtf ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ; android.util.Log.wtf ( android.telecom.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }

Target:
public static void wtf ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ; android.util.Slog.wtf ( android.telecom.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }
Source:
public void showWaitingForDebugger ( android.app.IApplicationThread who , boolean waiting ) { synchronized ( this ) { com.android.server.am.ProcessRecord app = ( who != null ) ? getRecordForAppLocked ( who ) : null ; if ( app == null ) return ; android.os.Message msg = android.os.Message.obtain ( ) ; msg.what = com.android.server.am.ActivityManagerService.WAIT_FOR_DEBUGGER_MSG ; msg.obj = app ; msg.arg1 = ( waiting ) ? 1 : 0 ; mHandler.sendMessage ( msg ) ; } }

Target:
public void showWaitingForDebugger ( android.app.IApplicationThread who , boolean waiting ) { synchronized ( this ) { com.android.server.am.ProcessRecord app = ( who != null ) ? getRecordForAppLocked ( who ) : null ; if ( app == null ) return ; android.os.Message msg = android.os.Message.obtain ( ) ; msg.what = com.android.server.am.ActivityManagerService.WAIT_FOR_DEBUGGER_MSG ; msg.obj = app ; msg.arg1 = ( waiting ) ? 1 : 0 ; mUiHandler.sendMessage ( msg ) ; } }
Source:
public void onUnhold ( ) { if ( ( getConnectionService ( ) . getAllConnections ( ) . size ( ) ) > 1 ) { android.util.Log.w ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , "Ignoring unhold; call hold on the foreground call" ) ; return ; } android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "onUnhold " + ( mCurrentCall ) ) ) ; if ( ( ! ( mClosed ) ) && ( ( mHeadsetProfile ) != null ) ) { mHeadsetProfile.acceptCall ( mDevice , BluetoothHeadsetClient.CALL_ACCEPT_HOLD ) ; } }

Target:
public void onHold ( ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "onHold " + ( mCurrentCall ) ) ) ; } if ( ! ( mClosed ) ) { mHeadsetProfile.holdCall ( mDevice ) ; } }
Source:
public static MergingReport.Result validate ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlDocument xmlDocument ) { com.android.manifmerger.MergingReport.Result validated = com.android.manifmerger.PreValidator.validate ( mergingReport , xmlDocument.getRootNode ( ) ) ; if ( validated == ( MergingReport.Result.SUCCESS ) ) { com.android.manifmerger.PreValidator.splitUsesFeatureDeclarations ( mergingReport , xmlDocument.getRootNode ( ) ) ; } return validated ; }

Target:
public static MergingReport.Result validate ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlDocument xmlDocument ) { com.android.manifmerger.PreValidator.validateManifestAttribute ( mergingReport , xmlDocument.getRootNode ( ) ) ; return com.android.manifmerger.PreValidator.validate ( mergingReport , xmlDocument.getRootNode ( ) ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof android.icu.text.DateTimePatternGenerator.DateTimeMatcher ) ) { return false ; } android.icu.text.DateTimePatternGenerator.DateTimeMatcher that = ( ( android.icu.text.DateTimePatternGenerator.DateTimeMatcher ) ( other ) ) ; for ( int i = 0 ; i < ( original.length ) ; ++ i ) { if ( ! ( original [ i ] . equals ( that.original [ i ] ) ) ) return false ; } return true ; }

Target:
private java.lang.StringBuilder appendTo ( java.lang.StringBuilder sb , boolean canonical ) { for ( int i = 0 ; i < ( android.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ; ++ i ) { appendFieldTo ( i , sb , canonical ) ; } return sb ; }
Source:
public void add ( java.lang.String fileName , java.lang.String jarName ) { java.lang.String packageName ; int pos ; if ( ( pos = fileName.lastIndexOf ( "/" ) ) != ( - 1 ) ) { packageName = fileName.substring ( 0 , pos ) ; } else { packageName = fileName ; } addToList ( packageName , jarName , indexMap ) ; addToList ( jarName , packageName , jarMap ) ; }

Target:
public void add ( java.lang.String fileName , java.lang.String jarName ) { java.lang.String packageName ; int pos ; if ( ( pos = fileName.lastIndexOf ( "/" ) ) != ( - 1 ) ) { packageName = fileName.substring ( 0 , pos ) ; } else { packageName = fileName ; } addMapping ( packageName , jarName ) ; }
Source:
public void test_providerCount ( ) { java.security.Provider [ ] providers = java.security.Security.getProviders ( ) ; assertTrue ( ( ( providers.length ) > 0 ) ) ; assertTrue ( ( ( providers.length ) < 10 ) ) ; }

Target:
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 ) ; } } }
Source:
public void stopStreaming ( java.lang.String serviceId , int reason ) { com.android.phone.testapps.embmsmw.AppActiveStreams.StreamCallbackWithState entry = mStreamStates.get ( serviceId ) ; if ( entry != null ) { try { if ( ( entry.getState ( ) ) != ( android.telephony.mbms.StreamingService.STATE_STOPPED ) ) { entry.setState ( StreamingService.STATE_STOPPED ) ; entry.getCallback ( ) . streamStateUpdated ( StreamingService.STATE_STOPPED , reason ) ; } } catch ( android.os.RemoteException e ) { dispose ( serviceId ) ; } } }

Target:
public void stopStreaming ( java.lang.String serviceId , int reason ) { com.android.phone.testapps.embmsmw.AppActiveStreams.StreamCallbackWithState entry = mStreamStates.get ( serviceId ) ; if ( entry != null ) { if ( ( entry.getState ( ) ) != ( android.telephony.mbms.StreamingService.STATE_STOPPED ) ) { entry.setState ( StreamingService.STATE_STOPPED ) ; entry.getCallback ( ) . onStreamStateUpdated ( StreamingService.STATE_STOPPED , reason ) ; } } }
Source:
public void testStringFromCharset ( ) { java.nio.charset.Charset cs = java.nio.charset.Charset.forName ( "UTF-8" ) ; byte [ ] bytes = new byte [ ] { ( ( byte ) ( 'h' ) ) , ( ( byte ) ( 'i' ) ) } ; assertEquals ( "hi" , new java.lang.String ( bytes , cs ) ) ; }

Target:
public void testString_BII ( ) throws java.lang.Exception { byte [ ] bytes = "xa٦bx" . getBytes ( "UTF-8" ) ; assertEquals ( "a٦b" , new java.lang.String ( bytes , 1 , ( ( bytes.length ) - 2 ) ) ) ; }
Source:
private static java.util.Calendar parseDate ( java.util.Locale l , java.lang.String fmt , java.lang.String value ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( fmt , l ) ; java.text.ParsePosition pp = new java.text.ParsePosition ( 0 ) ; java.util.Date d = sdf.parse ( value , pp ) ; if ( d == null ) { fail ( pp.toString ( ) ) ; } java.util.Calendar c = java.util.Calendar.getInstance ( java.util.TimeZone.getTimeZone ( "UTC" ) ) ; c.setTime ( d ) ; return c ; }

Target:
private static java.util.Calendar parseDate ( java.util.Locale l , java.lang.String fmt , java.lang.String value , java.util.TimeZone tz ) { java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ( fmt , l ) ; sdf.setTimeZone ( tz ) ; java.text.ParsePosition pp = new java.text.ParsePosition ( 0 ) ; java.util.Date d = sdf.parse ( value , pp ) ; if ( d == null ) { fail ( pp.toString ( ) ) ; } java.util.Calendar c = java.util.Calendar.getInstance ( tz ) ; c.setTime ( d ) ; return c ; }
Source:
public static < I extends org.chromium.mojo.bindings.Interface , P extends org.chromium.mojo.bindings.Interface.Proxy > boolean handleRunOrClosePipe ( org.chromium.mojo.bindings.Interface.Manager < I , P > manager , org.chromium.mojo.bindings.ServiceMessage message ) { org.chromium.mojo.bindings.Message payload = message.getPayload ( ) ; org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeMessageParams query = org.chromium.mojo.bindings.interfacecontrol.RunOrClosePipeMessageParams.deserialize ( payload ) ; if ( ( query.input.which ( ) ) == ( RunOrClosePipeInput.Tag.RequireVersion ) ) { return ( query.input.getRequireVersion ( ) . version ) <= ( manager.getVersion ( ) ) ; } return false ; }

Target:
public static < I extends org.chromium.mojo.bindings.Interface , P extends org.chromium.mojo.bindings.Interface.Proxy > boolean handleRunOrClosePipe ( org.chromium.mojo.bindings.Interface.Manager < I , P > manager , org.chromium.mojo.bindings.ServiceMessage message ) { org.chromium.mojo.bindings.Message payload = message.getPayload ( ) ; org.chromium.mojo.bindings.RunOrClosePipeMessageParams query = org.chromium.mojo.bindings.RunOrClosePipeMessageParams.deserialize ( payload ) ; return ( query.requireVersion.version ) <= ( manager.getVersion ( ) ) ; }
Source:
public static java.lang.invoke.MethodHandle permuteArguments ( java.lang.invoke.MethodHandle target , java.lang.invoke.MethodType newType , int ... reorder ) { reorder = reorder.clone ( ) ; java.lang.invoke.MethodType oldType = target.type ( ) ; java.lang.invoke.MethodHandles.permuteArgumentChecks ( reorder , newType , oldType ) ; throw new java.lang.UnsupportedOperationException ( "MethodHandles.permuteArguments is not implemented" ) ; }

Target:
public static java.lang.invoke.MethodHandle permuteArguments ( java.lang.invoke.MethodHandle target , java.lang.invoke.MethodType newType , int ... reorder ) { reorder = reorder.clone ( ) ; java.lang.invoke.MethodType oldType = target.type ( ) ; java.lang.invoke.MethodHandles.permuteArgumentChecks ( reorder , newType , oldType ) ; return new java.lang.invoke.Transformers.PermuteArguments ( newType , target , reorder ) ; }
Source:
public int lengthOfYear ( ) { java.util.Calendar jcal = java.util.Calendar.getInstance ( java.time.chrono.JapaneseChronology.LOCALE ) ; jcal.set ( java.util.Calendar.ERA , ( ( era.getValue ( ) ) + ( java.time.chrono.JapaneseEra.ERA_OFFSET ) ) ) ; jcal.set ( yearOfEra , ( ( isoDate.getMonthValue ( ) ) - 1 ) , isoDate.getDayOfMonth ( ) ) ; return jcal.getActualMaximum ( java.util.Calendar.DAY_OF_YEAR ) ; }

Target:
public int lengthOfYear ( ) { java.util.Calendar jcal = java.time.chrono.JapaneseChronology.createCalendar ( ) ; jcal.set ( java.util.Calendar.ERA , ( ( era.getValue ( ) ) + ( java.time.chrono.JapaneseEra.ERA_OFFSET ) ) ) ; jcal.set ( yearOfEra , ( ( isoDate.getMonthValue ( ) ) - 1 ) , isoDate.getDayOfMonth ( ) ) ; return jcal.getActualMaximum ( java.util.Calendar.DAY_OF_YEAR ) ; }
Source:
private void onPackageDoubleClick ( ) { com.android.sdkuilib.internal.repository.ArchiveInfo ai = getSelectedArchive ( ) ; if ( ai == null ) { return ; } boolean wasAccepted = ai.isAccepted ( ) ; ai.setAccepted ( ( ! wasAccepted ) ) ; ai.setRejected ( wasAccepted ) ; mLicenseAcceptAll = false ; mTableViewPackage.refresh ( ai ) ; updateLicenceRadios ( ai ) ; }

Target:
private void onPackageDoubleClick ( ) { com.android.sdkuilib.internal.repository.ArchiveInfo ai = getSelectedArchive ( ) ; if ( ai == null ) { return ; } boolean wasAccepted = ai.isAccepted ( ) ; ai.setAccepted ( ( ! wasAccepted ) ) ; ai.setRejected ( wasAccepted ) ; mLicenseAcceptAll = false ; mTableViewPackage.refresh ( ai ) ; displayMissingDependency ( ai ) ; updateLicenceRadios ( ai ) ; }
Source:
private void removeImsServiceFeatureListener ( ) { synchronized ( mLock ) { mImsStatusCallbacks.clear ( ) ; } }

Target:
public void disableIms ( int slotId ) { try { synchronized ( mLock ) { if ( isServiceControllerAvailable ( ) ) { mIImsServiceController.disableIms ( slotId ) ; } } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( "Couldn't disable IMS: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public CommandSupplier.Builder inject ( com.android.dialer.commandline.CommandSupplier.Builder builder ) { builder.addCommand ( "help" , help ) ; builder.addCommand ( "version" , version ) ; builder.addCommand ( "echo" , echo ) ; builder.addCommand ( "blocking" , blocking ) ; return builder ; }

Target:
public CommandSupplier.Builder inject ( com.android.dialer.commandline.CommandSupplier.Builder builder ) { builder.addCommand ( "help" , help ) ; builder.addCommand ( "version" , version ) ; builder.addCommand ( "echo" , echo ) ; builder.addCommand ( "blocking" , blocking ) ; builder.addCommand ( "call" , callCommand ) ; return builder ; }
Source:
public void run ( ) { this . onStartOtaIfNecessary ( slotId , new android.service.euicc.EuiccService.OtaStatusChangedCallback ( ) { @ java.lang.Override public void onOtaStatusChanged ( int status ) { try { statusChangedCallback.onOtaStatusChanged ( status ) ; } catch ( android.os.RemoteException e ) { } } } ) ; }

Target:
public void startOtaIfNecessary ( int slotId , android.service.euicc.IOtaStatusChangedCallback statusChangedCallback ) { mExecutor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { android.service.euicc.EuiccService.this . onStartOtaIfNecessary ( slotId , new android.service.euicc.EuiccService.OtaStatusChangedCallback ( ) { @ java.lang.Override public void onOtaStatusChanged ( int status ) { try { statusChangedCallback.onOtaStatusChanged ( status ) ; } catch ( android.os.RemoteException e ) { } } } ) ; } } ) ; }
Source:
public void copyFrom ( float [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFrom ( byte [ ] d ) { validateIsInt8 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
public com.android.ims.internal.IImsEcbm getEcbmInterface ( int slotId , int featureType , int sessionId ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.getEcbmInterface ( sessionId ) ; } } return null ; }

Target:
public void setUiTTYMode ( int slotId , int featureType , int uiTtyMode , android.os.Message onComplete ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { feature.setUiTTYMode ( uiTtyMode , onComplete ) ; } } }
Source:
public void duplicateCacheMiss ( ) throws java.lang.Exception { com.android.volley.mock.MockRequest secondRequest = new com.android.volley.mock.MockRequest ( ) ; mRequest.setSequence ( 1 ) ; secondRequest.setSequence ( 2 ) ; mCacheQueue.add ( mRequest ) ; mCacheQueue.add ( secondRequest ) ; mCacheQueue.waitUntilEmpty ( com.android.volley.CacheDispatcherTest.TIMEOUT_MILLIS ) ; assertTrue ( ( ( mNetworkQueue.size ( ) ) == 1 ) ) ; assertFalse ( mDelivery.postResponse_called ) ; }

Target:
public void expiredCacheHit ( ) throws java.lang.Exception { com.android.volley.Cache.Entry entry = com.android.volley.utils.CacheTestUtils.makeRandomCacheEntry ( null , true , true ) ; org.mockito.Mockito.when ( mCache.get ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( entry ) ; mDispatcher.processRequest ( mRequest ) ; com.android.volley.CacheDispatcherTest.verifyNoResponse ( mDelivery ) ; org.mockito.Mockito.verify ( mNetworkQueue ) . put ( mRequest ) ; org.junit.Assert.assertSame ( entry , mRequest.getCacheEntry ( ) ) ; }
Source:
public void stopKeepaliveResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { throw new java.lang.UnsupportedOperationException ( "stopKeepaliveResponse not implemented" ) ; }

Target:
public void stopKeepaliveResponse ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr == null ) { return ; } if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , null ) ; mRil.processResponseDone ( rr , responseInfo , null ) ; } else { } }
Source:
private void showErrorMessage ( java.lang.String message ) { new android.app.AlertDialog.Builder ( this ) . setTitle ( R.string.error_title ) . setMessage ( message ) . setPositiveButton ( android.R.string.ok , null ) . show ( ) ; }

Target:
protected android.app.Dialog onCreateDialog ( int id ) { if ( id == ( com.android.settings.ApnEditor.ERROR_DIALOG_ID ) ) { java.lang.String msg = getErrorMsg ( ) ; return new android.app.AlertDialog.Builder ( this ) . setTitle ( R.string.error_title ) . setPositiveButton ( android.R.string.ok , null ) . setMessage ( msg ) . create ( ) ; } return super . onCreateDialog ( id ) ; }
Source:
public void disconnectBluetoothAudio ( ) { com.android.server.telecom.Log.v ( this , "disconnectBluetoothAudio()..." ) ; if ( ( mBluetoothHeadset ) != null ) { mBluetoothState = com.android.server.telecom.BluetoothManager.BLUETOOTH_DEVICE_CONNECTED ; mBluetoothHeadset.disconnectAudio ( ) ; } else { mBluetoothState = com.android.server.telecom.BluetoothManager.BLUETOOTH_DISCONNECTED ; } mHandler.removeCallbacks ( mBluetoothConnectionTimeout.getRunnableToCancel ( ) ) ; mBluetoothConnectionTimeout.cancel ( ) ; }

Target:
public void disconnectBluetoothAudio ( ) { android.telecom.Log.v ( this , "disconnectBluetoothAudio()..." ) ; if ( ( mBluetoothHeadset ) != null ) { mBluetoothState = com.android.server.telecom.BluetoothManager.BLUETOOTH_DEVICE_CONNECTED ; mBluetoothHeadset.disconnectAudio ( ) ; } else { mBluetoothState = com.android.server.telecom.BluetoothManager.BLUETOOTH_DISCONNECTED ; } mHandler.removeCallbacks ( mBluetoothConnectionTimeout.getRunnableToCancel ( ) ) ; mBluetoothConnectionTimeout.cancel ( ) ; }
Source:
public void handle ( @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { java.lang.String method = request.getMethod ( ) ; com.android.jack.server.router.MethodRouter.logger.log ( java.util.logging.Level.FINE , ( ( "Route request for method '" + method ) + "'" ) ) ; org.simpleframework.http.core.Container container = registry.get ( method ) ; if ( container != null ) { container.handle ( request , response ) ; } else { primary.handle ( request , response ) ; } }

Target:
public void handle ( @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { java.lang.String method = request.getMethod ( ) ; com.android.jack.server.router.MethodRouter.logger.log ( java.util.logging.Level.FINE , ( ( "Route request for method '" + method ) + "'" ) ) ; org.simpleframework.http.core.Container container = registry.get ( method ) ; if ( container != null ) { container.handle ( request , response ) ; } else { com.android.jack.server.router.MethodRouter.logger.log ( java.util.logging.Level.INFO , ( ( "Using primary route for method '" + method ) + "'" ) ) ; primary.handle ( request , response ) ; } }
Source:
public void readCharacteristic ( int clientIf , java.lang.String address , int srvcType , int srvcInstanceId , android.os.ParcelUuid srvcId , int charInstanceId , android.os.ParcelUuid charId , int authReq ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.readCharacteristic ( clientIf , address , srvcType , srvcInstanceId , srvcId.getUuid ( ) , charInstanceId , charId.getUuid ( ) , authReq ) ; }

Target:
public void readCharacteristic ( int clientIf , java.lang.String address , int handle , int authReq ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.readCharacteristic ( clientIf , address , handle , authReq ) ; }
Source:
private void checkCreateActivityInProject ( java.lang.String activityName ) throws java.lang.Exception { com.google.common.base.Stopwatch stopwatch = new com.google.common.base.Stopwatch ( ) ; stopwatch.start ( ) ; java.io.File templateFile = com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandlerTest.findTemplate ( "activities" , activityName ) ; com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandlerTest.sProjectTestedSeparately.add ( templateFile ) ; checkProjectWithActivity ( templateFile.getName ( ) ) ; stopwatch.stop ( ) ; java.lang.System.out.println ( ( ( ( "Checked " + ( templateFile.getName ( ) ) ) + " successfully in " ) + ( stopwatch.toString ( ) ) ) ) ; }

Target:
private void checkCreateActivityInProject ( java.lang.String activityName ) throws java.lang.Exception { com.google.common.base.Stopwatch stopwatch = com.google.common.base.Stopwatch.createUnstarted ( ) ; stopwatch.start ( ) ; java.io.File templateFile = com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandlerTest.findTemplate ( "activities" , activityName ) ; com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandlerTest.sProjectTestedSeparately.add ( templateFile ) ; checkProjectWithActivity ( templateFile.getName ( ) ) ; stopwatch.stop ( ) ; java.lang.System.out.println ( ( ( ( "Checked " + ( templateFile.getName ( ) ) ) + " successfully in " ) + ( stopwatch.toString ( ) ) ) ) ; }
Source:
public void onRttCallScreenUiUnready ( ) { com.android.dialer.common.LogUtil.enterBlock ( "RttCallPresenter.onRttCallScreenUiUnready" ) ; com.android.incallui.InCallPresenter.getInstance ( ) . removeListener ( this ) ; stopListenOnRemoteMessage ( ) ; }

Target:
public void onRttCallScreenUiUnready ( ) { com.android.dialer.common.LogUtil.enterBlock ( "RttCallPresenter.onRttCallScreenUiUnready" ) ; com.android.incallui.InCallPresenter.getInstance ( ) . removeListener ( this ) ; stopListenOnRemoteMessage ( ) ; com.android.incallui.call.DialerCall call = com.android.incallui.call.CallList.getInstance ( ) . getActiveCall ( ) ; if ( call != null ) { saveTranscript ( call ) ; } }
Source:
public static java.net.InetAddress getLocalHost ( ) throws java.net.UnknownHostException { java.lang.SecurityManager security = java.lang.System.getSecurityManager ( ) ; try { java.lang.String local = Libcore.os.uname ( ) . nodename ; if ( security != null ) { security.checkConnect ( local , ( - 1 ) ) ; } return java.net.InetAddress.lookupHostByName ( local , java.net.InetAddress.NETID_UNSET ) [ 0 ] ; } catch ( java.lang.SecurityException e ) { return java.net.InetAddress.impl.loopbackAddress ( ) ; } }

Target:
public static java.net.InetAddress getLocalHost ( ) throws java.net.UnknownHostException { java.lang.String local = Libcore.os.uname ( ) . nodename ; return java.net.InetAddress.impl.lookupAllHostAddr ( local , java.net.InetAddress.NETID_UNSET ) [ 0 ] ; }
Source:
private static void setSymbols ( android.icu.text.DecimalFormatSymbols dfs , java.lang.String [ ] symbols ) { dfs.setCurrencySymbol ( symbols [ 0 ] ) ; dfs.setExponentSeparator ( symbols [ 1 ] ) ; dfs.setInfinity ( symbols [ 2 ] ) ; dfs.setInternationalCurrencySymbol ( symbols [ 3 ] ) ; dfs.setNaN ( symbols [ 4 ] ) ; android.icu.dev.test.serializable.FormatTests.setCharSymbols ( dfs , symbols [ 5 ] . toCharArray ( ) ) ; }

Target:
private static void setSymbols ( android.icu.text.DecimalFormatSymbols dfs , java.lang.String [ ] symbols ) { dfs.setCurrencySymbol ( symbols [ 0 ] ) ; dfs.setExponentSeparator ( symbols [ 1 ] ) ; dfs.setInfinity ( symbols [ 2 ] ) ; dfs.setInternationalCurrencySymbol ( symbols [ 3 ] ) ; dfs.setNaN ( symbols [ 4 ] ) ; android.icu.dev.test.serializable.FormatHandler.setCharSymbols ( dfs , symbols [ 5 ] . toCharArray ( ) ) ; }
Source:
private void showTranscriptionDonationEnabledPreferences ( ) { donateTranscribedVoicemailPreference.setOnPreferenceChangeListener ( this ) ; donateTranscribedVoicemailPreference.setChecked ( voicemailClient.isVoicemailDonationEnabled ( getContext ( ) , phoneAccountHandle ) ) ; donateTranscribedVoicemailPreference.setSummary ( R.string.voicemail_donate_preference_summary_info ) ; donateTranscribedVoicemailPreference.setEnabled ( true ) ; getPreferenceScreen ( ) . addPreference ( donateTranscribedVoicemailPreference ) ; }

Target:
private void showTranscriptionDonationEnabledPreferences ( ) { donateTranscribedVoicemailPreference.setEnabled ( true ) ; donateTranscribedVoicemailPreference.setChecked ( voicemailClient.isVoicemailDonationEnabled ( getContext ( ) , phoneAccountHandle ) ) ; donateTranscribedVoicemailPreference.setOnPreferenceChangeListener ( this ) ; donateTranscribedVoicemailPreference.setSummary ( getVoicemailTranscriptionDonationInformationalText ( ) ) ; getPreferenceScreen ( ) . addPreference ( donateTranscribedVoicemailPreference ) ; }
Source:
public void testNegateMathContextPositive ( ) { java.lang.String a = "92948782094488478231212478987482988429808779810457634781384756794987" ; int aScale = 41 ; int precision = 37 ; java.math.RoundingMode rm = java.math.RoundingMode.FLOOR ; java.math.MathContext mc = new java.math.MathContext ( precision , rm ) ; java.lang.String c = "-929487820944884782312124789.8748298842" ; int cScale = 10 ; java.math.BigDecimal aNumber = new java.math.BigDecimal ( new java.math.BigInteger ( a ) , aScale ) ; java.math.BigDecimal res = aNumber.negate ( mc ) ; assertEquals ( "incorrect value" , c , res.toString ( ) ) ; assertEquals ( "incorrect scale" , cScale , res.scale ( ) ) ; }

Target:
public void testNegateMathContextPositive ( ) { java.lang.String a = "92948782094488478231212478987482988429808779810457634781384756794987" ; int aScale = 41 ; int precision = 37 ; java.math.RoundingMode rm = java.math.RoundingMode.FLOOR ; java.math.MathContext mc = new java.math.MathContext ( precision , rm ) ; java.lang.String c = "-929487820944884782312124789.8748298843" ; int cScale = 10 ; java.math.BigDecimal aNumber = new java.math.BigDecimal ( new java.math.BigInteger ( a ) , aScale ) ; java.math.BigDecimal res = aNumber.negate ( mc ) ; assertEquals ( "incorrect value" , c , res.toString ( ) ) ; assertEquals ( "incorrect scale" , cScale , res.scale ( ) ) ; }
Source:
private void scan ( java.lang.String [ ] directories , java.lang.String volumeName ) { mWakeLock.acquire ( ) ; android.content.ContentValues values = new android.content.ContentValues ( ) ; values.put ( MediaStore.MEDIA_SCANNER_VOLUME , volumeName ) ; android.net.Uri scanUri = getContentResolver ( ) . insert ( android.provider.MediaStore.getMediaScannerUri ( ) , values ) ; android.net.Uri uri = android.net.Uri.parse ( ( "file://" + ( directories [ 0 ] ) ) ) ; sendBroadcast ( new android.content.Intent ( android.content.Intent.ACTION_MEDIA_SCANNER_STARTED , uri ) ) ; try { if ( volumeName.equals ( MediaProvider.EXTERNAL_VOLUME ) ) { openDatabase ( volumeName ) ; } android.media.MediaScanner scanner = createMediaScanner ( ) ; scanner.scanDirectories ( directories , volumeName ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( com.android.providers.media.MediaScannerService.TAG , "exception in MediaScanner.scan()" , e ) ; } getContentResolver ( ) . delete ( scanUri , null , null ) ; sendBroadcast ( new android.content.Intent ( android.content.Intent.ACTION_MEDIA_SCANNER_FINISHED , uri ) ) ; mWakeLock.release ( ) ; }

Target:
private void scan ( java.lang.String [ ] directories , java.lang.String volumeName ) { mWakeLock.acquire ( ) ; try { android.content.ContentValues values = new android.content.ContentValues ( ) ; values.put ( MediaStore.MEDIA_SCANNER_VOLUME , volumeName ) ; android.net.Uri scanUri = getContentResolver ( ) . insert ( android.provider.MediaStore.getMediaScannerUri ( ) , values ) ; android.net.Uri uri = android.net.Uri.parse ( ( "file://" + ( directories [ 0 ] ) ) ) ; sendBroadcast ( new android.content.Intent ( android.content.Intent.ACTION_MEDIA_SCANNER_STARTED , uri ) ) ; if ( volumeName.equals ( MediaProvider.EXTERNAL_VOLUME ) ) { openDatabase ( volumeName ) ; } android.media.MediaScanner scanner = createMediaScanner ( ) ; scanner.scanDirectories ( directories , volumeName ) ; getContentResolver ( ) . delete ( scanUri , null , null ) ; sendBroadcast ( new android.content.Intent ( android.content.Intent.ACTION_MEDIA_SCANNER_FINISHED , uri ) ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( com.android.providers.media.MediaScannerService.TAG , "exception in MediaScanner.scan()" , e ) ; } finally { mWakeLock.release ( ) ; } }
Source:
synchronized void nAllocationRead ( long id , java.lang.Object d , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead ( mContext , id , d , dt.mID ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > getAnnotations ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedPackage pkg ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findPackage ( pkg ) ; if ( c == null ) { return null ; } return c.annotations ; }

Target:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedPackage pkg , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo c = findPackage ( pkg ) ; if ( c == null ) { return null ; } java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = c.getAnnotations ( ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }
Source:
private void notifyLimitReached ( java.lang.String limitName , java.lang.String iface ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . limitReached ( limitName , iface ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void notifyLimitReached ( java.lang.String limitName , java.lang.String iface ) { invokeForAllObservers ( ( o ) -> o.limitReached ( limitName , iface ) ) ; }
Source:
private java.lang.String sanitizeCodename ( @ com.android.annotations.Nullable java.lang.String codename ) { if ( codename != null ) { codename = codename.trim ( ) ; if ( ( ( codename.length ( ) ) == 0 ) || ( SdkConstants.CODENAME_RELEASE.equals ( codename ) ) ) { codename = null ; } } return codename ; }

Target:
private static java.lang.String sanitizeCodename ( @ com.android.annotations.Nullable java.lang.String codename ) { if ( codename != null ) { codename = codename.trim ( ) ; if ( ( codename.isEmpty ( ) ) || ( SdkConstants.CODENAME_RELEASE.equals ( codename ) ) ) { codename = null ; } } return codename ; }
Source:
synchronized long nScriptFieldIDCreate ( long sid , int slot ) { validate ( ) ; return rsnScriptFieldIDCreate ( mContext , sid , slot ) ; }

Target:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params , boolean mUseInc ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , mUseInc ) ; } else { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , params , mUseInc ) ; } }
Source:
private static boolean isUnsupportedForWrapping ( java.lang.String algorithm ) { if ( libcore.javax.crypto.CipherTest.isOnlyWrappingAlgorithm ( algorithm ) ) { return false ; } if ( algorithm.equals ( "RSA/ECB/NOPADDING" ) ) { return true ; } if ( algorithm.startsWith ( "AES" ) ) { return true ; } return false ; }

Target:
private static boolean isSupportedForWrapping ( java.lang.String algorithm ) { if ( libcore.javax.crypto.CipherTest.isOnlyWrappingAlgorithm ( algorithm ) ) { return true ; } if ( algorithm.equals ( "RSA/ECB/NOPADDING" ) ) { return false ; } if ( algorithm.startsWith ( "AES" ) ) { return false ; } return true ; }
Source:
public static org.conscrypt.OpenSSLX509Certificate fromX509PemInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { @ java.lang.SuppressWarnings ( value = "resource" ) final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is ) ; try { final long certCtx = org.conscrypt.NativeCrypto.PEM_read_bio_X509 ( bis.getBioContext ( ) ) ; if ( certCtx == 0L ) { return null ; } return new org.conscrypt.OpenSSLX509Certificate ( certCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { org.conscrypt.NativeCrypto.BIO_free ( bis.getBioContext ( ) ) ; } }

Target:
public static org.conscrypt.OpenSSLX509Certificate fromX509PemInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { @ java.lang.SuppressWarnings ( value = "resource" ) final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is ) ; try { final long certCtx = org.conscrypt.NativeCrypto.PEM_read_bio_X509 ( bis.getBioContext ( ) ) ; if ( certCtx == 0L ) { return null ; } return new org.conscrypt.OpenSSLX509Certificate ( certCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { bis.release ( ) ; } }
Source:
public com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile getFile ( org.eclipse.core.resources.IFile file ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { com.android.io.IAbstractFile abstractFile = f.getFile ( ) ; if ( abstractFile instanceof com.android.ide.eclipse.adt.io.IFileWrapper ) { org.eclipse.core.resources.IFile iFile = ( ( com.android.ide.eclipse.adt.io.IFileWrapper ) ( f.getFile ( ) ) ) . getIFile ( ) ; if ( ( iFile != null ) && ( iFile.equals ( file ) ) ) { return f ; } } } } return null ; }

Target:
protected void dispose ( ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile file : mFiles ) { file.dispose ( ) ; } mFiles.clear ( ) ; }
Source:
public void onClose ( ) { if ( com.android.bluetooth.opp.BluetoothOppObexServerSession.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppObexServerSession.TAG , "release WakeLock" ) ; if ( mWakeLock.isHeld ( ) ) { mWakeLock.release ( ) ; } if ( mPartialWakeLock.isHeld ( ) ) { mPartialWakeLock.release ( ) ; } if ( ( mCallback ) != null ) { android.os.Message msg = android.os.Message.obtain ( mCallback ) ; msg.what = BluetoothOppObexSession.MSG_SESSION_COMPLETE ; msg.obj = mInfo ; msg.sendToTarget ( ) ; } }

Target:
public void onClose ( ) { if ( com.android.bluetooth.opp.BluetoothOppObexServerSession.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppObexServerSession.TAG , "release WakeLock" ) ; releaseWakeLocks ( ) ; if ( ( mCallback ) != null ) { android.os.Message msg = android.os.Message.obtain ( mCallback ) ; msg.what = BluetoothOppObexSession.MSG_SESSION_COMPLETE ; msg.obj = mInfo ; msg.sendToTarget ( ) ; } }
Source:
android.net.wifi.WifiInfo getWifiInfo ( ) { android.net.wifi.WifiInfo wifiInfo = mock ( android.net.wifi.WifiInfo.class ) ; when ( wifiInfo.is24GHz ( ) ) . thenReturn ( true ) ; when ( wifiInfo.is5GHz ( ) ) . thenReturn ( false ) ; when ( wifiInfo.getRssi ( ) ) . thenReturn ( ( - 70 ) ) ; when ( wifiInfo.getNetworkId ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; when ( wifiInfo.getBSSID ( ) ) . thenReturn ( null ) ; return wifiInfo ; }

Target:
private void setupWifiConfigManager ( ) { when ( mWifiConfigManager.getLastSelectedNetwork ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; }
Source:
public void setScanInterval ( int scanInterval ) { doBooleanCommand ( ( "SCAN_INTERVAL " + scanInterval ) ) ; }

Target:
public void startTdls ( java.lang.String macAddr , boolean enable ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { if ( enable ) { mSupplicantStaIfaceHal.initiateTdlsDiscover ( macAddr ) ; mSupplicantStaIfaceHal.initiateTdlsSetup ( macAddr ) ; } else { mSupplicantStaIfaceHal.initiateTdlsTeardown ( macAddr ) ; } } else { if ( enable ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { doBooleanCommand ( ( "TDLS_DISCOVER " + macAddr ) ) ; doBooleanCommand ( ( "TDLS_SETUP " + macAddr ) ) ; } } else { doBooleanCommand ( ( "TDLS_TEARDOWN " + macAddr ) ) ; } } }
Source:
private static java.lang.String toUnsignedString0 ( int i , int shift ) { char [ ] buf = new char [ 32 ] ; int charPos = 32 ; int radix = 1 << shift ; int mask = radix - 1 ; do { buf [ ( -- charPos ) ] = java.lang.Integer.digits [ ( i & mask ) ] ; i >>>= shift ; } while ( i != 0 ) ; return new java.lang.String ( buf , charPos , ( 32 - charPos ) ) ; }

Target:
static int formatUnsignedInt ( int val , int shift , char [ ] buf , int offset , int len ) { int charPos = len ; int radix = 1 << shift ; int mask = radix - 1 ; do { buf [ ( offset + ( -- charPos ) ) ] = java.lang.Integer.digits [ ( val & mask ) ] ; val >>>= shift ; } while ( ( val != 0 ) && ( charPos > 0 ) ) ; return charPos ; }
Source:
public void error ( java.lang.Throwable error ) { java.lang.String message = error.getMessage ( ) ; if ( message == null ) { message = error.getClass ( ) . getName ( ) ; } java.io.PrintStream ps = new java.io.PrintStream ( com.android.ide.eclipse.adt.AdtPlugin.getErrorStream ( ) ) ; error.printStackTrace ( ps ) ; }

Target:
public void error ( java.lang.String tag , java.lang.Throwable throwable ) { java.lang.String message = throwable.getMessage ( ) ; if ( message == null ) { message = throwable.getClass ( ) . getName ( ) ; } java.io.PrintStream ps = new java.io.PrintStream ( com.android.ide.eclipse.adt.AdtPlugin.getErrorStream ( ) ) ; throwable.printStackTrace ( ps ) ; }
Source:
private void assertCalendarEquals ( java.util.Calendar calendar , int year , int month , int day , int hour , int minute ) { assertEquals ( year , calendar.get ( java.util.Calendar.YEAR ) ) ; assertEquals ( month , calendar.get ( java.util.Calendar.MONTH ) ) ; assertEquals ( day , calendar.get ( java.util.Calendar.DATE ) ) ; assertEquals ( hour , calendar.get ( java.util.Calendar.HOUR_OF_DAY ) ) ; assertEquals ( minute , calendar.get ( java.util.Calendar.MINUTE ) ) ; }

Target:
private void assertCalendarEquals ( java.util.Calendar calendar , int year , int month , int day , int hour , int minute ) { assertEquals ( "year" , year , calendar.get ( java.util.Calendar.YEAR ) ) ; assertEquals ( "month" , month , calendar.get ( java.util.Calendar.MONTH ) ) ; assertEquals ( "day" , day , calendar.get ( java.util.Calendar.DATE ) ) ; assertEquals ( "hour" , hour , calendar.get ( java.util.Calendar.HOUR_OF_DAY ) ) ; assertEquals ( "minute" , minute , calendar.get ( java.util.Calendar.MINUTE ) ) ; }
Source:
public void onClick ( android.view.View v ) { java.lang.String subject = mCallSubjectView.getText ( ) . toString ( ) ; android.content.Intent intent = new com.android.dialer.callintent.CallIntentBuilder ( mNumber , CallInitiationType.Type.CALL_SUBJECT_DIALOG ) . setPhoneAccountHandle ( mPhoneAccountHandle ) . setCallSubject ( subject ) . build ( ) ; getSystemService ( android.telecom.TelecomManager.class ) . placeCall ( intent.getData ( ) , intent.getExtras ( ) ) ; mSubjectHistory.add ( subject ) ; saveSubjectHistory ( mSubjectHistory ) ; finish ( ) ; }

Target:
public void onClick ( android.view.View v ) { java.lang.String subject = mCallSubjectView.getText ( ) . toString ( ) ; com.android.dialer.precall.PreCall.start ( this , new com.android.dialer.callintent.CallIntentBuilder ( mNumber , CallInitiationType.Type.CALL_SUBJECT_DIALOG ) . setPhoneAccountHandle ( mPhoneAccountHandle ) . setCallSubject ( subject ) ) ; mSubjectHistory.add ( subject ) ; saveSubjectHistory ( mSubjectHistory ) ; finish ( ) ; }
Source:
public boolean removeAll ( final java.util.Collection < ? > c ) { com.google.common.base.Preconditions.checkNotNull ( c ) ; com.google.common.base.Predicate < java.util.Map.Entry < R , V > > predicate = new com.google.common.base.Predicate < java.util.Map.Entry < R , V > > ( ) { @ java.lang.Override public boolean apply ( java.util.Map.Entry < R , V > entry ) { return c.contains ( entry.getValue ( ) ) ; } } ; return removePredicate ( predicate ) ; }

Target:
public boolean retainAll ( java.util.Collection < ? > c ) { com.google.common.base.Preconditions.checkNotNull ( c ) ; boolean changed = false ; for ( C columnKey : com.google.common.collect.Lists.newArrayList ( columnKeySet ( ) . iterator ( ) ) ) { if ( ! ( c.contains ( com.google.common.collect.Maps.immutableEntry ( columnKey , column ( columnKey ) ) ) ) ) { removeColumn ( columnKey ) ; changed = true ; } } return changed ; }
Source:
public java.lang.String getGradleBuildscript ( ) { return ( ( ( ( ( ( ( ( ( "buildscript {\n" + ( " repositories {\n" + " maven { url '" ) ) + ( getRepoDir ( ) . toString ( ) ) ) + "\' }\n" ) + " }\n" ) + " dependencies {\n" ) + " classpath \"com.android.tools.build:gradle:" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.ANDROID_GRADLE_VERSION ) ) + "\"\n" ) + " }\n" ) + "}\n" ; }

Target:
public java.lang.String getGradleBuildscript ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "buildscript {\n" + ( " repositories {\n" + " maven { url '" ) ) + ( getRepoDir ( ) . toString ( ) ) ) + "\' }\n" ) + " }\n" ) + " dependencies {\n" ) + " classpath \"com.android.tools.build:gradle:" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.ANDROID_GRADLE_VERSION ) ) + "\"\n" ) + " classpath \"com.android.tools.build:gradle-experimental:" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.ANDROID_GRADLE_VERSION ) ) + "\"\n" ) + " }\n" ) + "}\n" ; }
Source:
protected boolean onLevelChange ( int state ) { setNumLevels ( com.android.systemui.statusbar.phone.SignalDrawable.getNumLevels ( state ) ) ; setSignalState ( com.android.systemui.statusbar.phone.SignalDrawable.getState ( state ) ) ; int level = com.android.systemui.statusbar.phone.SignalDrawable.getLevel ( state ) ; if ( level != ( mLevel ) ) { mLevel = level ; invalidateSelf ( ) ; } return true ; }

Target:
protected boolean onLevelChange ( int state ) { setNumLevels ( com.android.settingslib.graph.SignalDrawable.getNumLevels ( state ) ) ; setSignalState ( com.android.settingslib.graph.SignalDrawable.getState ( state ) ) ; int level = com.android.settingslib.graph.SignalDrawable.getLevel ( state ) ; if ( level != ( mLevel ) ) { mLevel = level ; invalidateSelf ( ) ; } return true ; }
Source:
public void testKeyStore_GetCertificateAlias_CAEntry_Encrypted_Success ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; 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 ) ) ; assertEquals ( "Stored certificate alias should be found" , android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , mKeyStore.getCertificateAlias ( actual ) ) ; }

Target:
public void testKeyStore_GetKey_Certificate_Encrypted_Failure ( ) throws java.lang.Exception { setupPassword ( ) ; mKeyStore.load ( null , null ) ; assertTrue ( mAndroidKeyStore.put ( ( ( Credentials.CA_CERTIFICATE ) + ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 ) ) , android.security.AndroidKeyStoreTest.FAKE_RSA_CA_1 , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertNull ( "Certificate entries should return null" , mKeyStore.getKey ( android.security.AndroidKeyStoreTest.TEST_ALIAS_1 , null ) ) ; }
Source:
public static boolean waitFor ( java.util.concurrent.CountDownLatch latch ) throws java.lang.InterruptedException { for ( int i = 0 ; i < ( android.location.cts.TestUtils.STANDARD_WAIT_TIME_ROUNDS ) ; ++ i ) { java.lang.Thread.sleep ( android.location.cts.TestUtils.STANDARD_SLEEP_TIME_MS ) ; if ( latch.await ( android.location.cts.TestUtils.STANDARD_WAIT_TIME_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) { return true ; } } return false ; }

Target:
public static boolean waitFor ( java.util.concurrent.CountDownLatch latch , int timeInSec ) throws java.lang.InterruptedException { long waitTimeRounds = ( java.util.concurrent.TimeUnit.SECONDS.toMillis ( timeInSec ) ) / ( ( android.location.cts.TestUtils.STANDARD_WAIT_TIME_MS ) + ( android.location.cts.TestUtils.STANDARD_SLEEP_TIME_MS ) ) ; for ( int i = 0 ; i < waitTimeRounds ; ++ i ) { java.lang.Thread.sleep ( android.location.cts.TestUtils.STANDARD_SLEEP_TIME_MS ) ; if ( latch.await ( android.location.cts.TestUtils.STANDARD_WAIT_TIME_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) { return true ; } } return false ; }
Source:
public void widgetDefaultSelected ( org.eclipse.swt.events.SelectionEvent e ) { java.lang.Object selection = ( ( org.eclipse.swt.widgets.TreeItem ) ( e.item ) ) . getData ( ) ; if ( selection instanceof com.android.ddmlib.IDevice ) { com.android.hierarchyviewerlib.ComponentRegistry.getDirector ( ) . loadPixelPerfectData ( ( ( com.android.ddmlib.IDevice ) ( selection ) ) ) ; } }

Target:
public void widgetDefaultSelected ( org.eclipse.swt.events.SelectionEvent e ) { java.lang.Object selection = ( ( org.eclipse.swt.widgets.TreeItem ) ( e.item ) ) . getData ( ) ; if ( selection instanceof com.android.ddmlib.IDevice ) { com.android.hierarchyviewerlib.ComponentRegistry.getDirector ( ) . loadPixelPerfectData ( ( ( com.android.ddmlib.IDevice ) ( selection ) ) ) ; } else if ( selection instanceof com.android.hierarchyviewerlib.device.Window ) { com.android.hierarchyviewerlib.ComponentRegistry.getDirector ( ) . loadViewTreeData ( ( ( com.android.hierarchyviewerlib.device.Window ) ( selection ) ) ) ; } }
Source:
private static void saveUnit ( android.icu.text.DecimalFormat.Unit unit , java.lang.String pluralVariant , int idx , java.util.Map < java.lang.String , android.icu.text.DecimalFormat [ ] > units ) { android.icu.text.DecimalFormat [ ] byBase = units.get ( pluralVariant ) ; if ( byBase == null ) { byBase = new android.icu.text.DecimalFormat.Unit [ android.icu.text.CompactDecimalDataCache.MAX_DIGITS ] ; units.put ( pluralVariant , byBase ) ; } byBase [ idx ] = unit ; }

Target:
private static boolean saveUnit ( android.icu.text.DecimalFormat.Unit unit , java.lang.String pluralVariant , int idx , java.util.Map < java.lang.String , android.icu.text.DecimalFormat [ ] > units , boolean overwrite ) { android.icu.text.DecimalFormat [ ] byBase = units.get ( pluralVariant ) ; if ( byBase == null ) { byBase = new android.icu.text.DecimalFormat.Unit [ android.icu.text.CompactDecimalDataCache.MAX_DIGITS ] ; units.put ( pluralVariant , byBase ) ; } if ( ( ! overwrite ) && ( ( byBase [ idx ] ) != null ) ) { return false ; } byBase [ idx ] = unit ; return true ; }
Source:
public void forEachRemaining ( java.util.function.Consumer < ? super E > action ) { java.util.Objects.requireNonNull ( action ) ; final int size = snapshot.length ; for ( int i = cursor ; i < size ; i ++ ) { action.accept ( ( ( E ) ( snapshot [ i ] ) ) ) ; } cursor = size ; }

Target:
public void forEachRemaining ( java.util.function.Consumer < ? super E > action ) { java.util.Objects.requireNonNull ( action ) ; java.lang.Object [ ] elements = snapshot ; for ( int i = index ; i < ( to ) ; i ++ ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E e = ( ( E ) ( elements [ i ] ) ) ; action.accept ( e ) ; } index = to ; }