auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected java.io.File runTasksOnProject ( java.lang.String name , java.lang.String gradleVersion , java.lang.String ... tasks ) { java.io.File project = new java.io.File ( testDir , name ) ; java.io.File buildGradle = new java.io.File ( project , "build.gradle" ) ; if ( ! ( buildGradle.isFile ( ) ) ) { return null ; } runGradleTasks ( sdkDir , gradleVersion , project , tasks ) ; return project ; }

Target:
protected java.io.File runTasksOnProject ( java.lang.String name , java.lang.String gradleVersion , java.lang.String ... tasks ) { java.io.File project = new java.io.File ( testDir , name ) ; java.io.File buildGradle = new java.io.File ( project , "build.gradle" ) ; assertTrue ( ( "Missing build.gradle for " + name ) , buildGradle.isFile ( ) ) ; runGradleTasks ( sdkDir , ndkDir , gradleVersion , project , tasks ) ; return project ; }
Source:
public void hold ( java.lang.String callId ) { mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_HOLD , callId ) . sendToTarget ( ) ; }

Target:
public void removeConnectionServiceAdapter ( com.android.internal.telecom.IConnectionServiceAdapter adapter , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_REMOVE_CS_ADAPTER ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = adapter ; args.arg2 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_REMOVE_CONNECTION_SERVICE_ADAPTER , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public org.eclipse.jface.text.IDocument getDocument ( ) throws org.eclipse.core.runtime.CoreException { if ( ( mDocument ) == null ) { mManager = org.eclipse.core.filebuffers.FileBuffers.getTextFileBufferManager ( ) ; mManager.connect ( mAndroidManifest.getFullPath ( ) , LocationKind.NORMALIZE , new org.eclipse.core.runtime.NullProgressMonitor ( ) ) ; org.eclipse.core.filebuffers.ITextFileBuffer buffer = mManager.getTextFileBuffer ( mAndroidManifest.getFullPath ( ) , LocationKind.NORMALIZE ) ; mDocument = buffer.getDocument ( ) ; } return mDocument ; }

Target:
public org.eclipse.jface.text.IDocument getManifestDocument ( ) throws org.eclipse.core.runtime.CoreException { if ( ( mDocument ) == null ) { mManager = org.eclipse.core.filebuffers.FileBuffers.getTextFileBufferManager ( ) ; mManager.connect ( mAndroidManifest.getFullPath ( ) , LocationKind.NORMALIZE , new org.eclipse.core.runtime.NullProgressMonitor ( ) ) ; org.eclipse.core.filebuffers.ITextFileBuffer buffer = mManager.getTextFileBuffer ( mAndroidManifest.getFullPath ( ) , LocationKind.NORMALIZE ) ; mDocument = buffer.getDocument ( ) ; } return mDocument ; }
Source:
private com.android.dx.io.EncodedValueReader readerOf ( int ... bytes ) { byte [ ] data = new byte [ bytes.length ] ; for ( int i = 0 ; i < ( bytes.length ) ; i ++ ) { data [ i ] = ( ( byte ) ( bytes [ i ] ) ) ; } return new com.android.dx.io.EncodedValueReader ( new com.android.dx.util.ByteArrayByteInput ( data ) ) ; }

Target:
private com.android.dex.EncodedValueReader readerOf ( int ... bytes ) { byte [ ] data = new byte [ bytes.length ] ; for ( int i = 0 ; i < ( bytes.length ) ; i ++ ) { data [ i ] = ( ( byte ) ( bytes [ i ] ) ) ; } return new com.android.dex.EncodedValueReader ( new com.android.dex.util.ByteArrayByteInput ( data ) ) ; }
Source:
private java.lang.String runBatchTest ( int sensorType , int maxBatchReportLatencySec , int instructionsResId ) throws java.lang.Throwable { getTestLogger ( ) . logInstructions ( instructionsResId ) ; waitForUserToBegin ( ) ; int maxBatchReportLatencyUs = ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( maxBatchReportLatencySec ) ) ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , sensorType , com.android.cts.verifier.sensors.BatchingTestActivity.SENSOR_BATCHING_RATE_US , maxBatchReportLatencyUs ) ; int testDurationSec = maxBatchReportLatencySec + ( com.android.cts.verifier.sensors.BatchingTestActivity.BATCHING_PADDING_TIME_S ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation operation = new android.hardware.cts.helpers.sensoroperations.TestSensorOperation ( environment , testDurationSec , java.util.concurrent.TimeUnit.SECONDS ) ; return executeTest ( operation ) ; }

Target:
private java.lang.String runBatchTest ( int sensorType , int maxBatchReportLatencySec , int instructionsResId ) throws java.lang.Throwable { getTestLogger ( ) . logInstructions ( instructionsResId ) ; waitForUserToBegin ( ) ; int maxBatchReportLatencyUs = ( ( int ) ( java.util.concurrent.TimeUnit.SECONDS.toMicros ( maxBatchReportLatencySec ) ) ) ; android.hardware.cts.helpers.TestSensorEnvironment environment = new android.hardware.cts.helpers.TestSensorEnvironment ( getApplicationContext ( ) , sensorType , com.android.cts.verifier.sensors.BatchingTestActivity.SENSOR_BATCHING_RATE_US , maxBatchReportLatencyUs ) ; int testDurationSec = maxBatchReportLatencySec + ( com.android.cts.verifier.sensors.BatchingTestActivity.BATCHING_PADDING_TIME_S ) ; android.hardware.cts.helpers.sensoroperations.TestSensorOperation operation = android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createOperation ( environment , testDurationSec , java.util.concurrent.TimeUnit.SECONDS ) ; return executeTest ( operation ) ; }
Source:
private com.google.common.collect.TreeMultiset.AvlNode < E > ceiling ( java.util.Comparator < ? super E > comparator , E e ) { int cmp = comparator.compare ( e , elem ) ; if ( cmp < 0 ) { return ( left ) == null ? this : com.google.common.base.Objects.firstNonNull ( left.ceiling ( comparator , e ) , this ) ; } else if ( cmp == 0 ) { return this ; } else { return ( right ) == null ? null : right.ceiling ( comparator , e ) ; } }

