auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testCall911 ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { android.content.Intent intent = new android.content.Intent ( "android.intent.action.CALL_PRIVILEGED" , android.net.Uri.parse ( "tel:911" ) ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; try { mContext.startActivity ( intent ) ; fail ( "startActivity(Intent.ACTION_CALL_PRIVILEGED) did not throw SecurityException as expected" ) ; } catch ( java.lang.SecurityException e ) { } } else { return ; } }

Target:
public void testCall911 ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { android.content.Intent intent = new android.content.Intent ( "android.intent.action.CALL_PRIVILEGED" , android.net.Uri.parse ( "tel:911" ) ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; try { mContext.startActivity ( intent ) ; fail ( ( "startActivity(Intent.ACTION_CALL_PRIVILEGED) did not throw " + "SecurityException as expected" ) ) ; } catch ( java.lang.SecurityException e ) { } } }
Source:
protected void fillFileTypes ( ) { for ( com.android.jack.library.FileType ft : com.android.jack.library.FileType.values ( ) ) { try { java.lang.String propertyName = ft.getPropertyName ( ) ; if ( ( containsProperty ( propertyName ) ) && ( java.lang.Boolean.parseBoolean ( getProperty ( propertyName ) ) ) ) { fileTypes.add ( ft ) ; } } catch ( com.android.jack.library.LibraryFormatException e ) { throw new java.lang.AssertionError ( ) ; } } }

Target:
protected void fillFileTypes ( ) { for ( com.android.jack.library.FileType ft : com.android.jack.library.FileType.values ( ) ) { try { java.lang.String propertyName = ft.getPropertyPrefix ( ) ; if ( ( containsProperty ( propertyName ) ) && ( java.lang.Boolean.parseBoolean ( getProperty ( propertyName ) ) ) ) { fileTypes.add ( ft ) ; } } catch ( com.android.jack.library.LibraryFormatException e ) { throw new java.lang.AssertionError ( ) ; } } }
Source:
public void testNegativeUidsDisallowed ( ) { try { new android.net.UidRange ( ( - 2 ) , 100 ) ; fail ( "Exception not thrown for negative start UID" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { new android.net.UidRange ( ( - 200 ) , ( - 100 ) ) ; fail ( "Exception not thrown for negative stop UID" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void testNegativeUidsDisallowed ( ) { try { new android.net.UidRange ( ( - 2 ) , 100 ) ; org.junit.Assert.fail ( "Exception not thrown for negative start UID" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { new android.net.UidRange ( ( - 200 ) , ( - 100 ) ) ; org.junit.Assert.fail ( "Exception not thrown for negative stop UID" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }
Source:
public org.objectweb.asm.ClassReader readIfKnown ( java.lang.String internalClassName ) { java.util.zip.ZipEntry entry = jar.getEntry ( ( internalClassName + ".class" ) ) ; if ( entry == null ) { return null ; } try ( java.io.InputStream bytecode = jar.getInputStream ( entry ) ) { return new org.objectweb.asm.ClassReader ( bytecode ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalStateException ( ( "Couldn't load " + internalClassName ) , e ) ; } }

Target:
public org.objectweb.asm.ClassReader readIfKnown ( java.lang.String internalClassName ) { java.util.zip.ZipEntry entry = jar.getEntry ( ( ( rewriter.unprefix ( internalClassName ) ) + ".class" ) ) ; if ( entry == null ) { return null ; } try ( java.io.InputStream bytecode = jar.getInputStream ( entry ) ) { return rewriter.reader ( bytecode ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalStateException ( ( "Couldn't load " + internalClassName ) , e ) ; } }
Source:
private void localHlsTest ( final java.lang.String name , boolean appendQueryString ) throws java.lang.Throwable { mServer = new android.webkit.cts.CtsTestServer ( mContext ) ; try { java.lang.String stream_url = mServer.getAssetUrl ( name ) ; if ( appendQueryString ) { stream_url += "?foo=bar/baz" ; } playLiveVideoTest ( stream_url , 10 ) ; } finally { mServer.shutdown ( ) ; } }

Target:
private void localHlsTest ( final java.lang.String name , boolean appendQueryString , boolean redirect ) throws java.lang.Throwable { mServer = new android.webkit.cts.CtsTestServer ( mContext ) ; try { java.lang.String stream_url = null ; if ( redirect ) { stream_url = mServer.getQueryRedirectingAssetUrl ( name ) ; } else { stream_url = mServer.getAssetUrl ( name ) ; } if ( appendQueryString ) { stream_url += "?foo=bar/baz" ; } playLiveVideoTest ( stream_url , 10 ) ; } finally { mServer.shutdown ( ) ; } }
Source:
public static float vectorLength ( float [ ] a ) { return ( ( float ) ( java.lang.Math.sqrt ( ( ( ( a [ 0 ] ) * ( a [ 0 ] ) ) + ( ( a [ 1 ] ) * ( a [ 1 ] ) ) ) ) ) ) ; }

Target:
public static float vectorLength ( float [ ] a ) { return ( ( float ) ( java.lang.Math.hypot ( a [ 0 ] , a [ 1 ] ) ) ) ; }
Source:
public void sendSms ( int token , int messageRef , java.lang.String format , java.lang.String smsc , boolean isRetry , byte [ ] pdu ) throws com.android.ims.ImsException { try { mMmTelFeatureConnection.sendSms ( token , messageRef , format , smsc , isRetry , pdu ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "sendSms()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
public void setSmsListener ( android.telephony.ims.aidl.IImsSmsListener listener ) throws com.android.ims.ImsException { try { mMmTelFeatureConnection.setSmsListener ( listener ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "setSmsListener()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
public static void compileJackToDex ( com.android.jack.Options options , java.io.File in , java.io.File out , boolean zip ) throws java.lang.Exception { options.jayceImport = new java.util.ArrayList < java.io.File > ( 1 ) ; options.jayceImport.add ( in ) ; if ( zip ) { options.outZip = out ; } else { options.out = out ; } com.android.jack.Jack.run ( options ) ; }

Target:
public static void compileJackToDex ( com.android.jack.Options options , java.io.File in , java.io.File out , boolean zip ) throws java.lang.Exception { options.importedLibraries = new java.util.ArrayList < java.io.File > ( 1 ) ; options.importedLibraries.add ( in ) ; if ( zip ) { options.outZip = out ; } else { options.out = out ; } com.android.jack.Jack.run ( options ) ; }
Source:
public boolean setNetworkCandidateScanResult ( int networkId , android.net.wifi.ScanResult scanResult , int score ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( scanResult ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( score ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( true ) ; return true ; }

Target:
public boolean setNetworkCandidateScanResult ( int networkId , android.net.wifi.ScanResult scanResult , int score ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( ( ( "Set network candidate scan result " + scanResult ) + " for " ) + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setCandidate ( scanResult ) ; config.getNetworkSelectionStatus ( ) . setCandidateScore ( score ) ; config.getNetworkSelectionStatus ( ) . setSeenInLastQualifiedNetworkSelection ( true ) ; return true ; }
Source:
public void publish ( int clientId , android.net.wifi.nan.PublishConfig publishConfig , android.net.wifi.nan.IWifiNanDiscoverySessionCallback callback ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_TYPE_COMMAND ) ; msg.arg1 = com.android.server.wifi.nan.WifiNanStateManager.COMMAND_TYPE_PUBLISH ; msg.arg2 = clientId ; msg.obj = callback ; msg.getData ( ) . putParcelable ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_BUNDLE_KEY_CONFIG , publishConfig ) ; mSm.sendMessage ( msg ) ; }

Target:
public void publish ( int clientId , android.net.wifi.aware.PublishConfig publishConfig , android.net.wifi.aware.IWifiAwareDiscoverySessionCallback callback ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_TYPE_COMMAND ) ; msg.arg1 = com.android.server.wifi.aware.WifiAwareStateManager.COMMAND_TYPE_PUBLISH ; msg.arg2 = clientId ; msg.obj = callback ; msg.getData ( ) . putParcelable ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_CONFIG , publishConfig ) ; mSm.sendMessage ( msg ) ; }
Source:
public android.security.cts.ReadElf.Symbol getDynamicSymbol ( java.lang.String name ) { if ( ( ( mDynSymOffset ) == 0 ) && ( ( mDynSymSize ) == 0 ) ) { return null ; } if ( ( mDynamicSymbols ) == null ) { mDynamicSymbols = new java.util.HashMap < java.lang.String , android.security.cts.ReadElf.Symbol > ( ) ; try { readSymbolTable ( mDynamicSymbols , mDynStrOffset , mDynStrSize , mDynSymOffset , mDynSymSize ) ; } catch ( java.io.IOException e ) { return null ; } } return mDynamicSymbols.get ( name ) ; }

Target:
public android.os.cts.ReadElf.Symbol getDynamicSymbol ( java.lang.String name ) { if ( ( ( mDynSymOffset ) == 0 ) && ( ( mDynSymSize ) == 0 ) ) { return null ; } if ( ( mDynamicSymbols ) == null ) { mDynamicSymbols = new java.util.HashMap < java.lang.String , android.os.cts.ReadElf.Symbol > ( ) ; try { readSymbolTable ( mDynamicSymbols , mDynStrOffset , mDynStrSize , mDynSymOffset , mDynSymSize ) ; } catch ( java.io.IOException e ) { return null ; } } return mDynamicSymbols.get ( name ) ; }
Source:
public java.lang.String installPackage ( java.lang.String packageFilePath , boolean reinstall ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.lang.String remoteFilePath = syncPackageToDevice ( packageFilePath ) ; java.lang.String result = installRemotePackage ( remoteFilePath , reinstall ) ; removeRemotePackage ( remoteFilePath ) ; return result ; }

Target:
public java.lang.String installPackage ( java.lang.String packageFilePath , boolean reinstall ) throws com.android.ddmlib.InstallException { try { java.lang.String remoteFilePath = syncPackageToDevice ( packageFilePath ) ; java.lang.String result = installRemotePackage ( remoteFilePath , reinstall ) ; removeRemotePackage ( remoteFilePath ) ; return result ; } catch ( java.io.IOException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.TimeoutException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.SyncException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } }
Source:
private android.database.Cursor getUpcomingInstancesCursor ( android.content.ContentResolver resolver , long searchDuration , long now ) { long end = now + searchDuration ; android.net.Uri uri = android.net.Uri.withAppendedPath ( Instances.CONTENT_URI , java.lang.String.format ( "%d/%d" , now , end ) ) ; java.lang.String selection = java.lang.String.format ( "%s=1 AND %s!=%d" , Calendars.SELECTED , Instances.SELF_ATTENDEE_STATUS , Attendees.ATTENDEE_STATUS_DECLINED ) ; return resolver.query ( uri , com.android.providers.calendar.CalendarAppWidgetService.EVENT_PROJECTION , selection , null , com.android.providers.calendar.CalendarAppWidgetService.EVENT_SORT_ORDER ) ; }

Target:
private android.database.Cursor getUpcomingInstancesCursor ( android.content.ContentResolver resolver , long searchDuration , long now ) { long end = now + searchDuration ; android.net.Uri uri = android.net.Uri.withAppendedPath ( Instances.CONTENT_URI , ( ( ( java.lang.String.valueOf ( now ) ) + "/" ) + ( java.lang.String.valueOf ( end ) ) ) ) ; return resolver.query ( uri , com.android.providers.calendar.CalendarAppWidgetService.EVENT_PROJECTION , com.android.providers.calendar.CalendarAppWidgetService.EVENT_SELECTION , null , com.android.providers.calendar.CalendarAppWidgetService.EVENT_SORT_ORDER ) ; }
Source:
public void testAesCbcHmacMd5Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testInterfaceCountersUdp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1000 , false ) ; }
Source:
public void test_readlink ( ) throws java.lang.Exception { java.lang.String tmpDir = java.lang.System.getProperty ( "java.io.tmpdir" ) ; java.lang.String path = tmpDir + "/symlink" ; try { java.lang.String xs = "" ; for ( int i = 0 ; i < ( 4096 - 1 ) ; ++ i ) xs += "x" ; Libcore.os.symlink ( xs , path ) ; assertEquals ( xs , Libcore.os.readlink ( path ) ) ; } finally { assertTrue ( ( "Could not delete symlink: " + path ) , new java.io.File ( path ) . delete ( ) ) ; } }

Target:
public void test_readlink ( ) throws java.lang.Exception { java.io.File path = new java.io.File ( libcore.io.IoUtils.createTemporaryDirectory ( "test_readlink" ) , "symlink" ) ; int size = 2048 ; java.lang.String xs = "" ; for ( int i = 0 ; i < ( size - 1 ) ; ++ i ) xs += "x" ; Libcore.os.symlink ( xs , path.getPath ( ) ) ; assertEquals ( xs , Libcore.os.readlink ( path.getPath ( ) ) ) ; }
Source:
public void TestAreConfusable ( ) { com.ibm.icu.text.SpoofChecker sc = new com.ibm.icu.text.SpoofChecker.Builder ( ) . build ( ) ; java.lang.String s1 = "A long string that will overflow stack buffers. A long string that will overflow stack buffers. " + "A long string that will overflow stack buffers. A long string that will overflow stack buffers. " ; java.lang.String s2 = "A long string that wi11 overflow stack buffers. A long string that will overflow stack buffers. " + "A long string that wi11 overflow stack buffers. A long string that will overflow stack buffers. " ; assertEquals ( "" , SpoofChecker.SINGLE_SCRIPT_CONFUSABLE , sc.areConfusable ( s1 , s2 ) ) ; }

Target:
public void TestAreConfusable ( ) { com.ibm.icu.text.SpoofChecker sc = new com.ibm.icu.text.SpoofChecker.Builder ( ) . setChecks ( SpoofChecker.CONFUSABLE ) . build ( ) ; java.lang.String s1 = "A long string that will overflow stack buffers. A long string that will overflow stack buffers. " + "A long string that will overflow stack buffers. A long string that will overflow stack buffers. " ; java.lang.String s2 = "A long string that wi11 overflow stack buffers. A long string that will overflow stack buffers. " + "A long string that wi11 overflow stack buffers. A long string that will overflow stack buffers. " ; assertEquals ( "" , SpoofChecker.SINGLE_SCRIPT_CONFUSABLE , sc.areConfusable ( s1 , s2 ) ) ; }
Source:
public static void setUpClass ( ) { com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.class . getClassLoader ( ) . setDefaultAssertionStatus ( true ) ; }

Target:
public static void setUpClass ( ) { com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.class . getClassLoader ( ) . setDefaultAssertionStatus ( true ) ; com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.BOOTCLASSPATH = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar" ) } ; com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.CLASSPATH = new java.io.File [ ] { com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.jar" ) , com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jar" ) , com.android.jack.TestTools.getFromAndroidTree ( "out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar" ) } ; com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest.SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "framework" ) ; }
Source:
public static com.android.dx.rop.cst.CstType intern ( com.android.dx.rop.type.Type type ) { synchronized ( com.android.dx.rop.cst.CstType.interns ) { com.android.dx.rop.cst.CstType cst = com.android.dx.rop.cst.CstType.interns.get ( type ) ; if ( cst == null ) { cst = new com.android.dx.rop.cst.CstType ( type ) ; com.android.dx.rop.cst.CstType.interns.put ( type , cst ) ; } return cst ; } }

Target:
public static void clearInternTable ( ) { com.android.dx.rop.cst.CstType.interns.clear ( ) ; }
Source:
public void onSensorChanged ( android.hardware.SensorEvent event ) { float [ ] values = event.values ; clearText ( ) ; appendText ( ( "Please calibrate the Magnetometer by moving it in 8 shapes in different " + "orientations." ) ) ; appendText ( java.lang.String.format ( "-> (%.2f, %.2f, %.2f) uT" , values [ 0 ] , values [ 1 ] , values [ 2 ] ) , Color.GRAY ) ; appendText ( "Then leave the device in a flat surface and press Next...\n" ) ; }

Target:
public void onSensorChanged ( android.hardware.SensorEvent event ) { float [ ] values = event.values ; clearText ( ) ; appendText ( ( "Please calibrate the Magnetometer by moving it in 8 shapes in " + "different orientations." ) ) ; appendText ( java.lang.String.format ( "-> (%.2f, %.2f, %.2f) uT" , values [ 0 ] , values [ 1 ] , values [ 2 ] ) , Color.GRAY ) ; appendText ( "Then leave the device in a flat surface and press Next...\n" ) ; }
Source:
private static void addBody ( java.net.HttpURLConnection connection , com.android.volley.Request < ? > request , byte [ ] body ) throws com.android.volley.AuthFailureError , java.io.IOException { connection.setDoOutput ( true ) ; connection.addRequestProperty ( com.android.volley.toolbox.HurlStack.HEADER_CONTENT_TYPE , request.getBodyContentType ( ) ) ; java.io.DataOutputStream out = new java.io.DataOutputStream ( connection.getOutputStream ( ) ) ; out.write ( body ) ; out.close ( ) ; }

Target:
private static void addBody ( java.net.HttpURLConnection connection , com.android.volley.Request < ? > request , byte [ ] body ) throws com.android.volley.AuthFailureError , java.io.IOException { connection.setDoOutput ( true ) ; connection.addRequestProperty ( HttpHeaderParser.HEADER_CONTENT_TYPE , request.getBodyContentType ( ) ) ; java.io.DataOutputStream out = new java.io.DataOutputStream ( connection.getOutputStream ( ) ) ; out.write ( body ) ; out.close ( ) ; }
Source:
public boolean setOperatorBrandOverride ( java.lang.String brand ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setOperatorBrandOverride ( brand ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setOperatorBrandOverride RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setOperatorBrandOverride NPE" , ex ) ; } return false ; }

Target:
public java.lang.String sendEnvelopeWithStatus ( int subId , java.lang.String content ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.sendEnvelopeWithStatus ( subId , content ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return "" ; }
Source:
private void addRemoteAddOn ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , java.lang.String vendor , java.lang.String name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newAddon ( version , revision , vendor , name ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteAddOn ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.descriptors.IdDisplay vendor , com.android.sdklib.repository.descriptors.IdDisplay name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newAddon ( version , revision , vendor , name ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
protected void finalize ( ) throws java.lang.Throwable { try { if ( ( ctx ) != 0 ) { org.conscrypt.NativeCrypto.EVP_PKEY_free ( ctx ) ; } } finally { super . finalize ( ) ; } }

Target:
public int hashCode ( ) { int hash = 1 ; hash = ( hash * 17 ) + ( ctx.hashCode ( ) ) ; hash = ( hash * 31 ) + ( ( int ) ( ( engine ) == null ? 0 : engine.getEngineContext ( ) ) ) ; return hash ; }
Source:
public void onProgressUpdated ( android.telephony.mbms.DownloadRequest request , android.telephony.mbms.FileInfo fileInfo , int currentDownloadSize , int fullDownloadSize , int currentDecodedSize , int fullDecodedSize ) { try { callback.onProgressUpdated ( request , fileInfo , currentDownloadSize , fullDownloadSize , currentDecodedSize , fullDecodedSize ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , downloadRequest.getSubscriptionId ( ) ) ; } }

Target:
public void onProgressUpdated ( android.telephony.mbms.DownloadRequest request , android.telephony.mbms.FileInfo fileInfo , int currentDownloadSize , int fullDownloadSize , int currentDecodedSize , int fullDecodedSize ) { if ( ! ( isFilterFlagSet ( android.telephony.mbms.vendor.PROGRESS_UPDATES ) ) ) { return ; } try { mCallback.onProgressUpdated ( request , fileInfo , currentDownloadSize , fullDownloadSize , currentDecodedSize , fullDecodedSize ) ; } catch ( android.os.RemoteException e ) { onRemoteException ( e ) ; } }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 -Xint " ) ; commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }

Target:
protected java.lang.String constructCommand ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm32 -Xint " ) ; commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; return commandBuilder.toString ( ) ; }
Source:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > getAllModels ( ) { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > allModels = getAllModels ( new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , false ) ; for ( com.android.builder.model.AndroidProject project : allModels.values ( ) ) { com.android.build.gradle.integration.common.fixture.GradleTestProject.assertNoSyncIssues ( project ) ; } return allModels ; }

Target:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > getAllModels ( ) { return getAllModelsWithBenchmark ( null , null ) ; }
Source:
public static < T > void assertThat ( java.lang.String reason , T actual , org.hamcrest.Matcher < T > matcher ) { if ( ! ( matcher.matches ( actual ) ) ) { org.hamcrest.Description description = new org.hamcrest.StringDescription ( ) ; description.appendText ( reason ) ; description.appendText ( "\nExpected: " ) ; description.appendDescriptionOf ( matcher ) ; description.appendText ( "\n got: " ) ; description.appendValue ( actual ) ; description.appendText ( "\n" ) ; throw new java.lang.AssertionError ( description.toString ( ) ) ; } }

Target:
public static void assertEquals ( java.lang.String message , long expected , long actual ) { if ( expected != actual ) { org.junit.Assert.failNotEquals ( message , java.lang.Long.valueOf ( expected ) , java.lang.Long.valueOf ( actual ) ) ; } }
Source:
boolean getIdleTime ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getIdleTime: " + ( device.getAddress ( ) ) ) ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothInputDevice.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_IDLE_TIME , device ) ; mHandler.sendMessage ( msg ) ; return true ; }

Target:
boolean getIdleTime ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getIdleTime: " + ( device.getAddress ( ) ) ) ) ; int state = this . getConnectionState ( device ) ; if ( state != ( android.bluetooth.BluetoothHidHost.STATE_CONNECTED ) ) { return false ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_GET_IDLE_TIME , device ) ; mHandler.sendMessage ( msg ) ; return true ; }
Source:
public static void testSendMessage7bitUmts ( android.app.Activity activity , int serialNumber , int category ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( activity , com.android.cellbroadcastreceiver.tests.SendTestMessages.gsm7BitTestUmts , serialNumber , category ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_SMS , AppOpsManager.OP_RECEIVE_SMS , null , null , Activity.RESULT_OK , null , null ) ; }

Target:
public static void testSendMessage7bit ( android.app.Activity activity , int serialNumber , int category ) { com.android.cellbroadcastreceiver.tests.SendTestMessages.sendBroadcast ( activity , serialNumber , category , com.android.cellbroadcastreceiver.tests.SendTestMessages.gsm7BitTest ) ; }
Source:
protected android.support.v8.renderscript.Script.FieldID createFieldID ( int slot , android.support.v8.renderscript.Element e ) { android.support.v8.renderscript.Script.FieldID f = mFIDs.get ( slot ) ; if ( f != null ) { return f ; } int id = mRS.nScriptFieldIDCreate ( getID ( mRS ) , slot ) ; if ( id == 0 ) { throw new android.support.v8.renderscript.RSDriverException ( "Failed to create FieldID" ) ; } f = new android.support.v8.renderscript.Script.FieldID ( id , mRS , this , slot ) ; mFIDs.put ( slot , f ) ; return f ; }

Target:
protected android.support.v8.renderscript.Script.InvokeID createInvokeID ( int slot ) { android.support.v8.renderscript.Script.InvokeID i = mIIDs.get ( slot ) ; if ( i != null ) { return i ; } long id = mRS.nScriptInvokeIDCreate ( getID ( mRS ) , slot ) ; if ( id == 0 ) { throw new android.support.v8.renderscript.RSDriverException ( "Failed to create KernelID" ) ; } i = new android.support.v8.renderscript.Script.InvokeID ( id , mRS , this , slot ) ; mIIDs.put ( slot , i ) ; return i ; }
Source:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { java.lang.String title = getArguments ( ) . getString ( com.android.tv.dialog.WebDialogFragment.TITLE ) ; getDialog ( ) . setTitle ( title ) ; android.webkit.WebView webView = new android.webkit.WebView ( getActivity ( ) ) ; webView.setWebViewClient ( new android.webkit.WebViewClient ( ) ) ; java.lang.String url = getArguments ( ) . getString ( com.android.tv.dialog.WebDialogFragment.URL ) ; webView.loadUrl ( url ) ; android.util.Log.d ( com.android.tv.dialog.WebDialogFragment.TAG , ( "Loading web content from " + url ) ) ; return webView ; }

Target:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , android.view.ViewGroup container , android.os.Bundle savedInstanceState ) { java.lang.String title = getArguments ( ) . getString ( com.android.tv.dialog.WebDialogFragment.TITLE ) ; getDialog ( ) . setTitle ( title ) ; mWebView = new android.webkit.WebView ( getActivity ( ) ) ; mWebView.setWebViewClient ( new android.webkit.WebViewClient ( ) ) ; java.lang.String url = getArguments ( ) . getString ( com.android.tv.dialog.WebDialogFragment.URL ) ; mWebView.loadUrl ( url ) ; android.util.Log.d ( com.android.tv.dialog.WebDialogFragment.TAG , ( "Loading web content from " + url ) ) ; return mWebView ; }
Source:
static void acquireScreenCpuWakeLock ( android.content.Context context ) { if ( ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sCpuWakeLock ) != null ) { return ; } android.os.PowerManager pm = ( ( android.os.PowerManager ) ( context.getSystemService ( Context.POWER_SERVICE ) ) ) ; com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sCpuWakeLock = pm.newWakeLock ( ( ( ( android.os.PowerManager.PARTIAL_WAKE_LOCK ) | ( android.os.PowerManager.ACQUIRE_CAUSES_WAKEUP ) ) | ( android.os.PowerManager.ON_AFTER_RELEASE ) ) , com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG ) ; com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sCpuWakeLock.acquire ( ) ; android.util.Log.d ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG , "acquired screen + CPU wake lock" ) ; }

Target:
static void acquireScreenBrightWakeLock ( android.content.Context context ) { if ( ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock ) == null ) { android.os.PowerManager pm = ( ( android.os.PowerManager ) ( context.getSystemService ( Context.POWER_SERVICE ) ) ) ; com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock = pm.newWakeLock ( ( ( android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK ) | ( android.os.PowerManager.ON_AFTER_RELEASE ) ) , com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG ) ; } if ( ! ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock.isHeld ( ) ) ) { com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.sScreenBrightWakeLock.acquire ( ( ( 1000 * 60 ) * 5 ) ) ; android.util.Log.d ( com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.TAG , "acquired screen bright wakelock" ) ; } }
Source:
public void append ( ) { runOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mLogLayout.addView ( mTextView ) ; mLogScrollView.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mLogScrollView.fullScroll ( View.FOCUS_DOWN ) ; } } ) ; } } ) ; }

Target:
public void append ( ) { runOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mLogLayout.addView ( mView ) ; mLogScrollView.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mLogScrollView.fullScroll ( View.FOCUS_DOWN ) ; } } ) ; } } ) ; }
Source:
java.io.OutputStream openWrite ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file , boolean append ) throws com.android.sched.util.file.WrongPermissionException { assert capabilities.contains ( Capabilities.WRITE ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileOutputStream ( path , append ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.WRITE ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
java.io.OutputStream openWrite ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVFile file , boolean append ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; assert capabilities.contains ( Capabilities.WRITE ) ; java.io.File path = getNativeFile ( file.getPath ( ) ) ; try { return new java.io.FileOutputStream ( path , append ) ; } catch ( java.io.FileNotFoundException e ) { com.android.sched.util.file.FileOrDirectory.checkPermissions ( path , file.getLocation ( ) , Permission.WRITE ) ; throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }
Source:
void finishInstrumentationLocked ( com.android.server.am.ProcessRecord app , int resultCode , android.os.Bundle results ) { if ( ( app.instrumentationWatcher ) != null ) { try { app.instrumentationWatcher.instrumentationFinished ( app.instrumentationClass , resultCode , results ) ; } catch ( android.os.RemoteException e ) { } } app.instrumentationWatcher = null ; app.instrumentationClass = null ; app.instrumentationInfo = null ; app.instrumentationProfileFile = null ; app.instrumentationArguments = null ; uninstallPackageLocked ( app.processName , ( - 1 ) , false ) ; }

Target:
void finishInstrumentationLocked ( com.android.server.am.ProcessRecord app , int resultCode , android.os.Bundle results ) { if ( ( app.instrumentationWatcher ) != null ) { try { app.instrumentationWatcher.instrumentationFinished ( app.instrumentationClass , resultCode , results ) ; } catch ( android.os.RemoteException e ) { } } app.instrumentationWatcher = null ; app.instrumentationClass = null ; app.instrumentationInfo = null ; app.instrumentationProfileFile = null ; app.instrumentationArguments = null ; forceStopPackageLocked ( app.processName , ( - 1 ) , false , false , true ) ; }
Source:
public void onDismiss ( android.content.DialogInterface dialog ) { super . onDismiss ( dialog ) ; ( ( com.android.packageinstaller.UninstallerActivity ) ( getActivity ( ) ) ) . dispatchAborted ( ) ; getActivity ( ) . setResult ( Activity.RESULT_FIRST_USER ) ; getActivity ( ) . finish ( ) ; }

Target:
public void onDismiss ( android.content.DialogInterface dialog ) { super . onDismiss ( dialog ) ; if ( isAdded ( ) ) { ( ( com.android.packageinstaller.UninstallerActivity ) ( getActivity ( ) ) ) . dispatchAborted ( ) ; getActivity ( ) . setResult ( Activity.RESULT_FIRST_USER ) ; getActivity ( ) . finish ( ) ; } }
Source:
public static boolean isAvailable ( ) { return ( com.intellij.openapi.util.registry.Registry.is ( "ide.new.welcome.screen" ) ) && ( ( ( ( ( com.intellij.util.PlatformUtils.isIntelliJ ( ) ) || ( com.intellij.util.PlatformUtils.isCidr ( ) ) ) || ( com.intellij.util.PlatformUtils.isWebStorm ( ) ) ) || ( com.intellij.util.PlatformUtils.isPyCharm ( ) ) ) || ( com.intellij.util.PlatformUtils.isRubyMine ( ) ) ) ; }

Target:
public static boolean isAvailable ( ) { return ( com.intellij.openapi.util.registry.Registry.is ( "ide.new.welcome.screen" ) ) && ( ( ( ( ( ( com.intellij.util.PlatformUtils.isIntelliJ ( ) ) || ( com.intellij.util.PlatformUtils.isCidr ( ) ) ) || ( com.intellij.util.PlatformUtils.isWebStorm ( ) ) ) || ( com.intellij.util.PlatformUtils.isPyCharm ( ) ) ) || ( com.intellij.util.PlatformUtils.isRubyMine ( ) ) ) || ( com.intellij.util.PlatformUtils.isPhpStorm ( ) ) ) ; }
Source:
public void testGetDeviceId ( ) { java.lang.String deviceId = mTelephonyManager.getDeviceId ( ) ; int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : android.telephony.cts.TelephonyManagerTest.assertImeiDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : android.telephony.cts.TelephonyManagerTest.assertMeidDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertNull ( deviceId ) ; assertHardwareId ( ) ; assertMacAddressReported ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }

Target:
public void testGetDeviceId ( ) { java.lang.String deviceId = mTelephonyManager.getDeviceId ( ) ; int phoneType = mTelephonyManager.getPhoneType ( ) ; switch ( phoneType ) { case android.telephony.TelephonyManager.PHONE_TYPE_GSM : android.telephony.cts.TelephonyManagerTest.assertImeiDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_CDMA : android.telephony.cts.TelephonyManagerTest.assertCdmaDeviceId ( deviceId ) ; break ; case android.telephony.TelephonyManager.PHONE_TYPE_NONE : assertNull ( deviceId ) ; assertHardwareId ( ) ; assertMacAddressReported ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Did you add a new phone type? " + phoneType ) ) ; } }
Source:
public int read ( byte [ ] buf , int off , int nbytes ) throws java.io.IOException { int x = in.read ( buf , off , nbytes ) ; if ( x != ( - 1 ) ) { check.update ( buf , off , x ) ; } return x ; }

Target:
public int read ( byte [ ] buffer , int byteOffset , int byteCount ) throws java.io.IOException { int bytesRead = in.read ( buffer , byteOffset , byteCount ) ; if ( bytesRead != ( - 1 ) ) { check.update ( buffer , byteOffset , bytesRead ) ; } return bytesRead ; }
Source:
public void parseCacheHeaders_noHeaders ( ) { com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEquals ( 0 , entry.serverDate ) ; assertEquals ( 0 , entry.ttl ) ; assertEquals ( 0 , entry.softTtl ) ; }

Target:
public void parseCacheHeaders_noHeaders ( ) { com.android.volley.Cache.Entry entry = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders ( response ) ; assertNotNull ( entry ) ; assertNull ( entry.etag ) ; assertEquals ( 0 , entry.serverDate ) ; assertEquals ( 0 , entry.lastModified ) ; assertEquals ( 0 , entry.ttl ) ; assertEquals ( 0 , entry.softTtl ) ; }
Source:
private void broadcastAlphaMessage ( java.lang.String alphaString ) { com.android.internal.telephony.cat.CatLog.d ( this , ( "Broadcasting CAT Alpha message from card: " + alphaString ) ) ; android.content.Intent intent = new android.content.Intent ( AppInterface.CAT_ALPHA_NOTIFY_ACTION ) ; intent.addFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.putExtra ( AppInterface.ALPHA_STRING , alphaString ) ; intent.putExtra ( "SLOT_ID" , mSlotId ) ; mContext.sendBroadcast ( intent , AppInterface.STK_PERMISSION ) ; }

Target:
private void broadcastAlphaMessage ( java.lang.String alphaString ) { com.android.internal.telephony.cat.CatLog.d ( this , ( "Broadcasting CAT Alpha message from card: " + alphaString ) ) ; android.content.Intent intent = new android.content.Intent ( AppInterface.CAT_ALPHA_NOTIFY_ACTION ) ; intent.addFlags ( Intent.FLAG_RECEIVER_FOREGROUND ) ; intent.putExtra ( AppInterface.ALPHA_STRING , alphaString ) ; intent.putExtra ( "SLOT_ID" , mSlotId ) ; intent.setComponent ( com.android.internal.telephony.cat.AppInterface.getDefaultSTKApplication ( ) ) ; mContext.sendBroadcast ( intent , AppInterface.STK_PERMISSION ) ; }
Source:
public java.util.Collection < com.android.build.gradle.internal.test.report.TestResult > getTestResults ( ) { return results ; }

Target:
public com.android.build.gradle.internal.test.report.TestResult addTest ( java.lang.String testName , long duration , java.lang.String device , java.lang.String project , java.lang.String flavor ) { com.android.build.gradle.internal.test.report.TestResult test = new com.android.build.gradle.internal.test.report.TestResult ( testName , duration , device , project , flavor , this ) ; results.add ( test ) ; addDevice ( device , test ) ; addVariant ( project , flavor , test ) ; return addTest ( test ) ; }
Source:
public void onExtrasChanged ( java.lang.String callId , android.os.Bundle extras ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = callId ; args.arg2 = extras ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_ON_EXTRAS_CHANGED , args ) . sendToTarget ( ) ; }

Target:
public void onExtrasChanged ( java.lang.String callId , android.os.Bundle extras , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , android.telecom.ConnectionService.SESSION_EXTRAS_CHANGED ) ; try { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = callId ; args.arg2 = extras ; args.arg3 = android.telecom.Log.createSubsession ( ) ; mHandler.obtainMessage ( android.telecom.ConnectionService.MSG_ON_EXTRAS_CHANGED , args ) . sendToTarget ( ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
private void writeObject ( java.io.ObjectOutputStream stream ) throws java.io.IOException { if ( key.isEngineBased ( ) ) { throw new java.io.NotSerializableException ( "engine-based keys can not be serialized" ) ; } stream.defaultWriteObject ( ) ; stream.writeObject ( getParams ( ) ) ; final java.security.spec.ECPoint pubKey = getPublicKey ( ) ; stream.writeObject ( pubKey.getAffineX ( ) ) ; stream.writeObject ( pubKey.getAffineY ( ) ) ; }

Target:
private void writeObject ( java.io.ObjectOutputStream stream ) throws java.io.IOException { if ( key.isEngineBased ( ) ) { throw new java.io.NotSerializableException ( "engine-based keys can not be serialized" ) ; } stream.defaultWriteObject ( ) ; stream.writeObject ( getEncoded ( ) ) ; }
Source:
public int getFeatureStatus ( int slotId , int featureType ) throws android.os.RemoteException { int status = android.telephony.ims.feature.ImsFeature.STATE_NOT_AVAILABLE ; synchronized ( mFeatures ) { android.util.SparseArray < android.telephony.ims.feature.ImsFeature > featureMap = mFeatures.get ( slotId ) ; if ( featureMap != null ) { android.telephony.ims.feature.ImsFeature feature = getImsFeatureFromType ( featureMap , featureType ) ; if ( feature != null ) { status = feature.getFeatureState ( ) ; } } } return status ; }

Target:
public int getFeatureStatus ( int slotId , int featureType ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "getFeatureStatus" ) ; int status = android.telephony.ims.feature.ImsFeature.STATE_NOT_AVAILABLE ; synchronized ( mFeatures ) { android.util.SparseArray < android.telephony.ims.feature.ImsFeature > featureMap = mFeatures.get ( slotId ) ; if ( featureMap != null ) { android.telephony.ims.feature.ImsFeature feature = getImsFeatureFromType ( featureMap , featureType ) ; if ( feature != null ) { status = feature.getFeatureState ( ) ; } } } return status ; }
Source:
public boolean isAnnotationPresent ( java.lang.Class < ? extends java.lang.annotation.Annotation > annotationType ) { return libcore.reflect.AnnotationAccess.isAnnotationPresent ( this , annotationType ) ; }

Target:
public boolean isAnnotationPresent ( java.lang.Class < ? extends java.lang.annotation.Annotation > annotationType ) { if ( annotationType == null ) { throw new java.lang.NullPointerException ( "annotationType == null" ) ; } if ( isDeclaredAnnotationPresent ( annotationType ) ) { return true ; } if ( annotationType.isDeclaredAnnotationPresent ( java.lang.annotation.Inherited.class ) ) { for ( java.lang.Class < ? > sup = getSuperclass ( ) ; sup != null ; sup = sup.getSuperclass ( ) ) { if ( sup.isDeclaredAnnotationPresent ( annotationType ) ) { return true ; } } } return false ; }
Source:
public void updateUpstreamNetworkState ( android.net.NetworkState ns ) { if ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.VDBG ) { android.util.Log.d ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.TAG , ( "updateUpstreamNetworkState: " + ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.toDebugString ( ns ) ) ) ) ; } if ( ! ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.canTetherIPv6 ( ns ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; setUpstreamNetworkState ( null ) ; return ; } if ( ( ( mUpstreamNetworkState ) != null ) && ( ! ( ns.network.equals ( mUpstreamNetworkState.network ) ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; } setUpstreamNetworkState ( ns ) ; updateIPv6TetheringInterfaces ( ) ; }

Target:
public void updateUpstreamNetworkState ( android.net.NetworkState ns ) { if ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.VDBG ) { android.util.Log.d ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.TAG , ( "updateUpstreamNetworkState: " + ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.toDebugString ( ns ) ) ) ) ; } if ( ! ( com.android.server.connectivity.tethering.IPv6TetheringCoordinator.canTetherIPv6 ( ns , mLog ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; setUpstreamNetworkState ( null ) ; return ; } if ( ( ( mUpstreamNetworkState ) != null ) && ( ! ( ns.network.equals ( mUpstreamNetworkState.network ) ) ) ) { stopIPv6TetheringOnAllInterfaces ( ) ; } setUpstreamNetworkState ( ns ) ; updateIPv6TetheringInterfaces ( ) ; }
Source:
public com.android.jill.api.v01.Cli01TranslationTask getTask ( @ javax.annotation.Nonnull java.lang.String [ ] args ) throws com.android.jill.api.v01.ConfigurationException { try { com.android.jill.Options options = com.android.jill.Main.getOptions ( args ) ; options.setStandardError ( standardError ) ; options.setWorkingDirectory ( workingDirectory ) ; return new com.android.jill.api.v01.impl.Cli01ConfigImpl.Cli01TranslationTaskImpl ( options ) ; } catch ( org.kohsuke.args4j.CmdLineException e ) { throw new com.android.jill.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } catch ( java.io.IOException e ) { throw new com.android.jill.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.jill.api.v01.Cli01TranslationTask getTask ( @ javax.annotation.Nonnull java.lang.String [ ] args ) throws com.android.jill.api.v01.ConfigurationException { try { com.android.jill.Options options = com.android.jill.Main.getOptions ( args ) ; options.setStandardError ( standardError ) ; options.setWorkingDirectory ( workingDirectory ) ; return new com.android.jill.api.v01.impl.Cli01ConfigImpl.Cli01TranslationTaskImpl ( options ) ; } catch ( org.kohsuke.args4j.CmdLineException e ) { throw new com.android.jill.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } catch ( java.io.IOException | com.android.sched.util.file.WithLocationIOException e ) { throw new com.android.jill.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } }
Source:
private static java.lang.String getBinaryName ( com.android.build.gradle.managed.BuildType buildType , com.android.build.gradle.internal.ProductFlavorCombo flavorCombo ) { if ( flavorCombo.flavorList.isEmpty ( ) ) { return buildType.name ; } else { return ( flavorCombo.name ) + ( buildType.name.capitalize ( ) ) ; } }

Target:
private static java.lang.String getBinaryName ( com.android.build.gradle.managed.BuildType buildType , com.android.build.gradle.internal.ProductFlavorCombo flavorCombo ) { if ( flavorCombo.getFlavorList ( ) . isEmpty ( ) ) { return buildType.getName ( ) ; } else { return ( flavorCombo.getName ( ) ) + ( com.android.utils.StringHelper.capitalize ( buildType.getName ( ) ) ) ; } }