auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createPosixConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String vfsType , java.lang.String mountOptions ) { 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.setVfsType ( vfsType ) ; connectionDetails.setMountOptions ( mountOptions ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createPosixConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String vfsType , java.lang.String mountOptions ) { 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.setVfsType ( vfsType ) ; connectionDetails.setMountOptions ( mountOptions ) ; return connectionDetails ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAll ( org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeReadList ( "GetAllFromVds" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAll ( org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "GetAllFromVds" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; return uniteAgents ( vdsList ) ; }
Source:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.VDSGroup selectedItem ) { driver.edit ( getDetailModel ( ) ) ; form.update ( ) ; glusterSwiftPanel.setVisible ( selectedItem.supportsGlusterService ( ) ) ; }

Target:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.VDSGroup selectedItem ) { driver.edit ( getDetailModel ( ) ) ; form.update ( ) ; glusterSwiftPanel.setVisible ( ( ( selectedItem.supportsGlusterService ( ) ) && ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterFeaturesUtil.isGlusterSwiftSupported ( selectedItem.getcompatibility_version ( ) ) ) ) ) ; }
Source:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) != null ) { vmPoolDao.removeVmFromVmPool ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmId ( ) ) ; if ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getParameters ( ) . isUpdatePrestartedVms ( ) ) { vmPoolDao.boundVmPoolPrestartedVms ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) != null ) { vmPoolDao.removeVmFromVmPool ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmId ( ) ) ; if ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getParameters ( ) . isUpdatePrestartedVms ( ) ) { vmPoolDao.boundVmPoolPrestartedVms ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) ; } if ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getParameters ( ) . isRemovePoolUponDetachAllVMs ( ) ) { removeVmPoolIfNeeded ( ) ; } org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.setSucceeded ( true ) ; } }
Source:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Context context , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( volume == null ) { return ; } org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus status = org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.getVolumeStatus ( volume ) ; com.google.gwt.resources.client.ImageResource statusImage = getStatusImage ( status ) ; java.lang.String tooltip = getToolTip ( status ) ; com.google.gwt.safehtml.shared.SafeHtml statusImageHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( statusImage ) . getHTML ( ) ) ; sb.append ( applicationTemplates.statusTemplate ( statusImageHtml , tooltip ) ) ; }

Target:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.cell.Context context , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( volume == null ) { return ; } org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus status = org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.getVolumeStatus ( volume ) ; com.google.gwt.resources.client.ImageResource statusImage = getStatusImage ( status ) ; java.lang.String tooltip = getToolTip ( status ) ; com.google.gwt.safehtml.shared.SafeHtml statusImageHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( statusImage ) . getHTML ( ) ) ; sb.append ( applicationTemplates.statusTemplate ( statusImageHtml , tooltip ) ) ; }
Source:
private java.lang.String getTimeZoneForVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getTimeZone ( ) ) ) ) { return vm.getTimeZone ( ) ; } if ( vm.getOs ( ) . isWindows ( ) ) { return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultWindowsTimeZone ) ; } else { return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultGeneralTimeZone ) ; } }

Target:
private java.lang.String getTimeZoneForVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( vm.getTimeZone ( ) ) ) ) { return vm.getTimeZone ( ) ; } if ( vm.getOs ( ) . isWindows ( ) ) { return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DefaultWindowsTimeZone ) ; } else { return "Etc/GMT" ; } }
Source:
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.common.businessentities.StorageDomain > ( ) : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; }

Target:
public void getStorageDomainsWithAttachedStoragePoolGuid ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > > aQuery , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters parameters = new org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters ( storageDomains , storagePool.getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsWithAttachedStoragePoolGuid , parameters , aQuery ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter retval = null ; if ( "STATUS" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSStatus.class ) ; } else if ( "TYPE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSNiceType.class ) ; } else if ( "ARCHITECTURE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ; } return retval ; }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter retval = null ; if ( org.ovirt.engine.core.searchbackend.VdsConditionFieldAutoCompleter.STATUS.equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSStatus.class ) ; } else if ( "TYPE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VDSNiceType.class ) ; } else if ( "ARCHITECTURE" . equals ( fieldName ) ) { retval = new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ; } return retval ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean authenticationRequired = ( ( java.lang.Boolean ) ( requiresAuthentication.getEntity ( ) ) ) ; getUsername ( ) . setIsChangable ( authenticationRequired ) ; getPassword ( ) . setIsChangable ( authenticationRequired ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean authenticationRequired = ( ( java.lang.Boolean ) ( requiresAuthentication.getEntity ( ) ) ) ; getUsername ( ) . setIsChangable ( authenticationRequired ) ; getPassword ( ) . setIsChangable ( authenticationRequired ) ; getTenantName ( ) . setIsChangable ( authenticationRequired ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = super . canDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VmPool oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getvm_pool_id ( ) ) ; if ( returnValue && ( oldPool == null ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; returnValue = false ; } else if ( returnValue && ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = super . canDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VmPool oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( returnValue && ( oldPool == null ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; returnValue = false ; } else if ( returnValue && ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; returnValue = false ; } return returnValue ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getBaseNic ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfacesByName ) { java.util.Objects.requireNonNull ( nic , "nic cannot be null" ) ; java.lang.String baseNicName = org.ovirt.engine.core.utils.NetworkUtils.stripVlan ( nic ) ; if ( nic.getName ( ) . equals ( baseNicName ) ) { return nic ; } else { return getNicByName ( nic.getVdsId ( ) , baseNicName , interfacesByName ) ; } }

Target:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getBaseNic ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfacesByName ) { java.util.Objects.requireNonNull ( nic , "nic cannot be null" ) ; java.lang.String baseNicName = org.ovirt.engine.core.common.utils.NetworkCommonUtils.stripVlan ( nic ) ; if ( nic.getName ( ) . equals ( baseNicName ) ) { return nic ; } else { return getNicByName ( nic.getVdsId ( ) , baseNicName , interfacesByName ) ; } }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.GraphicsDevice getGraphicsDevOfType ( org.ovirt.engine.core.common.businessentities.GraphicsType type ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue query = org.ovirt.engine.core.bll.UpdateVmCommand.getBackend ( ) . runInternalQuery ( VdcQueryType.GetGraphicsDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = query.getReturnValue ( ) ; for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice dev : graphicsDevices ) { if ( ( dev.getVmDeviceType ( ) ) == ( type.getCorrespondingDeviceType ( ) ) ) { return dev ; } } return null ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > getGraphicsDevices ( ) { if ( ( cachedGraphics ) == null ) { cachedGraphics = org.ovirt.engine.core.bll.UpdateVmCommand.getBackend ( ) . runInternalQuery ( VdcQueryType.GetGraphicsDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) ) ) . getReturnValue ( ) ; } return cachedGraphics ; }
Source:
public void updateHibernationMemory ( org.ovirt.engine.core.compat.Guid vmId , java.lang.String memoryVolume ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "memory_volume" , getNullableRepresentation ( memoryVolume ) ) . addValue ( "vm_id" , vmId ) . addValue ( "snapshot_type" , SnapshotType.ACTIVE.name ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateMemory" , parameterSource ) ; }

Target:
public void updateHibernationMemory ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid memoryDumpDiskId , org.ovirt.engine.core.compat.Guid memoryMetadataDiskId , java.lang.String memoryVolume ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "memory_volume" , getNullableRepresentation ( memoryVolume ) ) . addValue ( "memory_dump_disk_id" , memoryDumpDiskId ) . addValue ( "memory_metadata_disk_id" , memoryMetadataDiskId ) . addValue ( "vm_id" , vmId ) . addValue ( "snapshot_type" , SnapshotType.ACTIVE.name ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateMemory" , parameterSource ) ; }
Source:
public static void loadDbFacadeConfig ( ) { org.ovirt.engine.core.utils.LocalConfig config = org.ovirt.engine.core.utils.LocalConfig.getInstance ( ) ; try { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.connectionTimeout = config.getInteger ( "ENGINE_DB_CONNECTION_TIMEOUT" ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.checkInterval = config.getInteger ( "ENGINE_DB_CHECK_INTERVAL" ) ; } catch ( java.lang.Exception exception ) { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.log.warn ( ( "Can't load connection checking parameters of DB facade, " + "will continue using the default values." ) , exception ) ; } }

Target:
public static void loadDbFacadeConfig ( ) { org.ovirt.engine.core.utils.EngineLocalConfig config = org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) ; try { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.connectionTimeout = config.getInteger ( "ENGINE_DB_CONNECTION_TIMEOUT" ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.checkInterval = config.getInteger ( "ENGINE_DB_CHECK_INTERVAL" ) ; } catch ( java.lang.Exception exception ) { org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.log.warn ( ( "Can't load connection checking parameters of DB facade, " + "will continue using the default values." ) , exception ) ; } }
Source:
private void updateMigrationOptions ( ) { org.ovirt.engine.core.compat.Version version = getVersion ( ) . getSelectedItem ( ) ; if ( version == null ) { return ; } autoConverge.setIsChangeable ( true ) ; migrateCompressed.setIsChangeable ( true ) ; }

Target:
private void migrationPoliciesChanged ( ) { boolean hasMigrationPolicy = ( ( getMigrationPolicies ( ) . getSelectedItem ( ) ) != null ) && ( ! ( NoMigrationPolicy.ID.equals ( getMigrationPolicies ( ) . getSelectedItem ( ) . getId ( ) ) ) ) ; org.ovirt.engine.ui.uicompat.UIConstants constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; getAutoConverge ( ) . setIsChangeable ( ( ! hasMigrationPolicy ) , constants.availableOnlyWithNoMigrationPolicy ( ) ) ; getMigrateCompressed ( ) . setIsChangeable ( ( ! hasMigrationPolicy ) , constants.availableOnlyWithNoMigrationPolicy ( ) ) ; }
Source:
protected final boolean failCanDoAction ( org.ovirt.engine.core.dal.VdcBllMessages message ) { addCanDoActionMessage ( message ) ; return false ; }

Target:
private org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; return new org.ovirt.engine.core.common.businessentities.AsyncTasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getVdsmTaskId ( ) , parentParameters , getParameters ( ) , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) , parentParameters.getCommandId ( ) , asyncTaskCreationInfo.getStoragePoolID ( ) , asyncTaskCreationInfo.getTaskType ( ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.bll.tasks.interfaces.CommandCallBack callBack = command.getCallBack ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , null ) ; updateCommand ( command , result ) ; if ( callBack != null ) { callBack.executed ( result ) ; } return result ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.bll.tasks.interfaces.CommandCallBack callBack = command.getCallback ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , null ) ; updateCommand ( command , result ) ; if ( callBack != null ) { callBack.executed ( result ) ; } return result ; }
Source:
public static boolean isNotDuplicateInterfaceName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces , final java.lang.String interfaceName , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.network.VmNic iface = org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( interfaces , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VmNic i ) { return i.getName ( ) . equals ( interfaceName ) ; } } ) ; if ( iface != null ) { messages.add ( VdcBllMessages.NETWORK_INTERFACE_NAME_ALREADY_IN_USE.name ( ) ) ; return false ; } return true ; }

Target:
public static boolean isNotDuplicateInterfaceName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces , final java.lang.String interfaceName , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.network.VmNic iface = org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( interfaces , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VmNic i ) { return i.getName ( ) . equals ( interfaceName ) ; } } ) ; if ( iface != null ) { messages.add ( EngineMessage.NETWORK_INTERFACE_NAME_ALREADY_IN_USE.name ( ) ) ; return false ; } return true ; }
Source:
private java.util.List < java.lang.String > createLocaleKeys ( ) { java.util.List < java.lang.String > keys = new java.util.ArrayList < > ( ) ; keys.add ( "de_DE" ) ; keys.add ( "en_US" ) ; keys.add ( "es_ES" ) ; keys.add ( "fr_FR" ) ; keys.add ( "it_IT" ) ; keys.add ( "ja_JP" ) ; keys.add ( "ko_KR" ) ; keys.add ( "pt_BR" ) ; keys.add ( "zh_CN" ) ; return keys ; }

Target:
private java.util.List < java.lang.String > createLocaleKeys ( ) { java.util.List < java.lang.String > keys = new java.util.ArrayList < > ( ) ; keys.add ( "cs_CZ" ) ; keys.add ( "de_DE" ) ; keys.add ( "en_US" ) ; keys.add ( "es_ES" ) ; keys.add ( "fr_FR" ) ; keys.add ( "it_IT" ) ; keys.add ( "ja_JP" ) ; keys.add ( "ko_KR" ) ; keys.add ( "pt_BR" ) ; keys.add ( "zh_CN" ) ; return keys ; }
Source:
public static void getRoleList ( 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 ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.storagePopupNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.storagePopupDescriptionLabel ( ) ) ; commentEditor.setLabel ( constants.commentLabel ( ) ) ; datacenterListEditor.setLabel ( constants.storagePopupDataCenterLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.storagePopupStorageTypeLabel ( ) ) ; formatListEditor.setLabel ( constants.storagePopupFormatTypeLabel ( ) ) ; hostListEditor.setLabel ( constants.storagePopupHostLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.storagePopupNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.storagePopupDescriptionLabel ( ) ) ; commentEditor.setLabel ( constants.commentLabel ( ) ) ; datacenterListEditor.setLabel ( constants.storagePopupDataCenterLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.storagePopupStorageTypeLabel ( ) ) ; formatListEditor.setLabel ( constants.storagePopupFormatTypeLabel ( ) ) ; hostListEditor.setLabel ( constants.storagePopupHostLabel ( ) ) ; activateDomainEditor.setLabel ( constants.activateDomainLabel ( ) ) ; }
Source:
private static boolean canPlugInterface ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { org.ovirt.engine.core.bll.network.VmInterfaceManager vmIfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; if ( vmIfaceManager.existsPluggedInterfaceWithSameMac ( iface ) ) { vmIfaceManager.auditLogMacInUseUnplug ( iface ) ; return false ; } else { return true ; } }

Target:
private static boolean canPlugInterfaceInDc ( org.ovirt.engine.core.common.businessentities.network.VmNic iface , org.ovirt.engine.core.compat.Guid dataCenterId ) { if ( dataCenterId == null ) { return false ; } else { org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy pool = org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDcSingleton.getInstance ( ) . poolForDataCenter ( dataCenterId ) ; return ! ( pool.isMacInUse ( iface.getMacAddress ( ) ) ) ; } }
Source:
public void getMaxVmsInPool ( 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 ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1000 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getMaxNumOfCPUsPerSocket ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.lang.Integer ) ( source ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
private void assertGetAllRelevantQuoatsForVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupId , int expectedQuotas ) { org.junit.Assert.assertNotNull ( privilegedUserSession ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = dao.getAllRelevantQuotasForVdsGroup ( vdsGroupId , privilegedUserSession.getId ( ) , false ) ; org.junit.Assert.assertEquals ( "Wrong number of quotas retuend" , expectedQuotas , quotas.size ( ) ) ; }

Target:
private void assertGetAllRelevantQuoatsForCluster ( org.ovirt.engine.core.compat.Guid clusterId , int expectedQuotas ) { org.junit.Assert.assertNotNull ( privilegedUserSession ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = dao.getAllRelevantQuotasForCluster ( clusterId , privilegedUserSession.getId ( ) , false ) ; org.junit.Assert.assertEquals ( "Wrong number of quotas retuend" , expectedQuotas , quotas.size ( ) ) ; }
Source:
protected void addVmWatchdog ( ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getWatchdog ( ) ; if ( vmWatchdog != null ) { org.ovirt.engine.core.common.action.WatchdogParameters parameters = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; parameters.setId ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmId ( ) ) ; parameters.setAction ( vmWatchdog.getAction ( ) ) ; parameters.setModel ( vmWatchdog.getModel ( ) ) ; runInternalAction ( VdcActionType.AddWatchdog , parameters , org.ovirt.engine.core.bll.AddVmCommand.cloneContextAndDetachFromParent ( ) ) ; } }

Target:
private org.ovirt.engine.core.common.action.WatchdogParameters buildWatchdogParameters ( org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog ) { org.ovirt.engine.core.common.action.WatchdogParameters parameters = new org.ovirt.engine.core.common.action.WatchdogParameters ( ) ; parameters.setId ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmId ( ) ) ; parameters.setAction ( vmWatchdog.getAction ( ) ) ; parameters.setModel ( vmWatchdog.getModel ( ) ) ; return parameters ; }
Source:
protected org.ovirt.engine.api.model.Template doPopulate ( org.ovirt.engine.api.model.Template model , org.ovirt.engine.core.common.businessentities.VmTemplate entity ) { return model ; }

Target:
protected org.ovirt.engine.api.model.Template doPopulate ( org.ovirt.engine.api.model.Template model , org.ovirt.engine.core.common.businessentities.VmTemplate entity ) { if ( ! ( model.isSetConsole ( ) ) ) { model.setConsole ( new org.ovirt.engine.api.model.Console ( ) ) ; } model.getConsole ( ) . setEnabled ( ( ! ( getConsoleDevicesForEntity ( entity.getId ( ) ) . isEmpty ( ) ) ) ) ; return model ; }
Source:
public void testNotRemovingDefaultPoolNonDefaultIsRemoved ( ) throws java.lang.Exception { org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.MacPoolValidator ( macPool ) . notRemovingDefaultPool ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult callHasUniqueName ( org.ovirt.engine.core.compat.Guid macPool1Id , org.ovirt.engine.core.compat.Guid macPool2Id , java.lang.String macPool1Name , java.lang.String macPool2Name ) { final org.ovirt.engine.core.common.businessentities.MacPool existingMacPool = new org.ovirt.engine.core.common.businessentities.MacPool ( ) ; existingMacPool.setId ( macPool1Id ) ; existingMacPool.setName ( macPool1Name ) ; org.mockito.Mockito.when ( macPoolDaoMock.getAll ( ) ) . thenReturn ( java.util.Arrays.asList ( existingMacPool ) ) ; macPool.setId ( macPool2Id ) ; macPool.setName ( macPool2Name ) ; return macPoolValidator.hasUniqueName ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > GetNonOperationalVdssInPool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > allVds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDAO ( ) . getAll ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > nonOperationalvdsInPool = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : allVds ) { if ( ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) == ( vds.getstatus ( ) ) ) && ( _storagePoolId.equals ( vds.getstorage_pool_id ( ) ) ) ) { nonOperationalvdsInPool.add ( vds ) ; } } return nonOperationalvdsInPool ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > GetNonOperationalVdssInPool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > allVds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . getAll ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > nonOperationalvdsInPool = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : allVds ) { if ( ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonOperational ) == ( vds.getstatus ( ) ) ) && ( _storagePoolId.equals ( vds.getstorage_pool_id ( ) ) ) ) { nonOperationalvdsInPool.add ( vds ) ; } } return nonOperationalvdsInPool ; }
Source:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
private void auditFenceAction ( org.ovirt.engine.core.common.businessentities.FenceActionType action , org.ovirt.engine.core.common.businessentities.FenceAgent agent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { org.ovirt.engine.core.bll.FenceExecutor.log.info ( ( "Executing <{}> Power Management command, Proxy Host:{}, " + "Agent:{}, Agent Type:{}, Target Host:{}, Management IP:{}, User:{}, Options:{}, Fencing policy:{}" ) , action , getNameOrId ( proxyHost ) , agent.getId ( ) , org.ovirt.engine.core.utils.pm.VdsFenceOptions.getRealAgent ( agent.getType ( ) ) , getNameOrId ( _vds ) , agent.getIp ( ) , agent.getUser ( ) , getOptions ( agent ) , fencingPolicy ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = getAuditParams ( action , agent , proxyHost ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.FENCE_USING_AGENT_AND_PROXY_HOST ) ; }

Target:
private void auditFenceAction ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType action , org.ovirt.engine.core.common.businessentities.FenceAgent agent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { org.ovirt.engine.core.bll.FenceExecutor.log.info ( ( "Executing <{}> Power Management command, Proxy Host:{}, " + "Agent:{}, Agent Type:{}, Target Host:{}, Management IP:{}, User:{}, Options:{}, Fencing policy:{}" ) , action , getNameOrId ( proxyHost ) , agent.getId ( ) , org.ovirt.engine.core.utils.pm.VdsFenceOptions.getRealAgent ( agent.getType ( ) ) , getNameOrId ( _vds ) , agent.getIp ( ) , agent.getUser ( ) , getOptions ( agent ) , fencingPolicy ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = getAuditParams ( action , agent , proxyHost ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.FENCE_USING_AGENT_AND_PROXY_HOST ) ; }
Source:
protected void alertActionSkippedAlreadyInStatus ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; auditLogable.addCustomValue ( "HostName" , getTargetVds ( ) . getName ( ) ) ; auditLogable.addCustomValue ( "AgentStatus" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . getValue ( ) ) ; auditLogable.addCustomValue ( "Operation" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . toString ( ) ) ; auditLogDirector.log ( auditLogable , AuditLogType.VDS_ALREADY_IN_REQUESTED_STATUS ) ; }

Target:
protected void alertActionSkippedAlreadyInStatus ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable auditLogable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; auditLogable.addCustomValue ( "HostName" , getTargetVds ( ) . getName ( ) ) ; auditLogable.addCustomValue ( "AgentStatus" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . getValue ( ) ) ; auditLogable.addCustomValue ( "Operation" , org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) . toString ( ) ) ; auditLogDirector.log ( auditLogable , AuditLogType.VDS_ALREADY_IN_REQUESTED_STATUS ) ; }
Source:
private void loadPayload ( ) { org.ovirt.engine.core.dao.VmDeviceDao dao = org.ovirt.engine.core.bll.RunVmOnceCommand.getDbFacade ( ) . getVmDeviceDao ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > disks = dao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getVmId ( ) , VmDeviceGeneralType.DISK ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice disk : disks ) { if ( org.ovirt.engine.core.common.businessentities.VmPayload.isPayload ( disk.getSpecParams ( ) ) ) { org.ovirt.engine.core.common.businessentities.VmPayload payload = new org.ovirt.engine.core.common.businessentities.VmPayload ( disk ) ; org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . setVmPayload ( payload ) ; break ; } } }

Target:
private void loadPayload ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > disks = vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getVmId ( ) , VmDeviceGeneralType.DISK ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice disk : disks ) { if ( org.ovirt.engine.core.common.businessentities.VmPayload.isPayload ( disk.getSpecParams ( ) ) ) { org.ovirt.engine.core.common.businessentities.VmPayload payload = new org.ovirt.engine.core.common.businessentities.VmPayload ( disk ) ; org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . setVmPayload ( payload ) ; break ; } } }
Source:
private boolean isTypeAuthUrlAware ( ) { org.ovirt.engine.core.common.businessentities.ProviderType type = getType ( ) . getSelectedItem ( ) ; return ( ( ( type == ( org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_NETWORK ) ) || ( type == ( org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_IMAGE ) ) ) || ( type == ( org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_VOLUME ) ) ) || ( type == ( org.ovirt.engine.core.common.businessentities.ProviderType.EXTERNAL_NETWORK ) ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.Boolean > getReadOnly ( ) { return readOnly ; }
Source:
protected void setUpEntityQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , getEntityList ( ) ) ; } }

Target:
protected void setUpEntityQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , getEntity ( 1 ) ) ; } }
Source:
private void attachDiskToTemplate ( org.ovirt.engine.core.compat.Guid templateId ) { org.ovirt.engine.core.common.businessentities.DiskImage templateDiskImage = getEnclosingCommand ( ) . getParameters ( ) . getDiskImage ( ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( templateDiskImage.getId ( ) , templateId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , null , true , java.lang.Boolean.FALSE , null ) ; }

Target:
private void attachDiskToTemplate ( org.ovirt.engine.core.compat.Guid templateId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage templateDiskImage = getEnclosingCommand ( ) . getParameters ( ) . getDiskImage ( ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( templateDiskImage.getId ( ) , templateId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , null , true , java.lang.Boolean.FALSE , null , false ) ; }
Source:
public static void GetWANColorDepth ( 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 ) { return source != null ? org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.depth16 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetWANColorDepth ( 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 ) { return source != null ? org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.depth16 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void testStatusMapping ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus backendStatus , org.ovirt.engine.api.model.GlusterState restStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volume.setStatus ( backendStatus ) ; org.ovirt.engine.api.model.GlusterVolume restVolume = org.ovirt.engine.api.restapi.types.GlusterVolumeMapper.map ( volume , null ) ; assertEquals ( restVolume.getStatus ( ) . getState ( ) , restStatus.value ( ) ) ; }

Target:
private void testStatusMapping ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus backendStatus , org.ovirt.engine.api.model.GlusterVolumeStatus restStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volume.setStatus ( backendStatus ) ; org.ovirt.engine.api.model.GlusterVolume restVolume = org.ovirt.engine.api.restapi.types.GlusterVolumeMapper.map ( volume , null ) ; assertEquals ( restVolume.getStatus ( ) , restStatus ) ; }
Source:
public org.ovirt.engine.core.utils.ovf.xml.XmlNodeList SelectNodes ( java.lang.String string ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; java.lang.Object o = xPath.evaluate ( string , node , javax.xml.xpath.XPathConstants.NODESET ) ; return new org.ovirt.engine.core.utils.ovf.xml.XmlNodeList ( ( ( org.w3c.dom.NodeList ) ( o ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }

Target:
public org.ovirt.engine.core.utils.ovf.xml.XmlNodeList selectNodes ( java.lang.String string ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; java.lang.Object o = xPath.evaluate ( string , node , javax.xml.xpath.XPathConstants.NODESET ) ; return new org.ovirt.engine.core.utils.ovf.xml.XmlNodeList ( ( ( org.w3c.dom.NodeList ) ( o ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }