auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testIsCollected003 ( ) { synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; long invalidObjectID = 57005 ; org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket command = new org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket ( JDWPCommands.ObjectReferenceCommandSet.CommandSetID , JDWPCommands.ObjectReferenceCommandSet.IsCollectedCommand ) ; command.setNextValueAsObjectID ( invalidObjectID ) ; org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand ( command ) ; checkReplyPacket ( reply , org.apache.harmony.jpda.tests.jdwp.ObjectReference.IsCollectedTest.thisCommandName , JDWPConstants.Error.INVALID_OBJECT ) ; synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; }

Target:
public void testIsCollected_null ( ) { synchronizer.receiveMessage ( JPDADebuggeeSynchronizer.SGNL_READY ) ; org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket command = new org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket ( JDWPCommands.ObjectReferenceCommandSet.CommandSetID , JDWPCommands.ObjectReferenceCommandSet.IsCollectedCommand ) ; command.setNextValueAsObjectID ( JDWPTestConstants.NULL_OBJECT_ID ) ; org.apache.harmony.jpda.tests.framework.jdwp.ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand ( command ) ; checkReplyPacket ( reply , org.apache.harmony.jpda.tests.jdwp.ObjectReference.IsCollectedTest.thisCommandName , JDWPConstants.Error.INVALID_OBJECT ) ; synchronizer.sendMessage ( JPDADebuggeeSynchronizer.SGNL_CONTINUE ) ; }
Source:
public void set ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config , boolean nonFakeValuesOnly ) { if ( config != null ) { for ( int i = 0 ; i < ( com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.INDEX_COUNT ) ; i ++ ) { com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier q = config.mQualifiers [ i ] ; if ( ( ( nonFakeValuesOnly == false ) || ( q == null ) ) || ( ( q.hasFakeValue ( ) ) == false ) ) { mQualifiers [ i ] = q ; } } } }

Target:
public void set ( com.android.ide.common.resources.configuration.FolderConfiguration config , boolean nonFakeValuesOnly ) { if ( config != null ) { for ( int i = 0 ; i < ( com.android.ide.common.resources.configuration.FolderConfiguration.INDEX_COUNT ) ; i ++ ) { com.android.ide.common.resources.configuration.ResourceQualifier q = config.mQualifiers [ i ] ; if ( ( ( nonFakeValuesOnly == false ) || ( q == null ) ) || ( ( q.hasFakeValue ( ) ) == false ) ) { mQualifiers [ i ] = q ; } } } }
Source:
public void testMultiFilterWithMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "zzz" ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "foo" ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "foo" ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testAbiOnlyWithUniversalMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 3 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( match , result ) ; }
Source:
static boolean handleCharSequence ( android.content.Context context , java.lang.String input ) { com.android.dialer.oem.MotorolaHiddenMenuKeySequence.getInstance ( context ) ; if ( ! ( com.android.dialer.oem.MotorolaHiddenMenuKeySequence.featureHiddenMenuEnabled ) ) { return false ; } return ( com.android.dialer.oem.MotorolaHiddenMenuKeySequence.handleKeySequence ( context , input ) ) || ( com.android.dialer.oem.MotorolaHiddenMenuKeySequence.handleKeyPattern ( context , input ) ) ; }

Target:
static boolean handleCharSequence ( android.content.Context context , java.lang.String input ) { if ( ! ( com.android.dialer.oem.MotorolaHiddenMenuKeySequence.getInstance ( context ) . featureHiddenMenuEnabled ) ) { return false ; } return ( com.android.dialer.oem.MotorolaHiddenMenuKeySequence.handleKeySequence ( context , input ) ) || ( com.android.dialer.oem.MotorolaHiddenMenuKeySequence.handleKeyPattern ( context , input ) ) ; }
Source:
private long suggestHighestPriority ( ) { long highestPriority = ( com.android.tv.dvr.DvrScheduleManager.DEFAULT_PRIORITY ) - ( com.android.tv.dvr.DvrScheduleManager.PRIORITY_OFFSET ) ; for ( com.android.tv.dvr.ScheduledRecording schedule : mDataManager.getAllScheduledRecordings ( ) ) { if ( ( schedule.getPriority ( ) ) > highestPriority ) { highestPriority = schedule.getPriority ( ) ; } } return highestPriority + ( com.android.tv.dvr.DvrScheduleManager.PRIORITY_OFFSET ) ; }

