auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void EndWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getimage_group_id ( ) ) ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDAO ( ) . get ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDAO ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ; } } super . EndWithFailure ( ) ; }

Target:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getimage_group_id ( ) ) ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDAO ( ) . get ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDAO ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ; } } super . endWithFailure ( ) ; }
Source:
public void vmTypeChanged ( org.ovirt.engine.core.common.businessentities.VmType vmType ) { super . vmTypeChanged ( vmType ) ; if ( getModel ( ) . getProvisioning ( ) . getIsAvailable ( ) ) { getModel ( ) . getProvisioning ( ) . setEntity ( ( vmType == ( org.ovirt.engine.core.common.businessentities.VmType.Server ) ) ) ; } }

Target:
public void vmTypeChanged ( org.ovirt.engine.core.common.businessentities.VmType vmType ) { deactivateInstanceTypeManager ( ) ; if ( getModel ( ) . getProvisioning ( ) . getIsAvailable ( ) ) { getModel ( ) . getProvisioning ( ) . setEntity ( ( vmType == ( org.ovirt.engine.core.common.businessentities.VmType.Server ) ) ) ; } super . vmTypeChanged ( vmType ) ; activateInstanceTypeManager ( ) ; }
Source:
protected void addPermissions ( ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters permissionsOperationsParameters = createPermissionParameters ( MultiLevelAdministrationHandler.EVERYONE_OBJECT_ID , PredefinedRoles.CPU_PROFILE_OPERATOR.getId ( ) ) ; getBackend ( ) . runAction ( VdcActionType.AddPermission , permissionsOperationsParameters ) ; permissionsOperationsParameters = createPermissionParameters ( getUserId ( ) , PredefinedRoles.CPU_PROFILE_CREATOR.getId ( ) ) ; getBackend ( ) . runAction ( VdcActionType.AddPermission , permissionsOperationsParameters ) ; }

Target:
protected void addPermissions ( ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters permissionsOperationsParameters = createPermissionParameters ( MultiLevelAdministrationHandler.EVERYONE_OBJECT_ID , PredefinedRoles.CPU_PROFILE_OPERATOR.getId ( ) ) ; getBackend ( ) . runAction ( ActionType.AddPermission , permissionsOperationsParameters ) ; permissionsOperationsParameters = createPermissionParameters ( getUserId ( ) , PredefinedRoles.CPU_PROFILE_CREATOR.getId ( ) ) ; getBackend ( ) . runAction ( ActionType.AddPermission , permissionsOperationsParameters ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
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 ) ; }
Source:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( applySortOptions ( getSearchString ( ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster , isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( applySortOptions ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel.getSearchString ( ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel.isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel.getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpVDSGroupExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToVdsGroup , org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; 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 { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void testValidateThereIsEnoughOfFreeMacsPositive ( ) { org.mockito.Mockito.when ( macPoolMock.getAvailableMacsCount ( ) ) . thenReturn ( 1 ) ; final org.ovirt.engine.core.bll.ValidationResult actual = underTest.validateThereIsEnoughOfFreeMacs ( java.util.Collections.singletonList ( vmNetworkInterfaceMock ) , macPoolMock , org.ovirt.engine.core.bll.validator.VmNicMacsUtilsTest.ALWAYS_TRUE ) ; org.junit.Assert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidateThereIsEnoughOfFreeMacsPositive ( ) { org.mockito.Mockito.when ( macPoolMock.getAvailableMacsCount ( ) ) . thenReturn ( 1 ) ; final org.ovirt.engine.core.bll.ValidationResult actual = underTest.validateThereIsEnoughOfFreeMacs ( java.util.Collections.singletonList ( vmNetworkInterfaceMock ) , macPoolMock , org.ovirt.engine.core.bll.validator.VmNicMacsUtilsTest.ALWAYS_TRUE ) ; org.hamcrest.MatcherAssert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public void getIsGlusterVolumeSnapshotCliScheduleEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotCliScheduleFlag , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "new name" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags fromDirector = tagsDirector.GetTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag.gettag_name ( ) , fromDirector.gettag_name ( ) ) ; }

Target:
public void testUpdate ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "new name" ) ; tagsDirector.updateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags fromDirector = tagsDirector.getTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag.gettag_name ( ) , fromDirector.gettag_name ( ) ) ; }
Source:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping > getExternalVnicProfileMappings ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { final java.util.Set < org.ovirt.engine.ui.uicommonweb.models.vms.register.VnicProfileMappingEntity > vnicProfileMappingEnities = externalVnicProfilesPerTargetCluster.get ( cluster ) ; final java.util.Collection < org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping > result = new java.util.ArrayList ( vnicProfileMappingEnities.size ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.register.VnicProfileMappingEntity vnicProfileMappingEntity : vnicProfileMappingEnities ) { result.add ( new org.ovirt.engine.ui.uicommonweb.models.vms.register.VnicProfileMappingEntity ( vnicProfileMappingEntity ) ) ; } return result ; }

Target:
private java.util.Collection < org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping > getExternalVnicProfileMappings ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { final java.util.Set < org.ovirt.engine.ui.uicommonweb.models.vms.register.VnicProfileMappingEntity > vnicProfileMappingEntities = getClusterVnicProfileMappingEntities ( cluster ) ; final java.util.Collection < org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping > result = new java.util.ArrayList ( vnicProfileMappingEntities.size ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.register.VnicProfileMappingEntity vnicProfileMappingEntity : vnicProfileMappingEntities ) { result.add ( vnicProfileMappingEntity.getExternalVnicProfileMapping ( ) ) ; } return result ; }
Source:
public void getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.aaa.ProfileEntry > > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
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 ; }

Target:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; 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:
public void setAttached ( boolean attached ) { attachedSeparatedImage.setResource ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resource.joinedIcon ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resource.separatedIcon ( ) ) ) ; attachedSeparatedImage.setTitle ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.attachedToInstanceType ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.detachedFromInstanceType ( ) ) ) ; }