Target:
private com.google.common.collect.TreeMultiset.AvlNode < E > ceiling ( java.util.Comparator < ? super E > comparator , E e ) { int cmp = comparator.compare ( e , elem ) ; if ( cmp < 0 ) { return ( left ) == null ? this : com.google.common.base.MoreObjects.firstNonNull ( left.ceiling ( comparator , e ) , this ) ; } else if ( cmp == 0 ) { return this ; } else { return ( right ) == null ? null : right.ceiling ( comparator , e ) ; } }
Source:
private org.eclipse.jdt.internal.compiler.ast.TypeDeclaration findAnnotationDeclaration ( @ com.android.annotations.NonNull java.lang.String signature ) { if ( ( mTypeUnits ) == null ) { java.util.Collection < org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration > units = mEcjResult.getCompilationUnits ( ) ; mTypeUnits = com.google.common.collect.Maps.newHashMapWithExpectedSize ( units.size ( ) ) ; for ( org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit : units ) { if ( ( unit.types ) != null ) { for ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration : unit.types ) { addTypeDeclaration ( typeDeclaration ) ; } } } } return mTypeUnits.get ( signature ) ; }

Target:
private org.eclipse.jdt.internal.compiler.ast.TypeDeclaration findTypeDeclaration ( @ com.android.annotations.NonNull java.lang.String signature ) { if ( ( mTypeUnits ) == null ) { java.util.Collection < org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration > units = mEcjResult.getCompilationUnits ( ) ; mTypeUnits = com.google.common.collect.Maps.newHashMapWithExpectedSize ( units.size ( ) ) ; for ( org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit : units ) { if ( ( unit.types ) != null ) { for ( org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration : unit.types ) { addTypeDeclaration ( typeDeclaration ) ; } } } } return mTypeUnits.get ( signature ) ; }
Source:
public void onInitializeAccessibilityNodeInfoForItem ( android.view.View view , int position , android.view.accessibility.AccessibilityNodeInfo info ) { super . onInitializeAccessibilityNodeInfoForItem ( view , position , info ) ; final android.widget.LayoutParams lp = ( ( android.widget.LayoutParams ) ( view.getLayoutParams ( ) ) ) ; final boolean isHeading = ( lp != null ) && ( ( lp.viewType ) != ( ITEM_VIEW_TYPE_HEADER_OR_FOOTER ) ) ; final android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo itemInfo = android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.obtain ( 0 , 1 , position , 1 , isHeading ) ; info.setCollectionItemInfo ( itemInfo ) ; }

Target:
public void onInitializeAccessibilityNodeInfoForItem ( android.view.View view , int position , android.view.accessibility.AccessibilityNodeInfo info ) { super . onInitializeAccessibilityNodeInfoForItem ( view , position , info ) ; final android.widget.LayoutParams lp = ( ( android.widget.LayoutParams ) ( view.getLayoutParams ( ) ) ) ; final boolean isHeading = ( lp != null ) && ( ( lp.viewType ) != ( ITEM_VIEW_TYPE_HEADER_OR_FOOTER ) ) ; final boolean isSelected = isItemChecked ( position ) ; final android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo itemInfo = android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo.obtain ( position , 1 , 0 , 1 , isHeading , isSelected ) ; info.setCollectionItemInfo ( itemInfo ) ; }
Source:
public static < T > boolean any ( java.util.Iterator < T > iterator , com.google.common.base.Predicate < ? super T > predicate ) { com.google.common.base.Preconditions.checkNotNull ( predicate ) ; while ( iterator.hasNext ( ) ) { T element = iterator.next ( ) ; if ( predicate.apply ( element ) ) { return true ; } } return false ; }

Target:
public static < T > java.util.Iterator < T > concat ( java.util.Iterator < ? extends T > a , java.util.Iterator < ? extends T > b ) { return com.google.common.collect.Iterators.concat ( com.google.common.collect.ImmutableList.of ( a , b ) . iterator ( ) ) ; }
Source:
private void extractSharpImage ( java.lang.String name ) { android.graphics.Bitmap mBitmap = android.graphics.Bitmap.createBitmap ( buffers.inputImage.getWidth ( ) , buffers.inputImage.getHeight ( ) , Bitmap.Config.ARGB_8888 ) ; android.renderscript.Allocation mAllocation = android.renderscript.Allocation.createFromBitmap ( renderScript , mBitmap ) ; scriptC.forEach_PackSharpImage ( mAllocation ) ; mAllocation.copyTo ( mBitmap ) ; android.renderscript.cts.refocus.MediaStoreSaver.savePNG ( mBitmap , "sharpd1new" , name , renderScript.getApplicationContext ( ) ) ; }

Target:
private void extractSharpImage ( java.lang.String name ) { android.graphics.Bitmap mBitmap = android.graphics.Bitmap.createBitmap ( buffers.inputImage.getWidth ( ) , buffers.inputImage.getHeight ( ) , Bitmap.Config.ARGB_8888 ) ; android.renderscript.Allocation mAllocation = android.renderscript.Allocation.createFromBitmap ( renderScript , mBitmap ) ; scriptC.forEach_PackSharpImage ( mAllocation ) ; mAllocation.copyTo ( mBitmap ) ; mAllocation.destroy ( ) ; android.renderscript.cts.refocus.MediaStoreSaver.savePNG ( mBitmap , "sharpd1new" , name , renderScript.getApplicationContext ( ) ) ; }
Source:
public android.content.Loader < android.database.Cursor > onCreateLoader ( int id , android.os.Bundle args ) { if ( id == ( getDirectoryLoaderId ( ) ) ) { return super . onCreateLoader ( id , args ) ; } else { final com.android.dialer.app.list.SmartDialNumberListAdapter adapter = ( ( com.android.dialer.app.list.SmartDialNumberListAdapter ) ( getAdapter ( ) ) ) ; com.android.dialer.dialpadview.SmartDialCursorLoader loader = new com.android.dialer.dialpadview.SmartDialCursorLoader ( super . getContext ( ) ) ; loader.setShowEmptyListForNullQuery ( getShowEmptyListForNullQuery ( ) ) ; adapter.configureLoader ( loader ) ; return loader ; } }

Target:
public android.content.Loader < android.database.Cursor > onCreateLoader ( int id , android.os.Bundle args ) { if ( id == ( getDirectoryLoaderId ( ) ) ) { return super . onCreateLoader ( id , args ) ; } else { final com.android.dialer.app.list.SmartDialNumberListAdapter adapter = ( ( com.android.dialer.app.list.SmartDialNumberListAdapter ) ( getAdapter ( ) ) ) ; com.android.dialer.smartdial.SmartDialCursorLoader loader = new com.android.dialer.smartdial.SmartDialCursorLoader ( super . getContext ( ) ) ; loader.setShowEmptyListForNullQuery ( getShowEmptyListForNullQuery ( ) ) ; adapter.configureLoader ( loader ) ; return loader ; } }
Source:
public void closePort ( android.os.IBinder token ) { synchronized ( mPortClients ) { android.media.midi.MidiDeviceServer.PortClient client = mPortClients.remove ( token ) ; if ( client != null ) { client.close ( ) ; } } }

Target:
public void closePort ( android.os.IBinder token ) { android.media.midi.MidiInputPort inputPort = null ; synchronized ( mPortClients ) { android.media.midi.MidiDeviceServer.PortClient client = mPortClients.remove ( token ) ; if ( client != null ) { inputPort = client.getInputPort ( ) ; client.close ( ) ; } } if ( inputPort != null ) { synchronized ( mInputPortClients ) { mInputPortClients.remove ( inputPort ) ; } } }
Source:
void scanSymbol ( ) { if ( ! ( eof ) ) { if ( ( pos ) < ( buffer.length ) ) { symbol = buffer [ pos ] ; ( pos ) ++ ; } else { symbol = 0 ; eof = true ; } } else { throw new java.lang.reflect.GenericSignatureFormatError ( ) ; } }

Target:
void expect ( char c ) { if ( ( symbol ) == c ) { scanSymbol ( ) ; } else { throw new java.lang.reflect.GenericSignatureFormatError ( ) ; } }
Source:
public void setFixedLengthStreamingMode ( int contentLength ) { if ( super . connected ) { throw new java.lang.IllegalStateException ( "Already connected" ) ; } if ( ( chunkLength ) > 0 ) { throw new java.lang.IllegalStateException ( "Already in chunked mode" ) ; } if ( contentLength < 0 ) { throw new java.lang.IllegalArgumentException ( "contentLength < 0" ) ; } this . fixedContentLength = contentLength ; }

Target:
public void setFixedLengthStreamingMode ( long contentLength ) { if ( super . connected ) { throw new java.lang.IllegalStateException ( "Already connected" ) ; } if ( ( chunkLength ) > 0 ) { throw new java.lang.IllegalStateException ( "Already in chunked mode" ) ; } if ( contentLength < 0 ) { throw new java.lang.IllegalArgumentException ( "contentLength < 0" ) ; } this . fixedContentLength = ( ( int ) ( java.lang.Math.min ( contentLength , java.lang.Integer.MAX_VALUE ) ) ) ; this . fixedContentLengthLong = contentLength ; }
Source:
public static android.hardware.Sensor getSensor ( android.content.Context context , int sensorType ) { android.hardware.SensorManager sensorManager = ( ( android.hardware.SensorManager ) ( context.getSystemService ( Context.SENSOR_SERVICE ) ) ) ; if ( sensorManager == null ) { throw new java.lang.IllegalStateException ( "SensorService is not present in the system." ) ; } android.hardware.Sensor sensor = sensorManager.getDefaultSensor ( sensorType ) ; if ( sensor == null ) { throw new android.hardware.cts.helpers.SensorNotSupportedException ( sensorType ) ; } return sensor ; }

Target:
private static android.hardware.SensorManager getSensorManager ( android.content.Context context ) { android.hardware.SensorManager sensorManager = ( ( android.hardware.SensorManager ) ( context.getSystemService ( Context.SENSOR_SERVICE ) ) ) ; if ( sensorManager == null ) { throw new java.lang.IllegalStateException ( "SensorService is not present in the system." ) ; } return sensorManager ; }
Source:
public static boolean haveRightsForAction ( android.net.Uri uri , int action ) { com.android.mms.drm.DrmManagerClient drmManagerClient = com.android.mms.MmsApp.getApplication ( ) . getDrmManagerClient ( ) ; try { if ( drmManagerClient.canHandle ( uri.toString ( ) , null ) ) { int check = drmManagerClient.checkRightsStatus ( uri.toString ( ) , action ) ; return check == ( DrmStore.RightsStatus.RIGHTS_VALID ) ; } } catch ( java.lang.Exception e ) { } finally { } return true ; }

Target:
public static boolean haveRightsForAction ( android.net.Uri uri , int action ) { android.drm.DrmManagerClient drmManagerClient = com.android.mms.MmsApp.getApplication ( ) . getDrmManagerClient ( ) ; try { if ( drmManagerClient.canHandle ( uri.toString ( ) , null ) ) { int check = drmManagerClient.checkRightsStatus ( uri.toString ( ) , action ) ; return check == ( DrmStore.RightsStatus.RIGHTS_VALID ) ; } } catch ( java.lang.Exception e ) { } finally { } return true ; }
Source:
void cleanUpResourcesLI ( ) { java.lang.String sourceFile = getCodePath ( ) ; int retCode = mInstaller.rmdex ( sourceFile ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( "Couldn't remove dex file for package: " + " at location " ) + ( sourceFile.toString ( ) ) ) + ", retcode=" ) + retCode ) ) ; } cleanUp ( ) ; }

