auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean generate ( java.lang.String key , int uid , int keyType , int keySize , int flags , byte [ ] [ ] args ) { try { return ( mBinder.generate ( key , uid , keyType , keySize , flags , args ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean generate ( java.lang.String key , int uid , int keyType , int keySize , int flags , byte [ ] [ ] args ) { try { return ( mBinder.generate ( key , uid , keyType , keySize , flags , new android.security.KeystoreArguments ( args ) ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void testHasLinks ( ) { android.widget.TextView viewWithLinks = new android.widget.TextView ( context ) ; viewWithLinks.setText ( "Here is a www.google.com link" ) ; android.text.util.Linkify.addLinks ( viewWithLinks , Linkify.ALL ) ; assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasLinks ( ) . matches ( viewWithLinks ) ) ; android.widget.TextView viewWithNoLinks = new android.widget.TextView ( context ) ; viewWithNoLinks.setText ( "Here is an unlikified www.google.com" ) ; assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasLinks ( ) . matches ( viewWithNoLinks ) ) ; }

Target:
public void hasLinksTest ( ) { android.widget.TextView viewWithLinks = new android.widget.TextView ( context ) ; viewWithLinks.setText ( "Here is a www.google.com link" ) ; android.text.util.Linkify.addLinks ( viewWithLinks , Linkify.ALL ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.matcher.ViewMatchers.hasLinks ( ) . matches ( viewWithLinks ) ) ; android.widget.TextView viewWithNoLinks = new android.widget.TextView ( context ) ; viewWithNoLinks.setText ( "Here is an unlikified www.google.com" ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.matcher.ViewMatchers.hasLinks ( ) . matches ( viewWithNoLinks ) ) ; }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { int childCount = com.android.tools.lint.detector.api.LintUtils.getChildCount ( element ) ; if ( childCount == 0 ) { checkUselessLeaf ( context , element ) ; } else { checkUselessMiddleLayout ( context , element ) ; } }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { int childCount = com.android.tools.lint.detector.api.LintUtils.getChildCount ( element ) ; if ( childCount == 0 ) { com.android.tools.lint.checks.UselessViewDetector.checkUselessLeaf ( context , element ) ; } else { com.android.tools.lint.checks.UselessViewDetector.checkUselessMiddleLayout ( context , element ) ; } }
Source:
public void test2 ( ) throws java.lang.Exception { assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }

Target:
public void test2 ( ) throws java.lang.Exception { mEnabled = com.android.tools.lint.checks.IconDetectorTest.ALL ; assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }
Source:
public void relayoutCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Request layout" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.DeviceBridge.requestLayout ( selectedNode.viewNode ) ; } } ) ; } }

Target:
public void relayoutCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Request layout" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.requestLayout ( selectedNode.viewNode ) ; } } ) ; } }
Source:
public void onResult ( com.google.android.gms.wearable.MessageApi.SendMessageResult sendMessageResult ) { if ( ! ( sendMessageResult.getStatus ( ) . isSuccess ( ) ) ) { updatePhoneButtonOnUiThread ( ) ; logToUi ( "Sending message failed." ) ; } else { android.util.Log.d ( com.example.android.wearable.runtimepermissions.MainWearActivity.TAG , "Message sent successfully." ) ; } }

Target:
public void onResult ( com.google.android.gms.wearable.CapabilityApi.GetCapabilityResult getCapabilityResult ) { if ( getCapabilityResult.getStatus ( ) . isSuccess ( ) ) { com.google.android.gms.wearable.CapabilityInfo capabilityInfo = getCapabilityResult.getCapability ( ) ; mPhoneNodeId = pickBestNodeId ( capabilityInfo.getNodes ( ) ) ; } else { android.util.Log.d ( com.example.android.wearable.runtimepermissions.MainWearActivity.TAG , ( "Failed CapabilityApi result: " + ( getCapabilityResult.getStatus ( ) ) ) ) ; } }
Source:
public com.android.tools.perflib.heap.Heap getHeap ( @ com.android.annotations.NonNull java.lang.String name ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { if ( name.equals ( mHeaps.get ( i ) . getName ( ) ) ) { return mHeaps.get ( i ) ; } } return null ; }

Target:
public com.android.tools.perflib.heap.Heap getHeap ( @ com.android.annotations.NonNull java.lang.String name ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { if ( name.equals ( mHeap.getName ( ) ) ) { return mHeap ; } } return null ; }
Source:
public void addEntry ( java.lang.String zoneId , java.time.Instant endInstantExclusive ) { zoneIdEntryMap.put ( zoneId , new com.android.libcore.timezone.tzlookup.zonetree.CountryZoneUsage.Entry ( zoneId , endInstantExclusive ) ) ; }

Target:
void addEntry ( java.lang.String zoneId , java.time.Instant notUsedAfterInstant ) { if ( zoneIdEntryMap.containsKey ( zoneId ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "Entry exists for " + zoneId ) + " for isoCode=" ) + ( isoCode ) ) ) ; } zoneIdEntryMap.put ( zoneId , new com.android.libcore.timezone.tzlookup.zonetree.CountryZoneUsage.Entry ( zoneId , notUsedAfterInstant ) ) ; }
Source:
public void test2_get ( ) { int [ ] bits = com.android.dx.util.Bits.makeBitSet ( 100 ) ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 0 ; i < 100 ; i ++ ) { assertTrue ( com.android.dx.util._tests.BitsTest.label ( i ) , com.android.dx.util.Bits.get ( bits , i ) ) ; } }

Target:
public void test2_get ( ) { int [ ] bits = com.android.dx.util.Bits.makeBitSet ( 100 ) ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 0 ; i < 100 ; i ++ ) { assertTrue ( com.android.dx.util.BitsTest.label ( i ) , com.android.dx.util.Bits.get ( bits , i ) ) ; } }
Source:
private void sendImsFeatureStatusChanged ( int slot , int feature , int status ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureCallback > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureCallback callbacks = i.next ( ) ; try { callbacks.imsStatusChanged ( slot , feature , status ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureStatusChanged: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }

Target:
public void binderDied ( ) { android.util.Log.e ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "ImsService(" + ( mComponentName ) ) + ") died. Restarting..." ) ) ; synchronized ( mLock ) { mIsBinding = false ; mIsBound = false ; } notifyAllFeaturesRemoved ( ) ; cleanUpService ( ) ; startDelayedRebindToService ( ) ; }
Source:
public static void recordPercentageHistogram ( java.lang.String name , int sample ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , 101 ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void recordLinearCountHistogram ( java.lang.String name , int sample , int min , int max , int numBuckets ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordLinearCountHistogram ( name , key , sample , min , max , numBuckets ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public static void recordPercentageHistogram ( java.lang.String name , int sample ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , 101 ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void recordPercentageHistogram ( java.lang.String name , int sample ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordEnumeratedHistogram ( name , key , sample , 101 ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public void setQualifier ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier ) { com.android.ide.eclipse.adt.internal.resources.configurations.NavigationMethodQualifier q = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.NavigationMethodQualifier ) ( qualifier ) ) ; com.android.resources.Navigation value = q.getValue ( ) ; if ( value == null ) { mNavigation.clearSelection ( ) ; } else { mNavigation.select ( com.android.resources.Navigation.getIndex ( value ) ) ; } }

Target:
public void setQualifier ( com.android.ide.common.resources.configuration.ResourceQualifier qualifier ) { com.android.ide.common.resources.configuration.NavigationMethodQualifier q = ( ( com.android.ide.common.resources.configuration.NavigationMethodQualifier ) ( qualifier ) ) ; com.android.resources.Navigation value = q.getValue ( ) ; if ( value == null ) { mNavigation.clearSelection ( ) ; } else { mNavigation.select ( com.android.resources.Navigation.getIndex ( value ) ) ; } }
Source:
private static void doFollowReferencesTestNonRoot ( java.util.ArrayList < java.lang.Object > tmpStorage ) { Main.A a = Main.createTree ( ) ; tmpStorage.add ( a ) ; Main.doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , null ) ; Main.doFollowReferencesTestImpl ( a , java.lang.Integer.MAX_VALUE , ( - 1 ) , null ) ; tmpStorage.clear ( ) ; }

Target:
private static void doFollowReferencesTestRoot ( ) { Main.Verifier v = new Main.Verifier ( ) ; Main.tagClasses ( v ) ; Main.A a = Main.createTree ( v ) ; Main.doFollowReferencesTestImpl ( null , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , null ) ; Main.doFollowReferencesTestImpl ( a.foo , java.lang.Integer.MAX_VALUE , ( - 1 ) , a , v , "2@1000" ) ; }
Source:
private void reportNewProgress ( java.lang.String encodedConfigurationInstance , java.lang.String previousProgress , java.lang.String newProgress ) { newDataReceived = true ; configurationProgress.put ( encodedConfigurationInstance , newProgress ) ; java.lang.String diffProgress = newProgress.substring ( previousProgress.length ( ) ) ; testRunListener.testConfigurationProgress ( com.google.gct.testing.ConfigurationInstance.parseFromEncodedString ( encodedConfigurationInstance ) . getResultsViewerDisplayString ( ) , diffProgress ) ; }

Target:
private java.util.List < java.lang.String > getPreviousProgress ( java.lang.String encodedConfigurationInstance ) { java.util.List < java.lang.String > progressMessages = configurationProgress.get ( encodedConfigurationInstance ) ; if ( progressMessages == null ) { progressMessages = new java.util.LinkedList < java.lang.String > ( ) ; configurationProgress.put ( encodedConfigurationInstance , progressMessages ) ; } return progressMessages ; }
Source:
public void test_nonBlockingConnect ( ) throws java.io.IOException { java.nio.channels.SocketChannel channel = null ; try { channel = java.nio.channels.SocketChannel.open ( ) ; channel.configureBlocking ( false ) ; java.nio.channels.Selector selector = java.nio.channels.Selector.open ( ) ; channel.register ( selector , java.nio.channels.SelectionKey.OP_CONNECT ) ; channel.connect ( org.apache.harmony.nio.tests.java.nio.channels.SelectorTest.LOCAL_ADDRESS ) ; channel.finishConnect ( ) ; selector.select ( ) ; assertEquals ( 1 , selector.selectedKeys ( ) . size ( ) ) ; } finally { channel.close ( ) ; } }

Target:
public void test_nonBlockingConnect ( ) throws java.io.IOException { java.nio.channels.SocketChannel channel = null ; try { channel = java.nio.channels.SocketChannel.open ( ) ; channel.configureBlocking ( false ) ; java.nio.channels.Selector selector = java.nio.channels.Selector.open ( ) ; channel.register ( selector , java.nio.channels.SelectionKey.OP_CONNECT ) ; channel.connect ( localAddress ) ; channel.finishConnect ( ) ; selector.select ( ) ; assertEquals ( 0 , selector.selectedKeys ( ) . size ( ) ) ; } finally { channel.close ( ) ; } }
Source:
void playTone ( com.android.server.telecom.Call call , char c ) { if ( ( mCall ) != call ) { return ; } synchronized ( this ) { if ( ( mToneGenerator ) == null ) { com.android.server.telecom.Log.d ( this , "playTone: mToneGenerator == null, %c." , c ) ; } else { com.android.server.telecom.Log.d ( this , "starting local tone: %c." , c ) ; int tone = com.android.server.telecom.DtmfLocalTonePlayer.getMappedTone ( c ) ; if ( tone != ( android.media.ToneGenerator.TONE_UNKNOWN ) ) { mToneGenerator.startTone ( tone , ( - 1 ) ) ; } } } }

Target:
void playTone ( com.android.server.telecom.Call call , char c ) { if ( ( mCall ) != call ) { return ; } synchronized ( this ) { if ( ( mToneGenerator ) == null ) { android.telecom.Log.d ( this , "playTone: mToneGenerator == null, %c." , c ) ; } else { android.telecom.Log.d ( this , "starting local tone: %c." , c ) ; int tone = com.android.server.telecom.DtmfLocalTonePlayer.getMappedTone ( c ) ; if ( tone != ( android.media.ToneGenerator.TONE_UNKNOWN ) ) { mToneGenerator.startTone ( tone , ( - 1 ) ) ; } } } }
Source:
private void onConnectStateChanged ( byte [ ] address , int state , int error , int local_role , int remote_role ) { if ( com.android.bluetooth.pan.PanService.DBG ) { log ( ( ( ( ( ( "onConnectStateChanged: " + state ) + ", local role:" ) + local_role ) + ", remote_role: " ) + remote_role ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.pan.PanService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = new com.android.bluetooth.pan.PanService.ConnectState ( address , state , error , local_role , remote_role ) ; mHandler.sendMessage ( msg ) ; }

Target:
private void onConnectStateChanged ( byte [ ] address , int state , int error , int localRole , int remoteRole ) { if ( com.android.bluetooth.pan.PanService.DBG ) { log ( ( ( ( ( ( "onConnectStateChanged: " + state ) + ", local role:" ) + localRole ) + ", remoteRole: " ) + remoteRole ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.pan.PanService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = new com.android.bluetooth.pan.PanService.ConnectState ( address , state , error , localRole , remoteRole ) ; mHandler.sendMessage ( msg ) ; }
Source:
static com.android.server.timezone.PackageTracker create ( android.content.Context context ) { com.android.server.timezone.PackageTrackerHelperImpl helperImpl = new com.android.server.timezone.PackageTrackerHelperImpl ( context ) ; return new com.android.server.timezone.PackageTracker ( helperImpl , helperImpl , helperImpl , new com.android.server.timezone.PackageStatusStorage ( context ) , new com.android.server.timezone.IntentHelperImpl ( context ) ) ; }

Target:
static com.android.server.timezone.PackageTracker create ( android.content.Context context ) { com.android.server.timezone.PackageTrackerHelperImpl helperImpl = new com.android.server.timezone.PackageTrackerHelperImpl ( context ) ; java.io.File storageDir = new java.io.File ( android.os.Environment.getDataSystemDirectory ( ) , "timezone" ) ; if ( ! ( storageDir.exists ( ) ) ) { storageDir.mkdir ( ) ; } return new com.android.server.timezone.PackageTracker ( helperImpl , helperImpl , helperImpl , new com.android.server.timezone.PackageStatusStorage ( storageDir ) , new com.android.server.timezone.IntentHelperImpl ( context ) ) ; }
Source:
public boolean dumpProfiles ( java.lang.String gid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { return mInstaller.dumpProfiles ( gid , packageName , codePaths ) ; }

Target:
public boolean dumpProfiles ( int uid , java.lang.String packageName , java.lang.String codePaths ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { return mInstalld.dumpProfiles ( uid , packageName , codePaths ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
private void startTimer ( ) { synchronized ( lock ) { if ( ( timeout ) == ( com.android.jack.server.JackHttpServer.TIMEOUT_DISABLED ) ) { return ; } if ( ( timer ) != null ) { cancelTimer ( ) ; } com.android.jack.server.JackHttpServer.logger.log ( java.util.logging.Level.INFO , "Start timer" ) ; timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( timer ) != null ; timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { cancelTimer ( ) ; freeLoadedPrograms ( ) ; } } , ( ( timeout ) * 1000L ) ) ; } }

Target:
private void startTimer ( ) { synchronized ( lock ) { if ( ( timeout ) == ( ConfigFile.TIMEOUT_DISABLED ) ) { return ; } if ( ( timer ) != null ) { cancelTimer ( ) ; } com.android.jack.server.JackHttpServer.logger.log ( java.util.logging.Level.INFO , "Start timer" ) ; timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( timer ) != null ; timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { cancelTimer ( ) ; freeLoadedPrograms ( ) ; } } , ( ( timeout ) * 1000L ) ) ; } }
Source:
public com.android.sched.util.codec.KeyValueCodec < T > sorted ( ) { java.util.Arrays.sort ( this . entries , new java.util.Comparator < com.android.sched.util.codec.KeyValueCodec.Entry < T > > ( ) { @ java.lang.Override public int compare ( com.android.sched.util.codec.KeyValueCodec.Entry < T > o1 , com.android.sched.util.codec.KeyValueCodec.Entry < T > o2 ) { return o1.key.compareToIgnoreCase ( o2.key ) ; } } ) ; return this ; }

Target:
public com.android.sched.util.codec.KeyValueCodec < T > sorted ( ) { this . sorted = true ; java.util.Arrays.sort ( this . entries , new java.util.Comparator < com.android.sched.util.codec.KeyValueCodec.Entry < T > > ( ) { @ java.lang.Override public int compare ( com.android.sched.util.codec.KeyValueCodec.Entry < T > o1 , com.android.sched.util.codec.KeyValueCodec.Entry < T > o2 ) { return o1.key.compareToIgnoreCase ( o2.key ) ; } } ) ; return this ; }
Source:
public void onCallForwardingIndicatorChanged ( boolean visible ) { if ( com.android.phone.CallNotifier.VDBG ) log ( ( ( ( "onCallForwardingIndicatorChanged(): " + ( this . mSubId ) ) + " " ) + visible ) ) ; mApplication.notificationMgr.updateCfi ( this . mSubId , visible ) ; }

Target:
public void onCallForwardingIndicatorChanged ( boolean visible ) { android.util.Log.i ( com.android.phone.CallNotifier.LOG_TAG , ( ( ( "onCallForwardingIndicatorChanged(): subId=" + ( this . mSubId ) ) + ", visible=" ) + ( visible ? "Y" : "N" ) ) ) ; mApplication.notificationMgr.updateCfi ( this . mSubId , visible ) ; }
Source:
public void testResourceType ( ) throws java.lang.Exception { assertEquals ( ( ( ( ( ( ( ( ( ( ( ( com.android.tools.lint.checks.SupportAnnotationDetectorTest.SDK_ANNOTATIONS_AVAILABLE ? "" + ( ( ( ( ( "src/p1/p2/Flow.java:13: Error: Expected resource of type drawable [ResourceType]\n" + " resources.getDrawable(10); // ERROR\n" ) + " ~~\n" ) + "src/p1/p2/Flow.java:18: Error: Expected resource of type drawable [ResourceType]\n" ) + " resources.getDrawable(R.string.my_string); // ERROR\n" ) + " ~~~~~~~~~~~~~~~~~~\n" ) : "" ) + "src/p1/p2/Flow.java:22: Error: Expected resource of type drawable [ResourceType]\n" ) + " myMethod(R.string.my_string); // ERROR\n" ) + " ~~~~~~~~~~~~~~~~~~\n" ) + "src/p1/p2/Flow.java:32: Error: Expected resource identifier (R.type.name) [ResourceType]\n" ) + " myAnyResMethod(50); // ERROR\n" ) + " ~~\n" ) + "src/p1/p2/Flow.java:68: Error: Expected resource of type drawable [ResourceType]\n" ) + " myMethod(z); // ERROR\n" ) + " ~\n" ) + ( com.android.tools.lint.checks.SupportAnnotationDetectorTest.SDK_ANNOTATIONS_AVAILABLE ? "5 errors, 0 warnings\n" : "3 errors, 0 warnings\n" ) ) , lintProject ( "src/p1/p2/Flow.java.txt=>src/p1/p2/Flow.java" , "src/android/support/annotation/DrawableRes.java.txt=>src/android/support/annotation/DrawableRes.java" ) ) ; }

Target:
public void testColorInt3 ( ) throws java.lang.Exception { if ( ! ( com.android.tools.lint.checks.SupportAnnotationDetectorTest.SDK_ANNOTATIONS_AVAILABLE ) ) { return ; } assertEquals ( ( "" + ( ( ( "src/test/pkg/ColorTest.java:11: Error: Expected a color resource id (R.color.) but received an RGB integer [ResourceType]\n" + " setColor(actualColor);\n" ) + " ~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( java ( "src/test/pkg/ColorTest.java" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "import android.content.Context;\n" ) + "import android.content.res.Resources;\n" ) + "import android.support.annotation.ColorRes;\n" ) + "\n" ) + "public abstract class ColorTest {\n" ) + " public abstract void setColor(@ColorRes int color);\n" ) + "\n" ) + " public void test(Context context, @ColorRes int id) {\n" ) + " int actualColor = context.getResources().getColor(id, null);\n" ) + " setColor(actualColor);\n" ) + " }\n" ) + "}\n" ) ) ) , mColorResAnnotation ) ) ; }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( android.bluetooth.BluetoothSap.VDBG ) android.bluetooth.BluetoothSap.log ( "getClient()" ) ; if ( ( mService ) != null ) { try { return mService.getClient ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothSap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothSap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothSap.DBG ) android.bluetooth.BluetoothSap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }

Target:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( android.bluetooth.BluetoothSap.VDBG ) android.bluetooth.BluetoothSap.log ( "getClient()" ) ; final android.bluetooth.IBluetoothSap service = mService ; if ( service != null ) { try { return service.getClient ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothSap.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothSap.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothSap.DBG ) android.bluetooth.BluetoothSap.log ( android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return null ; }
Source:
public void onChildInserted ( com.android.ide.common.api.INode child , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onChildInserted ( child , parent , insertType ) ; child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , com.android.ide.common.layout.LayoutConstants.VALUE_FILL_PARENT ) ; child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , com.android.ide.common.layout.LayoutConstants.VALUE_FILL_PARENT ) ; }

Target:
public void onChildInserted ( com.android.ide.common.api.INode child , com.android.ide.common.api.INode parent , com.android.ide.common.api.InsertType insertType ) { super . onChildInserted ( child , parent , insertType ) ; java.lang.String fillParent = getFillParentValueName ( ) ; child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , fillParent ) ; child.setAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , fillParent ) ; }
Source:
private void autoConnectA2dpSink ( ) { com.android.bluetooth.a2dp.A2dpSinkService a2dpSinkService = com.android.bluetooth.a2dp.A2dpSinkService.getA2dpSinkService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( a2dpSinkService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { debugLog ( ( "autoConnectA2dp() - Connecting A2DP Sink with " + ( device.toString ( ) ) ) ) ; a2dpSinkService.connect ( device ) ; } }

Target:
private void autoConnectHeadsetClient ( ) { com.android.bluetooth.hfpclient.HeadsetClientService headsetClientService = com.android.bluetooth.hfpclient.HeadsetClientService.getHeadsetClientService ( ) ; android.bluetooth.BluetoothDevice [ ] bondedDevices = getBondedDevices ( ) ; if ( ( bondedDevices == null ) || ( headsetClientService == null ) ) { return ; } for ( android.bluetooth.BluetoothDevice device : bondedDevices ) { if ( ( headsetClientService.getPriority ( device ) ) == ( android.bluetooth.BluetoothProfile.PRIORITY_AUTO_CONNECT ) ) { debugLog ( ( "autoConnectHeadsetClient() - Connecting Headset Client with " + ( device.toString ( ) ) ) ) ; headsetClientService.connect ( device ) ; } } }
Source:
public java.lang.String basenameOfJar ( java.io.File file ) { java.lang.String name = file.getName ( ) . replaceAll ( "(\\.jar|\\.jack)$" , "" ) ; while ( vogar.Run.BANNED_NAMES.contains ( name ) ) { file = file.getParentFile ( ) ; name = file.getName ( ) ; } return name ; }

Target:
public java.lang.String basenameOfJar ( java.io.File file ) { java.lang.String name = file.getName ( ) . replaceAll ( "(\\.jar)$" , "" ) ; while ( vogar.Run.BANNED_NAMES.contains ( name ) ) { file = file.getParentFile ( ) ; name = file.getName ( ) ; } return name ; }
Source:
public void referenceProductionAndroidCode ( ) { com.android.tests.MainActivity ma = null ; }

Target:
public void mockFinalClass ( ) { android.bluetooth.BluetoothAdapter adapter = mock ( android.bluetooth.BluetoothAdapter.class ) ; when ( adapter.isEnabled ( ) ) . thenReturn ( true ) ; assertTrue ( adapter.isEnabled ( ) ) ; verify ( adapter ) . isEnabled ( ) ; verifyNoMoreInteractions ( adapter ) ; }
Source:
public void onServiceConnected ( android.content.ComponentName name , android.os.IBinder service ) { synchronized ( mLock ) { mService = new android.os.Messenger ( service ) ; mServiceBound = true ; mServiceName = name ; android.util.Log.d ( com.android.nfc.cardemulation.HostEmulationManager.TAG , "Service bound" ) ; mState = com.android.nfc.cardemulation.HostEmulationManager.STATE_XFER ; if ( ( mSelectApdu ) != null ) { sendDataToServiceLocked ( mService , mSelectApdu ) ; mSelectApdu = null ; } } }

Target:
public void onServiceConnected ( android.content.ComponentName name , android.os.IBinder service ) { synchronized ( mLock ) { if ( ( mState ) == ( com.android.nfc.cardemulation.HostEmulationManager.STATE_IDLE ) ) { return ; } mService = new android.os.Messenger ( service ) ; mServiceBound = true ; mServiceName = name ; android.util.Log.d ( com.android.nfc.cardemulation.HostEmulationManager.TAG , "Service bound" ) ; mState = com.android.nfc.cardemulation.HostEmulationManager.STATE_XFER ; if ( ( mSelectApdu ) != null ) { sendDataToServiceLocked ( mService , mSelectApdu ) ; mSelectApdu = null ; } } }
Source:
public void onServiceConnected ( android.content.ComponentName classname , android.os.IBinder obj ) { try { android.content.IntentFilter f = new android.content.IntentFilter ( ) ; f.addAction ( MediaPlaybackService.ASYNC_OPEN_COMPLETE ) ; registerReceiver ( mStatusListener , new android.content.IntentFilter ( f ) ) ; MusicUtils.sService.openfileAsync ( getIntent ( ) . getData ( ) . toString ( ) ) ; } catch ( android.os.RemoteException ex ) { } }

Target:
public void onServiceConnected ( android.content.ComponentName classname , android.os.IBinder obj ) { try { android.content.IntentFilter f = new android.content.IntentFilter ( ) ; f.addAction ( MediaPlaybackService.ASYNC_OPEN_COMPLETE ) ; f.addAction ( MediaPlaybackService.PLAYBACK_COMPLETE ) ; registerReceiver ( mStatusListener , new android.content.IntentFilter ( f ) ) ; MusicUtils.sService.openfileAsync ( getIntent ( ) . getData ( ) . toString ( ) ) ; } catch ( android.os.RemoteException ex ) { } }
Source:
public void addTasks ( java.util.List < com.intellij.openapi.externalSystem.model.task.TaskData > tasks , com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.Phase phase ) { if ( tasks.isEmpty ( ) ) return ; final com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.ExternalProjectsStateProvider stateProvider = com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.getInstance ( myProject ) . getStateProvider ( ) ; for ( com.intellij.openapi.externalSystem.model.task.TaskData task : tasks ) { final com.intellij.openapi.externalSystem.service.project.manage.TaskActivationState taskActivationState = stateProvider.getTasksActivation ( task.getOwner ( ) , task.getLinkedExternalProjectPath ( ) ) ; taskActivationState.getTasks ( phase ) . add ( task.getName ( ) ) ; } fireTasksChanged ( ) ; }

Target:
public void removeTasks ( @ org.jetbrains.annotations.NotNull java.util.Collection < com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry > entries ) { if ( entries.isEmpty ( ) ) return ; final com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.ExternalProjectsStateProvider stateProvider = com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.getInstance ( myProject ) . getStateProvider ( ) ; for ( com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry activationEntry : entries ) { final com.intellij.openapi.externalSystem.service.project.manage.TaskActivationState taskActivationState = stateProvider.getTasksActivation ( activationEntry.systemId , activationEntry.projectPath ) ; taskActivationState.getTasks ( activationEntry.phase ) . remove ( activationEntry.taskName ) ; } fireTasksChanged ( ) ; }
Source:
private boolean canReadPhoneState ( java.lang.String callingPackage , java.lang.String message ) { try { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE , message ) ; return true ; } catch ( java.lang.SecurityException e ) { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , message ) ; } if ( ( mAppOps.noteOp ( AppOpsManager.OP_READ_PHONE_STATE , android.os.Binder.getCallingUid ( ) , callingPackage ) ) != ( android.app.AppOpsManager.MODE_ALLOWED ) ) { return false ; } return true ; }

Target:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }
Source:
public void testSort_modcountUnmodifiedForLinkedList ( ) { java.util.LinkedList < java.lang.String > list = new java.util.LinkedList < > ( java.util.Arrays.asList ( "red" , "green" , "blue" , "violet" ) ) ; java.util.Iterator < java.lang.String > it = list.iterator ( ) ; it.next ( ) ; java.util.Collections.sort ( list ) ; it.next ( ) ; }

Target:
public void testSort_modcountUnmodifiedForLinkedList ( ) { libcore.java.util.CollectionsTest.runOnTargetSdkAtLeast ( 26 , ( ) -> { java.util.LinkedList < java.lang.String > list = new java.util.LinkedList < > ( java.util.Arrays.asList ( "red" , "green" , "blue" , "violet" ) ) ; java.util.Iterator < java.lang.String > it = list.iterator ( ) ; it.next ( ) ; java.util.Collections.sort ( list ) ; it.next ( ) ; } ) ; }
Source:
public void write ( java.io.OutputStream out ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataOutputStream dataOut = new java.io.DataOutputStream ( out ) ; try { dataOut.writeUTF ( myOldBuild ) ; dataOut.writeUTF ( myNewBuild ) ; dataOut.writeBoolean ( myIsBinary ) ; dataOut.writeBoolean ( myIsStrict ) ; dataOut.writeBoolean ( myIsNormalized ) ; com.intellij.updater.Patch.writeList ( dataOut , myDeleteFiles ) ; writeActions ( dataOut , myActions ) ; } finally { dataOut.flush ( ) ; } }

Target:
public void write ( java.io.OutputStream out ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataOutputStream dataOut = new java.io.DataOutputStream ( out ) ; try { dataOut.writeUTF ( myOldBuild ) ; dataOut.writeUTF ( myNewBuild ) ; dataOut.writeBoolean ( myIsBinary ) ; dataOut.writeBoolean ( myIsStrict ) ; dataOut.writeBoolean ( myIsNormalized ) ; com.intellij.updater.Patch.writeMap ( dataOut , myWarnings ) ; com.intellij.updater.Patch.writeList ( dataOut , myDeleteFiles ) ; writeActions ( dataOut , myActions ) ; } finally { dataOut.flush ( ) ; } }
Source:
public boolean execute ( int id ) { com.intellij.util.indexing.ProgressManager.checkCanceled ( ) ; com.intellij.util.indexing.VirtualFile file = com.intellij.util.indexing.IndexInfrastructure.findFileByIdIfCached ( fs , id ) ; if ( ( file != null ) && ( filter.accept ( file ) ) ) { return processor.process ( file ) ; } return true ; }

Target:
public boolean execute ( int id ) { com.intellij.openapi.progress.ProgressManager.checkCanceled ( ) ; com.intellij.util.indexing.VirtualFile file = com.intellij.util.indexing.IndexInfrastructure.findFileByIdIfCached ( fs , id ) ; if ( ( file != null ) && ( filter.accept ( file ) ) ) { return processor.process ( file ) ; } return true ; }
Source:
public void testInvalidMajorDistroVersion_newer ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion newMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION ) + 1 ) , com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; com.android.timezone.distro.TimeZoneDistro distro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( newMajorDistroVersion ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 5 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }

Target:
public void testInvalidMajorDistroVersion_newer ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.DistroVersion newMajorDistroVersion = new com.android.timezone.distro.DistroVersion ( ( ( com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MAJOR_VERSION ) + 1 ) , com.android.timezone.distro.DistroVersion.CURRENT_FORMAT_MINOR_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION , com.android.cts.tzdata.TzDataCheckTest.VALID_REVISION ) ; byte [ ] distroBytes = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . setDistroVersion ( newMajorDistroVersion ) . buildBytes ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distroBytes ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 5 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }
Source:
private static void assertSuccessfulResponse ( int arg2 , android.os.Message response ) { if ( ( response.what ) == ( android.net.wifi.WifiScanner.CMD_OP_FAILED ) ) { android.net.wifi.WifiScanner.OperationResult result = ( ( android.net.wifi.WifiScanner.OperationResult ) ( response.obj ) ) ; fail ( ( ( ( "response indicates failure, reason=" + ( result.reason ) ) + ", description=" ) + ( result.description ) ) ) ; } else { assertEquals ( "response.what" , WifiScanner.CMD_OP_SUCCEEDED , response.what ) ; assertEquals ( "response.arg2" , arg2 , response.arg2 ) ; } }

Target:
private static void assertSuccessfulResponse ( int arg2 , android.os.Message response ) { if ( ( response.what ) == ( android.net.wifi.WifiScanner.CMD_OP_FAILED ) ) { android.net.wifi.WifiScanner.OperationResult result = ( ( android.net.wifi.WifiScanner.OperationResult ) ( response.obj ) ) ; org.junit.Assert.fail ( ( ( ( "response indicates failure, reason=" + ( result.reason ) ) + ", description=" ) + ( result.description ) ) ) ; } else { org.junit.Assert.assertEquals ( "response.what" , WifiScanner.CMD_OP_SUCCEEDED , response.what ) ; org.junit.Assert.assertEquals ( "response.arg2" , arg2 , response.arg2 ) ; } }
Source:
public void testHasTransformer_MethodWithTransformer ( ) { initializePsiClass ( true , false ) ; mockPsiMethod = org.mockito.Mockito.mock ( com.google.gct.intellij.endpoints.validation.PsiMethod.class ) ; org.mockito.Mockito.when ( mockPsiMethod.getParent ( ) ) . thenReturn ( mockPsiClass ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.EndpointPsiElementVisitor endpointPsiElementVisitor = new com.google.gct.intellij.endpoints.validation.EndpointPsiElementVisitor ( ) ; junit.framework.Assert.assertTrue ( endpointPsiElementVisitor.hasTransformer ( mockPsiMethod ) ) ; }

Target:
public void testHasTransformer_MethodWithTransformer ( ) { initializePsiClass ( true , false ) ; mockPsiMethod = org.mockito.Mockito.mock ( com.google.gct.idea.appengine.validation.PsiMethod.class ) ; org.mockito.Mockito.when ( mockPsiMethod.getParent ( ) ) . thenReturn ( mockPsiClass ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.EndpointPsiElementVisitor endpointPsiElementVisitor = new com.google.gct.idea.appengine.validation.EndpointPsiElementVisitor ( ) ; junit.framework.Assert.assertTrue ( endpointPsiElementVisitor.hasTransformer ( mockPsiMethod ) ) ; }
Source:
private static < K , V > com.google.common.collect.Multimap < K , V > filterFiltered ( com.google.common.collect.Multimaps.FilteredMultimap < K , V > map , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Predicate < java.util.Map.Entry < K , V > > predicate = com.google.common.base.Predicates.and ( map.predicate , entryPredicate ) ; return new com.google.common.collect.Multimaps.FilteredMultimap < K , V > ( map.unfiltered , predicate ) ; }

Target:
public static < K , V > com.google.common.collect.SetMultimap < K , V > filterEntries ( com.google.common.collect.SetMultimap < 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.FilteredSetMultimap ? com.google.common.collect.Multimaps.filterFiltered ( ( ( com.google.common.collect.FilteredSetMultimap < K , V > ) ( unfiltered ) ) , entryPredicate ) : new com.google.common.collect.FilteredEntrySetMultimap < K , V > ( com.google.common.base.Preconditions.checkNotNull ( unfiltered ) , entryPredicate ) ; }
Source:
private android.util.Pair < android.net.wifi.WifiScanner.ScanSettings , com.android.server.wifi.WifiNative.ScanSettings > createScanSettingsForHwPno ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 0 , 2400 , 5150 , 5175 ) , 30000 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; com.android.server.wifi.WifiNative.ScanSettings nativeSettings = new com.android.server.wifi.scanner.NativeScanSettingsBuilder ( ) . withBasePeriod ( 30000 ) . withMaxApPerScan ( com.android.server.wifi.scanner.WifiScanningServiceTest.MAX_AP_PER_SCAN ) . withMaxScansToCache ( BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH ) . addBucketWithChannels ( 30000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , 0 , 2400 , 5150 , 5175 ) . build ( ) ; return android.util.Pair.create ( requestSettings , nativeSettings ) ; }

Target:
private android.util.Pair < android.net.wifi.WifiScanner.ScanSettings , com.android.server.wifi.WifiNative.ScanSettings > createScanSettingsForHwPno ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( com.android.server.wifi.ScanTestUtil.channelsToSpec ( 0 , 2400 , 5150 , 5175 ) , 30000 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; com.android.server.wifi.WifiNative.ScanSettings nativeSettings = new com.android.server.wifi.ScanTestUtil.NativeScanSettingsBuilder ( ) . withBasePeriod ( 30000 ) . withMaxApPerScan ( com.android.server.wifi.scanner.WifiScanningServiceTest.MAX_AP_PER_SCAN ) . withMaxScansToCache ( BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH ) . addBucketWithChannels ( 30000 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN , 0 , 2400 , 5150 , 5175 ) . build ( ) ; return android.util.Pair.create ( requestSettings , nativeSettings ) ; }
Source:
public static synchronized com.android.bluetooth.hfp.HeadsetService getHeadsetService ( ) { if ( ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService ) == null ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "getHeadsetService(): service is NULL" ) ; return null ; } if ( ! ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService.isAvailable ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "getHeadsetService(): service is not available" ) ; return null ; } com.android.bluetooth.hfp.HeadsetService.logD ( ( "getHeadsetService(): returning " + ( com.android.bluetooth.hfp.HeadsetService.sHeadsetService ) ) ) ; return com.android.bluetooth.hfp.HeadsetService.sHeadsetService ; }

Target:
public android.bluetooth.BluetoothDevice getActiveDevice ( ) { com.android.bluetooth.hfp.HeadsetService service = getService ( ) ; if ( service == null ) { return null ; } return service.getActiveDevice ( ) ; }
Source:
public final java.nio.DoubleBuffer asDoubleBuffer ( ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } int off = this . position ( ) ; int lim = this . limit ( ) ; assert off <= lim ; int rem = ( off <= lim ) ? lim - off : 0 ; int size = rem > > 3 ; return new java.nio.ByteBufferAsDoubleBuffer ( this , ( - 1 ) , 0 , size , size , off , order ( ) ) ; }

Target:
final double getDoubleUnchecked ( int i ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } return getDouble ( ix ( i ) ) ; }
Source:
public void destroy ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { destroy ( ) ; } } ) ; return ; } mAwContents.destroy ( ) ; if ( ( mGLfunctor ) != null ) { mGLfunctor.destroy ( ) ; mGLfunctor = null ; } }