Target:
public void setAttached ( boolean attached ) { attachedSeparatedImage.setResource ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resources.joinedIcon ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.resources.separatedIcon ( ) ) ) ; tooltip.setText ( ( attached ? org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.attachedToInstanceType ( ) : org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.constants.detachedFromInstanceType ( ) ) ) ; tooltip.reconfigure ( ) ; }
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.roles > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.roles > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void GetStorageDomainById ( 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 ? ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
protected void setGetNetworksQueryExpectations ( int times ) throws java.lang.Exception { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > networks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ( ) ; org.ovirt.engine.core.common.businessentities.network network = new org.ovirt.engine.core.common.businessentities.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:
protected void executeQuery ( org.ovirt.engine.core.bll.adbroker.DirectorySearcher directorySearcher ) { final java.util.List < org.ovirt.engine.core.common.businessentities.AdUser > userList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.AdUser > ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.List < org.ovirt.engine.core.common.businessentities.AdUser > usersList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.AdUser > ) ( directorySearcher.FindAll ( getLdapQueryData ( ) ) ) ) ; for ( final org.ovirt.engine.core.common.businessentities.AdUser searchResult : usersList ) { { org.ovirt.engine.core.common.businessentities.AdUser user = populateUserData ( searchResult , getLdapQueryData ( ) . getDomain ( ) ) ; userList.add ( user ) ; } } setReturnValue ( userList ) ; setSucceeded ( true ) ; }

Target:
protected void executeQuery ( org.ovirt.engine.core.bll.adbroker.DirectorySearcher directorySearcher ) { final java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > userList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > usersList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ) ( directorySearcher.FindAll ( getLdapQueryData ( ) ) ) ) ; for ( final org.ovirt.engine.core.common.businessentities.LdapUser searchResult : usersList ) { { org.ovirt.engine.core.common.businessentities.LdapUser user = populateUserData ( searchResult , getLdapQueryData ( ) . getDomain ( ) ) ; userList.add ( user ) ; } } setReturnValue ( userList ) ; setSucceeded ( true ) ; }
Source:
public java.lang.Object runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.storage_pool_iso_map mapToRemove = getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ; getCompensationContext ( ) . snapshotEntity ( mapToRemove ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDAO ( ) . remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( mapToRemove.getstorage_id ( ) , mapToRemove.getstorage_pool_id ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.storage_pool_iso_map mapToRemove = getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ; getCompensationContext ( ) . snapshotEntity ( mapToRemove ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( mapToRemove.getstorage_id ( ) , mapToRemove.getstorage_pool_id ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
private void setupDataMapForDelayJob ( org.quartz.JobDataMap data , long taskDelay , java.util.concurrent.TimeUnit timeUnit ) { data.put ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.FIXED_DELAY_TIME_UNIT , timeUnit ) ; data.put ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.FIXED_DELAY_VALUE , taskDelay ) ; }

Target:
private void setBasicMapValues ( org.quartz.JobDataMap data , java.lang.Object instance , java.lang.String methodName , java.lang.Class < ? > [ ] inputTypes , java.lang.Object [ ] inputParams ) { data.put ( org.ovirt.engine.core.utils.timer.RUNNABLE_INSTANCE , instance ) ; data.put ( org.ovirt.engine.core.utils.timer.RUN_METHOD_NAME , methodName ) ; data.put ( org.ovirt.engine.core.utils.timer.RUN_METHOD_PARAM , inputParams ) ; data.put ( org.ovirt.engine.core.utils.timer.RUN_METHOD_PARAM_TYPE , inputTypes ) ; }
Source:
public void testHostsRuleStructureNeg ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnforcing ( false ) ; rule.setPositive ( true ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; assertEquals ( EntityAffinityRule.POSITIVE , entity.getVdsAffinityRule ( ) ) ; assertEquals ( false , entity.isVdsEnforcing ( ) ) ; }

Target:
public void testHostsRuleStructureNeg ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( false ) ; rule.setPositive ( true ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; assertEquals ( EntityAffinityRule.POSITIVE , entity.getVdsAffinityRule ( ) ) ; assertEquals ( false , entity.isVdsEnforcing ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getJobSubjectEntityDao ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getJobSubjectEntityDao ( ) ; org.ovirt.engine.core.common.job.JobSubjectEntityId existingKey = new org.ovirt.engine.core.common.job.JobSubjectEntityId ( ) ; existingKey.setEntityId ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_ENTITY_ID ) ; existingKey.setJobId ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID ) ; existingEntity = dao.get ( existingKey ) ; newEntity = new org.ovirt.engine.core.common.job.JobSubjectEntity ( org.ovirt.engine.core.dao.JobSubjectEntityDaoTest.EXISTING_JOB_ID , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.VdcObjectType.VmPool ) ; }
Source:
public org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityId ( getParameters ( ) . getEntityId ( ) ) ; return CreateTask ( internalGetTaskType ( ) , p ) ; }

Target:
public org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; return CreateTask ( internalGetTaskType ( ) , p ) ; }
Source:
private org.ovirt.engine.api.model.StorageConnectionExtensions mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension > connectionExtensions ) { org.ovirt.engine.api.model.StorageConnectionExtensions mappedConnectionExtensions = new org.ovirt.engine.api.model.StorageConnectionExtensions ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connectionExtension : connectionExtensions ) { mappedConnectionExtensions.getStorageConnectionExtension ( ) . add ( addLinks ( populate ( map ( connectionExtension ) , connectionExtension ) ) ) ; } return mappedConnectionExtensions ; }

Target:
private org.ovirt.engine.api.model.StorageConnectionExtensions mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension > connectionExtensions ) { org.ovirt.engine.api.model.StorageConnectionExtensions mappedConnectionExtensions = new org.ovirt.engine.api.model.StorageConnectionExtensions ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connectionExtension : connectionExtensions ) { mappedConnectionExtensions.getStorageConnectionExtensions ( ) . add ( addLinks ( populate ( map ( connectionExtension ) , connectionExtension ) ) ) ; } return mappedConnectionExtensions ; }
Source:
public void testGetAllForRunningForVds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDynamic > result = dao.getAllRunningForVds ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmDynamicDaoTest.DYNAMIC_RUNNING_COUNT , result.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDynamic vmdynamic : result ) { org.junit.Assert.assertEquals ( FixturesTool.VDS_RHEL6_NFS_SPM , vmdynamic.getRunOnVds ( ) ) ; } }

Target:
public void testGetAllForRunningForVds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDynamic > result = dao.getAllRunningForVds ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.VmDynamicDaoTest.DYNAMIC_RUNNING_COUNT , result.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDynamic vmdynamic : result ) { org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.VDS_RHEL6_NFS_SPM , vmdynamic.getRunOnVds ( ) ) ; } }
Source:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
public void testGetAllVMTemplatesSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Template" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VmTemplate ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmTemplateResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllMultiVmSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "VMs" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.VmTemplate ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public void isSupportBridgesReportByVDSM ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
protected void updateDetailsAvailability ( ) { super . updateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getSelectedItem ( ) ) ) ; getGlusterSwiftModel ( ) . setIsAvailable ( ( ( ( vds != null ) && ( vds.getVdsGroupSupportsGlusterService ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterFeaturesUtil.isGlusterSwiftSupported ( vds.getVdsGroupCompatibilityVersion ( ) ) ) ) ) ; }

Target:
protected void updateDetailsAvailability ( ) { super . updateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getSelectedItem ( ) ) ) ; getGlusterSwiftModel ( ) . setIsAvailable ( ( ( ( vds != null ) && ( vds.getVdsGroupSupportsGlusterService ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterFeaturesUtil.isGlusterSwiftSupported ( vds.getVdsGroupCompatibilityVersion ( ) ) ) ) ) ; getHostBricksListModel ( ) . setIsAvailable ( ( ( vds != null ) && ( vds.getVdsGroupSupportsGlusterService ( ) ) ) ) ; }
Source:
public static void getStorageDomainMaxNameLength ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void executeQueryCommandWithNull ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getId ( ) ) . thenReturn ( new org.ovirt.engine.core.compat.Guid ( "ee655a4d-effc-4aab-be2b-2f80ff40cd1c" ) ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( java.util.List < ? > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) . isEmpty ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmDeviceDao ( ) ) . thenReturn ( vmDeviceDAO ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.GetWatchdogQueryTest.TEST_VM_ID ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionPause ( masterVolumeName , slaveHost , slaveVolumeName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionResume ( java.lang.String volumeName , java.lang.String slaveHostName , java.lang.String slaveVolumeName , java.lang.String userName , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionResume ( volumeName , slaveHostName , slaveVolumeName , userName , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void initCredentials ( java.lang.String domain ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.Domain domainObject = org.ovirt.engine.extensions.aaa.builtin.kerberosldap.UsersDomainsCacheManagerService.getInstance ( ) . getDomain ( domain ) ; if ( domainObject != null ) { setLoginName ( domainObject.getUserName ( ) ) ; setPassword ( domainObject.getPassword ( ) ) ; if ( getLoginName ( ) . contains ( "@" ) ) { java.lang.String userDomain = getLoginName ( ) . split ( "@" ) [ 1 ] . toLowerCase ( ) ; setAuthenticationDomain ( userDomain ) ; } else { setAuthenticationDomain ( domain ) ; } } }

Target:
protected void initCredentials ( java.lang.String domain ) { setLoginName ( configuration.getProperty ( "config.AdUserName" ) ) ; try { setPassword ( org.ovirt.engine.core.utils.crypt.EngineEncryptionUtils.decrypt ( configuration.getProperty ( "config.AdUserPassword" ) ) ) ; } catch ( java.security.GeneralSecurityException e ) { throw new java.lang.RuntimeException ( e ) ; } if ( getLoginName ( ) . contains ( "@" ) ) { java.lang.String userDomain = getLoginName ( ) . split ( "@" ) [ 1 ] . toLowerCase ( ) ; setAuthenticationDomain ( userDomain ) ; } else { setAuthenticationDomain ( domain ) ; } }
Source:
private void analyzeHostedEngineVm ( ) { if ( ( ( ( dbVm ) != null ) && ( ( vdsmVm ) != null ) ) && ( ( dbVm.getOrigin ( ) ) == ( org.ovirt.engine.core.common.businessentities.OriginType.HOSTED_ENGINE ) ) ) { hostedEngineUnmanaged = true ; } }

Target:
private boolean isUnmanagedVm ( ) { externalVm = ( ( dbVm ) == null ) && ( ( getDbFacade ( ) . getVmStaticDao ( ) . get ( vdsmVm.getVmDynamic ( ) . getId ( ) ) ) == null ) ; hostedEngineUnmanaged = ( ( dbVm ) != null ) && ( ( dbVm.getOrigin ( ) ) == ( org.ovirt.engine.core.common.businessentities.OriginType.HOSTED_ENGINE ) ) ; return ( externalVm ) || ( hostedEngineUnmanaged ) ; }
Source:
private static void updateDisksStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disksList ) { disk.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( storageDomain.getId ( ) ) ) ) ; } org.ovirt.engine.core.bll.VmHandler.updateDiskVolumeType ( storageDomain.getStorageType ( ) , disksList.get ( 0 ) ) ; }

Target:
private static void updateDisksStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disksList ) { disk.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( storageDomain.getId ( ) ) ) ) ; } org.ovirt.engine.core.bll.VmHandler.updateDiskVolumeType ( storageDomain.getStorageType ( ) , disksList.get ( 0 ) ) ; }
Source:
public static void GetVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void GetoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public void testListCrash ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }

Target:
public void testListCrash ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , this :: getCollection ) , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_SERVER_LOCALE , t ) ; }
Source:
public void onTimer ( ) { try { org.ovirt.engine.core.bll.CommandEntityCleanupManager.log.info ( "Start deleteAgedOutCommandEntities" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.CommandEntityAgingThreshold ) ) * ( - 1 ) ) ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.CommandEntityCleanupManager.log.info ( "Finished deleteAgedOutCommandEntities" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.CommandEntityCleanupManager.log.error ( "deleteAgedOutCommandEntities failed with exception" , e ) ; } }

Target:
public void onTimer ( ) { try { org.ovirt.engine.core.bll.CommandEntityCleanupManager.log.info ( "Start deleteAgedOutCommandEntities" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.CommandEntityAgingThreshold ) ) * ( - 1 ) ) ) ; commandCoordinatorUtil.removeAllCommandsBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.CommandEntityCleanupManager.log.info ( "Finished deleteAgedOutCommandEntities" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.CommandEntityCleanupManager.log.error ( "deleteAgedOutCommandEntities failed with exception" , e ) ; } }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveMacPool , org.ovirt.engine.core.common.action.RemoveMacPoolByIdParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; 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 ( false ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveMacPool , org.ovirt.engine.core.common.action.RemoveMacPoolByIdParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public static void GetWatchdogByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public static 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 static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }