auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAddLunDiskMissingId ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setId ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddLunDiskMissingId" , "id" ) ; } }

Target:
public void testAddIscsiLunDiskIncompleteParametersConnectionAddress ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setAddress ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "LogicalUnit" , "lambda$testAddIscsiLunDiskIncompleteParametersConnectionAddress$5" , "address" ) ; }
Source:
public void testNetworkExistsWhenValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator networkAttachmentValidatorSpy = org.mockito.Mockito.spy ( createNetworkAttachmentValidator ( new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ) ) ; org.mockito.Mockito.doReturn ( networkValidatorMock ) . when ( networkAttachmentValidatorSpy ) . createNetworkValidator ( ) ; java.lang.String variableReplacements = "a" ; org.ovirt.engine.core.bll.ValidationResult propagatedResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_NOT_EXISTS , variableReplacements ) ; org.mockito.Mockito.when ( networkValidatorMock.networkIsSet ( ) ) . thenReturn ( propagatedResult ) ; org.junit.Assert.assertThat ( "ValidationResult is not correctly propagated" , networkAttachmentValidatorSpy.networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NETWORK_NOT_EXISTS , variableReplacements ) ) ; }

Target:
public void testNetworkExistsWhenValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator networkAttachmentValidatorSpy = org.mockito.Mockito.spy ( createNetworkAttachmentValidator ( new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ) ) ; org.mockito.Mockito.doReturn ( networkValidatorMock ) . when ( networkAttachmentValidatorSpy ) . getNetworkValidator ( ) ; java.lang.String variableReplacements = "a" ; org.ovirt.engine.core.bll.ValidationResult propagatedResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_NOT_EXISTS , variableReplacements ) ; org.mockito.Mockito.when ( networkValidatorMock.networkIsSet ( ) ) . thenReturn ( propagatedResult ) ; org.junit.Assert.assertThat ( "ValidationResult is not correctly propagated" , networkAttachmentValidatorSpy.networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_NOT_EXISTS , variableReplacements ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VdsNetworkInterface setUpStatistics ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface entity , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VdsNetworkStatistics statistics = new org.ovirt.engine.core.common.businessentities.VdsNetworkStatistics ( ) ; statistics.setId ( null ) ; statistics.setReceiveDropRate ( 1.0 ) ; statistics.setReceiveRate ( 2.0 ) ; statistics.setTransmitDropRate ( 3.0 ) ; statistics.setTransmitRate ( 4.0 ) ; statistics.setVdsId ( id ) ; statistics.setStatus ( null ) ; entity.setStatistics ( statistics ) ; return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface setUpStatistics ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkStatistics statistics = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkStatistics ( ) ; statistics.setId ( null ) ; statistics.setReceiveDropRate ( 1.0 ) ; statistics.setReceiveRate ( 2.0 ) ; statistics.setTransmitDropRate ( 3.0 ) ; statistics.setTransmitRate ( 4.0 ) ; statistics.setVdsId ( id ) ; statistics.setStatus ( null ) ; entity.setStatistics ( statistics ) ; return entity ; }
Source:
public boolean isMacInUse ( java.lang.String mac ) { lockObj.readLock ( ) . lock ( ) ; try { return ( allocatedMacs.contains ( mac ) ) || ( allocatedCustomMacs.contains ( mac ) ) ; } finally { lockObj.readLock ( ) . unlock ( ) ; } }

Target:
public boolean isMacInUse ( java.lang.String mac ) { lockObj.readLock ( ) . lock ( ) ; try { return ( allocatedMacs.containsKey ( mac ) ) || ( allocatedCustomMacs.containsKey ( mac ) ) ; } finally { lockObj.readLock ( ) . unlock ( ) ; } }
Source:
protected org.ovirt.engine.api.model.HostDevice getEntity ( int index ) { org.ovirt.engine.api.model.HostDevice hostDevice = new org.ovirt.engine.api.model.HostDevice ( ) ; hostDevice.setHostId ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.HOST_ID ) ; hostDevice.setDeviceName ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.DEVICE_NAME ) ; hostDevice.setParentDeviceName ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.PARENT_NAME ) ; hostDevice.setProductName ( NAMES [ index ] ) ; hostDevice.setVendorName ( NAMES [ ( index + 1 ) ] ) ; hostDevice.setVmId ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.VM_ID ) ; return hostDevice ; }

