auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.google.protobuf.ExtensionRegistry assignDescriptors ( com.android.vts.proto.Descriptors.FileDescriptor root ) { com.android.vts.proto.VtsWebStatusMessage.descriptor = root ; com.android.vts.proto.VtsWebStatusMessage.internal_static_android_vts_TestStatusMessage_descriptor = com.android.vts.proto.VtsWebStatusMessage.getDescriptor ( ) . getMessageTypes ( ) . get ( 0 ) ; com.android.vts.proto.VtsWebStatusMessage.internal_static_android_vts_TestStatusMessage_fieldAccessorTable = new com.android.vts.proto.GeneratedMessage.FieldAccessorTable ( com.android.vts.proto.VtsWebStatusMessage.internal_static_android_vts_TestStatusMessage_descriptor , new java.lang.String [ ] { "TestSuite" , "Test" , "StatusTimestamp" , "Status" , "FailedTestcases" } ) ; return null ; }

Target:
public com.google.protobuf.ExtensionRegistry assignDescriptors ( com.android.vts.proto.Descriptors.FileDescriptor root ) { com.android.vts.proto.VtsWebStatusMessage.descriptor = root ; com.android.vts.proto.VtsWebStatusMessage.internal_static_android_vts_TestStatusMessage_descriptor = com.android.vts.proto.VtsWebStatusMessage.getDescriptor ( ) . getMessageTypes ( ) . get ( 0 ) ; com.android.vts.proto.VtsWebStatusMessage.internal_static_android_vts_TestStatusMessage_fieldAccessorTable = new com.android.vts.proto.GeneratedMessage.FieldAccessorTable ( com.android.vts.proto.VtsWebStatusMessage.internal_static_android_vts_TestStatusMessage_descriptor , new java.lang.String [ ] { "TestSuite" , "Test" , "StatusTimestamp" , "Status" , "FailedTestcases" , "PassedTestcases" } ) ; return null ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , long [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
native void rsnScriptForEach ( long con , long incCon , long id , int slot , long ain , long aout , boolean mUseInc ) ;
Source:
private void disable ( ) { com.android.cts.deviceowner.BluetoothRestrictionTest.sleep ( com.android.cts.deviceowner.BluetoothRestrictionTest.CHECK_WAIT_TIME ) ; if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_OFF ) ) { assertFalse ( mBluetoothAdapter.isEnabled ( ) ) ; return ; } assertEquals ( BluetoothAdapter.STATE_ON , mBluetoothAdapter.getState ( ) ) ; assertTrue ( mBluetoothAdapter.isEnabled ( ) ) ; mBluetoothAdapter.disable ( ) ; assertDisabledAfterTimeout ( ) ; }

Target:
private void disable ( ) { com.android.cts.deviceowner.BluetoothRestrictionTest.sleep ( com.android.cts.deviceowner.BluetoothRestrictionTest.CHECK_WAIT_TIME_MS ) ; if ( ( mBluetoothAdapter.getState ( ) ) == ( android.bluetooth.BluetoothAdapter.STATE_OFF ) ) { assertFalse ( mBluetoothAdapter.isEnabled ( ) ) ; return ; } assertEquals ( BluetoothAdapter.STATE_ON , mBluetoothAdapter.getState ( ) ) ; assertTrue ( mBluetoothAdapter.isEnabled ( ) ) ; mBluetoothAdapter.disable ( ) ; assertDisabledAfterTimeout ( ) ; }
Source:
public static < E > java.util.ArrayList < E > newArrayList ( java.util.Iterator < ? extends E > elements ) { com.google.common.base.Preconditions.checkNotNull ( elements ) ; java.util.ArrayList < E > list = com.google.common.collect.Lists.newArrayList ( ) ; while ( elements.hasNext ( ) ) { list.add ( elements.next ( ) ) ; } return list ; }

Target:
public static < E > java.util.ArrayList < E > newArrayList ( java.util.Iterator < ? extends E > elements ) { java.util.ArrayList < E > list = com.google.common.collect.Lists.newArrayList ( ) ; com.google.common.collect.Iterators.addAll ( list , elements ) ; return list ; }
Source:
public void testReadTimeZone_NegativeTransitions ( ) throws java.lang.Exception { libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.initializeToValid ( ) ; builder.setTransitionCountOverride ( ( - 1 ) ) ; byte [ ] bytes = builder.build ( ) ; try { createZoneInfo ( getName ( ) , java.lang.System.currentTimeMillis ( ) , bytes ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } }

Target:
public void testReadTimeZone_NegativeTransitions ( ) throws java.lang.Exception { libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.initializeToValid ( ) ; builder.setTransitionCountOverride ( ( - 1 ) ) ; byte [ ] bytes = builder.build ( ) ; try { createZoneInfo ( getName ( ) , java.lang.System.currentTimeMillis ( ) , bytes ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } }
Source:
private void logTransientStates ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "PendingCommand - transient state(s):" ) ; if ( isTurningOn ( ) ) { sb.append ( " isTurningOn" ) ; } if ( isTurningOff ( ) ) { sb.append ( " isTurningOff" ) ; } if ( isBleTurningOn ( ) ) { sb.append ( " isBleTurningOn" ) ; } if ( isBleTurningOff ( ) ) { sb.append ( " isBleTurningOff" ) ; } verboseLog ( sb.toString ( ) ) ; }

Target:
public void exit ( ) { removeMessages ( com.android.bluetooth.btservice.AdapterState.BLE_STOP_TIMEOUT ) ; super . exit ( ) ; }
Source:
private void cleanUpUser ( int userId ) { synchronized ( mPackages ) { java.util.Set < java.util.Map.Entry < java.lang.String , com.android.server.pm.PackageSetting > > entries = mSettings.mPackages.entrySet ( ) ; for ( java.util.Map.Entry < java.lang.String , com.android.server.pm.PackageSetting > entry : entries ) { entry.getValue ( ) . removeUser ( userId ) ; } if ( mDirtyUsers.remove ( userId ) ) ; mSettings.removeUserLPr ( userId ) ; } }

Target:
void cleanUpUserLILPw ( int userHandle ) { mDirtyUsers.remove ( userHandle ) ; mSettings.removeUserLPr ( userHandle ) ; mPendingBroadcasts.remove ( userHandle ) ; if ( ( mInstaller ) != null ) { mInstaller.removeUserDataDirs ( userHandle ) ; } }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/bytecode/MathTest.java:12: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid argument float to double conversion [FloatMath]\n" + ( ( ( ( ( ( ( ( ( " floatResult = (float) Math.sqrt(x);\n" + " ~~~~\n" ) + "src/test/bytecode/MathTest.java:18: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid double to float return value conversion [FloatMath]\n" ) + " floatResult = (float) Math.sqrt(x);\n" ) + " ~~~~\n" ) + "src/test/bytecode/MathTest.java:23: Warning: Use android.util.FloatMath#sqrt() instead of java.lang.Math#sqrt to avoid argument float to double conversion [FloatMath]\n" ) + " doubleResult = Math.sqrt(x);\n" ) + " ~~~~\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/MathTest.java.txt=>src/test/bytecode/MathTest.java" , "bytecode/MathTest.class.data=>bin/classes/test/bytecode/MathTest.class" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/bytecode/MathTest.java:11: Warning: Use java.lang.Math#cos instead of android.util.FloatMath#cos() since it is faster as of API 8 [FloatMath]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( " floatResult = FloatMath.cos(x);\n" + " ~~~\n" ) + "src/test/bytecode/MathTest.java:12: Warning: Use java.lang.Math#sin instead of android.util.FloatMath#sin() since it is faster as of API 8 [FloatMath]\n" ) + " floatResult = FloatMath.sin((float) y);\n" ) + " ~~~\n" ) + "src/test/bytecode/MathTest.java:13: Warning: Use java.lang.Math#ceil instead of android.util.FloatMath#ceil() since it is faster as of API 8 [FloatMath]\n" ) + " floatResult = android.util.FloatMath.ceil((float) y);\n" ) + " ~~~~\n" ) + "src/test/bytecode/MathTest.java:14: Warning: Use java.lang.Math#floor instead of android.util.FloatMath#floor() since it is faster as of API 8 [FloatMath]\n" ) + " System.out.println(FloatMath.floor(x));\n" ) + " ~~~~~\n" ) + "src/test/bytecode/MathTest.java:15: Warning: Use java.lang.Math#sqrt instead of android.util.FloatMath#sqrt() since it is faster as of API 8 [FloatMath]\n" ) + " System.out.println(FloatMath.sqrt(z));\n" ) + " ~~~~\n" ) + "0 errors, 5 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/MathTest.java.txt=>src/test/bytecode/MathTest.java" , "bytecode/MathTest.class.data=>bin/classes/test/bytecode/MathTest.class" ) ) ; }
Source:
public android.webkit.WebBackForwardList copyBackForwardList ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return copyBackForwardList ( ) ; } } ) ; return ret ; } return new com.android.webview.chromium.WebBackForwardListChromium ( mAwContents.getNavigationHistory ( ) ) ; }

Target:
public boolean zoomIn ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return zoomIn ( ) ; } } ) ; return ret ; } return mAwContents.zoomIn ( ) ; }
Source:
public java.util.Collection < java.lang.Class < ? extends com.android.jill.api.JillConfig > > getSupportedConfigs ( ) { java.util.List < java.lang.Class < ? extends com.android.jill.api.JillConfig > > result = new java.util.ArrayList < java.lang.Class < ? extends com.android.jill.api.JillConfig > > ( 1 ) ; result.add ( com.android.jill.api.v01.Api01Config.class ) ; return result ; }

Target:
public java.util.Collection < java.lang.Class < ? extends com.android.jill.api.JillConfig > > getSupportedConfigs ( ) { java.util.List < java.lang.Class < ? extends com.android.jill.api.JillConfig > > result = new java.util.ArrayList < java.lang.Class < ? extends com.android.jill.api.JillConfig > > ( 2 ) ; result.add ( com.android.jill.api.v01.Api01Config.class ) ; result.add ( com.android.jill.api.v01.Cli01Config.class ) ; return result ; }
Source:
private boolean visitLocalOrParameter ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { confirmBlockElement ( expr ) ; confirmParentForPrimitive ( expr ) ; com.android.jack.ir.ast.JNode parent = expr.getParent ( ) ; if ( parent instanceof com.android.jack.ir.ast.JAsgOperation ) { if ( ( ( ( com.android.jack.ir.ast.JAsgOperation ) ( parent ) ) . getLhs ( ) ) == expr ) { confirmParent ( parent , com.android.jack.ir.ast.cfg.JVariableAsgBlockElement.class ) ; } } return true ; }

Target:
private boolean visitFieldOrArrayRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { assert expr.canThrow ( ) ; confirmBlockElement ( expr ) ; confirmThrowingIsAllowed ( expr ) ; confirmParent ( expr , com.android.jack.ir.ast.JAsgOperation.class ) ; com.android.jack.ir.ast.JAsgOperation asgExpr = ( ( com.android.jack.ir.ast.JAsgOperation ) ( expr.getParent ( ) ) ) ; if ( ( asgExpr.getLhs ( ) ) == expr ) { confirmParent ( asgExpr , com.android.jack.ir.ast.cfg.JStoreBlockElement.class ) ; } else { confirmVariableAssignmentRhs ( expr , com.android.jack.ir.ast.cfg.JVariableAsgBlockElement.class ) ; } return true ; }
Source:
public void test_parkFor_3 ( ) { tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }

Target:
public void test_parkUntil_3 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }
Source:
public java.lang.String iccTransmitApduLogicalChannel ( int channel , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccTransmitApduLogicalChannel ( channel , cla , instruction , p1 , p2 , p3 , data ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return "" ; }

Target:
public java.lang.String iccTransmitApduLogicalChannel ( int channel , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { return iccTransmitApduLogicalChannel ( getSubId ( ) , channel , cla , instruction , p1 , p2 , p3 , data ) ; }
Source:
public void setVerbosityLevel ( @ javax.annotation.Nonnull com.android.jack.api.v02.VerbosityLevel verbosityLevel ) throws com.android.jack.api.v01.ConfigurationException { com.android.jack.Options.VerbosityLevel jackVerbosityLevel ; switch ( verbosityLevel ) { case ERROR : { jackVerbosityLevel = com.android.jack.api.v02.com.android.jack.Options.VerbosityLevel ; break ; } case INFO : { jackVerbosityLevel = com.android.jack.api.v02.com.android.jack.Options.VerbosityLevel ; break ; } case WARNING : { jackVerbosityLevel = com.android.jack.api.v02.com.android.jack.Options.VerbosityLevel ; break ; } default : { throw new com.android.jack.api.v01.ConfigurationException ( ( ( "Verbosity level '" + ( verbosityLevel.toString ( ) ) ) + "' is unsupported" ) ) ; } } options.setVerbosityLevel ( jackVerbosityLevel ) ; }

Target:
public void setVerbosityLevel ( @ javax.annotation.Nonnull com.android.jack.api.v02.VerbosityLevel verbosityLevel ) throws com.android.jack.api.v01.ConfigurationException { com.android.jack.api.v02.com.android.jack.VerbosityLevel jackVerbosityLevel ; switch ( verbosityLevel ) { case ERROR : { jackVerbosityLevel = com.android.jack.api.v02.VerbosityLevel.ERROR ; break ; } case INFO : { jackVerbosityLevel = com.android.jack.api.v02.VerbosityLevel.INFO ; break ; } case WARNING : { jackVerbosityLevel = com.android.jack.api.v02.VerbosityLevel.WARNING ; break ; } default : { throw new com.android.jack.api.v01.ConfigurationException ( ( ( "Verbosity level '" + ( verbosityLevel.toString ( ) ) ) + "' is unsupported" ) ) ; } } options.setVerbosityLevel ( jackVerbosityLevel ) ; }
Source:
public void test_parkUntil_3 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; }

Target:
public void test_parkUntil_3 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 1 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.UNSAFE.unpark ( parkerThread ) ; parkerThread.start ( ) ; parker.assertDurationIsInRange ( 0 ) ; parkerThread.join ( ) ; }
Source:
public void testInjectSms ( ) { transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifySmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.times ( 2 ) ) . sendBroadcast ( org.mockito.Matchers.any ( android.content.Intent.class ) ) ; org.junit.Assert.assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }

Target:
public void testInjectSms ( ) { transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 200 ) ; verifySmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_INJECT_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.times ( 2 ) ) . sendBroadcast ( org.mockito.Matchers.any ( android.content.Intent.class ) ) ; org.junit.Assert.assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
private void filterSelectionChanged ( ) { int idx = mFiltersTableViewer.getTable ( ) . getSelectionIndex ( ) ; if ( idx == ( - 1 ) ) { idx = 0 ; mFiltersTableViewer.getTable ( ) . setSelection ( idx ) ; } mCurrentSelectedFilterIndex = idx ; resetUnreadCountForSelectedFilter ( ) ; updateFiltersToolBar ( ) ; updateAppliedFilters ( ) ; }

