auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean disableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { } return false ; }

Target:
public boolean disableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.disableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to disable supplicant due to remote exception" ) ; } return false ; }
Source:
private void placeNewCallWithPhoneAccount ( android.os.Bundle extras , int videoState ) { if ( extras == null ) { extras = new android.os.Bundle ( ) ; } extras.putParcelable ( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE , TestUtils.TEST_PHONE_ACCOUNT_HANDLE ) ; if ( ! ( android.telecom.VideoProfile.isAudioOnly ( videoState ) ) ) { extras.putInt ( TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE , videoState ) ; } mTelecomManager.placeCall ( createTestNumber ( ) , extras ) ; }

Target:
private void placeNewCallWithPhoneAccount ( android.os.Bundle extras , int videoState ) { if ( extras == null ) { extras = new android.os.Bundle ( ) ; } if ( ! ( extras.containsKey ( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE ) ) ) { extras.putParcelable ( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE , TestUtils.TEST_PHONE_ACCOUNT_HANDLE ) ; } if ( ! ( android.telecom.VideoProfile.isAudioOnly ( videoState ) ) ) { extras.putInt ( TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE , videoState ) ; } mTelecomManager.placeCall ( createTestNumber ( ) , extras ) ; }
Source:
public int getPermissionGrantState ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName , java.lang.String permission ) { throwIfParentInstance ( "getPermissionGrantState" ) ; try { return mService.getPermissionGrantState ( admin , packageName , permission ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } }

Target:
public boolean setApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName , boolean hidden ) { throwIfParentInstance ( "setApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.setApplicationHidden ( admin , mContext.getPackageName ( ) , packageName , hidden ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
public static java.lang.String getOutputDirectoryName ( org.gradle.nativebinaries.NativeBinary binary ) { return com.google.common.base.Joiner.on ( java.io.File.separator ) . join ( AndroidProject.FD_INTERMEDIATES , "binaries" , binary.getName ( ) , binary.getBuildType ( ) . getName ( ) , binary.getFlavor ( ) . getName ( ) , "lib" , binary.getTargetPlatform ( ) . getName ( ) ) ; }

Target:
public static java.lang.String getOutputDirectoryName ( org.gradle.nativebinaries.NativeBinary binary ) { return com.google.common.base.Joiner.on ( java.io.File.separator ) . join ( AndroidProject.FD_INTERMEDIATES , "binaries" , binary.getDisplayName ( ) , binary.getBuildType ( ) . getName ( ) , binary.getFlavor ( ) . getName ( ) , "lib" , binary.getTargetPlatform ( ) . getName ( ) ) ; }
Source:
public org.eclipse.ltk.core.refactoring.RefactoringStatus checkFinalConditions ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException , org.eclipse.core.runtime.OperationCanceledException { org.eclipse.ltk.core.refactoring.RefactoringStatus status = new org.eclipse.ltk.core.refactoring.RefactoringStatus ( ) ; mChanges = new java.util.ArrayList < org.eclipse.ltk.core.refactoring.Change > ( ) ; try { monitor.beginTask ( "Checking post-conditions..." , 5 ) ; java.util.List < org.eclipse.ltk.core.refactoring.Change > changes = computeChanges ( ) ; mChanges.addAll ( changes ) ; monitor.worked ( 1 ) ; } finally { monitor.done ( ) ; } return status ; }

Target:
public org.eclipse.ltk.core.refactoring.RefactoringStatus checkFinalConditions ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException , org.eclipse.core.runtime.OperationCanceledException { org.eclipse.ltk.core.refactoring.RefactoringStatus status = new org.eclipse.ltk.core.refactoring.RefactoringStatus ( ) ; mChanges = new java.util.ArrayList < org.eclipse.ltk.core.refactoring.Change > ( ) ; try { monitor.beginTask ( "Checking post-conditions..." , 5 ) ; mGeneratedIdMap.clear ( ) ; mGeneratedIds.clear ( ) ; java.util.List < org.eclipse.ltk.core.refactoring.Change > changes = computeChanges ( ) ; mChanges.addAll ( changes ) ; monitor.worked ( 1 ) ; } finally { monitor.done ( ) ; } return status ; }
Source:
public static < K , V > com.google.common.collect.Multimap < K , V > filterEntries ( com.google.common.collect.Multimap < K , V > unfiltered , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Preconditions.checkNotNull ( entryPredicate ) ; return unfiltered instanceof com.google.common.collect.Multimaps.FilteredMultimap ? com.google.common.collect.Multimaps.filterFiltered ( ( ( com.google.common.collect.Multimaps.FilteredMultimap < K , V > ) ( unfiltered ) ) , entryPredicate ) : new com.google.common.collect.Multimaps.FilteredMultimap < K , V > ( com.google.common.base.Preconditions.checkNotNull ( unfiltered ) , entryPredicate ) ; }

Target:
public static < K , V > com.google.common.collect.Multimap < K , V > filterValues ( com.google.common.collect.Multimap < K , V > unfiltered , final com.google.common.base.Predicate < ? super V > valuePredicate ) { return com.google.common.collect.Multimaps.filterEntries ( unfiltered , com.google.common.collect.Maps.< V > valuePredicateOnEntries ( valuePredicate ) ) ; }
Source:
static < E > com.google.common.collect.ImmutableSortedSet < E > construct ( java.util.Comparator < ? super E > comparator , int n , E ... contents ) { int uniques = com.google.common.collect.ImmutableSortedSet.sortAndUnique ( comparator , n , contents ) ; if ( uniques == 0 ) { return com.google.common.collect.ImmutableSortedSet.emptySet ( comparator ) ; } else if ( uniques < ( contents.length ) ) { contents = com.google.common.collect.ObjectArrays.arraysCopyOf ( contents , uniques ) ; } return new com.google.common.collect.RegularImmutableSortedSet < E > ( com.google.common.collect.ImmutableList.< E > asImmutableList ( contents ) , comparator ) ; }

Target:
com.google.common.collect.ImmutableSortedSet < E > createDescendingSet ( ) { return new com.google.common.collect.DescendingImmutableSortedSet < E > ( this ) ; }
Source:
public void setChecked ( boolean checked ) { if ( ( mChecked ) != checked ) { mChecked = checked ; setTextColor ( ( checked ? getContext ( ) . getColor ( R.color.bubble_button_text_color_blue ) : getContext ( ) . getColor ( R.color.bubble_button_text_color_black ) ) ) ; } }

Target:
public void setChecked ( boolean checked ) { if ( ( mChecked ) != checked ) { mChecked = checked ; int newColor = ( checked ) ? getContext ( ) . getColor ( R.color.bubble_button_color_blue ) : getContext ( ) . getColor ( R.color.bubble_button_color_grey ) ; setTextColor ( newColor ) ; setCompoundDrawableTintList ( android.content.res.ColorStateList.valueOf ( newColor ) ) ; } }
Source:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.bluetooth.sdp.SdpManager.MESSAGE_SDP_INTENT : com.android.bluetooth.sdp.SdpManager.SdpSearchInstance msgObj = ( ( com.android.bluetooth.sdp.SdpManager.SdpSearchInstance ) ( msg.obj ) ) ; android.util.Log.w ( com.android.bluetooth.sdp.SdpManager.TAG , ( "Search timedout for UUID " + ( msgObj.getUuid ( ) ) ) ) ; synchronized ( com.android.bluetooth.sdp.SdpManager.mTrackerLock ) { sendSdpIntent ( msgObj , null , false ) ; } break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.bluetooth.sdp.SdpManager.MESSAGE_SDP_INTENT : com.android.bluetooth.sdp.SdpManager.SdpSearchInstance msgObj = ( ( com.android.bluetooth.sdp.SdpManager.SdpSearchInstance ) ( msg.obj ) ) ; android.util.Log.w ( com.android.bluetooth.sdp.SdpManager.TAG , ( "Search timedout for UUID " + ( msgObj.getUuid ( ) ) ) ) ; synchronized ( com.android.bluetooth.sdp.SdpManager.TRACKER_LOCK ) { sendSdpIntent ( msgObj , null , false ) ; } break ; } }
Source:
public android.graphics.Bitmap getFavicon ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.graphics.Bitmap ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.graphics.Bitmap > ( ) { @ java.lang.Override public android.graphics.Bitmap call ( ) { return getFavicon ( ) ; } } ) ; return ret ; } return mAwContents.getFavicon ( ) ; }

Target:
public boolean isPaused ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return isPaused ( ) ; } } ) ; return ret ; } return mAwContents.isPaused ( ) ; }
Source:
public void test_55129 ( ) throws java.lang.Exception { assertEquals ( "-h-e-l-l-o- -w-o-r-l-d-" , "hello world" . replace ( "" , "-" ) ) ; assertEquals ( "-w-o-r-l-d-" , "hello world" . substring ( 6 ) . replace ( "" , "-" ) ) ; assertEquals ( "-*-w-*-o-*-r-*-l-*-d-*-" , "hello world" . substring ( 6 ) . replace ( "" , "-*-" ) ) ; }

Target:
public void test_55129 ( ) throws java.lang.Exception { assertEquals ( "-h-e-l-l-o- -w-o-r-l-d-" , "hello world" . replace ( "" , "-" ) ) ; assertEquals ( "-w-o-r-l-d-" , "hello world" . substring ( 6 ) . replace ( "" , "-" ) ) ; assertEquals ( "-*-w-*-o-*-r-*-l-*-d-*-" , "hello world" . substring ( 6 ) . replace ( "" , "-*-" ) ) ; assertEquals ( "" , "" . replace ( "" , "" ) ) ; assertEquals ( "food" , "" . replace ( "" , "food" ) ) ; }
Source:
public com.android.dialer.historyitemactions.HistoryItemActionModulesBuilder addModuleForSendingTextMessage ( ) { if ( ( ( ( isEmergencyNumber ( ) ) || ( moduleInfo.getIsVoicemailCall ( ) ) ) || ( moduleInfo.getIsBlocked ( ) ) ) || ( android.text.TextUtils.isEmpty ( moduleInfo.getNormalizedNumber ( ) ) ) ) { return this ; } modules.add ( com.android.dialer.historyitemactions.IntentModule.newModuleForSendingTextMessage ( context , moduleInfo.getNormalizedNumber ( ) ) ) ; return this ; }

Target:
public com.android.dialer.historyitemactions.HistoryItemActionModulesBuilder addModuleForSendingTextMessage ( ) { if ( ( ( ( moduleInfo.getIsEmergencyNumber ( ) ) || ( moduleInfo.getIsVoicemailCall ( ) ) ) || ( moduleInfo.getIsBlocked ( ) ) ) || ( android.text.TextUtils.isEmpty ( moduleInfo.getNormalizedNumber ( ) ) ) ) { return this ; } modules.add ( com.android.dialer.historyitemactions.IntentModule.newModuleForSendingTextMessage ( context , moduleInfo.getNormalizedNumber ( ) ) ) ; return this ; }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 " ) ; if ( dexfuzz.Options.executeOnHost ) { commandBuilder.append ( device.getHostExecutionFlags ( ) ) . append ( " " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }

Target:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 -Xcompiler-option --compiler-backend=Quick " ) ; if ( dexfuzz.Options.executeOnHost ) { commandBuilder.append ( device.getHostExecutionFlags ( ) ) . append ( " " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }
Source:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , com.google.common.util.concurrent.AsyncFunction < ? super I , ? extends O > function , java.util.concurrent.Executor executor ) { com.google.common.util.concurrent.Futures.ChainingListenableFuture < I , O > output = new com.google.common.util.concurrent.Futures.ChainingListenableFuture < I , O > ( function , input ) ; input.addListener ( output , executor ) ; return output ; }

Target:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , final com.google.common.base.Function < ? super I , ? extends O > function , java.util.concurrent.Executor executor ) { com.google.common.base.Preconditions.checkNotNull ( function ) ; return com.google.common.util.concurrent.Futures.transform ( input , com.google.common.util.concurrent.Futures.asAsyncFunction ( function ) , executor ) ; }
Source:
public void testOnWindowFocusChanged ( ) throws java.lang.Throwable { popDialog ( DialogStubActivity.TEST_ONSTART_AND_ONSTOP ) ; final android.app.cts.TestDialog d = ( ( android.app.cts.TestDialog ) ( mActivity.getDialog ( ) ) ) ; assertTrue ( d.isOnWindowFocusChangedCalled ) ; d.isOnWindowFocusChangedCalled = false ; runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mActivity.showDialog ( DialogStubActivity.TEST_DIALOG_WITHOUT_THEME ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; assertTrue ( d.isOnWindowFocusChangedCalled ) ; }

Target:
protected boolean check ( ) { return d.isOnWindowFocusChangedCalled ; }
Source:
public void testConnect ( ) { if ( skipTest ( ) ) return ; android.bluetooth.BluetoothDevice device = makeBluetoothDevice ( "11:11:11:11:11:11" ) ; org.junit.Assert.assertNull ( mService.getInstanceMap ( ) . get ( device ) ) ; org.junit.Assert.assertTrue ( mService.connect ( device ) ) ; java.util.Map < android.bluetooth.BluetoothDevice , com.android.bluetooth.mapclient.MceStateMachine > map = mService.getInstanceMap ( ) ; org.junit.Assert.assertEquals ( 1 , map.size ( ) ) ; org.junit.Assert.assertNotNull ( map.get ( device ) ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ! ( mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_mapmce ) ) ) { return ; } com.android.bluetooth.TestUtils.stopService ( mServiceRule , com.android.bluetooth.mapclient.MapClientService.class ) ; mService = com.android.bluetooth.mapclient.MapClientService.getMapClientService ( ) ; org.junit.Assert.assertNull ( mService ) ; com.android.bluetooth.TestUtils.clearAdapterService ( mAdapterService ) ; }
Source:
private static android.net.Uri getUriForFile ( android.content.Context context , java.io.File file ) { java.lang.String path = ( ( android.net.Uri.encode ( "bugreports" ) ) + '/' ) + ( android.net.Uri.encode ( file.getName ( ) , "/" ) ) ; return new android.net.Uri.Builder ( ) . scheme ( "content" ) . authority ( com.android.traceur.FileSender.AUTHORITY ) . encodedPath ( path ) . build ( ) ; }

Target:
private static android.net.Uri getUriForFile ( android.content.Context context , java.io.File file ) { return android.support.v4.content.FileProvider.getUriForFile ( context , com.android.traceur.FileSender.AUTHORITY , file ) ; }
Source:
private boolean replaceAttribute ( int attributesCount , proguard.classfile.editor.Attribute [ ] attributes , proguard.classfile.editor.Attribute attribute ) { int index = findAttribute ( attributesCount , attributes , attribute.getAttributeName ( targetClass ) ) ; if ( index < 0 ) { return false ; } attributes [ index ] = attribute ; return true ; }

Target:
private boolean replaceAttribute ( int attributesCount , proguard.classfile.editor.Attribute [ ] attributes , proguard.classfile.editor.Attribute attribute ) { int index = findAttributeIndex ( attributesCount , attributes , attribute.getAttributeName ( targetClass ) ) ; if ( index < 0 ) { return false ; } attributes [ index ] = attribute ; return true ; }
Source:
private void setupExtras ( ) { android.os.Bundle extras = new android.os.Bundle ( ) ; extras.putString ( android.telecom.cts.ConferenceTest.TEST_EXTRA_KEY_1 , android.telecom.cts.ConferenceTest.TEST_EXTRA_VALUE_1 ) ; extras.putInt ( android.telecom.cts.ConferenceTest.TEST_EXTRA_KEY_2 , android.telecom.cts.ConferenceTest.TEST_EXTRA_VALUE_2 ) ; mConferenceObject.putExtras ( extras ) ; mOnExtrasChangedCounter.waitForCount ( 1 ) ; }

Target:
private void setupExtras ( ) { android.os.Bundle extras = new android.os.Bundle ( ) ; extras.putString ( android.telecom.cts.ConferenceTest.TEST_EXTRA_KEY_1 , android.telecom.cts.ConferenceTest.TEST_EXTRA_VALUE_1 ) ; extras.putInt ( android.telecom.cts.ConferenceTest.TEST_EXTRA_KEY_2 , android.telecom.cts.ConferenceTest.TEST_EXTRA_VALUE_2 ) ; int startInvokeCount = mOnExtrasChangedCounter.getInvokeCount ( ) ; mConferenceObject.putExtras ( extras ) ; mOnExtrasChangedCounter.waitForCount ( ( startInvokeCount + 1 ) , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS ) ; }
Source:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; android.net.wifi.hotspot2.pps.HomeSP homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; homeSp.setFqdn ( "test1" ) ; config.setHomeSp ( homeSp ) ; android.net.wifi.hotspot2.pps.Credential credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; credential.setUserCredential ( new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ) ; config.setCredential ( credential ) ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.getHomeSp ( ) . setFqdn ( "test2" ) ; verifyInstalledConfig ( config , false ) ; }

Target:
public void verifyModifyOriginalConfig ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; android.net.wifi.hotspot2.pps.HomeSp homeSp = new android.net.wifi.hotspot2.pps.HomeSp ( ) ; homeSp.setFqdn ( "test1" ) ; config.setHomeSp ( homeSp ) ; android.net.wifi.hotspot2.pps.Credential credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; credential.setUserCredential ( new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ) ; config.setCredential ( credential ) ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.getHomeSp ( ) . setFqdn ( "test2" ) ; verifyInstalledConfig ( config , false ) ; }
Source:
public java.lang.String toSafeString ( ) { return android.net.MacAddress.stringAddrFromLongAddr ( ( ( mAddr ) & ( android.net.MacAddress.OUI_MASK ) ) ) ; }

Target:
public java.lang.String toOuiString ( ) { return java.lang.String.format ( "%02x:%02x:%02x" , ( ( ( mAddr ) > > 40 ) & 255 ) , ( ( ( mAddr ) > > 32 ) & 255 ) , ( ( ( mAddr ) > > 24 ) & 255 ) ) ; }
Source:
public boolean onHoverEvent ( final android.view.MotionEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onHoverEvent ( event ) ; } } ) ; return ret ; } return mAwContents.onHoverEvent ( event ) ; }

Target:
public boolean onTouchEvent ( final android.view.MotionEvent ev ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onTouchEvent ( ev ) ; } } ) ; return ret ; } return mAwContents.onTouchEvent ( ev ) ; }
Source:
public void copy ( @ javax.annotation.Nonnull com.android.sched.vfs.VFile vFile ) throws com.android.sched.util.file.WrongPermissionException , java.io.IOException { java.io.InputStream is = getInputStream ( ) ; java.io.OutputStream os = vFile.getOutputStream ( ) ; try { new com.android.sched.util.stream.LocationByteStreamSucker ( is , os , this , vFile ) . suck ( ) ; } finally { os.close ( ) ; is.close ( ) ; } }

Target:
public void copy ( @ javax.annotation.Nonnull com.android.sched.vfs.VFile vFile ) throws com.android.sched.util.file.CannotCloseInputException , com.android.sched.util.file.CannotCloseOutputException , com.android.sched.util.file.CannotReadException , com.android.sched.util.file.CannotWriteException , com.android.sched.util.file.WrongPermissionException { try ( java.io.InputStream is = getInputStream ( ) ) { try ( java.io.OutputStream os = vFile.getOutputStream ( ) ) { new com.android.sched.util.stream.LocationByteStreamSucker ( is , os , this , vFile ) . suck ( ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseOutputException ( vFile , e ) ; } } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseInputException ( this , e ) ; } }
Source:
void onExtrasChanged ( com.android.server.telecom.Call call , android.os.Bundle extras ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "onExtrasChanged" ) ) ) { try { logOutgoing ( "onExtrasChanged %s %s" , callId , extras ) ; mServiceInterface.onExtrasChanged ( callId , extras ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void pullExternalCall ( com.android.server.telecom.Call call ) { final java.lang.String callId = mCallIdMapper.getCallId ( call ) ; if ( ( callId != null ) && ( isServiceValid ( "pullExternalCall" ) ) ) { try { logOutgoing ( "pullExternalCall %s" , callId ) ; mServiceInterface.pullExternalCall ( callId , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public void readContent ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.JayceInternalReaderImpl in ) throws java.io.IOException { modifiers = in.readInt ( ) ; type = in.readId ( ) ; name = in.readId ( ) ; initialValue = in.readNode ( com.android.jack.jayce.v0002.nodes.NLiteral.class ) ; annotations = in.readNodes ( com.android.jack.jayce.v0002.nodes.NAnnotationLiteral.class ) ; markers = in.readNodes ( com.android.jack.jayce.v0002.nodes.NMarker.class ) ; }

Target:
public void readContent ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.JayceInternalReaderImpl in ) throws java.io.IOException { modifiers = in.readInt ( ) ; type = in.readId ( ) ; name = in.readId ( ) ; initialValue = in.readNode ( com.android.jack.jayce.v0002.nodes.NLiteral.class ) ; annotations = in.readNodes ( com.android.jack.jayce.v0002.nodes.NAnnotation.class ) ; markers = in.readNodes ( com.android.jack.jayce.v0002.nodes.NMarker.class ) ; }
Source:
public void test_parkFor_2 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; waiterThread.join ( ) ; parkerThread.join ( ) ; }

Target:
public void test_parkFor_2 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; waiterThread.join ( ) ; parkerThread.join ( ) ; }
Source:
public byte [ ] addCustomExtension ( int ext_type ) { throw new java.lang.RuntimeException ( "expected" ) ; }

Target:
private static void assertContains ( java.lang.String actualValue , java.lang.String expectedSubstring ) { if ( actualValue == null ) { return ; } if ( actualValue.contains ( expectedSubstring ) ) { return ; } fail ( ( ( ( ( "\"" + actualValue ) + "\" does not contain \"" ) + expectedSubstring ) + "\"" ) ) ; }
Source:
public void testCreatePrivateData ( ) throws java.io.IOException { java.io.FileOutputStream outputStream = getContext ( ) . openFileOutput ( com.android.cts.appwithdata.CreatePrivateDataTest.PRIVATE_FILE_NAME , Context.MODE_PRIVATE ) ; outputStream.write ( "file contents" . getBytes ( ) ) ; outputStream.close ( ) ; }

Target:
public void testCreatePrivateData ( ) throws java.io.IOException { java.io.FileOutputStream outputStream = getContext ( ) . openFileOutput ( com.android.cts.appwithdata.CreatePrivateDataTest.PRIVATE_FILE_NAME , Context.MODE_PRIVATE ) ; outputStream.write ( "file contents" . getBytes ( ) ) ; outputStream.close ( ) ; assertTrue ( getContext ( ) . getFileStreamPath ( com.android.cts.appwithdata.CreatePrivateDataTest.PRIVATE_FILE_NAME ) . exists ( ) ) ; }
Source:
public final int startActivityWithConfig ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.net.Uri [ ] grantedUriPermissions , int grantedMode , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , boolean onlyIfNeeded , boolean debug , android.content.res.Configuration config ) { return startActivityMayWait ( caller , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , null , config ) ; }

Target:
public final int startActivities ( android.app.IApplicationThread caller , android.content.Intent [ ] intents , java.lang.String [ ] resolvedTypes , android.os.IBinder resultTo ) { return mMainStack.startActivities ( caller , ( - 1 ) , intents , resolvedTypes , resultTo ) ; }
Source:
public void testUnocclude ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; launchActivity ( "TestActivity" ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; mAmWmState.computeState ( mDevice , null ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_KEYGUARD_UNOCCLUDE , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }

Target:
public void testUnocclude ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; launchActivity ( "TestActivity" ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; mAmWmState.computeState ( mDevice , null ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_KEYGUARD_UNOCCLUDE , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }
Source:
private static com.android.jack.ir.ast.JMethodCall makeMethodCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodIdWide methodId = targetMethod.getMethodIdWide ( ) ; assert ( ( methodId.getKind ( ) ) == ( com.android.jack.ir.ast.MethodKind.STATIC ) ) || ( instance != null ) ; com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , methodId , targetMethod.getType ( ) , methodId.canBeVirtual ( ) ) ; return call ; }

Target:
private static com.android.jack.ir.ast.JMethodCall makeMethodCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodIdWide methodId = targetMethod.getMethodIdWide ( ) ; assert ( ( methodId.getKind ( ) ) == ( com.android.jack.ir.ast.MethodKind.STATIC ) ) || ( instance != null ) ; com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , targetMethod.getMethodId ( ) , methodId.canBeVirtual ( ) ) ; return call ; }
Source:
public void clearNotification ( int id ) { if ( com.android.server.connectivity.NetworkNotificationManager.DBG ) { android.util.Slog.d ( com.android.server.connectivity.NetworkNotificationManager.TAG , ( "clearNotification id=" + id ) ) ; } try { mNotificationManager.cancelAsUser ( com.android.server.connectivity.NetworkNotificationManager.NOTIFICATION_ID , id , UserHandle.ALL ) ; } catch ( java.lang.NullPointerException npe ) { android.util.Slog.d ( com.android.server.connectivity.NetworkNotificationManager.TAG , ( "setNotificationVisible: cancel notificationManager npe=" + npe ) ) ; } }