Target:
private long suggestHighestPriority ( ) { long highestPriority = ( com.android.tv.dvr.DvrScheduleManager.DEFAULT_PRIORITY ) - ( com.android.tv.dvr.DvrScheduleManager.PRIORITY_OFFSET ) ; for ( com.android.tv.dvr.data.ScheduledRecording schedule : mDataManager.getAllScheduledRecordings ( ) ) { if ( ( schedule.getPriority ( ) ) > highestPriority ) { highestPriority = schedule.getPriority ( ) ; } } return highestPriority + ( com.android.tv.dvr.DvrScheduleManager.PRIORITY_OFFSET ) ; }
Source:
private void sendImsFeatureCreatedCallback ( int slot , int feature ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureListener > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureListener callbacks = i.next ( ) ; try { callbacks.imsFeatureCreated ( slot , feature ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureCreatedCallback: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }

Target:
private void sendImsFeatureCreatedCallback ( int slot , int feature ) { synchronized ( mLock ) { for ( java.util.Iterator < com.android.ims.internal.IImsServiceFeatureCallback > i = mImsStatusCallbacks.iterator ( ) ; i.hasNext ( ) ; ) { com.android.ims.internal.IImsServiceFeatureCallback callbacks = i.next ( ) ; try { callbacks.imsFeatureCreated ( slot , feature ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( ( "sendImsFeatureCreatedCallback: Binder died, removing " + "callback. Exception:" ) + ( e.getMessage ( ) ) ) ) ; i.remove ( ) ; } } } }
Source:
private static void assertMultipleInstanceCharacteristics ( java.lang.Object r1 , java.lang.Object r2 ) throws java.lang.Exception { org.junit.Assert.assertNotSame ( r1 , r2 ) ; org.junit.Assert.assertTrue ( ( ! ( r1.equals ( r2 ) ) ) ) ; java.lang.Class < ? > lambda1Class = r1.getClass ( ) ; java.lang.Class < ? > lambda2Class = r2.getClass ( ) ; org.junit.Assert.assertNotSame ( lambda1Class , lambda2Class ) ; }

Target:
private static void assertMultipleDefinitionCharacteristics ( java.util.concurrent.Callable < java.lang.String > r1 , java.util.concurrent.Callable < java.lang.String > r2 ) throws java.lang.Exception { org.junit.Assert.assertEquals ( r1.call ( ) , r2.call ( ) ) ; org.junit.Assert.assertNotSame ( r1 , r2 ) ; org.junit.Assert.assertTrue ( ( ! ( r1.equals ( r2 ) ) ) ) ; }
Source:
private android.app.PendingIntent createTelecomPendingIntent ( java.lang.String action , android.net.Uri data , android.os.UserHandle userHandle ) { android.content.Intent intent = new android.content.Intent ( action , data , mContext , com.android.server.telecom.components.TelecomBroadcastReceiver.class ) ; intent.putExtra ( TelecomBroadcastIntentProcessor.EXTRA_USERHANDLE , userHandle ) ; return android.app.PendingIntent.getBroadcast ( mContext , 0 , intent , PendingIntent.FLAG_CANCEL_CURRENT ) ; }

Target:
private android.app.PendingIntent createTelecomPendingIntent ( java.lang.String action , android.net.Uri data , android.os.UserHandle userHandle ) { android.content.Intent intent = new android.content.Intent ( action , data , mContext , com.android.server.telecom.components.TelecomBroadcastReceiver.class ) ; intent.putExtra ( TelecomBroadcastIntentProcessor.EXTRA_USERHANDLE , userHandle ) ; return android.app.PendingIntent.getBroadcast ( mContext , 0 , intent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }
Source:
public java.lang.String getPhotoUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : return phoneLookupInfo.getCequintInfo ( ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getPhotoUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : return phoneLookupInfo.getCequintInfo ( ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PHONE_NUMBER_CACHE : return phoneLookupInfo.getMigratedInfo ( ) . getPhotoUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
static void writeXml ( com.android.libcore.timezone.tzlookup.TzLookupFile.Country country , javax.xml.stream.XMLStreamWriter writer ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( com.android.libcore.timezone.tzlookup.TzLookupFile.COUNTRY_ELEMENT ) ; writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.COUNTRY_CODE_ATTRIBUTE , country.isoCode ) ; writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.DEFAULT_ATTRIBUTE , country.defaultTimeZoneId ) ; for ( com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneIdentifier timeZoneId : country.timeZoneIds ) { com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneIdentifier.writeXml ( timeZoneId , writer ) ; } writer.writeEndElement ( ) ; }

Target:
static void writeXml ( com.android.libcore.timezone.tzlookup.TzLookupFile.Country country , javax.xml.stream.XMLStreamWriter writer ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( com.android.libcore.timezone.tzlookup.TzLookupFile.COUNTRY_ELEMENT ) ; writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.COUNTRY_CODE_ATTRIBUTE , country.isoCode ) ; writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.DEFAULT_ATTRIBUTE , country.defaultTimeZoneId ) ; writer.writeAttribute ( com.android.libcore.timezone.tzlookup.TzLookupFile.EVER_USES_UTC_ATTRIBUTE , ( country.everUsesUtc ? "y" : "n" ) ) ; for ( com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneIdentifier timeZoneId : country.timeZoneIds ) { com.android.libcore.timezone.tzlookup.TzLookupFile.TimeZoneIdentifier.writeXml ( timeZoneId , writer ) ; } writer.writeEndElement ( ) ; }
Source:
public java.lang.String getInstrumentationRunner ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.String runner = config.mMergedFlavor.getTestInstrumentationRunner ( ) ; return runner != null ? runner : com.android.builder.core.VariantConfiguration.DEFAULT_TEST_RUNNER ; }