Target:
protected D getEntity ( int index ) { D hostDevice = createDevice ( ) ; hostDevice.setHostId ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.HOST_ID ) ; hostDevice.setDeviceName ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.DEVICE_NAME ) ; hostDevice.setParentDeviceName ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.PARENT_NAME ) ; hostDevice.setProductName ( NAMES [ index ] ) ; hostDevice.setVendorName ( NAMES [ ( index + 1 ) ] ) ; hostDevice.setVmId ( org.ovirt.engine.api.restapi.resource.AbstractBackendHostDevicesResourceTest.VM_ID ) ; return hostDevice ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomainById ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { if ( storageDomainsMap.containsKey ( storageDomainId ) ) { return storageDomainsMap.get ( storageDomainId ) ; } org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStorageDomainDao ( ) . getForStoragePool ( storageDomainId , storagePoolId ) ; storageDomainsMap.put ( storageDomainId , storageDomain ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomainById ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { if ( storageDomainsMap.containsKey ( storageDomainId ) ) { return storageDomainsMap.get ( storageDomainId ) ; } org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = storageDomainDao.getForStoragePool ( storageDomainId , storagePoolId ) ; storageDomainsMap.put ( storageDomainId , storageDomain ) ; return storageDomain ; }
Source:
private java.util.Map < java.lang.String , java.lang.String > getAvailableValues ( java.lang.String message , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ) { java.util.Map < java.lang.String , java.lang.String > returnValue = new java.util.HashMap ( logable.getCustomValues ( ) ) ; java.util.Set < java.lang.String > attributes = resolvePlaceHolders ( message ) ; if ( ( attributes != null ) && ( ( attributes.size ( ) ) > 0 ) ) { org.ovirt.engine.core.compat.backendcompat.TypeCompat.getPropertyValues ( logable , attributes , returnValue ) ; } return returnValue ; }

Target:
private java.util.Map < java.lang.String , java.lang.String > getAvailableValues ( java.lang.String message , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable ) { java.util.Map < java.lang.String , java.lang.String > returnValue = new java.util.HashMap ( logable.getCustomValues ( ) ) ; java.util.Set < java.lang.String > attributes = resolvePlaceHolders ( message ) ; if ( ( attributes != null ) && ( ( attributes.size ( ) ) > 0 ) ) { org.ovirt.engine.core.compat.backendcompat.TypeCompat.getPropertyValues ( logable , attributes , returnValue ) ; } return returnValue ; }
Source:
protected void setUpEntityQueryExpectations ( int times , boolean isDisplay ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworksByClusterId , org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , getEntityList ( isDisplay ) ) ; } }

Target:
protected void setUpEntityQueryExpectations ( int times , boolean isDisplay , boolean isRequired ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworksByClusterId , org.ovirt.engine.core.common.queries.VdsGroupQueryParamenters.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , getEntityList ( isDisplay , isRequired ) ) ; } }
Source:
public boolean IsSupported ( java.lang.String agent , java.lang.String key ) { boolean result = false ; if ( ( ( org.apache.commons.lang.StringUtils.isNotEmpty ( agent ) ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( key ) ) ) && ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping.containsKey ( agent ) ) ) { java.util.HashMap < java.lang.String , java.lang.String > agentOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping.get ( agent ) ; result = ( agentOptions == null ) ? false : agentOptions.containsKey ( key ) ; } else { org.ovirt.engine.core.utils.pm.VdsFenceOptions.log.errorFormat ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.AGENT_ERROR , agent ) ; } return result ; }

Target:
public boolean IsSupported ( java.lang.String agent , java.lang.String key ) { boolean result = false ; if ( ( ( org.apache.commons.lang.StringUtils.isNotEmpty ( agent ) ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( key ) ) ) && ( fencingOptionMapping.containsKey ( agent ) ) ) { java.util.HashMap < java.lang.String , java.lang.String > agentOptions = fencingOptionMapping.get ( agent ) ; result = ( agentOptions == null ) ? false : agentOptions.containsKey ( key ) ; } else { org.ovirt.engine.core.utils.pm.VdsFenceOptions.log.errorFormat ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.AGENT_ERROR , agent ) ; } return result ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { super . edit ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( object.getProgress ( ) ) == null ) { disableAllTabs ( ) ; enableEditPoolFields ( ) ; } } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { super . edit ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( object.getProgress ( ) ) == null ) { disableAllTabs ( ) ; enableEditPoolFields ( ) ; } } } ) ; }
Source:
public void networkQosDoesntExist ( ) throws java.lang.Exception { org.mockito.Mockito.when ( vnicProfile.getNetworkQosId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.mockito.Mockito.when ( networkQosDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.junit.Assert.assertThat ( validator.networkQosExistsOrNull ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_NOT_EXISTS ) ) ; }

Target:
public void networkQosDoesntExist ( ) throws java.lang.Exception { org.mockito.Mockito.when ( vnicProfile.getNetworkQosId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.mockito.Mockito.when ( networkQosDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.junit.Assert.assertThat ( validator.networkQosExistsOrNull ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NETWORK_QOS_NOT_EXISTS ) ) ; }
Source:
void localize ( ) { pathEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupPosixPathLabel ( ) ) ; pathExampleLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupGlusterPathExampleLabel ( ) ) ; vfsTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupMountOptionsLabel ( ) ) ; linkGlusterVolumeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupLinkGlusterVolumeLabel ( ) ) ; glusterVolumesEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.glusterVolume ( ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean showEditor = ! ( glusterStorageModel.getLinkGlusterVolume ( ) . getEntity ( ) ) ; pathEditorRow.setVisible ( showEditor ) ; pathExampleLabel.setVisible ( showEditor ) ; glusterVolumesRow.setVisible ( ( ! showEditor ) ) ; }
Source:
public void testHotsetUpdateableWhenHotsetNotRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addField ( VMStatus.Down , "name" ) ; oic.addHotsetField ( "name" , java.util.EnumSet.of ( VMStatus.Up ) ) ; org.junit.Assert.assertTrue ( "hot set not requested field should be updateable according to status" , oic.isFieldUpdatable ( VMStatus.Down , "name" , null , false ) ) ; }

Target:
public void testHotsetUpdateableWhenHotsetNotRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addField ( VMStatus.Down , "name" ) ; oic.addHotsetField ( "name" , java.util.EnumSet.of ( VMStatus.Up ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( oic.isFieldUpdatable ( VMStatus.Down , "name" , null , false ) , "hot set not requested field should be updateable according to status" ) ; }
Source:
protected org.ovirt.engine.api.model.VM populate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < org.ovirt.engine.api.common.util.DetailHelper.Detail > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( getHttpHeaders ( ) ) ; model = addInlineDetails ( details , model ) ; if ( details.contains ( Detail.STATISTICS ) ) { addInlineStatistics ( model ) ; } setPayload ( model ) ; return model ; }

Target:
public org.ovirt.engine.api.model.VMs list ( ) { if ( isFiltered ( ) ) return mapCollection ( getBackendCollection ( VdcQueryType.GetUserVmsByUserIdAndGroups , new org.ovirt.engine.core.common.queries.GetUserVmsByUserIdAndGroupsParameters ( getCurrent ( ) . get ( org.ovirt.engine.core.common.users.VdcUser.class ) . getUserId ( ) ) ) ) ; else return mapCollection ( getBackendCollection ( SearchType.VM ) ) ; }
Source:
public static void initTestCase ( ) throws java.lang.Exception { if ( ( org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource ) == null ) { org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource = org.ovirt.engine.core.dao.BaseDAOTestCase.createDataSource ( ) ; org.ovirt.engine.core.dao.BaseDAOTestCase.ejbRule.mockResource ( ContainerManagedResourceType.DATA_SOURCE , org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource ) ; org.ovirt.engine.core.dao.BaseDAOTestCase.dataset = org.ovirt.engine.core.dao.BaseDAOTestCase.initDataSet ( ) ; org.ovirt.engine.core.dao.BaseDAOTestCase.dbFacade = org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.getDbFacade ( ) ; org.ovirt.engine.core.dao.BaseDAOTestCase.dbFacade.setDbEngineDialect ( org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.loadDbEngineDialect ( ) ) ; DatabaseOperation.CLEAN_INSERT.execute ( org.ovirt.engine.core.dao.BaseDAOTestCase.getConnection ( ) , org.ovirt.engine.core.dao.BaseDAOTestCase.dataset ) ; } }

Target:
public static void initTestCase ( ) throws java.lang.Exception { if ( ( org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource ) == null ) { org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource = org.ovirt.engine.core.dao.BaseDAOTestCase.createDataSource ( ) ; org.ovirt.engine.core.dao.BaseDAOTestCase.ejbRule.mockResource ( ContainerManagedResourceType.DATA_SOURCE , org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource ) ; org.ovirt.engine.core.dao.BaseDAOTestCase.dataset = org.ovirt.engine.core.dao.BaseDAOTestCase.initDataSet ( ) ; DatabaseOperation.CLEAN_INSERT.execute ( org.ovirt.engine.core.dao.BaseDAOTestCase.getConnection ( ) , org.ovirt.engine.core.dao.BaseDAOTestCase.dataset ) ; org.springframework.mock.jndi.SimpleNamingContextBuilder builder = new org.springframework.mock.jndi.SimpleNamingContextBuilder ( ) ; builder.bind ( "java:/ENGINEDataSource" , org.ovirt.engine.core.dao.BaseDAOTestCase.dataSource ) ; builder.activate ( ) ; } }
Source:
public void setUp ( ) { createTestCommand ( ) ; }

Target:
public void shouldElectActiveDataDomain ( ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = prepareStorageDomainForElection ( StorageDomainStatus.Active , "not he domain name" ) ; org.mockito.Mockito.when ( hostedEngineHelper.isHostedEngineStorageDomain ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ) . thenReturn ( false ) ; org.junit.Assert.assertEquals ( domain , cmd.electNewMaster ( ) ) ; }
Source:
public void testGetEntityNameByIdAndTypeForNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = networkDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.NETWORK_ID ) ; org.junit.Assert.assertNotNull ( network ) ; java.lang.String name = network.getName ( ) ; org.junit.Assert.assertEquals ( name , dao.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.NETWORK_ID , VdcObjectType.Network ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = networkDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.NETWORK_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( network ) ; java.lang.String name = network.getName ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( name , dao.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.NETWORK_ID , VdcObjectType.Network ) ) ; }
Source:
protected void executeIrsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getIrsProxy ( ) . removeVmLease ( org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getParameters ( ) . getLeaseId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeIrsBrokerCommand ( ) { returnValue = org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getIrsProxy ( ) . removeVmLease ( org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getParameters ( ) . getLeaseId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.compat.Guid taskID = new org.ovirt.engine.core.compat.Guid ( returnValue.getTaskId ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getVDSReturnValue ( ) . setCreationInfo ( new org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo ( taskID , org.ovirt.engine.core.common.asynctasks.AsyncTaskType.removeVmLease , org.ovirt.engine.core.vdsbroker.vdsbroker.RemoveVmLeaseVDSCommand.getParameters ( ) . getStoragePoolId ( ) ) ) ; }
Source:
private void refreshServerData ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.businessentities.VDS upServer , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > existingServers ) { if ( cluster.supportsVirtService ( ) ) { org.ovirt.engine.core.bll.gluster.GlusterManager.log.debugFormat ( "As cluster {0} supports virt service as well, it's servers will not be synced with glusterfs" , cluster.getname ( ) ) ; return ; } java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > fetchedServers = fetchServers ( cluster , upServer , existingServers ) ; if ( fetchedServers != null ) { removeDetachedServers ( existingServers , fetchedServers ) ; } }

Target:
private void refreshClusterData ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { log.debugFormat ( "Refreshing Gluster lightweight Data for cluster {0}" , cluster.getname ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > existingServers = getVdsDao ( ) . getAllForVdsGroup ( cluster.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS upServer = getClusterUtils ( ) . getUpServer ( cluster.getId ( ) ) ; if ( upServer == null ) { log.debugFormat ( "No server UP in cluster {0}. Can't refresh it's data at this point." , cluster.getname ( ) ) ; return ; } refreshServerData ( cluster , upServer , existingServers ) ; refreshVolumeData ( cluster , upServer , existingServers ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveIsNotValid ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) ) ; }

Target:
public void testValidModifiedBondsFailsWhenInsufficientNumberOfSlaves ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST , bond.getName ( ) ) ) , ValidationResult.VALID ) ; }
Source:
private com.google.gwt.resources.client.ImageResource getStatusImage ( ) { switch ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) ( item ) ) . getStatus ( ) ) { case Up : return resources.nicUp ( ) ; case Down : return resources.nicDown ( ) ; case None : return resources.questionMarkImage ( ) ; default : return resources.questionMarkImage ( ) ; } }

Target:
private com.google.gwt.resources.client.ImageResource getStatusImage ( ) { switch ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) ( item ) ) . getStatus ( ) ) { case UP : return resources.nicUp ( ) ; case DOWN : return resources.nicDown ( ) ; case NONE : return resources.questionMarkImage ( ) ; default : return resources.questionMarkImage ( ) ; } }
Source:
public void testRedundantMessages ( ) throws java.io.IOException { org.ovirt.engine.core.utils.EnumTranslationProperties props = new org.ovirt.engine.core.utils.EnumTranslationProperties ( org.ovirt.engine.core.common.errors.EngineMessage.class ) ; try ( java.io.InputStream is = new java.io.FileInputStream ( file ) ) { props.load ( is ) ; } catch ( org.ovirt.engine.core.utils.MissingEnumTranslationException exception ) { org.junit.Assert.fail ( ( ( ( "Check for redundant keys in " + ( file.getAbsolutePath ( ) ) ) + " failed: " ) + ( exception.getMessage ( ) ) ) ) ; } }

Target:
public void testRedundantMessages ( ) throws java.io.IOException { org.ovirt.engine.core.utils.EnumTranslationProperties props = new org.ovirt.engine.core.utils.EnumTranslationProperties ( enumClass ) ; try ( java.io.InputStream is = new java.io.FileInputStream ( file ) ) { props.load ( is ) ; } catch ( org.ovirt.engine.core.utils.MissingEnumTranslationException exception ) { org.junit.Assert.fail ( ( ( ( "Check for redundant keys in " + ( file.getAbsolutePath ( ) ) ) + " failed: " ) + ( exception.getMessage ( ) ) ) ) ; } }
Source:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( 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.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetAllTags , org.ovirt.engine.core.common.queries.QueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpTags ( ) , failure ) ; if ( failure == null ) { setUpEntityQueryExpectations ( QueryType.GetRootTag , org.ovirt.engine.core.common.queries.QueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpRootTag ( ) ) ; } }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetAllTags , org.ovirt.engine.core.common.queries.QueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpTags ( ) , failure ) ; if ( failure == null ) { setUpEntityQueryExpectations ( QueryType.GetRootTag , org.ovirt.engine.core.common.queries.QueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.setUpRootTag ( ) ) ; } }
Source:
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 ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Integer numOfActiveVms = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( numOfActiveVms != 0 ) { confirmModel.setMessage ( constants.thereAreActiveVMsRequiringRestart ( ) ) ; } checkForNonResponsiveHosts ( confirmModel ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.lang.Integer numOfActiveVms = returnValue.getReturnValue ( ) ; if ( numOfActiveVms != 0 ) { confirmModel.setMessage ( messages.thereAreActiveVMsRequiringRestart ( numOfActiveVms ) ) ; } checkForNonResponsiveHosts ( confirmModel ) ; }
Source:
protected void buildChildCommandInfos ( ) { org.ovirt.engine.core.compat.Guid vmSnapshotId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : mImages ) { addChildCommandInfo ( diskImage.getImageId ( ) , VdcActionType.CreateImageTemplate , buildChildCommandParameters ( diskImage , vmSnapshotId ) ) ; } }

Target:
private void addGraphicsDevice ( ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsDevice graphicsDevice : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getGraphicsDevices ( ) . values ( ) ) { if ( graphicsDevice == null ) { continue ; } graphicsDevice.setVmId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.GraphicsParameters parameters = new org.ovirt.engine.core.bll.GraphicsParameters ( graphicsDevice ) . setVm ( false ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.getBackend ( ) . runInternalAction ( VdcActionType.AddGraphicsDevice , parameters ) ; } }
Source:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }

Target:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > > aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , 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 } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.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 } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult managementNetworkNotExternal ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_MANAGEMENT_NETWORK_CANNOT_BE_EXTERNAL , java.lang.String.format ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase.NETWORK_NAME_REPLACEMENT , network.getName ( ) ) ) . when ( ( ( networkCluster.isManagement ( ) ) && ( network.isExternal ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult managementNetworkNotExternal ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_MANAGEMENT_NETWORK_CANNOT_BE_EXTERNAL , java.lang.String.format ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase.NETWORK_NAME_REPLACEMENT , network.getName ( ) ) ) . when ( ( ( networkCluster.isManagement ( ) ) && ( network.isExternal ( ) ) ) ) ; }
Source:
public void scheduleAJob ( ) throws java.lang.InterruptedException , org.quartz.SchedulerException { org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.DummyJob dummyJob = new org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.DummyJob ( ) ; java.lang.String jobName = org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.scheduler.scheduleAOneTimeJob ( dummyJob , "dummyScheduleMethod" , new java.lang.Class [ ] { java.lang.String.class } , new java.lang.Object [ ] { "scheduleAJob" } , 1 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; java.lang.Thread.sleep ( 10 ) ; try { org.quartz.JobDetail job = org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.scheduler.getRawScheduler ( ) . getJobDetail ( org.quartz.JobKey.jobKey ( jobName ) ) ; org.junit.Assert.assertNotNull ( job ) ; } finally { org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.scheduler.deleteJob ( jobName ) ; } }

Target:
public void scheduleAJob ( ) throws java.lang.InterruptedException , org.quartz.SchedulerException { org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.DummyJob dummyJob = new org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.DummyJob ( ) ; java.lang.String jobName = org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.scheduler.scheduleAOneTimeJob ( dummyJob , "dummyScheduleMethod" , new java.lang.Class [ ] { java.lang.String.class } , new java.lang.Object [ ] { "scheduleAJob" } , 1 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; java.lang.Thread.sleep ( 10 ) ; try { org.quartz.JobDetail job = org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.scheduler.getRawScheduler ( ) . getJobDetail ( org.quartz.JobKey.jobKey ( jobName ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( job ) ; } finally { org.ovirt.engine.core.utils.timer.DBSchedulerUtilQuartzImplTest.scheduler.deleteJob ( jobName ) ; } }
Source:
private void StyleTextBoxEditor ( org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxOnlyEditor editor , org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { if ( ! ( model.getIsChangable ( ) ) ) { editor.setEnabled ( true ) ; com.google.gwt.user.client.ui.ValueBox < java.lang.Object > valueBox = editor.asValueBox ( ) ; valueBox.setReadOnly ( true ) ; valueBox.getElement ( ) . getStyle ( ) . setBorderWidth ( 0 , Style.Unit.PX ) ; } }

Target:
private void StyleTextBoxEditor ( org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor editor , org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { if ( ! ( model.getIsChangable ( ) ) ) { editor.setEnabled ( true ) ; com.google.gwt.user.client.ui.ValueBox < java.lang.String > valueBox = editor.asValueBox ( ) ; valueBox.setReadOnly ( true ) ; valueBox.getElement ( ) . getStyle ( ) . setBorderWidth ( 0 , Style.Unit.PX ) ; } }
Source:
public boolean readBoolean ( ) { java.lang.String image = readString ( ) ; if ( ( image.equalsIgnoreCase ( "false" ) ) || ( image.equals ( "0" ) ) ) { return false ; } else if ( ( image.equalsIgnoreCase ( "true" ) ) || ( image.equals ( "1" ) ) ) { return true ; } else { throw new org.ovirt.api.metamodel.runtime.xml.XmlException ( ( ( "The text \"" + image ) + "\" isn\'t a valid boolean value" ) ) ; } }

Target:
public boolean readBoolean ( ) { return parseBoolean ( readString ( ) ) ; }
Source:
public void testExistingPassDiscardFunctionalityIsPreservedNoDiskRequiresPassDiscardFunctionality ( ) { storageDomain.setSupportsDiscard ( true ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , false ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 0L ) , createLunWithDiscardSupport ( 2048L ) ) , storageDomain ) ) ; }

Target:
public void testExistingPassDiscardFunctionalityIsPreservedNoDiskRequiresPassDiscardFunctionality ( ) { storageDomain.setSupportsDiscard ( true ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , false ) ; org.junit.jupiter.api.Assertions.assertTrue ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 0L ) , createLunWithDiscardSupport ( 2048L ) ) , storageDomain ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.Snapshot addSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId , java.lang.String description , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus snapshotStatus , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , org.ovirt.engine.core.common.businessentities.VM vm , boolean saveVmConfiguration , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { final org.ovirt.engine.core.common.businessentities.Snapshot snapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( snapshotId , snapshotStatus , vm.getId ( ) , ( saveVmConfiguration ? generateVmConfiguration ( vm ) : null ) , snapshotType , description , new java.util.Date ( ) , vm.getAppList ( ) ) ; getSnapshotDao ( ) . save ( snapshot ) ; compensationContext.snapshotNewEntity ( snapshot ) ; return snapshot ; }

Target:
public org.ovirt.engine.core.common.businessentities.Snapshot addSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId , java.lang.String description , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus snapshotStatus , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , org.ovirt.engine.core.common.businessentities.VM vm , boolean saveVmConfiguration , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { final org.ovirt.engine.core.common.businessentities.Snapshot snapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( snapshotId , snapshotStatus , vm.getId ( ) , ( saveVmConfiguration ? generateVmConfiguration ( vm ) : null ) , snapshotType , description , new java.util.Date ( ) , vm.getAppList ( ) , org.apache.commons.lang.StringUtils.EMPTY ) ; getSnapshotDao ( ) . save ( snapshot ) ; compensationContext.snapshotNewEntity ( snapshot ) ; return snapshot ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetBookmarkByNameParameters params = ( ( org.ovirt.engine.core.bll.GetBookmarkByNameParameters ) ( org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getParameters ( ) ) ) ; org.ovirt.engine.core.common.businessentities.bookmarks bookmark = org.ovirt.engine.core.bll.DbFacade.getInstance ( ) . getBookmarkDAO ( ) . getByName ( params.getBookmarkName ( ) ) ; org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getQueryReturnValue ( ) . setReturnValue ( bookmark ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetBookmarkByNameParameters params = ( ( org.ovirt.engine.core.bll.GetBookmarkByNameParameters ) ( org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getParameters ( ) ) ) ; org.ovirt.engine.core.common.businessentities.bookmarks bookmark = org.ovirt.engine.core.bll.DbFacade.getInstance ( ) . getBookmarkDao ( ) . getByName ( params.getBookmarkName ( ) ) ; org.ovirt.engine.core.bll.GetBookmarkByNameQuery.getQueryReturnValue ( ) . setReturnValue ( bookmark ) ; }
Source:
private void saveNfsStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveNfs" } ) ) ) . Run ( ) ; }

Target:
private void saveNfsStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveNfs" } ) ) ) . run ( ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; org.ovirt.engine.ui.frontend.Frontend.setLoginPassword ( null ) ; callback.asyncCallback.onSuccess ( callback.getModel ( ) , null ) ; } }

Target:
public static void RunMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service = GenericApiGWTServiceAsync.Util.getInstance ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state , service ) ; }
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public 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 ) ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }