auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final char char_literal ( ) throws org.jf.smali.RecognitionException { char value = 0 ; org.antlr.runtime.tree.CommonTree CHAR_LITERAL197 = null ; try { { CHAR_LITERAL197 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.CHAR_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_CHAR_LITERAL_in_char_literal3337 ) ) ) ; value = ( CHAR_LITERAL197 != null ? CHAR_LITERAL197.getText ( ) : null ) . charAt ( 1 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL196 = null ; try { { DOUBLE_LITERAL196 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3324 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL196 != null ? DOUBLE_LITERAL196.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public java.lang.String resolve ( java.lang.String parent , java.lang.String child ) { if ( child.equals ( "" ) ) return parent ; if ( ( child.charAt ( 0 ) ) == '/' ) { if ( parent.equals ( "/" ) ) return child ; return parent + child ; } if ( parent.equals ( "/" ) ) return parent + child ; return ( parent + '/' ) + child ; }

Target:
public java.lang.String resolve ( java.lang.String parent , java.lang.String child ) { if ( ( child.isEmpty ( ) ) || ( child.equals ( "/" ) ) ) { return parent ; } if ( ( child.charAt ( 0 ) ) == '/' ) { if ( parent.equals ( "/" ) ) return child ; return parent + child ; } if ( parent.equals ( "/" ) ) return parent + child ; return ( parent + '/' ) + child ; }
Source:
private boolean handleAbiListQuery ( ) { try { final byte [ ] abiListBytes = abiList.getBytes ( java.nio.charset.StandardCharsets.US_ASCII ) ; mSocketOutStream.writeInt ( abiListBytes.length ) ; mSocketOutStream.write ( abiListBytes ) ; return false ; } catch ( java.io.IOException ioe ) { android.util.Log.e ( com.android.internal.os.ZygoteConnection.TAG , "Error writing to command socket" , ioe ) ; return true ; } }

Target:
private void handlePreload ( ) { try { if ( isPreloadComplete ( ) ) { mSocketOutStream.writeInt ( 1 ) ; } else { preload ( ) ; mSocketOutStream.writeInt ( 0 ) ; } } catch ( java.io.IOException ioe ) { throw new java.lang.IllegalStateException ( "Error writing to command socket" , ioe ) ; } }
Source:
public void checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType ) throws java.security.cert.CertificateException { checkTrusted ( chain , authType , null , false ) ; }

Target:
public void checkClientTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , java.net.Socket socket ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = null ; javax.net.ssl.SSLParameters parameters = null ; if ( socket instanceof javax.net.ssl.SSLSocket ) { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( socket ) ) ; session = sslSocket.getHandshakeSession ( ) ; if ( session == null ) { throw new java.security.cert.CertificateException ( "Not in handshake; no session available" ) ; } parameters = sslSocket.getSSLParameters ( ) ; } checkTrusted ( chain , authType , session , parameters , true ) ; }
Source:
protected synchronized boolean cleanup ( ) { android.util.Log.i ( com.android.bluetooth.hfp.HeadsetService.TAG , "cleanup()" ) ; if ( ! ( mCreated ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "cleanup() called before create()" ) ; return true ; } mCreated = false ; return true ; }

Target:
boolean startVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; int connectionState = mStateMachine.getConnectionState ( device ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.VOICE_RECOGNITION_START , device ) ; return true ; }
Source:
public void end ( ) throws com.android.ide.common.res2.ConsumerException { super . end ( ) ; try { if ( ( mCruncher ) != null ) { mCruncher.end ( ) ; } } catch ( java.lang.InterruptedException e ) { throw new com.android.ide.common.res2.ConsumerException ( e ) ; } mValuesResMap = null ; mQualifierWithDeletedValues = null ; mFactory = null ; }

Target:
public void end ( ) throws com.android.ide.common.res2.ConsumerException { super . end ( ) ; try { mCruncher.end ( mCruncherKey ) ; } catch ( java.lang.InterruptedException e ) { throw new com.android.ide.common.res2.ConsumerException ( e ) ; } mValuesResMap = null ; mQualifierWithDeletedValues = null ; mFactory = null ; }
Source:
public void testStageUninstall_existingStagedDataDistro ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro installedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; simulateInstalledDistro ( installedDistro ) ; java.io.File stagedDataDir = installer.getStagedTzDataDir ( ) ; assertTrue ( stagedDataDir.mkdir ( ) ) ; assertTrue ( installer.stageUninstall ( ) ) ; assertDistroUninstallStaged ( ) ; assertInstalledDistro ( installedDistro ) ; }

Target:
public void testStageUninstall_existingStagedDataDistro ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro installedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; simulateInstalledDistro ( installedDistro ) ; java.io.File stagedDataDir = installer.getStagedTzDataDir ( ) ; assertTrue ( stagedDataDir.mkdir ( ) ) ; assertTrue ( installer.stageUninstall ( ) ) ; assertDistroUninstallStaged ( ) ; assertInstalledDistro ( installedDistro ) ; }
Source:
private void checkIntentFilters ( ) { try { setHandleIntentActivityEnabledSetting ( PackageManager.COMPONENT_ENABLED_STATE_ENABLED ) ; android.content.Intent intent = new android.content.Intent ( ByodHelperActivity.ACTION_CHECK_INTENT_FILTERS ) ; startActivityForResult ( intent , com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_INTENT_FILTERS_STATUS ) ; } catch ( android.content.ActivityNotFoundException e ) { setHandleIntentActivityEnabledSetting ( PackageManager.COMPONENT_ENABLED_STATE_DISABLED ) ; android.util.Log.d ( TAG , "checkIntentFilters: ActivityNotFoundException" , e ) ; setTestResult ( mIntentFiltersTest , TestResult.TEST_RESULT_FAILED ) ; showToast ( R.string.provisioning_byod_no_activity ) ; } }