Target:
private void resetUnreadCountForAllFilters ( ) { for ( com.android.ddmuilib.logcat.LogCatFilterData fd : mLogCatFilterData.values ( ) ) { fd.resetUnreadCount ( ) ; } refreshFiltersTable ( ) ; }
Source:
public int acquireDrmInfo ( android.drm.DrmInfoRequest drmInfoRequest ) { if ( ( null == drmInfoRequest ) || ( ! ( drmInfoRequest.isValid ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given drmInfoRequest is invalid/null" ) ; } int result = android.drm.DrmManagerClient.ERROR_UNKNOWN ; if ( null != ( mEventHandler ) ) { android.os.Message msg = mEventHandler.obtainMessage ( android.drm.DrmManagerClient.ACTION_ACQUIRE_DRM_INFO , drmInfoRequest ) ; result = ( mEventHandler.sendMessage ( msg ) ) ? android.drm.DrmManagerClient.ERROR_NONE : result ; } return result ; }

Target:
public android.drm.DrmInfo acquireDrmInfo ( android.drm.DrmInfoRequest drmInfoRequest ) { if ( ( null == drmInfoRequest ) || ( ! ( drmInfoRequest.isValid ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given drmInfoRequest is invalid/null" ) ; } return _acquireDrmInfo ( mUniqueId , drmInfoRequest ) ; }
Source:
public static int getNetworkClass ( int networkType ) { switch ( networkType ) { case android.telephony.TelephonyManager.NETWORK_TYPE_GPRS : case android.telephony.TelephonyManager.NETWORK_TYPE_EDGE : case android.telephony.TelephonyManager.NETWORK_TYPE_CDMA : case android.telephony.TelephonyManager.NETWORK_TYPE_1xRTT : case android.telephony.TelephonyManager.NETWORK_TYPE_IDEN : return android.telephony.TelephonyManager.NETWORK_CLASS_2_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_UMTS : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_0 : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_A : case android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPA : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_B : case android.telephony.TelephonyManager.NETWORK_TYPE_EHRPD : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP : return android.telephony.TelephonyManager.NETWORK_CLASS_3_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_LTE : return android.telephony.TelephonyManager.NETWORK_CLASS_4_G ; default : return android.telephony.TelephonyManager.NETWORK_CLASS_UNKNOWN ; } }

Target:
public static int getNetworkClass ( int networkType ) { switch ( networkType ) { case android.telephony.TelephonyManager.NETWORK_TYPE_GPRS : case android.telephony.TelephonyManager.NETWORK_TYPE_GSM : case android.telephony.TelephonyManager.NETWORK_TYPE_EDGE : case android.telephony.TelephonyManager.NETWORK_TYPE_CDMA : case android.telephony.TelephonyManager.NETWORK_TYPE_1xRTT : case android.telephony.TelephonyManager.NETWORK_TYPE_IDEN : return android.telephony.TelephonyManager.NETWORK_CLASS_2_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_UMTS : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_0 : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_A : case android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPA : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_B : case android.telephony.TelephonyManager.NETWORK_TYPE_EHRPD : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP : return android.telephony.TelephonyManager.NETWORK_CLASS_3_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_LTE : return android.telephony.TelephonyManager.NETWORK_CLASS_4_G ; default : return android.telephony.TelephonyManager.NETWORK_CLASS_UNKNOWN ; } }
Source:
private int putListener ( java.lang.Object listener , android.net.nsd.NsdServiceInfo s ) { android.net.nsd.NsdManager.checkListener ( listener ) ; final int key ; synchronized ( mMapLock ) { int valueIndex = mListenerMap.indexOfValue ( listener ) ; com.android.internal.util.Preconditions.checkArgument ( ( valueIndex == ( - 1 ) ) , "listener already in use" ) ; key = java.lang.Math.abs ( ( ( mListenerKey ) ++ ) ) ; mListenerMap.put ( key , listener ) ; mServiceMap.put ( key , s ) ; } return key ; }

Target:
private int putListener ( java.lang.Object listener , android.net.nsd.NsdServiceInfo s ) { if ( listener == null ) return android.net.nsd.NsdManager.INVALID_LISTENER_KEY ; int key ; synchronized ( mMapLock ) { int valueIndex = mListenerMap.indexOfValue ( listener ) ; if ( valueIndex != ( - 1 ) ) { return android.net.nsd.NsdManager.BUSY_LISTENER_KEY ; } do { key = ( mListenerKey ) ++ ; } while ( key == ( android.net.nsd.NsdManager.INVALID_LISTENER_KEY ) ) ; mListenerMap.put ( key , listener ) ; mServiceMap.put ( key , s ) ; } return key ; }
Source:
public void acceptCall ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_ANSWER , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilAnswer ( mInstanceId , rr.mSerial ) ; send ( rr ) ; }

Target:
public void acceptCall ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_ANSWER , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; mMetrics.writeRilAnswer ( mInstanceId , rr.mSerial ) ; send ( rr ) ; }
Source:
public void onVisibleBehindCanceled ( ) { stopTv ( "onVisibleBehindCanceled()" , false ) ; mTracker.sendScreenView ( "" ) ; mAudioFocusStatus = android.media.AudioManager.AUDIOFOCUS_LOSS ; mAudioManager.abandonAudioFocus ( this ) ; if ( mMediaSession.isActive ( ) ) { mMediaSession.setActive ( false ) ; } stopPip ( ) ; mVisibleBehind = false ; if ( ( ! ( mOtherActivityLaunched ) ) && ( ( Build.VERSION.SDK_INT ) == ( Build.VERSION_CODES.M ) ) ) { finish ( ) ; } super . onVisibleBehindCanceled ( ) ; }

Target:
public void onVisibleBehindCanceled ( ) { stopTv ( "onVisibleBehindCanceled()" , false ) ; mTracker.sendScreenView ( "" ) ; mAudioFocusStatus = android.media.AudioManager.AUDIOFOCUS_LOSS ; mAudioManager.abandonAudioFocus ( this ) ; if ( mMediaSession.isActive ( ) ) { setMediaSessionActiveAndPlaybackState ( false ) ; } mVisibleBehind = false ; if ( ( ! ( mOtherActivityLaunched ) ) && ( ( Build.VERSION.SDK_INT ) == ( Build.VERSION_CODES.M ) ) ) { finish ( ) ; } super . onVisibleBehindCanceled ( ) ; }
Source:
public void testInstallWithWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createValidTzDataBundle ( "2030a" ) ; assertTrue ( install ( tzData ) ) ; assertTzDataInstalled ( tzData ) ; }

Target:
public void testInstallWithWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = new java.io.File ( testInstallDir , TzDataBundleInstaller.WORKING_DIR_NAME ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) ) ; libcore.tzdata.update2.ConfigBundle tzData = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertTrue ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData ) ; }
Source:
public void mergeAppDataDirs ( android.content.pm.ApplicationInfo ai , int userId ) { java.util.Set < java.lang.String > dataDirs = com.android.server.pm.dex.DexManager.putIfAbsent ( mAppDataDirs , userId , new java.util.HashSet < > ( ) ) ; dataDirs.add ( ai.dataDir ) ; try { dataDirs.add ( com.android.server.pm.PackageManagerServiceUtils.realpath ( new java.io.File ( ai.dataDir ) ) ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( com.android.server.pm.dex.DexManager.TAG , ( "Error to get realpath of " + ( ai.dataDir ) ) , e ) ; } }

Target:
public void mergeAppDataDirs ( android.content.pm.ApplicationInfo ai , int userId ) { java.util.Set < java.lang.String > dataDirs = com.android.server.pm.dex.DexManager.putIfAbsent ( mAppDataDirs , userId , new java.util.HashSet < > ( ) ) ; dataDirs.add ( ai.dataDir ) ; try { dataDirs.add ( com.android.server.pm.PackageManagerServiceUtils.realpath ( new java.io.File ( ai.dataDir ) ) ) ; } catch ( java.io.IOException e ) { if ( com.android.server.pm.dex.DexManager.DEBUG ) { android.util.Slog.w ( com.android.server.pm.dex.DexManager.TAG , ( "Error to get realpath of " + ( ai.dataDir ) ) , e ) ; } } }
Source:
private void computeTimingStatistics ( ) { com.android.tools.perflib.vmtrace.VmTraceData data = getTraceData ( ) ; for ( com.android.tools.perflib.vmtrace.ThreadInfo thread : data.getThreads ( ) ) { computePerThreadStats ( thread , data ) ; } }

Target:
private void computeTimingStatistics ( ) { com.android.tools.perflib.vmtrace.VmTraceData data = getTraceData ( ) ; com.android.tools.perflib.vmtrace.VmTraceParser.ProfileDataBuilder builder = new com.android.tools.perflib.vmtrace.VmTraceParser.ProfileDataBuilder ( ) ; for ( com.android.tools.perflib.vmtrace.ThreadInfo thread : data.getThreads ( ) ) { com.android.tools.perflib.vmtrace.Call c = thread.getTopLevelCall ( ) ; if ( c == null ) { continue ; } builder.computeCallStats ( c , null , thread ) ; } for ( java.lang.Long methodId : builder.getMethodsWithProfileData ( ) ) { com.android.tools.perflib.vmtrace.MethodInfo method = data.getMethod ( methodId ) ; method.setProfileData ( builder.getProfileData ( methodId ) ) ; } }
Source:
public boolean onCreateWindow ( boolean isDialog , boolean isUserGesture ) { android.os.Message m = mUiThreadHandler.obtainMessage ( com.android.webview.chromium.WebViewContentsClientAdapter.NEW_WEBVIEW_CREATED , mWebView.new com.android.webview.chromium.WebViewTransport ( ) ) ; org.chromium.content.common.TraceEvent.begin ( ) ; boolean result ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onCreateWindow" ) ; result = mWebChromeClient.onCreateWindow ( mWebView , isDialog , isUserGesture , m ) ; } else { result = false ; } org.chromium.content.common.TraceEvent.end ( ) ; return result ; }

Target:
public boolean onCreateWindow ( boolean isDialog , boolean isUserGesture ) { android.os.Message m = mUiThreadHandler.obtainMessage ( com.android.webview.chromium.WebViewContentsClientAdapter.NEW_WEBVIEW_CREATED , mWebView.new com.android.webview.chromium.WebViewTransport ( ) ) ; org.chromium.base.TraceEvent.begin ( ) ; boolean result ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onCreateWindow" ) ; result = mWebChromeClient.onCreateWindow ( mWebView , isDialog , isUserGesture , m ) ; } else { result = false ; } org.chromium.base.TraceEvent.end ( ) ; return result ; }
Source:
public void onBluetoothPeripheralHandoverComplete ( boolean connected ) { int transport = mBluetoothPeripheralHandover.mTransport ; mBluetoothPeripheralHandover = null ; mBluetoothHeadsetConnected = connected ; if ( ( transport == ( android.bluetooth.BluetoothDevice.TRANSPORT_LE ) ) && ( ! connected ) ) { if ( mHandler.hasMessages ( com.android.nfc.handover.PeripheralHandoverService.MSG_PAUSE_POLLING ) ) { mHandler.removeMessages ( com.android.nfc.handover.PeripheralHandoverService.MSG_PAUSE_POLLING ) ; } mNfcAdapter.resumePolling ( ) ; } disableBluetoothIfNeeded ( ) ; synchronized ( com.android.nfc.handover.PeripheralHandoverService.sLock ) { stopSelf ( mStartId ) ; mStartId = 0 ; } }

Target:
public void onBluetoothPeripheralHandoverComplete ( boolean connected ) { int transport = mBluetoothPeripheralHandover.mTransport ; mBluetoothPeripheralHandover = null ; mBluetoothHeadsetConnected = connected ; if ( ( transport == ( android.bluetooth.BluetoothDevice.TRANSPORT_LE ) ) && ( ! connected ) ) { if ( mHandler.hasMessages ( com.android.nfc.handover.PeripheralHandoverService.MSG_PAUSE_POLLING ) ) { mHandler.removeMessages ( com.android.nfc.handover.PeripheralHandoverService.MSG_PAUSE_POLLING ) ; } mNfcAdapter.resumePolling ( ) ; } disableBluetoothIfNeeded ( ) ; replyToClient ( connected ) ; synchronized ( com.android.nfc.handover.PeripheralHandoverService.sLock ) { stopSelf ( mStartId ) ; mStartId = 0 ; } }
Source:
public void focusChanged ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Updating focus" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { int focusedWindow = com.android.hierarchyviewerlib.device.DeviceBridge.getFocusedWindow ( device ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateFocusedWindow ( device , focusedWindow ) ; } } ) ; }

Target:
public void windowsChanged ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Refreshing windows" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( device ) ; hvDevice.reloadWindows ( ) ; com.android.hierarchyviewerlib.models.DeviceSelectionModel.getModel ( ) . updateDevice ( hvDevice ) ; } } ) ; }
Source:
private com.android.ims.internal.IImsMMTelFeature createEmergencyMMTelFeatureInternal ( int slotId , com.android.ims.internal.IImsFeatureStatusCallback c ) { android.telephony.ims.feature.MMTelFeature f = onCreateEmergencyMMTelImsFeature ( slotId ) ; if ( f != null ) { setupFeature ( f , slotId , ImsFeature.EMERGENCY_MMTEL , c ) ; return f.getBinder ( ) ; } else { return null ; } }

Target:
public void setListener ( android.telephony.ims.aidl.IImsServiceControllerListener l ) { mListener = l ; }
Source:
public void testTlvInvalidByteArray ( ) { android.net.wifi.nan.LvBufferUtils.LvConstructor tlv01 = new android.net.wifi.nan.LvBufferUtils.LvConstructor ( 1 ) ; tlv01.allocate ( 15 ) ; tlv01.putByte ( ( ( byte ) ( 2 ) ) ) ; tlv01.putByteArray ( 2 , new byte [ ] { 0 , 1 , 2 } ) ; byte [ ] array = tlv01.getArray ( ) ; array [ 0 ] = 10 ; collector.checkThat ( "tlv01-invalid" , android.net.wifi.nan.LvBufferUtils.isValid ( array , 1 ) , org.hamcrest.core.IsEqual.equalTo ( false ) ) ; }

Target:
public void testTlvInvalidByteArray ( ) { android.net.wifi.aware.LvBufferUtils.LvConstructor tlv01 = new android.net.wifi.aware.LvBufferUtils.LvConstructor ( 1 ) ; tlv01.allocate ( 15 ) ; tlv01.putByte ( ( ( byte ) ( 2 ) ) ) ; tlv01.putByteArray ( 2 , new byte [ ] { 0 , 1 , 2 } ) ; byte [ ] array = tlv01.getArray ( ) ; array [ 0 ] = 10 ; collector.checkThat ( "tlv01-invalid" , android.net.wifi.aware.LvBufferUtils.isValid ( array , 1 ) , org.hamcrest.core.IsEqual.equalTo ( false ) ) ; }
Source:
public boolean hasResources ( com.android.ide.eclipse.adt.internal.resources.ResourceType type ) { checkAndUpdate ( type ) ; if ( type == ( com.android.ide.eclipse.adt.internal.resources.ResourceType.ID ) ) { synchronized ( mIdResourceList ) { return ( mIdResourceList.size ( ) ) > 0 ; } } java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > items = mResourceMap.get ( type ) ; return ( items != null ) && ( ( items.size ( ) ) > 0 ) ; }

Target:
public boolean hasResources ( com.android.resources.ResourceType type ) { checkAndUpdate ( type ) ; if ( type == ( com.android.resources.ResourceType.ID ) ) { synchronized ( mIdResourceList ) { return ( mIdResourceList.size ( ) ) > 0 ; } } java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > items = mResourceMap.get ( type ) ; return ( items != null ) && ( ( items.size ( ) ) > 0 ) ; }
Source:
public static void setUp ( ) throws java.lang.Exception { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.sched.util.RunnableHooks hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( hooks ) ; options.getConfigBuilder ( hooks ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }

Target:
public static void setUp ( ) throws com.android.jack.IllegalOptionsException , com.android.sched.util.config.ConfigurationException { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.ir.ast.MarkerCollectorTest.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.ir.ast.MarkerCollectorTest.hooks ) ; options.getConfigBuilder ( com.android.jack.ir.ast.MarkerCollectorTest.hooks ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; }
Source:
private void loadList ( ) { org.eclipse.core.resources.IProject project = getChooser ( ) . getProject ( ) ; if ( project == null ) { return ; } if ( ( mManualList ) == null ) { mManualList = com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderPreviewList.get ( project ) ; } try { mManualList.load ( getChooser ( ) . getDeviceList ( ) ) ; mPreviews = mManualList.createPreviews ( mCanvas ) ; } catch ( java.io.IOException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , null ) ; } }

Target:
private void loadList ( ) { org.eclipse.core.resources.IProject project = getChooser ( ) . getProject ( ) ; if ( project == null ) { return ; } if ( ( mManualList ) == null ) { mManualList = com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderPreviewList.get ( project ) ; } try { mManualList.load ( getChooser ( ) . getDevices ( ) ) ; mPreviews = mManualList.createPreviews ( mCanvas ) ; } catch ( java.io.IOException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , null ) ; } }
Source:
public void addI64 ( android.support.v8.renderscript.Long3 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addI64 ( new android.support.v8.renderscript.Long3 ( v.x , v.y , v.z ) ) ; return ; } addI64 ( v.x ) ; addI64 ( v.y ) ; addI64 ( v.z ) ; }

Target:
public void addMatrix ( android.support.v8.renderscript.Matrix4f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( v ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }
Source:
private void logStateAndMessage ( android.os.Message message , java.lang.String state ) { messageHandlingStatus = 0 ; if ( com.android.server.wifi.WifiStateMachine.mLogMessages ) { loge ( ( ( ( " " + state ) + " " ) + ( getLogRecString ( message ) ) ) ) ; } }

Target:
private void logStateAndMessage ( android.os.Message message , com.android.internal.util.State state ) { messageHandlingStatus = 0 ; if ( mVerboseLoggingEnabled ) { logd ( ( ( ( " " + ( state.getClass ( ) . getSimpleName ( ) ) ) + " " ) + ( getLogRecString ( message ) ) ) ) ; } }
Source:
public static int IntAddition2 ( ) { int a ; int b ; int c ; a = 1 ; b = 2 ; a += b ; b = 5 ; c = 6 ; b += c ; c = a + b ; return c ; }

Target:
public static int IntAddition2 ( ) { int a ; int b ; int c ; a = Main.$inline$int ( 1 ) ; b = Main.$inline$int ( 2 ) ; a += b ; b = Main.$inline$int ( 5 ) ; c = Main.$inline$int ( 6 ) ; b += c ; c = a + b ; return c ; }
Source:
public static void go ( ) { java.lang.Thread t = new java.lang.Thread ( null , new ThreadTestSub ( ) , "Thready" , 7168 ) ; t.setDaemon ( false ) ; java.lang.System.out.print ( ( ( "Starting thread '" + ( t.getName ( ) ) ) + "\'\n" ) ) ; t.start ( ) ; try { t.join ( ) ; } catch ( java.lang.InterruptedException ex ) { ex.printStackTrace ( ) ; } java.lang.System.out.print ( "Thread starter returning\n" ) ; }

Target:
private static void testThreadDaemons ( ) { java.lang.Thread t = new java.lang.Thread ( null , new Main.TestDaemonThread ( ) , "TestDaemonThread" , 7168 ) ; t.setDaemon ( false ) ; java.lang.System.out.print ( ( ( "testThreadDaemons starting thread '" + ( t.getName ( ) ) ) + "\'\n" ) ) ; t.start ( ) ; try { t.join ( ) ; } catch ( java.lang.InterruptedException ex ) { ex.printStackTrace ( ) ; } java.lang.System.out.print ( "testThreadDaemons finished\n" ) ; }
Source:
public java.lang.String createNetworkSpecifierOpen ( @ android.net.wifi.aware.WifiAwareManager.DataPathRole int role , @ android.annotation.Nullable byte [ ] peer ) { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.e ( android.net.wifi.aware.WifiAwareSession.TAG , "createNetworkSpecifierOpen: called post GC on WifiAwareManager" ) ; return "" ; } if ( mTerminated ) { android.util.Log.e ( android.net.wifi.aware.WifiAwareSession.TAG , "createNetworkSpecifierOpen: called after termination" ) ; return "" ; } return mgr.createNetworkSpecifier ( mClientId , role , peer , null , null ) ; }

Target:
public android.net.NetworkSpecifier createNetworkSpecifierOpen ( @ android.net.wifi.aware.WifiAwareManager.DataPathRole int role , @ android.annotation.Nullable byte [ ] peer ) { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.e ( android.net.wifi.aware.WifiAwareSession.TAG , "createNetworkSpecifierOpen: called post GC on WifiAwareManager" ) ; return null ; } if ( mTerminated ) { android.util.Log.e ( android.net.wifi.aware.WifiAwareSession.TAG , "createNetworkSpecifierOpen: called after termination" ) ; return null ; } return mgr.createNetworkSpecifier ( mClientId , role , peer , null , null ) ; }
Source:
public void testStageUninstall_oldDirsAlreadyExists ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro installedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; simulateInstalledDistro ( installedDistro ) ; java.io.File oldStagedDataDir = installer.getOldStagedDataDir ( ) ; assertTrue ( oldStagedDataDir.mkdir ( ) ) ; java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; assertTrue ( installer.stageUninstall ( ) ) ; assertDistroUninstallStaged ( ) ; assertFalse ( workingDir.exists ( ) ) ; assertFalse ( oldStagedDataDir.exists ( ) ) ; assertInstalledDistro ( installedDistro ) ; }

Target:
public void testStageUninstall_existingStagedDataDistro ( ) throws java.lang.Exception { byte [ ] installedDistroBytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; simulateInstalledDistro ( installedDistroBytes ) ; java.io.File stagedDataDir = installer.getStagedTzDataDir ( ) ; assertTrue ( stagedDataDir.mkdir ( ) ) ; assertTrue ( installer.stageUninstall ( ) ) ; assertDistroUninstallStaged ( ) ; assertInstalledDistro ( installedDistroBytes ) ; }
Source:
public static com.android.server.connectivity.DnsManager.PrivateDnsConfig tryBlockingResolveOf ( android.net.Network network , java.lang.String name ) { final android.system.StructAddrinfo hints = new android.system.StructAddrinfo ( ) ; hints.ai_flags = 0 ; hints.ai_family = android.system.OsConstants.AF_UNSPEC ; hints.ai_socktype = android.system.OsConstants.SOCK_DGRAM ; try { final java.net.InetAddress [ ] ips = Libcore.os.android_getaddrinfo ( name , hints , network.netId ) ; if ( ( ips != null ) && ( ( ips.length ) > 0 ) ) { return new com.android.server.connectivity.DnsManager.PrivateDnsConfig ( name , ips ) ; } } catch ( android.system.GaiException ignored ) { } return null ; }

Target:
private void updateStatus ( com.android.server.connectivity.DnsManager.PrivateDnsValidationUpdate update ) { android.util.Pair < java.lang.String , java.net.InetAddress > p = new android.util.Pair ( update.hostname , update.ipAddress ) ; if ( ! ( mValidationMap.containsKey ( p ) ) ) { return ; } if ( update.validated ) { mValidationMap.put ( p , com.android.server.connectivity.DnsManager.PrivateDnsValidationStatuses.ValidationStatus.SUCCEEDED ) ; } else { mValidationMap.put ( p , com.android.server.connectivity.DnsManager.PrivateDnsValidationStatuses.ValidationStatus.FAILED ) ; } }
Source:
public boolean requestChildRectangleOnScreen ( final android.view.View child , final android.graphics.Rect rect , final boolean immediate ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestChildRectangleOnScreen ( child , rect , immediate ) ; } } ) ; return ret ; } return mAwContents.requestChildRectangleOnScreen ( child , rect , immediate ) ; }

Target:
public boolean requestFocus ( final int direction , final android.graphics.Rect previouslyFocusedRect ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestFocus ( direction , previouslyFocusedRect ) ; } } ) ; return ret ; } mAwContents.requestFocus ( ) ; return mWebViewPrivate.super_requestFocus ( direction , previouslyFocusedRect ) ; }
Source:
public org.bouncycastle.math.ec.ECFieldElement subtract ( org.bouncycastle.math.ec.ECFieldElement b ) { java.math.BigInteger x2 = b.toBigInteger ( ) ; java.math.BigInteger x3 = x.subtract ( x2 ) ; if ( ( x3.signum ( ) ) < 0 ) { x3 = x3.add ( q ) ; } return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , x3 ) ; }

Target:
protected java.math.BigInteger modSubtract ( java.math.BigInteger x1 , java.math.BigInteger x2 ) { java.math.BigInteger x3 = x1.subtract ( x2 ) ; if ( ( x3.signum ( ) ) < 0 ) { x3 = x3.add ( q ) ; } return x3 ; }
Source:
public synchronized void reload ( ) { if ( mProjectFolder.exists ( ) ) { com.android.sdklib.io.IAbstractFile propFile = mProjectFolder.getFile ( mType.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.SdkManager.parsePropertyFile ( propFile , null ) ; if ( map != null ) { mProperties.clear ( ) ; mProperties.putAll ( map ) ; } } } }

Target:
public synchronized void reload ( ) { if ( mProjectFolder.exists ( ) ) { com.android.sdklib.io.IAbstractFile propFile = mProjectFolder.getFile ( mType.mFilename ) ; if ( propFile.exists ( ) ) { java.util.Map < java.lang.String , java.lang.String > map = com.android.sdklib.internal.project.ProjectProperties.parsePropertyFile ( propFile , null ) ; if ( map != null ) { mProperties.clear ( ) ; mProperties.putAll ( map ) ; } } } }
Source:
public void setWifiEnabled ( boolean enable ) { localLog ( ( "Set WiFi " + ( enable ? "enabled" : "disabled" ) ) ) ; mWifiEnabled = enable ; if ( ! ( mWifiEnabled ) ) { stopConnectivityScan ( ) ; resetLastPeriodicSingleScanTimeStamp ( ) ; mLastConnectionAttemptBssid = null ; } else if ( mWifiConnectivityManagerEnabled ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } }

Target:
public void setWifiEnabled ( boolean enable ) { localLog ( ( "Set WiFi " + ( enable ? "enabled" : "disabled" ) ) ) ; mWifiEnabled = enable ; if ( ! ( mWifiEnabled ) ) { stopConnectivityScan ( ) ; resetLastPeriodicSingleScanTimeStamp ( ) ; mLastConnectionAttemptBssid = null ; mWaitForFullBandScanResults = false ; } else if ( mWifiConnectivityManagerEnabled ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } }
Source:
public void onStop ( ) { super . onStop ( ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , ( ( "onStop - mIsResponseSent[" + ( mIsResponseSent ) ) + "]" ) ) ; if ( mIsResponseSent ) { cancelTimeOut ( ) ; finish ( ) ; } else { appService.getStkContext ( mSlotId ) . setPendingActivityInstance ( this ) ; } }

Target:
public void onStop ( ) { super . onStop ( ) ; com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkInputActivity.LOG_TAG , ( ( "onStop - mIsResponseSent[" + ( mIsResponseSent ) ) + "]" ) ) ; if ( isChangingConfigurations ( ) ) { return ; } if ( ( mIsResponseSent ) && ( appService.isTopOfStack ( ) ) ) { cancelTimeOut ( ) ; finish ( ) ; } else { appService.getStkContext ( mSlotId ) . setPendingActivityInstance ( this ) ; } }
Source:
private static libcore.java.security.TestKeyStore getTestKeyStore ( ) throws java.lang.Exception { if ( ( libcore.javax.net.ssl.KeyManagerFactoryTest.TEST_KEY_STORE ) == null ) { libcore.javax.net.ssl.KeyManagerFactoryTest.TEST_KEY_STORE = new libcore.java.security.TestKeyStore.Builder ( ) . keyAlgorithms ( "RSA" , "DSA" , "EC" , "EC_RSA" ) . aliasPrefix ( "rsa-dsa-ec" ) . build ( ) ; } return libcore.javax.net.ssl.KeyManagerFactoryTest.TEST_KEY_STORE ; }

Target:
private static libcore.java.security.TestKeyStore getTestKeyStore ( ) throws java.lang.Exception { if ( ( libcore.javax.net.ssl.KeyManagerFactoryTest.TEST_KEY_STORE ) == null ) { libcore.javax.net.ssl.KeyManagerFactoryTest.TEST_KEY_STORE = new libcore.java.security.TestKeyStore.Builder ( ) . keyAlgorithms ( "RSA" , "DH_RSA" , "DSA" , "DH_DSA" , "EC" , "EC_RSA" ) . aliasPrefix ( "rsa-dsa-ec-dh" ) . build ( ) ; } return libcore.javax.net.ssl.KeyManagerFactoryTest.TEST_KEY_STORE ; }
Source:
public boolean equals ( java.lang.Object obj ) { return obj instanceof java.nio.file.attribute.FileTime.DaysAndNanos ? ( compareTo ( ( ( java.nio.file.attribute.FileTime.DaysAndNanos ) ( obj ) ) ) ) == 0 : false ; }

Target:
private long toExcessNanos ( long days ) { if ( ( unit ) != null ) { return unit.toNanos ( ( ( value ) - ( unit.convert ( days , java.util.concurrent.TimeUnit.DAYS ) ) ) ) ; } else { return java.util.concurrent.TimeUnit.SECONDS.toNanos ( ( ( toInstant ( ) . getEpochSecond ( ) ) - ( java.util.concurrent.TimeUnit.DAYS.toSeconds ( days ) ) ) ) ; } }
Source:
protected static android.icu.util.UResourceBundle instantiateBundle ( java.lang.String baseName , java.lang.String localeID , java.lang.ClassLoader root , boolean disableFallback ) { return android.icu.impl.ICUResourceBundle.instantiateBundle ( baseName , localeID , root , ( disableFallback ? android.icu.impl.ICUResourceBundle.OpenType.DIRECT : android.icu.impl.ICUResourceBundle.OpenType.LOCALE_DEFAULT_ROOT ) ) ; }

Target:
private static boolean localeIDStartsWithLangSubtag ( java.lang.String localeID , java.lang.String lang ) { return ( localeID.startsWith ( lang ) ) && ( ( ( localeID.length ( ) ) == ( lang.length ( ) ) ) || ( ( localeID.charAt ( lang.length ( ) ) ) == '_' ) ) ; }