auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void initOsArchitecture ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osArchitectures = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsArchitectures ) , callback ) ; }

Target:
public void initLinuxOsTypes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { linuxOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetLinuxOss ) , callback ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainHasNoImages ( org.ovirt.engine.core.common.errors.VdcBllMessages message , boolean allowOvfDisk ) { int numOfAllowedDisks = 0 ; if ( allowOvfDisk ) { numOfAllowedDisks = getDbFacade ( ) . getStorageDomainOvfInfoDao ( ) . getAllForDomain ( storageDomain.getId ( ) ) . size ( ) ; } if ( ( getDbFacade ( ) . getDiskImageDao ( ) . getAllSnapshotsForStorageDomain ( storageDomain.getId ( ) ) . size ( ) ) > numOfAllowedDisks ) { return new org.ovirt.engine.core.bll.ValidationResult ( message ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainExistAndActive ( ) { org.ovirt.engine.core.bll.ValidationResult domainExistValidation = isDomainExist ( ) ; if ( ! ( ValidationResult.VALID.equals ( domainExistValidation ) ) ) { return domainExistValidation ; } if ( ( storageDomain.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , java.lang.String.format ( "$%1$s %2$s" , "status" , storageDomain.getStatus ( ) . name ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList < T > ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; }

Target:
public void requestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList < T > ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; }
Source:
private void freeLockExecute ( ) { if ( ( ( releaseLocksAtEndOfExecute ) || ( ! ( getSucceeded ( ) ) ) ) || ( ! ( hasTasks ( ) ) ) ) { freeLock ( ) ; } }

Target:
private void freeLockExecute ( ) { if ( ( ( releaseLocksAtEndOfExecute ) || ( ! ( getSucceeded ( ) ) ) ) || ( ( ! ( hasTasks ( ) ) ) && ( ! ( ( this ) instanceof org.ovirt.engine.core.common.businessentities.IVdsAsyncCommand ) ) ) ) { freeLock ( ) ; } }
Source:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "bootProtocol" , getBootProtocol ( ) ) . append ( "address" , getAddress ( ) ) . append ( "netmask" , getNetmask ( ) ) . append ( "gateway" , getGateway ( ) ) . build ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "bootProtocol" , getBootProtocol ( ) ) . append ( "ipv4Addresses" , getIPv4Addresses ( ) ) . build ( ) ; }
Source:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.IpV6Address createIpV6Address ( java.sql.ResultSet rs , java.lang.String v6BootProtocol ) throws java.sql.SQLException { final org.ovirt.engine.core.common.businessentities.network.IpV6Address ipV6Address = new org.ovirt.engine.core.common.businessentities.network.IpV6Address ( ) ; ipV6Address.setBootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.valueOf ( v6BootProtocol ) ) ; ipV6Address.setAddress ( rs.getString ( "ipv6_address" ) ) ; ipV6Address.setPrefix ( rs.getInt ( "ipv6_prefix" ) ) ; ipV6Address.setGateway ( rs.getString ( "ipv6_gateway" ) ) ; return ipV6Address ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IpV6Address createIpV6Address ( java.sql.ResultSet rs , java.lang.String v6BootProtocol ) throws java.sql.SQLException { final org.ovirt.engine.core.common.businessentities.network.IpV6Address ipV6Address = new org.ovirt.engine.core.common.businessentities.network.IpV6Address ( ) ; ipV6Address.setBootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.valueOf ( v6BootProtocol ) ) ; ipV6Address.setAddress ( rs.getString ( "ipv6_address" ) ) ; if ( ( rs.getObject ( "ipv6_prefix" ) ) != null ) { ipV6Address.setPrefix ( rs.getInt ( "ipv6_prefix" ) ) ; } ipV6Address.setGateway ( rs.getString ( "ipv6_gateway" ) ) ; return ipV6Address ; }
Source:
public void getHostById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getStorageDomainList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private java.lang.String showRpdConsole ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel model ) { if ( consoleUtils.canOpenRDPConsole ( model ) ) { model.getAdditionalConsoleModel ( ) . getConnectCommand ( ) . Execute ( ) ; } else if ( ! ( consoleUtils.isRDPAvailable ( ) ) ) { return createErrorMessage ( model , "RDP" ) ; } return null ; }

Target:
private java.lang.String showRpdConsole ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel model ) { if ( consoleUtils.canOpenRDPConsole ( model ) ) { model.getAdditionalConsoleModel ( ) . getConnectCommand ( ) . execute ( ) ; } else if ( ! ( consoleUtils.isRDPAvailable ( ) ) ) { return createErrorMessage ( model , "RDP" ) ; } return null ; }
Source:
public void canDoActionFailsWithClusterDoesNotSupportGluster ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getVdsGroup ( false ) ) . when ( vdsGroupDao ) . get ( org.mockito.Mockito.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER ) ; }

