auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getAllConnectableStorageSeverConnection ( org.ovirt.engine.core.compat.Guid pool ) { return getCallsHandler ( ) . executeReadList ( "GetAllConnectableStorageSeverConnection" , org.ovirt.engine.core.dao.StorageServerConnectionDAODbFacadeImpl.mapper , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , pool ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getConnectableStorageConnectionsByStorageType ( org.ovirt.engine.core.compat.Guid pool , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { return getCallsHandler ( ) . executeReadList ( "GetConnectableStorageConnectionsByStorageType" , org.ovirt.engine.core.dao.StorageServerConnectionDAODbFacadeImpl.mapper , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , pool ) . addValue ( "storage_type" , ( storageType != null ? storageType.getValue ( ) : null ) ) ) ; }
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 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.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule fetchedSchedule = getGlusterVolumeSnapshotScheduleDao ( ) . getByVolumeId ( getGlusterVolumeId ( ) ) ; if ( fetchedSchedule == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_NOT_SCHEDULED ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule fetchedSchedule = getGlusterVolumeSnapshotScheduleDao ( ) . getByVolumeId ( getGlusterVolumeId ( ) ) ; if ( fetchedSchedule == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_NOT_SCHEDULED ) ; } return true ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; initNetworkInterfaces ( ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateNetworkInterfaces ( networkBehavior , networkInerfaces ) ; updateVirtioScsiAvailability ( ) ; updateOSValues ( ) ; }
Source:
protected void sortStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { org.apache.commons.collections.comparators.ComparatorChain comparatorChain = new org.apache.commons.collections.comparators.ComparatorChain ( ) ; for ( java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comparator : getStorageDomainComparators ( domainsInPool , vmDisks ) ) { comparatorChain.addComparator ( comparator , true ) ; } java.util.Collections.sort ( domainsInPool , comparatorChain ) ; }

Target:
protected void sortStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comp = null ; for ( java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comparator : getStorageDomainComparators ( domainsInPool , vmDisks ) ) { comp = ( comp == null ) ? comparator.reversed ( ) : comp.thenComparing ( comparator.reversed ( ) ) ; } java.util.Collections.sort ( domainsInPool , comp ) ; }
Source:
private void scheduleJobWithTrigger ( long initialDelay , java.util.concurrent.TimeUnit timeUnit , java.lang.Object instance , org.quartz.JobDetail job ) { org.quartz.Trigger trigger = createSimpleTrigger ( initialDelay , timeUnit , instance ) ; try { sched.scheduleJob ( job , trigger ) ; } catch ( org.quartz.SchedulerException se ) { log.error ( "failed to schedule job" , se ) ; } }

Target:
private void scheduleJobWithTrigger ( long initialDelay , java.util.concurrent.TimeUnit timeUnit , java.lang.Object instance , org.quartz.JobDetail job ) { org.quartz.Trigger trigger = createSimpleTrigger ( initialDelay , timeUnit , instance ) ; try { sched.scheduleJob ( job , trigger ) ; } catch ( org.quartz.SchedulerException se ) { log.error ( "failed to schedule job: {}" , se.getMessage ( ) ) ; log.debug ( "Exception" , se ) ; } }
Source:
public void testGetAllForNetworkHasPermission ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > result = dao.getAllForNetwork ( FixturesTool.NETWORK_ENGINE , org.ovirt.engine.core.dao.network.VnicProfileDaoTest.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; }

Target:
public void testSave ( ) { dao.save ( vnicProfile ) ; org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( vnicProfile.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( vnicProfile.getId ( ) , result.getId ( ) ) ; org.junit.Assert.assertEquals ( false , result.isPortMirroring ( ) ) ; }
Source:
public void testGetEntityNameByIdAndTypeForDataCenter ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = storagePoolDao.get ( FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertNotNull ( storagePool ) ; java.lang.String name = storagePool.getName ( ) ; org.junit.Assert.assertEquals ( name , dao.getEntityNameByIdAndType ( FixturesTool.DATA_CENTER , VdcObjectType.StoragePool ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForDataCenter ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = storagePoolDao.get ( FixturesTool.DATA_CENTER ) ; org.junit.jupiter.api.Assertions.assertNotNull ( storagePool ) ; java.lang.String name = storagePool.getName ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( name , dao.getEntityNameByIdAndType ( FixturesTool.DATA_CENTER , VdcObjectType.StoragePool ) ) ; }
Source:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM model = createModel ( null ) ; model.setTemplate ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "VM" , "add" , "template.id|name" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Vm model = createModel ( null ) ; model.setTemplate ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "add" , "template.id|name" ) ; } }
Source:
public void setUp ( ) { disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; metadataDiskDescriptionHandler = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) ) ; org.mockito.Mockito.doReturn ( auditLogDirector ) . when ( metadataDiskDescriptionHandler ) . getAuditLogDirector ( ) ; org.mockito.Mockito.doNothing ( ) . when ( auditLogDirector ) . log ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }

Target:
public void setUp ( ) { disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; metadataDiskDescriptionHandler = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.storage.disk.image.MetadataDiskDescriptionHandler.getInstance ( ) ) ; org.mockito.Mockito.doReturn ( auditLogDirector ) . when ( metadataDiskDescriptionHandler ) . getAuditLogDirector ( ) ; org.mockito.Mockito.doNothing ( ) . when ( auditLogDirector ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc list ( java.lang.String isFull , java.lang.String [ ] vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( vmIds ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc fullList ( java.lang.String [ ] vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( vmIds ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > permissionList = super . getPermissionCheckSubjects ( ) ; if ( ( ( getVm ( ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( getVm ( ) . getCustomProperties ( ) ) ) ) ) { permissionList.add ( new org.ovirt.engine.core.common.PermissionSubject ( getVm ( ) . getvds_group_id ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.common.businessentities.ActionGroup.CHANGE_VM_CUSTOM_PROPERTIES ) ) ; } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = super . getPermissionCheckSubjects ( ) ; if ( ( ( getVm ( ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( getVm ( ) . getCustomProperties ( ) ) ) ) ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getVm ( ) . getvds_group_id ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.common.businessentities.ActionGroup.CHANGE_VM_CUSTOM_PROPERTIES ) ) ; } return permissionList ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( "foo" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" ) ; try { subresource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( "foo" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" ) ; try { subresource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static org.ovirt.engine.core.compat.Guid generateHookId ( java.lang.String eventName , java.lang.String hookName , java.lang.String md5 ) { java.lang.String idString = ( eventName + hookName ) + md5 ; try { byte [ ] hash = java.security.MessageDigest.getInstance ( org.ovirt.engine.api.restapi.types.HostMapper.MD5_SECURITY_ALGORITHM ) . digest ( idString.getBytes ( ) ) ; org.ovirt.engine.core.compat.Guid guid = new org.ovirt.engine.core.compat.Guid ( hash , true ) ; return guid ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new java.lang.IllegalStateException ( e ) ; } }

Target:
public static org.ovirt.engine.api.model.HostedEngine map ( org.ovirt.engine.core.common.businessentities.VDS entity , org.ovirt.engine.api.model.HostedEngine template ) { org.ovirt.engine.api.model.HostedEngine hostedEngine = ( template != null ) ? template : new org.ovirt.engine.api.model.HostedEngine ( ) ; hostedEngine.setConfigured ( entity.getHighlyAvailableIsConfigured ( ) ) ; hostedEngine.setActive ( entity.getHighlyAvailableIsActive ( ) ) ; hostedEngine.setScore ( entity.getHighlyAvailableScore ( ) ) ; hostedEngine.setGlobalMaintenance ( entity.getHighlyAvailableGlobalMaintenance ( ) ) ; hostedEngine.setLocalMaintenance ( entity.getHighlyAvailableLocalMaintenance ( ) ) ; return hostedEngine ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getcompatibility_version ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) , cluster.isEnableKsm ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}'" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getCompatibilityVersion ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) , cluster.isEnableKsm ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}'" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetHostDeviceByHostIdAndDeviceName , org.ovirt.engine.core.common.queries.HostDeviceParameters.class , new java.lang.String [ ] { "HostId" , "DeviceName" } , new java.lang.Object [ ] { HOST_ID , DEVICE_NAME } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.HostDevice device = resource.get ( ) ; verifyHostDevice ( device ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetHostDeviceByHostIdAndDeviceName , org.ovirt.engine.core.common.queries.HostDeviceParameters.class , new java.lang.String [ ] { "HostId" , "DeviceName" } , new java.lang.Object [ ] { HOST_ID , DEVICE_NAME } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.HostDevice device = resource.get ( ) ; verifyHostDevice ( device ) ; }
Source:
public static void getVmById ( 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.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
public static void GetDataCenterMaxNameLength ( 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.StoragePoolNameSizeLimit ) , aQuery ) ; }

Target:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
protected void removeNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNetworkInterfaceDao ( ) . getAllForTemplate ( getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : list ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNetworkInterfaceDao ( ) . remove ( iface.getId ( ) ) ; } }

Target:
protected void removeNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNetworkInterfaceDao ( ) . getAllForTemplate ( getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : list ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNetworkInterfaceDao ( ) . remove ( iface.getId ( ) ) ; } }
Source:
public static void getDocumentationBaseURL ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void poolHasDefaultCluster ( ) { org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.mcr.mockConfigValue ( ConfigValues.AutoRegistrationDefaultVdsGroupID , org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; addDefaultClusterToPool ( ) ; storagePoolWithLocalFS ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ) . when ( poolValidator ) . isNotLocalfsWithDefaultCluster ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ; }

Target:
public void poolHasDefaultCluster ( ) { org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.mcr.mockConfigValue ( ConfigValues.AutoRegistrationDefaultVdsGroupID , org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; addDefaultClusterToPool ( ) ; storagePoolWithLocalFS ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ) . when ( poolValidator ) . isNotLocalfsWithDefaultCluster ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ; }
Source:
private void mockDaos ( boolean pluggedInterface ) { org.ovirt.engine.core.common.businessentities.VM vm = createVM ( VM_NAME , NETWORK_NAME , pluggedInterface ) ; org.mockito.Mockito.when ( vmDao.getAllRunningForVds ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( vm ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDao.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vm.getInterfaces ( ) ) ; }

Target:
private void mockDaos ( boolean pluggedInterface ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.createVM ( org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.VM_NAME , org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.NETWORK_NAME , pluggedInterface ) ; org.mockito.Mockito.when ( vmDao.getAllRunningForVds ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( vm ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDao.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vm.getInterfaces ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlanSyncedWithNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVlan ( nicName , network.getVlanId ( ) , network.getName ( ) ) ; nic.setBridged ( network.isVmNetwork ( ) ) ; nic.setMtu ( network.getMtu ( ) ) ; return nic ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createBond ( java.lang.String name , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , name , true , null , null , null , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenBaseNicIsPassed ( bond ) ; return bond ; }
Source:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public void getExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.model.VmPool entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.model.VmPool entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetVmPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }
Source:
protected void updateSelectedCdImage ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { getModel ( ) . getCdImage ( ) . setSelectedItem ( vmBase.getIsoPath ( ) ) ; boolean hasCd = ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vmBase.getIsoPath ( ) ) ) ; getModel ( ) . getCdImage ( ) . setIsChangable ( hasCd ) ; getModel ( ) . getCdAttached ( ) . setEntity ( hasCd ) ; }

Target:
protected void updateSelectedCdImage ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { getModel ( ) . getCdImage ( ) . setSelectedItem ( vmBase.getIsoPath ( ) ) ; boolean hasCd = ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vmBase.getIsoPath ( ) ) ) ; getModel ( ) . getCdImage ( ) . setIsChangeable ( hasCd ) ; getModel ( ) . getCdAttached ( ) . setEntity ( hasCd ) ; }
Source:
private void prepare7 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.removeStorageServerConnectionReturnValue ; context.enlistment = null ; if ( returnValue != null ) { enlistment.Done ( ) ; } else { enlistment.Prepared ( ) ; } }

Target:
private void prepare7 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.removeStorageServerConnectionReturnValue ; context.enlistment = null ; if ( returnValue != null ) { enlistment.Done ( ) ; } else { enlistment.prepared ( ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondarySources ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long requiredMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.parseLong ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; return getOverUtilizedMemoryHosts ( candidateHosts , requiredMemory ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondarySources ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long requiredMemory = ( parameters.containsKey ( PolicyUnitParameter.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED.getDbName ( ) ) ) ? java.lang.Long.parseLong ( parameters.get ( PolicyUnitParameter.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED.getDbName ( ) ) ) : 0L ; return getOverUtilizedMemoryHosts ( candidateHosts , requiredMemory ) ; }
Source:
private org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( ) { if ( hasTaskHandlers ( ) ) { if ( ( getParameters ( ) . getExecutionReason ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; } return getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return getTaskType ( ) ; }

Target:
public org.ovirt.engine.core.common.asynctasks.AsyncTaskType getAsyncTaskType ( ) { if ( ( getTaskType ( ) ) == ( org.ovirt.engine.core.common.asynctasks.AsyncTaskType.notSupported ) ) { throw new java.lang.UnsupportedOperationException ( ) ; } return getTaskType ( ) ; }
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 assertIpConfigurationsEqual ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration1 , org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration2 ) { assertIpv4AddressesEqual ( ipConfiguration1.getIpv4PrimaryAddress ( ) , ipConfiguration2.getIpv4PrimaryAddress ( ) ) ; assertIpv6AddressesEqual ( ipConfiguration1.getIpv6PrimaryAddress ( ) , ipConfiguration2.getIpv6PrimaryAddress ( ) ) ; }
Source:
public org.ovirt.engine.sdk.decorators.Host add ( org.ovirt.engine.sdk.decorators.Host host , java.lang.String expect , java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Expect" , expect ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , host , org.ovirt.engine.sdk.entities.Host.class , org.ovirt.engine.sdk.decorators.Host.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Host add ( org.ovirt.engine.sdk.decorators.Host host ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , host , org.ovirt.engine.sdk.entities.Host.class , org.ovirt.engine.sdk.decorators.Host.class , headers ) ; }
Source:
public void executeCommandTest ( ) { addClusterCommand.executeCommand ( ) ; org.mockito.Mockito.verify ( clusterDao ) . save ( cluster ) ; org.mockito.Mockito.verify ( backend ) . runAction ( org.mockito.ArgumentMatchers.eq ( ActionType.AddCpuProfile ) , org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.Assert.assertTrue ( addClusterCommand.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void executeCommandTest ( ) { addClusterCommand.executeCommand ( ) ; org.mockito.Mockito.verify ( clusterDao ) . save ( cluster ) ; org.mockito.Mockito.verify ( backend ) . runAction ( org.mockito.ArgumentMatchers.eq ( ActionType.AddCpuProfile ) , org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( addClusterCommand.getReturnValue ( ) . getSucceeded ( ) ) ; }
Source:
public org.ovirt.engine.core.dao.StoragePoolDAO getStoragePoolDAO ( ) { final org.ovirt.engine.core.dao.StoragePoolDAO s = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDAO.class ) ; final org.ovirt.engine.core.common.businessentities.StoragePool p = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; p.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; org.mockito.Mockito.when ( s.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( p ) ; org.mockito.Mockito.when ( s.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ) . thenReturn ( null ) ; return s ; }

Target:
public org.ovirt.engine.core.dao.StoragePoolDao getStoragePoolDao ( ) { final org.ovirt.engine.core.dao.StoragePoolDao s = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; final org.ovirt.engine.core.common.businessentities.StoragePool p = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; p.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; org.mockito.Mockito.when ( s.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( p ) ; org.mockito.Mockito.when ( s.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ) . thenReturn ( null ) ; return s ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getClusterId ( ) , org.ovirt.engine.core.common.VdcObjectType.Cluster , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_VM ) ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolCommand.getParameters ( ) . getVmStaticData ( ) . getClusterId ( ) , org.ovirt.engine.core.common.VdcObjectType.Cluster , org.ovirt.engine.core.bll.AddVmPoolCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_VM ) ) ; return permissionList ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase res = result.getReturnValue ( ) ; setTestResultValue ( res ) ; stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = getImportChainConfirmationModel ( ( ( java.lang.String ) ( result ) ) ) ; sourceListModel.setConfirmWindow ( confirmationModel ) ; } else { stopProgress ( ) ; setTestResultValue ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) ) ; } }
Source:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondContainingNetwork ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.NETWORK_ID } , getEntityList ( ) ) ; verifyModel ( resource.get ( ) , 0 ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.ISCSI_BOND_ID } , getIscsiBondContainingNetwork ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.NETWORK_ID } , getEntity ( 0 ) ) ; verifyModel ( resource.get ( ) , 0 ) ; }
Source:
public void testIncompleteInstall ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { resource.install ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "install" , "rootPassword" ) ; } }

Target:
public void testIncompleteInstall ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { resource.install ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "install" , "rootPassword" ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc monitorCommand ( java.lang.String vmId , java.lang.String monitorCommand ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.monitorCommand" ) . withParameter ( "vmID" , vmId ) . withParameter ( "command" , monitorCommand ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesHealInfoReturnForXmlRpc glusterVolumeHealInfo ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.healInfo" ) . withParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesHealInfoReturnForXmlRpc ( response ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryDirectoryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > directoryGroups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) { directoryGroups.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecord ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , group ) ) ; } return directoryGroups ; }

Target:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryDirectoryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > directoryGroups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) { directoryGroups.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecordToDirectoryGroup ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , group ) ) ; } return directoryGroups ; }
Source:
private void updateVmStaticTable ( ) { final org.ovirt.engine.core.dao.VmStaticDAO vmStaticDao = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmStaticDao ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic : vmStaticDao.getAllWithoutIcon ( ) ) { setIconsByOs ( vmStatic ) ; vmStaticDao.update ( vmStatic ) ; } final org.ovirt.engine.core.dao.VmTemplateDAO vmTemplateDao = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplateDao.getAllWithoutIcon ( ) ) { setIconsByOs ( vmTemplate ) ; vmTemplateDao.update ( vmTemplate ) ; } }

Target:
private void updateVmStaticTable ( ) { final org.ovirt.engine.core.dao.VmStaticDao vmStaticDao = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmStaticDao ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic : vmStaticDao.getAllWithoutIcon ( ) ) { setIconsByOs ( vmStatic ) ; vmStaticDao.update ( vmStatic ) ; } final org.ovirt.engine.core.dao.VmTemplateDao vmTemplateDao = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplateDao.getAllWithoutIcon ( ) ) { setIconsByOs ( vmTemplate ) ; vmTemplateDao.update ( vmTemplate ) ; } }
Source:
private static void endJob ( boolean exitStatus , org.ovirt.engine.core.common.job.Job job ) { job.markJobEnded ( exitStatus ) ; try { org.ovirt.engine.core.bll.job.JobRepositoryFactory.getJobRepository ( ) . updateCompletedJobAndSteps ( job ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.job.ExecutionHandler.log.error ( "Failed to end Job '{}', '{}': {}" , job.getId ( ) , job.getActionType ( ) . name ( ) , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.log.debug ( "Exception" , e ) ; } }

Target:
private void endJob ( boolean exitStatus , org.ovirt.engine.core.common.job.Job job ) { job.markJobEnded ( exitStatus ) ; try { jobRepository.updateCompletedJobAndSteps ( job ) ; } catch ( java.lang.Exception e ) { log.error ( "Failed to end Job '{}', '{}': {}" , job.getId ( ) , job.getActionType ( ) . name ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } }
Source:
public org.ovirt.engine.sdk.decorators.Tag add ( org.ovirt.engine.sdk.decorators.Tag tag ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , tag , org.ovirt.engine.sdk.entities.Tag.class , org.ovirt.engine.sdk.decorators.Tag.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Tag add ( org.ovirt.engine.sdk.decorators.Tag tag ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , tag , org.ovirt.engine.sdk.entities.Tag.class , org.ovirt.engine.sdk.decorators.Tag.class , headers ) ; }