auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static java.lang.String getPathFromBaseDir ( @ javax.annotation.Nonnull java.lang.String baseDir , @ javax.annotation.Nonnull java.lang.String path ) { java.util.List < java.io.File > pathList = com.android.jack.shrob.proguard.GrammarActions.getPathFromBaseDirAsList ( baseDir , path ) ; java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; for ( java.util.Iterator < java.io.File > iter = pathList.iterator ( ) ; iter.hasNext ( ) ; ) { sb.append ( iter.next ( ) . getAbsolutePath ( ) ) ; if ( iter.hasNext ( ) ) { sb.append ( java.io.File.pathSeparatorChar ) ; } } return sb.toString ( ) ; }

Target:
private static java.lang.String getPathFromBaseDir ( @ javax.annotation.Nonnull java.lang.String baseDir , @ javax.annotation.Nonnull java.lang.String path ) { java.util.List < java.io.File > pathList = com.android.jack.shrob.proguard.GrammarActions.getPathFromBaseDirAsList ( baseDir , path ) ; java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; for ( java.util.Iterator < java.io.File > iter = pathList.iterator ( ) ; iter.hasNext ( ) ; ) { sb.append ( iter.next ( ) . getPath ( ) ) ; if ( iter.hasNext ( ) ) { sb.append ( java.io.File.pathSeparatorChar ) ; } } return sb.toString ( ) ; }
Source:
public void run ( ) { for ( int i = ( nodes.size ( ) ) - 1 ; i >= 0 ; i -- ) { final com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode node = uiLastNode [ 0 ] = nodes.get ( i ) ; doDownInternal ( node , selectXmlNode , uiSearchRoot , false ) ; } }

Target:
public void run ( ) { for ( int i = ( nodes.size ( ) ) - 1 ; i >= 0 ; i -- ) { final com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode node = uiLastNode [ 0 ] = nodes.get ( i ) ; doDownInternal ( node , descriptorFilters , selectXmlNode , uiSearchRoot , false ) ; } }
Source:
private boolean userExists ( int userId ) { try { android.content.pm.UserInfo user = android.app.AppGlobals.getPackageManager ( ) . getUser ( userId ) ; return user != null ; } catch ( android.os.RemoteException re ) { } return false ; }

Target:
boolean isUserRunningLocked ( int userId , boolean orStopped ) { com.android.server.am.UserStartedState state = mStartedUsers.get ( userId ) ; if ( state == null ) { return false ; } if ( orStopped ) { return true ; } return ( ( state.mState ) != ( UserStartedState.STATE_STOPPING ) ) && ( ( state.mState ) != ( UserStartedState.STATE_SHUTDOWN ) ) ; }
Source:
public java.util.Iterator < java.util.Map.Entry < C , java.util.Map < R , V > > > iterator ( ) { return new com.google.common.collect.TransformedIterator < C , java.util.Map.Entry < C , java.util.Map < R , V > > > ( columnKeySet ( ) . iterator ( ) ) { @ java.lang.Override java.util.Map.Entry < C , java.util.Map < R , V > > transform ( C columnKey ) { return new com.google.common.collect.ImmutableEntry < C , java.util.Map < R , V > > ( columnKey , column ( columnKey ) ) ; } } ; }

Target:
public java.util.Iterator < java.util.Map.Entry < C , java.util.Map < R , V > > > iterator ( ) { return com.google.common.collect.Maps.asMapEntryIterator ( columnKeySet ( ) , new com.google.common.base.Function < C , java.util.Map < R , V > > ( ) { @ java.lang.Override public java.util.Map < R , V > apply ( C columnKey ) { return column ( columnKey ) ; } } ) ; }
Source:
void replySucceeded ( android.os.Message msg ) { if ( ( msg.replyTo ) != null ) { android.os.Message reply = android.os.Message.obtain ( ) ; reply.what = android.net.wifi.WifiScanner.CMD_OP_SUCCEEDED ; reply.arg2 = msg.arg2 ; if ( ( msg.obj ) != null ) { reply.obj = msg.obj ; } try { msg.replyTo.send ( reply ) ; } catch ( android.os.RemoteException e ) { } } else { } }

Target:
void replyFailed ( android.os.Message msg , int reason , java.lang.String description ) { if ( ( msg.replyTo ) != null ) { android.os.Message reply = android.os.Message.obtain ( ) ; reply.what = android.net.wifi.WifiScanner.CMD_OP_FAILED ; reply.arg2 = msg.arg2 ; reply.obj = new android.net.wifi.WifiScanner.OperationResult ( reason , description ) ; try { msg.replyTo.send ( reply ) ; mLog.trace ( "replyFailed recvdMessage=% reason=%" ) . c ( msg.what ) . c ( reason ) . flush ( ) ; } catch ( android.os.RemoteException e ) { } } else { } }
Source:
public void testAesCbcHmacSha384Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 ) ; }
Source:
void clearValue ( java.lang.String optionName , java.util.Map < java.lang.String , com.google.devtools.common.options.OptionsParser.OptionValueDescription > clearedValues ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.reflect.Field field = optionsData.getFieldFromName ( optionName ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + optionName ) + "'" ) ) ; } com.google.devtools.common.options.Option option = field.getAnnotation ( com.google.devtools.common.options.Option.class ) ; clearValue ( field , option , clearedValues ) ; }

Target:
void clearValue ( java.lang.String optionName , java.util.Map < java.lang.String , com.google.devtools.common.options.OptionsParser.OptionValueDescription > clearedValues ) throws com.google.devtools.common.options.OptionsParsingException { java.lang.reflect.Field field = optionsData.getFieldFromName ( optionName ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + optionName ) + "'" ) ) ; } com.google.devtools.common.options.Option option = field.getAnnotation ( com.google.devtools.common.options.Option.class ) ; canonicalizeValues.removeAll ( field ) ; com.google.devtools.common.options.OptionsParser.OptionValueDescription removed = parsedValues.remove ( field ) ; if ( removed != null ) { clearedValues.put ( option.name ( ) , removed ) ; } }
Source:
public boolean setPriority ( android.bluetooth.BluetoothDevice device , int priority ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; Settings.Global.putInt ( getContentResolver ( ) , Settings.Global.getBluetoothInputDevicePriorityKey ( device.getAddress ( ) ) , priority ) ; if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( ( ( "Saved priority " + device ) + " = " ) + priority ) ) ; return true ; }

Target:
public boolean setPriority ( android.bluetooth.BluetoothDevice device , int priority ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "setPriority: " + ( device.getAddress ( ) ) ) ) ; } Settings.Global.putInt ( getContentResolver ( ) , Settings.Global.getBluetoothInputDevicePriorityKey ( device.getAddress ( ) ) , priority ) ; if ( com.android.bluetooth.hid.HidService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( ( ( "Saved priority " + device ) + " = " ) + priority ) ) ; } return true ; }
Source:
public void testHandleEquality ( ) { byte [ ] handleBytes = new byte [ ] { - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 } ; com.android.tools.rpclib.binary.Handle handle1 = new com.android.tools.rpclib.binary.Handle ( handleBytes ) ; com.android.tools.rpclib.binary.Handle handle2 = new com.android.tools.rpclib.binary.Handle ( handleBytes ) ; assertEquals ( handle1 , handle2 ) ; }

Target:
public void testHandleEquality ( ) { com.android.tools.rpclib.binary.Handle handle1 = new com.android.tools.rpclib.binary.Handle ( com.android.tools.rpclib.binary.HandleTest.handleBytes ) ; assertEquals ( handle1 , handle1 ) ; com.android.tools.rpclib.binary.Handle handle2 = new com.android.tools.rpclib.binary.Handle ( com.android.tools.rpclib.binary.HandleTest.handleBytes ) ; assertEquals ( handle1 , handle2 ) ; }
Source:
public final int readUnsignedShort ( ) throws java.io.IOException { int ch1 = in.read ( ) ; int ch2 = in.read ( ) ; if ( ( ch1 | ch2 ) < 0 ) throw new java.io.EOFException ( ) ; return ( ch1 << 8 ) + ( ch2 << 0 ) ; }

Target:
public final char readChar ( ) throws java.io.IOException { readFully ( readBuffer , 0 , 2 ) ; return ( ( char ) ( libcore.io.Memory.peekShort ( readBuffer , 0 , java.nio.ByteOrder.BIG_ENDIAN ) ) ) ; }
Source:
synchronized boolean sendReport ( int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( "sendReport(): id=" + id ) ) ; return sendReportNative ( id , data ) ; }

Target:
synchronized boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( "sendReport(): device=" + device ) + " id=" ) + id ) ) ; if ( ! ( checkDevice ( device ) ) ) { return false ; } return sendReportNative ( id , data ) ; }
Source:
public sun.misc.Resource getResource ( java.lang.String name , boolean check ) { if ( sun.misc.URLClassPath.DEBUG ) { java.lang.System.err.println ( ( ( "URLClassPath.getResource(\"" + name ) + "\")" ) ) ; } sun.misc.URLClassPath.Loader loader ; for ( int i = 0 ; ( loader = getLoader ( i ) ) != null ; i ++ ) { sun.misc.Resource res = loader.getResource ( name , check ) ; if ( res != null ) { return res ; } } return null ; }

Target:
public sun.misc.Resource getResource ( java.lang.String name , boolean check ) { if ( sun.misc.URLClassPath.DEBUG ) { java.lang.System.err.println ( ( ( "URLClassPath.getResource(\"" + name ) + "\")" ) ) ; } sun.misc.URLClassPath.Loader loader ; int [ ] cache = getLookupCache ( name ) ; for ( int i = 0 ; ( loader = getNextLoader ( cache , i ) ) != null ; i ++ ) { sun.misc.Resource res = loader.getResource ( name , check ) ; if ( res != null ) { return res ; } } return null ; }
Source:
private void cmdDumpsys ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { final android.net.ConnectivityMetricsEvent [ ] events ; synchronized ( mLock ) { events = mEventLog.toArray ( ) ; } for ( android.net.ConnectivityMetricsEvent ev : events ) { pw.println ( ev.toString ( ) ) ; } if ( ( mNetdListener ) != null ) { mNetdListener.list ( pw ) ; } }

Target:
private void cmdList ( java.io.PrintWriter pw ) { pw.println ( "metrics events:" ) ; final java.util.List < android.net.ConnectivityMetricsEvent > events = getEvents ( ) ; for ( android.net.ConnectivityMetricsEvent ev : events ) { pw.println ( ev.toString ( ) ) ; } pw.println ( "" ) ; if ( ( mNetdListener ) != null ) { mNetdListener.list ( pw ) ; } pw.println ( "" ) ; mDefaultNetworkMetrics.listEvents ( pw ) ; }
Source:
public void requestAudioFocusForCall ( int streamType , int durationHint ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.requestAudioFocus ( new android.media.AudioAttributes.Builder ( ) . setInternalLegacyStreamType ( streamType ) . build ( ) , durationHint , mICallBack , null , MediaFocusControl.IN_VOICE_COMM_FOCUS_ID , mApplicationContext.getOpPackageName ( ) , android.media.AudioManager.AUDIOFOCUS_FLAG_LOCK , null ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Can't call requestAudioFocusForCall() on AudioService:" , e ) ; } }

Target:
public void requestAudioFocusForCall ( int streamType , int durationHint ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.requestAudioFocus ( new android.media.AudioAttributes.Builder ( ) . setInternalLegacyStreamType ( streamType ) . build ( ) , durationHint , mICallBack , null , MediaFocusControl.IN_VOICE_COMM_FOCUS_ID , getContext ( ) . getOpPackageName ( ) , android.media.AudioManager.AUDIOFOCUS_FLAG_LOCK , null ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Can't call requestAudioFocusForCall() on AudioService:" , e ) ; } }
Source:
public boolean visitNode ( lombok.ast.Node node ) { return ( mEscapes ) || ( super . visitNode ( node ) ) ; }

Target:
private static com.intellij.psi.PsiField getDataBinderReference ( @ com.android.annotations.Nullable com.intellij.psi.PsiElement element ) { if ( element instanceof com.intellij.psi.PsiReference ) { com.intellij.psi.PsiElement resolved = ( ( com.intellij.psi.PsiReference ) ( element ) ) . resolve ( ) ; if ( resolved instanceof com.intellij.psi.PsiField ) { com.intellij.psi.PsiField field = ( ( com.intellij.psi.PsiField ) ( resolved ) ) ; if ( "dataBinder" . equals ( field.getName ( ) ) ) { return field ; } } } return null ; }
Source:
private static boolean isIncrementalCompilation ( @ javax.annotation.Nonnull com.android.jack.Options options ) { if ( ( ! ( options.getEcjArguments ( ) . isEmpty ( ) ) ) && ( com.android.jack.experimental.incremental.JackIncremental.getCompilerState ( ) . exists ( ) ) ) { return true ; } return false ; }

Target:
private static boolean isIncrementalCompilation ( @ javax.annotation.Nonnull com.android.jack.Options options , @ javax.annotation.Nonnull java.io.File typeDependencies , @ javax.annotation.Nonnull java.io.File fileDependencies ) { if ( ( ( ! ( options.getEcjArguments ( ) . isEmpty ( ) ) ) && ( typeDependencies.exists ( ) ) ) && ( fileDependencies.exists ( ) ) ) { return true ; } return false ; }
Source:
protected int getCaretOffset ( java.lang.String fileContent , java.lang.String caretLocation ) { int caretDelta = caretLocation.indexOf ( "^" ) ; assertTrue ( caretLocation , ( caretDelta != ( - 1 ) ) ) ; java.lang.String caretContext = ( caretLocation.substring ( 0 , caretDelta ) ) + ( caretLocation.substring ( ( caretDelta + 1 ) ) ) ; int caretContextIndex = fileContent.indexOf ( caretContext ) ; assertTrue ( ( ( "Caret content " + caretContext ) + " not found in file" ) , ( caretContextIndex != ( - 1 ) ) ) ; return caretContextIndex + caretDelta ; }

Target:
public void testPreserveNewlines ( ) throws java.lang.Exception { com.android.ide.common.xml.XmlFormatPreferences prefs = com.android.ide.common.xml.XmlFormatPreferences.defaults ( ) ; com.android.ide.common.xml.XmlFormatStyle style = XmlFormatStyle.LAYOUT ; java.lang.String before = "<LinearLayout><Button></Button></LinearLayout>\n" ; java.lang.String expected = "<LinearLayout>\n" + ( ( ( "\n" + " <Button />\n" ) + "\n" ) + "</LinearLayout>\n" ) ; java.lang.String after = com.android.ide.common.xml.XmlPrettyPrinter.prettyPrint ( before , prefs , style , "\n" ) ; assertEquals ( expected , after ) ; }
Source:
public void testProxyWithConnectionClose ( ) throws java.io.IOException { libcore.javax.net.ssl.TestSSLContext testSSLContext = libcore.javax.net.ssl.TestSSLContext.create ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "this response comes via a proxy" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( server.toProxyAddress ( ) ) ) ) ; connection.setRequestProperty ( "Connection" , "close" ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; connection.setHostnameVerifier ( new libcore.java.net.URLConnectionTest.RecordingHostnameVerifier ( ) ) ; assertContent ( "this response comes via a proxy" , connection ) ; }

Target:
public void testProxyWithConnectionClose ( ) throws java.io.IOException { libcore.javax.net.ssl.TestSSLContext testSSLContext = createDefaultTestSSLContext ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "this response comes via a proxy" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( server.toProxyAddress ( ) ) ) ) ; connection.setRequestProperty ( "Connection" , "close" ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; connection.setHostnameVerifier ( new libcore.java.net.URLConnectionTest.RecordingHostnameVerifier ( ) ) ; assertContent ( "this response comes via a proxy" , connection ) ; }
Source:
public void callSessionRttModifyRequestReceived ( android.telephony.ims.ImsCallSession session , android.telephony.ims.ImsCallProfile callProfile ) { com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( ! ( callProfile.mMediaProfile.isRttCall ( ) ) ) { logi ( ( "callSessionRttModifyRequestReceived:: ignoring request, requested profile " + "is not RTT." ) ) ; return ; } if ( listener != null ) { try { listener.onRttModifyRequestReceived ( this ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionRttModifyRequestReceived:: " , t ) ; } } }

Target:
public void callSessionRttModifyRequestReceived ( android.telephony.ims.ImsCallSession session , android.telephony.ims.ImsCallProfile callProfile ) { com.android.ims.ImsCall.Listener listener ; logi ( "callSessionRttModifyRequestReceived" ) ; synchronized ( this ) { listener = mListener ; } if ( ! ( callProfile.mMediaProfile.isRttCall ( ) ) ) { logi ( ( "callSessionRttModifyRequestReceived:: ignoring request, requested profile " + "is not RTT." ) ) ; return ; } if ( listener != null ) { try { listener.onRttModifyRequestReceived ( this ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionRttModifyRequestReceived:: " , t ) ; } } }
Source:
public long getPhotoId ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return java.lang.Math.max ( com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoId ( ) , 0 ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return java.lang.Math.max ( com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoId ( ) , 0 ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return 0 ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public long getPhotoId ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return java.lang.Math.max ( com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoId ( ) , 0 ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return java.lang.Math.max ( com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoId ( ) , 0 ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return 0 ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
public boolean onMenuItemClick ( android.view.MenuItem item ) { int state = mTelephonyManager.getDataState ( ) ; switch ( state ) { case android.telephony.TelephonyManager.DATA_CONNECTED : phone.setDataEnabled ( false ) ; break ; case android.telephony.TelephonyManager.DATA_DISCONNECTED : phone.setDataEnabled ( true ) ; break ; default : break ; } return true ; }

Target:
public boolean onMenuItemClick ( android.view.MenuItem item ) { int state = mTelephonyManager.getDataState ( ) ; switch ( state ) { case android.telephony.TelephonyManager.DATA_CONNECTED : phone.setUserDataEnabled ( false ) ; break ; case android.telephony.TelephonyManager.DATA_DISCONNECTED : phone.setUserDataEnabled ( true ) ; break ; default : break ; } return true ; }
Source:
private void startConnectSession ( ) { if ( Constants.USE_TCP_DEBUG ) { mConnectThread = new com.android.bluetooth.opp.BluetoothOppTransfer.SocketConnectThread ( "localhost" , Constants.TCP_DEBUG_PORT , 0 ) ; mConnectThread.start ( ) ; } else { mConnectThread = new com.android.bluetooth.opp.BluetoothOppTransfer.SocketConnectThread ( mBatch.mDestination , false ) ; mConnectThread.start ( ) ; } }

Target:
private void startConnectSession ( ) { mDevice = mBatch.mDestination ; if ( ! ( mBatch.mDestination.sdpSearch ( BluetoothUuid.ObexObjectPush ) ) ) { if ( com.android.bluetooth.opp.BluetoothOppTransfer.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , "SDP failed, start rfcomm connect directly" ) ; mDevice = null ; mConnectThread = new com.android.bluetooth.opp.BluetoothOppTransfer.SocketConnectThread ( mBatch.mDestination , false , false , ( - 1 ) ) ; mConnectThread.start ( ) ; } }
Source:
public void dispose ( ) { android.telephony.mbms.vendor.IMbmsStreamingService streamingService = mService.get ( ) ; if ( streamingService == null ) { return ; } try { streamingService.dispose ( mSubscriptionId ) ; } catch ( android.os.RemoteException e ) { } mService.set ( null ) ; }

Target:
public void dispose ( ) { try { android.telephony.mbms.vendor.IMbmsStreamingService streamingService = mService.get ( ) ; if ( streamingService == null ) { return ; } streamingService.dispose ( mSubscriptionId ) ; } catch ( android.os.RemoteException e ) { } finally { mService.set ( null ) ; android.telephony.MbmsStreamingManager.sIsInitialized.set ( false ) ; } }
Source:
public void binderDied ( ) { try { synchronized ( mWindowMap ) { com.android.server.WindowManagerService.WindowState win = windowForClientLocked ( mSession , mClient ) ; android.util.Log.i ( com.android.server.WindowManagerService.TAG , ( "WIN DEATH: " + win ) ) ; if ( win != null ) { removeWindowLocked ( mSession , win ) ; } } } catch ( java.lang.IllegalArgumentException ex ) { } }

Target:
public void binderDied ( ) { try { synchronized ( mWindowMap ) { com.android.server.WindowManagerService.WindowState win = windowForClientLocked ( mSession , mClient , false ) ; android.util.Slog.i ( com.android.server.WindowManagerService.TAG , ( "WIN DEATH: " + win ) ) ; if ( win != null ) { removeWindowLocked ( mSession , win ) ; } } } catch ( java.lang.IllegalArgumentException ex ) { } }
Source:
public android.net.wifi.WifiLinkLayerStats getWifiLinkLayerStats ( java.lang.String iface ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getWifiLinkLayerStats ( ) ; } else { if ( iface == null ) return null ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getWifiLinkLayerStatsNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }

Target:
public java.lang.String getP2pClientList ( int netId ) { return null ; }
Source:
public android.content.res.Resources getResources ( ) { return resources ; }

Target:
public void setHorizontalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHorizontalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setHorizontalScrollbarOverlay ( overlay ) ; }
Source:
private java.io.File createDex ( vogar.Action action , java.io.File actionJar ) { java.io.File dex = run.localFile ( action , "classes.dex" ) ; vogar.Classpath classesToDex = vogar.Classpath.of ( actionJar ) ; classesToDex.addAll ( run.classpath ) ; if ( run.useJack ) { throw new java.lang.UnsupportedOperationException ( "Jack support for --mode=activity not yet implemented" ) ; } java.io.File localTempDir = run.localDir ( action.getName ( ) ) ; vogar.Classpath dependentCp = new vogar.Classpath ( ) ; run.androidSdk.dex ( run.multidex , dex , localTempDir , classesToDex , dependentCp ) ; return dex ; }

Target:
private java.io.File createDex ( vogar.Action action , java.io.File actionJar ) { java.io.File dex = run.localFile ( action , "classes.dex" ) ; vogar.Classpath classesToDex = vogar.Classpath.of ( actionJar ) ; classesToDex.addAll ( run.classpath ) ; if ( ( run.toolchain ) == ( vogar.Toolchain.JACK ) ) { throw new java.lang.UnsupportedOperationException ( "Jack support for --mode=activity not yet implemented" ) ; } java.io.File localTempDir = run.localDir ( action.getName ( ) ) ; vogar.Classpath dependentCp = new vogar.Classpath ( ) ; run.androidSdk.dex ( run.multidex , dex , localTempDir , classesToDex , dependentCp ) ; return dex ; }
Source:
android.media.MediaMetadata getCurrentMetaData ( ) { synchronized ( mLock ) { if ( ( ( mAddressedPlayer ) != null ) && ( ( mAddressedPlayer.getCurrentTrack ( ) ) != null ) ) { android.media.MediaMetadata mmd = mAddressedPlayer.getCurrentTrack ( ) . getMediaMetaData ( ) ; if ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.TAG , ( "getCurrentMetaData mmd " + mmd ) ) ; } } return com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.mEmptyMMD ; } }

Target:
android.media.MediaMetadata getCurrentMetaData ( ) { synchronized ( mLock ) { if ( ( ( mAddressedPlayer ) != null ) && ( ( mAddressedPlayer.getCurrentTrack ( ) ) != null ) ) { android.media.MediaMetadata mmd = mAddressedPlayer.getCurrentTrack ( ) . getMediaMetaData ( ) ; if ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.TAG , ( "getCurrentMetaData mmd " + mmd ) ) ; } } return com.android.bluetooth.avrcpcontroller.AvrcpControllerStateMachine.EMPTY_MEDIA_METADATA ; } }
Source:
public void testInnerClassSingleParameter ( ) throws java.lang.Exception { java.lang.reflect.Constructor < ? > constructor = libcore.java.lang.reflect.ParameterTest.InnerClass.class . getDeclaredConstructor ( libcore.java.lang.reflect.ParameterTest.class ) ; libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( constructor ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( "[libcore.java.lang.reflect.ParameterTest arg0]" ) . checkParametersMetadataNotAvailable ( ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( libcore.java.lang.reflect.ParameterTest.class ) . checkGetParameterizedType ( "class libcore.java.lang.reflect.ParameterTest" ) ; }

Target:
private static void checkGenericParameter_withMetadata ( java.lang.reflect.Executable executable ) { libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( executable ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( "[java.util.function.Function<java.lang.String, java.lang.Integer> p0]" ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( java.util.function.Function.class ) . checkName ( true , "p0" ) . checkModifiers ( 0 ) . checkImplicitAndSynthetic ( false , false ) . checkGetParameterizedType ( "java.util.function.Function<java.lang.String, java.lang.Integer>" ) ; }
Source:
public void destroy ( ) { mHandler.removeMessages ( com.android.internal.app.ResolverComparator.RESOLVER_RANKER_SERVICE_RESULT ) ; mHandler.removeMessages ( com.android.internal.app.ResolverComparator.RESOLVER_RANKER_RESULT_TIMEOUT ) ; if ( ( mConnection ) != null ) { mContext.unbindService ( mConnection ) ; mConnection.destroy ( ) ; } if ( com.android.internal.app.ResolverComparator.DEBUG ) { android.util.Log.d ( com.android.internal.app.ResolverComparator.TAG , "Unbinded Resolver Ranker." ) ; } }

Target:
public void destroy ( ) { mHandler.removeMessages ( com.android.internal.app.ResolverComparator.RESOLVER_RANKER_SERVICE_RESULT ) ; mHandler.removeMessages ( com.android.internal.app.ResolverComparator.RESOLVER_RANKER_RESULT_TIMEOUT ) ; if ( ( mConnection ) != null ) { mContext.unbindService ( mConnection ) ; mConnection.destroy ( ) ; } if ( ( mAfterCompute ) != null ) { mAfterCompute.afterCompute ( ) ; } if ( com.android.internal.app.ResolverComparator.DEBUG ) { android.util.Log.d ( com.android.internal.app.ResolverComparator.TAG , "Unbinded Resolver Ranker." ) ; } }
Source:
public void notInBadgingOutput ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "" ) ; com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.ApkSubjectTest.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 1 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "maxSdkVersion not found in badging output for <foo>" ) ; }

Target:
public void notInBadgingOutput ( ) { java.util.List < java.lang.String > strings = com.google.common.collect.Lists.newArrayList ( "" ) ; com.android.build.gradle.integration.common.truth.FakeFailureStrategy failure = new com.android.build.gradle.integration.common.truth.FakeFailureStrategy ( ) ; java.io.File file = new java.io.File ( "foo" ) ; com.android.build.gradle.integration.common.truth.ApkSubject subject = new com.android.build.gradle.integration.common.truth.ApkSubject ( failure , file ) ; subject.checkMaxSdkVersion ( strings , 1 ) ; com.google.common.truth.Truth.assertThat ( failure.message ) . is ( "maxSdkVersion not found in badging output for <foo>" ) ; }
Source:
public void enableSystemApp ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "enableSystemApp" ) ; if ( ( mService ) != null ) { try { mService.enableSystemApp ( admin , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public java.util.List < java.lang.String > getPermittedCrossProfileNotificationListeners ( @ android.annotation.NonNull android.content.ComponentName admin ) { throwIfParentInstance ( "getPermittedCrossProfileNotificationListeners" ) ; if ( ( mService ) != null ) { try { return mService.getPermittedCrossProfileNotificationListeners ( admin ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return null ; }
Source:
public void onSelected ( ) { if ( ( com.android.tv.menu.BaseCardView.isAttachedToWindow ( ) ) && ( ( com.android.tv.menu.BaseCardView.getVisibility ( ) ) == ( android.view.View.VISIBLE ) ) ) { startFocusAnimation ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_1F ) ; } else { cancelFocusAnimationIfAny ( ) ; setFocusAnimatedValue ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_1F ) ; } }

Target:
public void onSelected ( ) { mSelected = true ; if ( ( com.android.tv.menu.BaseCardView.isAttachedToWindow ( ) ) && ( ( com.android.tv.menu.BaseCardView.getVisibility ( ) ) == ( android.view.View.VISIBLE ) ) ) { startFocusAnimation ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_1F ) ; } else { cancelFocusAnimationIfAny ( ) ; setFocusAnimatedValue ( com.android.tv.menu.BaseCardView.SCALE_FACTOR_1F ) ; } }
Source:
private boolean compareIcuRoundingIncrement ( java.text.DecimalFormat other ) { java.math.BigDecimal increment = this . icuDecimalFormat.getRoundingIncrement ( ) ; if ( increment != null ) { return ( ( other.getRoundingIncrement ( ) ) != null ) && ( increment.equals ( other.getRoundingIncrement ( ) ) ) ; } return ( other.getRoundingIncrement ( ) ) == null ; }

Target:
private boolean compareIcuRoundingIncrement ( java.text.DecimalFormat_ICU58_Android other ) { java.math.BigDecimal increment = this . icuDecimalFormat.getRoundingIncrement ( ) ; if ( increment != null ) { return ( ( other.getRoundingIncrement ( ) ) != null ) && ( increment.equals ( other.getRoundingIncrement ( ) ) ) ; } return ( other.getRoundingIncrement ( ) ) == null ; }
Source:
public java.util.List < android.content.pm.ResolveInfo > queryIntent ( android.content.Intent intent , java.lang.String resolvedType , int flags , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return null ; mFlags = flags ; return super . queryIntent ( intent , resolvedType , ( ( flags & ( android.content.pm.PackageManager.MATCH_DEFAULT_ONLY ) ) != 0 ) , userId ) ; }

Target:
protected PackageParser.ServiceIntentInfo [ ] newArray ( int size ) { return new android.content.pm.PackageParser.ServiceIntentInfo [ size ] ; }
Source:
public void testDensityOnlyWithCustomDeviceDensity ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 3 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 1 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testSingleOutput ( ) { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) . getOutputFile ( ) , result.get ( 0 ) ) ; }
Source:
public void showXml ( org.eclipse.swt.events.MouseEvent e ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutPoint p = com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( this , e ) . toLayout ( ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi = mViewHierarchy.findViewInfoAt ( p ) ; if ( ( vi == null ) || ( vi.isRoot ( ) ) ) { return ; } org.w3c.dom.Node xmlNode = vi.getXmlNode ( ) ; if ( xmlNode != null ) { boolean found = mLayoutEditor.show ( xmlNode ) ; if ( ! found ) { getDisplay ( ) . beep ( ) ; } } }

Target:
public void show ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo vi ) { java.lang.String url = vi.getIncludeUrl ( ) ; if ( url != null ) { showInclude ( url ) ; } else { showXml ( vi ) ; } }
Source:
public void test_getInstanceLjava_lang_String01 ( ) throws java.security.NoSuchAlgorithmException { if ( ! ( tests.api.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) { fail ( tests.api.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; return ; } javax.net.ssl.KeyManagerFactory keyMF ; for ( int i = 0 ; i < ( tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues.length ) ; i ++ ) { keyMF = javax.net.ssl.KeyManagerFactory.getInstance ( tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] ) ; assertNotNull ( "No KeyManagerFactory created" , keyMF ) ; assertEquals ( "Invalid algorithm" , keyMF.getAlgorithm ( ) , tests.api.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] ) ; } }

Target:
public void test_getInstanceLjava_lang_String01 ( ) throws java.security.NoSuchAlgorithmException { if ( ! ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.DEFSupported ) ) { fail ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.NotSupportedMsg ) ; return ; } javax.net.ssl.KeyManagerFactory keyMF ; for ( int i = 0 ; i < ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues.length ) ; i ++ ) { keyMF = javax.net.ssl.KeyManagerFactory.getInstance ( org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] ) ; assertNotNull ( "No KeyManagerFactory created" , keyMF ) ; assertEquals ( "Invalid algorithm" , keyMF.getAlgorithm ( ) , org.apache.harmony.tests.javax.net.ssl.KeyManagerFactory1Test.validValues [ i ] ) ; } }
Source:
static int wtf ( int logId , java.lang.String tag , java.lang.String msg , java.lang.Throwable tr , boolean localStack , boolean system ) { android.util.Log.TerribleFailure what = new android.util.Log.TerribleFailure ( msg , tr ) ; int bytes = android.util.Log.println_native ( logId , android.util.Log.ASSERT , tag , ( ( msg + '\n' ) + ( android.util.Log.getStackTraceString ( ( localStack ? what : tr ) ) ) ) ) ; android.util.Log.sWtfHandler.onTerribleFailure ( tag , what , system ) ; return bytes ; }

Target:
static int wtf ( int logId , java.lang.String tag , java.lang.String msg , java.lang.Throwable tr , boolean localStack , boolean system ) { android.util.Log.TerribleFailure what = new android.util.Log.TerribleFailure ( msg , tr ) ; int bytes = android.util.Log.println_native ( logId , android.util.Log.ERROR , tag , ( ( msg + '\n' ) + ( android.util.Log.getStackTraceString ( ( localStack ? what : tr ) ) ) ) ) ; android.util.Log.sWtfHandler.onTerribleFailure ( tag , what , system ) ; return bytes ; }
Source:
public void testSendUuidIntent ( ) { mRemoteDevices.updateUuids ( mDevice1 ) ; if ( ( android.os.Looper.myLooper ( ) ) != null ) { android.os.Looper.myLooper ( ) . quitSafely ( ) ; } android.os.Looper.loop ( ) ; verify ( mAdapterService ) . sendBroadcast ( any ( ) , anyString ( ) ) ; verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
boolean isRecvd ( ) { return recvd ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , byte [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsInt8 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private static int [ ] getOrientations ( final android.app.Activity activity ) { final int originalOrientation = activity.getResources ( ) . getConfiguration ( ) . orientation ; final int newOrientation = ( originalOrientation == ( android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ) ) ? android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE : android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ; return new int [ ] { originalOrientation , newOrientation } ; }

Target:
public static void toggleOrientationSync ( final android.app.Activity activity , final android.app.Instrumentation instrumentation ) { final int originalOrientation = activity.getResources ( ) . getConfiguration ( ) . orientation ; final int newOrientation = ( originalOrientation == ( android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ) ) ? android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE : android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT ; android.app.stubs.OrientationTestUtils.changeOrientation ( activity , instrumentation , newOrientation ) ; android.app.stubs.OrientationTestUtils.changeOrientation ( activity , instrumentation , originalOrientation ) ; }
Source:
public void testIsEmergencyNumberWithPlusSign_US ( ) { assertFalse ( shortInfo.isEmergencyNumber ( "+911" , RegionCode.US ) ) ; assertFalse ( shortInfo.isEmergencyNumber ( "＋911" , RegionCode.US ) ) ; assertFalse ( shortInfo.isEmergencyNumber ( " +911" , RegionCode.US ) ) ; assertFalse ( shortInfo.isEmergencyNumber ( "+112" , RegionCode.US ) ) ; assertFalse ( shortInfo.isEmergencyNumber ( "+999" , RegionCode.US ) ) ; }

Target:
public void testIsEmergencyNumber_BR ( ) { assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "911" , RegionCode.BR ) ) ; assertTrue ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "190" , RegionCode.BR ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.isEmergencyNumber ( "999" , RegionCode.BR ) ) ; }
Source:
public void testGradle ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "multiproject/library.properties=>build.gradle" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" ) ; checkDriver ( ( "" + ( ( ( ( ( "\n" + "Scanning MainTest_testGradle: \n" ) + "MainTest_testGradle: Error: \"MainTest_testGradle\" is a Gradle project. " ) + "To correctly analyze Gradle projects, you should run \"gradlew :lint\" " ) + "instead. [LintError]\n" ) + "1 errors, 0 warnings\n" ) ) , "" , com.android.tools.lint.LintCliFlags.ERRNO_SUCCESS , new java.lang.String [ ] { "--check" , "HardcodedText" , project.getPath ( ) } ) ; }

Target:
public void testGradle ( ) throws java.lang.Exception { java.io.File project = getProjectDir ( null , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "multiproject/library.properties=>build.gradle" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" ) ; checkDriver ( ( "" + ( ( "\n" + "MainTest_testGradle: Error: \"MainTest_testGradle\" is a Gradle project. To correctly analyze Gradle projects, you should run \"gradlew :lint\" instead. [LintError]\n" ) + "1 errors, 0 warnings\n" ) ) , "" , com.android.tools.lint.LintCliFlags.ERRNO_SUCCESS , new java.lang.String [ ] { "--check" , "HardcodedText" , project.getPath ( ) } ) ; }
Source:
public void outjars ( java.util.Map filterArgs , java.lang.Object outJarFiles ) throws proguard.gradle.ParseException { this . outJarFiles.add ( getProject ( ) . file ( outJarFiles ) ) ; this . outJarFilters.add ( filterArgs ) ; this . inJarCounts.add ( java.lang.Integer.valueOf ( inJarFiles.size ( ) ) ) ; }

Target:
public java.util.List getConfigurationFiles ( ) { return configurationFiles ; }
Source:
public com.tonicsystems.jarjar.FieldVisitor visitField ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.Object value ) { handleObject ( value ) ; return new com.tonicsystems.jarjar.FieldVisitor ( Opcodes.ASM4 ) { @ java.lang.Override public com.tonicsystems.jarjar.AnnotationVisitor visitAnnotation ( java.lang.String desc , boolean visible ) { return com.tonicsystems.jarjar.StringReader.this . visitAnnotation ( desc , visible ) ; } } ; }

Target:
public com.tonicsystems.jarjar.FieldVisitor visitField ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.Object value ) { handleObject ( value ) ; return new com.tonicsystems.jarjar.FieldVisitor ( Opcodes.ASM5 ) { @ java.lang.Override public com.tonicsystems.jarjar.AnnotationVisitor visitAnnotation ( java.lang.String desc , boolean visible ) { return com.tonicsystems.jarjar.StringReader.this . visitAnnotation ( desc , visible ) ; } } ; }
Source:
public void shutdown ( ) { mPackageUsage.write ( true ) ; }

Target:
private int performDexOptInternal ( java.lang.String packageName , boolean checkProfiles , java.lang.String targetCompilerFilter , boolean force ) { android.content.pm.PackageParser.Package p ; synchronized ( mPackages ) { p = mPackages.get ( packageName ) ; if ( p == null ) { return PackageDexOptimizer.DEX_OPT_FAILED ; } mPackageUsage.maybeWriteAsync ( mPackages ) ; mCompilerStats.maybeWriteAsync ( ) ; } long callingId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mInstallLock ) { return performDexOptInternalWithDependenciesLI ( p , checkProfiles , targetCompilerFilter , force ) ; } } finally { android.os.Binder.restoreCallingIdentity ( callingId ) ; } }
Source:
static int closedFormNestedNN ( int n ) { int closed = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { closed ++ ; } } return closed ; }

Target:
static int closedFormNestedNAlt ( int n ) { int closed = 12345 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < 23 ; j ++ ) { closed += 7 ; } } return closed ; }
Source:
public java.lang.String wifiNanCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.nan.WifiNanSession session = mSessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( role , peerId , bytes ) ; }

Target:
public java.lang.String wifiNanCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session = mSessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( role , peerId , bytes ) ; }
Source:
private boolean contains ( int [ ] array , int elem ) { for ( int i = 0 ; i < ( array.length ) ; i ++ ) { if ( elem == ( array [ i ] ) ) { return true ; } } return false ; }

Target:
boolean clearCodePathUsedByOtherApps ( ) { mUsedByOtherAppsBeforeUpgrade = true ; if ( mCodePathsUsedByOtherApps.isEmpty ( ) ) { return false ; } else { mCodePathsUsedByOtherApps.clear ( ) ; return true ; } }