auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void canDoActionSucceeds ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand ( new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommandTest.EVENT_ID_3 ) ) ) ; prepareMocks ( command ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void validateSucceeds ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand ( new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommandTest.EVENT_ID_3 ) ) ) ; prepareMocks ( command ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
private boolean isDiskImage ( ) { return ( ( ( getOldDisk ( ) ) != null ) && ( ( getNewDisk ( ) ) != null ) ) && ( ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) == ( getOldDisk ( ) . getDiskStorageType ( ) ) ) ; }

Target:
private boolean isDiskStorageType ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType diskStorageType ) { return ( ( ( getOldDisk ( ) ) != null ) && ( ( getNewDisk ( ) ) != null ) ) && ( diskStorageType == ( getOldDisk ( ) . getDiskStorageType ( ) ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source ; }

Target:
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.GlusterBrickEntity > ( ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.templates.textForCheckBoxHeader ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.constants.publicNetwork ( ) ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.templates.textForCheckBoxHeader ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.constants.publicNetworkTooltip ( ) ) ; }
Source:
public void testGetMasterStorageDomainIdForPool ( ) { org.ovirt.engine.core.compat.Guid result = dao.getMasterStorageDomainIdForPool ( new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_DOMAIN_ID , result ) ; }

Target:
public void testGetMasterStorageDomainIdForPool ( ) { org.ovirt.engine.core.compat.Guid result = dao.getMasterStorageDomainIdForPool ( FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOAMIN_SCALE_SD5 , result ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return disk ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return disk ; }
Source:
protected void initializeCommand ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.HotUnPlugDiskFromVmCommand < org.ovirt.engine.core.common.action.HotPlugDiskToVmParameters > ( createParameters ( ) ) ) ; mockVds ( ) ; org.powermock.api.mockito.PowerMockito.when ( command.getActionType ( ) ) . thenReturn ( VdcActionType.HotUnPlugDiskFromVm ) ; }

Target:
protected org.ovirt.engine.core.common.action.VdcActionType getCommandActionType ( ) { return org.ovirt.engine.core.common.action.VdcActionType.HotUnPlugDiskFromVm ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.ApplicationConstants applicationConstants , org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( applicationConstants.virtualMachineMainTabLabel ( ) , 6 , modelProvider ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabVirtualMachinePresenter.constants.virtualMachineMainTabLabel ( ) , 6 , modelProvider ) ; }
Source:
public void Rollback ( ) { try { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.DisconnectStorageServer , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.getParameters ( ) ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.log.error ( "Exception in Rollback ExecuteVdsBrokerCommand" , ex ) ; } }

Target:
public void rollback ( ) { try { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.DisconnectStorageServer , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.getParameters ( ) ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.log.error ( "Exception in Rollback ExecuteVdsBrokerCommand" , ex ) ; } }
Source:
public void writeDecimal ( java.lang.String name , java.math.BigDecimal value ) { writeElement ( name , value.toString ( ) ) ; }

Target:
public void writeDecimal ( java.lang.String name , java.math.BigDecimal value ) { writeElement ( name , org.ovirt.api.metamodel.runtime.xml.XmlWriter.renderDecimal ( value ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_pool setUpStoragePool ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.storage_pool pool = control.createMock ( org.ovirt.engine.core.common.businessentities.storage_pool.class ) ; org.easymock.EasyMock.expect ( pool.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; return pool ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StoragePool setUpStoragePool ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = control.createMock ( org.ovirt.engine.core.common.businessentities.StoragePool.class ) ; org.easymock.EasyMock.expect ( pool.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; return pool ; }
Source:
public void loadJobSteps ( ) { jobRepository.loadJobSteps ( job ) ; org.junit.Assert.assertNotNull ( job.getSteps ( ) ) ; org.junit.Assert.assertTrue ( ( ! ( job.getSteps ( ) . isEmpty ( ) ) ) ) ; }

Target:
public void loadJobSteps ( ) { jobRepository.loadJobSteps ( job ) ; org.junit.jupiter.api.Assertions.assertNotNull ( job.getSteps ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( job.getSteps ( ) . isEmpty ( ) ) ) ) ; }
Source:
protected void setUpHttpHeaderExpectations ( java.lang.String name , java.lang.String value ) { org.easymock.classextension.EasyMock.expect ( httpHeaders.getRequestHeader ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResourceTest.eq ( name ) ) ) . andReturn ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResourceTest.asList ( value ) ) ; }

Target:
protected void setUpHttpHeaderExpectations ( java.lang.String name , java.lang.String value ) { org.easymock.EasyMock.expect ( httpHeaders.getRequestHeader ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResourceTest.eq ( name ) ) ) . andReturn ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResourceTest.asList ( value ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; storageListModel.removeConnection = false ; storageListModel.OnFinish ( storageListModel.context , true , storageListModel.storageModel ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; storageListModel.removeConnection = false ; storageListModel.onFinish ( storageListModel.context , true , storageListModel.storageModel ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.storage_domains entity = control.createMock ( org.ovirt.engine.core.common.businessentities.storage_domains.class ) ; return org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.setUpEntityExpectations ( entity , index , StorageType.NFS ) ; }

Target:
protected org.ovirt.engine.api.model.StorageDomain getEntity ( int index ) { org.ovirt.engine.api.model.StorageDomain entity = control.createMock ( org.ovirt.engine.api.model.StorageDomain.class ) ; return org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.setUpEntityExpectations ( entity , index , StorageType.NFS ) ; }
Source:
private java.util.ArrayList < java.lang.String > split ( java.lang.String str ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( str ) ) { return null ; } return new java.util.ArrayList < java.lang.String > ( java.util.Arrays.asList ( str.split ( org.ovirt.engine.core.dao.DiskImageDAODbFacadeImpl.DiskImageRowMapper.SEPARATOR ) ) ) ; }

Target:
private java.util.ArrayList < java.lang.String > splitPreserveAllTokens ( java.lang.String str ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( str ) ) { return null ; } return new java.util.ArrayList < java.lang.String > ( java.util.Arrays.asList ( org.apache.commons.lang.StringUtils.splitPreserveAllTokens ( str , org.ovirt.engine.core.dao.SEPARATOR ) ) ) ; }
Source:
public void testRemoveByNetworkAttachmentId ( ) { org.junit.Assert.assertNotNull ( dao.get ( FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION ) ) ; dao.removeByNetworkAttachmentId ( FixturesTool.NETWORK_ATTACHMENT ) ; org.junit.Assert.assertNull ( dao.get ( FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION ) ) ; }

Target:
public void testRemoveByNetworkAttachmentId ( ) { org.junit.jupiter.api.Assertions.assertNotNull ( dao.get ( FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION ) ) ; dao.removeByNetworkAttachmentId ( FixturesTool.NETWORK_ATTACHMENT ) ; org.junit.jupiter.api.Assertions.assertNull ( dao.get ( FixturesTool.EXISTING_DNS_RESOLVER_CONFIGURATION ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( ) { return org.ovirt.engine.core.bll.VdsGroupOperationCommandBase.getParameters ( ) . getVdsGroup ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.Cluster getCluster ( ) { return org.ovirt.engine.core.bll.ClusterOperationCommandBase.getParameters ( ) . getCluster ( ) ; }
Source:
public void testUpdateFieldsQutoaDefault ( ) { vm.setIsQuotaDefault ( true ) ; vmStatic.setIsQuotaDefault ( false ) ; junit.framework.Assert.assertTrue ( "Quota default should be updatable" , command.areUpdatedFieldsLegal ( ) ) ; }

Target:
public void testUpdateFieldsQutoaDefault ( ) { vm.setIsQuotaDefault ( true ) ; vmStatic.setQuotaDefault ( false ) ; junit.framework.Assert.assertTrue ( "Quota default should be updatable" , command.areUpdatedFieldsLegal ( ) ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( getId ( ) , parentDeviceName , capability , iommuGroup , productName , productId , vendorName , vendorId , parentPhysicalFunction , totalVirtualFunctions , networkInterfaceName , driver , assignable , vmId , address ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( getId ( ) , parentDeviceName , capability , iommuGroup , productName , productId , vendorName , vendorId , parentPhysicalFunction , totalVirtualFunctions , networkInterfaceName , driver , assignable , vmId , address , mdevTypes ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.common.AuditLogType.UNASSIGNED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getActionState ( ) ) == ( org.ovirt.engine.core.bll.CommandActionState.END_FAILURE ) ? org.ovirt.engine.core.common.AuditLogType.USER_DEACTIVATE_STORAGE_DOMAIN_FAILED : org.ovirt.engine.core.common.AuditLogType.UNASSIGNED ; }
Source:
public void setEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { super . setEntity ( volumeEntity ) ; updateActionAvailability ( volumeEntity ) ; }

Target:
public void setResumeSessionCommand ( org.ovirt.engine.ui.uicommonweb.UICommand resumeSessionCommand ) { this . resumeSessionCommand = resumeSessionCommand ; }
Source:
public void testGetAllOfTypesWithUnrepresentedTypes ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllOfTypes ( new org.ovirt.engine.core.common.businessentities.VDSType [ ] { org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode } ) ; org.ovirt.engine.core.dao.VdsDaoTest.assertIncorrectGetResult ( result ) ; }

Target:
public void testGetAllOfTypesWithUnrepresentedTypes ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllOfTypes ( new org.ovirt.engine.core.common.businessentities.VDSType [ ] { org.ovirt.engine.core.common.businessentities.VDSType.oVirtVintageNode } ) ; org.ovirt.engine.core.dao.VdsDaoTest.assertIncorrectGetResult ( result ) ; }
Source:
public void testUpdateLastAdminCheckStatus ( ) { org.ovirt.engine.core.common.businessentities.DbUser nonAdminUser = dbFacade.getDbUserDao ( ) . getByUsername ( "userportal2@testportal.redhat.com" ) ; org.junit.Assert.assertNotNull ( nonAdminUser ) ; org.junit.Assert.assertFalse ( nonAdminUser.isAdmin ( ) ) ; dbFacade.updateLastAdminCheckStatus ( nonAdminUser.getId ( ) ) ; nonAdminUser = dbFacade.getDbUserDao ( ) . get ( nonAdminUser.getId ( ) ) ; org.junit.Assert.assertFalse ( nonAdminUser.isAdmin ( ) ) ; org.ovirt.engine.core.common.businessentities.Permissions perms = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; perms.setRoleType ( RoleType.ADMIN ) ; perms.setrole_id ( org.ovirt.engine.core.dao.DbFacadeDAOTest.ADMIN_ROLE_TYPE_FROM_FIXTURE_ID ) ; perms.setad_element_id ( nonAdminUser.getId ( ) ) ; perms.setObjectId ( org.ovirt.engine.core.dao.DbFacadeDAOTest.SYSTEM_OBJECT_ID ) ; perms.setObjectType ( VdcObjectType.System ) ; dbFacade.getPermissionDao ( ) . save ( perms ) ; org.junit.Assert.assertNotNull ( dbFacade.getPermissionDao ( ) . get ( perms.getId ( ) ) ) ; dbFacade.updateLastAdminCheckStatus ( nonAdminUser.getId ( ) ) ; nonAdminUser = dbFacade.getDbUserDao ( ) . get ( nonAdminUser.getId ( ) ) ; org.junit.Assert.assertTrue ( nonAdminUser.isAdmin ( ) ) ; }

Target:
public void testUpdateLastAdminCheckStatus ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser nonAdminUser = dbFacade.getDbUserDao ( ) . getByUsernameAndDomain ( "userportal2@testportal.redhat.com" , "testportal.redhat.com" ) ; org.junit.Assert.assertNotNull ( nonAdminUser ) ; org.junit.Assert.assertFalse ( nonAdminUser.isAdmin ( ) ) ; dbFacade.updateLastAdminCheckStatus ( nonAdminUser.getId ( ) ) ; nonAdminUser = dbFacade.getDbUserDao ( ) . get ( nonAdminUser.getId ( ) ) ; org.junit.Assert.assertFalse ( nonAdminUser.isAdmin ( ) ) ; org.ovirt.engine.core.common.businessentities.Permissions perms = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; perms.setRoleType ( RoleType.ADMIN ) ; perms.setrole_id ( org.ovirt.engine.core.dao.DbFacadeDAOTest.ADMIN_ROLE_TYPE_FROM_FIXTURE_ID ) ; perms.setad_element_id ( nonAdminUser.getId ( ) ) ; perms.setObjectId ( org.ovirt.engine.core.dao.DbFacadeDAOTest.SYSTEM_OBJECT_ID ) ; perms.setObjectType ( VdcObjectType.System ) ; dbFacade.getPermissionDao ( ) . save ( perms ) ; org.junit.Assert.assertNotNull ( dbFacade.getPermissionDao ( ) . get ( perms.getId ( ) ) ) ; dbFacade.updateLastAdminCheckStatus ( nonAdminUser.getId ( ) ) ; nonAdminUser = dbFacade.getDbUserDao ( ) . get ( nonAdminUser.getId ( ) ) ; org.junit.Assert.assertTrue ( nonAdminUser.isAdmin ( ) ) ; }
Source:
private org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters createParameters ( ) { org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters parameters = new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( vmId , diskId ) ; parameters.setReadOnly ( true ) ; return parameters ; }

Target:
private org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters createParameters ( ) { org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters parameters = new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( vmId , diskId ) ; parameters.setReadOnly ( true ) ; return parameters ; }
Source:
public void setBase ( org.ovirt.api.metamodel.concepts.Type base ) { this . base = base ; }

Target:
public void setBase ( org.ovirt.api.metamodel.concepts.Type newType ) { base = newType ; }
Source:
public org.ovirt.engine.core.dao.InterfaceDAO getInterfaceDAO ( ) { return org.ovirt.engine.core.bll.InitVdsOnUpCommand.getDbFacade ( ) . getInterfaceDAO ( ) ; }

Target:
public org.ovirt.engine.core.dao.InterfaceDAO getInterfaceDAO ( ) { return org.ovirt.engine.core.bll.InitVdsOnUpCommand.getDbFacade ( ) . getInterfaceDao ( ) ; }
Source:
public static org.ovirt.engine.core.bll.tasks.SPMAsyncTask construct ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo creationInfo , org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters asyncTaskParams = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( creationInfo , asyncTask ) ; return org.ovirt.engine.core.bll.tasks.AsyncTaskFactory.construct ( creationInfo.getTaskType ( ) , asyncTaskParams , true ) ; }

Target:
public static org.ovirt.engine.core.bll.tasks.SPMAsyncTask construct ( org.ovirt.engine.core.bll.tasks.interfaces.CommandCoordinator coco , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo creationInfo , org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters asyncTaskParams = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( creationInfo , asyncTask ) ; return org.ovirt.engine.core.bll.tasks.AsyncTaskFactory.construct ( coco , creationInfo.getTaskType ( ) , asyncTaskParams , true ) ; }
Source:
public void testCleanExpiredSessions ( ) { initDataForClearTest ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNull ( "Get not find the session" , container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testCleanExpiredSessions ( ) { initDataForClearTest ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.jupiter.api.Assertions.assertNull ( container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) , "Get not find the session" ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.LdapGroup getExpectedResult ( ) { return new org.ovirt.engine.core.common.businessentities.LdapGroup ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , NAME_TO_SEARCH , DOMAIN ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.LdapGroup getExpectedResult ( ) { return new org.ovirt.engine.core.common.businessentities.LdapGroup ( new org.ovirt.engine.core.common.utils.ExternalId ( 0 ) , NAME_TO_SEARCH , DOMAIN ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getTemplateId ( org.ovirt.engine.api.model.Template template ) { return template.isSetId ( ) ? asGuid ( template.getId ( ) ) : getTemplateByName ( template ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.InstanceType lookupInstance ( org.ovirt.engine.api.model.Template template ) { return getEntity ( org.ovirt.engine.core.common.businessentities.InstanceType.class , VdcQueryType.GetInstanceType , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( asGuid ( template.getId ( ) ) ) , "GetInstanceType" ) ; }
Source:
protected void setUpGetEntityExpectations ( int index ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.ad_groups user = org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.setUpEntityExpectations ( control.createMock ( org.ovirt.engine.core.common.businessentities.ad_groups.class ) , index ) ; setUpGetEntityExpectations ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ": name=*" ) , SearchType.AdGroup , user ) ; }

Target:
protected void setUpGetEntityExpectations ( int index ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.LdapGroup user = org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.setUpEntityExpectations ( control.createMock ( org.ovirt.engine.core.common.businessentities.LdapGroup.class ) , index ) ; setUpGetEntityExpectations ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ": name=*" ) , SearchType.AdGroup , user ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroupEntity ( ) { return new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroupEntity ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setArchitecture ( ArchitectureType.x86_64 ) ; return cluster ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setname ( "DefaultStoragePool" ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return pool ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setName ( "DefaultStoragePool" ) ; pool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return pool ; }
Source:
private void writeName ( org.ovirt.api.metamodel.concepts.Concept concept ) { org.ovirt.api.metamodel.concepts.Name name = concept.getName ( ) ; if ( name != null ) { writer.writeElement ( "name" , name.toString ( ) ) ; } }

Target:
private void writeName ( org.ovirt.api.metamodel.concepts.Named named ) { org.ovirt.api.metamodel.concepts.Name name = named.getName ( ) ; if ( name != null ) { writer.writeElement ( "name" , name.toString ( ) ) ; } }
Source:
protected org.ovirt.engine.core.aaa.DirectoryUser getEntity ( int index ) { return new org.ovirt.engine.core.aaa.DirectoryUser ( DOMAIN , NAMESPACE , org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.decode ( EXTERNAL_IDS [ index ] ) , NAMES [ index ] , NAMES [ index ] ) ; }

Target:
protected org.ovirt.engine.core.aaa.DirectoryUser getEntity ( int index ) { return new org.ovirt.engine.core.aaa.DirectoryUser ( DOMAIN , NAMESPACE , org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.decode ( EXTERNAL_IDS [ index ] ) , NAMES [ index ] , NAMES [ index ] , "" ) ; }
Source:
public void setVmFQDN ( java.lang.String fqdn ) { this . vmDynamic.setVmFQDN ( fqdn ) ; }

Target:
public void setFqdn ( java.lang.String fqdn ) { this . vmDynamic.setFqdn ( fqdn ) ; }
Source:
public org.ovirt.engine.core.bll.snapshots.SnapshotsManager getSnapshotManager ( ) { return snapshotsManager ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM getVmWithConfiguration ( java.lang.String configuration , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.VM result = vmDao.get ( vmId ) ; snapshotsManager.updateVmFromConfiguration ( result , configuration ) ; return result ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getIdsOfHostsWithStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return multipleResults ( entityManager.createNamedQuery ( "VdsDynamic.idByStatus" ) . setParameter ( "status" , status.getValue ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getIdsOfHostsWithStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return getCallsHandler ( ) . executeReadList ( "GetIdsOfHostsWithStatus" , createGuidMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "status" , status.getValue ( ) ) ) ; }
Source:
public void parseLunFromXmlRpcReturnsUnknownForNoField ( ) throws java.lang.Exception { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun ) ; org.junit.Assert.assertEquals ( StorageType.UNKNOWN , lun.getLunType ( ) ) ; }

Target:
public void parseLunFromXmlRpcReturnsUnknownForNoField ( ) throws java.lang.Exception { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun , Version.v4_1 ) ; org.junit.Assert.assertEquals ( StorageType.UNKNOWN , lun.getLunType ( ) ) ; }
Source:
public void setVdsmVersion ( org.ovirt.engine.core.compat.RpmVersion value ) { if ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( vdsmVersion , value ) ) ) { vdsmVersion = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "VdsmVersion" ) ) ; } }

Target:
public void setVdsmVersion ( org.ovirt.engine.core.compat.RpmVersion value ) { if ( ! ( java.util.Objects.equals ( vdsmVersion , value ) ) ) { vdsmVersion = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "VdsmVersion" ) ) ; } }
Source:
public void nonInternalLockedDisallowed ( ) { testExecution ( StorageDomainStatus.Locked ) ; canDoActionFails ( ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED.name ( ) ) ) ; }

Target:
public void nonInternalLockedDisallowed ( ) { testExecution ( StorageDomainStatus.Locked ) ; canDoActionFails ( ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED.name ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageDomainStatic getEntityStatic ( int index ) { org.ovirt.engine.api.restapi.resource.StorageDomainStatic entity = control.createMock ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic.class ) ; return org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.setUpEntityExpectations ( entity , index , StorageType.NFS ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomainStatic getEntityStatic ( int index ) { org.ovirt.engine.api.restapi.resource.StorageDomainStatic entity = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic.class ) ; return org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.setUpEntityExpectations ( entity , index , StorageType.NFS ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return java.util.Arrays.asList ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.compat.Guid.SYSTEM , org.ovirt.engine.core.common.VdcObjectType.System , org.ovirt.engine.core.bll.storage.pool.AddEmptyStoragePoolCommand.getActionType ( ) . getActionGroup ( ) ) , new org.ovirt.engine.core.bll.utils.PermissionSubject ( calculateMacPoolIdToUse ( ) , org.ovirt.engine.core.common.VdcObjectType.MacPool , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_MAC_POOL ) ) ; }

Target:
protected void setActionMessageParameters ( ) { super . setActionMessageParameters ( ) ; addValidationMessage ( EngineMessage.VAR__ACTION__CREATE ) ; }
Source:
public void updateInterface ( org.ovirt.engine.core.compat.Version clusterVersion ) { getDiskInterface ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDiskInterfaceList ( clusterVersion ) ) ; }

Target:
private void setInterfaces ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > diskInterfaces ) { getDiskInterface ( ) . setItems ( diskInterfaces ) ; setDefaultInterface ( ) ; }
Source:
public void testGetHook ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = dao.getGlusterHook ( FixturesTool.GLUSTER_CLUSTER_ID , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.GLUSTER_COMMAND , GlusterHookStage.POST , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.EXISTING_HOOK_NAME ) ; org.junit.Assert.assertNotNull ( hook ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.EXISTING_HOOK_NAME , hook.getName ( ) ) ; }

Target:
public void testGetHook ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = dao.getGlusterHook ( FixturesTool.GLUSTER_CLUSTER_ID , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.GLUSTER_COMMAND , GlusterHookStage.POST , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.EXISTING_HOOK_NAME ) ; org.junit.jupiter.api.Assertions.assertNotNull ( hook ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.EXISTING_HOOK_NAME , hook.getName ( ) ) ; }
Source:
protected boolean checkIfCpusSameManufacture ( org.ovirt.engine.core.common.businessentities.VDSGroup group ) { return org.ovirt.engine.core.bll.CpuFlagsManagerHandler.checkIfCpusSameManufacture ( group.getcpu_name ( ) , org.ovirt.engine.core.bll.UpdateVdsGroupCommand.getVdsGroup ( ) . getcpu_name ( ) , org.ovirt.engine.core.bll.UpdateVdsGroupCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; }

Target:
protected boolean checkIfCpusSameManufacture ( org.ovirt.engine.core.common.businessentities.VDSGroup group ) { return org.ovirt.engine.core.bll.CpuFlagsManagerHandler.checkIfCpusSameManufacture ( group.getCpuName ( ) , org.ovirt.engine.core.bll.UpdateVdsGroupCommand.getVdsGroup ( ) . getCpuName ( ) , org.ovirt.engine.core.bll.UpdateVdsGroupCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ; }
Source:
public void testFindBestMatchForEmulateMachineKeepsCurrent ( ) { java.lang.String original = "pc-i440fx-rhel7.3.0" ; java.util.List < java.lang.String > candidates = java.util.Arrays.asList ( "pc-i440fx-2.1" , original , "pseries-rhel7.2.0" ) ; org.junit.Assert.assertEquals ( original , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.findBestMatchForEmulatedMachine ( original , candidates ) ) ; }

Target:
public void testFindBestMatchForEmulateMachineKeepsCurrent ( ) { java.lang.String original = "pc-i440fx-rhel7.3.0" ; java.util.List < java.lang.String > candidates = java.util.Arrays.asList ( "pc-i440fx-2.1" , original , "pseries-rhel7.2.0" ) ; org.junit.jupiter.api.Assertions.assertEquals ( original , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.findBestMatchForEmulatedMachine ( original , candidates ) ) ; }
Source:
public org.ovirt.engine.sdk.Api connect ( ) throws java.io.IOException , org.ovirt.engine.sdk.exceptions.ServerException , org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError { java.lang.String url = java.lang.String.format ( "%s://%s:%s/ovirt-engine/api" , protocol , server , port ) ; org.ovirt.optimizer.service.OvirtClient.log.debug ( java.lang.String.format ( "Logging to %s as %s" , url , username ) ) ; return new org.ovirt.engine.sdk.Api ( url , username , password , true ) ; }

Target:
public synchronized org.ovirt.engine.sdk.Api getConnection ( ) throws java.io.IOException , org.ovirt.engine.sdk.exceptions.ServerException , org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError { if ( ( api ) == null ) { java.lang.String url = java.lang.String.format ( "%s://%s:%s/ovirt-engine/api" , protocol , server , port ) ; org.ovirt.optimizer.service.OvirtClient.log.debug ( java.lang.String.format ( "Logging to %s as %s" , url , username ) ) ; api = new org.ovirt.engine.sdk.Api ( url , username , password , null , null , requestTimeout , true , true , null , false ) ; } return api ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.OpenStackNetworkProvider provider ) { validateParameters ( provider , "name" ) ; return performCreate ( VdcActionType.AddProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( map ( provider ) ) , new org.ovirt.engine.api.restapi.resource.openstack.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetProviderById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.OpenStackNetworkProvider provider ) { validateParameters ( provider , "name" ) ; return performCreate ( ActionType.AddProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( map ( provider ) ) , new org.ovirt.engine.api.restapi.resource.openstack.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetProviderById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public static < P extends org.ovirt.engine.core.common.action.VdcActionParametersBase > org.ovirt.engine.core.bll.CommandBase < P > createCommand ( org.ovirt.engine.core.common.action.ActionType action , P parameters ) { return org.ovirt.engine.core.bll.CommandsFactory.createCommand ( action , parameters , null ) ; }

Target:
public static < P extends org.ovirt.engine.core.common.action.ActionParametersBase > org.ovirt.engine.core.bll.CommandBase < P > createCommand ( org.ovirt.engine.core.common.action.ActionType action , P parameters ) { return org.ovirt.engine.core.bll.CommandsFactory.createCommand ( action , parameters , null ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.Model setTitle ( java.lang.String value ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( title , value ) ) ) { title = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Title" ) ) ; } return this ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.Model setTitle ( java.lang.String value ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( title , value ) ) ) { title = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Title" ) ) ; } return this ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }
Source:
public java.lang.String getValue ( java.lang.Object object ) { org.ovirt.engine.core.common.businessentities.ArchitectureType clusterArch = getEntity ( object ) . getClusterArch ( ) ; return java.lang.String.valueOf ( clusterArch ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.vms.register.RegisterVmData registerVmData ) { org.ovirt.engine.core.common.businessentities.ArchitectureType clusterArch = registerVmData.getVm ( ) . getClusterArch ( ) ; return java.lang.String.valueOf ( clusterArch ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getBroker ( ) . revertTask ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) . toString ( ) ) ; proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getBroker ( ) . revertTask ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) . toString ( ) ) ; proceedProxyReturnValue ( ) ; }
Source:
public void testGetUserAndSetUserWithSessionParam ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; container.setUser ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , user ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , user , container.getUser ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , false ) ) ; }

Target:
public void testGetUserAndSetUserWithSessionParam ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; container.setUser ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , user ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , user , container.getUser ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , false ) ) ; clearSession ( ) ; }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AuditLogDAOTest.EXISTING_COUNT , result.size ( ) ) ; }

Target:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.AuditLogDAOTest.TOTAL_COUNT , result.size ( ) ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.util.Collection value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.VDS getUpServer ( ) { return org.ovirt.engine.core.bll.utils.ClusterUtils.getInstance ( ) . getUpServer ( org.ovirt.engine.core.bll.AddVdsCommand.getVdsGroupId ( ) ) ; }

Target:
private boolean clusterHasServers ( ) { return org.ovirt.engine.core.bll.utils.ClusterUtils.getInstance ( ) . hasServers ( org.ovirt.engine.core.bll.AddVdsCommand.getVdsGroupId ( ) ) ; }
Source:
public void setExecutionIndex ( int executionIndex ) { this . executionIndex = executionIndex ; }

Target:
public void setPrevVdsStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus prevVdsStatus ) { this . prevVdsStatus = prevVdsStatus ; }
Source:
public org.ovirt.engine.core.common.businessentities.Quota getQuota ( ) { if ( ( quota ) == null ) { setQuota ( getQuotaDAO ( ) . getById ( getParameters ( ) . getQuotaId ( ) ) ) ; } return quota ; }

Target:
public org.ovirt.engine.core.common.businessentities.Quota getQuota ( ) { if ( ( quota ) == null ) { setQuota ( getQuotaDao ( ) . getById ( getParameters ( ) . getQuotaId ( ) ) ) ; } return quota ; }
Source:
public void testQuotas ( ) { testValidSql ( "quota: " , "SELECT * FROM ((SELECT quota_view.* FROM quota_view ) ORDER BY quota_name ASC) as T1 OFFSET (1 -1) LIMIT 0" ) ; }

Target:
public void testQuota ( ) { testValidSql ( "quota: " , "SELECT * FROM ((SELECT distinct quota_view.* FROM quota_view ) ORDER BY quota_name ASC) as T1 OFFSET (1 -1) LIMIT 0" ) ; testValidSql ( "quota: STORAGEPOOLNAME=pool" , "SELECT * FROM ((SELECT distinct quota_view.* FROM quota_view WHERE quota_view.storage_pool_name LIKE pool ) ORDER BY quota_name ASC) as T1 OFFSET (1 -1) LIMIT 0" ) ; }
Source:
public void setUp ( ) { defaultCluster = clusterBuilder.persist ( ) ; defaultHost = vdsBuilder.cluster ( defaultCluster ) . persist ( ) ; defaultVM = vmBuilder.host ( defaultHost ) . up ( ) . persist ( ) ; }

Target:
public void setUpDefaultEntities ( ) { defaultCluster = clusterBuilder.persist ( ) ; defaultHost = vdsBuilder.cluster ( defaultCluster ) . persist ( ) ; defaultVM = vmBuilder.host ( defaultHost ) . up ( ) . persist ( ) ; }
Source:
public void addOrUpdateTaskInDB ( final org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { persistCommand ( copyToCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTasks getAsyncTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.getAsyncTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
protected void executeCommand ( ) { }

Target:
public void testCheckAddEditValidationsFailOnParameters ( ) { params.getClusterPolicy ( ) . getParameterMap ( ) . put ( "fail?" , "sure, fail!" ) ; org.junit.Assert.assertFalse ( command.checkAddEditValidations ( ) ) ; }
Source:
private java.lang.String getJsonDiskDescription ( ) throws java.io.IOException { return org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ; }

Target:
private java.lang.String getJsonDiskDescription ( ) throws java.io.IOException { return org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.getInstance ( ) . generateJsonDiskDescription ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ; }
Source:
protected org.ovirt.engine.core.bll.IsoDomainListSyncronizer getIsoDomainListSyncronizer ( ) { return new org.ovirt.engine.core.bll.IsoDomainListSyncronizer ( ) { @ java.lang.Override protected void init ( ) { } @ java.lang.Override public org.ovirt.engine.core.compat.Guid findActiveISODomain ( org.ovirt.engine.core.compat.Guid storagePoolId ) { return new org.ovirt.engine.core.compat.Guid ( ) ; } } ; }

Target:
protected org.ovirt.engine.core.bll.snapshots.SnapshotsValidator getSnapshotValidator ( ) { return new org.ovirt.engine.core.bll.snapshots.SnapshotsValidator ( ) { @ java.lang.Override public org.ovirt.engine.core.bll.ValidationResult vmNotInPreview ( org.ovirt.engine.core.compat.Guid vmId ) { if ( vmInPreview ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } ; }
Source:
public void testExecuteCommand ( ) throws java.lang.Exception { mockStoragePoolDAO ( ) ; org.ovirt.engine.core.bll.RemoveQuotaCommand < org.ovirt.engine.core.common.action.QuotaCRUDParameters > removeQuotaCommand = createCommand ( ) ; removeQuotaCommand.executeCommand ( ) ; }

Target:
public void testSetup ( ) { mockQuotaDAO ( ) ; mockVmDAO ( ) ; mockStoragePoolDAO ( ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 1 ; }

Target:
public void getStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 1 ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void Cancel ( ) { CancelConfirm ( ) ; setWindow ( null ) ; }

Target:
protected void cancel ( ) { cancelConfirm ( ) ; setWindow ( null ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.FenceAgent createAgent ( ) { org.ovirt.engine.core.common.businessentities.FenceAgent agent = new org.ovirt.engine.core.common.businessentities.FenceAgent ( ) ; agent.setId ( org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.FENCE_AGENT_ID ) ; return agent ; }

Target:
private org.ovirt.engine.core.common.businessentities.pm.FenceAgent createAgent ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent = new org.ovirt.engine.core.common.businessentities.pm.FenceAgent ( ) ; agent.setId ( org.ovirt.engine.core.bll.pm.FenceAgentExecutorTest.FENCE_AGENT_ID ) ; return agent ; }
Source:
public static long macToLong ( java.lang.String mac ) { return java.lang.Long.parseLong ( org.apache.commons.lang.StringUtils.remove ( mac , ':' ) , org.ovirt.engine.core.utils.MacAddressRangeUtils.HEX_RADIX ) ; }

Target:
public static long macToLong ( java.lang.String mac ) { org.ovirt.engine.core.utils.MacAddressRangeUtils.log.debug ( "Processing MAC address: {}." , mac ) ; return java.lang.Long.parseLong ( org.apache.commons.lang.StringUtils.remove ( mac , ':' ) , org.ovirt.engine.core.utils.MacAddressRangeUtils.HEX_RADIX ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; return group ; }
Source:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs < T > e ) { if ( ! ( getNotifyPropertyChangeForAnyItem ( ) ) ) { return ; } unsubscribeList ( e.OldItems ) ; subscribeList ( e.NewItems ) ; }

Target:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs < T > e ) { if ( ! ( getNotifyPropertyChangeForAnyItem ( ) ) ) { return ; } unsubscribeList ( e.oldItems ) ; subscribeList ( e.newItems ) ; }