auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.internal.telephony.CallerInfoAsyncQuery startQuery ( int token , android.content.Context context , java.lang.String number , com.android.internal.telephony.CallerInfoAsyncQuery.OnQueryCompleteListener listener , java.lang.Object cookie ) { com.android.server.telecom.Log.i ( com.android.server.telecom.TelecomSystem.getInstance ( ) , "CallerInfoAsyncQuery.startQuery number=%s cookie=%s" , com.android.server.telecom.Log.pii ( number ) , cookie ) ; return com.android.internal.telephony.CallerInfoAsyncQuery.startQuery ( token , context , number , listener , cookie ) ; }

Target:
public com.android.internal.telephony.CallerInfoAsyncQuery startQuery ( int token , android.content.Context context , java.lang.String number , com.android.internal.telephony.CallerInfoAsyncQuery.OnQueryCompleteListener listener , java.lang.Object cookie ) { android.telecom.Log.i ( com.android.server.telecom.TelecomSystem.getInstance ( ) , "CallerInfoAsyncQuery.startQuery number=%s cookie=%s" , android.telecom.Log.pii ( number ) , cookie ) ; return com.android.internal.telephony.CallerInfoAsyncQuery.startQuery ( token , context , number , listener , cookie ) ; }
Source:
public void callDropFeedbackPaint ( com.android.ide.common.api.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.DropFeedback feedback ) { if ( ( ( gc != null ) && ( feedback != null ) ) && ( ( feedback.painter ) != null ) ) { try { feedback.painter.paint ( gc , targetNode , feedback ) ; } catch ( java.lang.Exception e ) { logError ( "DropFeedback.painter failed: %s" , e.toString ( ) ) ; } } }

Target:
public void callDropFeedbackPaint ( com.android.ide.common.api.IGraphics gc , com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.DropFeedback feedback ) { if ( ( ( gc != null ) && ( feedback != null ) ) && ( ( feedback.painter ) != null ) ) { try { feedback.painter.paint ( gc , targetNode , feedback ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "DropFeedback.painter failed: %s" , e.toString ( ) ) ; } } }
Source:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; assertEquals ( "ALPN should not enable cutthrough on the client" , 0 , ( ( org.conscrypt.NativeCrypto.SSL_get_mode ( ssl ) ) & ( org.conscrypt.NativeCrypto.SSL_MODE_HANDSHAKE_CUTTHROUGH ) ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { byte [ ] negotiated = org.conscrypt.NativeCrypto.SSL_get0_alpn_selected ( ssl ) ; assertEquals ( "spdy/2" , new java.lang.String ( negotiated ) ) ; assertEquals ( "ALPN should not enable cutthrough on the client" , 0 , ( ( org.conscrypt.NativeCrypto.SSL_get_mode ( ssl ) ) & ( org.conscrypt.NativeConstants.SSL_MODE_HANDSHAKE_CUTTHROUGH ) ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }
Source:
public void finishAndRemoveTask ( ) { checkCaller ( ) ; synchronized ( this ) { long origId = android.os.Binder.clearCallingIdentity ( ) ; try { if ( ! ( removeTaskByIdLocked ( mTaskId , false ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Unable to find task ID " + ( mTaskId ) ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }

Target:
public void finishAndRemoveTask ( ) { checkCaller ( ) ; synchronized ( this ) { long origId = android.os.Binder.clearCallingIdentity ( ) ; try { if ( ! ( removeTaskByIdLocked ( mTaskId , false , com.android.server.am.ActivityManagerService.REMOVE_FROM_RECENTS ) ) ) { throw new java.lang.IllegalArgumentException ( ( "Unable to find task ID " + ( mTaskId ) ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } } }
Source:
public boolean equals ( @ javax.annotation.Nullable java.lang.Object obj ) { if ( obj == ( this ) ) { return true ; } else if ( obj instanceof com.google.common.collect.Table ) { com.google.common.collect.Table < ? , ? , ? > that = ( ( com.google.common.collect.Table < ? , ? , ? > ) ( obj ) ) ; return this . cellSet ( ) . equals ( that.cellSet ( ) ) ; } else { return false ; } }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object rowKey , @ javax.annotation.Nullable java.lang.Object columnKey ) { return ( get ( rowKey , columnKey ) ) != null ; }
Source:
public void testInnerInnerClass ( ) throws java.lang.NoSuchMethodException , java.lang.SecurityException { java.lang.reflect.Constructor < ? > constructor = com.android.jack.java8.parameter.test001.Tests.InnerClass.InnerInnerClass.class . getDeclaredConstructor ( com.android.jack.java8.parameter.test001.Tests.InnerClass.class , float . class ) ; junit.framework.Assert.assertEquals ( 2 , constructor.getParameters ( ) . length ) ; check ( constructor.getParameters ( ) [ 0 ] , "this$1" , true , true , false , ( ( com.android.jack.java8.parameter.test001.Tests.MODIFIER_FINAL ) | ( com.android.jack.java8.parameter.test001.Tests.MODIFIER_IMPLICIT ) ) ) ; check ( constructor.getParameters ( ) [ 1 ] , "f" , true , false , false , com.android.jack.java8.parameter.test001.Tests.MODIFIER_NONE ) ; }

Target:
public void testLocalClass ( ) throws java.lang.NoSuchMethodException , java.lang.SecurityException { class Local { } java.lang.reflect.Constructor < ? > constructor = Local.class . getDeclaredConstructor ( com.android.jack.java8.parameter.test001.Tests.class ) ; junit.framework.Assert.assertEquals ( 1 , constructor.getParameters ( ) . length ) ; check ( constructor.getParameters ( ) [ 0 ] , "this$0" , true , true , false , ( ( com.android.jack.java8.parameter.common.ParameterTestModifier.MODIFIER_FINAL ) | ( com.android.jack.java8.parameter.common.ParameterTestModifier.MODIFIER_IMPLICIT ) ) ) ; }
Source:
private static void writeInt ( java.io.OutputStream os , int value ) throws java.lang.Exception { byte [ ] bytes = java.nio.ByteBuffer.allocate ( 4 ) . putInt ( value ) . array ( ) ; os.write ( bytes ) ; }

Target:
private libcore.util.ZoneInfo createZoneInfo ( java.lang.String name , long currentTimeMillis , byte [ ] bytes ) throws java.io.IOException { libcore.util.ZoneInfoTest.ByteBufferIterator bufferIterator = new libcore.util.ZoneInfoTest.ByteBufferIterator ( java.nio.ByteBuffer.wrap ( bytes ) ) ; return libcore.util.ZoneInfo.readTimeZone ( ( ( "TimeZone for '" + name ) + "'" ) , bufferIterator , currentTimeMillis ) ; }
Source:
private void compileCode ( java.lang.String packageName , java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input1 , java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input2 ) throws java.lang.Exception { boolean succ = true ; try { checkCompiledCode ( packageName , input1 ) ; } catch ( junit.framework.AssertionFailedError e ) { succ = false ; } if ( succ ) { return ; } succ = true ; try { checkCompiledCode ( packageName , input2 ) ; } catch ( junit.framework.AssertionFailedError e ) { succ = false ; } junit.framework.Assert.assertTrue ( succ ) ; }

Target:
private void compileCode ( java.lang.String packageName , java.util.Map < java.lang.String , com.android.jack.switchstatement.SwitchstatementTests.VerifierInfo > input ) throws java.lang.Exception { java.util.List < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > excludedToolchains = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > > ( 2 ) ; excludedToolchains.add ( com.android.jack.test.toolchain.JillBasedToolchain.class ) ; excludedToolchains.add ( com.android.jack.test.toolchain.IncrementalToolchain.class ) ; com.android.jack.test.toolchain.JackBasedToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackBasedToolchain.class , excludedToolchains ) ; checkCompiledCode ( toolchain , packageName , input ) ; }
Source:
public static void wtf ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = com.android.services.telephony.Log.buildMessage ( com.android.services.telephony.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ; android.util.Log.wtf ( com.android.services.telephony.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }

Target:
public static void v ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { android.telecom.Log.v ( prefix , format , args ) ; }
Source:
private boolean satisfiedByNetCapabilities ( android.net.NetworkCapabilities nc , boolean onlyImmutable ) { long networkCapabilities = this . mNetworkCapabilities ; if ( onlyImmutable ) { networkCapabilities = networkCapabilities & ( ~ ( android.net.NetworkCapabilities.MUTABLE_CAPABILITIES ) ) ; } return ( ( nc.mNetworkCapabilities ) & networkCapabilities ) == networkCapabilities ; }

Target:
private boolean satisfiedByNetCapabilities ( android.net.NetworkCapabilities nc , boolean onlyImmutable ) { long requestedCapabilities = mNetworkCapabilities ; long requestedUnwantedCapabilities = mUnwantedNetworkCapabilities ; long providedCapabilities = nc.mNetworkCapabilities ; if ( onlyImmutable ) { requestedCapabilities &= ~ ( android.net.NetworkCapabilities.MUTABLE_CAPABILITIES ) ; requestedUnwantedCapabilities &= ~ ( android.net.NetworkCapabilities.MUTABLE_CAPABILITIES ) ; } return ( ( providedCapabilities & requestedCapabilities ) == requestedCapabilities ) && ( ( requestedUnwantedCapabilities & providedCapabilities ) == 0 ) ; }
Source:
public int getCurrentPhoneTypeForSlot ( int slotId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getActivePhoneTypeForSlot ( slotId ) ; } else { return getPhoneTypeFromProperty ( slotId ) ; } } catch ( android.os.RemoteException ex ) { return getPhoneTypeFromProperty ( slotId ) ; } catch ( java.lang.NullPointerException ex ) { return getPhoneTypeFromProperty ( slotId ) ; } }

Target:
public int getCurrentPhoneTypeForSlot ( int slotIndex ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getActivePhoneTypeForSlot ( slotIndex ) ; } else { return getPhoneTypeFromProperty ( slotIndex ) ; } } catch ( android.os.RemoteException ex ) { return getPhoneTypeFromProperty ( slotIndex ) ; } catch ( java.lang.NullPointerException ex ) { return getPhoneTypeFromProperty ( slotIndex ) ; } }
Source:
public void testNoMerging ( ) throws java.lang.Exception { java.io.File master = getProjectDir ( "MasterProject" , "multiproject/main-manifest.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "/TESTROOT/LibraryProject/res/values/strings.xml:7: Warning: The resource R.string.string3 appears to be unused [UnusedResources]\n" + ( ( " <string name=\"string3\">String 3</string>\n" + " ~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }

Target:
public void testNoMerging ( ) throws java.lang.Exception { java.io.File master = getProjectDir ( "MasterProject" , "multiproject/main-manifest.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "/LibraryProject/res/values/strings.xml:7: Warning: The resource R.string.string3 appears to be unused [UnusedResources]\n" + ( ( " <string name=\"string3\">String 3</string>\n" + " ~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) . replace ( "/TESTROOT" , "" ) ) ; }
Source:
private javax.net.ssl.X509TrustManager trustManager ( java.security.cert.X509Certificate ca ) throws java.lang.Exception { java.security.KeyStore keyStore = libcore.java.security.TestKeyStore.createKeyStore ( ) ; keyStore.setCertificateEntry ( "alias" , ca ) ; java.lang.String algorithm = javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm ( ) ; javax.net.ssl.TrustManagerFactory tmf = javax.net.ssl.TrustManagerFactory.getInstance ( algorithm ) ; tmf.init ( keyStore ) ; return ( ( javax.net.ssl.X509TrustManager ) ( tmf.getTrustManagers ( ) [ 0 ] ) ) ; }

Target:
private javax.net.ssl.X509TrustManager trustManager ( java.security.cert.X509Certificate ca ) throws java.lang.Exception { java.security.KeyStore keyStore = libcore.java.security.TestKeyStore.createKeyStore ( ) ; keyStore.setCertificateEntry ( "alias" , ca ) ; return new org.conscrypt.TrustManagerImpl ( keyStore ) ; }
Source:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { try { return new com.android.sched.vfs.GenericOutputVFS ( new com.android.sched.vfs.DirectFS ( new com.android.sched.util.file.Directory ( context.getWorkingDirectory ( ) , string , context.getRunnableHooks ( ) , existence , permissions , change ) , permissions ) ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.vfs.VFS vfs = directFSCodec.checkString ( context , string ) ; return new com.android.sched.vfs.GenericOutputVFS ( vfs ) ; }
Source:
public void testStopStreaming ( ) throws java.lang.Exception { android.telephony.mbms.StreamingService streamingService = mStreamingSession.startStreaming ( CtsStreamingService.STREAMING_SERVICE_INFO , mStreamingServiceCallback , mCallbackHandler ) ; streamingService.stopStreaming ( ) ; java.util.List < java.util.List < java.lang.Object > > stopStreamingCalls = getMiddlewareCalls ( CtsStreamingService.METHOD_STOP_STREAMING ) ; assertEquals ( 1 , stopStreamingCalls.size ( ) ) ; assertEquals ( CtsStreamingService.STREAMING_SERVICE_INFO.getServiceId ( ) , stopStreamingCalls.get ( 0 ) . get ( 2 ) ) ; }

Target:
public void testStopStreaming ( ) throws java.lang.Exception { android.telephony.mbms.StreamingService streamingService = mStreamingSession.startStreaming ( CtsStreamingService.STREAMING_SERVICE_INFO , mCallbackExecutor , mStreamingServiceCallback ) ; streamingService.close ( ) ; java.util.List < java.util.List < java.lang.Object > > stopStreamingCalls = getMiddlewareCalls ( CtsStreamingService.METHOD_STOP_STREAMING ) ; assertEquals ( 1 , stopStreamingCalls.size ( ) ) ; assertEquals ( CtsStreamingService.STREAMING_SERVICE_INFO.getServiceId ( ) , stopStreamingCalls.get ( 0 ) . get ( 2 ) ) ; }
Source:
void removeClient ( com.android.ddmlib.Client client , boolean notify ) { mMonitor.addPortToAvailableList ( client.getDebuggerListenPort ( ) ) ; synchronized ( mClients ) { mClients.remove ( client ) ; } if ( notify ) { mMonitor.getServer ( ) . deviceChanged ( this , com.android.ddmlib.CHANGE_CLIENT_LIST ) ; } }

Target:
public com.android.ddmlib.Client [ ] getClients ( ) { synchronized ( mClients ) { return mClients.toArray ( new com.android.ddmlib.Client [ mClients.size ( ) ] ) ; } }
Source:
public byte [ ] decryptPreMasterSecret ( byte [ ] encryptedPreMasterSecret ) throws java.io.IOException { org.bouncycastle.crypto.encodings.PKCS1Encoding encoding = new org.bouncycastle.crypto.encodings.PKCS1Encoding ( new org.bouncycastle.crypto.engines.RSABlindedEngine ( ) ) ; encoding.init ( false , new org.bouncycastle.crypto.params.ParametersWithRandom ( this . privateKey , context.getSecureRandom ( ) ) ) ; try { return encoding.processBlock ( encryptedPreMasterSecret , 0 , encryptedPreMasterSecret.length ) ; } catch ( org.bouncycastle.crypto.InvalidCipherTextException e ) { throw new org.bouncycastle.crypto.tls.TlsFatalAlert ( AlertDescription.illegal_parameter ) ; } }

Target:
public byte [ ] decryptPreMasterSecret ( byte [ ] encryptedPreMasterSecret ) throws java.io.IOException { return org.bouncycastle.crypto.tls.TlsRSAUtils.safeDecryptPreMasterSecret ( context , ( ( org.bouncycastle.crypto.params.RSAKeyParameters ) ( privateKey ) ) , encryptedPreMasterSecret ) ; }
Source:
private void createAllPdpList ( ) { pdpList = new java.util.ArrayList < com.android.internal.telephony.DataConnection > ( ) ; com.android.internal.telephony.DataConnection pdp ; for ( int i = 0 ; i < ( com.android.internal.telephony.gsm.GsmDataConnectionTracker.PDP_CONNECTION_POOL_SIZE ) ; i ++ ) { pdp = new com.android.internal.telephony.gsm.PdpConnection ( mGsmPhone ) ; pdpList.add ( pdp ) ; } }

Target:
private void createAllPdpList ( ) { pdpList = new java.util.ArrayList < com.android.internal.telephony.DataConnection > ( ) ; com.android.internal.telephony.DataConnection pdp ; for ( int i = 0 ; i < ( com.android.internal.telephony.gsm.GsmDataConnectionTracker.PDP_CONNECTION_POOL_SIZE ) ; i ++ ) { pdp = com.android.internal.telephony.gsm.GsmDataConnection.makeDataConnection ( mGsmPhone ) ; pdpList.add ( pdp ) ; } }
Source:
public void setStreamVolume ( int streamType , int index , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.setMasterVolume ( index , flags , mApplicationContext.getOpPackageName ( ) ) ; } else { service.setStreamVolume ( streamType , index , flags , mApplicationContext.getOpPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in setStreamVolume" , e ) ; } }

Target:
public void setStreamVolume ( int streamType , int index , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.setMasterVolume ( index , flags , getContext ( ) . getOpPackageName ( ) ) ; } else { service.setStreamVolume ( streamType , index , flags , getContext ( ) . getOpPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in setStreamVolume" , e ) ; } }
Source:
public void test_init_limitting_to_1method_and_run_for_SimpleTest2_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.lang.String actionName = "actionName" ; runner.init ( monitor , actionName , "testSimple2" , target , skipPastReference , testEnvironment , 0 , false ) ; runner.run ( "" , null , null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple2" ) , actionName ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_limiting_to_1method_and_run_for_SimpleTest2_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest2.class ; java.lang.String actionName = "actionName" ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , actionName , "testSimple2" , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple2" ) , actionName ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { return mHeaps.get ( id ) ; }

Target:
public com.android.tools.perflib.heap.Heap getHeap ( int id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { if ( ( mHeaps.get ( i ) . getId ( ) ) == id ) { return mHeaps.get ( i ) ; } } return null ; }
Source:
private void setAndBroadcastNetworkSetTime ( long time ) { if ( DBG ) log ( ( ( "setAndBroadcastNetworkSetTime: time=" + time ) + "ms" ) ) ; android.os.SystemClock.setCurrentTimeMillis ( time ) ; android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_NETWORK_SET_TIME ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time" , time ) ; phone.getContext ( ) . sendStickyBroadcast ( intent ) ; }

Target:
private void setAndBroadcastNetworkSetTimeZone ( java.lang.String zoneId ) { if ( DBG ) log ( ( "setAndBroadcastNetworkSetTimeZone: setTimeZone=" + zoneId ) ) ; android.app.AlarmManager alarm = ( ( android.app.AlarmManager ) ( phone.getContext ( ) . getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarm.setTimeZone ( zoneId ) ; android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time-zone" , zoneId ) ; phone.getContext ( ) . sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }
Source:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . notifyFeatureRemoved ( org.mockito.Matchers.eq ( 0 ) ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . removeImsFeatureStatusCallback ( mTestCallback ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getImsFeatureMap ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( mTestImsService.getImsFeatureFromType ( features , ImsFeature.MMTEL ) ) ; }

Target:
public void testRemoveMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createMMTelFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , mTestCallback ) ; mTestImsServiceBinder.removeImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . onFeatureRemoved ( ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . removeImsFeatureStatusCallback ( mTestCallback ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getFeatures ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertNull ( features.get ( ImsFeature.MMTEL ) ) ; }
Source:
public android.drm.DrmInfoStatus processDrmInfo ( android.drm.DrmInfo drmInfo ) { if ( ( null == drmInfo ) || ( ! ( drmInfo.isValid ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given drmInfo is invalid/null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _processDrmInfo ( mUniqueId , drmInfo ) ; }

Target:
public java.lang.String getOriginalMimeType ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _getOriginalMimeType ( mUniqueId , path ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { Main.byteToLong ( ) ; Main.shortToLong ( ) ; Main.intToLong ( ) ; Main.charToLong ( ) ; Main.longToInt ( ) ; Main.shortToByte ( ) ; Main.intToByte ( ) ; Main.charToByte ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { Main.byteToLong ( ) ; Main.shortToLong ( ) ; Main.intToLong ( ) ; Main.charToLong ( ) ; Main.longToInt ( ) ; Main.shortToByte ( ) ; Main.intToByte ( ) ; Main.charToByte ( ) ; Main.byteToChar ( ) ; Main.shortToChar ( ) ; Main.intToChar ( ) ; }
Source:
public void TestBug11635 ( ) { java.lang.String identifier = android.icu.impl.Utility.unescape ( "ABC\\U0001D7CF\\U0001D7D0\\U0001D7D1" ) ; android.icu.text.IdentifierInfo idInfo = new android.icu.text.IdentifierInfo ( ) ; idInfo.setIdentifier ( identifier ) ; assertEquals ( "" , RestrictionLevel.SINGLE_SCRIPT_RESTRICTIVE , idInfo.getRestrictionLevel ( ) ) ; }

Target:
public void TestBug11635 ( ) { java.lang.String identifier = android.icu.impl.Utility.unescape ( "ABC\\U0001D7CF\\U0001D7D0\\U0001D7D1" ) ; android.icu.text.SpoofChecker.CheckResult checkResult = new android.icu.text.SpoofChecker.CheckResult ( ) ; android.icu.text.SpoofChecker sc = new android.icu.text.SpoofChecker.Builder ( ) . setChecks ( SpoofChecker.RESTRICTION_LEVEL ) . build ( ) ; sc.failsChecks ( identifier , checkResult ) ; assertEquals ( "" , RestrictionLevel.SINGLE_SCRIPT_RESTRICTIVE , checkResult.restrictionLevel ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ( obj instanceof android.net.NetworkCapabilities ) == false ) ) return false ; android.net.NetworkCapabilities that = ( ( android.net.NetworkCapabilities ) ( obj ) ) ; return ( ( ( ( equalsNetCapabilities ( that ) ) && ( equalsTransportTypes ( that ) ) ) && ( equalsLinkBandwidths ( that ) ) ) && ( equalsSignalStrength ( that ) ) ) && ( equalsSpecifier ( that ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ( obj instanceof android.net.NetworkCapabilities ) == false ) ) return false ; android.net.NetworkCapabilities that = ( ( android.net.NetworkCapabilities ) ( obj ) ) ; return ( ( ( ( ( equalsNetCapabilities ( that ) ) && ( equalsTransportTypes ( that ) ) ) && ( equalsLinkBandwidths ( that ) ) ) && ( equalsSignalStrength ( that ) ) ) && ( equalsSpecifier ( that ) ) ) && ( equalsUids ( that ) ) ; }
Source:
private void waitUninterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard , boolean signalBeforeWaiting ) { if ( ! ( guard.isSatisfied ( ) ) ) { if ( signalBeforeWaiting ) { signalConditionsOfSatisfiedGuards ( null ) ; } incrementWaiters ( guard ) ; try { final java.util.concurrent.locks.Condition condition = guard.condition ; do { condition.awaitUninterruptibly ( ) ; } while ( ! ( guard.isSatisfied ( ) ) ) ; } finally { decrementWaiters ( guard ) ; } } }

Target:
private void await ( com.google.common.util.concurrent.Monitor.Guard guard , boolean signalBeforeWaiting ) throws java.lang.InterruptedException { if ( signalBeforeWaiting ) { signalNextWaiter ( ) ; } beginWaitingFor ( guard ) ; try { do { guard.condition.await ( ) ; } while ( ! ( guard.isSatisfied ( ) ) ) ; } finally { endWaitingFor ( guard ) ; } }
Source:
com.android.server.wifi.WifiConfigManager getWifiConfigManager ( ) { com.android.server.wifi.WifiConfigManager wifiConfigManager = mock ( com.android.server.wifi.WifiConfigManager.class ) ; when ( wifiConfigManager.getLastSelectedNetwork ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; return wifiConfigManager ; }

Target:
private void setupWifiInfo ( ) { when ( mWifiInfo.is24GHz ( ) ) . thenReturn ( true ) ; when ( mWifiInfo.is5GHz ( ) ) . thenReturn ( false ) ; when ( mWifiInfo.getRssi ( ) ) . thenReturn ( ( - 70 ) ) ; when ( mWifiInfo.getNetworkId ( ) ) . thenReturn ( WifiConfiguration.INVALID_NETWORK_ID ) ; when ( mWifiInfo.getBSSID ( ) ) . thenReturn ( null ) ; }
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 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:
protected android.view.View getVideoLoadingProgressView ( ) { org.chromium.content.common.TraceEvent.begin ( ) ; android.view.View result ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "getVideoLoadingProgressView" ) ; result = mWebChromeClient.getVideoLoadingProgressView ( ) ; } else { result = null ; } org.chromium.content.common.TraceEvent.end ( ) ; return result ; }

Target:
protected android.view.View getVideoLoadingProgressView ( ) { org.chromium.base.TraceEvent.begin ( ) ; android.view.View result ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "getVideoLoadingProgressView" ) ; result = mWebChromeClient.getVideoLoadingProgressView ( ) ; } else { result = null ; } org.chromium.base.TraceEvent.end ( ) ; return result ; }
Source:
public void setPreferredVoicePrivacy ( boolean enable , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE , result ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( enable ? 1 : 0 ) ) ; send ( rr ) ; }

Target:
public void separateConnection ( int gsmIndex , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SEPARATE_CONNECTION , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + gsmIndex ) ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( gsmIndex ) ; send ( rr ) ; }
Source:
public void onServiceDisconnected ( int profile ) { com.android.server.telecom.Log.startSession ( "BMSL.oSD" ) ; try { mBluetoothHeadset = null ; com.android.server.telecom.Log.v ( this , ( "Lost BluetoothHeadset: " + ( mBluetoothHeadset ) ) ) ; updateListenerOfBluetoothState ( false ) ; } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void onServiceDisconnected ( int profile ) { android.telecom.Log.startSession ( "BMSL.oSD" ) ; try { mBluetoothHeadset = null ; android.telecom.Log.v ( this , ( "Lost BluetoothHeadset: " + ( mBluetoothHeadset ) ) ) ; updateListenerOfBluetoothState ( false ) ; } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void onServiceDisconnected ( int profile ) { android.telecom.Log.startSession ( "BMSL.oSD" ) ; try { synchronized ( mLock ) { mBluetoothHeadsetService = null ; android.telecom.Log.i ( this , "Lost BluetoothHeadset service." ) ; } } finally { android.telecom.Log.endSession ( ) ; } }

Target:
public void onServiceDisconnected ( int profile ) { android.telecom.Log.startSession ( "BMSL.oSD" ) ; try { synchronized ( mLock ) { mBluetoothHeadsetService = null ; android.telecom.Log.i ( this , ( "Lost BluetoothHeadset service. " + "Removing all tracked devices." ) ) ; java.util.List < android.bluetooth.BluetoothDevice > devicesToRemove = new java.util.LinkedList ( mConnectedDevicesByAddress.values ( ) ) ; mConnectedDevicesByAddress.clear ( ) ; for ( android.bluetooth.BluetoothDevice device : devicesToRemove ) { mBluetoothRouteManager.onDeviceLost ( device ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public java.nio.channels.FileChannel position ( long newPosition ) throws java.io.IOException { checkOpen ( ) ; if ( newPosition < 0 ) { throw new java.lang.IllegalArgumentException ( ( "position: " + newPosition ) ) ; } try { Libcore.os.lseek ( fd , newPosition , java.nio.SEEK_SET ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } return this ; }

Target:
public java.nio.channels.FileChannel position ( long newPosition ) throws java.io.IOException { checkOpen ( ) ; if ( newPosition < 0 ) { throw new java.lang.IllegalArgumentException ( ( "position: " + newPosition ) ) ; } try { Libcore.os.lseek ( fd , newPosition , java.nio.SEEK_SET ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } return this ; }
Source:
void visit ( java.lang.Package pkg ) { if ( ( ( mFindMaxApi ) && ( pkg instanceof com.android.sdklib.internal.repository.PlatformPackage ) ) && ( ! ( pkg.isLocal ( ) ) ) ) { com.android.sdklib.internal.repository.PlatformPackage pp = ( ( com.android.sdklib.internal.repository.PlatformPackage ) ( pkg ) ) ; com.android.sdklib.AndroidVersion v = pp.getVersion ( ) ; if ( ! ( v.isPreview ( ) ) ) { int api = v.getApiLevel ( ) ; if ( api > ( mApiLevel ) ) { mApiLevel = api ; } } } }

Target:
void visit ( java.lang.Package pkg ) { if ( ( ( mFindMaxApi ) && ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformPackage ) ) && ( ! ( pkg.isLocal ( ) ) ) ) { com.android.sdklib.internal.repository.packages.PlatformPackage pp = ( ( com.android.sdklib.internal.repository.packages.PlatformPackage ) ( pkg ) ) ; com.android.sdklib.AndroidVersion v = pp.getVersion ( ) ; if ( ! ( v.isPreview ( ) ) ) { int api = v.getApiLevel ( ) ; if ( api > ( mApiLevel ) ) { mApiLevel = api ; } } } }
Source:
public void logVerbose ( java.lang.String log ) { synchronized ( mLogText ) { mLogText.append ( "=> " ) . append ( log ) ; } }

Target:
public void log ( java.lang.String log ) { if ( acceptLog ( log ) ) { if ( ( mLog ) != null ) { mLog.printf ( " %1$s" , log ) ; } else { synchronized ( mLogText ) { mLogText.append ( " " ) . append ( log ) ; } } } }
Source:
public void invokeOemRilRequestStrings ( java.lang.String [ ] strings , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_OEM_HOOK_STRINGS , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeStringArray ( strings ) ; send ( rr ) ; }

Target:
public void getNetworkSelectionMode ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getNetworkSelectionMode ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getNetworkSelectionMode" , e ) ; } } }
Source:
public void onCanAddCallChanged ( boolean canAddCall ) { if ( ! ( mInCallServices.isEmpty ( ) ) ) { com.android.server.telecom.Log.i ( this , "onCanAddCallChanged : %b" , canAddCall ) ; for ( com.android.internal.telecom.IInCallService inCallService : mInCallServices.values ( ) ) { try { inCallService.onCanAddCallChanged ( canAddCall ) ; } catch ( android.os.RemoteException ignored ) { } } } }

Target:
public void onCanAddCallChanged ( boolean canAddCall ) { if ( ! ( mInCallServices.isEmpty ( ) ) ) { android.telecom.Log.i ( this , "onCanAddCallChanged : %b" , canAddCall ) ; for ( com.android.internal.telecom.IInCallService inCallService : mInCallServices.values ( ) ) { try { inCallService.onCanAddCallChanged ( canAddCall ) ; } catch ( android.os.RemoteException ignored ) { } } } }
Source:
private static java.lang.String getNumberType ( android.content.res.Resources res , com.android.dialer.calllogutils.PhoneCallDetails details ) { if ( ( ( details.sourceType ) == ( ContactSource.Type.SOURCE_TYPE_CNAP ) ) || ( ( details.sourceType ) == ( ContactSource.Type.SOURCE_TYPE_CEQUINT_CALLER_ID ) ) ) { return "" ; } if ( ( ( details.numberType ) == ( android.provider.ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM ) ) && ( android.text.TextUtils.isEmpty ( details.numberLabel ) ) ) { return "" ; } return ( ( java.lang.String ) ( android.provider.ContactsContract.CommonDataKinds.Phone.getTypeLabel ( res , details.numberType , details.numberLabel ) ) ) ; }

Target:
private static java.lang.String getNumberType ( android.content.res.Resources res , com.android.dialer.calllogutils.PhoneCallDetails details ) { if ( ( ( details.sourceType ) == ( com.android.dialer.logging.ContactSource.Type.SOURCE_TYPE_CNAP ) ) || ( ( details.sourceType ) == ( com.android.dialer.logging.ContactSource.Type.SOURCE_TYPE_CEQUINT_CALLER_ID ) ) ) { return "" ; } if ( ( ( details.numberType ) == ( android.provider.ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM ) ) && ( android.text.TextUtils.isEmpty ( details.numberLabel ) ) ) { return "" ; } return ( ( java.lang.String ) ( android.provider.ContactsContract.CommonDataKinds.Phone.getTypeLabel ( res , details.numberType , details.numberLabel ) ) ) ; }
Source:
private static synchronized void initChannelIdKey ( ) throws java.lang.Exception { if ( ( org.conscrypt.NativeCryptoTest.CHANNEL_ID_PRIVATE_KEY ) != null ) { return ; } org.conscrypt.OpenSSLECGroupContext openSslSpec = org.conscrypt.OpenSSLECGroupContext.getCurveByName ( "prime256v1" ) ; java.math.BigInteger s = new java.math.BigInteger ( "229cdbbf489aea584828a261a23f9ff8b0f66f7ccac98bf2096ab3aee41497c5" , 16 ) ; org.conscrypt.NativeCryptoTest.CHANNEL_ID_PRIVATE_KEY = new org.conscrypt.OpenSSLECPrivateKey ( new java.security.spec.ECPrivateKeySpec ( s , openSslSpec.getECParameterSpec ( ) ) ) ; org.conscrypt.NativeCryptoTest.CHANNEL_ID = new java.math.BigInteger ( ( "702b07871fd7955c320b26f15e244e47eed60272124c92b9ebecf0b42f90069b" + "ab53592ebfeb4f167dbf3ce61513afb0e354c479b1c1b69874fa471293494f77" ) , 16 ) . toByteArray ( ) ; }

Target:
private static synchronized void initChannelIdKey ( ) throws java.lang.Exception { if ( ( org.conscrypt.NativeCryptoTest.CHANNEL_ID_PRIVATE_KEY ) != null ) { return ; } org.conscrypt.OpenSSLECGroupContext openSslSpec = org.conscrypt.OpenSSLECGroupContext.getCurveByName ( "prime256v1" ) ; java.math.BigInteger s = new java.math.BigInteger ( "229cdbbf489aea584828a261a23f9ff8b0f66f7ccac98bf2096ab3aee41497c5" , 16 ) ; org.conscrypt.NativeCryptoTest.CHANNEL_ID_PRIVATE_KEY = new org.conscrypt.OpenSSLECPrivateKey ( new java.security.spec.ECPrivateKeySpec ( s , openSslSpec.getECParameterSpec ( ) ) ) . getOpenSSLKey ( ) ; org.conscrypt.NativeCryptoTest.CHANNEL_ID = new java.math.BigInteger ( ( "702b07871fd7955c320b26f15e244e47eed60272124c92b9ebecf0b42f90069b" + "ab53592ebfeb4f167dbf3ce61513afb0e354c479b1c1b69874fa471293494f77" ) , 16 ) . toByteArray ( ) ; }
Source:
public void testWrongSeparator2 ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names) [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }

Target:
public void testInnerClass ( ) throws java.lang.Exception { mScopes = null ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:23: Error: Class referenced in the manifest, test.pkg.Foo.Baz, was not found in the project or the libraries [MissingRegistered]\n" ) + " <activity\n" ) + " ^\n" ) + "2 errors, 0 warnings\n" ) ) , lintProject ( "registration/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Foo.java.txt=>src/test/pkg/Foo.java" ) ) ; }
Source:
native void rsnAllocationElementData1D ( long con , long id , int xoff , int mip , int compIdx , byte [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationRead3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationRead3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }
Source:
public void writeOnImsCallHandoverEvent ( int phoneId , int eventType , com.android.ims.internal.ImsCallSession session , int srcAccessTech , int targetAccessTech , com.android.ims.ImsReasonInfo reasonInfo ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( eventType ) . setCallIndex ( getCallId ( session ) ) . setSrcAccessTech ( srcAccessTech ) . setTargetAccessTech ( targetAccessTech ) . setImsReasonInfo ( toImsReasonInfoProto ( reasonInfo ) ) ) ; } }

Target:
public void writeOnImsCallTerminated ( int phoneId , android.telephony.ims.ImsCallSession session , android.telephony.ims.ImsReasonInfo reasonInfo ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_CALL_TERMINATED ) . setCallIndex ( getCallId ( session ) ) . setImsReasonInfo ( toImsReasonInfoProto ( reasonInfo ) ) ) ; } }
Source:
private boolean isInvalidPackage ( java.lang.String owner ) { if ( ( owner.startsWith ( com.android.tools.lint.checks.InvalidPackageDetector.JAVA_PKG_PREFIX ) ) || ( owner.startsWith ( com.android.tools.lint.checks.InvalidPackageDetector.JAVAX_PKG_PREFIX ) ) ) { return ! ( mApiDatabase.isValidJavaPackage ( owner ) ) ; } return false ; }

Target:
private boolean isInvalidPackage ( java.lang.String owner ) { if ( owner.startsWith ( com.android.tools.lint.checks.InvalidPackageDetector.JAVA_PKG_PREFIX ) ) { return ! ( mApiDatabase.isValidJavaPackage ( owner ) ) ; } if ( owner.startsWith ( com.android.tools.lint.checks.InvalidPackageDetector.JAVAX_PKG_PREFIX ) ) { if ( ( owner.startsWith ( "javax/annotation/" ) ) || ( owner.startsWith ( "javax/lang/model" ) ) ) { return false ; } return ! ( mApiDatabase.isValidJavaPackage ( owner ) ) ; } return false ; }
Source:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ! ( versionSuffix.isEmpty ( ) ) ) ) { if ( versionName == null ) { if ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }

Target:
public int getVersionCode ( ) { int versionCode = ( ( mMergedFlavor.getVersionCode ( ) ) != null ) ? mMergedFlavor.getVersionCode ( ) : 1 ; if ( ( versionCode == ( - 1 ) ) && ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) ) { versionCode = getVersionCodeFromManifest ( ) ; } return versionCode ; }
Source:
private static void putStoredApkInfo ( android.content.Context context , long timeStamp , long crc , int totalDexNumber ) { android.content.SharedPreferences prefs = android.support.multidex.MultiDexExtractor.getMultiDexPreferences ( context ) ; android.content.SharedPreferences.Editor edit = prefs.edit ( ) ; edit.putLong ( android.support.multidex.MultiDexExtractor.KEY_TIME_STAMP , timeStamp ) ; edit.putLong ( android.support.multidex.MultiDexExtractor.KEY_CRC , crc ) ; edit.putInt ( android.support.multidex.MultiDexExtractor.KEY_DEX_NUMBER , totalDexNumber ) ; android.support.multidex.MultiDexExtractor.apply ( edit ) ; }

Target:
private static void putStoredApkInfo ( android.content.Context context , long timeStamp , long crc , int totalDexNumber ) { android.content.SharedPreferences prefs = android.support.multidex.MultiDexExtractor.getMultiDexPreferences ( context ) ; android.content.SharedPreferences.Editor edit = prefs.edit ( ) ; edit.putLong ( android.support.multidex.MultiDexExtractor.KEY_TIME_STAMP , timeStamp ) ; edit.putLong ( android.support.multidex.MultiDexExtractor.KEY_CRC , crc ) ; edit.putInt ( android.support.multidex.MultiDexExtractor.KEY_DEX_NUMBER , totalDexNumber ) ; edit.commit ( ) ; }
Source:
public static void assertArrayEquals ( java.lang.String message , byte [ ] expecteds , byte [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }

Target:
public static void assertArrayEquals ( java.lang.String message , short [ ] expecteds , short [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { org.junit.Assert.fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }
Source:
private boolean removeTaskByIdLocked ( int taskId , int flags ) { com.android.server.am.TaskRecord tr = recentTaskForIdLocked ( taskId ) ; if ( tr != null ) { tr.removeTaskActivitiesLocked ( ) ; cleanUpRemovedTaskLocked ( tr , flags ) ; if ( tr.isPersistable ) { notifyTaskPersisterLocked ( null , true ) ; } return true ; } return false ; }

Target:
private boolean removeTaskByIdLocked ( int taskId , boolean killProcess ) { com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId ) ; if ( tr != null ) { tr.removeTaskActivitiesLocked ( ) ; cleanUpRemovedTaskLocked ( tr , killProcess ) ; if ( tr.isPersistable ) { notifyTaskPersisterLocked ( null , true ) ; } return true ; } android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , ( "Request to remove task ignored for non-existent task " + taskId ) ) ; return false ; }