auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void sendIndicatorIntent ( android.bluetooth.BluetoothDevice device , int ind_id , java.lang.String ind_value ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_ID , ind_id ) ; if ( ind_value != null ) intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_VALUE , ind_value ) ; mService.sendBroadcast ( intent , HeadsetService.BLUETOOTH_PERM ) ; }

Target:
private void sendIndicatorIntent ( android.bluetooth.BluetoothDevice device , int ind_id , int ind_value ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_ID , ind_id ) ; intent.putExtra ( BluetoothHeadset.EXTRA_HF_INDICATORS_IND_VALUE , ind_value ) ; mService.sendBroadcast ( intent , HeadsetService.BLUETOOTH_PERM ) ; }
Source:
private static java.util.Set < java.lang.Integer > getPids ( ) { java.util.List < java.util.List < java.lang.String > > netlink = android.security.cts.VoldExploitTest.parseNetlink ( ) ; java.util.Set < java.lang.Integer > retval = new java.util.HashSet < java.lang.Integer > ( ) ; for ( java.util.List < java.lang.String > i : netlink ) { int pid = java.lang.Integer.decode ( i.get ( 2 ) ) ; if ( pid != 0 ) { retval.add ( pid ) ; } } return retval ; }

Target:
private static java.util.Set < java.lang.Integer > getPids ( ) { java.util.List < java.util.List < java.lang.String > > netlink = android.security.cts.VoldExploitTest.parseNetlink ( ) ; java.util.Set < java.lang.Integer > retval = new java.util.HashSet < java.lang.Integer > ( ) ; for ( java.util.List < java.lang.String > i : netlink ) { int pid = java.lang.Integer.decode ( i.get ( 2 ) ) ; if ( pid > 0 ) { retval.add ( pid ) ; } } return retval ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public synchronized void start ( ) { if ( ( threadStatus ) != 0 ) throw new java.lang.IllegalThreadStateException ( ) ; group.add ( this ) ; started = false ; try { java.lang.Thread.nativeCreate ( this , stackSize , daemon ) ; started = true ; } finally { try { if ( ! ( started ) ) { group.threadStartFailed ( this ) ; } } catch ( java.lang.Throwable ignore ) { } } }

Target:
public synchronized void start ( ) { if ( ( ( threadStatus ) != 0 ) || ( started ) ) throw new java.lang.IllegalThreadStateException ( ) ; group.add ( this ) ; started = false ; try { java.lang.Thread.nativeCreate ( this , stackSize , daemon ) ; started = true ; } finally { try { if ( ! ( started ) ) { group.threadStartFailed ( this ) ; } } catch ( java.lang.Throwable ignore ) { } } }
Source:
public static android.net.MacAddress createRandomUnicastAddress ( android.net.MacAddress base , java.util.Random r ) { long addr = ( ( base.mAddr ) & ( android.net.MacAddress.OUI_MASK ) ) | ( ( android.net.MacAddress.NIC_MASK ) & ( r.nextLong ( ) ) ) ; addr = addr | ( android.net.MacAddress.LOCALLY_ASSIGNED_MASK ) ; addr = addr & ( ~ ( android.net.MacAddress.MULTICAST_MASK ) ) ; return new android.net.MacAddress ( addr ) ; }

Target:
public static android.net.MacAddress createRandomUnicastAddress ( android.net.MacAddress base , java.util.Random r ) { long addr = ( ( base.mAddr ) & ( android.net.MacAddress.OUI_MASK ) ) | ( ( android.net.MacAddress.NIC_MASK ) & ( r.nextLong ( ) ) ) ; addr |= android.net.MacAddress.LOCALLY_ASSIGNED_MASK ; addr &= ~ ( android.net.MacAddress.MULTICAST_MASK ) ; return new android.net.MacAddress ( addr ) ; }
Source:
public java.util.Iterator iterator ( ) { return new java.util.EnumMap.EnumMapIterator < KT , KT , VT > ( new java.util.MapEntry.Type < KT , KT , VT > ( ) { public java.util.KT get ( MapEntry < java.util.KT , java.util.VT > entry ) { return entry.key ; } } , enumMap ) ; }

Target:
public java.util.Iterator < KT > iterator ( ) { return new java.util.EnumMap.EnumMapIterator < KT , KT , VT > ( new java.util.MapEntry.Type < KT , KT , VT > ( ) { public java.util.KT get ( MapEntry < java.util.KT , java.util.VT > entry ) { return entry.key ; } } , enumMap ) ; }
Source:
public static java.util.Locale getDefault ( java.util.Locale.Category category ) { switch ( category ) { case DISPLAY : if ( ( java.util.Locale.defaultDisplayLocale ) == null ) { java.util.Locale.defaultDisplayLocale = java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultDisplayLocale ; case FORMAT : if ( ( java.util.Locale.defaultFormatLocale ) == null ) { java.util.Locale.defaultFormatLocale = java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultFormatLocale ; default : assert false : "Unknown Category" ; } return java.util.Locale.getDefault ( ) ; }

Target:
public static java.util.Locale getDefault ( java.util.Locale.Category category ) { switch ( category ) { case DISPLAY : if ( ( java.util.Locale.defaultDisplayLocale ) == null ) { java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultDisplayLocale ; case FORMAT : if ( ( java.util.Locale.defaultFormatLocale ) == null ) { java.util.Locale.initDefault ( category ) ; } return java.util.Locale.defaultFormatLocale ; default : assert false : "Unknown Category" ; } return java.util.Locale.getDefault ( ) ; }
Source:
public boolean hasFrequents ( ) { android.app.Fragment page = adapter.getItem ( adapter.getRtlPosition ( DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL ) ) ; return page instanceof com.android.dialer.app.list.OldSpeedDialFragment ? ( ( com.android.dialer.app.list.OldSpeedDialFragment ) ( page ) ) . hasFrequents ( ) : ( ( com.android.dialer.speeddial.SpeedDialFragment ) ( page ) ) . hasFrequents ( ) ; }

Target:
public boolean hasFrequents ( ) { com.android.dialer.app.list.OldSpeedDialFragment page = ( ( com.android.dialer.app.list.OldSpeedDialFragment ) ( adapter.getItem ( adapter.getRtlPosition ( DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL ) ) ) ) ; return page.hasFrequents ( ) ; }
Source:
public java.lang.String getAdbLocation ( ) { java.lang.String hvParentLocation = java.lang.System.getProperty ( "com.android.hierarchyviewer.bindir" ) ; hvParentLocation = "/usr/local/google/android-ext/out/host/linux-x86/bin" ; java.lang.System.out.println ( hvParentLocation ) ; if ( ( hvParentLocation != null ) && ( ( hvParentLocation.length ( ) ) != 0 ) ) { return ( hvParentLocation + ( java.io.File.separator ) ) + ( com.android.sdklib.SdkConstants.FN_ADB ) ; } return com.android.sdklib.SdkConstants.FN_ADB ; }

Target:
public java.lang.String getAdbLocation ( ) { java.lang.String hvParentLocation = java.lang.System.getProperty ( "com.android.hierarchyviewer.bindir" ) ; if ( ( hvParentLocation != null ) && ( ( hvParentLocation.length ( ) ) != 0 ) ) { return ( hvParentLocation + ( java.io.File.separator ) ) + ( com.android.sdklib.SdkConstants.FN_ADB ) ; } return com.android.sdklib.SdkConstants.FN_ADB ; }
Source:
public com.google.common.collect.ImmutableMultimap.Builder < K , V > put ( java.util.Map.Entry < ? extends K , ? extends V > entry ) { builderMultimap.put ( com.google.common.base.Preconditions.checkNotNull ( entry.getKey ( ) ) , com.google.common.base.Preconditions.checkNotNull ( entry.getValue ( ) ) ) ; return this ; }

Target:
public com.google.common.collect.ImmutableMultimap.Builder < K , V > put ( java.util.Map.Entry < ? extends K , ? extends V > entry ) { return put ( entry.getKey ( ) , entry.getValue ( ) ) ; }
Source:
public void onFailure ( @ org.jetbrains.annotations.NotNull java.lang.String errorMessage , @ org.jetbrains.annotations.Nullable java.lang.String errorDetails ) { HEAD ( 9 ) ; b82a5 ( "Temporarily warn about gradle project settings" ) ; if ( ( ( ( -- ( myCounter ) ) <= 0 ) && ( ! ( project.isDisposed ( ) ) ) ) && ( project.isOpen ( ) ) ) { processOrphanModules ( ) ; } myCounter = java.lang.Integer.MAX_VALUE ; com.intellij.openapi.externalSystem.util.ec3fb1 Snapshot ; }

Target:
public void onFailure ( @ org.jetbrains.annotations.NotNull java.lang.String errorMessage , @ org.jetbrains.annotations.Nullable java.lang.String errorDetails ) { myCounter = java.lang.Integer.MAX_VALUE ; }
Source:
public boolean isEnabled ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { if ( ( issue.getCategory ( ) ) == ( com.android.tools.lint.detector.api.Category.ICONS ) ) { return false ; } if ( issue == ( com.android.tools.lint.checks.ManifestOrderDetector.TARGET_NEWER ) ) { return false ; } if ( ( ( ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_SERVICE ) ) || ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_ACTIVITY ) ) ) || ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_PROVIDER ) ) ) || ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_RECEIVER ) ) ) { return false ; } return true ; }

Target:
public boolean isEnabled ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { if ( ( issue.getCategory ( ) ) == ( com.android.tools.lint.detector.api.Category.ICONS ) ) { return false ; } if ( issue == ( com.android.tools.lint.checks.ManifestOrderDetector.TARGET_NEWER ) ) { return false ; } if ( ( ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_SERVICE ) ) || ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_PROVIDER ) ) ) || ( issue == ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_RECEIVER ) ) ) { return false ; } return true ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.ble_server_start ) ; setPassFailButtonClickListeners ( ) ; setInfoResources ( R.string.ble_client_test_name , R.string.ble_client_test_info , ( - 1 ) ) ; getPassButton ( ) . setEnabled ( false ) ; mTestAdapter = new com.android.cts.verifier.bluetooth.TestAdapter ( this , setupTestList ( ) ) ; android.widget.ListView listView = ( ( android.widget.ListView ) ( findViewById ( R.id.ble_server_tests ) ) ) ; listView.setAdapter ( mTestAdapter ) ; mPassed = 0 ; mHandler = new android.os.Handler ( ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.ble_server_start ) ; setPassFailButtonClickListeners ( ) ; getPassButton ( ) . setEnabled ( false ) ; mTestAdapter = new com.android.cts.verifier.bluetooth.TestAdapter ( this , setupTestList ( ) ) ; android.widget.ListView listView = ( ( android.widget.ListView ) ( findViewById ( R.id.ble_server_tests ) ) ) ; listView.setAdapter ( mTestAdapter ) ; mPassed = 0 ; mHandler = new android.os.Handler ( ) ; }
Source:
synchronized int nContextCreateGL ( int dev , int ver , int sdkVer , int colorMin , int colorPref , int alphaMin , int alphaPref , int depthMin , int depthPref , int stencilMin , int stencilPref , int samplesMin , int samplesPref , float samplesQ , int dpi ) { return rsnContextCreateGL ( dev , ver , sdkVer , colorMin , colorPref , alphaMin , alphaPref , depthMin , depthPref , stencilMin , stencilPref , samplesMin , samplesPref , samplesQ , dpi ) ; }

Target:
synchronized long nContextCreateGL ( long dev , int ver , int sdkVer , int colorMin , int colorPref , int alphaMin , int alphaPref , int depthMin , int depthPref , int stencilMin , int stencilPref , int samplesMin , int samplesPref , float samplesQ , int dpi ) { return rsnContextCreateGL ( dev , ver , sdkVer , colorMin , colorPref , alphaMin , alphaPref , depthMin , depthPref , stencilMin , stencilPref , samplesMin , samplesPref , samplesQ , dpi ) ; }
Source:
public void testSmsUsageMonitor ( ) { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) ) { return ; } com.android.internal.telephony.SmsUsageMonitor monitor = new com.android.internal.telephony.SmsUsageMonitor ( mContext ) ; for ( android.telephony.cts.SmsUsageMonitorShortCodeTest.ShortCodeTest test : android.telephony.cts.SmsUsageMonitorShortCodeTest.sShortCodeTests ) { assertEquals ( ( ( ( "country: " + ( test.countryIso ) ) + " number: " ) + ( test.address ) ) , test.category , ( isCDMA112 ( test.address ) ? android.telephony.cts.SmsUsageMonitorShortCodeTest.CATEGORY_NOT_SHORT_CODE : monitor.checkDestination ( test.address , test.countryIso ) ) ) ; } }

Target:
public void testSmsUsageMonitor ( ) { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) ) { return ; } com.android.internal.telephony.SmsUsageMonitor monitor = new com.android.internal.telephony.SmsUsageMonitor ( mContext ) ; for ( android.telephony.cts.SmsUsageMonitorShortCodeTest.ShortCodeTest test : android.telephony.cts.SmsUsageMonitorShortCodeTest.sShortCodeTests ) { assertEquals ( ( ( ( "country: " + ( test.countryIso ) ) + " number: " ) + ( test.address ) ) , test.category , monitor.checkDestination ( test.address , test.countryIso ) ) ; } }
Source:
static void native_addArc ( int nPath , android.graphics.RectF oval , float startAngle , float sweepAngle ) { android.graphics.Path_Delegate pathDelegate = android.graphics.Path_Delegate.sManager.getDelegate ( nPath ) ; if ( pathDelegate == null ) { return ; } pathDelegate.mPath.append ( new java.awt.geom.Arc2D.Float ( oval.left , oval.top , oval.width ( ) , oval.height ( ) , ( - startAngle ) , ( - sweepAngle ) , java.awt.geom.Arc2D.OPEN ) , false ) ; }

Target:
static void native_addArc ( long nPath , android.graphics.RectF oval , float startAngle , float sweepAngle ) { android.graphics.Path_Delegate pathDelegate = android.graphics.Path_Delegate.sManager.getDelegate ( nPath ) ; if ( pathDelegate == null ) { return ; } pathDelegate.mPath.append ( new java.awt.geom.Arc2D.Float ( oval.left , oval.top , oval.width ( ) , oval.height ( ) , ( - startAngle ) , ( - sweepAngle ) , java.awt.geom.Arc2D.OPEN ) , false ) ; }
Source:
private com.android.jack.dx.rop.annotation.Annotations readAnnotationSet ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dex , @ javax.annotation.Nonnegative int annotationSetOffset , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstIndexMap cstIndexMap ) { com.android.jack.dx.io.DexBuffer.Section annotationSetIn = dex.open ( annotationSetOffset ) ; int size = annotationSetIn.readInt ( ) ; com.android.jack.dx.rop.annotation.Annotations annotations = new com.android.jack.dx.rop.annotation.Annotations ( ) ; for ( int j = 0 ; j < size ; j ++ ) { annotations.add ( readAnnotationItem ( dex , annotationSetIn.readInt ( ) , cstIndexMap ) ) ; } return annotations ; }

Target:
private com.android.jack.dx.rop.annotation.Annotations readAnnotationSet ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dex , @ javax.annotation.Nonnegative int annotationSetOffset ) { com.android.jack.dx.io.DexBuffer.Section annotationSetIn = dex.open ( annotationSetOffset ) ; int size = annotationSetIn.readInt ( ) ; com.android.jack.dx.rop.annotation.Annotations annotations = new com.android.jack.dx.rop.annotation.Annotations ( ) ; for ( int j = 0 ; j < size ; j ++ ) { annotations.add ( readAnnotationItem ( dex , annotationSetIn.readInt ( ) ) ) ; } return annotations ; }
Source:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { if ( keyCode == ( android.view.KeyEvent.KEYCODE_BACK ) ) { if ( com.android.bluetooth.opp.BluetoothOppIncomingFileConfirmActivity.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppIncomingFileConfirmActivity.TAG , "onKeyDown() called; Key: back key" ) ; mUpdateValues = new android.content.ContentValues ( ) ; mUpdateValues.put ( BluetoothShare.VISIBILITY , BluetoothShare.VISIBILITY_HIDDEN ) ; this . getContentResolver ( ) . update ( mUri , mUpdateValues , null , null ) ; android.widget.Toast.makeText ( this , getString ( R.string.bt_toast_2 ) , Toast.LENGTH_SHORT ) . show ( ) ; finish ( ) ; } return true ; }

Target:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { if ( keyCode == ( android.view.KeyEvent.KEYCODE_BACK ) ) { if ( com.android.bluetooth.opp.BluetoothOppIncomingFileConfirmActivity.D ) android.util.Log.d ( com.android.bluetooth.opp.BluetoothOppIncomingFileConfirmActivity.TAG , "onKeyDown() called; Key: back key" ) ; mUpdateValues = new android.content.ContentValues ( ) ; mUpdateValues.put ( BluetoothShare.VISIBILITY , BluetoothShare.VISIBILITY_HIDDEN ) ; this . getContentResolver ( ) . update ( mUri , mUpdateValues , null , null ) ; android.widget.Toast.makeText ( this , getString ( R.string.bt_toast_2 ) , Toast.LENGTH_SHORT ) . show ( ) ; finish ( ) ; return true ; } return false ; }
Source:
public boolean remove ( java.lang.Object o ) { boolean removed = false ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lock ( ) ; try { int i = indexOf ( o ) ; if ( i != ( - 1 ) ) { removeAt ( i ) ; removed = true ; } } finally { lock.unlock ( ) ; } return removed ; }

Target:
public boolean remove ( java.lang.Object o ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lock ( ) ; try { int i = indexOf ( o ) ; if ( i == ( - 1 ) ) return false ; removeAt ( i ) ; return true ; } finally { lock.unlock ( ) ; } }
Source:
public java.lang.String getValue ( java.lang.String qName ) { if ( qName == null ) { throw new java.lang.NullPointerException ( "qName == null" ) ; } int pointer = getPointer ( ) ; if ( pointer == 0 ) { return null ; } return org.apache.harmony.xml.ExpatAttributes.getValueForQName ( pointer , qName ) ; }

Target:
public java.lang.String getValue ( java.lang.String qName ) { if ( qName == null ) { throw new java.lang.NullPointerException ( "qName == null" ) ; } long pointer = getPointer ( ) ; if ( pointer == 0 ) { return null ; } return org.apache.harmony.xml.ExpatAttributes.getValueForQName ( pointer , qName ) ; }
Source:
private static java.io.File prepareAnnotations ( ) throws java.io.IOException , java.lang.Exception { java.io.File annotations = com.android.jack.TestTools.createTempDir ( "multidexAnnotations" , "" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getFromAndroidTree ( "toolchain/jack/jack-tests/tests/com/android/jack/annotations/" ) , com.android.jack.TestTools.getDefaultBootclasspathString ( ) , annotations , false ) ; return annotations ; }

Target:
protected static java.io.File prepareAnnotations ( ) throws java.io.IOException , java.lang.Exception { java.io.File annotations = com.android.jack.TestTools.createTempDir ( "multidexAnnotations" , "" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getFromAndroidTree ( "toolchain/jack/jack-tests/tests/com/android/jack/annotations/" ) , com.android.jack.TestTools.getDefaultBootclasspathString ( ) , annotations , false ) ; return annotations ; }
Source:
public boolean removeTask ( int taskId , int flags ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.REMOVE_TASKS , "removeTask()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return removeTaskByIdLocked ( taskId , flags ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }

Target:
public boolean removeTask ( int taskId ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.REMOVE_TASKS , "removeTask()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return removeTaskByIdLocked ( taskId , true ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
public void writeDescriptor ( int clientIf , java.lang.String address , int handle , int writeType , int authReq , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.writeDescriptor ( clientIf , address , handle , writeType , authReq , value ) ; }

Target:
public void writeDescriptor ( int clientIf , java.lang.String address , int handle , int authReq , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.writeDescriptor ( clientIf , address , handle , authReq , value ) ; }
Source:
java.util.stream.Sink < P_OUT > opWrapSink ( int flags , java.util.stream.Sink < P_OUT > sink ) { return new java.util.stream.Sink.ChainedReference < P_OUT , P_OUT > ( sink ) { @ java.lang.Override public void accept ( P_OUT u ) { action.accept ( u ) ; downstream.accept ( u ) ; } } ; }

Target:
public java.util.stream.Sink < P_OUT > opWrapSink ( int flags , java.util.stream.Sink < P_OUT > sink ) { return new java.util.stream.Sink.ChainedReference < P_OUT , P_OUT > ( sink ) { @ java.lang.Override public void accept ( P_OUT u ) { action.accept ( u ) ; downstream.accept ( u ) ; } } ; }
Source:
private org.apache.http.entity.StringEntity createEntity ( java.lang.String content ) { try { org.apache.http.entity.StringEntity entity = new org.apache.http.entity.StringEntity ( content ) ; entity.setContentType ( "text/html" ) ; return entity ; } catch ( java.io.UnsupportedEncodingException e ) { android.util.Log.w ( android.webkit.cts.CtsTestServer.TAG , e ) ; } return null ; }

Target:
private static org.apache.http.entity.StringEntity createEntity ( java.lang.String content ) { try { org.apache.http.entity.StringEntity entity = new org.apache.http.entity.StringEntity ( content ) ; entity.setContentType ( "text/html" ) ; return entity ; } catch ( java.io.UnsupportedEncodingException e ) { android.util.Log.w ( android.webkit.cts.CtsTestServer.TAG , e ) ; } return null ; }
Source:
private android.net.Uri getParticipantAddress ( android.telecom.ConferenceParticipant participant , java.lang.String countryIso ) { android.net.Uri address = participant.getHandle ( ) ; if ( address == null ) { return address ; } if ( PhoneAccount.SCHEME_TEL.equals ( address.getScheme ( ) ) ) { return address ; } java.lang.String number = address.getSchemeSpecificPart ( ) ; if ( android.text.TextUtils.isEmpty ( number ) ) { return address ; } java.lang.String [ ] numberParts = number.split ( "[@;:]" ) ; if ( ( numberParts.length ) == 0 ) { return address ; } number = numberParts [ 0 ] ; java.lang.String formattedNumber = null ; if ( ! ( android.text.TextUtils.isEmpty ( countryIso ) ) ) { formattedNumber = android.telephony.PhoneNumberUtils.formatNumberToE164 ( number , countryIso ) ; } return android.net.Uri.fromParts ( PhoneAccount.SCHEME_TEL , ( formattedNumber != null ? formattedNumber : number ) , null ) ; }

Target:
public static android.net.Uri getParticipantAddress ( android.net.Uri address , java.lang.String countryIso ) { if ( address == null ) { return address ; } java.lang.String number = address.getSchemeSpecificPart ( ) ; if ( android.text.TextUtils.isEmpty ( number ) ) { return address ; } java.lang.String [ ] numberParts = number.split ( "[@;:]" ) ; if ( ( numberParts.length ) == 0 ) { return address ; } number = numberParts [ 0 ] ; java.lang.String formattedNumber = null ; if ( ! ( android.text.TextUtils.isEmpty ( countryIso ) ) ) { formattedNumber = android.telephony.PhoneNumberUtils.formatNumberToE164 ( number , countryIso ) ; } return android.net.Uri.fromParts ( PhoneAccount.SCHEME_TEL , ( formattedNumber != null ? formattedNumber : number ) , null ) ; }
Source:
protected void onPostExecute ( com.android.emailcommon.mail.MessagingException result ) { if ( isCancelled ( ) ) return ; if ( result == null ) { com.android.email.activity.setup.SetupData.setAccount ( mAccount ) ; reportProgress ( com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_CHECK_OK , null ) ; } else { int progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_CHECK_ERROR ; int exceptionType = result.getExceptionType ( ) ; switch ( exceptionType ) { case com.android.emailcommon.mail.MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED : progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_AUTODISCOVER_AUTH_DIALOG ; break ; case com.android.emailcommon.mail.MessagingException.AUTODISCOVER_AUTHENTICATION_RESULT : progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_AUTODISCOVER_RESULT ; break ; case com.android.emailcommon.mail.MessagingException.SECURITY_POLICIES_REQUIRED : progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_CHECK_SHOW_SECURITY ; break ; } reportProgress ( progressState , result ) ; } }

Target:
protected void onPostExecute ( com.android.emailcommon.mail.MessagingException result ) { if ( isCancelled ( ) ) return ; if ( result == null ) { reportProgress ( com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_CHECK_OK , null ) ; } else { int progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_CHECK_ERROR ; int exceptionType = result.getExceptionType ( ) ; switch ( exceptionType ) { case com.android.emailcommon.mail.MessagingException.AUTODISCOVER_AUTHENTICATION_FAILED : progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_AUTODISCOVER_AUTH_DIALOG ; break ; case com.android.emailcommon.mail.MessagingException.AUTODISCOVER_AUTHENTICATION_RESULT : progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_AUTODISCOVER_RESULT ; break ; case com.android.emailcommon.mail.MessagingException.SECURITY_POLICIES_REQUIRED : progressState = com.android.email.activity.setup.AccountCheckSettingsFragment.STATE_CHECK_SHOW_SECURITY ; break ; } reportProgress ( progressState , result ) ; } }
Source:
private android.net.ConnectivityManager.NetworkCallback getCallback ( android.net.NetworkRequest req , java.lang.String name ) { android.net.ConnectivityManager.NetworkCallback callback ; synchronized ( android.net.ConnectivityManager.sCallbacks ) { callback = android.net.ConnectivityManager.sCallbacks.get ( req ) ; } if ( callback == null ) { android.util.Log.e ( android.net.ConnectivityManager.CallbackHandler.TAG , ( ( "callback not found for " + name ) + " message" ) ) ; } return callback ; }

Target:
private android.net.ConnectivityManager.NetworkCallback getCallback ( android.net.NetworkRequest req , java.lang.String name ) { final android.net.ConnectivityManager.NetworkCallback callback ; synchronized ( android.net.ConnectivityManager.sCallbacks ) { callback = android.net.ConnectivityManager.sCallbacks.get ( req ) ; } if ( callback == null ) { android.util.Log.w ( android.net.ConnectivityManager.CallbackHandler.TAG , ( ( "callback not found for " + name ) + " message" ) ) ; } return callback ; }
Source:
public static libcore.io.MemoryMappedFile mmapRO ( java.lang.String path ) throws android.system.ErrnoException { java.io.FileDescriptor fd = Libcore.os.open ( path , libcore.io.O_RDONLY , 0 ) ; long size = Libcore.os.fstat ( fd ) . st_size ; long address = Libcore.os.mmap ( 0L , size , libcore.io.PROT_READ , libcore.io.MAP_SHARED , fd , 0 ) ; Libcore.os.close ( fd ) ; return new libcore.io.MemoryMappedFile ( address , size ) ; }

Target:
public static libcore.io.MemoryMappedFile mmapRO ( java.lang.String path ) throws android.system.ErrnoException { java.io.FileDescriptor fd = Libcore.os.open ( path , libcore.io.O_RDONLY , 0 ) ; try { long size = Libcore.os.fstat ( fd ) . st_size ; long address = Libcore.os.mmap ( 0L , size , libcore.io.PROT_READ , libcore.io.MAP_SHARED , fd , 0 ) ; return new libcore.io.MemoryMappedFile ( address , size ) ; } finally { Libcore.os.close ( fd ) ; } }
Source:
public void getDefaultDownloadableSubscriptionList ( android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { getIEuiccController ( ) . getDefaultDownloadableSubscriptionList ( mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getDefaultDownloadableSubscriptionList ( android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . getDefaultDownloadableSubscriptionList ( mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void testSetLength64 ( ) throws java.lang.Exception { java.io.RandomAccessFile raf = new java.io.RandomAccessFile ( file , "rw" ) ; raf.setLength ( 0 ) ; assertEquals ( 0 , file.length ( ) ) ; long moreThanFourGig = ( ( long ) ( java.lang.Integer.MAX_VALUE ) ) + 1L ; raf.setLength ( moreThanFourGig ) ; assertEquals ( moreThanFourGig , file.length ( ) ) ; }

Target:
public void testSetLength64 ( ) throws java.lang.Exception { try ( java.io.RandomAccessFile raf = new java.io.RandomAccessFile ( file , "rw" ) ) { raf.setLength ( 0 ) ; assertEquals ( 0 , file.length ( ) ) ; long moreThanFourGig = ( ( long ) ( java.lang.Integer.MAX_VALUE ) ) + 1L ; raf.setLength ( moreThanFourGig ) ; assertEquals ( moreThanFourGig , file.length ( ) ) ; } }
Source:
public static java.lang.Package create ( com.android.sdklib.internal.repository.sources.SdkSource source , java.util.Properties props , java.lang.String vendor , java.lang.String path , int revision , java.lang.String license , java.lang.String description , java.lang.String descUrl , com.android.sdklib.internal.repository.archives.Archive.Os archiveOs , com.android.sdklib.internal.repository.archives.Archive.Arch archiveArch , java.lang.String archiveOsPath ) { com.android.sdklib.internal.repository.packages.ExtraPackage ep = new com.android.sdklib.internal.repository.packages.ExtraPackage ( source , props , vendor , path , revision , license , description , descUrl , archiveOs , archiveArch , archiveOsPath ) ; return ep ; }

Target:
public static java.lang.Package create ( com.android.sdklib.internal.repository.sources.SdkSource source , java.util.Properties props , java.lang.String vendor , java.lang.String path , int revision , java.lang.String license , java.lang.String description , java.lang.String descUrl , java.lang.String archiveOsPath ) { com.android.sdklib.internal.repository.packages.ExtraPackage ep = new com.android.sdklib.internal.repository.packages.ExtraPackage ( source , props , vendor , path , revision , license , description , descUrl , archiveOsPath ) ; return ep ; }
Source:
protected void onListItemClick ( android.widget.ListView l , android.view.View v , int position , long id ) { java.util.Map map = ( ( java.util.Map ) ( l.getItemAtPosition ( position ) ) ) ; android.content.Intent intent = ( ( android.content.Intent ) ( map.get ( "intent" ) ) ) ; startActivity ( intent ) ; }

Target:
protected void onListItemClick ( android.widget.ListView l , android.view.View v , int position , long id ) { java.util.Map < java.lang.String , java.lang.Object > map = ( ( java.util.Map < java.lang.String , java.lang.Object > ) ( l.getItemAtPosition ( position ) ) ) ; android.content.Intent intent = ( ( android.content.Intent ) ( map.get ( "intent" ) ) ) ; startActivity ( intent ) ; }
Source:
public void report ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.Nullable org.objectweb.asm.tree.FieldNode field , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message , @ com.android.annotations.Nullable java.lang.Object data ) { if ( ( field != null ) && ( mDriver.isSuppressed ( issue , field ) ) ) { return ; } report ( issue , location , message , data ) ; }

Target:
public void report ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue , @ com.android.annotations.Nullable org.objectweb.asm.tree.FieldNode field , @ com.android.annotations.Nullable com.android.tools.lint.detector.api.Location location , @ com.android.annotations.NonNull java.lang.String message ) { if ( ( field != null ) && ( mDriver.isSuppressed ( issue , field ) ) ) { return ; } report ( issue , location , message ) ; }
Source:
public java.math.BigInteger getSerialNumber ( ) { byte [ ] signAndMagnitude = org.conscrypt.NativeCrypto.X509_get_serialNumber ( mContext ) ; if ( ( ( signAndMagnitude [ 0 ] ) & 255 ) == 255 ) { byte [ ] magnitude = new byte [ ( signAndMagnitude.length ) - 1 ] ; java.lang.System.arraycopy ( signAndMagnitude , 1 , magnitude , 0 , ( ( signAndMagnitude.length ) - 1 ) ) ; return new java.math.BigInteger ( ( - 1 ) , magnitude ) ; } else { return new java.math.BigInteger ( signAndMagnitude ) ; } }

Target:
public java.math.BigInteger getSerialNumber ( ) { return new java.math.BigInteger ( org.conscrypt.NativeCrypto.X509_get_serialNumber ( mContext ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { return ( compareTo ( ( ( android.icu.impl.StringRange.Range ) ( obj ) ) ) ) == 0 ; }

Target:
public boolean equals ( java.lang.Object obj ) { return ( ( this ) == obj ) || ( ( ( obj != null ) && ( obj instanceof android.icu.impl.StringRange.Range ) ) && ( ( compareTo ( ( ( android.icu.impl.StringRange.Range ) ( obj ) ) ) ) == 0 ) ) ; }
Source:
public void testSdkAnnotations ( ) throws java.lang.Exception { com.android.tools.lint.ExternalAnnotationRepository manager = getSdkAnnotations ( ) ; assertNotNull ( manager ) ; com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = com.android.tools.lint.ExternalAnnotationRepositoryTest.createMethod ( "android.view.LayoutInflater" , "android.view.View" , "createView" , "java.lang.String, java.lang.String, android.util.AttributeSet" ) ; assertNotNull ( manager.getAnnotation ( method , 2 , "android.support.annotation.NonNull" ) ) ; }

Target:
public void testSdkAnnotations ( ) throws java.lang.Exception { com.android.tools.lint.ExternalAnnotationRepository manager = getSdkAnnotations ( ) ; if ( manager == null ) { return ; } com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = com.android.tools.lint.ExternalAnnotationRepositoryTest.createMethod ( "android.view.LayoutInflater" , "android.view.View" , "createView" , "java.lang.String, java.lang.String, android.util.AttributeSet" ) ; assertNotNull ( manager.getAnnotation ( method , 2 , "android.support.annotation.NonNull" ) ) ; }
Source:
protected void handleError ( java.lang.Exception exception , int lineNumber ) { if ( ( mErrorListener ) != null ) { mErrorListener.errorFound ( ) ; } java.lang.String message = exception.getMessage ( ) ; if ( message == null ) { message = "Unknown error " + ( exception.getClass ( ) . getCanonicalName ( ) ) ; } if ( ( mFile ) != null ) { com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.markResource ( mFile , AndroidConstants.MARKER_XML , message , lineNumber , IMarker.SEVERITY_ERROR ) ; } }

Target:
public void handleError ( java.lang.Exception exception , int lineNumber ) { if ( ( mErrorListener ) != null ) { mErrorListener.errorFound ( ) ; } java.lang.String message = exception.getMessage ( ) ; if ( message == null ) { message = "Unknown error " + ( exception.getClass ( ) . getCanonicalName ( ) ) ; } if ( ( mFile ) != null ) { com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.markResource ( mFile , AndroidConstants.MARKER_XML , message , lineNumber , IMarker.SEVERITY_ERROR ) ; } }
Source:
public boolean implies ( java.security.Permission permission ) { if ( ! ( permission instanceof javax.crypto.CryptoPermission ) ) { return false ; } javax.crypto.CryptoPermission cryptoPerm = ( ( javax.crypto.CryptoPermission ) ( permission ) ) ; java.security.PermissionCollection pc = getPermissionCollection ( cryptoPerm.getAlgorithm ( ) ) ; return pc.implies ( cryptoPerm ) ; }

Target:
public boolean implies ( java.security.Permission permission ) { return true ; }
Source:
public final java.nio.ByteBuffer putLong ( int i , long x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putLong ( ix ( checkIndex ( i , SizeOf.LONG ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putLong ( int i , long x ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } putLong ( ix ( checkIndex ( i , SizeOf.LONG ) ) , x ) ; return this ; }
Source:
public java.lang.Object clone ( ) { try { java.util.zip.ZipEntry e = ( ( java.util.zip.ZipEntry ) ( super . clone ( ) ) ) ; e.extra = ( ( extra ) == null ) ? null : extra.clone ( ) ; return e ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( ) ; } }

Target:
public java.lang.Object clone ( ) { try { java.util.zip.ZipEntry e = ( ( java.util.zip.ZipEntry ) ( super . clone ( ) ) ) ; e.extra = ( ( extra ) == null ) ? null : extra.clone ( ) ; return e ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( e ) ; } }
Source:
protected java.lang.Iterable < org.jf.dexlib2.iface.ClassDef > getDirectInterfaces ( ) { java.lang.Iterable < org.jf.dexlib2.iface.ClassDef > directInterfaces = com.google.common.collect.Iterables.filter ( getInterfaces ( ) . values ( ) , com.google.common.base.Predicates.notNull ( ) ) ; if ( ! ( interfacesFullyResolved ) ) { throw new org.jf.dexlib2.analysis.UnresolvedClassException ( "Interfaces for class %s not fully resolved: %s" , getType ( ) , java.lang.String.join ( "," , getUnresolvedInterfaces ( ) ) ) ; } return directInterfaces ; }

Target:
protected java.lang.Iterable < org.jf.dexlib2.iface.ClassDef > getDirectInterfaces ( ) { java.lang.Iterable < org.jf.dexlib2.iface.ClassDef > directInterfaces = com.google.common.collect.Iterables.filter ( getInterfaces ( ) . values ( ) , com.google.common.base.Predicates.notNull ( ) ) ; if ( ! ( interfacesFullyResolved ) ) { throw new org.jf.dexlib2.analysis.UnresolvedClassException ( "Interfaces for class %s not fully resolved: %s" , getType ( ) , getUnresolvedInterfaces ( ) ) ; } return directInterfaces ; }
Source:
public void testGetContentTypeConnects ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . addHeader ( "Content-Type: text/plain" ) . setBody ( "ABC" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; assertEquals ( "text/plain" , connection.getContentType ( ) ) ; connection.disconnect ( ) ; }

Target:
public void testGetContentTypeConnects ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . addHeader ( "Content-Type: text/plain" ) . setBody ( "ABC" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; org.junit.Assert.assertEquals ( "text/plain" , connection.getContentType ( ) ) ; connection.disconnect ( ) ; }
Source:
static boolean equals ( android.net.IpSecAlgorithm lhs , android.net.IpSecAlgorithm rhs ) { if ( ( lhs == null ) || ( rhs == null ) ) return lhs == rhs ; return ( ( lhs.mName.equals ( rhs.mName ) ) && ( java.util.Arrays.equals ( lhs.mKey , rhs.mKey ) ) ) && ( ( lhs.mTruncLenBits ) == ( rhs.mTruncLenBits ) ) ; }

Target:
public static boolean equals ( android.net.IpSecAlgorithm lhs , android.net.IpSecAlgorithm rhs ) { if ( ( lhs == null ) || ( rhs == null ) ) return lhs == rhs ; return ( ( lhs.mName.equals ( rhs.mName ) ) && ( java.util.Arrays.equals ( lhs.mKey , rhs.mKey ) ) ) && ( ( lhs.mTruncLenBits ) == ( rhs.mTruncLenBits ) ) ; }
Source:
public < T extends com.android.sched.marker.Marker > T addMarker ( @ javax.annotation.Nonnull T marker ) { assert isValidMarker ( marker.getClass ( ) ) : ( ( ( "Marker '" + ( com.android.sched.item.Items.getName ( marker.getClass ( ) ) ) ) + "' is not supported for class '" ) + ( this . getClass ( ) . getName ( ) ) ) + "'" ; ensureMap ( ) ; assert ( markers ) != null ; return ( ( T ) ( markers.put ( marker.getClass ( ) , marker ) ) ) ; }

Target:
public < T extends com.android.sched.marker.Marker > T addMarker ( @ javax.annotation.Nonnull T marker ) { assert isValidMarker ( marker ) : ( ( ( "Marker '" + ( com.android.sched.item.Items.getName ( marker.getClass ( ) ) ) ) + "' is not supported for class '" ) + ( this . getClass ( ) . getName ( ) ) ) + "'" ; ensureMap ( ) ; assert ( markers ) != null ; return ( ( T ) ( markers.put ( marker.getClass ( ) , marker ) ) ) ; }
Source:
public void copySelectionToClipboard ( org.eclipse.swt.dnd.Clipboard clipboard ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.ddmuilib.logcat.LogCatMessage m : getSelectedLogCatMessages ( ) ) { sb.append ( m.toString ( ) ) ; sb.append ( '\n' ) ; } clipboard.setContents ( new java.lang.Object [ ] { sb.toString ( ) } , new org.eclipse.swt.dnd.Transfer [ ] { org.eclipse.swt.dnd.TextTransfer.getInstance ( ) } ) ; }

Target:
public void copySelectionToClipboard ( org.eclipse.swt.dnd.Clipboard clipboard ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.ddmuilib.logcat.LogCatMessage m : getSelectedLogCatMessages ( ) ) { sb.append ( m.toString ( ) ) ; sb.append ( '\n' ) ; } if ( ( sb.length ( ) ) > 0 ) { clipboard.setContents ( new java.lang.Object [ ] { sb.toString ( ) } , new org.eclipse.swt.dnd.Transfer [ ] { org.eclipse.swt.dnd.TextTransfer.getInstance ( ) } ) ; } }
Source:
private static java.nio.channels.SocketChannel openAdbConnection ( ) { com.android.ddmlib.Log.d ( "DeviceMonitor" , "Connecting to adb for Device List Monitoring..." ) ; java.nio.channels.SocketChannel adbChannel = null ; try { adbChannel = java.nio.channels.SocketChannel.open ( com.android.ddmlib.AndroidDebugBridge.getSocketAddress ( ) ) ; adbChannel.socket ( ) . setTcpNoDelay ( true ) ; } catch ( java.io.IOException e ) { } return adbChannel ; }

Target:
private static java.nio.channels.SocketChannel openAdbConnection ( ) { try { java.nio.channels.SocketChannel adbChannel = java.nio.channels.SocketChannel.open ( com.android.ddmlib.AndroidDebugBridge.getSocketAddress ( ) ) ; adbChannel.socket ( ) . setTcpNoDelay ( true ) ; return adbChannel ; } catch ( java.io.IOException e ) { return null ; } }
Source:
private void checkKernelWakelock ( java.lang.String [ ] parts ) { assertEquals ( 7 , parts.length ) ; assertNotNull ( parts [ 4 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 5 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ 6 ] ) ; }

Target:
private void checkKernelWakelock ( java.lang.String [ ] parts ) { assertTrue ( ( ( parts.length ) >= 7 ) ) ; assertNotNull ( parts [ 4 ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ ( ( parts.length ) - 2 ) ] ) ; android.dumpsys.cts.DumpsysHostTest.assertInteger ( parts [ ( ( parts.length ) - 1 ) ] ) ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , long [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public void testFreshInstallDoesNotLoadFromStore ( ) throws java.lang.Exception { when ( mWifiConfigStore.areStoresPresent ( ) ) . thenReturn ( false ) ; when ( mWifiConfigStoreLegacy.areStoresPresent ( ) ) . thenReturn ( false ) ; mWifiConfigManager.loadFromStore ( ) ; verify ( mWifiConfigStore , never ( ) ) . read ( ) ; verify ( mWifiConfigStoreLegacy , never ( ) ) . read ( ) ; assertTrue ( mWifiConfigManager.getConfiguredNetworksWithPasswords ( ) . isEmpty ( ) ) ; }

Target:
public void testFreshInstallDoesNotLoadFromStore ( ) throws java.lang.Exception { when ( mWifiConfigStore.areStoresPresent ( ) ) . thenReturn ( false ) ; when ( mWifiConfigStoreLegacy.areStoresPresent ( ) ) . thenReturn ( false ) ; assertTrue ( mWifiConfigManager.loadFromStore ( ) ) ; verify ( mWifiConfigStore , never ( ) ) . read ( ) ; verify ( mWifiConfigStoreLegacy , never ( ) ) . read ( ) ; assertTrue ( mWifiConfigManager.getConfiguredNetworksWithPasswords ( ) . isEmpty ( ) ) ; }
Source:
public java.lang.String getClassName ( ) { if ( ( className ) == null ) { if ( ( ! ( isReference ( ) ) ) && ( ! ( isClosure ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( ( "not an object type: " + ( descriptor ) ) ) ; } if ( ( descriptor.charAt ( 0 ) ) == '[' ) { className = descriptor ; } else { className = descriptor.substring ( 1 , ( ( descriptor.length ( ) ) - 1 ) ) ; } } return className ; }

Target:
public java.lang.String getClassName ( ) { if ( ( className ) == null ) { if ( ! ( isReference ( ) ) ) { throw new java.lang.IllegalArgumentException ( ( "not an object type: " + ( descriptor ) ) ) ; } if ( ( descriptor.charAt ( 0 ) ) == '[' ) { className = descriptor ; } else { className = descriptor.substring ( 1 , ( ( descriptor.length ( ) ) - 1 ) ) ; } } return className ; }
Source:
public void requestIconFile ( ) { java.lang.String expectedCommand = ( ( "REQ_HS20_ICON " + ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID_STR ) ) + " " ) + ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ; org.mockito.Mockito.when ( mWifiNative.doCustomSupplicantCommand ( expectedCommand ) ) . thenReturn ( "OK" ) ; org.junit.Assert.assertTrue ( mHandler.requestIcon ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID , com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ) ; org.mockito.Mockito.when ( mWifiNative.doCustomSupplicantCommand ( expectedCommand ) ) . thenReturn ( "FAILED" ) ; org.junit.Assert.assertFalse ( mHandler.requestIcon ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID , com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ) ; }

Target:
public void requestIconFile ( ) { org.mockito.Mockito.when ( mWifiNative.requestIcon ( org.mockito.Matchers.eq ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID_STR ) , org.mockito.Matchers.eq ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mHandler.requestIcon ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID , com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ) ; org.mockito.Mockito.when ( mWifiNative.requestIcon ( org.mockito.Matchers.eq ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID_STR ) , org.mockito.Matchers.eq ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertFalse ( mHandler.requestIcon ( com.android.server.wifi.hotspot2.PasspointEventHandlerTest.BSSID , com.android.server.wifi.hotspot2.PasspointEventHandlerTest.ICON_FILENAME ) ) ; }
Source:
public void testCanEncodeCharSequence() { assertTrue(encoder.canEncode("w")); assertTrue(encoder.canEncode("\uc2a3")); assertTrue(encoder.canEncode("")); assertTrue(encoder.canEncode("\uc2c0")); assertTrue(encoder.canEncode("\ud800\udc00")); assertFalse(encoder.canEncode("\ud800\udb00")); }

Target:
public void testCanEncodeCharSequence() { assertTrue(encoder.canEncode("w")); assertTrue(encoder.canEncode("\uc2a3")); assertTrue(encoder.canEncode("\uc2c0")); assertTrue(encoder.canEncode("\ud800\udc00")); assertFalse(encoder.canEncode("\ud800\udb00")); }