Target:
public void clearNotification ( int id ) { if ( com.android.server.connectivity.NetworkNotificationManager.DBG ) { android.util.Slog.d ( com.android.server.connectivity.NetworkNotificationManager.TAG , ( "clearNotification id=" + id ) ) ; } try { mNotificationManager.cancelAsUser ( com.android.server.connectivity.NetworkNotificationManager.NOTIFICATION_ID , id , UserHandle.ALL ) ; } catch ( java.lang.NullPointerException npe ) { android.util.Slog.d ( com.android.server.connectivity.NetworkNotificationManager.TAG , "setNotificationVisible: cancel notificationManager error" , npe ) ; } }
Source:
protected android.icu.util.UResourceBundle findTopLevel ( int index ) { for ( android.icu.util.UResourceBundle res = this ; res != null ; res = res.getParent ( ) ) { android.icu.util.UResourceBundle obj = res.handleGet ( index , null , this ) ; if ( obj != null ) { ( ( android.icu.impl.ICUResourceBundle ) ( obj ) ) . setLoadingStatus ( getLocaleID ( ) ) ; return obj ; } } return null ; }

Target:
protected android.icu.util.UResourceBundle findTopLevel ( java.lang.String aKey ) { for ( android.icu.util.UResourceBundle res = this ; res != null ; res = res.getParent ( ) ) { android.icu.util.UResourceBundle obj = res.handleGet ( aKey , null , this ) ; if ( obj != null ) { return obj ; } } return null ; }
Source:
public java.lang.String getDeviceSoftwareVersion ( int slotId ) { int [ ] subId = android.telephony.SubscriptionManager.getSubId ( slotId ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return null ; } try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getDeviceSvnUsingSubId ( subId [ 0 ] , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public android.telephony.TelephonyManager createForPhoneAccountHandle ( android.telecom.PhoneAccountHandle phoneAccountHandle ) { int subId = getSubIdForPhoneAccountHandle ( phoneAccountHandle ) ; if ( ! ( android.telephony.SubscriptionManager.isValidSubscriptionId ( subId ) ) ) { return null ; } return new android.telephony.TelephonyManager ( mContext , subId ) ; }
Source:
public void enterWhenUninterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; boolean reentrant = lock.isHeldByCurrentThread ( ) ; boolean success = false ; lock.lock ( ) ; try { waitUninterruptibly ( guard , reentrant ) ; success = true ; } finally { if ( ! success ) { lock.unlock ( ) ; } } }

Target:
public void enterWhenUninterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard ) { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; boolean signalBeforeWaiting = lock.isHeldByCurrentThread ( ) ; lock.lock ( ) ; boolean satisfied = false ; try { if ( ! ( guard.isSatisfied ( ) ) ) { awaitUninterruptibly ( guard , signalBeforeWaiting ) ; } satisfied = true ; } finally { if ( ! satisfied ) { leave ( ) ; } } }
Source:
public void test001_002 ( ) throws java.lang.Exception { java.io.File testDir = com.android.jack.TestTools.getJackTestsWithJackFolder ( "preprocessor/test001" ) ; com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( testDir ) ; options.addProperty ( "jack.annotation.adder.hasfile" , "true" ) ; options.addProperty ( "jack.annotation.adder.file" , new java.io.File ( testDir , "config.jpp" ) . getAbsolutePath ( ) ) ; com.android.jack.TestTools.compileSourceToDex ( options , testDir , com.android.jack.TestTools.getDefaultBootclasspathString ( ) , com.android.jack.TestTools.createTempFile ( "annotationAdderTest" , ".out.zip" ) , true ) ; }

Target:
public void test001_002 ( ) throws java.lang.Exception { java.io.File testDir = com.android.jack.TestTools.getJackTestsWithJackFolder ( "preprocessor/test001" ) ; com.android.jack.Options options = com.android.jack.TestTools.buildCommandLineArgs ( testDir ) ; options.addProperty ( PreProcessor.ENABLE.getName ( ) , "true" ) ; options.addProperty ( PreProcessor.FILE.getName ( ) , new java.io.File ( testDir , "config.jpp" ) . getAbsolutePath ( ) ) ; com.android.jack.TestTools.compileSourceToDex ( options , testDir , com.android.jack.TestTools.getDefaultBootclasspathString ( ) , com.android.jack.TestTools.createTempFile ( "annotationAdderTest" , ".out.zip" ) , true ) ; }
Source:
public void testDeserializeUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200376c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( ( "3742453657269616c697a61626c65436f6e7461696e657200000000000000000200014c000e756e7" + "3657269616c697a61626c657400124c6a6176612f6c616e672f4f626a6563743b7870737200316c6" ) + "962636f72652e6a6176612e696f2e53657269616c697a6174696f6e5465737424576173536572696" ) + "16c697a61626c65000000000000000002000149000169787000000000" ) ; libcore.java.io.SerializationTest.serializableContainerInitializedFlag = false ; libcore.java.io.SerializationTest.wasSerializableInitializedFlag = false ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidClassException expected ) { } assertFalse ( libcore.java.io.SerializationTest.serializableContainerInitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }

Target:
public void testDeserializeNullUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( "3742453657269616c697a61626c65436f6e7461696e65723100000000000000000200014c000e7" + "56e73657269616c697a61626c657400124c6a6176612f6c616e672f4f626a6563743b787070" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; libcore.java.io.SerializationTest.SerializableContainer1 sc = ( ( libcore.java.io.SerializationTest.SerializableContainer1 ) ( libcore.util.SerializationTester.deserializeHex ( s ) ) ) ; assertNull ( sc.unserializable ) ; assertTrue ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; }
Source:
private void makeFakeSysImgInternal ( java.io.File imagesDir , java.lang.String abiType ) throws java.io.IOException { imagesDir.mkdirs ( ) ; new java.io.File ( imagesDir , "userdata.img" ) . createNewFile ( ) ; java.io.File sourceProp = new java.io.File ( imagesDir , com.android.SdkConstants.FN_SOURCE_PROP ) ; sourceProp.createNewFile ( ) ; java.io.FileWriter out = new java.io.FileWriter ( sourceProp ) ; out.write ( ( ( com.android.sdklib.repository.PkgProps.VERSION_API_LEVEL ) + "=0\n" ) ) ; out.write ( ( ( ( ( com.android.sdklib.repository.PkgProps.SYS_IMG_ABI ) + "=" ) + abiType ) + "\n" ) ) ; out.close ( ) ; }

Target:
private void makeFakeSysImgInternal ( java.io.File imagesDir , java.lang.String abiType ) throws java.io.IOException { imagesDir.mkdirs ( ) ; new java.io.File ( imagesDir , "userdata.img" ) . createNewFile ( ) ; createSourceProps ( imagesDir , PkgProps.VERSION_API_LEVEL , "0" , PkgProps.SYS_IMG_ABI , abiType ) ; }
Source:
private void notifyInterfaceRemoved ( java.lang.String iface ) { mActiveAlerts.remove ( iface ) ; mActiveQuotas.remove ( iface ) ; final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . interfaceRemoved ( iface ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void notifyInterfaceRemoved ( java.lang.String iface ) { mActiveAlerts.remove ( iface ) ; mActiveQuotas.remove ( iface ) ; invokeForAllObservers ( ( o ) -> o.interfaceRemoved ( iface ) ) ; }
Source:
private boolean teardownForDun ( ) { final int rilRat = mPhone.getServiceState ( ) . getRilDataRadioTechnology ( ) ; if ( android.telephony.ServiceState.isCdma ( rilRat ) ) return true ; return ( fetchDunApn ( ) ) != null ; }

Target:
private int getPreferredApnSetId ( ) { android.database.Cursor c = mPhone.getContext ( ) . getContentResolver ( ) . query ( android.net.Uri.withAppendedPath ( Telephony.Carriers.CONTENT_URI , ( "preferapnset/subId/" + ( mPhone.getSubId ( ) ) ) ) , new java.lang.String [ ] { Telephony.Carriers.APN_SET_ID } , null , null , null ) ; if ( ( c.getCount ( ) ) < 1 ) { loge ( "getPreferredApnSetId: no APNs found" ) ; return Telephony.Carriers.NO_SET_SET ; } else { c.moveToFirst ( ) ; return c.getInt ( 0 ) ; } }
Source:
public boolean removeProvider ( java.lang.String fqdn ) { if ( ! ( mProviders.containsKey ( fqdn ) ) ) { android.util.Log.e ( com.android.server.wifi.hotspot2.PasspointManager.TAG , "Config doesn't exist" ) ; return false ; } mProviders.get ( fqdn ) . uninstallCertsAndKeys ( ) ; mProviders.remove ( fqdn ) ; mWifiConfigManager.saveToStore ( true ) ; return true ; }

Target:
public boolean removeProvider ( java.lang.String fqdn ) { if ( ! ( mProviders.containsKey ( fqdn ) ) ) { android.util.Log.e ( com.android.server.wifi.hotspot2.PasspointManager.TAG , "Config doesn't exist" ) ; return false ; } mProviders.get ( fqdn ) . uninstallCertsAndKeys ( ) ; mProviders.remove ( fqdn ) ; mWifiConfigManager.saveToStore ( true ) ; android.util.Log.d ( com.android.server.wifi.hotspot2.PasspointManager.TAG , ( "Removed Passpoint configuration: " + fqdn ) ) ; return true ; }
Source:
private static void write ( java.lang.CharSequence from , java.io.File to , java.nio.charset.Charset charset , boolean append ) throws java.io.IOException { com.google.common.io.CharStreams.write ( from , com.google.common.io.Files.newWriterSupplier ( to , charset , append ) ) ; }

Target:
public static void copy ( java.io.File from , java.io.File to ) throws java.io.IOException { com.google.common.base.Preconditions.checkArgument ( ( ! ( from.equals ( to ) ) ) , "Source %s and destination %s must be different" , from , to ) ; com.google.common.io.Files.asByteSource ( from ) . copyTo ( com.google.common.io.Files.asByteSink ( to ) ) ; }
Source:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { return libcore.icu.NativeIDN.toUnicode ( input , flags ) ; }

Target:
public static java.lang.String toUnicode ( java.lang.String input , int flags ) { com.ibm.icu.text.IDNA converter = com.ibm.icu.text.IDNA.getUTS46Instance ( flags ) ; java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; com.ibm.icu.text.IDNA.Info info = new com.ibm.icu.text.IDNA.Info ( ) ; converter.nameToUnicode ( input , result , info ) ; if ( info.hasErrors ( ) ) { return input ; } return result.toString ( ) ; }
Source:
public void removeListener ( android.media.midi.IMidiDeviceListener listener ) { mListeners.remove ( listener ) ; if ( ( ( mListeners.size ( ) ) == 0 ) && ( ( mDeviceConnections.size ( ) ) == 0 ) ) { close ( ) ; } }

Target:
public void removeListener ( android.media.midi.IMidiDeviceListener listener ) { mListeners.remove ( listener.asBinder ( ) ) ; if ( ( ( mListeners.size ( ) ) == 0 ) && ( ( mDeviceConnections.size ( ) ) == 0 ) ) { close ( ) ; } }
Source:
public com.google.common.util.concurrent.ListenableFuture < com.google.common.collect.ImmutableMap < com.android.dialer.DialerPhoneNumber , java.lang.Boolean > > batchCheckSpamStatus ( com.google.common.collect.ImmutableSet < com.android.dialer.DialerPhoneNumber > dialerPhoneNumbers ) { return backgroundExecutorService.submit ( ( ) -> { com.google.common.collect.ImmutableMap.Builder < com.android.dialer.DialerPhoneNumber , java.lang.Boolean > resultBuilder = new com.google.common.collect.ImmutableMap.Builder < > ( ) ; for ( com.android.dialer.DialerPhoneNumber dialerPhoneNumber : dialerPhoneNumbers ) { resultBuilder.put ( dialerPhoneNumber , false ) ; } return resultBuilder.build ( ) ; } ) ; }

Target:
public boolean isSpam ( ) { return false ; }
Source:
public void setVoiceDataDetails ( android.content.Intent data ) { mVoiceCheckData = data ; if ( ( ( mSettingsIcon ) != null ) && ( ( mRadioButton ) != null ) ) { mSettingsIcon.setEnabled ( mRadioButton.isChecked ( ) ) ; } }

Target:
public void setVoiceDataDetails ( android.content.Intent data ) { mVoiceCheckData = data ; if ( ( ( mSettingsIcon ) != null ) && ( ( mRadioButton ) != null ) ) { if ( mRadioButton.isChecked ( ) ) { mSettingsIcon.setEnabled ( true ) ; } else { mSettingsIcon.setEnabled ( false ) ; mSettingsIcon.setAlpha ( Utils.DISABLED_ALPHA ) ; } } }
Source:
public java.lang.String getPhotoThumbnailUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getPhotoThumbnailUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PHONE_NUMBER_CACHE : return phoneLookupInfo.getMigratedInfo ( ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
private void splitFloat ( java.lang.String str , float [ ] output ) { if ( str == null ) return ; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer ( str , "," ) ; int index = 0 ; while ( tokenizer.hasMoreElements ( ) ) { java.lang.String token = tokenizer.nextToken ( ) ; output [ ( index ++ ) ] = java.lang.Float.parseFloat ( token ) ; } }

Target:
private void splitInt ( java.lang.String str , int [ ] output ) { if ( str == null ) return ; android.text.TextUtils.StringSplitter splitter = new android.text.TextUtils.SimpleStringSplitter ( ',' ) ; splitter.setString ( str ) ; int index = 0 ; for ( java.lang.String s : splitter ) { output [ ( index ++ ) ] = java.lang.Integer.parseInt ( s ) ; } }
Source:
boolean isNumberMatchingDesc ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc ) { java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getNationalNumberPattern ( ) ) . matcher ( nationalNumber ) ; return ( isNumberPossibleForDesc ( nationalNumber , numberDesc ) ) && ( nationalNumberPatternMatcher.matches ( ) ) ; }

Target:
boolean isNumberMatchingDesc ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc numberDesc ) { int actualLength = nationalNumber.length ( ) ; java.util.List < java.lang.Integer > possibleLengths = numberDesc.getPossibleLengthList ( ) ; if ( ( ( possibleLengths.size ( ) ) > 0 ) && ( ! ( possibleLengths.contains ( actualLength ) ) ) ) { return false ; } java.util.regex.Matcher nationalNumberPatternMatcher = regexCache.getPatternForRegex ( numberDesc.getNationalNumberPattern ( ) ) . matcher ( nationalNumber ) ; return nationalNumberPatternMatcher.matches ( ) ; }
Source:
public synchronized void run ( com.android.jack.ir.ast.JDefinedClassOrInterface declaredType ) throws java.lang.Exception { if ( declaredType.isExternal ( ) ) { return ; } com.android.jack.Jack.getSession ( ) . getFileDependencies ( ) . addMappingBetweenJavaFileAndType ( declaredType.getSourceInfo ( ) . getFileName ( ) , declaredType ) ; }

Target:
public synchronized void run ( com.android.jack.ir.ast.JDefinedClassOrInterface declaredType ) throws java.lang.Exception { if ( ( declaredType.isExternal ( ) ) || ( ( declaredType.getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) ) { return ; } com.android.jack.Jack.getSession ( ) . getFileDependencies ( ) . addMappingBetweenJavaFileAndType ( declaredType.getSourceInfo ( ) . getFileName ( ) , declaredType ) ; }
Source:
public final double getDouble ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.DOUBLE ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } double result = java.lang.Double.longBitsToDouble ( this . block.peekLong ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }

Target:
public java.nio.ByteBuffer putDouble ( double value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.DOUBLE ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeLong ( ( ( offset ) + ( position ) ) , java.lang.Double.doubleToRawLongBits ( value ) , order ) ; position = newPosition ; return this ; }