auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( 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.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public static void getTimeZoneList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTimeZones , params , aQuery ) ; }

Target:
public static void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void isStorageDomainNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; return storageDomains.isEmpty ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Storage: name=" + name ) , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) , aQuery ) ; }

Target:
public void isStorageDomainNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; return storageDomains.isEmpty ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Storage: name=" + name ) , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) , aQuery ) ; }
Source:
public void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void testList ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpGetEntityExpectations ( VdcQueryType.GetDbUserByUserId , org.ovirt.engine.core.common.queries.GetDbUserByUserIdParameters.class , new java.lang.String [ ] { "UserId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , getUserByIdx ( 1 ) ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }

Target:
public void testList ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpGetEntityExpectations ( VdcQueryType.GetDbUserByUserId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , getUserByIdx ( 1 ) ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }
Source:
public void syncNetworkQosNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; org.ovirt.engine.core.compat.Guid qosId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( qosDao.get ( qosId ) ) . thenReturn ( createQos ( ) ) ; network.setQosId ( qosId ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForSync ( iface ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }

Target:
public void syncNetworkQosNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; org.ovirt.engine.core.compat.Guid qosId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( qosDao.get ( qosId ) ) . thenReturn ( createQos ( ) ) ; network.setQosId ( qosId ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForSync ( iface ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }
Source:
public void testExecuteQueryCommand ( ) { params = getQueryParameters ( ) ; org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( vmID ) ; org.ovirt.engine.core.bll.IsBalloonEnabledQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ! ( ( ( java.lang.Boolean ) ( query.getQueryReturnValue ( ) . getReturnValue ( ) ) ) . booleanValue ( ) ) ) ) ; }

Target:
public void testExecuteQueryCommand ( ) { params = getQueryParameters ( ) ; org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( vmID ) ; org.ovirt.engine.core.bll.IsBalloonEnabledQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( ( ( java.lang.Boolean ) ( query.getQueryReturnValue ( ) . getReturnValue ( ) ) ) . booleanValue ( ) ) ) ) ; }
Source:
public void validateVmMemoryCanStartOnVds ( ) { boolean vmPassedMemoryRequirement = org.ovirt.engine.core.bll.scheduling.SlaValidator.getInstance ( ) . hasPhysMemoryToRunVM ( vds , vm , 0 ) ; org.junit.Assert.assertEquals ( vmPassedMemoryRequirement , true ) ; }

Target:
public void validateVmMemoryCanRunOnVdsHighMemLowOverhead ( ) { vm.setMinAllocatedMem ( 10000 ) ; vm.setVmMemSizeMb ( 10000 ) ; org.mockito.Mockito.doReturn ( ( - 1200 ) ) . when ( vmOverheadCalculator ) . getStaticOverheadInMb ( org.mockito.Matchers.any ( ) ) ; boolean vmPassedMemoryRequirement = slaValidator.hasOvercommitMemoryToRunVM ( vds , vm ) ; org.junit.Assert.assertTrue ( vmPassedMemoryRequirement ) ; }
Source:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { for ( org.ovirt.engine.core.common.businessentities.aaa.DbGroup grp : ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > ) ( returnValue ) ) ) { items.add ( createUserGroup ( grp.getName ( ) , grp.getNamespace ( ) , grp.getDomain ( ) ) ) ; } setItems ( items ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { for ( org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup grp : ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( returnValue ) ) ) { items.add ( createUserGroup ( grp.getName ( ) , grp.getNamespace ( ) , grp.getAuthz ( ) ) ) ; } setItems ( items ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( returnValue ) ) ; diskModel.getIsShareable ( ) . setIsChangable ( isShareableDiskEnabled ) ; diskModel.getIsShareable ( ) . getChangeProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . shareableDiskNotSupported ( ) ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( returnValue ) ) ; diskModel.getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . shareableDiskNotSupported ( ) ) ; diskModel.getIsShareable ( ) . setIsChangable ( isShareableDiskEnabled ) ; }
Source:
public org.ovirt.engine.api.model.Disks list ( ) { if ( org.ovirt.engine.api.common.util.QueryHelper.hasMatrixParam ( getUriInfo ( ) , org.ovirt.engine.api.restapi.resource.BackendStorageDomainDisksResource.UNREGISTERED_CONSTRAINT_PARAMETER ) ) { throw new org.apache.commons.lang.NotImplementedException ( "\"unregistered\" disks lookup yet not implemented." ) ; } else { return mapCollection ( getBackendCollection ( VdcQueryType.GetAllDisksByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( this . storageDomainId ) ) ) ; } }

Target:
public org.ovirt.engine.api.model.Disks list ( ) { if ( org.ovirt.engine.api.common.util.QueryHelper.hasMatrixParam ( getUriInfo ( ) , org.ovirt.engine.api.restapi.resource.BackendStorageDomainDisksResource.UNREGISTERED_CONSTRAINT_PARAMETER ) ) { return mapCollection ( getBackendCollection ( VdcQueryType.GetUnregisteredDisks , new org.ovirt.engine.core.common.queries.GetUnregisteredDisksQueryParameters ( storageDomainId , getStoragePoolIdForDomain ( storageDomainId ) ) ) ) ; } else { return mapCollection ( getBackendCollection ( VdcQueryType.GetAllDisksByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( this . storageDomainId ) ) ) ; } }
Source:
protected void verify ( org.ovirt.engine.api.model.Job model , org.ovirt.engine.api.model.Job transform ) { assertNotNull ( transform ) ; assertEquals ( model.getId ( ) , transform.getId ( ) ) ; assertEquals ( model.getDescription ( ) , transform.getDescription ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Job model , org.ovirt.engine.api.model.Job transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.Assert.assertEquals ( model.getDescription ( ) , transform.getDescription ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( returnValue ) ) ; model.SetDataCenter ( model , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.storage_pool [ ] { dataCenter } ) ) ) ; model.getDataCenter ( ) . setIsChangable ( false ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; model.setDataCenter ( model , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StoragePool [ ] { dataCenter } ) ) ) ; model.getDataCenter ( ) . setIsChangable ( false ) ; }
Source:
protected boolean isStorageDomainCompatibleWithDC ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { org.ovirt.engine.core.bll.storage.StoragePoolValidator spv = new org.ovirt.engine.core.bll.storage.StoragePoolValidator ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ) ; if ( ( storageDomain.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.GLUSTERFS ) ) { org.ovirt.engine.core.bll.ValidationResult result = spv.isGlusterSupportedInDC ( ) ; return validate ( result ) ; } if ( ( storageDomain.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) { org.ovirt.engine.core.bll.ValidationResult result = spv.isPosixSupportedInDC ( ) ; return validate ( result ) ; } return true ; }

Target:
protected boolean isStorageDomainCompatibleWithDC ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator spv = new org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ) ; if ( ( storageDomain.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.GLUSTERFS ) ) { org.ovirt.engine.core.bll.ValidationResult result = spv.isGlusterSupportedInDC ( ) ; return validate ( result ) ; } if ( ( storageDomain.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) { org.ovirt.engine.core.bll.ValidationResult result = spv.isPosixSupportedInDC ( ) ; return validate ( result ) ; } return true ; }
Source:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getDefaultSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
private void updateCinderDomainStatus ( final org.ovirt.engine.core.compat.Guid storageDomainId , final org.ovirt.engine.core.compat.Guid storagePoolId , final org.ovirt.engine.core.common.businessentities.StorageDomainStatus storageDomainStatus ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMapDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( storageDomainId , storagePoolId ) ) ; map.setStatus ( storageDomainStatus ) ; getStoragePoolIsoMapDao ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; }

Target:
public void detachCinderDomainFromPool ( final org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap mapToRemove ) { storagePoolIsoMapDao.remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( mapToRemove.getStorageId ( ) , mapToRemove.getStoragePoolId ( ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotplugDisk ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotplugDisk ( info.getInnerMap ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveLabelCommand.getLabelId ( ) ) != null ) { labelDao.remove ( org.ovirt.engine.core.bll.RemoveLabelCommand.getLabelId ( ) ) ; org.ovirt.engine.core.bll.RemoveLabelCommand.setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveLabelCommand.getLabelId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Label label = labelDao.get ( org.ovirt.engine.core.bll.RemoveLabelCommand.getLabelId ( ) ) ; vmStaticDao.incrementDbGenerationForVms ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( label.getVms ( ) ) ) ; labelDao.remove ( org.ovirt.engine.core.bll.RemoveLabelCommand.getLabelId ( ) ) ; org.ovirt.engine.core.bll.RemoveLabelCommand.setSucceeded ( true ) ; } }
Source:
public java.lang.String getTaskMessage ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.job.StepEnum stepType , org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask task ) { if ( task == null ) { return null ; } java.util.Map < java.lang.String , java.lang.String > values = getMessageMap ( cluster , task ) ; return org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( stepType , values ) ; }

Target:
public java.lang.String getTaskMessage ( org.ovirt.engine.core.common.businessentities.Cluster cluster , org.ovirt.engine.core.common.job.StepEnum stepType , org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask task ) { if ( task == null ) { return null ; } java.util.Map < java.lang.String , java.lang.String > values = getMessageMap ( cluster , task ) ; return org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( stepType , values ) ; }
Source:
public void ClearTasks ( ) { synchronized ( _listTasks ) { java.util.ArrayList < org.ovirt.engine.core.bll.tasks.CommandAsyncTask > CurrentActionTypeTasks = getCurrentTasks ( ) ; for ( org.ovirt.engine.core.bll.tasks.CommandAsyncTask task : CurrentActionTypeTasks ) { if ( ( task.getLastTaskStatus ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.finished ) ) { task.clearAsyncTask ( ) ; _listTasks.remove ( task.getVdsmTaskId ( ) ) ; } } } }

Target:
public void clearTasks ( ) { synchronized ( _listTasks ) { java.util.ArrayList < org.ovirt.engine.core.bll.tasks.CommandAsyncTask > CurrentActionTypeTasks = getCurrentTasks ( ) ; for ( org.ovirt.engine.core.bll.tasks.CommandAsyncTask task : CurrentActionTypeTasks ) { if ( ( task.getLastTaskStatus ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.finished ) ) { task.clearAsyncTask ( ) ; _listTasks.remove ( task.getVdsmTaskId ( ) ) ; } } } }
Source:
private void assertHostNotValid ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vnics , java.util.List < java.lang.String > exceptedProblematicVnics ) { validateVnics ( vnics , exceptedProblematicVnics ) ; org.junit.Assert.assertEquals ( expectedVnicToVfMap , vfScheduler.getVnicToVfMap ( vmId , hostId ) ) ; }

Target:
public void validVnicNotPlugged ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vnic = mockVnic ( true ) ; org.mockito.Mockito.when ( vnic.isPlugged ( ) ) . thenReturn ( false ) ; initHostWithOneVfsConfig ( java.util.Collections.singletonList ( vnic ) , 0 , true , false , false , false ) ; assertHostValid ( java.util.Collections.singletonList ( vnic ) ) ; }
Source:
public void vdspysGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.GLUSTER_NOT_SUPPORTED ) ; }

Target:
public void vdspysGroupWithVirtGlusterNotSupported ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( EngineMessage.GLUSTER_NOT_SUPPORTED ) ; }
Source:
public void testDetachSuccess ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpActionExpectations ( VdcActionType.DetachStorageConnectionFromStorageDomain , org.ovirt.engine.core.common.action.AttachDetachStorageConnectionParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; assertEquals ( 200 , response.getStatus ( ) ) ; }

Target:
public void testDetachSuccess ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpActionExpectations ( ActionType.DetachStorageConnectionFromStorageDomain , org.ovirt.engine.core.common.action.AttachDetachStorageConnectionParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; assertEquals ( 200 , response.getStatus ( ) ) ; }
Source:
private void restoreOriginalValue ( final java.lang.String keyName , org.ovirt.engine.core.config.entity.ConfigKey originialValue ) throws java.lang.IllegalAccessException { config.getEngineConfigLogic ( ) . persist ( keyName , originialValue.getValue ( ) , originialValue.getVersion ( ) ) ; org.ovirt.engine.core.config.entity.ConfigKey currentConfigKey = config.getEngineConfigLogic ( ) . fetchConfigKey ( keyName , "general" ) ; junit.framework.Assert.assertEquals ( originialValue.getValue ( ) , currentConfigKey.getValue ( ) ) ; }

Target:
private void restoreOriginalValue ( final java.lang.String keyName , org.ovirt.engine.core.config.entity.ConfigKey originialValue ) throws java.lang.IllegalAccessException { config.getEngineConfigLogic ( ) . persist ( keyName , originialValue.getValue ( ) , originialValue.getVersion ( ) ) ; org.ovirt.engine.core.config.entity.ConfigKey currentConfigKey = config.getEngineConfigLogic ( ) . fetchConfigKey ( keyName , "general" ) ; org.junit.Assert.assertEquals ( originialValue.getValue ( ) , currentConfigKey.getValue ( ) ) ; }
Source:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.QueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , org.ovirt.engine.core.common.queries.QueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.QueryReturnValue result = backend.runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid pool , org.ovirt.engine.core.common.businessentities.StorageDomainType type ) { return getCallsHandler ( ) . executeRead ( "Getstorage_domain_by_type_and_storagePoolId" , org.ovirt.engine.core.dao.StorageDomainDAODbFacadeImpl.StorageDomainRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , pool ) . addValue ( "storage_domain_type" , type.getValue ( ) ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( org.ovirt.engine.core.compat.Guid poolId , org.ovirt.engine.core.common.businessentities.StorageDomainType type , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { java.lang.Integer statusNum = ( status == null ) ? null : status.getValue ( ) ; return getCallsHandler ( ) . executeRead ( "Getstorage_domain_by_type_storagePoolId_and_status" , org.ovirt.engine.core.dao.StorageDomainDAODbFacadeImpl.StorageDomainRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , poolId ) . addValue ( "storage_domain_type" , type.getValue ( ) ) . addValue ( "status" , statusNum ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult notRenamingManagementNetwork ( org.ovirt.engine.core.common.businessentities.network.Network newNetwork ) { java.lang.String managementNetwork = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ; return ( network.getName ( ) . equals ( managementNetwork ) ) && ( ! ( newNetwork.getName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult notRenamingManagementNetwork ( org.ovirt.engine.core.common.businessentities.network.Network newNetwork ) { java.lang.String managementNetwork = org.ovirt.engine.core.utils.NetworkUtils.getEngineNetwork ( ) ; return ( network.getName ( ) . equals ( managementNetwork ) ) && ( ! ( newNetwork.getName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( skipFencingIfSDActive ? 1231 : 1237 ) ; result = ( prime * result ) + ( skipFencingIfConnectivityBroken ? 1231 : 1237 ) ; result = ( prime * result ) + ( hostsWithBrokenConnectivityThreshold ) ; return result ; }
Source:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( isTemplateVersion ( ) ) { java.lang.String jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "onTimerHandleVdsRecovering" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }

Target:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( isTemplateVersion ( ) ) { java.lang.String jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "updateVmVersion" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }
Source:
public void testGetNotFound2 ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( asList ( getEntity ( 2 ) ) ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound2 ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( asList ( getEntity ( 2 ) ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.network.IpConfiguration createIpConfiguration ( ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; address.setAddress ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IP_ADDRESS ) ; address.setNetmask ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.NETMASK ) ; address.setGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.GATEWAY ) ; address.setBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration result = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; result.setIPv4Addresses ( java.util.Collections.singletonList ( address ) ) ; return result ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IpV6Address createIpv6Address ( ) { org.ovirt.engine.core.common.businessentities.network.IpV6Address address = new org.ovirt.engine.core.common.businessentities.network.IpV6Address ( ) ; address.setAddress ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IPV6_ADDRESS ) ; address.setPrefix ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IPV6_PREFIX ) ; address.setGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IPV6_GATEWAY ) ; address.setBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; return address ; }
Source:
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 ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( EntityModel.entityChangedEventDefinition ) ) && ( sender == ( getPath ( ) ) ) ) { getPathChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; } else if ( ( ev.matchesDefinition ( EntityModel.entityChangedEventDefinition ) ) && ( sender == ( getOverride ( ) ) ) ) { override_EntityChanged ( args ) ; } }

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 ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( HasEntity.entityChangedEventDefinition ) ) && ( sender == ( getPath ( ) ) ) ) { getPathChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; } else if ( ( ev.matchesDefinition ( HasEntity.entityChangedEventDefinition ) ) && ( sender == ( getOverride ( ) ) ) ) { override_EntityChanged ( args ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.VDS createServer ( org.ovirt.engine.core.compat.Guid serverId , java.lang.String hostname , org.ovirt.engine.core.compat.Version version ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( serverId ) ; vds.setHostName ( hostname ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setVdsGroupCompatibilityVersion ( version ) ; return vds ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS createServer ( org.ovirt.engine.core.compat.Guid serverId , java.lang.String hostname , org.ovirt.engine.core.compat.Version version ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( serverId ) ; vds.setHostName ( hostname ) ; vds.setStatus ( VDSStatus.Up ) ; vds.setClusterCompatibilityVersion ( version ) ; return vds ; }
Source:
public javax.ws.rs.core.Response move ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId = getStorageDomainId ( action ) ; org.ovirt.engine.core.compat.Guid imageId = asGuid ( get ( ) . getImageId ( ) ) ; org.ovirt.engine.core.common.action.MoveDisksParameters params = new org.ovirt.engine.core.common.action.MoveDisksParameters ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.action.MoveDiskParameters ( imageId , org.ovirt.engine.core.compat.Guid.Empty , storageDomainId ) ) ) ; return doAction ( VdcActionType.MoveDisks , params , action ) ; }

Target:
public javax.ws.rs.core.Response move ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId = getStorageDomainId ( action ) ; org.ovirt.engine.api.model.Disk disk = get ( ) ; org.ovirt.engine.core.compat.Guid imageId = asGuid ( disk.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid sourceStorageDomainId = getSourceStorageDomainId ( disk ) ; org.ovirt.engine.core.common.action.MoveDisksParameters params = new org.ovirt.engine.core.common.action.MoveDisksParameters ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.action.MoveDiskParameters ( imageId , sourceStorageDomainId , storageDomainId ) ) ) ; return doAction ( VdcActionType.MoveDisks , params , action ) ; }
Source:
protected boolean checkQuotaValidationCommon ( org.ovirt.engine.core.common.businessentities.Quota quota , java.util.List < java.lang.String > messages ) { if ( quota == null ) { messages.add ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString ( ) ) ; return false ; } if ( ( ( ! ( checkQuotaNameExisting ( quota , messages ) ) ) || ( ! ( org.ovirt.engine.core.bll.QuotaCRUDCommand.validateQuotaStorageLimitation ( quota , messages ) ) ) ) || ( ! ( org.ovirt.engine.core.bll.QuotaCRUDCommand.validateQuotaClusterLimitation ( quota , messages ) ) ) ) { return false ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.common.businessentities.Quota quota = getParameters ( ) . getQuota ( ) ; if ( quota.isDefault ( ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } return ( ( validateQuotaNameIsUnique ( quota ) ) && ( validateQuotaStorageLimitation ( quota ) ) ) && ( validateQuotaClusterLimitation ( quota ) ) ; }
Source:
public void testInstanceOnlyOutput ( ) { java.lang.String expected = ( ( ( getClass ( ) . getSimpleName ( ) ) + ( ToStringBuilder.CLASS_NAME_SUFFIX ) ) + ( ToStringBuilder.ATTRIBUTES_LIST_PREFIX ) ) + ( ToStringBuilder.ATTRIBUTES_LIST_SUFFIX ) ; org.junit.Assert.assertEquals ( expected , org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . build ( ) ) ; }

Target:
public void testInstanceOnlyOutput ( ) { java.lang.String expected = ( ( ( getClass ( ) . getSimpleName ( ) ) + ( ToStringBuilder.CLASS_NAME_SUFFIX ) ) + ( ToStringBuilder.ATTRIBUTES_LIST_PREFIX ) ) + ( ToStringBuilder.ATTRIBUTES_LIST_SUFFIX ) ; org.junit.jupiter.api.Assertions.assertEquals ( expected , org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . build ( ) ) ; }
Source:
public org.ovirt.engine.api.model.InstanceType update ( org.ovirt.engine.api.model.InstanceType incoming ) { return performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetInstanceType , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class ) , VdcActionType.UpdateVmTemplate , new org.ovirt.engine.api.restapi.resource.BackendInstanceTypeResource.UpdateParametersProvider ( ) ) ; }

Target:
public org.ovirt.engine.api.model.InstanceType update ( org.ovirt.engine.api.model.InstanceType incoming ) { org.ovirt.engine.api.model.InstanceType instanceType = performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetInstanceType , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class ) , VdcActionType.UpdateVmTemplate , new org.ovirt.engine.api.restapi.resource.BackendInstanceTypeResource.UpdateParametersProvider ( ) ) ; if ( instanceType != null ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( this , instanceType ) ; } return instanceType ; }
Source:
private void InitSpmPriorities ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetMaxSpmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.maxSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; InitSpmPriorities1 ( ) ; } } ) ) ; }

Target:
private void initSpmPriorities ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getMaxSpmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.maxSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; initSpmPriorities1 ( ) ; } } ) ) ; }
Source:
public java.util.List < org.ovirt.engine.sdk.decorators.VMCdRom > list ( java.lang.Integer max ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = new org.ovirt.engine.sdk.utils.UrlBuilder ( ( ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ) ) . add ( "max" , max , UrlParameterType.MATRIX ) . build ( ) ; return list ( url , org.ovirt.engine.sdk.entities.CdRoms.class , org.ovirt.engine.sdk.decorators.VMCdRom.class ) ; }

Target:
public java.util.List < org.ovirt.engine.sdk.decorators.VMCdRom > list ( java.lang.Integer max ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; java.lang.String url = new org.ovirt.engine.sdk.utils.UrlBuilder ( ( ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ) ) . add ( "max" , max , UrlParameterType.MATRIX ) . build ( ) ; return list ( url , org.ovirt.engine.sdk.entities.CdRoms.class , org.ovirt.engine.sdk.decorators.VMCdRom.class , headers ) ; }