Target:
private void checkDiskEncryption ( ) { try { android.content.Intent intent = new android.content.Intent ( ByodHelperActivity.ACTION_CHECK_DISK_ENCRYPTION ) ; startActivityForResult ( intent , com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_CHECK_DISK_ENCRYPTION ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.d ( com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.TAG , "checkDiskEncryption: ActivityNotFoundException" , e ) ; setTestResult ( mDiskEncryptionTest , TestResult.TEST_RESULT_FAILED ) ; showToast ( R.string.provisioning_byod_no_activity ) ; } }
Source:
public boolean setNetworkSelectionModeManual ( int subId , com.android.internal.telephony.OperatorInfo operator , boolean persistSelection ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "setNetworkSelectionModeManual: subId:" + subId ) + " operator:" ) + operator ) ) ; com.android.phone.PhoneInterfaceManager.ManualNetworkSelectionArgument arg = new com.android.phone.PhoneInterfaceManager.ManualNetworkSelectionArgument ( operator , persistSelection ) ; return ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_SET_NETWORK_SELECTION_MODE_MANUAL , arg , subId ) ) ) ; }

Target:
public boolean setNetworkSelectionModeManual ( int subId , java.lang.String operatorNumeric , boolean persistSelection ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; com.android.internal.telephony.OperatorInfo operator = new com.android.internal.telephony.OperatorInfo ( "" , "" , operatorNumeric ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "setNetworkSelectionModeManual: subId:" + subId ) + " operator:" ) + operator ) ) ; com.android.phone.PhoneInterfaceManager.ManualNetworkSelectionArgument arg = new com.android.phone.PhoneInterfaceManager.ManualNetworkSelectionArgument ( operator , persistSelection ) ; return ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_SET_NETWORK_SELECTION_MODE_MANUAL , arg , subId ) ) ) ; }
Source:
public static void skipFully ( java.io.Reader reader , long n ) throws java.io.IOException { while ( n > 0 ) { long amt = reader.skip ( n ) ; if ( amt == 0 ) { if ( ( reader.read ( ) ) == ( - 1 ) ) { throw new java.io.EOFException ( ) ; } n -- ; } else { n -= amt ; } } }

Target:
public static void skipFully ( java.io.Reader reader , long n ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( reader ) ; while ( n > 0 ) { long amt = reader.skip ( n ) ; if ( amt == 0 ) { if ( ( reader.read ( ) ) == ( - 1 ) ) { throw new java.io.EOFException ( ) ; } n -- ; } else { n -= amt ; } } }
Source:
public void onCompletion ( android.media.MediaPlayer mp ) { what = 0 ; lock.lock ( ) ; condition.signal ( ) ; lock.unlock ( ) ; }

Target:
public boolean onError ( android.media.MediaPlayer mp , int newWhat , int extra ) { android.util.Log.i ( android.security.cts.StagefrightTest.TAG , ( "error: " + newWhat ) ) ; if ( ( what ) != ( android.media.MediaPlayer.MEDIA_ERROR_SERVER_DIED ) ) { what = newWhat ; } lock.lock ( ) ; condition.signal ( ) ; lock.unlock ( ) ; return true ; }
Source:
private void removeUidLocked ( int uid ) { performPollLocked ( com.android.server.net.NetworkStatsService.FLAG_PERSIST_ALL ) ; mUidRecorder.removeUidLocked ( uid ) ; mUidTagRecorder.removeUidLocked ( uid ) ; com.android.server.NetworkManagementSocketTagger.resetKernelUidStats ( uid ) ; }

Target:
private void removeUidsLocked ( int ... uids ) { if ( com.android.server.net.NetworkStatsService.LOGV ) android.util.Slog.v ( com.android.server.net.NetworkStatsService.TAG , ( "removeUidsLocked() for UIDs " + ( java.util.Arrays.toString ( uids ) ) ) ) ; performPollLocked ( com.android.server.net.NetworkStatsService.FLAG_PERSIST_ALL ) ; mUidRecorder.removeUidsLocked ( uids ) ; mUidTagRecorder.removeUidsLocked ( uids ) ; for ( int uid : uids ) { com.android.server.NetworkManagementSocketTagger.resetKernelUidStats ( uid ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { BaseClass c = new DerivedClass ( ) ; c.run ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { BaseClass c = new DerivedClass ( ) ; c.run ( ) ; DerivedClass d = new DerivedClass ( ) ; d.bar ( ) ; DerivedClass d2 = new DerivedClass2 ( ) ; d2.bar ( ) ; DerivedClass2 d3 = new DerivedClass2 ( ) ; d3.bar ( ) ; }
Source:
public void test_getPrivateExponent ( ) throws java.lang.Exception { java.security.KeyFactory gen = java.security.KeyFactory.getInstance ( "RSA" ) ; final java.math.BigInteger n = java.math.BigInteger.valueOf ( 3233 ) ; final java.math.BigInteger d = java.math.BigInteger.valueOf ( 2753 ) ; java.security.interfaces.RSAPrivateKey key = ( ( java.security.interfaces.RSAPrivateKey ) ( gen.generatePrivate ( new java.security.spec.RSAPrivateKeySpec ( n , d ) ) ) ) ; assertEquals ( "invalid private exponent" , d , key.getPrivateExponent ( ) ) ; }

Target:
public void test_getModulus ( ) throws java.lang.Exception { for ( java.security.Provider p : java.security.Security.getProviders ( "KeyFactory.RSA" ) ) { java.security.interfaces.RSAPrivateKey key = tests.security.interfaces.RSAPrivateKeyTest.getNonCRTKey ( p ) ; assertEquals ( "invalid private exponent" , tests.security.interfaces.RSAPrivateKeyTest.SIMPLE_N , key.getModulus ( ) ) ; } }
Source:
public void onFlush ( ) throws java.io.IOException { for ( android.media.midi.MidiReceiver receiver : mReceivers ) { receiver.flush ( ) ; } }

Target:
public void onFlush ( ) throws java.io.IOException { for ( android.media.midi.MidiReceiver receiver : mReceivers ) { try { receiver.flush ( ) ; } catch ( java.io.IOException e ) { mReceivers.remove ( receiver ) ; if ( ( mFailureHandler ) != null ) { mFailureHandler.onReceiverFailure ( receiver , e ) ; } } } }
Source:
public synchronized void destroy ( ) { if ( mDestroyed ) { throw new android.support.v8.renderscript.RSInvalidStateException ( "Object already destroyed." ) ; } mDestroyed = true ; mRS.nObjDestroy ( mID ) ; }

Target:
private void helpDestroy ( ) { boolean shouldDestroy = false ; synchronized ( this ) { if ( ! ( mDestroyed ) ) { shouldDestroy = true ; mDestroyed = true ; } } if ( shouldDestroy ) { java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock ( ) ; rlock.lock ( ) ; if ( mRS.isAlive ( ) ) { mRS.nObjDestroy ( mID ) ; } rlock.unlock ( ) ; mRS = null ; mID = 0 ; } }
Source:
public static int mapArtVersionToApi ( int artVersion ) { return 20 ; }

Target:
public static int mapArtVersionToApi ( int artVersion ) { if ( artVersion >= 79 ) { return 24 ; } if ( artVersion >= 64 ) { return 23 ; } if ( artVersion >= 45 ) { return 22 ; } if ( artVersion >= 39 ) { return 21 ; } return 19 ; }
Source:
synchronized void nAllocationRead ( int id , short [ ] d ) { validate ( ) ; rsnAllocationRead ( mContext , id , d ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , long [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public java.lang.String getLongDescription ( ) { java.lang.String s = getDescription ( ) ; if ( ( s == null ) || ( ( s.length ( ) ) == 0 ) ) { s = getShortDescription ( ) ; } if ( ( s.indexOf ( "revision" ) ) == ( - 1 ) ) { s += java.lang.String.format ( "\nRevision %1$s%2$s" , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } return s ; }

Target:
public java.lang.String getLongDescription ( ) { java.lang.String s = getDescription ( ) ; if ( ( s == null ) || ( s.isEmpty ( ) ) ) { s = getShortDescription ( ) ; } if ( ( s.indexOf ( "revision" ) ) == ( - 1 ) ) { s += java.lang.String.format ( "\nRevision %1$s%2$s" , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } return s ; }
Source:
public com.android.ide.common.rendering.api.AdapterBinding getAdapterBinding ( com.android.ide.common.rendering.api.ResourceReference adapterView , java.lang.Object adapterCookie , java.lang.Object viewObject ) { return null ; }

Target:
private static java.lang.String getListViewFqcn ( java.lang.Class < ? > clz ) { java.lang.String fqcn = clz.getName ( ) ; if ( fqcn.endsWith ( com.android.ide.common.layout.LayoutConstants.LIST_VIEW ) ) { return fqcn ; } else if ( fqcn.startsWith ( com.android.ide.common.layout.LayoutConstants.ANDROID_PKG_PREFIX ) ) { return null ; } java.lang.Class < ? > superClass = clz.getSuperclass ( ) ; if ( superClass != null ) { return com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.getListViewFqcn ( superClass ) ; } else { return null ; } }
Source:
public void testUnlockWallpaper ( ) throws java.lang.Exception { if ( ! ( isHandheld ( ) ) ) { return ; } launchActivity ( "WallpaperActivity" ) ; gotoKeyguard ( ) ; unlockDevice ( ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "WallpaperActivity" } ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }

Target:
public void testUnlockWallpaper ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } launchActivity ( "WallpaperActivity" ) ; gotoKeyguard ( ) ; unlockDevice ( ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "WallpaperActivity" } ) ; assertEquals ( "Picked wrong transition" , android.server.cts.WindowManagerState.TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER , mAmWmState.getWmState ( ) . getLastTransition ( ) ) ; }
Source:
private void selectCompatibleArchives ( java.lang.Object pkg , org.eclipse.jface.viewers.ITreeContentProvider provider ) { for ( java.lang.Object archive : provider.getChildren ( pkg ) ) { if ( archive instanceof com.android.sdklib.internal.repository.Archive ) { mTreeViewer.setChecked ( archive , ( ( com.android.sdklib.internal.repository.Archive ) ( archive ) ) . isCompatible ( ) ) ; } } }

Target:
private void selectCompatibleArchives ( java.lang.Object pkg , org.eclipse.jface.viewers.ITreeContentProvider provider ) { for ( java.lang.Object archive : provider.getChildren ( pkg ) ) { if ( archive instanceof com.android.sdklib.internal.repository.archives.Archive ) { mTreeViewer.setChecked ( archive , ( ( com.android.sdklib.internal.repository.archives.Archive ) ( archive ) ) . isCompatible ( ) ) ; } } }
Source:
public void testIsOutgoingCallPermitted ( ) throws java.lang.Exception { assertTrue ( mTelecomSystem.getTelecomServiceImpl ( ) . getBinder ( ) . isOutgoingCallPermitted ( mPhoneAccountSelfManaged.getAccountHandle ( ) ) ) ; }

Target:
public void testIsOutgoingCallPermittedOngoing ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; org.junit.Assert.assertFalse ( mTelecomSystem.getTelecomServiceImpl ( ) . getBinder ( ) . isOutgoingCallPermitted ( mPhoneAccountSelfManaged.getAccountHandle ( ) ) ) ; }
Source:
private void detectCycles ( java.lang.String from ) { if ( ( mIncludes.size ( ) ) > 0 ) { java.util.Set < java.lang.String > seen = new java.util.HashSet < java.lang.String > ( mIncludes.size ( ) ) ; java.lang.String chain = dfs ( from , seen ) ; if ( chain != null ) { addError ( from , chain ) ; } else { removeErrors ( from ) ; } } }

Target:
private void detectCycles ( java.lang.String from ) { if ( ( mIncludes.size ( ) ) > 0 ) { java.util.Set < java.lang.String > visiting = new java.util.HashSet < java.lang.String > ( mIncludes.size ( ) ) ; java.lang.String chain = dfs ( from , visiting ) ; if ( chain != null ) { addError ( from , chain ) ; } else { removeErrors ( from ) ; } } }
Source:
public void test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater ( ) { new java.util.zip.InflaterOutputStream ( os , new java.util.zip.Inflater ( ) ) ; try { new java.util.zip.InflaterOutputStream ( null , new java.util.zip.Inflater ( ) ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } try { new java.util.zip.InflaterOutputStream ( os , null ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } }

Target:
public void test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater ( ) throws java.io.IOException { java.util.zip.Inflater inflater = new java.util.zip.Inflater ( ) ; new java.util.zip.InflaterOutputStream ( os , inflater ) . close ( ) ; try { new java.util.zip.InflaterOutputStream ( null , inflater ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } try { new java.util.zip.InflaterOutputStream ( os , null ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } inflater.end ( ) ; }
Source:
public java.util.Iterator < com.example.android.multiproject.person.Person > iterator ( ) { return com.google.common.collect.Lists.newArrayList ( new com.example.android.multiproject.person.Person ( "Fred" ) , new com.example.android.multiproject.person.Person ( "Barney" ) ) . iterator ( ) ; }

Target:
public java.util.Iterator < com.example.android.multiproject.person.Person > iterator ( ) { java.util.ArrayList < com.example.android.multiproject.person.Person > list = new java.util.ArrayList < com.example.android.multiproject.person.Person > ( ) ; list.add ( new com.example.android.multiproject.person.Person ( "Fred" ) ) ; list.add ( new com.example.android.multiproject.person.Person ( "Barney" ) ) ; return list.iterator ( ) ; }
Source:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , method = "getLastVisiblePosition" , args = { } ) } ) public void testAccessVisiblePosition ( ) { assertEquals ( 0 , mAdapterView.getFirstVisiblePosition ( ) ) ; assertEquals ( ( - 1 ) , mAdapterView.getLastVisiblePosition ( ) ) ; setArrayAdapter ( mAdapterView ) ; mAdapterView.layout ( 0 , 0 , android.widget.cts.AdapterViewTest.LAYOUT_WIDTH , ( ( android.widget.cts.AdapterViewTest.LAYOUT_HEIGHT ) + 50 ) ) ; assertEquals ( ( ( FRUIT.length ) - 1 ) , mAdapterView.getLastVisiblePosition ( ) ) ; }

Target:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.COMPLETE , method = "getLastVisiblePosition" , args = { } ) } ) public void testAccessVisiblePosition ( ) { assertEquals ( 0 , mAdapterView.getFirstVisiblePosition ( ) ) ; assertEquals ( ( - 1 ) , mAdapterView.getLastVisiblePosition ( ) ) ; setArrayAdapter ( mAdapterView ) ; float density = mActivity.getResources ( ) . getDisplayMetrics ( ) . density ; int bottom = ( ( int ) ( ( android.widget.cts.AdapterViewTest.LAYOUT_HEIGHT ) * density ) ) ; mAdapterView.layout ( 0 , 0 , android.widget.cts.AdapterViewTest.LAYOUT_WIDTH , bottom ) ; assertEquals ( ( ( FRUIT.length ) - 1 ) , mAdapterView.getLastVisiblePosition ( ) ) ; }
Source:
public static com.android.dialer.contactactions.IntentModule newVideoCallModule ( android.content.Context context , java.lang.String number , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.contactactions.IntentModule ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setIsVideoCall ( true ) . build ( ) , R.string.video_call , R.drawable.quantum_ic_videocam_white_24 ) ; }

Target:
public static com.android.dialer.contactactions.IntentModule newVideoCallModule ( android.content.Context context , java.lang.String number , @ android.support.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle , com.android.dialer.callintent.CallInitiationType.Type initiationType ) { return new com.android.dialer.contactactions.IntentModule ( context , new com.android.dialer.callintent.CallIntentBuilder ( number , initiationType ) . setPhoneAccountHandle ( phoneAccountHandle ) . setIsVideoCall ( true ) . build ( ) , R.string.video_call , R.drawable.quantum_ic_videocam_white_24 ) ; }
Source:
public void testIsOutgoingCallPermittedOngoing ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; assertFalse ( mTelecomSystem.getTelecomServiceImpl ( ) . getBinder ( ) . isOutgoingCallPermitted ( mPhoneAccountSelfManaged.getAccountHandle ( ) ) ) ; }

Target:
public void testIsOutgoingCallPermitted ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( mTelecomSystem.getTelecomServiceImpl ( ) . getBinder ( ) . isOutgoingCallPermitted ( mPhoneAccountSelfManaged.getAccountHandle ( ) ) ) ; }
Source:
public java.lang.String getClassName ( ) { if ( ( className ) == null ) { if ( ! ( isReference ( ) ) ) { throw new java.lang.IllegalArgumentException ( ( "not an object type: " + ( descriptor ) ) ) ; } if ( ( descriptor.charAt ( 0 ) ) == '[' ) { className = descriptor ; } else { className = descriptor.substring ( 1 , ( ( descriptor.length ( ) ) - 1 ) ) ; } } return className ; }

Target:
public java.lang.String getClassName ( ) { if ( ( className ) == null ) { if ( ! ( isReference ( ) ) ) { throw new java.lang.IllegalArgumentException ( ( "not an object type: " + ( descriptor ) ) ) ; } java.lang.String descriptorStr = descriptor.getString ( ) ; if ( ( descriptorStr.charAt ( 0 ) ) == '[' ) { className = descriptorStr ; } else { className = descriptorStr.substring ( 1 , ( ( descriptorStr.length ( ) ) - 1 ) ) ; } } return className ; }
Source:
private void setupFeature ( android.telephony.ims.feature.ImsFeature f , int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) { f.setContext ( this ) ; f.setSlotId ( slotId ) ; f.addImsFeatureStatusCallback ( c ) ; addImsFeature ( slotId , featureType , f ) ; f.onFeatureReady ( ) ; }

Target:
private void setupFeature ( android.telephony.ims.feature.ImsFeature f , int slotId , int featureType , com.android.ims.internal.IImsFeatureStatusCallback c ) { f.addImsFeatureStatusCallback ( c ) ; f.initialize ( this , slotId ) ; addImsFeature ( slotId , featureType , f ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , short [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 2 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , long [ ] data ) { validateIsInt64 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; }
Source:
public void generatePushValue ( final org.jetbrains.asm4.commons.GeneratorAdapter generator , final java.lang.Object value ) { java.awt.Dimension dimension = ( ( java.awt.Dimension ) ( value ) ) ; generator.newInstance ( com.intellij.uiDesigner.compiler.DimensionPropertyCodeGenerator.myDimensionType ) ; generator.dup ( ) ; generator.push ( dimension.width ) ; generator.push ( dimension.height ) ; generator.invokeConstructor ( com.intellij.uiDesigner.compiler.DimensionPropertyCodeGenerator.myDimensionType , com.intellij.uiDesigner.compiler.DimensionPropertyCodeGenerator.myInitMethod ) ; }

Target:
public void generatePushValue ( final org.jetbrains.org.objectweb.asm.commons.GeneratorAdapter generator , final java.lang.Object value ) { java.awt.Dimension dimension = ( ( java.awt.Dimension ) ( value ) ) ; generator.newInstance ( com.intellij.uiDesigner.compiler.DimensionPropertyCodeGenerator.myDimensionType ) ; generator.dup ( ) ; generator.push ( dimension.width ) ; generator.push ( dimension.height ) ; generator.invokeConstructor ( com.intellij.uiDesigner.compiler.DimensionPropertyCodeGenerator.myDimensionType , com.intellij.uiDesigner.compiler.DimensionPropertyCodeGenerator.myInitMethod ) ; }
Source:
void schedulePackageCleaning ( java.lang.String packageName ) { mHandler.sendMessage ( mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.START_CLEANING_PACKAGE , packageName ) ) ; }

Target:
void schedulePackageCleaning ( java.lang.String packageName , int userId , boolean andCode ) { if ( false ) { java.lang.RuntimeException here = new java.lang.RuntimeException ( "here" ) ; here.fillInStackTrace ( ) ; android.util.Slog.d ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( ( "Schedule cleaning " + packageName ) + " user=" ) + userId ) + " andCode=" ) + andCode ) , here ) ; } mHandler.sendMessage ( mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.START_CLEANING_PACKAGE , userId , ( andCode ? 1 : 0 ) , packageName ) ) ; }
Source:
public void test_toPattern ( ) { java.text.DecimalFormat format = new java.text.DecimalFormat ( ) ; format.applyPattern ( "#.#" ) ; assertEquals ( "Wrong pattern 1" , "#0.#" , format.toPattern ( ) ) ; format.applyPattern ( "#." ) ; assertEquals ( "Wrong pattern 2" , "#0." , format.toPattern ( ) ) ; format.applyPattern ( "#" ) ; assertEquals ( "Wrong pattern 3" , "#" , format.toPattern ( ) ) ; format.applyPattern ( ".#" ) ; assertEquals ( "Wrong pattern 4" , "#.0" , format.toPattern ( ) ) ; }

Target:
public void test_toPattern ( ) { java.text.DecimalFormat format = new java.text.DecimalFormat ( ) ; format.applyPattern ( "#.#" ) ; assertEquals ( "Wrong pattern 1" , "0.#" , format.toPattern ( ) ) ; format.applyPattern ( "#." ) ; assertEquals ( "Wrong pattern 2" , "0." , format.toPattern ( ) ) ; format.applyPattern ( "#" ) ; assertEquals ( "Wrong pattern 3" , "0" , format.toPattern ( ) ) ; format.applyPattern ( ".#" ) ; assertEquals ( "Wrong pattern 4" , "#.0" , format.toPattern ( ) ) ; }
Source:
public static javax.net.ssl.TrustManager wrap ( javax.net.ssl.TrustManager trustManager ) { if ( trustManager instanceof javax.net.ssl.X509TrustManager ) { return new libcore.javax.net.ssl.TestTrustManager ( ( ( javax.net.ssl.X509TrustManager ) ( trustManager ) ) ) ; } return trustManager ; }

Target:
public static javax.net.ssl.TrustManager wrap ( javax.net.ssl.TrustManager trustManager ) { if ( trustManager instanceof javax.net.ssl.X509ExtendedTrustManager ) { return new libcore.javax.net.ssl.TestTrustManager ( ( ( javax.net.ssl.X509ExtendedTrustManager ) ( trustManager ) ) ) ; } else if ( trustManager instanceof javax.net.ssl.X509TrustManager ) { return new libcore.javax.net.ssl.TestTrustManager ( ( ( javax.net.ssl.X509TrustManager ) ( trustManager ) ) ) ; } return trustManager ; }
Source:
private static com.android.gallery3d.glrenderer.StringTexture newInstance ( java.lang.String text , android.text.TextPaint paint ) { android.graphics.Paint.FontMetricsInt metrics = paint.getFontMetricsInt ( ) ; int width = ( ( int ) ( android.util.FloatMath.ceil ( paint.measureText ( text ) ) ) ) ; int height = ( metrics.bottom ) - ( metrics.top ) ; if ( width <= 0 ) width = 1 ; if ( height <= 0 ) height = 1 ; return new com.android.gallery3d.glrenderer.StringTexture ( text , paint , metrics , width , height ) ; }

Target:
private static com.android.gallery3d.glrenderer.StringTexture newInstance ( java.lang.String text , android.text.TextPaint paint ) { android.graphics.Paint.FontMetricsInt metrics = paint.getFontMetricsInt ( ) ; int width = ( ( int ) ( java.lang.Math.ceil ( paint.measureText ( text ) ) ) ) ; int height = ( metrics.bottom ) - ( metrics.top ) ; if ( width <= 0 ) width = 1 ; if ( height <= 0 ) height = 1 ; return new com.android.gallery3d.glrenderer.StringTexture ( text , paint , metrics , width , height ) ; }
Source:
public void testHasFlagsWithSingleFlag ( ) { android.content.Intent intent = new android.content.Intent ( ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( 0 ) . matches ( intent ) ) ; intent.setFlags ( Intent.FLAG_GRANT_READ_URI_PERMISSION ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( Intent.FLAG_GRANT_READ_URI_PERMISSION ) . matches ( intent ) ) ; }

Target:
public void hasFlagsWithSingleFlag ( ) { android.content.Intent intent = new android.content.Intent ( ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( 0 ) . matches ( intent ) ) ; intent.setFlags ( Intent.FLAG_GRANT_READ_URI_PERMISSION ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( Intent.FLAG_GRANT_READ_URI_PERMISSION ) . matches ( intent ) ) ; }
Source:
protected com.android.ide.common.res2.ResourceFile createFileAndItems ( java.io.File sourceFolder , java.io.File file , com.android.utils.ILogger logger ) throws java.io.IOException { com.android.ide.common.res2.ResourceSet.FolderData folderData = com.android.ide.common.res2.ResourceSet.getFolderData ( file.getParentFile ( ) ) ; return createResourceFile ( file , folderData , logger ) ; }

Target:
protected com.android.ide.common.res2.ResourceFile createFileAndItems ( java.io.File sourceFolder , java.io.File file , com.android.utils.ILogger logger ) throws java.io.IOException { com.android.ide.common.res2.ResourceSet.FolderData folderData = com.android.ide.common.res2.ResourceSet.getFolderData ( file.getParentFile ( ) ) ; if ( ( folderData.folderType ) == null ) { return null ; } return createResourceFile ( file , folderData , logger ) ; }
Source:
private void dumpJackLibraryProperties ( @ javax.annotation.CheckForNull java.util.zip.ZipOutputStream zos ) { if ( zos != null ) { dumpPropertiesToZip ( zos , jackLibraryProperties ) ; } else { dumpPropertiesToFile ( new java.io.File ( options.getOutput ( ) , com.android.jill.frontend.java.JavaTransformer.JACK_LIBRARY_PROPERTIES ) , jackLibraryProperties ) ; } }

Target:
public void transform ( @ javax.annotation.Nonnull java.util.List < java.io.File > javaBinaryFiles ) { try ( com.android.sched.vfs.VFS baseVFS = getBaseOutputVFS ( ) ) { try ( com.android.sched.vfs.OutputVFS outputVFS = wrapOutputVFS ( baseVFS ) ) { for ( java.io.File fileToTransform : javaBinaryFiles ) { try ( java.io.FileInputStream fis = new java.io.FileInputStream ( fileToTransform ) ) { transformToVFS ( fis , outputVFS ) ; } } dumpJackLibraryProperties ( baseVFS ) ; } } catch ( java.io.IOException | com.android.sched.util.file.CannotCloseException e ) { throw new com.android.jill.JillException ( e ) ; } }
Source:
public void test1 ( ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration testConfig = getConfiguration ( "mcc310" , "mnc435" , "en" , "rUS" , "normal" , "notlong" , ScreenOrientation.LANDSCAPE.getValue ( ) , "mdpi" , TouchScreenType.FINGER.getValue ( ) , KeyboardState.EXPOSED.getValue ( ) , TextInputMethod.QWERTY.getValue ( ) , NavigationMethod.DPAD.getValue ( ) , "480x320" , "v3" ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile result = mResources.getMatchingFile ( com.android.ide.eclipse.adt.internal.editors.resources.manager.ConfigMatchTest.SEARCHED_FILENAME , ResourceFolderType.LAYOUT , testConfig ) ; boolean bresult = result.getFolder ( ) . getConfiguration ( ) . equals ( config3 ) ; assertEquals ( bresult , true ) ; }

Target:
public void test1 ( ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration testConfig = getConfiguration ( "mcc310" , "mnc435" , "en" , "rUS" , "normal" , "notlong" , ScreenOrientation.LANDSCAPE.getValue ( ) , "mdpi" , TouchScreen.FINGER.getValue ( ) , KeyboardState.EXPOSED.getValue ( ) , Keyboard.QWERTY.getValue ( ) , Navigation.DPAD.getValue ( ) , "480x320" , "v3" ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile result = mResources.getMatchingFile ( com.android.ide.eclipse.adt.internal.editors.resources.manager.ConfigMatchTest.SEARCHED_FILENAME , ResourceFolderType.LAYOUT , testConfig ) ; boolean bresult = result.getFolder ( ) . getConfiguration ( ) . equals ( config3 ) ; assertEquals ( bresult , true ) ; }
Source:
protected void onRoamingOff ( ) { if ( DBG ) log ( "onRoamingOff" ) ; if ( ( mUserDataEnabled ) == false ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }

Target:
protected void onRoamingOn ( ) { if ( DBG ) log ( "onRoamingOn" ) ; if ( ! ( mUserDataEnabled ) ) return ; if ( getDataOnRoamingEnabled ( ) ) { if ( DBG ) log ( "onRoamingOn: setup data on roaming" ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_ON ) ; notifyDataConnection ( Phone.REASON_ROAMING_ON ) ; } else { if ( DBG ) log ( "onRoamingOn: Tear down data connection on roaming." ) ; cleanUpAllConnections ( true , Phone.REASON_ROAMING_ON ) ; notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_ON ) ; } }
Source:
private boolean isOptimizableDefinition ( @ javax.annotation.Nonnull com.android.jack.analysis.DefinitionMarker definition ) { return ( ( definition.hasValue ( ) ) && ( ( definition.getUses ( ) . size ( ) ) == 1 ) ) && ( definition.getDefinedVariable ( ) . isSynthetic ( ) ) ; }

Target:
private void processCandidatesWithDependencies ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method , @ javax.annotation.Nonnull com.android.jack.cfg.ControlFlowGraph cfg , @ javax.annotation.Nonnull java.util.LinkedHashMap < com.android.jack.ir.ast.JVariable , com.android.jack.optimizations.DefUsesChainsSimplifier.OptInfo > candidates , @ javax.annotation.Nonnull java.util.LinkedHashMap < com.android.jack.ir.ast.JVariable , com.android.jack.optimizations.DefUsesChainsSimplifier.VarInfo > definitions ) { java.util.Set < com.android.jack.optimizations.DefUsesChainsSimplifier.OptInfo > queued = com.google.common.collect.Sets.newIdentityHashSet ( ) ; for ( java.util.Map.Entry < com.android.jack.ir.ast.JVariable , com.android.jack.optimizations.DefUsesChainsSimplifier.OptInfo > entry : candidates.entrySet ( ) ) { processCandidateWithDependencies ( method , cfg , entry.getValue ( ) , candidates , definitions , queued ) ; } }
Source:
void clearClientList ( ) { synchronized ( mClients ) { mClients.clear ( ) ; } }

Target:
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 ) ; } removeClientInfo ( client ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) return false ; com.android.builder.dependency.LibraryBundle that = ( ( com.android.builder.dependency.LibraryBundle ) ( o ) ) ; return com.google.common.base.Objects.equal ( mName , that.mName ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } com.android.builder.dependency.LibraryBundle that = ( ( com.android.builder.dependency.LibraryBundle ) ( o ) ) ; return ( com.google.common.base.Objects.equal ( mName , that.mName ) ) && ( com.google.common.base.Objects.equal ( mProjectPath , that.mProjectPath ) ) ; }
Source:
public void registerPhoneAccount ( android.telecom.PhoneAccount account ) { if ( ! ( phoneAccountRequiresBindPermission ( account.getAccountHandle ( ) ) ) ) { com.android.server.telecom.Log.w ( this , "Phone account %s does not have BIND_TELECOM_CONNECTION_SERVICE permission." , account.getAccountHandle ( ) ) ; throw new java.lang.SecurityException ( ( "PhoneAccount connection service requires " + "BIND_TELECOM_CONNECTION_SERVICE permission." ) ) ; } addOrReplacePhoneAccount ( account ) ; }

Target:
public void registerPhoneAccount ( android.telecom.PhoneAccount account ) { if ( ! ( phoneAccountRequiresBindPermission ( account.getAccountHandle ( ) ) ) ) { android.telecom.Log.w ( this , "Phone account %s does not have BIND_TELECOM_CONNECTION_SERVICE permission." , account.getAccountHandle ( ) ) ; throw new java.lang.SecurityException ( ( "PhoneAccount connection service requires " + "BIND_TELECOM_CONNECTION_SERVICE permission." ) ) ; } addOrReplacePhoneAccount ( account ) ; }
Source:
private boolean isModifiedLibrary ( @ javax.annotation.Nonnull java.io.File inputLibrary , long timestamp ) { if ( ( inputLibrary.isFile ( ) ) && ( ( inputLibrary.lastModified ( ) ) > timestamp ) ) { return true ; } else if ( ( inputLibrary.isDirectory ( ) ) && ( hasModifiedFile ( inputLibrary , timestamp ) ) ) { return true ; } return false ; }

Target:
private boolean needFullRebuild ( ) { if ( ! ( options.isAutomaticFullRebuildEnabled ( ) ) ) { return false ; } com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; assert ( libraryDependencies ) != null ; return ( ! ( libraryDependencies.hasSameLibraryOnClasspath ( session.getLibraryDependencies ( ) ) ) ) || ( ! ( libraryDependencies.hasSameImportedLibrary ( session.getLibraryDependencies ( ) ) ) ) ; }
Source:
protected android.graphics.Bitmap extractResultImage ( ) { long startnow ; long endnow ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_PackOutputImage ( buffers.outAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; android.util.Log.d ( com.android.rs.refocus.d1new.RefocusFilterd1new.myTAG , ( ( "PackOutputImage: " + ( endnow - startnow ) ) + " ns" ) ) ; buffers.outAllocation.copyTo ( buffers.outputImage ) ; return buffers.outputImage ; }

Target:
protected android.graphics.Bitmap extractResultImage ( ) { long startnow ; long endnow ; startnow = java.lang.System.nanoTime ( ) ; scriptC.forEach_PackOutputImage ( buffers.outAllocation ) ; endnow = java.lang.System.nanoTime ( ) ; logTiming ( com.android.rs.refocus.d1new.RefocusFilterd1new.myTAG , "PackOutputImage" , ( endnow - startnow ) ) ; startnow = java.lang.System.nanoTime ( ) ; buffers.outAllocation.copyTo ( buffers.outputImage ) ; endnow = java.lang.System.nanoTime ( ) ; logTiming ( com.android.rs.refocus.d1new.RefocusFilterd1new.myTAG , "CopyOutputImage" , ( endnow - startnow ) ) ; return buffers.outputImage ; }
Source:
public android.net.NetworkStats getVtDataUsage ( int subId , boolean perUidStats ) { mApp.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_NETWORK_USAGE_HISTORY , null ) ; com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getVtDataUsage ( perUidStats ) ; } return null ; }

Target:
public void setVoicemailVibrationEnabled ( java.lang.String callingPackage , android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( android.text.TextUtils.equals ( callingPackage , android.telecom.TelecomManager.from ( mPhone.getContext ( ) ) . getDefaultDialerPackage ( ) ) ) ) { enforceModifyPermissionOrCarrierPrivilege ( com.android.phone.PhoneUtils.getSubIdForPhoneAccountHandle ( phoneAccountHandle ) ) ; } com.android.internal.telephony.Phone phone = com.android.phone.PhoneUtils.getPhoneForPhoneAccountHandle ( phoneAccountHandle ) ; if ( phone == null ) { phone = mPhone ; } com.android.phone.settings.VoicemailNotificationSettingsUtil.setVibrationEnabled ( phone , enabled ) ; }
Source:
public boolean onPreferenceClick ( android.support.v7.preference.Preference preference ) { com.android.traceur.AtraceUtils.atraceDumpAndSendInBackground ( getContext ( ) , com.android.traceur.Receiver.getActiveTags ( getContext ( ) , mPrefs , true ) ) ; return true ; }

Target:
public boolean onPreferenceClick ( android.support.v7.preference.Preference preference ) { new android.app.AlertDialog.Builder ( getContext ( ) ) . setMessage ( R.string.clear_saved_traces_confirm ) . setPositiveButton ( android.R.string.yes , new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int which ) { com.android.traceur.AtraceUtils.clearSavedTraces ( ) ; } } ) . setNegativeButton ( android.R.string.no , new android.content.DialogInterface.OnClickListener ( ) { public void onClick ( android.content.DialogInterface dialog , int which ) { dialog.dismiss ( ) ; } } ) . create ( ) . show ( ) ; return true ; }
Source:
public void testProcSelfPagemapNotAccessible ( ) { try { new java.io.FileInputStream ( "/proc/self/pagemap" ) ; fail ( ( "Device is missing the following kernel security patch: " + "https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce" ) ) ; } catch ( java.io.FileNotFoundException e ) { } }

Target:
public void testProcSelfPagemapSane ( ) throws android.system.ErrnoException , java.io.IOException { java.io.FileDescriptor pagemap = null ; try { pagemap = android.system.Os.open ( "/proc/self/pagemap" , OsConstants.O_RDONLY , 0 ) ; for ( android.util.Pair < java.lang.Long , java.lang.Long > range : android.permission.cts.FileSystemPermissionTest.mappedPageRanges ( ) ) if ( ! ( android.permission.cts.FileSystemPermissionTest.pfnIsZero ( pagemap , range.first , range.second ) ) ) fail ( ( "Device is missing the following kernel security patch: " + "https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce" ) ) ; } catch ( android.system.ErrnoException e ) { if ( ( e.errno ) == ( android.system.OsConstants.EPERM ) ) return ; throw e ; } finally { if ( pagemap != null ) android.system.Os.close ( pagemap ) ; } }
Source:
private boolean checkNameAndAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { if ( ( ( annotationType ) != null ) && ( ! ( annotationType.matches ( type.getAnnotations ( ) ) ) ) ) { return false ; } return className.matches ( com.android.jack.shrob.proguard.GrammarActions.getBinaryNameFormatter ( ) . getName ( type ) ) ; }

Target:
private boolean checkNameAndAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { if ( ( ( annotationType ) != null ) && ( ! ( annotationType.matches ( type.getAnnotations ( ) ) ) ) ) { return false ; } return className.matches ( com.android.jack.shrob.proguard.GrammarActions.getSourceFormatter ( ) . getName ( type ) ) ; }
Source:
public void run ( int i ) { int j = 0 ; try ( android.database.Cursor cursor = mContentResolver.query ( Programs.CONTENT_URI , null , null , null , null ) ) { while ( cursor.moveToNext ( ) ) { ++ j ; } } }

Target:
public void run ( int i ) { android.net.Uri channelUri = channelUris.get ( i ) ; try ( android.database.Cursor cursor = mContentResolver.query ( android.media.tv.TvContract.buildProgramsUriForChannel ( channelUri , 0 , ( ( PROGRAM_DURATION_MS * TRANSACTION_SIZE ) / 2 ) ) , null , null , null , null ) ) { while ( cursor.moveToNext ( ) ) { } } }
Source:
public void getNeighboringCids ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_GET_NEIGHBORING_CELL_IDS , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void queryCdmaRoamingPreference ( 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_CDMA_QUERY_ROAMING_PREFERENCE , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.getCdmaRoamingPreference ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "queryCdmaRoamingPreference" , e ) ; } } }
Source:
public void testNonMatchingDomainsRejected ( ) throws java.lang.Exception { libcore.java.net.CookiesTest.TestCookieStore cookieStore = new libcore.java.net.CookiesTest.TestCookieStore ( ) ; java.net.CookieManager cookieManager = new java.net.CookieManager ( cookieStore , java.net.CookiePolicy.ACCEPT_ORIGINAL_SERVER ) ; cookieManager.put ( new java.net.URI ( "http://android.com/" ) , cookieHeaders ( "a=android;domain=google.com" ) ) ; assertEquals ( java.util.Collections.< java.net.HttpCookie > emptyList ( ) , cookieStore.cookies ) ; }

Target:
public void testCookieStoreGetWithSecure ( ) throws java.lang.Exception { java.net.CookieStore cookieStore = new java.net.CookieManager ( ) . getCookieStore ( ) ; java.net.HttpCookie cookie = libcore.java.net.CookiesTest.createCookie ( "theme" , "light" , "a.com" , "/path" ) ; cookie.setSecure ( true ) ; cookieStore.add ( new java.net.URI ( "https://a.com/path" ) , cookie ) ; assertEquals ( 1 , cookieStore.get ( new java.net.URI ( "http://a.com/path" ) ) . size ( ) ) ; assertEquals ( 1 , cookieStore.get ( new java.net.URI ( "https://a.com/path" ) ) . size ( ) ) ; }