Target:
public java.lang.String getPackageFromManifest ( ) { com.google.common.base.Preconditions.checkState ( ( ! ( mType.isForTesting ( ) ) ) ) ; java.io.File manifestLocation = mDefaultSourceProvider.getManifestFile ( ) ; java.lang.String packageName = sManifestParser.getPackage ( manifestLocation ) ; if ( packageName == null ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "Cannot read packageName from %1$s" , mDefaultSourceProvider.getManifestFile ( ) . getAbsolutePath ( ) ) ) ; } return packageName ; }
Source:
static com.android.ide.common.res2.ResourceItem getResource ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.Nullable java.io.File from ) { com.android.resources.ResourceType type = com.android.ide.common.res2.ValueResourceParser2.getType ( node , from ) ; java.lang.String name = com.android.ide.common.res2.ValueResourceParser2.getName ( node ) ; if ( name != null ) { if ( type != null ) { return new com.android.ide.common.res2.ResourceItem ( name , type , node ) ; } } return null ; }

Target:
static com.android.ide.common.res2.ResourceItem getResource ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.Nullable java.io.File from ) { com.android.resources.ResourceType type = com.android.ide.common.res2.ValueResourceParser2.getType ( node , from ) ; java.lang.String name = com.android.ide.common.res2.ValueResourceParser2.getName ( node ) ; if ( name != null ) { if ( type != null ) { return new com.android.ide.common.res2.ResourceItem ( name , type , node ) ; } } else if ( type == ( com.android.resources.ResourceType.PUBLIC ) ) { return new com.android.ide.common.res2.ResourceItem ( "" , type , node ) ; } return null ; }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState " + ( mState ) ) ) ; if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getState(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mState ; }

Target:
protected boolean stop ( ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "stop()" ) ; if ( ( mContactChangeObserver ) == null ) { android.util.Log.i ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Avoid unregister when receiver it is not registered" ) ; return true ; } try { unregisterReceiver ( mPbapReceiver ) ; getContentResolver ( ) . unregisterContentObserver ( mContactChangeObserver ) ; mContactChangeObserver = null ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Unable to unregister pbap receiver" , e ) ; } mSessionStatusHandler.obtainMessage ( com.android.bluetooth.pbap.BluetoothPbapService.SHUTDOWN ) . sendToTarget ( ) ; setState ( BluetoothPbap.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; return true ; }
Source:
public java.lang.reflect.Type [ ] getGenericInterfaces ( ) { org.apache.harmony.luni.lang.reflect.GenericSignatureParser parser = new org.apache.harmony.luni.lang.reflect.GenericSignatureParser ( getClassLoader ( ) ) ; parser.parseForClass ( this , getSignatureAttribute ( ) ) ; return org.apache.harmony.luni.lang.reflect.Types.getClonedTypeArray ( parser.interfaceTypes ) ; }

Target:
public java.lang.reflect.Type [ ] getGenericInterfaces ( ) { java.lang.reflect.Type [ ] result ; synchronized ( java.lang.Class.Caches.genericInterfaces ) { result = java.lang.Class.Caches.genericInterfaces.get ( this ) ; if ( result == null ) { libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( getClassLoader ( ) ) ; parser.parseForClass ( this , getSignatureAttribute ( ) ) ; result = libcore.reflect.Types.getClonedTypeArray ( parser.interfaceTypes ) ; java.lang.Class.Caches.genericInterfaces.put ( this , result ) ; } } return result ; }
Source:
public void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.RemoteConnection remoteConnction = new android.telecom.RemoteConnection ( callId , mOutgoingConnectionServiceRpc , connection ) ; mOurConnectionServiceImpl.addRemoteExistingConnection ( remoteConnction ) ; }

Target:
public void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection , android.telecom.Logging.Session.Info sessionInfo ) { java.lang.String callingPackage = mOurConnectionServiceImpl.getApplicationContext ( ) . getOpPackageName ( ) ; android.telecom.RemoteConnection remoteConnection = new android.telecom.RemoteConnection ( callId , mOutgoingConnectionServiceRpc , connection , callingPackage ) ; mConnectionById.put ( callId , remoteConnection ) ; remoteConnection.registerCallback ( new android.telecom.RemoteConnection.Callback ( ) { @ java.lang.Override public void onDestroyed ( android.telecom.RemoteConnection connection ) { mConnectionById.remove ( callId ) ; maybeDisconnectAdapter ( ) ; } } ) ; mOurConnectionServiceImpl.addRemoteExistingConnection ( remoteConnection ) ; }
Source:
public boolean checkAndSet ( java.lang.String value , com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.resources.ScreenSize size = com.android.resources.ScreenSize.getEnum ( value ) ; if ( size != null ) { com.android.ide.common.resources.configuration.ScreenSizeQualifier qualifier = new com.android.ide.common.resources.configuration.ScreenSizeQualifier ( size ) ; config.setScreenSizeQualifier ( qualifier ) ; return true ; } return false ; }

Target:
public boolean checkAndSet ( java.lang.String value , com.android.ide.common.resources.configuration.FolderConfiguration config ) { com.android.resources.ScreenLayoutSize size = com.android.resources.ScreenLayoutSize.getEnum ( value ) ; if ( size != null ) { com.android.ide.common.resources.configuration.ScreenLayoutSizeQualifier qualifier = new com.android.ide.common.resources.configuration.ScreenLayoutSizeQualifier ( size ) ; config.setScreenLayoutSizeQualifier ( qualifier ) ; return true ; } return false ; }
Source:
public java.lang.String getIsimChallengeResponse ( java.lang.String nonce ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getIsimChallengeResponse ( nonce ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public static java.lang.String getTelephonyProperty ( java.lang.String property , java.lang.String defaultVal ) { java.lang.String propVal = android.os.SystemProperties.get ( property ) ; return propVal == null ? defaultVal : propVal ; }
Source:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision>1</r:revision> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepository.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision>1</r:revision> " ) + "<r:min-platform-tools-rev>1</r:min-platform-tools-rev> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepository.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }
Source:
protected void engineUpdate ( byte [ ] input , int offset , int len ) { if ( ( mChunkedStreamer ) == null ) { throw new java.lang.IllegalStateException ( "Not initialized" ) ; } byte [ ] output ; try { output = mChunkedStreamer.update ( input , offset , len ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } if ( ( output != null ) && ( ( output.length ) != 0 ) ) { throw new android.security.CryptoOperationException ( "Update operation unexpectedly produced output" ) ; } }

Target:
protected void engineUpdate ( byte [ ] input , int offset , int len ) { ensureKeystoreOperationInitialized ( ) ; byte [ ] output ; try { output = mChunkedStreamer.update ( input , offset , len ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } if ( ( output != null ) && ( ( output.length ) != 0 ) ) { throw new android.security.CryptoOperationException ( "Update operation unexpectedly produced output" ) ; } }
Source:
private int grabProcessOutput ( final java.lang.Process process ) throws java.lang.InterruptedException { com.android.ide.common.internal.CommandLineRunner.OutputGrabber grabber = new com.android.ide.common.internal.CommandLineRunner.OutputGrabber ( ) ; return com.android.sdklib.util.GrabProcessOutput.grabProcessOutput ( process , GrabProcessOutput.Wait.WAIT_FOR_READERS , grabber ) ; }

Target:
public void runCmdLine ( java.lang.String [ ] command ) throws com.android.ide.common.internal.LoggedErrorException , java.io.IOException , java.lang.InterruptedException { printCommand ( command ) ; java.lang.Process process = java.lang.Runtime.getRuntime ( ) . exec ( command ) ; com.android.ide.common.internal.CommandLineRunner.OutputGrabber grabber = new com.android.ide.common.internal.CommandLineRunner.OutputGrabber ( ) ; int returnCode = com.android.sdklib.util.GrabProcessOutput.grabProcessOutput ( process , GrabProcessOutput.Wait.WAIT_FOR_READERS , grabber ) ; if ( returnCode != 0 ) { throw new com.android.ide.common.internal.LoggedErrorException ( returnCode , grabber.mErrors , com.google.common.base.Joiner.on ( ' ' ) . join ( command ) ) ; } }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { com.google.common.base.Preconditions.checkArgument ( com.google.devtools.build.android.desugar.io.BitFlags.noneSet ( access , Opcodes.ACC_INTERFACE ) ) ; super . visit ( version , access , name , signature , superName , interfaces ) ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { com.google.common.base.Preconditions.checkArgument ( com.google.devtools.build.android.desugar.io.BitFlags.noneSet ( access , Opcodes.ACC_INTERFACE ) ) ; className = name ; super . visit ( version , access , name , signature , superName , interfaces ) ; }
Source:
public void onViewCreated ( final android.view.View view , @ android.support.annotation.Nullable android.os.Bundle savedInstanceState ) { super . onViewCreated ( view , savedInstanceState ) ; createInCallScreenDelegate ( ) ; updateUI ( ) ; if ( ( savedInstanceState == null ) || ( ! ( savedInstanceState.getBoolean ( com.android.incallui.answer.impl.AnswerFragment.STATE_HAS_ANIMATED_ENTRY ) ) ) ) { com.android.dialer.util.ViewUtil.doOnGlobalLayout ( view , this :: animateEntry ) ; } }

Target:
public void onViewCreated ( final android.view.View view , @ android.support.annotation.Nullable android.os.Bundle savedInstanceState ) { android.os.Trace.beginSection ( "AnswerFragment.onViewCreated" ) ; super . onViewCreated ( view , savedInstanceState ) ; createInCallScreenDelegate ( ) ; updateUI ( ) ; if ( ( savedInstanceState == null ) || ( ! ( savedInstanceState.getBoolean ( com.android.incallui.answer.impl.AnswerFragment.STATE_HAS_ANIMATED_ENTRY ) ) ) ) { com.android.dialer.util.ViewUtil.doOnGlobalLayout ( view , this :: animateEntry ) ; } android.os.Trace.endSection ( ) ; }
Source:
protected byte [ ] engineUpdate ( byte [ ] input , int inputOffset , int inputLen ) { ensureKeystoreOperationInitialized ( ) ; if ( inputLen == 0 ) { return null ; } byte [ ] output ; try { output = mMainDataStreamer.update ( input , inputOffset , inputLen ) ; } catch ( android.security.KeymasterException e ) { throw new android.security.CryptoOperationException ( "Keystore operation failed" , e ) ; } if ( ( output.length ) == 0 ) { return null ; } return output ; }

Target:
protected byte [ ] engineUpdate ( byte [ ] input , int inputOffset , int inputLen ) { ensureKeystoreOperationInitialized ( ) ; if ( inputLen == 0 ) { return null ; } byte [ ] output ; try { output = mMainDataStreamer.update ( input , inputOffset , inputLen ) ; } catch ( android.security.KeymasterException e ) { throw android.security.KeymasterUtils.getCryptoOperationException ( e ) ; } if ( ( output.length ) == 0 ) { return null ; } return output ; }
Source:
boolean enableWBS ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mStateMachine.getConnectionState ( mStateMachine.getCurrentDevice ( ) ) ) != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "enableWBS: device is not connected" ) ; return false ; } if ( ( mStateMachine.getAudioState ( ) ) == ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "enableWBS: audio is already connected" ) ; return false ; } for ( android.bluetooth.BluetoothDevice device : getConnectedDevices ( ) ) { mStateMachine.sendMessage ( HeadsetStateMachine.ENABLE_WBS , device ) ; } return true ; }

