auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String iqn , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setuser_name ( user ) ; connectionDetails.setpassword ( password ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String iqn , java.lang.String port , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setport ( port ) ; connectionDetails.setuser_name ( user ) ; connectionDetails.setpassword ( password ) ; return connectionDetails ; }
Source:
protected java.lang.String createRequestToken ( ) { java.lang.String subTabName = modelProvider.getModel ( ) . getActiveDetailModel ( ) . getTitle ( ) . toLowerCase ( ) . replace ( " " , "_" ) ; java.lang.String requestToken = ( ( getSideTabRequest ( ) . getNameToken ( ) ) + ( org.ovirt.engine.ui.userportal.place.ApplicationPlaces.SUB_TAB_PREFIX ) ) + subTabName ; return requestToken ; }

Target:
protected java.lang.String createRequestToken ( ) { java.lang.String subTabName = modelProvider.getModel ( ) . getActiveDetailModel ( ) . getHashName ( ) ; java.lang.String requestToken = ( ( getSideTabRequest ( ) . getNameToken ( ) ) + ( org.ovirt.engine.ui.userportal.place.ApplicationPlaces.SUB_TAB_PREFIX ) ) + subTabName ; return requestToken ; }
Source:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( ( cachedCallback ) == null ) { cachedCallback = new org.ovirt.engine.core.bll.ConvertVmCallback ( org.ovirt.engine.core.bll.ConvertVmCommand.getCommandId ( ) ) ; if ( ( getCommandExecutionStatus ( ) ) == ( org.ovirt.engine.core.compat.backendcompat.CommandExecutionStatus.EXECUTED ) ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , JobStatus.UNKNOWN ) ; } } return cachedCallback ; }

Target:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( ( cachedCallback ) == null ) { cachedCallback = new org.ovirt.engine.core.bll.ConvertVmCallback ( org.ovirt.engine.core.bll.ConvertVmCommand.getCommandId ( ) ) ; if ( ( getCommandExecutionStatus ( ) ) == ( org.ovirt.engine.core.compat.backendcompat.CommandExecutionStatus.EXECUTED ) ) { monitorV2VJob ( JobStatus.UNKNOWN ) ; } } return cachedCallback ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLUNs ( org.ovirt.engine.core.compat.Guid storageDomainId , java.lang.String vgId ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setStorageDomainId ( storageDomainId ) ; lun1.setvolume_group_id ( vgId ) ; lun1.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setStorageDomainId ( storageDomainId ) ; lun2.setvolume_group_id ( vgId ) ; lun2.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLUNs ( org.ovirt.engine.core.compat.Guid sdId , java.lang.String vgId ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setStorageDomainId ( sdId ) ; lun1.setvolume_group_id ( vgId ) ; lun1.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setStorageDomainId ( sdId ) ; lun2.setvolume_group_id ( vgId ) ; lun2.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; }
Source:
public boolean executeUpdateVmInSpmCommand ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > > metaDictionary , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters ( storagePoolId , metaDictionary ) ; tempVar.setStorageDomainId ( storageDomainId ) ; return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . runVdsCommand ( VDSCommandType.UpdateVM , tempVar ) . getSucceeded ( ) ; }

Target:
public boolean executeUpdateVmInSpmCommand ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > > metaDictionary , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters ( storagePoolId , metaDictionary ) ; tempVar.setStorageDomainId ( storageDomainId ) ; return resourceManager.runVdsCommand ( VDSCommandType.UpdateVM , tempVar ) . getSucceeded ( ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( other instanceof org.ovirt.engine.core.utils.customprop.ValidationError ) { org.ovirt.engine.core.utils.customprop.ValidationError otherError = ( ( org.ovirt.engine.core.utils.customprop.ValidationError ) ( other ) ) ; return ( keyName.equals ( otherError.getKeyName ( ) ) ) && ( ( reason ) == ( otherError.getReason ( ) ) ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object other ) { if ( other instanceof org.ovirt.engine.core.common.utils.customprop.ValidationError ) { org.ovirt.engine.core.common.utils.customprop.ValidationError otherError = ( ( org.ovirt.engine.core.common.utils.customprop.ValidationError ) ( other ) ) ; return ( keyName.equals ( otherError.getKeyName ( ) ) ) && ( ( reason ) == ( otherError.getReason ( ) ) ) ; } return false ; }
Source:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( this ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , auditLogDirector ) . perform ( ) ; } }

Target:
private void refreshCachedVds ( ) { cachedVds = dbFacade.getVdsDao ( ) . get ( getVdsId ( ) ) ; setMonitoringNeeded ( ) ; }
Source:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.CLUSTER_ID ) ; existingCluster.setName ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setcompatibility_version ( version ) ; createObjects ( version ) ; }

Target:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.CLUSTER_ID ) ; existingCluster.setName ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setcompatibility_version ( version ) ; existingCluster.setGlusterCliBasedSchedulingOn ( true ) ; createObjects ( version ) ; }
Source:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.GROUP ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , args.get ( "group" ) ) . mput ( Schema.SharedKeys.ADD_GROUP , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.getGroup ( context ) ; if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_show" ) . invoke ( context ) ; } }
Source:
private static org.ovirt.engine.core.compat.Version getApplicationVersion ( final java.lang.String part , final java.lang.String appName ) { try { return new org.ovirt.engine.core.compat.RpmVersion ( part , org.ovirt.engine.core.bll.VmHandler.getAppName ( part , appName ) , true ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.VmHandler.log.debugFormat ( "Failed to create rpm version object, part: {0} appName: {1}, error: {2}" , part , appName , e.toString ( ) ) ; return null ; } }

Target:
private static org.ovirt.engine.core.compat.Version getApplicationVersion ( final java.lang.String part , final java.lang.String appName ) { try { return new org.ovirt.engine.core.compat.RpmVersion ( part , org.ovirt.engine.core.bll.VmHandler.getAppName ( part , appName ) , true ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.VmHandler.log.debug ( "Failed to create rpm version object, part '{}' appName '{}': {}" , part , appName , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.VmHandler.log.debug ( "Exception" , e ) ; return null ; } }
Source:
private void performGeoRepAction ( java.lang.String commandName , java.lang.String confirmTitle , org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag , java.lang.String hashName , java.lang.String action , org.ovirt.engine.core.common.action.VdcActionType actionType , java.lang.String actionProgressText ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession selectedSession = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession ) ( getSelectedItem ( ) ) ) ; if ( selectedSession == null ) { return ; } initializeGeoRepActionConfirmation ( confirmTitle , helpTag , hashName , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.constants.geoRepForceHelp ( ) , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.messages.geoRepForceTitle ( action ) , commandName ) ; onGeoRepSessionAction ( actionType ) ; }

Target:
private void performGeoRepAction ( java.lang.String commandName , java.lang.String confirmTitle , org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag , java.lang.String hashName , java.lang.String action , org.ovirt.engine.core.common.action.VdcActionType actionType , java.lang.String actionProgressText ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession selectedSession = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession ) ( getSelectedItem ( ) ) ) ; if ( selectedSession == null ) { return ; } initializeGeoRepActionConfirmation ( confirmTitle , helpTag , hashName , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.constants.geoRepForceHelp ( ) , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.messages.geoRepForceTitle ( action ) , commandName , selectedSession.getMasterVolumeName ( ) , selectedSession.getSlaveVolumeName ( ) , selectedSession.getSlaveHostName ( ) ) ; onGeoRepSessionAction ( actionType ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.aaa.DbGroup getGroup ( ) { if ( ( ( mGroup ) == null ) && ( ! ( getGroupId ( ) . equals ( Guid.Empty ) ) ) ) { mGroup = org.ovirt.engine.core.bll.aaa.AdGroupsHandlingCommandBase.getAdGroupDAO ( ) . get ( org.ovirt.engine.core.bll.aaa.AdGroupsHandlingCommandBase.getParameters ( ) . getId ( ) ) ; } return mGroup ; }

Target:
protected org.ovirt.engine.core.common.businessentities.aaa.DbGroup getGroup ( ) { if ( ( ( mGroup ) == null ) && ( ! ( getGroupId ( ) . equals ( Guid.Empty ) ) ) ) { mGroup = org.ovirt.engine.core.bll.aaa.AdGroupsHandlingCommandBase.getAdGroupDao ( ) . get ( org.ovirt.engine.core.bll.aaa.AdGroupsHandlingCommandBase.getParameters ( ) . getId ( ) ) ; } return mGroup ; }
Source:
public void testSubscribe ( ) { dao.subscribe ( newSubscription ) ; java.util.List < org.ovirt.engine.core.common.businessentities.EventSubscriber > result = dao.getAllForSubscriber ( newSubscription.getSubscriberId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.EventSubscriber subscription : result ) { org.junit.Assert.assertEquals ( newSubscriber , subscription.getSubscriberId ( ) ) ; } }

Target:
public void testSubscribe ( ) { dao.subscribe ( newSubscription ) ; java.util.List < org.ovirt.engine.core.common.businessentities.EventSubscriber > result = dao.getAllForSubscriber ( newSubscription.getSubscriberId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.EventSubscriber subscription : result ) { org.junit.jupiter.api.Assertions.assertEquals ( newSubscriber , subscription.getSubscriberId ( ) ) ; } }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Permissions getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.Permissions permission = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; permission.setId ( GUIDS [ index ] ) ; permission.setAdElementId ( GUIDS [ 1 ] ) ; permission.setObjectId ( GUIDS [ 2 ] ) ; permission.setObjectType ( VdcObjectType.StoragePool ) ; permission.setRoleId ( GUIDS [ 3 ] ) ; return permission ; }

Target:
protected org.ovirt.engine.api.model.Permission getEntity ( int index ) { org.ovirt.engine.api.model.Permission permission = new org.ovirt.engine.api.model.Permission ( ) ; permission.setId ( GUIDS [ index ] ) ; permission.setAdElementId ( GUIDS [ 1 ] ) ; permission.setObjectId ( GUIDS [ 2 ] ) ; permission.setObjectType ( VdcObjectType.StoragePool ) ; permission.setRoleId ( GUIDS [ 3 ] ) ; return permission ; }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runPublicQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: runPublicQuery invoked! '{}'" , queryType ) ; debugQuery ( queryType , params ) ; return getBackend ( ) . runPublicQuery ( queryType , params ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runPublicQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: runPublicQuery invoked! '{}'" , queryType ) ; debugQuery ( queryType , params ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = getBackend ( ) . runPublicQuery ( queryType , params ) ; returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( org.ovirt.engine.ui.frontend.server.gwt.hibernate.HibernateCleaner.doClean ( returnValue ) ) ) ; return returnValue ; }
Source:
protected void ExecuteVmCommand ( ) { org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) , org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) ) ; if ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) == ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) ) { createDiskBasedOnImage ( ) ; } else { createDiskBasedOnLun ( ) ; } }

Target:
protected void executeVmCommand ( ) { org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) , org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) ) ; if ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) == ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) ) { createDiskBasedOnImage ( ) ; } else { createDiskBasedOnLun ( ) ; } }
Source:
private boolean isVlanOverBondNetwork ( java.lang.String bondName , java.lang.String networkName ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : _vds.getInterfaces ( ) ) { java.lang.String name = org.ovirt.engine.core.utils.NetworkUtils.getVlanInterfaceName ( iface.getName ( ) ) ; if ( name == null ) { continue ; } else if ( ( name.equals ( bondName ) ) && ( networkName.equals ( iface.getNetworkName ( ) ) ) ) { return true ; } } return false ; }

Target:
private static boolean isVlanOverBondNetwork ( java.lang.String bondName , java.lang.String networkName , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : interfaces ) { java.lang.String name = org.ovirt.engine.core.utils.NetworkUtils.getVlanInterfaceName ( iface.getName ( ) ) ; if ( name == null ) { continue ; } else if ( ( name.equals ( bondName ) ) && ( networkName.equals ( iface.getNetworkName ( ) ) ) ) { return true ; } } return false ; }
Source:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.common.businessentities.qos.CpuQos qos = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCpuQosDao ( ) . getCpuQosByVmId ( vmId ) ; if ( ( qos != null ) && ( ( qos.getCpuLimit ( ) ) != null ) ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.UpdateVmPolicy , new org.ovirt.engine.core.common.vdscommands.UpdateVmPolicyVDSParams ( vdsId , vmId , qos.getCpuLimit ( ) . intValue ( ) ) ) ; } } }

Target:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.common.businessentities.qos.CpuQos qos = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCpuQosDao ( ) . getCpuQosByVmId ( vmId ) ; if ( ( qos != null ) && ( ( qos.getCpuLimit ( ) ) != null ) ) { resourceManagerProvider.get ( ) . runVdsCommand ( VDSCommandType.UpdateVmPolicy , new org.ovirt.engine.core.common.vdscommands.UpdateVmPolicyVDSParams ( vdsId , vmId , qos.getCpuLimit ( ) . intValue ( ) ) ) ; } } }
Source:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmWatchdogDevices = getVmWatchdogDevices ( ) ; if ( ( vmWatchdogDevices != null ) && ( ! ( vmWatchdogDevices.isEmpty ( ) ) ) ) { return failValidation ( EngineMessage.WATCHDOG_ALREADY_EXISTS ) ; } if ( ! ( validate ( validateWatchdog ( ) ) ) ) { return false ; } return true ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmDevice watchdogDevice = vmDeviceUtils.addWatchdogDevice ( getParameters ( ) . getId ( ) , getSpecParams ( ) ) ; setSucceeded ( true ) ; setActionReturnValue ( watchdogDevice.getId ( ) . getDeviceId ( ) ) ; }
Source:
public void testWith0ScoreHost ( ) { parameters.put ( PolicyUnitParameter.HE_SPARES_COUNT.getDbName ( ) , "3" ) ; hostedEngine.setVmMemSizeMb ( 7000 ) ; hosts.get ( 2 ) . setHighlyAvailableScore ( 0 ) ; hosts.get ( 3 ) . setPhysicalMemMb ( 2048 ) ; hosts.get ( 4 ) . setPhysicalMemMb ( 2048 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = policyUnit.filter ( cluster , hosts , vm , parameters , messages ) ; org.junit.Assert.assertEquals ( 4 , result.size ( ) ) ; }

Target:
public void testWith0ScoreHost ( ) { parameters.put ( PolicyUnitParameter.HE_SPARES_COUNT.getDbName ( ) , "3" ) ; hostedEngine.setVmMemSizeMb ( 7000 ) ; hosts.get ( 2 ) . setHighlyAvailableScore ( 0 ) ; hosts.get ( 3 ) . setPhysicalMemMb ( 2048 ) ; hosts.get ( 4 ) . setPhysicalMemMb ( 2048 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = policyUnit.filter ( cluster , hosts , vm , parameters , messages ) ; org.junit.jupiter.api.Assertions.assertEquals ( 4 , result.size ( ) ) ; }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; collection.setUriInfo ( setUpUriExpectations ( null ) ) ; setUpEntityQueryExpectations ( org.ovirt.engine.api.restapi.resource.FAILURE ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , new java.lang.RuntimeException ( FAILURE ) ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; collection.setUriInfo ( setUpUriExpectations ( null ) ) ; setUpEntityQueryExpectations ( org.ovirt.engine.api.restapi.resource.FAILURE ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , new java.lang.RuntimeException ( FAILURE ) ) ; } finally { locales.clear ( ) ; } }
Source:
public void onSuccess ( java.lang.Object parenModel , java.lang.Object returnValue ) { deactivate ( ) ; getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setEntity ( ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; activate ( ) ; updateRngDevice ( vmBase ) ; }

Target:
public void onSuccess ( java.lang.Object parenModel , java.lang.Object returnValue ) { deactivate ( ) ; getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setEntity ( ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; activate ( ) ; if ( continueWithNext ) { updateRngDevice ( vmBase ) ; } }
Source:
public java.lang.String getVmPoolName ( ) { if ( ( ( mVmPoolName ) == null ) && ( ( mVmPool ) == null ) ) { mVmPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDAO ( ) . get ( getVmPoolId ( ) ) ; if ( ( mVmPool ) != null ) { mVmPoolName = mVmPool.getvm_pool_name ( ) ; } } return mVmPoolName ; }

Target:
public java.lang.String getVmPoolName ( ) { if ( ( ( mVmPoolName ) == null ) && ( ( mVmPool ) == null ) ) { mVmPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . get ( getVmPoolId ( ) ) ; if ( ( mVmPool ) != null ) { mVmPoolName = mVmPool.getvm_pool_name ( ) ; } } return mVmPoolName ; }
Source:
public void endWithFailure ( ) { for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } endCreateAllSnapshots ( ) ; unlockAllDiskSnapshots ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , false ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void endWithFailure ( ) { for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } endCreateAllSnapshots ( ) ; unlockAllDiskSnapshots ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , false ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; enclosingCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.image_storage_domain_map saveImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getQuotaId ( ) , diskImage.getDiskProfileId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( image_storage_domain_map ) ; return image_storage_domain_map ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap saveImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap = new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( diskImage.getImageId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getQuotaId ( ) , diskImage.getDiskProfileId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( imageStorageDomainMap ) ; return imageStorageDomainMap ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return 262144 ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; params.setRefresh ( false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , params , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmBase getSource ( ) { if ( ! ( ( getModel ( ) . getInstanceTypes ( ) . getSelectedItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.vms.CustomInstanceType ) ) { return ( ( org.ovirt.engine.core.common.businessentities.VmBase ) ( getModel ( ) . getInstanceTypes ( ) . getSelectedItem ( ) ) ) ; } else { return getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; } }

Target:
protected org.ovirt.engine.core.common.businessentities.VmBase getSource ( ) { if ( ! ( ( getModel ( ) . getInstanceTypes ( ) . getSelectedItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.vms.CustomInstanceType ) ) { return ( ( org.ovirt.engine.core.common.businessentities.VmBase ) ( getModel ( ) . getInstanceTypes ( ) . getSelectedItem ( ) ) ) ; } else { return ( getModel ( ) . getTemplateWithVersion ( ) . getSelectedItem ( ) ) == null ? null : getModel ( ) . getTemplateWithVersion ( ) . getSelectedItem ( ) . getTemplateVersion ( ) ; } }
Source:
public static void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getBroker ( ) . fenceSpmStorage ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getParameters ( ) . getPrevId ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getParameters ( ) . getPrevLVER ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getBroker ( ) . fenceSpmStorage ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getParameters ( ) . getPrevId ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.getParameters ( ) . getPrevLVER ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FenceSpmStorageVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "id" , getId ( ) ) . append ( "networkId" , getNetworkId ( ) ) . append ( "networkQosId" , getNetworkQosId ( ) ) . append ( "portMirroring" , isPortMirroring ( ) ) . append ( "passthrough" , isPassthrough ( ) ) . append ( "customProperties" , getCustomProperties ( ) ) . append ( "description" , getDescription ( ) ) . build ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "id" , getId ( ) ) . append ( "networkId" , getNetworkId ( ) ) . append ( "networkQosId" , getNetworkQosId ( ) ) . append ( "portMirroring" , isPortMirroring ( ) ) . append ( "passthrough" , isPassthrough ( ) ) . append ( "customProperties" , getCustomProperties ( ) ) . append ( "description" , getDescription ( ) ) . append ( "networkFilterId" , getNetworkFilterId ( ) ) . build ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateBootSequenceItems ( ) ; bootSequenceBox.setSelectedIndex ( bootSequenceModel.getSelectedItemIndex ( ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { boolean isEnabled = bootSequenceModel.getCdromOption ( ) . getIsChangable ( ) ; java.lang.String itemName = bootSequenceModel.getCdromOption ( ) . getTitle ( ) ; updateItemAvailability ( itemName , isEnabled ) ; }
Source:
public void customPropertiesNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }

Target:
public void bridgePropertiesNonVm ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; network.setVmNetwork ( false ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_BAD_INPUT , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }
Source:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }

Target:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void resetAfterLogout ( ) { getUserName ( ) . setEntity ( null ) ; getPassword ( ) . setEntity ( null ) ; getPassword ( ) . setIsChangable ( true ) ; getUserName ( ) . setIsChangable ( true ) ; getDomain ( ) . setIsChangable ( true ) ; getLoginCommand ( ) . setIsExecutionAllowed ( true ) ; loggingInAutomatically = false ; }

Target:
public void resetAfterLogout ( ) { getUserName ( ) . setEntity ( null ) ; getPassword ( ) . setEntity ( null ) ; getPassword ( ) . setIsChangable ( true ) ; getUserName ( ) . setIsChangable ( true ) ; getDomain ( ) . setIsChangable ( true ) ; getLoginCommand ( ) . setIsExecutionAllowed ( true ) ; loggingInAutomatically = false ; StopProgress ( ) ; }
Source:
public org.apache.http.protocol.BasicHttpContext getContext ( ) { org.apache.http.protocol.BasicHttpContext context = new org.apache.http.protocol.BasicHttpContext ( ) ; if ( this . persistentAuth ) { context.setAttribute ( ClientContext.COOKIE_STORE , this . pool.getCookieStore ( ) ) ; } return context ; }

Target:
private org.apache.http.protocol.BasicHttpContext getContext ( ) { org.apache.http.protocol.BasicHttpContext context = new org.apache.http.protocol.BasicHttpContext ( ) ; if ( ( this . persistentAuth ) && ( org.ovirt.engine.sdk.utils.StringUtils.isNulOrEmpty ( this . sessionid ) ) ) { context.setAttribute ( ClientContext.COOKIE_STORE , this . pool.getCookieStore ( ) ) ; } return context ; }
Source:
protected void executeCommand ( ) { java.lang.String terminatedSessionId = org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . getSessionIdBySeqId ( org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.getParameters ( ) . getTerminatedSessionDbId ( ) ) ; if ( terminatedSessionId == null ) { log.info ( "Cannot terminate session with database id '{}', it doesn't exist anymore." , org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.getParameters ( ) . getTerminatedSessionDbId ( ) ) ; org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.setSucceeded ( false ) ; return ; } org.ovirt.engine.core.common.businessentities.aaa.DbUser terminatedUser = org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . getUser ( terminatedSessionId , false ) ; if ( terminatedUser != null ) { addCustomValue ( "TerminatedSessionUsername" , java.lang.String.format ( "%s@%s" , terminatedUser.getLoginName ( ) , terminatedUser.getDomain ( ) ) ) ; } setReturnValue ( org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.getBackend ( ) . logoff ( new org.ovirt.engine.core.common.action.VdcActionParametersBase ( terminatedSessionId ) ) ) ; }

Target:
protected void executeCommand ( ) { java.lang.String terminatedSessionId = sessionDataContainer.getSessionIdBySeqId ( org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.getParameters ( ) . getTerminatedSessionDbId ( ) ) ; if ( terminatedSessionId == null ) { log.info ( "Cannot terminate session with database id '{}', it doesn't exist anymore." , org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.getParameters ( ) . getTerminatedSessionDbId ( ) ) ; org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.setSucceeded ( false ) ; return ; } org.ovirt.engine.core.common.businessentities.aaa.DbUser terminatedUser = sessionDataContainer.getUser ( terminatedSessionId , false ) ; if ( terminatedUser != null ) { addCustomValue ( "TerminatedSessionUsername" , java.lang.String.format ( "%s@%s" , terminatedUser.getLoginName ( ) , terminatedUser.getDomain ( ) ) ) ; } setReturnValue ( org.ovirt.engine.core.bll.aaa.TerminateSessionCommand.getBackend ( ) . logoff ( new org.ovirt.engine.core.common.action.VdcActionParametersBase ( terminatedSessionId ) ) ) ; }
Source:
protected java.lang.Object provideDetailModelEntity ( java.lang.Object selectedItem ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( selectedItem ) ) ; if ( model == null ) { return null ; } return model.getEntity ( ) ; }

Target:
private void vmModel_DisplayProtocol_ItemsChanged ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( getWindow ( ) ) ) ; if ( ! ( model.getIsNew ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel selectedItem = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.DisplayType displayType = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( selectedItem.getEntity ( ) ) ) . getDefaultDisplayType ( ) ; if ( model.getDisplayType ( ) . getItems ( ) . contains ( displayType ) ) { model.getDisplayType ( ) . setSelectedItem ( displayType ) ; } } }
Source:
private void mockExecutor ( boolean success ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result ; if ( success ) { result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.SUCCESS , org.ovirt.engine.core.common.businessentities.pm.PowerStatus.ON ) ; } else { result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR , org.ovirt.engine.core.common.businessentities.pm.PowerStatus.UNKNOWN ) ; } org.mockito.Mockito.doReturn ( result ) . when ( executor ) . fence ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.class ) ) ; }

Target:
private void mockExecutor ( boolean success ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result ; if ( success ) { result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.SUCCESS , org.ovirt.engine.core.common.businessentities.pm.PowerStatus.ON ) ; } else { result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult.Status.ERROR , org.ovirt.engine.core.common.businessentities.pm.PowerStatus.UNKNOWN ) ; } org.mockito.Mockito.doReturn ( result ) . when ( executor ) . fence ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.class ) ) ; }
Source:
public void send ( byte [ ] message ) { outbox.addFirst ( java.nio.ByteBuffer.wrap ( message ) ) ; if ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient.LOG.isDebugEnabled ( ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient.LOG.debug ( ( "Message sent: " + ( new java.lang.String ( message , org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.UTF8 ) ) ) ) ; } final org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client = this ; scheduleTask ( new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { client.updateInterestedOps ( ) ; return null ; } } ) ; }

Target:
public void send ( byte [ ] message ) { outbox.addFirst ( java.nio.ByteBuffer.wrap ( message ) ) ; if ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient.LOG.isDebugEnabled ( ) ) { try { org.ovirt.vdsm.jsonrpc.client.reactors.stomp.StompCommonClient.LOG.debug ( ( "Message sent: " + ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.parse ( message ) ) ) ) ; } catch ( org.ovirt.vdsm.jsonrpc.client.ClientConnectionException ignored ) { } } final org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client = this ; scheduleTask ( new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { client.updateInterestedOps ( ) ; return null ; } } ) ; }