Target:
public void setHttpAuthUsernamePassword ( final java.lang.String host , final java.lang.String realm , final java.lang.String username , final java.lang.String password ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHttpAuthUsernamePassword ( host , realm , username , password ) ; } } ) ; return ; } mAwContents.setHttpAuthUsernamePassword ( host , realm , username , password ) ; }
Source:
private int getPhoneTypeFromNetworkType ( ) { return getPhoneTypeFromNetworkType ( android.telephony.TelephonyManager.getDefaultPhone ( ) ) ; }

Target:
public int getCurrentPhoneTypeForSlot ( int slotIndex ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getActivePhoneTypeForSlot ( slotIndex ) ; } else { return getPhoneTypeFromProperty ( slotIndex ) ; } } catch ( android.os.RemoteException ex ) { return getPhoneTypeFromProperty ( slotIndex ) ; } catch ( java.lang.NullPointerException ex ) { return getPhoneTypeFromProperty ( slotIndex ) ; } }
Source:
protected java.lang.String checkLint ( java.util.List < java.io.File > files ) throws java.lang.Exception { mOutput = new java.lang.StringBuilder ( ) ; com.android.tools.lint.checks.AbstractCheckTest.TestLintClient lintClient = createClient ( ) ; java.lang.String result = lintClient.analyze ( files ) ; if ( ( java.io.File.separatorChar ) != '/' ) { result = result.replace ( java.io.File.separatorChar , '/' ) ; } for ( java.io.File f : files ) { deleteFile ( f ) ; } return result ; }

Target:
protected java.io.File getTargetDir ( ) { java.io.File targetDir = new java.io.File ( getTempDir ( ) , ( ( ( getClass ( ) . getSimpleName ( ) ) + "_" ) + ( getName ( ) ) ) ) ; addCleanupDir ( targetDir ) ; return targetDir ; }