auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getstorage_type ( ) ) . ConnectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { ( ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.ConnectAllHostsToLunCommandReturnValue ) ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getReturnValue ( ) ) ) . setFailedVds ( vds ) ; throw e ; } }

Target:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getstorage_type ( ) ) . ConnectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { final org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.ConnectAllHostsToLunCommandReturnValue result = getResult ( ) ; result.setFailedVds ( vds ) ; result.setFailedLun ( lun ) ; throw e ; } }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s, prevId=%s, prevLVER=%s, storagePoolFormatType=%s, recoveryMode=%s, SCSIFencing=%s" , super . toString ( ) , getPrevId ( ) , getPrevLVER ( ) , getStoragePoolFormatType ( ) , getRecoveryMode ( ) , getSCSIFencing ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "prevId" , getPrevId ( ) ) . append ( "prevLVER" , getPrevLVER ( ) ) . append ( "storagePoolFormatType" , getStoragePoolFormatType ( ) ) . append ( "recoveryMode" , getRecoveryMode ( ) ) . append ( "SCSIFencing" , getSCSIFencing ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; importDiskId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; existingDiskId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; storageDomainId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; storagePoolId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; importDiskIds = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( importDiskId , existingDiskId ) ) ; prepareMocks ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; importDiskId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; existingDiskId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; storageDomainId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; storagePoolId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; importDiskIds = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( importDiskId , existingDiskId ) ) ; prepareMocks ( ) ; }
Source:
public void shouldDetectSameMajorVersion ( ) { org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "test" , new org.ovirt.engine.core.compat.Version ( "6.3" ) ) . isSameMajorVersion ( new org.ovirt.engine.core.utils.OS ( "test" , new org.ovirt.engine.core.compat.Version ( "6.6" ) ) ) ) . isTrue ( ) ; }

Target:
public void shouldDetectSameMajorVersion ( ) { org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "test" , new org.ovirt.engine.core.compat.Version ( "6.3" ) , "" ) . isSameMajorVersion ( new org.ovirt.engine.core.utils.OS ( "test" , new org.ovirt.engine.core.compat.Version ( "6.6" ) , "" ) ) ) . isTrue ( ) ; }
Source:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "StoragePoolName" , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getDbFacade ( ) . getStoragePoolDao ( ) . get ( dataCenterId ) . getName ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }

Target:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "StoragePoolName" , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getDbFacade ( ) . getStoragePoolDao ( ) . get ( dataCenterId ) . getName ( ) ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }
Source:
private void testDiscardFieldParsing ( org.ovirt.engine.core.compat.Version poolCompatibilityVersion , java.lang.Long expectedDiscardMaxSize ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; xlun.put ( "discard_max_bytes" , 1024L ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLun ( xlun , poolCompatibilityVersion ) ; org.junit.Assert.assertEquals ( lun.getDiscardMaxSize ( ) , expectedDiscardMaxSize ) ; }

Target:
private void testDiscardFieldParsing ( org.ovirt.engine.core.compat.Version poolCompatibilityVersion , java.lang.Long expectedDiscardMaxSize ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; xlun.put ( "discard_max_bytes" , 1024L ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLun ( xlun , poolCompatibilityVersion ) ; org.junit.jupiter.api.Assertions.assertEquals ( lun.getDiscardMaxSize ( ) , expectedDiscardMaxSize ) ; }
Source:
protected java.lang.String renderNullSafe ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > pair ) { java.lang.String key = pair.getKey ( ) ; java.lang.String value = pair.getValue ( ) . getEntity ( ) ; if ( "custom" . equals ( key ) ) { return ( ( constants.customHostPopup ( ) ) + ": " ) + value ; } return value ; }

Target:
protected java.lang.String renderNullSafe ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > pair ) { java.lang.String key = pair.getKey ( ) ; java.lang.String value = pair.getValue ( ) . getEntity ( ) ; if ( "custom" . equals ( key ) ) { return ( ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostBondPopupView.constants.customHostPopup ( ) ) + ": " ) + value ; } return value ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet > getAllSubnets ( org.ovirt.engine.core.common.businessentities.network.ProviderNetwork network ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet > result = new java.util.ArrayList < > ( ) ; com.woorea.openstack.quantum.model.Subnets subnets = getClient ( ) . subnets ( ) . list ( ) . execute ( ) ; for ( com.woorea.openstack.quantum.model.Subnet subnet : subnets.getList ( ) ) { if ( network.getExternalId ( ) . equals ( subnet.getNetworkId ( ) ) ) { result.add ( map ( subnet , network ) ) ; } } return result ; }

Target:
protected com.woorea.openstack.quantum.model.Port createNewPortForAllocate ( org.ovirt.engine.core.common.businessentities.network.VmNic nic , java.util.List < java.lang.String > securityGroups , java.lang.String hostId , org.ovirt.engine.core.common.businessentities.network.Network externalNetwork ) { com.woorea.openstack.quantum.model.Port portForCreate = super . createNewPortForAllocate ( nic , securityGroups , hostId , externalNetwork ) ; portForCreate.setTenantId ( externalNetwork.getTenantId ( ) ) ; return portForCreate ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateNetworkExclusiveOnNics ( ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType > > nicNameToNetworkTypesMap = createNicNameToNetworkTypesMap ( ) ; java.util.List < java.lang.String > violatedNics = findViolatedNics ( nicNameToNetworkTypesMap ) ; if ( violatedNics.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_INTERFACES_NOT_EXCLUSIVELY_USED_BY_NETWORK , violatedNics ) ; } }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateNetworkExclusiveOnNics ( ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.network.NetworkType > > nicNameToNetworkTypesMap = createNicNameToNetworkTypesMap ( ) ; java.util.List < java.lang.String > violatedNics = findViolatedNics ( nicNameToNetworkTypesMap ) ; if ( violatedNics.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { final org.ovirt.engine.core.common.errors.EngineMessage violationMessage = networkExclusivenessValidator.getViolationMessage ( ) ; return new org.ovirt.engine.core.bll.ValidationResult ( violationMessage , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( ( violationMessage + ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.LIST_SUFFIX ) ) , violatedNics ) ) ; } }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.IVdcQueryable > java.util.List < T > genericSearch ( final org.ovirt.engine.core.dao.SearchDAO < T > dao , final boolean useCache , final org.ovirt.engine.core.common.utils.ListUtils.Filter < T > filter ) { final org.ovirt.engine.core.bll.QueryData data = initQueryData ( useCache ) ; if ( data == null ) { return new java.util.ArrayList < T > ( ) ; } log.debug ( ( "Executing generic query: " + ( data.getQuery ( ) ) ) ) ; return org.ovirt.engine.core.common.utils.ListUtils.filter ( dao.getAllWithQuery ( data.getQuery ( ) ) , filter ) ; }

Target:
private < T extends org.ovirt.engine.core.common.businessentities.IVdcQueryable > java.util.List < T > genericSearch ( final org.ovirt.engine.core.dao.SearchDAO < T > dao , final boolean useCache , final org.ovirt.engine.core.common.utils.ListUtils.Filter < T > filter ) { final org.ovirt.engine.core.bll.QueryData data = initQueryData ( useCache ) ; if ( data == null ) { return new java.util.ArrayList < T > ( ) ; } log.debug ( "Executing generic query: {}" , data.getQuery ( ) ) ; return org.ovirt.engine.core.common.utils.ListUtils.filter ( dao.getAllWithQuery ( data.getQuery ( ) ) , filter ) ; }
Source:
public static boolean isBackedByHugepages ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { if ( ( ( vm.getCustomProperties ( ) ) == null ) || ( vm.getCustomProperties ( ) . isEmpty ( ) ) ) { return false ; } java.lang.String hugePage = org.ovirt.engine.core.common.utils.HugePageUtils.getHugePageSize ( vm ) ; if ( hugePage == null ) { return false ; } try { return ( java.lang.Integer.parseInt ( hugePage ) ) > 0 ; } catch ( java.lang.NumberFormatException e ) { return false ; } }

Target:
public static boolean isBackedByHugepages ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { return ( org.ovirt.engine.core.common.utils.HugePageUtils.getHugePageSize ( vm ) . orElse ( 0 ) ) > 0 ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult result ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > poolRepresentants = new java.util.LinkedList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > poolRepresentantsRetval = result.getReturnValues ( ) ; for ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue poolRepresentant : poolRepresentantsRetval ) { poolRepresentants.add ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( poolRepresentant.getReturnValue ( ) ) ) ) ; } consoleModelsCache.updatePoolCache ( poolRepresentants ) ; finishSearch ( all ) ; }

Target:
public void onSuccess ( java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.String > idToIconMap ) { finishSearch ( vmPairs ) ; }
Source:
private void createCluster ( ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterManagerTest.CLUSTER_ID ) ; existingCluster.setname ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; }

Target:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterManagerTest.CLUSTER_ID ) ; existingCluster.setname ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setcompatibility_version ( version ) ; }
Source:
public void testAttachedStorageDomainLinks ( ) { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; storageDomain.getDataCenter ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storageDomain ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.ATTACHED_STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; }

Target:
public void testAttachedStorageDomainLinks ( ) { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; storageDomain.getDataCenter ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storageDomain ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.ATTACHED_STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; }
Source:
com.google.gwt.http.client.RequestBuilder createRequest ( java.lang.String engineAuthToken ) { com.google.gwt.http.client.RequestBuilder builder = createRequest ( ) ; java.lang.String preferValue = builder.getHeader ( org.ovirt.engine.ui.common.restapi.RestApiSessionManager.PREFER_HEADER ) ; builder.setHeader ( org.ovirt.engine.ui.common.restapi.RestApiSessionManager.PREFER_HEADER , ( preferValue + ", new-auth" ) ) ; builder.setHeader ( org.ovirt.engine.ui.common.restapi.RestApiSessionManager.ENGINE_AUTH_TOKEN_HEADER , engineAuthToken ) ; return builder ; }

Target:
com.google.gwt.http.client.RequestBuilder createRequest ( java.lang.String engineAuthToken ) { com.google.gwt.http.client.RequestBuilder builder = createRequest ( ) ; java.lang.String preferValue = builder.getHeader ( org.ovirt.engine.ui.common.restapi.RestApiSessionManager.PREFER_HEADER ) ; builder.setHeader ( org.ovirt.engine.ui.common.restapi.RestApiSessionManager.PREFER_HEADER , ( preferValue + ", new-auth" ) ) ; builder.setHeader ( org.ovirt.engine.ui.common.restapi.RestApiSessionManager.HEADER_AUTHORIZATION , ( "Bearer " + engineAuthToken ) ) ; return builder ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.AddRoleCommand.getRoleDao ( ) . getByName ( org.ovirt.engine.core.bll.AddRoleCommand.getRoleName ( ) ) ) != null ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__ADD ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__ROLE ) ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean validate ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.AddRoleCommand.getRoleDao ( ) . getByName ( org.ovirt.engine.core.bll.AddRoleCommand.getRoleName ( ) ) ) != null ) { addValidationMessage ( EngineMessage.VAR__ACTION__ADD ) ; addValidationMessage ( EngineMessage.VAR__TYPE__ROLE ) ; addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; returnValue = false ; } return returnValue ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeRemoveBrickForce ( java.lang.String volumeName , java.lang.String [ ] brickDirectories , int replicaCount ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeRemoveBrickForce ( volumeName , brickDirectories , replicaCount ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturnForXmlRpc glusterVolumeRemoveBricksStart ( java.lang.String volumeName , java.lang.String [ ] brickDirectories , int replicaCount , java.lang.Boolean forceRemove ) { try { if ( forceRemove ) { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturnForXmlRpc ( vdsServer.glusterVolumeRemoveBrickForce ( volumeName , brickDirectories , replicaCount ) ) ; } else { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturnForXmlRpc ( vdsServer.glusterVolumeRemoveBrickStart ( volumeName , brickDirectories , replicaCount ) ) ; } } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void setVdsStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { _vds.setStatus ( status ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( _vds.getDynamicData ( ) ) ; return null ; } } ) ; }

Target:
private void _setVdsStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { _vds.setStatus ( status ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( _vds.getDynamicData ( ) ) ; return null ; } } ) ; }
Source:
public void endWithFailure ( ) { updateDestinitationImageId ( ) ; endCreateAllSnapshots ( ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void endWithFailure ( ) { for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } endCreateAllSnapshots ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , false ) ; enclosingCommand.setExecutionContext ( null ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public void externalNetworkDescriptionChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = mockExternalNetwork ( ) ; org.mockito.Mockito.when ( externalNetwork.getDescription ( ) ) . thenReturn ( "aaa" ) ; org.mockito.Mockito.when ( network.getDescription ( ) ) . thenReturn ( "bbb" ) ; org.junit.Assert.assertThat ( validator.externalNetworkDetailsUnchanged ( externalNetwork ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void externalNetworkNameChanged ( ) { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = createExternalNetwork ( ) ; externalNetwork.setName ( "aaa" ) ; network.setName ( "bbb" ) ; org.junit.Assert.assertThat ( validator.externalNetworkDetailsUnchanged ( externalNetwork ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private boolean isStorageFormatSupportedByStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StorageFormatType storageFormat = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageFormat ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool targetStoragePool = getTargetStoragePool ( ) ; if ( targetStoragePool == null ) { return true ; } java.util.Set < org.ovirt.engine.core.common.businessentities.StorageFormatType > supportedStorageFormats = getSupportedStorageFormatSet ( targetStoragePool.getcompatibility_version ( ) ) ; return supportedStorageFormats.contains ( storageFormat ) ; }

Target:
protected void updateStorageDomainWipeAfterDelete ( ) { if ( ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) . getWipeAfterDelete ( ) ) == null ) { org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) . setWipeAfterDelete ( org.ovirt.engine.core.bll.utils.WipeAfterDeleteUtils.getDefaultWipeAfterDeleteFlag ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) . getStorageType ( ) ) ) ; } }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase runCanDoActionOnly ( final int currentCanDoActionId , final int totalSize ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getCommands ( ) . get ( currentCanDoActionId ) ; java.lang.String actionType = command.getActionType ( ) . toString ( ) ; try { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Start time: {0}. Start running CanDoAction for command number {1}/{2} (Command type: {3})" , new java.util.Date ( ) , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; return command.canDoActionOnly ( ) ; } finally { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "End time: {0}. Finish handling CanDoAction for command number {1}/{2} (Command type: {3})" , new java.util.Date ( ) , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; } }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase runCanDoActionOnly ( final int currentCanDoActionId , final int totalSize ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getCommands ( ) . get ( currentCanDoActionId ) ; java.lang.String actionType = command.getActionType ( ) . toString ( ) ; try { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Start running CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; return command.canDoActionOnly ( ) ; } finally { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Finish handling CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; } }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > GetNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( osType ) ) { if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { dcLabels = ( ( java.lang.Iterable < java.lang.String > ) ( returnValue ) ) ; stopProgress ( ) ; onExportChanged ( ) ; }

Target:
protected void postSaveAction ( boolean succeeded ) { if ( succeeded ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qosItems = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( getQos ( ) . getItems ( ) ) ) ) ; qosItems.add ( 1 , networkQoS ) ; getQos ( ) . setItems ( qosItems ) ; getQos ( ) . setSelectedItem ( networkQoS ) ; } super . postSaveAction ( succeeded ) ; }
Source:
private boolean isRngDeviceSupported ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.core.compat.Version clusterVersion = clusterVersionOrNull ( model ) ; return clusterVersion == null ? false : ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VirtIoRngDeviceSupported , clusterVersion.getValue ( ) ) ) ) ; }

Target:
protected void updateMemoryBalloon ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; java.lang.Integer osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster != null ) && ( osType != null ) ) { updateMemoryBalloon ( getModel ( ) . getCompatibilityVersion ( ) , osType ) ; } }
Source:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDao ( ) . getAnyAdminRoleForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; if ( ! ( userRoles.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debug ( "LoginAdminUser: User logged to admin using role '{}'" , userRoles.get ( 0 ) . getName ( ) ) ; return true ; } return false ; }

Target:
public boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = roleDao.getAnyAdminRoleForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; if ( ! ( userRoles.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debug ( "LoginAdminUser: User logged to admin using role '{}'" , userRoles.get ( 0 ) . getName ( ) ) ; return true ; } return false ; }
Source:
protected void endActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParametersForChildCommand ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.VmCommand.getBackend ( ) . EndAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p ) ; } }

Target:
protected void endActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParametersForChildCommand ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.VmCommand.getBackend ( ) . endAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.bll.ChangeVMClusterCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.getParameters ( ) . getClusterId ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_VM ) ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return org.ovirt.engine.core.bll.VmHandler.getPermissionsNeededToChangeCluster ( org.ovirt.engine.core.bll.ChangeVMClusterCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.ChangeVMClusterCommand.getParameters ( ) . getClusterId ( ) ) ; }
Source:
protected void setStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { if ( ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getStatus ( ) ) != status ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getId ( ) , status ) ) ; } }

Target:
protected void setStatus ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { if ( ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getStatus ( ) ) != status ) { org.ovirt.engine.core.bll.FenceVdsBaseCommand.getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( org.ovirt.engine.core.bll.FenceVdsBaseCommand.getVds ( ) . getId ( ) , status ) ) ; } }
Source:
public void saveGlusterServerHook ( org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid hostId , java.lang.String checksum , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus status ) { getCallsHandler ( ) . executeModification ( "InsertGlusterServerHook" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , hookId ) . addValue ( "host_id" , hostId ) . addValue ( "checksum" , checksum ) . addValue ( "status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( status ) ) ) ; }

Target:
public void updateGlusterHookContent ( org.ovirt.engine.core.compat.Guid id , java.lang.String checksum , java.lang.String content ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterHookContent" , createIdParameterMapper ( id ) . addValue ( "checksum" , checksum ) . addValue ( "content" , content ) ) ; }
Source:
private void initInterface ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { if ( ( iface.getId ( ) ) == null ) { iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } fillMacAddressIfMissing ( iface ) ; iface.setVmTemplateId ( null ) ; iface.setVmId ( getVmId ( ) ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.ImportValidator getImportValidator ( ) { if ( ( importValidator ) == null ) { importValidator = new org.ovirt.engine.core.bll.validator.ImportValidator ( getParameters ( ) ) ; } return importValidator ; }
Source:
public void testGetEntityNameByIdAndTypeForStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = dbFacade.getStorageDomainDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.STORAGE_DOMAIN_ID ) ; org.junit.Assert.assertNotNull ( storageDomain ) ; java.lang.String name = storageDomain.getstorage_name ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.STORAGE_DOMAIN_ID , VdcObjectType.Storage ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = dbFacade.getStorageDomainDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.STORAGE_DOMAIN_ID ) ; org.junit.Assert.assertNotNull ( storageDomain ) ; java.lang.String name = storageDomain.getStorageName ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.STORAGE_DOMAIN_ID , VdcObjectType.Storage ) ) ) ; }
Source:
public void testSaveServerConnection ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > before = dao.getAll ( ) ; dao.save ( newServerConnection ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > after = dao.getAll ( ) ; org.junit.Assert.assertEquals ( ( ( before.size ( ) ) + 1 ) , after.size ( ) ) ; }

Target:
public void testSaveServerConnection ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > before = dao.getAll ( ) ; dao.save ( newServerConnection ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > after = dao.getAll ( ) ; org.junit.Assert.assertEquals ( ( ( before.size ( ) ) + 1 ) , after.size ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel poolInterfaceListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel ) ( model ) ) ; poolInterfaceListModel.SyncSearch ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel poolInterfaceListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel ) ( model ) ) ; poolInterfaceListModel.syncSearch ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ; } }
Source:
public org.ovirt.engine.core.dao.VmTemplateDAO getVmTemplateDAO ( ) { final org.ovirt.engine.core.dao.VmTemplateDAO vt = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmTemplateDAO.class ) ; final org.ovirt.engine.core.common.businessentities.VmTemplate t = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; t.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; t.setname ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; org.mockito.Mockito.when ( vt.get ( Guid.Empty ) ) . thenReturn ( t ) ; org.mockito.Mockito.when ( vt.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) ; return vt ; }

Target:
public org.ovirt.engine.core.dao.VmTemplateDAO getVmTemplateDAO ( ) { final org.ovirt.engine.core.dao.VmTemplateDAO vt = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmTemplateDAO.class ) ; final org.ovirt.engine.core.common.businessentities.VmTemplate t = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; t.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; t.setName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; org.mockito.Mockito.when ( vt.get ( Guid.Empty ) ) . thenReturn ( t ) ; org.mockito.Mockito.when ( vt.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) ; return vt ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllRunningVdssInPool ( ) { return org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.GetAllRunningVdssInPool ( getBackend ( ) , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ) ; }

Target:
protected boolean InitializeVds ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVds ( ) ) == null ) { org.ovirt.engine.core.common.businessentities.VDS tempVar = org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVdsDAO ( ) . getAllForStoragePoolAndStatus ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) . getId ( ) , VDSStatus.Up ) , new org.ovirt.engine.core.utils.linq.All ( ) ) ; setVds ( tempVar ) ; if ( ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVds ( ) ) == null ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_VDS_IN_POOL ) ; } } return returnValue ; }
Source:
public void testGetVmsByInstanceTypeId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getVmsListByInstanceType ( new org.ovirt.engine.core.compat.Guid ( "99408929-82cf-4dc7-a532-9d998063fa95" ) ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) . getId ( ) , FixturesTool.VM_RHEL5_POOL_50 ) ; }

Target:
public void testGetVmsByInstanceTypeId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getVmsListByInstanceType ( FixturesTool.INSTANCE_TYPE ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) . getId ( ) , FixturesTool.VM_RHEL5_POOL_50 ) ; }
Source:
public void shouldDetectNumaPinning ( ) { invalidVM.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_NUMA_PINNED ) ) ; }

Target:
public void shouldDetectCpuPinning ( ) { invalidVM.setCpuPinning ( "i am pinned" ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_CPUS_PINNED ) ) ; }
Source:
private void addBootProtocol ( java.util.Map < java.lang.String , java.lang.Object > opts , org.ovirt.engine.core.common.vdscommands.HostNetwork attachment ) { switch ( attachment.getBootProtocol ( ) ) { case DHCP : opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.BOOT_PROTOCOL , org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCP_BOOT_PROTOCOL ) ; break ; case STATIC_IP : org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipaddr" , attachment.getAddress ( ) ) ; putPrefixOrNetmaskIfNotEmpty ( opts , attachment.getNetmask ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "gateway" , attachment.getGateway ( ) ) ; break ; default : break ; } }

Target:
private void addIpv4BootProtocol ( java.util.Map < java.lang.String , java.lang.Object > opts , org.ovirt.engine.core.common.vdscommands.HostNetwork attachment ) { switch ( attachment.getIpv4BootProtocol ( ) ) { case DHCP : opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.BOOT_PROTOCOL , org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCP_BOOT_PROTOCOL ) ; break ; case STATIC_IP : org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipaddr" , attachment.getIpv4Address ( ) ) ; putIpv4PrefixOrNetmaskIfNotEmpty ( opts , attachment.getIpv4Netmask ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "gateway" , attachment.getIpv4Gateway ( ) ) ; break ; default : break ; } }
Source:
public void populateDwhOsInfo ( java.util.Map < java.lang.Integer , java.lang.String > osIdToName ) { new org.springframework.jdbc.core.simple.SimpleJdbcCall ( jdbcTemplate ) . withProcedureName ( "clear_osinfo" ) . execute ( ) ; java.util.List < org.springframework.jdbc.core.namedparam.MapSqlParameterSource > executions = new java.util.ArrayList < > ( ) ; for ( java.util.Map.Entry < java.lang.Integer , java.lang.String > e : osIdToName.entrySet ( ) ) { executions.add ( getCustomMapSqlParameterSource ( ) . addValue ( "os_id" , e.getKey ( ) ) . addValue ( "os_name" , e.getValue ( ) ) ) ; } callsHandler.executeStoredProcAsBatch ( "insert_osinfo" , executions ) ; }

Target:
public org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler getCallsHandler ( ) { return callsHandler ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( changedArgs.PropertyName.contains ( "Alert" ) ) { updateAlerts ( getView ( ) , model ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( changedArgs.propertyName.contains ( "Alert" ) ) { updateAlerts ( getView ( ) , model ) ; } } }
Source:
public void findMissingEnumNames ( ) { boolean missingKey = false ; for ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue : org.ovirt.engine.core.common.queries.ConfigurationValues.values ( ) ) { if ( ! ( org.ovirt.engine.core.common.queries.ConfigValuesTest.configValuesEnumNames.contains ( configValue.toString ( ) ) ) ) { org.ovirt.engine.core.common.queries.ConfigValuesTest.log.error ( "Found missing key: {}" , configValue ) ; missingKey = true ; break ; } } org.junit.Assert.assertFalse ( "Found missing key: " , missingKey ) ; }

Target:
public void findMissingEnumNames ( ) { java.util.Set < org.ovirt.engine.core.common.queries.ConfigurationValues > missingKeys = new java.util.TreeSet < org.ovirt.engine.core.common.queries.ConfigurationValues > ( ) ; for ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue : org.ovirt.engine.core.common.queries.ConfigurationValues.values ( ) ) { if ( ! ( org.ovirt.engine.core.common.queries.ConfigValuesTest.configValuesEnumNames.contains ( configValue.toString ( ) ) ) ) { org.ovirt.engine.core.common.queries.ConfigValuesTest.log.error ( "Found missing key: {}" , configValue ) ; missingKeys.add ( configValue ) ; } } org.junit.Assert.assertTrue ( ( "Found missing keys: " + missingKeys ) , missingKeys.isEmpty ( ) ) ; }
Source:
protected void logToAudit ( ) { if ( isPolicyResetMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ) { return ; } org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ) ; auditLogableBase.setVds ( vds ) ; auditLogableBase.addCustomValue ( "CommandName" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getCommandName ( ) ) ; auditLogableBase.addCustomValue ( "message" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.VDS_BROKER_COMMAND_FAILURE ) ; }

Target:
protected void logToAudit ( ) { if ( isPolicyResetMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ) { return ; } org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; logable.setVdsId ( vds.getId ( ) ) ; logable.setVdsName ( vds.getName ( ) ) ; logable.addCustomValue ( "CommandName" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getCommandName ( ) ) ; logable.addCustomValue ( "message" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ; auditLogDirector.log ( logable , AuditLogType.VDS_BROKER_COMMAND_FAILURE ) ; }