Target:
boolean connectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mStateMachine.getConnectionState ( mStateMachine.getCurrentDevice ( ) ) ) != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "connectAudio: profile not connected" ) ; return false ; } if ( isAudioOn ( ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , ( "connectAudio: audio is not idle, current state " + ( mStateMachine.getAudioState ( ) ) ) ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.CONNECT_AUDIO , mStateMachine.getCurrentDevice ( ) ) ; return true ; }
Source:
public boolean migrateNetworksFromSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configs , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { mWifiSupplicantControl.loadNetworks ( configs , networkExtras ) ; return true ; }

Target:
public boolean migrateNetworksFromSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configs , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.loadNetworks ( configs , networkExtras ) ; } else { mWifiSupplicantControl.loadNetworks ( configs , networkExtras ) ; return true ; } }
Source:
public boolean onTouchEvent ( android.view.MotionEvent event ) { switch ( event.getAction ( ) ) { case android.view.MotionEvent.ACTION_DOWN : sendStopTone ( ) ; finish ( ) ; return true ; } return super . onTouchEvent ( event ) ; }

Target:
protected void onDestroy ( ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.ToneDialog.LOG_TAG , "onDestroy" ) ; super . onDestroy ( ) ; unregisterReceiver ( mFinishActivityReceiver ) ; if ( ( ( mAlertDialog ) != null ) && ( mAlertDialog.isShowing ( ) ) ) { mAlertDialog.dismiss ( ) ; mAlertDialog = null ; } }
Source:
public static int copyNativeBinaries ( com.android.internal.content.NativeLibraryHelper.Handle handle , java.io.File sharedLibraryDir , java.lang.String abi ) { for ( long apkHandle : handle.apkHandles ) { int res = com.android.internal.content.NativeLibraryHelper.nativeCopyNativeBinaries ( apkHandle , sharedLibraryDir.getPath ( ) , abi ) ; if ( res != ( android.content.pm.PackageManager.INSTALL_SUCCEEDED ) ) { return res ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }

Target:
public static int copyNativeBinaries ( com.android.internal.content.NativeLibraryHelper.Handle handle , java.io.File sharedLibraryDir , java.lang.String abi ) { for ( long apkHandle : handle.apkHandles ) { int res = com.android.internal.content.NativeLibraryHelper.nativeCopyNativeBinaries ( apkHandle , sharedLibraryDir.getPath ( ) , abi , handle.extractNativeLibs , com.android.internal.content.NativeLibraryHelper.HAS_NATIVE_BRIDGE ) ; if ( res != ( android.content.pm.PackageManager.INSTALL_SUCCEEDED ) ) { return res ; } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }
Source:
private com.android.jack.ir.ast.JAnnotationLiteral getAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.Annotable annotable , @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotationType , @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info ) { assert isSystemAnnotation ( annotationType ) ; com.android.jack.ir.ast.JAnnotationLiteral annotation = annotable.getAnnotation ( annotationType ) ; if ( annotation == null ) { annotation = createAnnotation ( annotable , annotationType , info ) ; } return annotation ; }

Target:
private com.android.jack.ir.ast.JAnnotationLiteral getAnnotation ( @ javax.annotation.Nonnull com.android.jack.ir.ast.Annotable annotable , @ javax.annotation.Nonnull com.android.jack.ir.ast.JAnnotation annotationType , @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info ) { assert isSystemAnnotation ( annotationType ) ; com.android.jack.ir.ast.JAnnotationLiteral annotation = null ; java.util.Collection < com.android.jack.ir.ast.JAnnotationLiteral > annotations = annotable.getAnnotations ( annotationType ) ; if ( annotations.isEmpty ( ) ) { annotation = createAnnotation ( annotable , annotationType , info ) ; } else { assert ( annotations.size ( ) ) == 1 ; annotation = annotations.iterator ( ) . next ( ) ; } return annotation ; }
Source:
private int shrinkArray ( proguard.shrink.VisitorAccepter [ ] array , int length ) { int counter = 0 ; for ( int index = 0 ; index < length ; index ++ ) { if ( usageMarker.isUsed ( array [ index ] ) ) { array [ ( counter ++ ) ] = array [ index ] ; } } if ( counter < length ) { java.util.Arrays.fill ( array , counter , length , null ) ; } return counter ; }

Target:
private int shrinkArray ( proguard.shrink.VisitorAccepter [ ] array , int length ) { int counter = 0 ; for ( int index = 0 ; index < length ; index ++ ) { proguard.shrink.VisitorAccepter visitorAccepter = array [ index ] ; if ( usageMarker.isUsed ( visitorAccepter ) ) { array [ ( counter ++ ) ] = visitorAccepter ; } } if ( counter < length ) { java.util.Arrays.fill ( array , counter , length , null ) ; } return counter ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , long [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 8 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; }
Source:
private void writeSettingsLocked ( ) { if ( com.android.server.usb.UsbSettingsManager.DEBUG ) android.util.Slog.v ( com.android.server.usb.UsbSettingsManager.TAG , "writeSettingsLocked()" ) ; java.io.FileOutputStream fos = null ; try { fos = mSettingsFile.startWrite ( ) ; com.android.internal.util.FastXmlSerializer serializer = new com.android.internal.util.FastXmlSerializer ( ) ; serializer.setOutput ( fos , "utf-8" ) ; serializer.startDocument ( null , true ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; serializer.startTag ( null , "settings" ) ; for ( com.android.server.usb.UsbSettingsManager.DeviceFilter filter : mDevicePreferenceMap.keySet ( ) ) { serializer.startTag ( null , "preference" ) ; serializer.attribute ( null , "package" , mDevicePreferenceMap.get ( filter ) ) ; filter.write ( serializer ) ; serializer.endTag ( null , "preference" ) ; } for ( com.android.server.usb.UsbSettingsManager.AccessoryFilter filter : mAccessoryPreferenceMap.keySet ( ) ) { serializer.startTag ( null , "preference" ) ; serializer.attribute ( null , "package" , mAccessoryPreferenceMap.get ( filter ) ) ; filter.write ( serializer ) ; serializer.endTag ( null , "preference" ) ; } serializer.endTag ( null , "settings" ) ; serializer.endDocument ( ) ; mSettingsFile.finishWrite ( fos ) ; } catch ( java.io.IOException e ) { android.util.Slog.e ( com.android.server.usb.UsbSettingsManager.TAG , "Failed to write settings" , e ) ; if ( fos != null ) { mSettingsFile.failWrite ( fos ) ; } } }

Target:
private void writeSettingsLocked ( ) { if ( com.android.server.usb.UsbSettingsManager.DEBUG ) android.util.Slog.v ( com.android.server.usb.UsbSettingsManager.TAG , "writeSettingsLocked()" ) ; java.io.FileOutputStream fos = null ; try { fos = mSettingsFile.startWrite ( ) ; com.android.internal.util.FastXmlSerializer serializer = new com.android.internal.util.FastXmlSerializer ( ) ; serializer.setOutput ( fos , java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ; serializer.startDocument ( null , true ) ; serializer.setFeature ( "http://xmlpull.org/v1/doc/features.html#indent-output" , true ) ; serializer.startTag ( null , "settings" ) ; for ( com.android.server.usb.UsbSettingsManager.DeviceFilter filter : mDevicePreferenceMap.keySet ( ) ) { serializer.startTag ( null , "preference" ) ; serializer.attribute ( null , "package" , mDevicePreferenceMap.get ( filter ) ) ; filter.write ( serializer ) ; serializer.endTag ( null , "preference" ) ; } for ( com.android.server.usb.UsbSettingsManager.AccessoryFilter filter : mAccessoryPreferenceMap.keySet ( ) ) { serializer.startTag ( null , "preference" ) ; serializer.attribute ( null , "package" , mAccessoryPreferenceMap.get ( filter ) ) ; filter.write ( serializer ) ; serializer.endTag ( null , "preference" ) ; } serializer.endTag ( null , "settings" ) ; serializer.endDocument ( ) ; mSettingsFile.finishWrite ( fos ) ; } catch ( java.io.IOException e ) { android.util.Slog.e ( com.android.server.usb.UsbSettingsManager.TAG , "Failed to write settings" , e ) ; if ( fos != null ) { mSettingsFile.failWrite ( fos ) ; } } }
Source:
public void testRevokeAffectsWholeGroup23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokeAffectsWholeGroup_part1" ) ; } catch ( java.lang.AssertionError expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testRevokeAffectsWholeGroup_part2" ) ; }

Target:
public void testGrantPreviouslyRevokedWithPrejudiceShowsPrompt23 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.Throwable expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part2" ) ; }
Source:
public void setEapMethod ( int eapMethod ) { switch ( eapMethod ) { case android.net.wifi.WifiEnterpriseConfig.Eap.PEAP : case android.net.wifi.WifiEnterpriseConfig.Eap.PWD : case android.net.wifi.WifiEnterpriseConfig.Eap.TLS : case android.net.wifi.WifiEnterpriseConfig.Eap.TTLS : mFields.put ( android.net.wifi.WifiEnterpriseConfig.EAP_KEY , android.net.wifi.WifiEnterpriseConfig.Eap.strings [ eapMethod ] ) ; break ; default : throw new java.lang.IllegalArgumentException ( "Unknown EAP method" ) ; } }

Target:
public void setEapMethod ( int eapMethod ) { switch ( eapMethod ) { case android.net.wifi.WifiEnterpriseConfig.Eap.PEAP : case android.net.wifi.WifiEnterpriseConfig.Eap.PWD : case android.net.wifi.WifiEnterpriseConfig.Eap.TLS : case android.net.wifi.WifiEnterpriseConfig.Eap.TTLS : mFields.put ( android.net.wifi.WifiEnterpriseConfig.EAP_KEY , android.net.wifi.WifiEnterpriseConfig.Eap.strings [ eapMethod ] ) ; mFields.put ( android.net.wifi.WifiEnterpriseConfig.OPP_KEY_CACHING , "1" ) ; break ; default : throw new java.lang.IllegalArgumentException ( "Unknown EAP method" ) ; } }
Source:
public boolean ping ( ) { java.lang.String pong = doStringCommand ( "PING" ) ; return ( pong != null ) && ( pong.equals ( "PONG" ) ) ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getNetworkExtra ( int netId , java.lang.String name ) { final java.lang.String extraString = getNetworkVariable ( netId , name ) ; if ( ( ( extraString == null ) || ( ! ( extraString.startsWith ( "\"" ) ) ) ) || ( ! ( extraString.endsWith ( "\"" ) ) ) ) { return null ; } return com.android.server.wifi.WifiNative.parseNetworkExtra ( com.android.server.wifi.util.NativeUtil.removeEnclosingQuotes ( extraString ) ) ; }
Source:
static com.android.resources.ResourceType getType ( org.w3c.dom.Node node ) { java.lang.String nodeName = node.getLocalName ( ) ; java.lang.String typeString = null ; if ( com.android.builder.resources.TAG_ITEM.equals ( nodeName ) ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( node.getAttributes ( ) . getNamedItemNS ( null , com.android.builder.resources.ATTR_TYPE ) ) ) ; if ( attribute != null ) { typeString = attribute.getValue ( ) ; } } else { typeString = nodeName ; } if ( typeString != null ) { return com.android.resources.ResourceType.getEnum ( typeString ) ; } return null ; }

Target:
static com.android.resources.ResourceType getType ( org.w3c.dom.Node node ) { java.lang.String nodeName = node.getLocalName ( ) ; java.lang.String typeString = null ; if ( com.android.SdkConstants.TAG_ITEM.equals ( nodeName ) ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( node.getAttributes ( ) . getNamedItemNS ( null , com.android.SdkConstants.ATTR_TYPE ) ) ) ; if ( attribute != null ) { typeString = attribute.getValue ( ) ; } } else { typeString = nodeName ; } if ( typeString != null ) { return com.android.resources.ResourceType.getEnum ( typeString ) ; } return null ; }
Source:
public com.android.ide.common.rendering.api.ILayoutPullParser getParser ( com.android.ide.common.rendering.api.ResourceValue layoutResource ) { return getParser ( layoutResource.getName ( ) , new java.io.File ( layoutResource.getValue ( ) ) ) ; }

Target:
public com.android.ide.common.rendering.api.ILayoutPullParser getParser ( com.android.ide.common.rendering.api.ResourceValue layoutResource ) { boolean token = com.android.ide.common.rendering.RenderSecurityManager.enterSafeRegion ( mCredential ) ; try { return getParser ( layoutResource.getName ( ) , new java.io.File ( layoutResource.getValue ( ) ) ) ; } finally { com.android.ide.common.rendering.RenderSecurityManager.exitSafeRegion ( token ) ; } }
Source:
private int requestAudioFocus ( ) { int focusRequestStatus = mAudioManager.requestAudioFocus ( mAudioFocusListener , AudioManager.STREAM_MUSIC , AudioManager.AUDIOFOCUS_GAIN ) ; if ( focusRequestStatus == ( android.media.AudioManager.AUDIOFOCUS_REQUEST_GRANTED ) ) { startAvrcpUpdates ( ) ; startFluorideStreaming ( ) ; mAudioFocus = android.media.AudioManager.AUDIOFOCUS_GAIN ; } return focusRequestStatus ; }

Target:
private int requestAudioFocus ( ) { android.media.AudioAttributes streamAttributes = new android.media.AudioAttributes.Builder ( ) . setUsage ( AudioAttributes.USAGE_MEDIA ) . setContentType ( AudioAttributes.CONTENT_TYPE_UNKNOWN ) . build ( ) ; android.media.AudioFocusRequest focusRequest = new android.media.AudioFocusRequest.Builder ( android.media.AudioManager.AUDIOFOCUS_GAIN ) . setAudioAttributes ( streamAttributes ) . setWillPauseWhenDucked ( true ) . setOnAudioFocusChangeListener ( mAudioFocusListener , this ) . build ( ) ; int focusRequestStatus = mAudioManager.requestAudioFocus ( focusRequest ) ; if ( focusRequestStatus == ( android.media.AudioManager.AUDIOFOCUS_REQUEST_GRANTED ) ) { startAvrcpUpdates ( ) ; startFluorideStreaming ( ) ; mAudioFocus = android.media.AudioManager.AUDIOFOCUS_GAIN ; } return focusRequestStatus ; }
Source:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }

Target:
synchronized void nScriptInvokeV ( long id , int slot , byte [ ] params , boolean mUseInc ) { validate ( ) ; long curCon = mContext ; if ( mUseInc ) { curCon = mIncCon ; } rsnScriptInvokeV ( curCon , id , slot , params , mUseInc ) ; }
Source:
public void contactsEraseAll ( ) { android.database.Cursor cursor = mContentResolver.query ( ContactsContract.Contacts.CONTENT_URI , new java.lang.String [ ] { ContactsContract.Contacts.LOOKUP_KEY } , null , null , null ) ; if ( cursor == null ) { return ; } while ( cursor.moveToNext ( ) ) { android.net.Uri uri = android.net.Uri.withAppendedPath ( ContactsContract.Contacts.CONTENT_LOOKUP_URI , cursor.getString ( 0 ) ) ; mContentResolver.delete ( uri , null , null ) ; } return ; }

Target:
public void contactsEraseAll ( ) { android.database.Cursor cursor = mContentResolver.query ( ContactsContract.Contacts.CONTENT_URI , new java.lang.String [ ] { ContactsContract.Contacts.LOOKUP_KEY } , null , null , null ) ; if ( cursor == null ) { return ; } while ( cursor.moveToNext ( ) ) { android.net.Uri uri = android.net.Uri.withAppendedPath ( ContactsContract.Contacts.CONTENT_LOOKUP_URI , cursor.getString ( 0 ) ) ; mContentResolver.delete ( uri , null , null ) ; } mEventFacade.postEvent ( com.googlecode.android_scripting.facade.ContactsFacade.ERASE_COMPLETE , null ) ; return ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( type.isExternal ( ) ) { return ; } visitor.accept ( type ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( type.isExternal ( ) ) { return ; } visitor.accept ( type ) ; if ( ( type.getAnnotation ( mainDexAnnotation ) ) != null ) { type.addMarker ( ForceInMainDexMarker.INSTANCE ) ; } }
Source:
public void adjustVolume ( int direction ) { android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_ADJUST_VOLUME , direction , 0 ) ; mHandler.sendMessage ( msg ) ; }

Target:
public void adjustVolume ( int direction ) { final com.android.bluetooth.avrcp.Avrcp.AvrcpMessageHandler handler = mHandler ; if ( handler == null ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "adjustVolume: mHandler is already null" ) ; return ; } android.os.Message msg = handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_ADJUST_VOLUME , direction , 0 ) ; handler.sendMessage ( msg ) ; }
Source:
public int stopRssiMonitoring ( ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "stopRssiMonitoring, cmdId " + ( com.android.server.wifi.WifiNative.sRssiMonitorCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int ret = 0 ; if ( ( com.android.server.wifi.WifiNative.sRssiMonitorCmdId ) != 0 ) { ret = com.android.server.wifi.WifiNative.stopRssiMonitoringNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sRssiMonitorCmdId ) ; } com.android.server.wifi.WifiNative.sRssiMonitorCmdId = 0 ; return ret ; } else { return - 1 ; } } }

Target:
public int stopRssiMonitoring ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.stopRssiMonitoring ( ) ; } else { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "stopRssiMonitoring, cmdId " + ( com.android.server.wifi.WifiNative.sRssiMonitorCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int ret = 0 ; if ( ( com.android.server.wifi.WifiNative.sRssiMonitorCmdId ) != 0 ) { ret = com.android.server.wifi.WifiNative.stopRssiMonitoringNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sRssiMonitorCmdId ) ; } com.android.server.wifi.WifiNative.sRssiMonitorCmdId = 0 ; return ret ; } else { return - 1 ; } } } }