Target:
void cleanUpResourcesLI ( ) { java.lang.String sourceFile = getCodePath ( ) ; if ( ( instructionSet ) == null ) { throw new java.lang.IllegalStateException ( "instructionSet == null" ) ; } int retCode = mInstaller.rmdex ( sourceFile , instructionSet ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( "Couldn't remove dex file for package: " + " at location " ) + ( sourceFile.toString ( ) ) ) + ", retcode=" ) + retCode ) ) ; } cleanUp ( ) ; }
Source:
public static org.eclipse.swt.graphics.Image getIcon ( java.lang.Class < ? extends com.android.ide.common.resources.configuration.ResourceQualifier > theClass ) { org.eclipse.swt.graphics.Image image = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.ICON_MAP.get ( theClass ) ; if ( image == null ) { image = com.android.ide.eclipse.adt.internal.resources.ResourceHelper.computeImage ( theClass ) ; com.android.ide.eclipse.adt.internal.resources.ResourceHelper.ICON_MAP.put ( theClass , image ) ; } return image ; }

Target:
public static org.eclipse.swt.graphics.Image getIcon ( java.lang.Class < ? extends com.android.ide.common.resources.configuration.ResourceQualifier > theClass ) { return com.android.ide.eclipse.adt.internal.resources.ResourceHelper.sIconMap.get ( theClass ) ; }
Source:
private void reportConnectionAttemptEnd ( int level2FailureCode , int connectivityFailureCode ) { mWifiMetrics.endConnectionEvent ( level2FailureCode , connectivityFailureCode ) ; switch ( level2FailureCode ) { case WifiMetrics.ConnectionEvent.FAILURE_NONE : mWifiDiagnostics.reportConnectionEvent ( ( - 1 ) , WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED ) ; break ; case WifiMetrics.ConnectionEvent.FAILURE_REDUNDANT_CONNECTION_ATTEMPT : case WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED : break ; default : mWifiDiagnostics.reportConnectionEvent ( ( - 1 ) , WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; } }

Target:
private void reportConnectionAttemptStart ( android.net.wifi.WifiConfiguration config , java.lang.String targetBSSID , int roamType ) { mWifiMetrics.startConnectionEvent ( config , targetBSSID , roamType ) ; mDiagsConnectionStartMillis = mClock.getElapsedSinceBootMillis ( ) ; mWifiDiagnostics.reportConnectionEvent ( mDiagsConnectionStartMillis , WifiDiagnostics.CONNECTION_EVENT_STARTED ) ; sendMessageDelayed ( com.android.server.wifi.WifiStateMachine.CMD_DIAGS_CONNECT_TIMEOUT , mDiagsConnectionStartMillis , com.android.server.wifi.WifiStateMachine.DIAGS_CONNECT_TIMEOUT_MILLIS ) ; }
Source:
private static void assertGsmDeviceId ( java.lang.String deviceId ) { java.lang.String imeiPattern = "[0-9]{14,15}" ; assertTrue ( ( ( ( "IMEI device id " + deviceId ) + " does not match pattern " ) + imeiPattern ) , java.util.regex.Pattern.matches ( imeiPattern , deviceId ) ) ; if ( ( deviceId.length ( ) ) == 15 ) { android.telephony.cts.TelephonyManagerTest.assertImeiCheckDigit ( deviceId ) ; } }

Target:
private static void assertGsmDeviceId ( java.lang.String deviceId ) { java.lang.String imeiPattern = "[0-9]{14,15}" ; org.junit.Assert.assertTrue ( ( ( ( "IMEI device id " + deviceId ) + " does not match pattern " ) + imeiPattern ) , java.util.regex.Pattern.matches ( imeiPattern , deviceId ) ) ; if ( ( deviceId.length ( ) ) == 15 ) { android.telephony.cts.TelephonyManagerTest.assertImeiCheckDigit ( deviceId ) ; } }
Source:
public static void d ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.DEBUG ) { android.util.Log.d ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } }

Target:
public static void d ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.sIsUserExtendedLoggingEnabled ) { android.telecom.Log.maybeDisableLogging ( ) ; android.util.Slog.i ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } else if ( android.telecom.Log.DEBUG ) { android.util.Slog.d ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ) ; } }
Source:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { if ( ( mPager ) != null ) { final float offset = ( ( mLastKnownPositionOffset ) >= 0 ) ? mLastKnownPositionOffset : 0 ; int position = mPager.getCurrentItem ( ) ; if ( offset > 0.5F ) { position ++ ; } updateTextPositions ( position , offset , true ) ; } }

Target:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { if ( ( mPager ) != null ) { final float offset = ( ( mLastKnownPositionOffset ) >= 0 ) ? mLastKnownPositionOffset : 0 ; updateTextPositions ( mLastKnownCurrentPage , offset , true ) ; } }
Source:
public android.location.Location getLastKnownLocation ( java.lang.String provider , java.lang.String packageName ) { if ( com.android.server.LocationManagerService.LOCAL_LOGV ) { android.util.Slog.v ( com.android.server.LocationManagerService.TAG , ( "getLastKnownLocation: " + provider ) ) ; } try { synchronized ( mLock ) { return _getLastKnownLocationLocked ( provider , packageName ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "getLastKnownLocation got exception:" , e ) ; return null ; } }

Target:
public void onPackageDisappeared ( java.lang.String packageName , int reason ) { synchronized ( mLock ) { java.util.ArrayList < com.android.server.LocationManagerService.Receiver > deadReceivers = null ; for ( com.android.server.LocationManagerService.Receiver receiver : mReceivers.values ( ) ) { if ( receiver.mPackageName.equals ( packageName ) ) { if ( deadReceivers == null ) { deadReceivers = new java.util.ArrayList < com.android.server.LocationManagerService.Receiver > ( ) ; } deadReceivers.add ( receiver ) ; } } if ( deadReceivers != null ) { for ( com.android.server.LocationManagerService.Receiver receiver : deadReceivers ) { removeUpdatesLocked ( receiver ) ; } } } }
Source:
public void search ( com.android.builder.internal.compiler.SourceSearcher.SourceFileProcessor processor ) throws java.io.IOException , java.lang.InterruptedException , java.util.concurrent.ExecutionException { for ( java.io.File file : mSourceFolders ) { processFile ( file , processor ) ; } if ( ( mExecutor ) != null ) { mExecutor.waitForTasks ( ) ; } }

Target:
public void search ( com.android.builder.internal.compiler.SourceSearcher.SourceFileProcessor processor ) throws java.io.IOException , java.lang.InterruptedException , java.util.concurrent.ExecutionException { for ( java.io.File file : mSourceFolders ) { processFile ( file , processor ) ; } if ( ( mExecutor ) != null ) { try { mExecutor.waitForTasksWithQuickFail ( ) ; } catch ( java.lang.InterruptedException e ) { mExecutor.cancelAllTasks ( ) ; throw e ; } catch ( java.util.concurrent.ExecutionException e ) { mExecutor.cancelAllTasks ( ) ; throw e ; } } }
Source:
protected libcore.util.ZoneInfo create ( java.lang.String id ) { int index = java.util.Arrays.binarySearch ( ids , id ) ; if ( index < 0 ) { return null ; } libcore.io.BufferIterator it = mappedFile.bigEndianIterator ( ) ; it.skip ( byteOffsets [ index ] ) ; return libcore.util.ZoneInfo.makeTimeZone ( id , it ) ; }

Target:
protected libcore.util.ZoneInfo create ( java.lang.String id ) { libcore.io.BufferIterator it = getBufferIterator ( id ) ; if ( it == null ) { return null ; } return libcore.util.ZoneInfo.makeTimeZone ( id , it ) ; }
Source:
public static void setUpClass ( ) throws com.android.jack.IllegalOptionsException , com.android.sched.util.config.ConfigurationException { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.ConditionalTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.ConditionalTest.hooks ) ; options.getConfigBuilder ( com.android.jack.ConditionalTest.hooks ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }

Target:
public static void setUpClass ( ) throws com.android.jack.IllegalOptionsException , com.android.sched.util.config.ConfigurationException { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.ConditionalTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.ConditionalTest.hooks ) ; options.getConfigBuilder ( com.android.jack.ConditionalTest.hooks ) . getCodecContext ( ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }
Source:
public boolean syncQueryPasspointIcon ( com.android.internal.util.AsyncChannel channel , long bssid , java.lang.String fileName ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putLong ( "BSSID" , bssid ) ; bundle.putString ( "FILENAME" , fileName ) ; android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_QUERY_OSU_ICON , bundle ) ; int result = resultMsg.arg1 ; resultMsg.recycle ( ) ; return result == 1 ; }

Target:
public boolean syncQueryPasspointIcon ( com.android.internal.util.AsyncChannel channel , long bssid , java.lang.String fileName ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putLong ( com.android.server.wifi.WifiStateMachine.EXTRA_OSU_ICON_QUERY_BSSID , bssid ) ; bundle.putString ( com.android.server.wifi.WifiStateMachine.EXTRA_OSU_ICON_QUERY_FILENAME , fileName ) ; android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_QUERY_OSU_ICON , bundle ) ; int result = resultMsg.arg1 ; resultMsg.recycle ( ) ; return result == 1 ; }
Source:
java.lang.String validateInstrumentationRunner ( java.lang.String instrumentation ) { if ( ! ( mHasRunnerLibrary ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_NoTestLibMsg_s , AdtConstants.LIBRARY_TEST_RUNNER ) ; } if ( ! ( instrumentation.equals ( SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ) ) { java.lang.String result = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.testClassForManifest ( mJavaProject , instrumentation , SdkConstants.CLASS_INSTRUMENTATION_RUNNER , true ) ; if ( result != ( com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.TEST_CLASS_OK ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_WrongRunnerTypeMsg_s , SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ; } } return com.android.ide.eclipse.adt.internal.launch.junit.InstrumentationRunnerValidator.INSTRUMENTATION_OK ; }

Target:
java.lang.String validateInstrumentationRunner ( java.lang.String instrumentation ) { if ( ! ( mHasRunnerLibrary ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_NoTestLibMsg_s , AdtConstants.LIBRARY_TEST_RUNNER ) ; } if ( ! ( instrumentation.equals ( SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ) ) { java.lang.String result = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.testClassForManifest ( mJavaProject , instrumentation , SdkConstants.CLASS_INSTRUMENTATION , true ) ; if ( result != ( com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.TEST_CLASS_OK ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_WrongRunnerTypeMsg_s , SdkConstants.CLASS_INSTRUMENTATION ) ; } } return com.android.ide.eclipse.adt.internal.launch.junit.InstrumentationRunnerValidator.INSTRUMENTATION_OK ; }
Source:
private static java.lang.String configToString ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) { return null ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) . append ( "ID=" ) . append ( config.networkId ) . append ( ",SSID=" ) . append ( config.SSID ) . append ( ",useExternalScores=" ) . append ( config.useExternalScores ) ; return sb.toString ( ) ; }

Target:
private static java.lang.String configToString ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) { return null ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) . append ( "ID=" ) . append ( config.networkId ) . append ( ",SSID=" ) . append ( config.SSID ) . append ( ",useExternalScores=" ) . append ( config.useExternalScores ) . append ( ",meteredHint=" ) . append ( config.meteredHint ) . append ( ",meteredOverride=" ) . append ( config.meteredOverride ) ; return sb.toString ( ) ; }
Source:
public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; com.android.hierarchyviewerlib.ComponentRegistry.getPixelPerfectModel ( ) . setData ( device , screenshotImage , viewNode ) ; } }

Target:
public void run ( ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setTree ( viewNode ) ; } }
Source:
public void onDestroy ( ) { if ( ( mProgramLoadTask ) != null ) { mProgramLoadTask.cancel ( true ) ; mProgramLoadTask = null ; } getContext ( ) . getContentResolver ( ) . unregisterContentObserver ( mContentObserver ) ; mChannelDataManager.removeListener ( mChannelListener ) ; com.android.tv.TvApplication.getSingletons ( getContext ( ) ) . getDvrDataManager ( ) . removeSeriesRecordingListener ( mSeriesRecordingListener ) ; super . onDestroy ( ) ; }

Target:
public void onDestroy ( ) { if ( ( mProgramLoadTask ) != null ) { mProgramLoadTask.cancel ( true ) ; mProgramLoadTask = null ; } getContext ( ) . getContentResolver ( ) . unregisterContentObserver ( mContentObserver ) ; mHandler.removeCallbacksAndMessages ( null ) ; mChannelDataManager.removeListener ( mChannelListener ) ; mDvrDataManager.removeSeriesRecordingListener ( mSeriesRecordingListener ) ; super . onDestroy ( ) ; }
Source:
public void testHasKeyDoesNotMatch ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putBoolean ( "key" , true ) ; assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( "keyy" ) . matches ( bundle ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( org.hamcrest.Matchers.equalTo ( "keyy" ) ) . matches ( bundle ) ) ; }

