auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent clickEvent ) { clusterPanel.setVisible ( ( ! ( clusterPanel.isVisible ( ) ) ) ) ; clusterButton.setText ( ( clusterPanel.isVisible ( ) ? getConstants ( ) . closeText ( ) : getConstants ( ) . editText ( ) ) ) ; clusterNameEditor.setEnabled ( clusterPanel.isVisible ( ) ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent clickEvent ) { clusterPanel.setVisible ( ( ! ( clusterPanel.isVisible ( ) ) ) ) ; clusterButton.setText ( ( clusterPanel.isVisible ( ) ? org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostConfigureLocalStoragePopupView.constants.closeText ( ) : org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostConfigureLocalStoragePopupView.constants.editText ( ) ) ) ; clusterNameEditor.setEnabled ( clusterPanel.isVisible ( ) ) ; }
Source:
public boolean getIsQxlSupported ( ) { boolean isLinux = getIsLinuxOS ( ) ; boolean isQxl = ( extractSelectedDisplayTypeEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ; boolean isSpice = ( getGraphicsType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.SPICE ) ; boolean clusterSupportsSinglePci = ( ( getSelectedCluster ( ) ) != null ) && ( ( Version.v3_3.compareTo ( getSelectedCluster ( ) . getcompatibility_version ( ) ) ) <= 0 ) ; return ( ( isLinux && isQxl ) && isSpice ) && clusterSupportsSinglePci ; }

Target:
public boolean getIsQxlSupported ( ) { boolean isLinux = getIsLinuxOS ( ) ; boolean isQxl = ( extractSelectedDisplayTypeEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ; boolean isSpice = ( getGraphicsType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.SPICE ) ; boolean clusterSupportsSinglePci = ( ( getSelectedCluster ( ) ) != null ) && ( ( Version.v3_3.compareTo ( getSelectedCluster ( ) . getCompatibilityVersion ( ) ) ) <= 0 ) ; return ( ( isLinux && isQxl ) && isSpice ) && clusterSupportsSinglePci ; }
Source:
public void clearPoolTimers ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( ( "clear domain error-timers for pool " + ( _storagePoolId ) ) ) ; for ( java.lang.String jobId : _timers.values ( ) ) { try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.warn ( ( "failed deleting job " + jobId ) ) ; } } }

Target:
public void clearVdsFromCache ( org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "Clearing cache of pool: '{}' for problematic entities of VDS: '{}'." , _storagePoolId , vdsName ) ; clearDomainFromCache ( null , java.util.Arrays.asList ( vdsId ) ) ; }
Source:
public void run ( ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult discoveryResult = org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory.getInstance ( ) . runDiscover ( ) ; if ( discoveryResult != null ) { updateDB ( discoveryResult ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.info ( "PolicyUnits updated" ) ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; } }

Target:
public void run ( ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult discoveryResult = org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory.getInstance ( ) . runDiscover ( ) ; if ( discoveryResult != null ) { updateDB ( discoveryResult ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.info ( "PolicyUnits updated" ) ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.warn ( "Discovery returned empty result, disabled external policy units" ) ; } }
Source:
public org.ovirt.engine.api.extensions.ExtMap getAuthRecord ( java.lang.String engineSessionId ) { return ( ( org.ovirt.engine.api.extensions.ExtMap ) ( getData ( engineSessionId , org.ovirt.engine.core.bll.aaa.SessionDataContainer.AUTH_RECORD_PARAMETER_NAME , false ) ) ) ; }

Target:
public org.ovirt.engine.core.aaa.AuthenticationProfile getProfile ( java.lang.String sessionId ) { org.ovirt.engine.core.aaa.AuthenticationProfile profile = ( ( org.ovirt.engine.core.aaa.AuthenticationProfile ) ( getData ( sessionId , org.ovirt.engine.core.bll.aaa.SessionDataContainer.PROFILE_PARAMETER_NAME , false ) ) ) ; if ( profile == null ) { profile = getProfileFromUser ( getUser ( sessionId , false ) ) ; } return profile ; }
Source:
private static org.ovirt.engine.core.common.businessentities.QuotaVdsGroup getSpecificQuotaVdsGroup ( org.ovirt.engine.core.compat.Guid quotaId ) { org.ovirt.engine.core.common.businessentities.QuotaVdsGroup quotaVdsGroup = new org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ( ) ; quotaVdsGroup.setQuotaVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; quotaVdsGroup.setQuotaId ( quotaId ) ; quotaVdsGroup.setVdsGroupId ( FixturesTool.VDS_GROUP_RHEL6_NFS ) ; quotaVdsGroup.setVirtualCpu ( 2880 ) ; quotaVdsGroup.setMemSizeMB ( 16000000L ) ; quotaVdsGroup.setVirtualCpuUsage ( 0 ) ; quotaVdsGroup.setMemSizeMBUsage ( 0L ) ; return quotaVdsGroup ; }

Target:
private static org.ovirt.engine.core.common.businessentities.QuotaCluster getSpecificQuotaCluster ( org.ovirt.engine.core.compat.Guid quotaId ) { org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = new org.ovirt.engine.core.common.businessentities.QuotaCluster ( ) ; quotaCluster.setQuotaClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; quotaCluster.setQuotaId ( quotaId ) ; quotaCluster.setClusterId ( FixturesTool.CLUSTER_RHEL6_NFS ) ; quotaCluster.setVirtualCpu ( 2880 ) ; quotaCluster.setMemSizeMB ( 16000000L ) ; quotaCluster.setVirtualCpuUsage ( 0 ) ; quotaCluster.setMemSizeMBUsage ( 0L ) ; return quotaCluster ; }
Source:
protected void processOutgoing ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { final java.nio.ByteBuffer buff = outbox.peekLast ( ) ; if ( buff == null ) { return ; } writeBuffer ( buff ) ; if ( ! ( buff.hasRemaining ( ) ) ) { outbox.removeLast ( ) ; } updateInterestedOps ( ) ; }

Target:
protected void processOutgoing ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { final java.nio.ByteBuffer buff = outbox.peekLast ( ) ; if ( buff == null ) { return ; } write ( buff ) ; if ( ! ( buff.hasRemaining ( ) ) ) { outbox.removeLast ( ) ; } updateInterestedOps ( ) ; }
Source:
private boolean vmDeviceChanged ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , java.lang.String device , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , deviceType , device ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

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:
private static void updateTimeoutLogableObject ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { int duplicateEventsIntrvalValue = ( auditLogable.isExternal ( ) ) ? java.lang.Math.max ( auditLogable.getEventFloodInSec ( ) , 30 ) : logType.getDuplicateEventsIntervalValue ( ) ; if ( duplicateEventsIntrvalValue > 0 ) { auditLogable.setEndTime ( java.util.concurrent.TimeUnit.SECONDS.toMillis ( duplicateEventsIntrvalValue ) ) ; auditLogable.setTimeoutObjectId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.composeObjectId ( auditLogable , logType ) ) ; } }

Target:
private static void updateTimeoutLogableObject ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { int eventFloodRate = ( auditLogable.isExternal ( ) ) ? java.lang.Math.max ( auditLogable.getEventFloodInSec ( ) , 30 ) : logType.getEventFloodRate ( ) ; if ( eventFloodRate > 0 ) { auditLogable.setEndTime ( java.util.concurrent.TimeUnit.SECONDS.toMillis ( eventFloodRate ) ) ; auditLogable.setTimeoutObjectId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.composeObjectId ( auditLogable , logType ) ) ; } }
Source:
private org.ovirt.engine.core.compat.RpmVersion getOvirtOsVersion ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = getVdsByVdsId ( org.ovirt.engine.core.bll.GetoVirtISOsQuery.getParameters ( ) . getVdsId ( ) ) ; org.ovirt.engine.core.compat.RpmVersion vdsOsVersion = null ; if ( ( vds != null ) && ( ( vds.getvds_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) ) ) { vdsOsVersion = org.ovirt.engine.core.bll.VdsHandler.getOvirtHostOsVersion ( vds ) ; } return vdsOsVersion ; }

Target:
private org.ovirt.engine.core.compat.RpmVersion getOvirtOsVersion ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = getVdsByVdsId ( org.ovirt.engine.core.bll.GetoVirtISOsQuery.getParameters ( ) . getVdsId ( ) ) ; org.ovirt.engine.core.compat.RpmVersion vdsOsVersion = null ; if ( ( vds != null ) && ( ( vds.getVdsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) ) ) { vdsOsVersion = org.ovirt.engine.core.bll.VdsHandler.getOvirtHostOsVersion ( vds ) ; } return vdsOsVersion ; }
Source:
private void DiskInterface_SelectedItemChanged ( ) { boolean isLunDisk = ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; getIsScsiPassthrough ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateScsiPassthroguhChangeability ( ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }

Target:
protected void updateScsiPassthroguhChangeability ( ) { getIsScsiPassthrough ( ) . setIsChangable ( ( ( ! ( getIsReadOnly ( ) . getEntity ( ) ) ) && ( isEditEnabled ( ) ) ) ) ; getIsScsiPassthrough ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableScsiPassthroughForLunReadOnlyDisk ( ) ) ; updateSgIoUnfilteredChangeability ( ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.VmDevice > getExistingVmHostDevicesByName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > existingDevices = vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmId ( ) , VmDeviceGeneralType.HOSTDEV ) ; return org.ovirt.engine.core.common.businessentities.Entities.vmDevicesByDevice ( existingDevices ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.VmHostDevice > getExistingVmHostDevicesByName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > existingDevices = vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmId ( ) , VmDeviceGeneralType.HOSTDEV ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmHostDevice > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : existingDevices ) { result.add ( new org.ovirt.engine.core.common.businessentities.VmHostDevice ( device ) ) ; } return org.ovirt.engine.core.common.businessentities.Entities.vmDevicesByDevice ( result ) ; }
Source:
private static org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion computeTemplateWithVersionToSelect ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion > newItems , org.ovirt.engine.core.compat.Guid previousTemplateId , boolean useLatest ) { if ( previousTemplateId == null ) { return org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.computeNewTemplateWithVersionToSelect ( newItems ) ; } org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion oldTemplateToSelect = org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( newItems , new org.ovirt.engine.ui.uicommonweb.Linq.TemplateWithVersionPredicate ( previousTemplateId , useLatest ) ) ; return oldTemplateToSelect != null ? oldTemplateToSelect : org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.computeNewTemplateWithVersionToSelect ( newItems ) ; }

Target:
private static org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion computeTemplateWithVersionToSelect ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion > newItems , org.ovirt.engine.core.compat.Guid previousTemplateId , boolean useLatest ) { if ( previousTemplateId == null ) { return org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.computeNewTemplateWithVersionToSelect ( newItems ) ; } org.ovirt.engine.ui.uicommonweb.models.templates.TemplateWithVersion oldTemplateToSelect = org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( newItems , new org.ovirt.engine.ui.uicommonweb.Linq.TemplateWithVersionPredicate ( previousTemplateId , useLatest ) ) ; return oldTemplateToSelect != null ? oldTemplateToSelect : org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.computeNewTemplateWithVersionToSelect ( newItems ) ; }
Source:
protected void setGetNetworksQueryExpectations ( int times ) throws java.lang.Exception { java.util.ArrayList < org.ovirt.engine.api.model.Network > networks = new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ; org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( GUIDS [ 0 ] ) ; network.setname ( "orcus" ) ; networks.add ( network ) ; setGetNetworksQueryExpectations ( times , networks ) ; }

Target:
protected void setGetNetworksQueryExpectations ( int times ) throws java.lang.Exception { java.util.ArrayList < org.ovirt.engine.api.model.Network > networks = new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ; org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( GUIDS [ 0 ] ) ; network.setName ( "orcus" ) ; networks.add ( network ) ; setGetNetworksQueryExpectations ( times , networks ) ; }
Source:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permission > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permission > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.aaa.AuthenticationProfile getProfile ( java.lang.String sessionId ) { return ( ( org.ovirt.engine.core.aaa.AuthenticationProfile ) ( getData ( sessionId , org.ovirt.engine.core.bll.aaa.SessionDataContainer.PROFILE_PARAMETER_NAME , false ) ) ) ; }

Target:
public org.ovirt.engine.core.aaa.AuthenticationProfile getProfile ( java.lang.String sessionId ) { org.ovirt.engine.core.aaa.AuthenticationProfile profile = ( ( org.ovirt.engine.core.aaa.AuthenticationProfile ) ( getData ( sessionId , org.ovirt.engine.core.bll.aaa.SessionDataContainer.PROFILE_PARAMETER_NAME , false ) ) ) ; if ( profile == null ) { profile = getProfileFromUser ( getUser ( sessionId , false ) ) ; } return profile ; }
Source:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.scheduling.PolicyUnit entity ) { return createIdParameterMapper ( entity.getId ( ) ) . addValue ( "name" , entity.getName ( ) ) . addValue ( "is_internal" , entity.isInternal ( ) ) . addValue ( "type" , entity.getPolicyUnitType ( ) . getValue ( ) ) . addValue ( "custom_properties_regex" , org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) . serialize ( entity.getParameterRegExMap ( ) ) ) ; }

Target:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.scheduling.PolicyUnit entity ) { return createIdParameterMapper ( entity.getId ( ) ) . addValue ( "name" , entity.getName ( ) ) . addValue ( "is_internal" , entity.isInternal ( ) ) . addValue ( "type" , ( ( entity.getPolicyUnitType ( ) ) == null ? PolicyUnitType.Filter.getValue ( ) : entity.getPolicyUnitType ( ) . getValue ( ) ) ) . addValue ( "custom_properties_regex" , org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) . serialize ( entity.getParameterRegExMap ( ) ) ) ; }
Source:
public void testPersistNetworkAttachmentsWhenIpConfigurationChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; networkAttachmentForClusterNetworkA.setNicId ( interfaceWithAttachedClusterNetworkA.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; ipConfiguration.getPrimaryAddress ( ) . setAddress ( "192.168.1.11" ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( interfaceWithAttachedClusterNetworkA ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createLegacyPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }

Target:
private void assertNicIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { assertNicIpv4Configuration ( ipConfiguration.getIpv4PrimaryAddress ( ) , nic ) ; assertNicIpv6Configuration ( ipConfiguration.getIpv6PrimaryAddress ( ) , nic ) ; }
Source:
org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel createInterfacePanel ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel ) { org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel panel = new org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel ( ) ; panel.setWidth ( "100%" ) ; panel.setHeight ( "100%" ) ; panel.addInterfaces ( lineModel.getInterfaces ( ) ) ; return panel ; }

Target:
org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel createInterfacePanel ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel ) { org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel panel = new org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel ( ) ; panel.setWidth ( "100%" ) ; panel.setHeight ( "100%" ) ; panel.addInterfaces ( lineModel.getInterfaces ( ) ) ; addClickHandlerToPanel ( panel , lineModel ) ; return panel ; }
Source:
public void init ( org.ovirt.engine.core.common.osinfo.MapBackedPreferences preferences ) { org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE.preferences = preferences ; emptyNode = preferences.node ( "emptyNode" ) ; buildIdToUnameLookup ( ) ; buildBackCompatMapping ( ) ; validateTree ( ) ; }

Target:
public void init ( org.ovirt.engine.core.common.osinfo.MapBackedPreferences preferences ) { org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE.preferences = preferences ; emptyNode = preferences.node ( "emptyNode" ) ; buildIdToUnameLookup ( ) ; buildBackCompatMapping ( ) ; validateTree ( ) ; if ( org.ovirt.engine.core.utils.OsRepositoryImpl.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.utils.OsRepositoryImpl.log.debug ( "Osinfo Repository:\n{}" , this ) ; } }
Source:
public void completeExternalProvidersNoNameTest ( ) { org.ovirt.engine.api.model.ExternalProviders providers = getExternalProviders ( 1 ) ; providers.getExternalProviders ( ) . get ( 0 ) . setName ( null ) ; try { org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.completeExternalProviders ( resource , providers ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , Response.Status.BAD_REQUEST.getStatusCode ( ) ) ; } }

Target:
public void completeExternalProvidersNoNameTest ( ) { org.ovirt.engine.api.model.ExternalProviders providers = getExternalProviders ( 1 ) ; providers.getExternalProviders ( ) . get ( 0 ) . setName ( null ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.completeExternalProviders ( resource , providers ) ) , Response.Status.BAD_REQUEST.getStatusCode ( ) ) ; }
Source:
public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , this . getClass ( ) . getName ( ) ) ; } }

Target:
private org.ovirt.engine.core.compat.Guid createTaskImpl ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , java.lang.String description , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap ) { return org.ovirt.engine.core.bll.tasks.TaskManagerUtil.createTask ( taskId , this , asyncTaskCreationInfo , parentCommand , description , entitiesMap ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveNetworkAttachment , org.ovirt.engine.core.common.action.RemoveNetworkAttachmentParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveNetworkAttachment , org.ovirt.engine.core.common.action.RemoveNetworkAttachmentParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendNetworkAttachmentResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; setWindow ( null ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { disableRemoveBrickStatusPopUpActions ( ) ; } }
Source:
public void addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item ) { item.setFormPanel ( formPanel ) ; if ( item.isValid ( ) ) { formPanel.addFormItem ( item ) ; items.add ( item ) ; java.lang.String isAvailablePropertyName = item.getIsAvailablePropertyName ( ) ; if ( isAvailablePropertyName != null ) { getItemsForPropertyName ( isAvailablePropertyName ) . add ( item ) ; } } }

Target:
public void addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item , int labelWidth , int valueWidth ) { item.setFormPanel ( formPanel ) ; if ( item.isValid ( ) ) { formPanel.addFormItem ( item , labelWidth , valueWidth ) ; items.add ( item ) ; java.lang.String isAvailablePropertyName = item.getIsAvailablePropertyName ( ) ; if ( isAvailablePropertyName != null ) { getItemsForPropertyName ( isAvailablePropertyName ) . add ( item ) ; } } }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public boolean restartVds ( org.ovirt.engine.core.compat.Guid vdsId ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RestartVds , new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vdsId , org.ovirt.engine.core.common.businessentities.FenceActionType.Restart ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; }

Target:
private void moveBricksToUnknown ( final org.ovirt.engine.core.common.businessentities.VDS vds ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > brickEntities = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getGlusterBrickDao ( ) . getGlusterVolumeBricksByServerId ( vds.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick : brickEntities ) { if ( ( brick.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ) { brick.setStatus ( GlusterStatus.UNKNOWN ) ; } } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getGlusterBrickDao ( ) . updateBrickStatuses ( brickEntities ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String errorMessage = this . consoleManager.connectToConsole ( getModel ( ) ) ; if ( errorMessage != null ) { this . errorPopupManager.show ( errorMessage ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { consoleOptionsPersister.loadFromLocalStorage ( getModel ( ) , ConsoleContext.WA ) ; java.lang.String errorMessage = this . consoleManager.connectToConsole ( getModel ( ) ) ; if ( errorMessage != null ) { this . errorPopupManager.show ( errorMessage ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableListModel.setItems ( ( ( java.lang.Iterable ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableListModel.setItems ( ( ( java.util.Collection ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }
Source:
private static boolean isVnicProfilePermitted ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.network.VnicProfile profile , boolean portMirroringRequired ) { return ( portMirroringRequired == ( profile.isPortMirroring ( ) ) ) && ( ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.getPermissionDAO ( ) . getEntityPermissions ( userId , ActionGroup.CONFIGURE_VM_NETWORK , profile.getId ( ) , VdcObjectType.VnicProfile ) ) != null ) ; }

Target:
private static boolean isVnicProfilePermitted ( org.ovirt.engine.core.common.businessentities.DbUser user , org.ovirt.engine.core.common.businessentities.network.VnicProfile profile , boolean portMirroringRequired ) { return ( portMirroringRequired == ( profile.isPortMirroring ( ) ) ) && ( ( org.ovirt.engine.core.bll.network.vm.VnicProfileHelper.getPermissionDAO ( ) . getEntityPermissions ( user.getId ( ) , ActionGroup.CONFIGURE_VM_NETWORK , profile.getId ( ) , VdcObjectType.VnicProfile ) ) != null ) ; }
Source:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { 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.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachmentWithIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol staticIp , java.lang.String address , java.lang.String netmask ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; ipConfiguration.setAddress ( address ) ; ipConfiguration.setNetmask ( netmask ) ; ipConfiguration.setBootProtocol ( staticIp ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( ipConfiguration ) ; return attachment ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachmentWithIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , java.lang.String address , java.lang.String netmask ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address primaryAddress = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; primaryAddress.setAddress ( address ) ; primaryAddress.setNetmask ( netmask ) ; ipConfiguration.getIPv4Addresses ( ) . add ( primaryAddress ) ; ipConfiguration.setBootProtocol ( bootProtocol ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( ipConfiguration ) ; return attachment ; }
Source:
private void testValidSql ( java.lang.String dynamicQuery , java.lang.String exepctedSQLResult ) { org.ovirt.engine.core.searchbackend.SyntaxChecker chkr = new org.ovirt.engine.core.searchbackend.SyntaxChecker ( ) ; org.ovirt.engine.core.searchbackend.ISyntaxChecker curSyntaxChecker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createBackendSyntaxChecker ( "foo" ) ; org.ovirt.engine.core.searchbackend.SyntaxContainer res = curSyntaxChecker.analyzeSyntaxState ( dynamicQuery , true ) ; org.junit.Assert.assertTrue ( ( "Invalid syntax: " + dynamicQuery ) , res.getvalid ( ) ) ; java.lang.String query = chkr.generateQueryFromSyntaxContainer ( res , true ) ; org.junit.Assert.assertEquals ( exepctedSQLResult , query ) ; }

Target:
private void testValidSql ( java.lang.String dynamicQuery , java.lang.String exepctedSQLResult ) { org.ovirt.engine.core.searchbackend.SyntaxChecker chkr = new org.ovirt.engine.core.searchbackend.SyntaxChecker ( ) ; org.ovirt.engine.core.searchbackend.ISyntaxChecker curSyntaxChecker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createBackendSyntaxChecker ( "foo" ) ; org.ovirt.engine.core.searchbackend.SyntaxContainer res = curSyntaxChecker.analyzeSyntaxState ( dynamicQuery , true ) ; org.junit.jupiter.api.Assertions.assertTrue ( res.getvalid ( ) , ( "Invalid syntax: " + dynamicQuery ) ) ; java.lang.String query = chkr.generateQueryFromSyntaxContainer ( res , true ) ; org.junit.jupiter.api.Assertions.assertEquals ( exepctedSQLResult , query ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > findPermissionCheckSubjects ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster , org.ovirt.engine.core.common.action.VdcActionType actionType ) { final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = new java.util.ArrayList < > ( ) ; final org.ovirt.engine.core.compat.Guid networkId = ( networkCluster == null ) ? null : networkCluster.getNetworkId ( ) ; permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( networkId , org.ovirt.engine.core.common.VdcObjectType.Network , actionType.getActionGroup ( ) ) ) ; return permissions ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > findPermissionCheckSubjects ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster , org.ovirt.engine.core.common.action.ActionType actionType ) { final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = new java.util.ArrayList < > ( ) ; final org.ovirt.engine.core.compat.Guid networkId = ( networkCluster == null ) ? null : networkCluster.getNetworkId ( ) ; permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( networkId , org.ovirt.engine.core.common.VdcObjectType.Network , actionType.getActionGroup ( ) ) ) ; return permissions ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute Logoff: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; }

Target:
public void onFailure ( final java.lang.Throwable caught ) { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute logoff: " + caught ) , caught ) ; getEventsHandler ( ) . runQueryFailed ( null ) ; failureEventHandler ( caught ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; }
Source:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
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 void getStorageDomainList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
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.getInstance ( ) . 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 ) ; }

Target:
public static void getClusterListByName ( 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
public static void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand < org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( null ) ) ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand < org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( null ) ) ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID.toString ( ) ) ) ; }
Source:
public static org.ovirt.engine.core.bll.context.CommandContext createInternalJobContext ( org.ovirt.engine.core.utils.lock.EngineLock lock ) { org.ovirt.engine.core.bll.job.ExecutionContext executionContext = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; executionContext.setJobRequired ( true ) ; executionContext.setMonitored ( true ) ; return new org.ovirt.engine.core.bll.context.CommandContext ( executionContext , lock ) ; }

Target:
public static org.ovirt.engine.core.bll.context.CommandContext createInternalJobContext ( org.ovirt.engine.core.utils.lock.EngineLock lock ) { org.ovirt.engine.core.bll.job.ExecutionContext executionContext = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; executionContext.setJobRequired ( true ) ; executionContext.setMonitored ( true ) ; return new org.ovirt.engine.core.bll.context.CommandContext ( new org.ovirt.engine.core.bll.context.EngineContext ( ) ) . withExecutionContext ( executionContext ) . withLock ( lock ) . withoutCompensationContext ( ) ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }