auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.Map.Entry < java.lang.String , java.lang.String > convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { int pos = input.indexOf ( "=" ) ; if ( pos <= 0 ) { throw new com.google.devtools.common.options.OptionsParsingException ( ( "Variable definitions must be in the form of a " + "'name=value' assignment" ) ) ; } java.lang.String name = input.substring ( 0 , pos ) ; java.lang.String value = input.substring ( ( pos + 1 ) ) ; return com.google.common.collect.Maps.immutableEntry ( name , value ) ; }

Target:
public java.util.Map.Entry < java.lang.String , java.lang.String > convert ( java.lang.String input ) throws com.google.devtools.common.options.OptionsParsingException { int pos = input.indexOf ( "=" ) ; if ( pos <= 0 ) { throw new com.google.devtools.common.options.OptionsParsingException ( "Variable definitions must be in the form of a 'name=value' assignment" ) ; } java.lang.String name = input.substring ( 0 , pos ) ; java.lang.String value = input.substring ( ( pos + 1 ) ) ; return com.google.common.collect.Maps.immutableEntry ( name , value ) ; }
Source:
public int [ ] mapThisVector ( int [ ] param ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( "mapThisVector " + ( com.android.commands.hidl_test_java.HidlTestJava.toString ( param ) ) ) ) ; for ( int i = 0 ; i < ( param.length ) ; ++ i ) { param [ i ] *= 2 ; } return param ; }

Target:
public java.util.ArrayList < byte [ ] > someMethodTakingAVectorOfArray ( java.util.ArrayList < byte [ ] > in ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , "Baz someMethodTakingAVectorOfArray" ) ; int n = in.size ( ) ; java.util.ArrayList < byte [ ] > out = new java.util.ArrayList < byte [ ] > ( ) ; for ( int i = 0 ; i < n ; ++ i ) { out.add ( in.get ( ( ( n - i ) - 1 ) ) ) ; } return out ; }
Source:
public void eraseSubscriptions ( android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . eraseSubscriptions ( callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void updateSubscriptionNickname ( int subscriptionId , java.lang.String nickname , android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { getIEuiccController ( ) . updateSubscriptionNickname ( subscriptionId , nickname , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } return ( ( com.android.ims.ImsManager.isVtEnabledByPlatform ( mPhone.getContext ( ) ) ) && ( com.android.ims.ImsManager.isEnhanced4gLteModeSettingEnabledByUser ( mPhone.getContext ( ) ) ) ) && ( com.android.ims.ImsManager.isVtEnabledByUser ( mPhone.getContext ( ) ) ) ; }

Target:
public void enableVideoCalling ( boolean enable ) { enforceModifyPermission ( ) ; com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) . setVtSetting ( enable ) ; }
Source:
public boolean loadFromUserStoreAfterUnlockOrSwitch ( int userId ) { com.android.server.wifi.WifiConfigStoreData storeData ; try { storeData = mWifiConfigStore.switchUserStoreAndRead ( mWifiConfigStore.createUserFile ( userId ) ) ; } catch ( java.io.IOException e ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigManager.TAG , "Reading from new store failed. All saved private networks are lost!" , e ) ; return false ; } catch ( org.xmlpull.v1.XmlPullParserException e ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigManager.TAG , ( "XML deserialization of store failed. All saved private networks are" + "lost!" ) , e ) ; return false ; } loadInternalDataFromUserStore ( storeData.getUserConfigurations ( ) , storeData.getDeletedEphemeralSSIDs ( ) ) ; return true ; }

Target:
public boolean loadFromUserStoreAfterUnlockOrSwitch ( int userId ) { try { mWifiConfigStore.switchUserStoreAndRead ( com.android.server.wifi.WifiConfigStore.createUserFile ( userId ) ) ; } catch ( java.io.IOException e ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigManager.TAG , "Reading from new store failed. All saved private networks are lost!" , e ) ; return false ; } catch ( org.xmlpull.v1.XmlPullParserException e ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigManager.TAG , ( "XML deserialization of store failed. All saved private networks are" + "lost!" ) , e ) ; return false ; } loadInternalDataFromUserStore ( mNetworkListStoreData.getUserConfigurations ( ) , mDeletedEphemeralSsidsStoreData.getSsidList ( ) ) ; return true ; }
Source:
public void testInstallWithWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TzDataBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TzDataBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( bundle.getBytes ( ) ) ) ; assertBundleInstalled ( bundle ) ; }

Target:
public void testInstallWithWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneBundleInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundle ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; assertTrue ( installer.install ( bundle.getBytes ( ) ) ) ; assertBundleInstalled ( bundle ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.unittest.ScriptC_small_struct s = new com.android.rs.unittest.ScriptC_small_struct ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.forEach_setStruct ( A ) ; s.forEach_setArrayOfStruct ( B ) ; s.invoke_test ( ) ; pRS.finish ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = createRenderScript ( true ) ; com.android.rs.unittest.ScriptC_small_struct s = new com.android.rs.unittest.ScriptC_small_struct ( pRS ) ; initializeGlobals ( pRS , s ) ; s.forEach_setStruct ( A ) ; s.forEach_setArrayOfStruct ( B ) ; s.invoke_test ( ) ; pRS.finish ( ) ; pRS.destroy ( ) ; }
Source:
public void startFlush ( ) { if ( ( mTestSensorEventListener ) == null ) { return ; } java.lang.String message = formatAssertionMessage ( "Flush" ) ; junit.framework.Assert.assertTrue ( message , mSensorManager.flush ( mTestSensorEventListener ) ) ; }

Target:
public void registerListener ( android.hardware.cts.helpers.TestSensorEventListener listener ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } mTestSensorEventListener = ( listener != null ) ? listener : new android.hardware.cts.helpers.TestSensorEventListener ( ) ; mTestSensorEventListener.setSensorInfo ( mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; java.lang.String message = android.hardware.cts.helpers.SensorCtsHelper.formatAssertionMessage ( mSensor , "registerListener" ) ; boolean result = mSensorManager.registerListener ( mTestSensorEventListener , mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; junit.framework.Assert.assertTrue ( message , result ) ; }
Source:
private void buildAvdList ( java.util.ArrayList < com.android.sdklib.internal.avd.AvdManager.AvdInfo > allList , com.android.sdklib.ISdkLog log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { java.io.File [ ] avds = buildAvdFilesList ( ) ; if ( avds != null ) { for ( java.io.File avd : avds ) { com.android.sdklib.internal.avd.AvdManager.AvdInfo info = parseAvdInfo ( avd , log ) ; if ( info != null ) { allList.add ( info ) ; } } } }

Target:
private void buildAvdList ( java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > allList , com.android.sdklib.ISdkLog log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { java.io.File [ ] avds = buildAvdFilesList ( ) ; if ( avds != null ) { for ( java.io.File avd : avds ) { com.android.sdklib.internal.avd.AvdInfo info = parseAvdInfo ( avd , log ) ; if ( info != null ) { allList.add ( info ) ; } } } }
Source:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

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:
private void showErrorMessage ( java.lang.String message ) { new android.app.AlertDialog.Builder ( this ) . setTitle ( R.string.error_title ) . setMessage ( message ) . setPositiveButton ( android.R.string.ok , null ) . show ( ) ; }

Target:
protected void onPrepareDialog ( int id , android.app.Dialog dialog ) { super . onPrepareDialog ( id , dialog ) ; if ( id == ( com.android.settings.ApnEditor.ERROR_DIALOG_ID ) ) { java.lang.String msg = getErrorMsg ( ) ; if ( msg != null ) { ( ( android.app.AlertDialog ) ( dialog ) ) . setMessage ( msg ) ; } } }
Source:
private void broadcastReport ( android.bluetooth.BluetoothDevice device , byte [ ] report , int rptSize ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothInputDevice.ACTION_REPORT ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothInputDevice.EXTRA_REPORT , report ) ; intent.putExtra ( BluetoothInputDevice.EXTRA_REPORT_BUFFER_SIZE , rptSize ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; sendBroadcast ( intent , com.android.bluetooth.hid.BLUETOOTH_PERM ) ; }

Target:
private void broadcastReport ( android.bluetooth.BluetoothDevice device , byte [ ] report , int rptSize ) { android.content.Intent intent = new android.content.Intent ( android.bluetooth.BluetoothHidHost.ACTION_REPORT ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; intent.putExtra ( BluetoothHidHost.EXTRA_REPORT , report ) ; intent.putExtra ( BluetoothHidHost.EXTRA_REPORT_BUFFER_SIZE , rptSize ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; sendBroadcast ( intent , com.android.bluetooth.hid.BLUETOOTH_PERM ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof com.android.ide.common.blame.Message ) ) { return false ; } com.android.ide.common.blame.Message that = ( ( com.android.ide.common.blame.Message ) ( o ) ) ; return ( ( com.google.common.base.Objects.equal ( mKind , that.mKind ) ) && ( com.google.common.base.Objects.equal ( mText , that.mText ) ) ) && ( com.google.common.base.Objects.equal ( mSourceFilePositions , mSourceFilePositions ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof com.android.ide.common.blame.Message ) ) { return false ; } com.android.ide.common.blame.Message that = ( ( com.android.ide.common.blame.Message ) ( o ) ) ; return ( ( com.google.common.base.Objects.equal ( mKind , that.mKind ) ) && ( com.google.common.base.Objects.equal ( mText , that.mText ) ) ) && ( com.google.common.base.Objects.equal ( mSourceFilePositions , that.mSourceFilePositions ) ) ; }
Source:
public void runTest ( ) { mScript.set_histogramSource ( mInPixelsAllocation ) ; mScript.set_histogramWidth ( mInPixelsAllocation.getType ( ) . getX ( ) ) ; mScript.set_histogramHeight ( mInPixelsAllocation.getType ( ) . getY ( ) ) ; mScript.invoke_prepareWhiteBalance ( ) ; mScript.forEach_whiteBalanceKernel ( mInPixelsAllocation , mOutPixelsAllocation ) ; }

Target:
public void runTest ( ) { mHist.forEach ( mInPixelsAllocation ) ; mScript.invoke_prepareWhiteBalance ( ) ; mScript.forEach_whiteBalanceKernel ( mInPixelsAllocation , mOutPixelsAllocation ) ; }
Source:
public boolean reportError ( byte error ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( "reportError(), error = " + error ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.reportError ( error ) ; }

Target:
public boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.reportError ( device , error ) ; }
Source:
public synchronized int getAudioState ( ) { com.android.internal.util.IState state = getCurrentState ( ) ; if ( state == ( mAudioConnecting ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; } else if ( ( state == ( mAudioDisconnecting ) ) || ( state == ( mAudioOn ) ) ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ; } else { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ; } }

Target:
int getAudioStateInt ( ) { return android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTING ; }
Source:
public int getConnectionState ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.getAdapterConnectionState ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "getConnectionState:" , e ) ; } return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; }

Target:
public int getConnectionState ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.getAdapterConnectionState ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "getConnectionState:" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } libcore.tzdata.update2.TimeZoneDistro that = ( ( libcore.tzdata.update2.TimeZoneDistro ) ( o ) ) ; if ( ! ( java.util.Arrays.equals ( bytes , that.bytes ) ) ) { return false ; } return true ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } libcore.tzdata.shared2.TimeZoneDistro that = ( ( libcore.tzdata.shared2.TimeZoneDistro ) ( o ) ) ; if ( ! ( java.util.Arrays.equals ( bytes , that.bytes ) ) ) { return false ; } return true ; }
Source:
public void addTasks ( java.util.List < com.intellij.openapi.externalSystem.model.task.TaskData > tasks , com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.Phase phase ) { if ( tasks.isEmpty ( ) ) return ; final com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.ExternalProjectsStateProvider stateProvider = com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManager.getInstance ( myProject ) . getStateProvider ( ) ; for ( com.intellij.openapi.externalSystem.model.task.TaskData task : tasks ) { final com.intellij.openapi.externalSystem.service.project.manage.TaskActivationState taskActivationState = stateProvider.getTasksActivation ( task.getOwner ( ) , task.getLinkedExternalProjectPath ( ) ) ; taskActivationState.getTasks ( phase ) . add ( task.getName ( ) ) ; } fireTasksChanged ( ) ; }

Target:
public void addTasks ( @ org.jetbrains.annotations.NotNull java.util.Collection < com.intellij.openapi.externalSystem.model.task.TaskData > tasks , @ org.jetbrains.annotations.NotNull final com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.Phase phase ) { if ( tasks.isEmpty ( ) ) return ; addTasks ( com.intellij.util.containers.ContainerUtil.map ( tasks , new com.intellij.util.Function < com.intellij.openapi.externalSystem.model.task.TaskData , com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry > ( ) { @ java.lang.Override public com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry fun ( com.intellij.openapi.externalSystem.model.task.TaskData data ) { return new com.intellij.openapi.externalSystem.service.project.manage.ExternalSystemTaskActivator.TaskActivationEntry ( data.getOwner ( ) , phase , data.getLinkedExternalProjectPath ( ) , data.getName ( ) ) ; } } ) ) ; fireTasksChanged ( ) ; }
Source:
private boolean dirExistsAndHaveReadAccess ( java.lang.String path ) { java.io.File pathDir = new java.io.File ( path ) ; if ( ! ( pathDir.exists ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.i ( "Directory %s does not exist" , path ) ; return false ; } else if ( ! ( pathDir.canRead ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.i ( "User does not have read access to %s" , path ) ; return false ; } return true ; }

Target:
private boolean dirExistsAndHaveReadAccess ( java.lang.String path ) { com.android.tradefed.util.CommandResult c = mRunUtil.runTimedCmd ( ( ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.BASE_TIMEOUT ) * 5 ) , "ls" , path ) ; if ( ( c.getStatus ( ) ) != ( com.android.tradefed.util.CommandStatus.SUCCESS ) ) { com.android.tradefed.log.LogUtil.CLog.i ( java.lang.String.format ( "Failed to read dir: %s. Result %s. stdout: %s, stderr: %s" , path , c.getStatus ( ) , c.getStdout ( ) , c.getStderr ( ) ) ) ; return false ; } return true ; }
Source:
public static java.security.KeyPairGenerator getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { sun.security.jca.GetInstance.Instance instance = sun.security.jca.GetInstance.getInstance ( "KeyPairGenerator" , java.security.KeyPairGeneratorSpi.class , algorithm , provider ) ; return java.security.KeyPairGenerator.getInstance ( instance , algorithm ) ; }

Target:
public static java.security.KeyPairGenerator getInstance ( java.lang.String algorithm , java.security.Provider provider ) throws java.security.NoSuchAlgorithmException { sun.security.jca.Providers.checkBouncyCastleDeprecation ( provider , "KeyPairGenerator" , algorithm ) ; sun.security.jca.GetInstance.Instance instance = sun.security.jca.GetInstance.getInstance ( "KeyPairGenerator" , java.security.KeyPairGeneratorSpi.class , algorithm , provider ) ; return java.security.KeyPairGenerator.getInstance ( instance , algorithm ) ; }
Source:
public void testInvalidPackage ( ) throws java.lang.Exception { boolean output = false ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } }

Target:
public void testInvalidPackage ( ) throws java.lang.Exception { boolean output = false ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScoreManager , mWifiInjector ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } }
Source:
public static java.lang.String apiToMagic ( int targetApiLevel ) { java.lang.String version ; if ( targetApiLevel >= ( com.android.jack.dx.dex.DexFormat.API_ANDROID_O ) ) { version = com.android.jack.dx.dex.DexFormat.VERSION_FOR_API_26 ; } else if ( targetApiLevel >= ( com.android.jack.dx.dex.DexFormat.API_ANDROID_N ) ) { version = com.android.jack.dx.dex.DexFormat.VERSION_FOR_API_24 ; } else { version = com.android.jack.dx.dex.DexFormat.VERSION_FOR_API_13 ; } return ( ( com.android.jack.dx.dex.DexFormat.MAGIC_PREFIX ) + version ) + ( com.android.jack.dx.dex.DexFormat.MAGIC_SUFFIX ) ; }

Target:
public static int apiToDexVersion ( @ javax.annotation.Nonnull com.android.jack.util.AndroidApiLevel targetApiLevel ) { if ( targetApiLevel.isReleasedLevel ( ) ) { switch ( targetApiLevel.getReleasedLevel ( ) ) { case com.android.jack.dx.dex.DexFormat.API_ANDROID_N : { return com.android.jack.dx.dex.DexFormat.ANDROID_N_DEX_VERSION ; } default : { return com.android.jack.dx.dex.DexFormat.ANDROID_PRE_N_DEX_VERSION ; } } } else { switch ( targetApiLevel.getProvisionalLevel ( ) ) { case O_BETA1 : { return com.android.jack.dx.dex.DexFormat.ANDROID_N_DEX_VERSION ; } case O_BETA2 : { return com.android.jack.dx.dex.DexFormat.O_BETA2_DEX_VERSION ; } default : { throw new java.lang.UnsupportedOperationException ( ) ; } } } }
Source:
private static void assertSubArrayEquals ( byte [ ] expected , int len , byte [ ] actual ) { assertEquals ( len , actual.length ) ; for ( int i = 0 ; i < len ; ++ i ) { assertEquals ( expected [ i ] , actual [ i ] ) ; } }

Target:
private static int [ ] bytesToInts ( byte [ ] bytes ) { if ( bytes == null ) { return null ; } int [ ] ints = new int [ bytes.length ] ; for ( int i = 0 ; i < ( bytes.length ) ; i ++ ) { ints [ i ] = ( bytes [ i ] ) & 255 ; } return ints ; }
Source:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
public android.content.ContentValues coalesce ( java.util.List < android.content.ContentValues > individualRowsSortedByTimestampDesc ) { assertNoVoicemailsInRows ( individualRowsSortedByTimestampDesc ) ; return new com.android.dialer.calllog.datasources.util.RowCombiner ( individualRowsSortedByTimestampDesc ) . useMostRecentLong ( AnnotatedCallLog.TIMESTAMP ) . useMostRecentLong ( AnnotatedCallLog.NEW ) . useMostRecentBlob ( AnnotatedCallLog.NUMBER ) . useMostRecentString ( AnnotatedCallLog.FORMATTED_NUMBER ) . useMostRecentString ( AnnotatedCallLog.GEOCODED_LOCATION ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_ID ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_LABEL ) . useSingleValueLong ( AnnotatedCallLog.PHONE_ACCOUNT_COLOR ) . useMostRecentLong ( AnnotatedCallLog.CALL_TYPE ) . bitwiseOr ( AnnotatedCallLog.FEATURES ) . combine ( ) ; }

Target:
public android.content.ContentValues coalesce ( java.util.List < android.content.ContentValues > individualRowsSortedByTimestampDesc ) { assertNoVoicemailsInRows ( individualRowsSortedByTimestampDesc ) ; return new com.android.dialer.calllog.datasources.util.RowCombiner ( individualRowsSortedByTimestampDesc ) . useMostRecentLong ( AnnotatedCallLog.TIMESTAMP ) . useMostRecentLong ( AnnotatedCallLog.NEW ) . useMostRecentBlob ( AnnotatedCallLog.NUMBER ) . useMostRecentString ( AnnotatedCallLog.FORMATTED_NUMBER ) . useSingleValueInt ( AnnotatedCallLog.NUMBER_PRESENTATION ) . useMostRecentString ( AnnotatedCallLog.GEOCODED_LOCATION ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_COMPONENT_NAME ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_ID ) . useSingleValueString ( AnnotatedCallLog.PHONE_ACCOUNT_LABEL ) . useSingleValueLong ( AnnotatedCallLog.PHONE_ACCOUNT_COLOR ) . useMostRecentLong ( AnnotatedCallLog.CALL_TYPE ) . bitwiseOr ( AnnotatedCallLog.FEATURES ) . combine ( ) ; }
Source:
public void onTestFailure ( com.android.cts.core.runner.support.ITestResult result ) { java.lang.System.out.println ( java.lang.String.format ( "%s %s ::: %s" , com.android.cts.core.runner.support.SingleTestNGTestRunListener.Prefixes.ERROR_TEST_RUN_MARKER , getId ( result ) , stringify ( result.getThrowable ( ) ) ) ) ; }

Target:
public void onTestFailure ( com.android.cts.core.runner.support.ITestResult result ) { java.lang.String id = getId ( result ) ; java.lang.Throwable throwable = result.getThrowable ( ) ; java.lang.System.out.println ( java.lang.String.format ( "%s %s ::: %s" , com.android.cts.core.runner.support.SingleTestNGTestRunListener.Prefixes.ERROR_TEST_RUN_MARKER , id , stringify ( throwable ) ) ) ; failures.put ( id , throwable ) ; }
Source:
public void run ( ) { lock.lock ( ) ; try { startUp ( ) ; runningTask = scheduler ( ) . schedule ( delegate , executorService , task ) ; notifyStarted ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } finally { lock.unlock ( ) ; } }

Target:
public void run ( ) { try { lock.lock ( ) ; try { if ( ( state ( ) ) != ( com.google.common.util.concurrent.Service.State.STOPPING ) ) { return ; } shutDown ( ) ; } finally { lock.unlock ( ) ; } notifyStopped ( ) ; } catch ( java.lang.Throwable t ) { notifyFailed ( t ) ; throw com.google.common.base.Throwables.propagate ( t ) ; } }
Source:
private void incrementSimulatedDeviceClock ( int incMillis ) { long currentElapsedRealtime = mTimeServiceHelper.elapsedRealtime ( ) ; org.mockito.Mockito.when ( mTimeServiceHelper.elapsedRealtime ( ) ) . thenReturn ( ( currentElapsedRealtime + incMillis ) ) ; long currentTimeMillis = mTimeServiceHelper.currentTimeMillis ( ) ; org.mockito.Mockito.when ( mTimeServiceHelper.elapsedRealtime ( ) ) . thenReturn ( ( currentTimeMillis + incMillis ) ) ; }

Target:
void incrementClocks ( int millis ) { long currentElapsedRealtime = mTimeServiceHelper.elapsedRealtime ( ) ; org.mockito.Mockito.when ( mTimeServiceHelper.elapsedRealtime ( ) ) . thenReturn ( ( currentElapsedRealtime + millis ) ) ; long currentTimeMillis = mTimeServiceHelper.currentTimeMillis ( ) ; org.mockito.Mockito.when ( mTimeServiceHelper.currentTimeMillis ( ) ) . thenReturn ( ( currentTimeMillis + millis ) ) ; }
Source:
public boolean refresh ( boolean reload ) { if ( reload ) { try { mAvdManager.reloadAvds ( com.android.sdklib.NullSdkLog.getLogger ( ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { return false ; } } com.android.sdklib.internal.avd.AvdInfo selected = getSelected ( ) ; fillTable ( mTable ) ; setSelection ( selected ) ; return true ; }

Target:
public boolean refresh ( boolean reload ) { if ( reload ) { try { mAvdManager.reloadAvds ( com.android.utils.NullLogger.getLogger ( ) ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException e ) { return false ; } } com.android.sdklib.internal.avd.AvdInfo selected = getSelected ( ) ; fillTable ( mTable ) ; setSelection ( selected ) ; return true ; }
Source:
public byte [ ] getSignature ( ) { if ( ( signature ) == null ) return null ; byte [ ] dup = new byte [ signature.length ] ; java.lang.System.arraycopy ( signature , 0 , dup , 0 , dup.length ) ; return dup ; }

Target:
public byte [ ] getSignature ( ) { if ( ( signature ) == null ) return null ; return signature.clone ( ) ; }
Source:
public void onDeregistered ( com.android.ims.ImsReasonInfo imsReasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onImsDisconnected imsReasonInfo=" + imsReasonInfo ) ) ; resetImsCapabilities ( ) ; mPhone.setServiceState ( ServiceState.STATE_OUT_OF_SERVICE ) ; mPhone.setImsRegistered ( false ) ; mPhone.processDisconnectReason ( imsReasonInfo ) ; mMetrics.writeOnImsConnectionState ( mPhone.getPhoneId ( ) , ImsConnectionState.State.DISCONNECTED , imsReasonInfo ) ; }

Target:
public void onDeregistered ( android.telephony.ims.ImsReasonInfo imsReasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onImsDisconnected imsReasonInfo=" + imsReasonInfo ) ) ; resetImsCapabilities ( ) ; mPhone.setServiceState ( ServiceState.STATE_OUT_OF_SERVICE ) ; mPhone.setImsRegistered ( false ) ; mPhone.processDisconnectReason ( imsReasonInfo ) ; mMetrics.writeOnImsConnectionState ( mPhone.getPhoneId ( ) , ImsConnectionState.State.DISCONNECTED , imsReasonInfo ) ; }
Source:
private void deleteBestEffort ( java.io.File dir ) { if ( dir.exists ( ) ) { android.util.Slog.i ( logTag , ( "Deleting " + dir ) ) ; try { libcore.tzdata.update2.FileUtils.deleteRecursive ( dir ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( logTag , ( "Unable to delete " + dir ) , e ) ; } } }

Target:
private void deleteBestEffort ( java.io.File dir ) { if ( dir.exists ( ) ) { android.util.Slog.i ( logTag , ( "Deleting " + dir ) ) ; try { libcore.tzdata.shared2.FileUtils.deleteRecursive ( dir ) ; } catch ( java.io.IOException e ) { android.util.Slog.w ( logTag , ( "Unable to delete " + dir ) , e ) ; } } }
Source:
public int computeVerticalScrollExtent ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { int ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer call ( ) { return computeVerticalScrollExtent ( ) ; } } ) ; return ret ; } return mAwContents.computeVerticalScrollExtent ( ) ; }

Target:
public boolean overlayHorizontalScrollbar ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }
Source:
private com.android.dialer.voicemail.listui.NewVoicemailViewHolder getCurrentlyExpandedViewHolder ( ) { if ( newVoicemailViewHolderArrayMap.containsKey ( currentlyExpandedViewHolderId ) ) { com.android.dialer.common.Assert.checkArgument ( ( ( newVoicemailViewHolderArrayMap.get ( currentlyExpandedViewHolderId ) . getViewHolderId ( ) ) == ( currentlyExpandedViewHolderId ) ) ) ; return newVoicemailViewHolderArrayMap.get ( currentlyExpandedViewHolderId ) ; } else { com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.getCurrentlyExpandedViewHolder" , "no view holder found in hashmap size:%d for %d" , newVoicemailViewHolderArrayMap.size ( ) , currentlyExpandedViewHolderId ) ; printHashSet ( ) ; printHashMap ( ) ; return null ; } }

Target:
private com.android.dialer.voicemail.listui.NewVoicemailViewHolder getCurrentlyExpandedViewHolder ( ) { if ( newVoicemailViewHolderArrayMap.containsKey ( currentlyExpandedViewHolderId ) ) { com.android.dialer.common.Assert.checkArgument ( ( ( newVoicemailViewHolderArrayMap.get ( currentlyExpandedViewHolderId ) . getViewHolderId ( ) ) == ( currentlyExpandedViewHolderId ) ) ) ; return newVoicemailViewHolderArrayMap.get ( currentlyExpandedViewHolderId ) ; } else { com.android.dialer.common.LogUtil.i ( "NewVoicemailAdapter.getCurrentlyExpandedViewHolder" , "no view holder found in hashmap size:%d for %d" , newVoicemailViewHolderArrayMap.size ( ) , currentlyExpandedViewHolderId ) ; printHashSet ( ) ; printArrayMap ( ) ; return null ; } }
Source:
private void init ( ) { createTime ( mTimeZone ) ; chooseFormat ( false ) ; }

Target:
private void init ( ) { if ( ( ( mFormat12 ) == null ) || ( ( mFormat24 ) == null ) ) { libcore.icu.LocaleData ld = libcore.icu.LocaleData.get ( getContext ( ) . getResources ( ) . getConfiguration ( ) . locale ) ; if ( ( mFormat12 ) == null ) { mFormat12 = ld.timeFormat12 ; } if ( ( mFormat24 ) == null ) { mFormat24 = ld.timeFormat24 ; } } createTime ( mTimeZone ) ; chooseFormat ( false ) ; }
Source:
public static void startFetchingChannelLogos ( android.content.Context context ) { if ( ! ( com.android.tv.util.PermissionUtils.hasAccessAllEpg ( context ) ) ) { return ; } synchronized ( com.android.tv.data.ChannelLogoFetcher.sLock ) { com.android.tv.data.ChannelLogoFetcher.stopFetchingChannelLogos ( ) ; if ( com.android.tv.data.ChannelLogoFetcher.DEBUG ) android.util.Log.d ( com.android.tv.data.ChannelLogoFetcher.TAG , "Request to start fetching logos." ) ; com.android.tv.data.ChannelLogoFetcher.sQueryTask = new com.android.tv.data.ChannelLogoFetcher.LoadChannelTask ( context ) ; com.android.tv.data.ChannelLogoFetcher.sQueryTask.executeOnDbThread ( ) ; } }

Target:
public static synchronized void startFetchingChannelLogos ( android.content.Context context , java.util.List < com.android.tv.data.Channel > channels ) { if ( ! ( com.android.tv.util.PermissionUtils.hasAccessAllEpg ( context ) ) ) { return ; } if ( ( com.android.tv.data.ChannelLogoFetcher.sFetchTask ) != null ) { com.android.tv.data.ChannelLogoFetcher.sFetchTask.cancel ( true ) ; } if ( com.android.tv.data.ChannelLogoFetcher.DEBUG ) android.util.Log.d ( com.android.tv.data.ChannelLogoFetcher.TAG , "Request to start fetching logos." ) ; if ( ( channels == null ) || ( channels.isEmpty ( ) ) ) { return ; } com.android.tv.data.ChannelLogoFetcher.sFetchTask = new com.android.tv.data.ChannelLogoFetcher.FetchLogoTask ( context , channels ) ; com.android.tv.data.ChannelLogoFetcher.sFetchTask.execute ( ) ; }
Source:
private void render ( final com.android.builder.dependency.LibraryDependency lib , boolean lastChild ) { renderer.visit ( new org.gradle.api.Action < org.gradle.logging.StyledTextOutput > ( ) { @ java.lang.Override public void execute ( org.gradle.logging.StyledTextOutput styledTextOutput ) { getTextOutput ( ) . text ( ( ( com.android.builder.dependency.LibraryBundle ) ( lib ) ) . getName ( ) ) ; } } , lastChild ) ; renderChildren ( lib.getDependencies ( ) ) ; }

Target:
private void render ( final com.android.builder.dependency.LibraryDependency lib , boolean lastChild ) { renderer.visit ( new org.gradle.api.Action < org.gradle.logging.StyledTextOutput > ( ) { @ java.lang.Override public void execute ( org.gradle.logging.StyledTextOutput styledTextOutput ) { getTextOutput ( ) . text ( ( ( com.android.builder.dependency.LibraryBundle ) ( lib ) ) . getName ( ) ) ; } } , lastChild ) ; renderChildren ( lib.getDependencies ( ) , lib.getLocalDependencies ( ) ) ; }
Source:
private java.lang.String getLeafFileName ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode ui_node ) { if ( ui_node != null ) { com.android.ide.eclipse.adt.internal.editors.AndroidEditor editor = ui_node.getEditor ( ) ; if ( editor != null ) { org.eclipse.ui.IEditorInput editorInput = editor.getEditorInput ( ) ; if ( editorInput instanceof org.eclipse.ui.part.FileEditorInput ) { org.eclipse.core.resources.IFile f = ( ( org.eclipse.ui.part.FileEditorInput ) ( editorInput ) ) . getFile ( ) ; if ( f != null ) { java.lang.String leafName = f.getFullPath ( ) . removeFileExtension ( ) . lastSegment ( ) ; return "*" + leafName ; } } } } return null ; }

Target:
private java.lang.String getLeafFileName ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode ui_node ) { if ( ui_node != null ) { com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor editor = ui_node.getEditor ( ) ; if ( editor != null ) { org.eclipse.ui.IEditorInput editorInput = editor.getEditorInput ( ) ; if ( editorInput instanceof org.eclipse.ui.part.FileEditorInput ) { org.eclipse.core.resources.IFile f = ( ( org.eclipse.ui.part.FileEditorInput ) ( editorInput ) ) . getFile ( ) ; if ( f != null ) { java.lang.String leafName = f.getFullPath ( ) . removeFileExtension ( ) . lastSegment ( ) ; return "*" + leafName ; } } } } return null ; }
Source:
private void recordAxis ( int axis ) { delay ( 1000 ) ; mActivity.switchAxisAsync ( axis ) ; mActivity.playNotifySound ( 0 ) ; mActivity.waitUntilCovered ( axis ) ; mActivity.playNotifySound ( 1 ) ; }

Target:
private void recordAxis ( int axis ) { delay ( 1000 ) ; mActivity.switchAxisAsync ( axis ) ; mActivity.playNotifySound ( "start" ) ; if ( axis != ( android.hardware.SensorManager.AXIS_Z ) ) { mActivity.waitUntilHalfCovered ( axis ) ; mActivity.playNotifySound ( "half-way" ) ; } mActivity.waitUntilCovered ( axis ) ; mActivity.playNotifySound ( "end" ) ; }
Source:
private void bindView ( android.view.View view , android.app.LauncherActivity.ListItem item ) { android.widget.TextView text = ( ( android.widget.TextView ) ( view ) ) ; text.setText ( item.label ) ; if ( mShowIcons ) { if ( ( item.icon ) == null ) { item.icon = mIconResizer.createIconThumbnail ( item.resolveInfo.loadIcon ( getPackageManager ( ) ) ) ; } text.setCompoundDrawablesWithIntrinsicBounds ( item.icon , null , null , null ) ; } }

Target:
private void bindView ( android.view.View view , android.app.LauncherActivity.ListItem item ) { android.widget.TextView text = ( ( android.widget.TextView ) ( view ) ) ; text.setText ( item.label ) ; if ( mShowIcons ) { if ( ( item.icon ) == null ) { item.icon = mIconResizer.createIconThumbnail ( item.resolveInfo.loadIcon ( getPackageManager ( ) ) ) ; } text.setCompoundDrawablesRelativeWithIntrinsicBounds ( item.icon , null , null , null ) ; } }
Source:
public void testSetupDriverForSoftApModeError ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForSoftApMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IApInterface returnedApInterface = mWifiNative.setupForSoftApMode ( ) ; org.junit.Assert.assertEquals ( null , returnedApInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( false ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForSoftApMode ( ) ; }

Target:
public void testSetupDriverForSoftApModeError ( ) { org.mockito.Mockito.when ( mWificondControl.setupDriverForSoftApMode ( ) ) . thenReturn ( null ) ; android.net.wifi.IApInterface returnedApInterface = mWifiNative.setupForSoftApMode ( ) ; org.junit.Assert.assertEquals ( null , returnedApInterface ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . startVendorHal ( org.mockito.Mockito.eq ( false ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . setupDriverForSoftApMode ( ) ; }
Source:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , 15 ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_BUILD_API , mValues.target.getVersion ( ) . getApiLevel ( ) ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; }

Target:
private void addProjectInfo ( java.util.Map < java.lang.String , java.lang.Object > parameters ) { parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_PACKAGE_NAME , mValues.packageName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_TITLE , mValues.applicationName ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API , mValues.minSdk ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_MIN_API_LEVEL , mValues.minSdkLevel ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_TARGET_API , 15 ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_BUILD_API , mValues.target.getVersion ( ) . getApiLevel ( ) ) ; parameters.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_COPY_ICONS , ( ! ( mValues.createIcon ) ) ) ; parameters.putAll ( mValues.parameters ) ; }
Source:
public void testApplyingWithCaseChangedNames ( ) throws java.lang.Exception { com.intellij.openapi.util.io.FileUtil.rename ( new java.io.File ( myOlderDir , "Readme.txt" ) , new java.io.File ( myOlderDir , "README.txt" ) ) ; com.intellij.updater.PatchFileCreator.create ( "from" , "to" , myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; assertAppliedAndRevertedCorrectly ( com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ) ; }

Target:
public void testConsideringOptions ( ) throws java.lang.Exception { com.intellij.updater.Patch patch = createPatch ( ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; java.util.Map < java.lang.String , com.intellij.updater.ValidationResult.Option > options = new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) ; for ( com.intellij.updater.PatchAction each : preparationResult.patch.getActions ( ) ) { options.put ( each.getPath ( ) , ValidationResult.Option.IGNORE ) ; } assertNothingHasChanged ( patch , preparationResult , options ) ; }
Source:
public void tesNoSplitDelegateLastNoSharedLibraries ( ) { android.content.pm.ApplicationInfo ai = createMockApplicationInfo ( com.android.server.pm.dex.DexoptUtilsTest.DELEGATE_LAST_CLASS_LOADER_NAME , false , false ) ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( ai , null ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "DLC[]" , contexts [ 0 ] ) ; }

Target:
public void tesNoSplitDelegateLast ( ) { android.content.pm.ApplicationInfo ai = createMockApplicationInfo ( com.android.server.pm.dex.DexoptUtilsTest.DELEGATE_LAST_CLASS_LOADER_NAME , false , false ) ; java.lang.String [ ] sharedLibrary = new java.lang.String [ ] { "a.dex" , "b.dex" } ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( ai , sharedLibrary ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[a.dex:b.dex]" , contexts [ 0 ] ) ; }
Source:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; java.util.regex.Pattern possibleNumberPattern = regexCache.getPatternForRegex ( metadata.getGeneralDesc ( ) . getPossibleNumberPattern ( ) ) ; return testNumberLengthAgainstPattern ( possibleNumberPattern , nationalNumber ) ; }

Target:
private boolean isShorterThanPossibleNormalNumber ( com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata regionMetadata , java.lang.String number ) { java.util.regex.Pattern possibleNumberPattern = regexCache.getPatternForRegex ( regionMetadata.generalDesc.possibleNumberPattern ) ; return ( testNumberLengthAgainstPattern ( possibleNumberPattern , number ) ) == ( com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT ) ; }
Source:
public void clear ( java.lang.String timezone ) { if ( timezone == null ) { throw new java.lang.NullPointerException ( "timezone is null!" ) ; } this . timezone = timezone ; this . allDay = false ; this . second = 0 ; this . minute = 0 ; this . hour = 0 ; this . monthDay = 0 ; this . month = 0 ; this . year = 0 ; this . weekDay = 0 ; this . yearDay = 0 ; this . gmtoff = 0 ; this . isDst = - 1 ; }

Target:
public void switchTimezone ( java.lang.String timezone ) { calculator.copyFieldsFromTime ( this ) ; calculator.switchTimeZone ( timezone ) ; calculator.copyFieldsToTime ( this ) ; this . timezone = timezone ; }
Source:
public final void testGetSystemScope ( ) { java.lang.String name = java.security.Security.getProperty ( "system.scope" ) ; assertNotNull ( name ) ; java.security.IdentityScope scope = java.security.IdentityScope.getSystemScope ( ) ; assertNotNull ( scope ) ; assertEquals ( name , scope.getClass ( ) . getName ( ) ) ; }

Target:
public final void testGetSystemScope ( ) { java.lang.String name = java.security.Security.getProperty ( "system.scope" ) ; assertNull ( name ) ; java.security.IdentityScope scope = java.security.IdentityScope.getSystemScope ( ) ; assertNull ( scope ) ; }
Source:
private static java.lang.ref.WeakReference < java.lang.ClassLoader > setUpLoadLibrary ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ClassLoader loader = ( ( java.lang.ClassLoader ) ( constructor.newInstance ( Main.DEX_FILE , java.lang.ClassLoader.getSystemClassLoader ( ) ) ) ) ; java.lang.Class intHolder = loader.loadClass ( "IntHolder" ) ; java.lang.reflect.Method setValue = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; setValue.invoke ( intHolder , Main.nativeLibraryName ) ; return new java.lang.ref.WeakReference ( loader ) ; }

Target:
private static void waitForCompilation ( java.lang.Class intHolder ) throws java.lang.Exception { java.lang.reflect.Method loadLibrary = intHolder.getDeclaredMethod ( "loadLibrary" , java.lang.String.class ) ; loadLibrary.invoke ( intHolder , Main.nativeLibraryName ) ; java.lang.reflect.Method waitForCompilation = intHolder.getDeclaredMethod ( "waitForCompilation" ) ; waitForCompilation.invoke ( intHolder ) ; }