Target:
public void hasKeyDoesNotMatch ( ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putBoolean ( "key" , true ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( "keyy" ) . matches ( bundle ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.BundleMatchers.hasKey ( org.hamcrest.Matchers.equalTo ( "keyy" ) ) . matches ( bundle ) ) ; }
Source:
private com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder _addProjectResourceFolder ( com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config , org.eclipse.core.resources.IFolder folder ) throws java.lang.Exception { java.lang.reflect.Method addMethod = com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources.class . getDeclaredMethod ( "add" , com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType.class , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.class , com.android.io.IAbstractFolder.class ) ; addMethod.setAccessible ( true ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder resFolder = ( ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder ) ( addMethod.invoke ( resources , ResourceFolderType.LAYOUT , config , new com.android.ide.eclipse.adt.io.IFolderWrapper ( folder ) ) ) ) ; return resFolder ; }

Target:
private com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder _addProjectResourceFolder ( com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config , org.eclipse.core.resources.IFolder folder ) throws java.lang.Exception { java.lang.reflect.Method addMethod = com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources.class . getDeclaredMethod ( "add" , com.android.resources.ResourceFolderType.class , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.class , com.android.io.IAbstractFolder.class ) ; addMethod.setAccessible ( true ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder resFolder = ( ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder ) ( addMethod.invoke ( resources , ResourceFolderType.LAYOUT , config , new com.android.ide.eclipse.adt.io.IFolderWrapper ( folder ) ) ) ) ; return resFolder ; }
Source:
public synchronized void prepare ( ) throws android.os.RemoteException { if ( ( mDexoptPackages ) != null ) { throw new java.lang.IllegalStateException ( "already called prepare()" ) ; } synchronized ( mPackageManagerService.mPackages ) { mDexoptPackages = com.android.server.pm.PackageManagerServiceUtils.getPackagesForDexopt ( mPackageManagerService.mPackages.values ( ) , mPackageManagerService ) ; } }

Target:
public synchronized void prepare ( ) throws android.os.RemoteException { if ( ( mDexoptPackages ) != null ) { throw new java.lang.IllegalStateException ( "already called prepare()" ) ; } synchronized ( mPackageManagerService.mPackages ) { mDexoptPackages = com.android.server.pm.PackageManagerServiceUtils.getPackagesForDexopt ( mPackageManagerService.mPackages.values ( ) , mPackageManagerService ) ; } completeSize = mDexoptPackages.size ( ) ; }
Source:
void addRootType ( java.lang.String type ) { if ( ( mRootTypes ) == null ) { mRootTypes = new java.util.ArrayList < java.lang.String > ( ) ; mRootTypes.add ( type ) ; } else if ( ! ( mRootTypes.contains ( type ) ) ) { mRootTypes.add ( type ) ; } }

Target:
void addRootType ( com.android.ahat.heapdump.RootType type ) { mRootTypes |= type.mask ; }
Source:
private void createParentDirectories ( java.io.File outputFile ) throws java.io.IOException { java.io.File parentFile = outputFile.getParentFile ( ) ; if ( ( ! ( parentFile.exists ( ) ) ) && ( ! ( parentFile.mkdirs ( ) ) ) ) { throw new java.io.IOException ( ( ( "Could not create directory \"" + ( parentFile.getName ( ) ) ) + "\"" ) ) ; } }

Target:
private void transform ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn , @ javax.annotation.Nonnull java.io.OutputStream os , @ javax.annotation.Nonnull com.android.sched.util.location.Location location ) throws com.android.sched.util.file.CannotWriteException { com.android.jill.backend.jayce.JayceWriter writer = createWriter ( os ) ; com.android.jill.frontend.java.ClassNodeWriter asm2jayce = new com.android.jill.frontend.java.ClassNodeWriter ( writer , new com.android.jill.frontend.java.SourceInfoWriter ( writer ) , options ) ; try { asm2jayce.write ( cn ) ; writer.flush ( ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotWriteException ( location , e ) ; } }
Source:
private long getOutputLastModified ( ) { long oldestTarget = java.lang.Long.MAX_VALUE ; if ( ( mTargets.size ( ) ) == 0 ) { oldestTarget = mDepFileLastModified ; } else { for ( java.io.File target : mTargets ) { if ( ( target.lastModified ( ) ) < oldestTarget ) { oldestTarget = target.lastModified ( ) ; } } } return oldestTarget ; }

Target:
private long getOutputLastModified ( ) { long oldestTarget = java.lang.Long.MAX_VALUE ; if ( mTargets.isEmpty ( ) ) { oldestTarget = mDepFileLastModified ; } else { for ( java.io.File target : mTargets ) { if ( ( target.lastModified ( ) ) < oldestTarget ) { oldestTarget = target.lastModified ( ) ; } } } return oldestTarget ; }
Source:
private void handleIdleScreen ( int slotId ) { com.android.internal.telephony.cat.CatLog.d ( this , "Need to send IDLE SCREEN Available event to SIM" ) ; checkForSetupEvent ( com.android.internal.telephony.cat.CatCmdMessage.SetupEventListConstants.IDLE_SCREEN_AVAILABLE_EVENT , null , slotId ) ; if ( ( mStkContext [ slotId ] . mIdleModeTextCmd ) != null ) { launchIdleText ( slotId ) ; } }

Target:
private void handleIdleScreen ( int slotId ) { com.android.internal.telephony.cat.CatLog.d ( this , "Need to send IDLE SCREEN Available event to SIM" ) ; checkForSetupEvent ( com.android.internal.telephony.cat.CatCmdMessage.SetupEventListConstants.IDLE_SCREEN_AVAILABLE_EVENT , null , slotId ) ; if ( ( ( mStkContext [ slotId ] . mIdleModeTextCmd ) != null ) && ( ! ( mStkContext [ slotId ] . mIdleModeTextVisible ) ) ) { launchIdleText ( slotId ) ; } }
Source:
public void testSupportsInputMethods ( ) { android.widget.Button button = new android.widget.Button ( context ) ; android.widget.EditText editText = new android.widget.EditText ( context ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.supportsInputMethods ( ) . matches ( button ) ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.supportsInputMethods ( ) . matches ( editText ) ) ; }

Target:
public void supportsInputMethodsTest ( ) { android.widget.Button button = new android.widget.Button ( context ) ; android.widget.EditText editText = new android.widget.EditText ( context ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.supportsInputMethods ( ) . matches ( button ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.matcher.ViewMatchers.supportsInputMethods ( ) . matches ( editText ) ) ; }
Source:
public void getWindowVisibleDisplayFrame ( android.graphics.Rect outRect ) { if ( ( mAttachInfo ) != null ) { try { mAttachInfo.mSession.getDisplayFrame ( mAttachInfo.mWindow , outRect ) ; } catch ( android.os.RemoteException e ) { return ; } final android.graphics.Rect insets = mAttachInfo.mVisibleInsets ; outRect.left += insets.left ; outRect.top += insets.top ; outRect.right -= insets.right ; outRect.bottom -= insets.bottom ; return ; } android.view.Display d = android.view.WindowManagerImpl.getDefault ( ) . getDefaultDisplay ( ) ; outRect.set ( 0 , 0 , d.getWidth ( ) , d.getHeight ( ) ) ; }

Target:
public void getWindowVisibleDisplayFrame ( android.graphics.Rect outRect ) { if ( ( mAttachInfo ) != null ) { try { mAttachInfo.mSession.getDisplayFrame ( mAttachInfo.mWindow , outRect ) ; } catch ( android.os.RemoteException e ) { return ; } final android.graphics.Rect insets = mAttachInfo.mVisibleInsets ; outRect.left += insets.left ; outRect.top += insets.top ; outRect.right -= insets.right ; outRect.bottom -= insets.bottom ; return ; } android.view.Display d = android.view.WindowManagerImpl.getDefault ( ) . getDefaultDisplay ( ) ; d.getRectSize ( outRect ) ; }
Source:
public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( node == ( mTarget ) ) { mSeenTarget = true ; } else if ( ( mSeenTarget ) || ( ( node.astOperand ( ) ) == ( mTarget ) ) ) { java.lang.String name = node.astName ( ) . astValue ( ) ; if ( ( "commit" . equals ( name ) ) || ( "apply" . equals ( name ) ) ) { mFound = true ; } } return true ; }

Target:
public boolean visitMethodInvocation ( lombok.ast.MethodInvocation node ) { if ( node == ( mTarget ) ) { mSeenTarget = true ; } else if ( ( ( mAllowCommitBeforeTarget ) || ( mSeenTarget ) ) || ( ( node.astOperand ( ) ) == ( mTarget ) ) ) { java.lang.String name = node.astName ( ) . astValue ( ) ; if ( ( "commit" . equals ( name ) ) || ( "apply" . equals ( name ) ) ) { mFound = true ; } } return super . visitMethodInvocation ( node ) ; }
Source:
private static com.intellij.diff.tools.simple.TextDiffType getDiffType ( @ org.jetbrains.annotations.NotNull com.intellij.diff.fragments.MergeLineFragment fragment , @ org.jetbrains.annotations.NotNull com.intellij.diff.tools.simple.ThreeSide side ) { assert side != ( ThreeSide.BASE ) ; boolean isBaseEmpty = com.intellij.diff.tools.simple.SimpleThreesideDiffChange.isIntervalEmpty ( fragment , ThreeSide.BASE ) ; boolean isVersionEmpty = com.intellij.diff.tools.simple.SimpleThreesideDiffChange.isIntervalEmpty ( fragment , side ) ; if ( ( ! isBaseEmpty ) && ( ! isVersionEmpty ) ) return TextDiffType.MODIFIED ; if ( ! isBaseEmpty ) return TextDiffType.DELETED ; if ( ! isVersionEmpty ) return TextDiffType.INSERTED ; throw new java.lang.IllegalArgumentException ( ) ; }

Target:
private static boolean compareWithBase ( @ org.jetbrains.annotations.NotNull com.intellij.diff.fragments.MergeLineFragment fragment , @ org.jetbrains.annotations.NotNull java.util.List < com.intellij.openapi.editor.ex.EditorEx > editors , @ org.jetbrains.annotations.NotNull com.intellij.diff.tools.simple.ThreeSide side ) { java.lang.CharSequence content1 = com.intellij.diff.tools.simple.SimpleThreesideDiffChange.getRangeContent ( fragment , editors , ThreeSide.BASE ) ; java.lang.CharSequence content2 = com.intellij.diff.tools.simple.SimpleThreesideDiffChange.getRangeContent ( fragment , editors , side ) ; return com.intellij.openapi.util.text.StringUtil.equals ( content1 , content2 ) ; }
Source:
protected final void updateConnectionProperties ( ) { int newProperties = buildConnectionProperties ( ) ; newProperties = changeBitmask ( newProperties , com.android.services.telephony.PROPERTY_HIGH_DEF_AUDIO , mHasHighDefAudio ) ; newProperties = changeBitmask ( newProperties , com.android.services.telephony.PROPERTY_WIFI , mIsWifi ) ; newProperties = changeBitmask ( newProperties , com.android.services.telephony.PROPERTY_IS_EXTERNAL_CALL , isExternalConnection ( ) ) ; if ( ( getConnectionProperties ( ) ) != newProperties ) { setConnectionProperties ( newProperties ) ; } }

Target:
public void handleRttUpgradeResponse ( com.android.services.telephony.RttTextStream textStream ) { if ( ! ( isImsConnection ( ) ) ) { com.android.services.telephony.Log.w ( this , "handleRttUpgradeResponse - not in IMS, so RTT cannot be enabled." ) ; return ; } com.android.internal.telephony.imsphone.ImsPhoneConnection originalConnection = ( ( com.android.internal.telephony.imsphone.ImsPhoneConnection ) ( mOriginalConnection ) ) ; originalConnection.sendRttModifyResponse ( textStream ) ; }
Source:
private void sendIntent ( android.support.v4.util.Pair < java.lang.String , android.net.Uri > booleanUriPair ) { java.lang.String sourcePackage = booleanUriPair.first ; android.net.Uri uri = booleanUriPair.second ; com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.sendIntent" , "srcPkg:%s, uri:%%s" , sourcePackage , java.lang.String.valueOf ( uri ) ) ; android.content.Intent intent = new android.content.Intent ( android.provider.VoicemailContract.ACTION_FETCH_VOICEMAIL , uri ) ; intent.setPackage ( sourcePackage ) ; voicemailLoadingStatusView.setVisibility ( com.android.dialer.voicemail.listui.VISIBLE ) ; getContext ( ) . sendBroadcast ( intent ) ; }

Target:
private void sendIntent ( android.support.v4.util.Pair < java.lang.String , android.net.Uri > booleanUriPair ) { java.lang.String sourcePackage = booleanUriPair.first ; android.net.Uri uri = booleanUriPair.second ; com.android.dialer.common.LogUtil.i ( "NewVoicemailMediaPlayer.sendIntent" , "srcPkg:%s, uri:%s" , sourcePackage , java.lang.String.valueOf ( uri ) ) ; android.content.Intent intent = new android.content.Intent ( android.provider.VoicemailContract.ACTION_FETCH_VOICEMAIL , uri ) ; intent.setPackage ( sourcePackage ) ; voicemailLoadingStatusView.setVisibility ( com.android.dialer.voicemail.listui.VISIBLE ) ; getContext ( ) . sendBroadcast ( intent ) ; }
Source:
public void testEnterSoftApModeFromDifferentState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "ClientModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; enterSoftApActiveMode ( ) ; }

Target:
public void testSwitchModeWhenSoftApActiveMode ( ) throws java.lang.Exception { enterSoftApActiveMode ( ) ; mWifiStateMachinePrime.enterClientMode ( ) ; mLooper.dispatchAll ( ) ; verify ( mSoftApManager ) . stop ( ) ; verify ( mWificond ) . tearDownInterfaces ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.CLIENT_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }
Source:
public void switchUserStore ( com.android.server.wifi.WifiConfigStore.StoreFile userStore ) { stopBufferedWriteAlarm ( ) ; mUserStore = userStore ; }

Target:
public com.android.server.wifi.WifiConfigStoreData switchUserStoreAndRead ( com.android.server.wifi.WifiConfigStore.StoreFile userStore ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { stopBufferedWriteAlarm ( ) ; mUserStore = userStore ; long readStartTime = mClock.getElapsedSinceBootMillis ( ) ; byte [ ] userDataBytes = mUserStore.readRawData ( ) ; long readTime = ( mClock.getElapsedSinceBootMillis ( ) ) - readStartTime ; android.util.Log.d ( com.android.server.wifi.WifiConfigStore.TAG , ( ( "Reading from user store completed in " + readTime ) + " ms." ) ) ; return com.android.server.wifi.WifiConfigStoreData.parseRawData ( null , userDataBytes ) ; }
Source:
private void addStorageDevicesLocked ( ) { if ( mPtpMode ) { addStorageLocked ( mVolumeMap.get ( mVolumes [ 0 ] . getPath ( ) ) ) ; } else { for ( android.os.storage.StorageVolume volume : mVolumeMap.values ( ) ) { addStorageLocked ( volume ) ; } } }

Target:
private void addStorageDevicesLocked ( ) { if ( mPtpMode ) { java.lang.String path = mVolumes [ 0 ] . getPath ( ) ; if ( path != null ) { java.lang.String state = mStorageManager.getVolumeState ( path ) ; if ( Environment.MEDIA_MOUNTED.equals ( state ) ) { addStorageLocked ( mVolumeMap.get ( mVolumes [ 0 ] . getPath ( ) ) ) ; } } } else { for ( android.os.storage.StorageVolume volume : mVolumeMap.values ( ) ) { addStorageLocked ( volume ) ; } } }
Source:
boolean enableWBS ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ! ( mStateMachine.isConnected ( ) ) ) { return false ; } if ( mStateMachine.isAudioOn ( ) ) { return false ; } for ( android.bluetooth.BluetoothDevice device : getConnectedDevices ( ) ) { mStateMachine.sendMessage ( HeadsetStateMachine.ENABLE_WBS , device ) ; } return true ; }

Target:
boolean isAudioOn ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return ( mStateMachine.getAudioState ( ) ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ) ; }
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 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 mMainStack.startActivityMayWait ( caller , ( - 1 ) , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , null , null , false , null , config ) ; }