Target:
public void canDoActionFailsWithClusterDoesNotSupportGluster ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getVdsGroup ( false ) ) . when ( vdsGroupDao ) . get ( org.mockito.Mockito.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER ) ; }
Source:
private static java.lang.String getEffectiveSpiceProxy ( org.ovirt.engine.api.model.VM entity ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( entity.getVmPoolSpiceProxy ( ) ) ) { return entity.getVmPoolSpiceProxy ( ) ; } if ( org.apache.commons.lang.StringUtils.isNotBlank ( entity.getVdsGroupSpiceProxy ( ) ) ) { return entity.getVdsGroupSpiceProxy ( ) ; } java.lang.String globalSpiceProxy = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.SpiceProxyDefault ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( globalSpiceProxy ) ) { return globalSpiceProxy ; } return null ; }

Target:
private static java.lang.String getEffectiveSpiceProxy ( org.ovirt.engine.api.restapi.types.VM entity ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( entity.getVmPoolSpiceProxy ( ) ) ) { return entity.getVmPoolSpiceProxy ( ) ; } if ( org.apache.commons.lang.StringUtils.isNotBlank ( entity.getVdsGroupSpiceProxy ( ) ) ) { return entity.getVdsGroupSpiceProxy ( ) ; } java.lang.String globalSpiceProxy = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.SpiceProxyDefault ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( globalSpiceProxy ) ) { return globalSpiceProxy ; } return null ; }
Source:
public void deactivate ( ) { leftElement.replaceClassName ( style.activeLeft ( ) , style.inactiveLeft ( ) ) ; rightElement.replaceClassName ( style.activeRight ( ) , style.inactiveRight ( ) ) ; middleElement.replaceClassName ( style.activeMiddle ( ) , style.inactiveMiddle ( ) ) ; hyperlinkLabel.getElement ( ) . replaceClassName ( style.activeMiddleLink ( ) , style.inactiveMiddleLink ( ) ) ; arrowElement.replaceClassName ( style.activeArrow ( ) , style.inactiveArrow ( ) ) ; }

Target:
public void deactivate ( ) { leftElement.replaceClassName ( style.activeLeft ( ) , style.inactiveLeft ( ) ) ; rightElement.replaceClassName ( style.activeRight ( ) , style.inactiveRight ( ) ) ; middleElement.replaceClassName ( style.obrand_activeMiddle ( ) , style.obrand_inactiveMiddle ( ) ) ; hyperlinkLabel.getElement ( ) . replaceClassName ( style.obrand_activeMiddleLink ( ) , style.obrand_inactiveMiddleLink ( ) ) ; arrowElement.replaceClassName ( style.activeArrow ( ) , style.inactiveArrow ( ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.addOrUpdateTaskInDB ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap = asyncTask.getEntitiesMap ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entry : entitiesMap.entrySet ( ) ) { org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.getAsyncTaskDao ( ) . insertAsyncTaskEntity ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) . getTaskId ( ) , entry.getKey ( ) , entry.getValue ( ) ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.addOrUpdateTaskInDB ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap = asyncTask.getEntitiesMap ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTaskEntity > asyncTaskEntities = org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.buildAsyncTaskEntities ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) . getTaskId ( ) , entitiesMap ) ; org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.getAsyncTaskDao ( ) . insertAsyncTaskEntities ( asyncTaskEntities ) ; return null ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; model.setClusters ( model , clusters , null ) ; behavior.initTemplate ( ) ; behavior.initCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue == null ) { return ; } java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; initNetworkInterfaces ( networkBehavior , nics ) ; }
Source:
public static void getGlusterRebalanceStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity ) ( source ) ) ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeRebalanceStatus , parameters , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void freeMac ( java.lang.String mac ) { org.ovirt.engine.core.bll.network.MacPoolManager.log.infoFormat ( "MacPoolManager::freeMac(mac = '{0}') - entered" , mac ) ; lockObj.writeLock ( ) . lock ( ) ; try { if ( ! ( initialized ) ) { logInitializationError ( ( ( "Failed to free mac address " + mac ) + " ." ) ) ; } else { internalFreeMac ( mac ) ; } } finally { lockObj.writeLock ( ) . unlock ( ) ; } }

Target:
public int getAvailableMacsCount ( ) { lockObj.readLock ( ) . lock ( ) ; try { if ( ! ( initialized ) ) { logInitializationError ( "Failed to get available Macs count." ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.MAC_POOL_NOT_INITIALIZED ) ; } int availableMacsSize = availableMacs.size ( ) ; org.ovirt.engine.core.bll.network.MacPoolManager.log.debugFormat ( "Number of available Mac addresses = {0}" , availableMacsSize ) ; return availableMacsSize ; } finally { lockObj.readLock ( ) . unlock ( ) ; } }
Source:
boolean isTaskOverPrePollingLapse ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters parameters = getParameters ( ) ; long taskStartTime = parameters.getDbAsyncTask ( ) . getStartTime ( ) . getTime ( ) ; java.lang.Integer prePollingPeriod = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( org.ovirt.engine.core.common.config.ConfigValues.UknownTaskPrePollingLapse ) ; boolean idlePeriodPassed = ( ( java.lang.System.currentTimeMillis ( ) ) - taskStartTime ) > prePollingPeriod ; org.ovirt.engine.core.bll.SPMAsyncTask.log.infoFormat ( "task id {0} {1}. Pre-polling period is {2} millis. " , parameters.getTaskID ( ) , ( idlePeriodPassed ? "has passed pre-polling period time and should be polled" : "is in pre-polling period and should not be polled" ) , prePollingPeriod ) ; return idlePeriodPassed ; }

Target:
boolean isTaskOverPrePollingLapse ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters parameters = getParameters ( ) ; long taskStartTime = parameters.getDbAsyncTask ( ) . getStartTime ( ) . getTime ( ) ; java.lang.Integer prePollingPeriod = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( org.ovirt.engine.core.common.config.ConfigValues.UknownTaskPrePollingLapse ) ; boolean idlePeriodPassed = ( ( java.lang.System.currentTimeMillis ( ) ) - taskStartTime ) > prePollingPeriod ; org.ovirt.engine.core.bll.SPMAsyncTask.log.infoFormat ( "task id {0} {1}. Pre-polling period is {2} millis. " , parameters.getVdsmTaskId ( ) , ( idlePeriodPassed ? "has passed pre-polling period time and should be polled" : "is in pre-polling period and should not be polled" ) , prePollingPeriod ) ; return idlePeriodPassed ; }
Source:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL ) , aQuery ) ; }

Target:
public static void GetDiskList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; updateOSValues ( ) ; if ( ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateVirtioScsiAvailability ( ) ; updateTemplate ( ) ; }

Target:
public void oSType_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; int osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( template != null ) { updateVirtioScsiEnabled ( template.getId ( ) , osType ) ; } }
Source:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void testScore ( ) throws org.apache.xmlrpc.XmlRpcException { proxy.score ( ) ; }

Target:
public void testScore ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.HashMap < java.lang.String , java.lang.Integer > result = proxy.score ( new java.lang.String [ ] { org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME } , new java.lang.Integer [ ] { 2 } , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID , "" ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) == 2 ) ) ; org.junit.Assert.assertTrue ( ( ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) == 100 ) ) ; org.junit.Assert.assertTrue ( ( ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID2 ) ) == 100 ) ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getBroker ( ) . diskSizeExtend ( org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getParameters ( ) . getDriveSpecs ( ) , java.lang.String.valueOf ( org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getParameters ( ) . getNewSize ( ) ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.proceedProxyReturnValue ( ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( result.getImageSize ( ) ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getBroker ( ) . diskSizeExtend ( org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getParameters ( ) . getDriveSpecs ( ) , java.lang.String.valueOf ( org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getParameters ( ) . getNewSize ( ) ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.proceedProxyReturnValue ( ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.ExtendVmDiskSizeVDSCommand.getVDSReturnValue ( ) . getSucceeded ( ) ) { setReturnValue ( result.getImageSize ( ) ) ; } }
Source:
public void loadVmsFromExportDomain ( ) { clearProblem ( ) ; startProgress ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenters ( ) . getSelectedItem ( ) . getId ( ) , exportDomain.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { updateVms ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) ; } } ) ) ; }

Target:
private void validateSource ( ) { clearProblem ( ) ; if ( ( ( importSources.getSelectedItem ( ) ) == ( ImportSource.EXPORT_DOMAIN ) ) && ( ( exportDomain.getEntity ( ) ) == null ) ) { setError ( constants.notAvailableWithNoActiveExportDomain ( ) ) ; } }
Source:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; vdsProxy.close ( ) ; }

Target:
private void logNetworkException ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException e ) { switch ( vds.getStatus ( ) ) { case Down : break ; case NonResponsive : org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Failed to refresh VDS, network error, continuing, vds='{}'({}): {}" , vds.getName ( ) , vds.getId ( ) , e.getMessage ( ) ) ; break ; default : org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed to refresh VDS, network error, continuing, vds='{}'({}): {}" , vds.getName ( ) , vds.getId ( ) , e.getMessage ( ) ) ; } org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > get64bitOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmOsType [ ] { org.ovirt.engine.core.common.businessentities.VmOsType.RHEL3x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL4x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL5x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL6x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2003x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008R2x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows7x64 } ) ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; }

Target:
public static void getOsMaxRam ( int osId , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetMaxOsRam , osId , version ) , asyncQuery ) ; }
Source:
protected void setUpGetEntityExpectations ( int index , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetTagByTagId , org.ovirt.engine.core.common.queries.GetTagByTagIdParameters.class , new java.lang.String [ ] { "TagId" } , new java.lang.Object [ ] { GUIDS [ index ] } , ( notFound ? null : getEntity ( index ) ) ) ; }

Target:
protected void setUpGetEntityExpectations ( int index , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetTagByTagId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , ( notFound ? null : getEntity ( index ) ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > setUpPermissionsWithAdElementId ( org.ovirt.engine.core.compat.Guid adElementId ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.Permissions entity = getEntity ( i ) ; entity.setad_element_id ( adElementId ) ; perms.add ( entity ) ; } return perms ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > setUpPermissionsWithAdElementId ( org.ovirt.engine.core.compat.Guid adElementId ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.Permissions entity = getEntity ( i ) ; entity.setAdElementId ( adElementId ) ; perms.add ( entity ) ; } return perms ; }
Source:
protected void updateDiskProfile ( ) { if ( isDiskImage ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage oldDisk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) ; org.ovirt.engine.core.common.businessentities.DiskImage newDisk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getNewDisk ( ) ) ) ; if ( ! ( java.util.Objects.equals ( oldDisk.getDiskProfileId ( ) , newDisk.getDiskProfileId ( ) ) ) ) { org.ovirt.engine.core.bll.UpdateVmDiskCommand.getImageStorageDomainMapDao ( ) . updateDiskProfileByImageGroupIdAndStorageDomainId ( newDisk.getId ( ) , newDisk.getStorageIds ( ) . get ( 0 ) , newDisk.getDiskProfileId ( ) ) ; } } }

Target:
protected void updateQuota ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { if ( isDiskImage ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage oldDisk = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( getOldDisk ( ) ) ) ; if ( ! ( java.util.Objects.equals ( oldDisk.getQuotaId ( ) , diskImage.getQuotaId ( ) ) ) ) { org.ovirt.engine.core.bll.UpdateVmDiskCommand.getImageStorageDomainMapDao ( ) . updateQuotaForImageAndSnapshots ( diskImage.getId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getQuotaId ( ) ) ; } } }
Source:
private void updateStorageDomain ( ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateStorageDomain , new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( this . storageDomain ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; storageListModel.onFinish ( storageListModel.context , true , storageListModel.storageModel ) ; } } , this ) ; }

Target:
private void updateStorageDomain ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateStorageDomain , new org.ovirt.engine.core.common.action.StorageDomainManagementParameter ( this . storageDomain ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; storageListModel.onFinish ( storageListModel.context , true , storageListModel.storageModel ) ; } } , this ) ; }
Source:
private boolean vmDeviceChanged ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , java.lang.String device , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , deviceType , device ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

Target:
protected boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , java.lang.String device , boolean deviceEnabled ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceChanged ( vmId , deviceType , device , deviceEnabled ) ; }
Source:
protected org.ovirt.engine.api.model.VM deprecatedPopulate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; parent.addInlineDetails ( details , model ) ; if ( details.contains ( "statistics" ) ) { addStatistics ( model , entity , uriInfo ) ; } parent.setPayload ( model ) ; parent.setBallooning ( model ) ; parent.setCertificateInfo ( model ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Vm deprecatedPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.api.restapi.resource.VM entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; parent.addInlineDetails ( details , model ) ; if ( details.contains ( "statistics" ) ) { addStatistics ( model , entity , uriInfo ) ; } parent.setPayload ( model ) ; parent.setCertificateInfo ( model ) ; org.ovirt.engine.api.restapi.resource.MemoryPolicyHelper.setupMemoryBalloon ( model , this ) ; return model ; }
Source:
public void getNumberOfActiveVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 java.lang.Integer.valueOf ( 0 ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfActiveVmsInVdsGroupByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getNumberOfActiveVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 java.lang.Integer.valueOf ( 0 ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfActiveVmsInClusterByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public void setup ( ) { mockConfigRule.mockConfigValue ( ConfigValues.MaxVdsNameLength , org.ovirt.engine.core.bll.validator.HostValidatorTest.HOST_NAME_SIZE ) ; mockConfigRule.mockConfigValue ( ConfigValues.EncryptHostCommunication , java.lang.Boolean.TRUE ) ; validator = new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ; }

Target:
public void setup ( ) { mockConfigRule.mockConfigValue ( ConfigValues.MaxVdsNameLength , org.ovirt.engine.core.bll.validator.HostValidatorTest.HOST_NAME_SIZE ) ; mockConfigRule.mockConfigValue ( ConfigValues.EncryptHostCommunication , java.lang.Boolean.TRUE ) ; org.mockito.Mockito.when ( dbFacade.getClusterDao ( ) ) . thenReturn ( clusterDao ) ; validator = new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host , hostedEngineHelper ) ; }
Source:
private java.lang.String updateFreeVf ( ) { java.lang.String vfToUse = vfScheduler.findFreeVfForVnic ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , getNetwork ( ) ) ; if ( vfToUse == null ) { failCanDoAction ( EngineMessage.CANNOT_PLUG_PASSTHROUGH_VNIC_NO_SUITABLE_VF , java.lang.String.format ( "$vnicName %1$s" , getInterfaceName ( ) ) ) ; } return vfToUse ; }

Target:
private java.lang.String updateFreeVf ( ) { java.lang.String vfToUse = vfScheduler.findFreeVfForVnic ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVdsId ( ) , getNetwork ( ) ) ; if ( vfToUse == null ) { failValidation ( EngineMessage.CANNOT_PLUG_PASSTHROUGH_VNIC_NO_SUITABLE_VF , java.lang.String.format ( "$vnicName %1$s" , getInterfaceName ( ) ) ) ; } return vfToUse ; }
Source:
private void UpdateActionAvailability ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > Cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( isRemoveCommandAvailable ( ) ) ; }

Target:
private void UpdateActionAvailability ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( isRemoveCommandAvailable ( ) ) ; }
Source:
private void addDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }

Target:
private void addDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }
Source:
private org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface build ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos = effectiveHostNetworkQos.getQos ( networkAttachment , network ) ; return new org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface ( vdsNetworkInterface , network , hostNetworkQos , ( networkAttachment == null ? null : networkAttachment.getIpConfiguration ( ) ) ) ; }

Target:
private org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface build ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.compat.Guid vdsId = vdsNetworkInterface.getVdsId ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = vdsDao.get ( vdsId ) ; org.ovirt.engine.core.compat.Guid clusterId = vds.getClusterId ( ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = clusterDao.get ( clusterId ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos = effectiveHostNetworkQos.getQos ( networkAttachment , network ) ; return new org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface ( vdsNetworkInterface , network , hostNetworkQos , networkAttachment , cluster ) ; }
Source:
protected void initialize ( com.google.gwt.user.client.ui.UIObject decoratedWidget , com.google.gwt.user.client.ui.Image attachedSeparatedImage , org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.BaseStyle style ) { this . decoratedWidget = decoratedWidget ; this . attachedSeparatedImage = attachedSeparatedImage ; this . style = style ; setAttached ( true ) ; setDetachableIconVisible ( false ) ; }

Target:
protected void initialize ( com.google.gwt.user.client.ui.UIObject decoratedWidget , com.google.gwt.user.client.ui.Image attachedSeparatedImage , org.ovirt.engine.ui.common.widget.editor.generic.BaseEntityModelDetachableWidget.BaseStyle style ) { this . decoratedWidget = decoratedWidget ; this . attachedSeparatedImage = attachedSeparatedImage ; this . tooltip.setWidget ( attachedSeparatedImage ) ; this . tooltip.reconfigure ( ) ; this . style = style ; setAttached ( true ) ; setDetachableIconVisible ( false ) ; }
Source:
private void updateDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalActionWithTasksContext ( ActionType.UpdateVolume , buildUpdateVolumeCommandParameters ( diskImage ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( returnValue.getFault ( ) . getError ( ) , returnValue.getFault ( ) . getMessage ( ) ) ; } }

Target:
private void updateDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalActionWithTasksContext ( ActionType.UpdateVolume , buildUpdateVolumeCommandParameters ( diskImage ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( returnValue.getFault ( ) . getError ( ) , returnValue.getFault ( ) . getMessage ( ) ) ; } }
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AllowDuplicateMacAddresses ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_MAC_ADDRESS_IN_USE ) ; } }

Target:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) . isDuplicateMacAddressesAllowed ( ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_MAC_ADDRESS_IN_USE ) ; } }