auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.refreshStoragePool ( spUUID , msdUUID , masterVersion ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc teardownImage ( java.lang.String sdID , java.lang.String spID , java.lang.String imageID , java.lang.String volumeID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.teardownImage ( sdID , spID , imageID , volumeID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyNativeGotDisabledLegacyPolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( false ) ; usb.setType ( "legacy" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.ENABLED_NATIVE , null ) , UsbPolicy.DISABLED ) ; }

Target:
public void testGuestFQDN ( ) { org.ovirt.engine.api.restapi.types.VM vm = new org.ovirt.engine.api.restapi.types.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setStatus ( VMStatus.Up ) ; vmDynamic.setVmFQDN ( "localhost.localdomain" ) ; vm.setDynamicData ( vmDynamic ) ; org.ovirt.engine.api.model.Vm map = org.ovirt.engine.api.restapi.types.VmMapper.map ( vm , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; assertNotNull ( map.getFqdn ( ) ) ; assertEquals ( map.getFqdn ( ) , "localhost.localdomain" ) ; }
Source:
private java.lang.String renderGigabyteSize ( long size ) { long sizeInGB = ( ( unit ) == ( org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit.GiB ) ) ? size : org.ovirt.engine.core.common.utils.SizeConverter.convert ( size , unit , SizeUnit.GiB ) . longValue ( ) ; return sizeInGB >= 1 ? sizeInGB + " GB" : "< 1 GB" ; }

Target:
private java.lang.String renderGigabyteSize ( long size ) { long sizeInGB = ( ( unit ) == ( org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit.GiB ) ) ? size : org.ovirt.engine.core.common.utils.SizeConverter.convert ( size , unit , SizeUnit.GiB ) . longValue ( ) ; return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.messages.gigabytes ( ( sizeInGB >= 1 ? java.lang.String.valueOf ( sizeInGB ) : "< 1" ) ) ; }
Source:
public static void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskImagesToValidate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand.getVmId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > allDisks = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( disks , true , false , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks = org.ovirt.engine.core.bll.ImagesHandler.filterDisksBasedOnCinder ( disks ) ; allDisks.addAll ( cinderDisks ) ; return allDisks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskImagesToValidate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand.getVmId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > allDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( disks , true , false , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterDisksBasedOnCinder ( disks ) ; allDisks.addAll ( cinderDisks ) ; return allDisks ; }
Source:
protected org.ovirt.engine.api.model.VM doPopulate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { setPayload ( model ) ; setBallooning ( model ) ; setConsoleDevice ( model ) ; setVirtioScsiController ( model ) ; setSoundcard ( model ) ; setCertificateInfo ( model ) ; setVmOvfConfiguration ( model , entity ) ; setRngDevice ( model ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Vm doPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.api.restapi.resource.VM entity ) { setPayload ( model ) ; org.ovirt.engine.api.restapi.resource.MemoryPolicyHelper.setupMemoryBalloon ( model , this ) ; setConsoleDevice ( model ) ; setVirtioScsiController ( model ) ; setSoundcard ( model ) ; setCertificateInfo ( model ) ; setVmOvfConfiguration ( model , entity ) ; setRngDevice ( model ) ; return model ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
private boolean hostEmulationModeMatchesTheConfigValues ( org.ovirt.engine.core.common.businessentities.VDS vds ) { java.lang.String matchedEmulatedMachine = org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( org.ovirt.engine.core.common.config.Config.< java.util.List < java.lang.String > > getValue ( ConfigValues.ClusterEmulatedMachines , vds.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) , vds.getSupportedEmulatedMachines ( ) . split ( "," ) ) ; if ( ( matchedEmulatedMachine != null ) && ( ! ( matchedEmulatedMachine.isEmpty ( ) ) ) ) { setClusterEmulatedMachine ( vds , matchedEmulatedMachine ) ; return true ; } return false ; }

Target:
private boolean hostEmulationModeMatchesTheConfigValues ( org.ovirt.engine.core.common.businessentities.VDS vds ) { java.lang.String matchedEmulatedMachine = org.ovirt.engine.core.common.config.Config.< java.util.List < java.lang.String > > getValue ( ConfigValues.ClusterEmulatedMachines , vds.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) . stream ( ) . filter ( org.ovirt.engine.core.vdsbroker.VirtMonitoringStrategy.getSupportedEmulatedMachinesAsSet ( vds ) :: contains ) . findFirst ( ) . orElse ( null ) ; if ( ( matchedEmulatedMachine != null ) && ( ! ( matchedEmulatedMachine.isEmpty ( ) ) ) ) { setClusterEmulatedMachine ( vds , matchedEmulatedMachine ) ; return true ; } return false ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VM mapToVM ( org.ovirt.engine.api.model.VmPool model , org.ovirt.engine.core.common.businessentities.VmTemplate template ) { org.ovirt.engine.core.common.businessentities.VM vm = getMapper ( org.ovirt.engine.api.model.VmPool.class , org.ovirt.engine.core.common.businessentities.VM.class ) . map ( model , null ) ; vm.getStaticData ( ) . setMemSizeMb ( template.getMemSizeMb ( ) ) ; return vm ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM mapToVM ( org.ovirt.engine.api.model.VmPool model , org.ovirt.engine.core.common.businessentities.VmTemplate template ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = getMapper ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , org.ovirt.engine.core.common.businessentities.VmStatic.class ) . map ( template , null ) ; org.ovirt.engine.core.common.businessentities.VM vm = getMapper ( org.ovirt.engine.api.model.VmPool.class , org.ovirt.engine.core.common.businessentities.VM.class ) . map ( model , new org.ovirt.engine.core.common.businessentities.VM ( vmStatic , new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) , new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ) ) ; return vm ; }
Source:
public void init ( javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { ssoContext = org.ovirt.engine.core.sso.utils.SSOUtils.getSsoContext ( config.getServletContext ( ) ) ; }

Target:
public void init ( javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { ssoContext = org.ovirt.engine.core.sso.utils.SSOUtils.getSsoContext ( config.getServletContext ( ) ) ; for ( org.ovirt.engine.core.sso.search.DirectorySearch query : org.ovirt.engine.core.sso.search.DirectorySearch.values ( ) ) { if ( query.isPublicQuery ( ) ) { directoryPublicQueries.put ( query.getName ( ) , query ) ; } else { directoryQueries.put ( query.getName ( ) , query ) ; } } }
Source:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filteredStorageDomains = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : storageDomains ) { if ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } postExportGetStorageDomainList ( filteredStorageDomains ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filteredStorageDomains = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : storageDomains ) { if ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } vmListModel.postExportGetStorageDomainList ( filteredStorageDomains ) ; }
Source:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , 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 void networkNameAvailableTest ( org.ovirt.engine.core.bll.ValidationResult expected , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks.addAll ( networks ) ; org.mockito.Mockito.when ( network.getName ( ) ) . thenReturn ( DEFAULT_NETWORK_NAME ) ; org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.junit.Assert.assertEquals ( expected , validator.networkNameNotUsed ( ) ) ; }

Target:
private void networkNameAvailableTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks.addAll ( networks ) ; org.mockito.Mockito.when ( network.getName ( ) ) . thenReturn ( DEFAULT_NETWORK_NAME ) ; org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.junit.Assert.assertThat ( validator.networkNameNotUsed ( ) , matcher ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler > initTaskHandlers ( ) { java.util.List < org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler > taskHandlers = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid imageId : org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . getImageIds ( ) ) { taskHandlers.add ( new org.ovirt.engine.core.bll.RemoveDiskSnapshotTaskHandler ( this , imageId , getImageGroupId ( ) , org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getVmId ( ) ) ) ; } return taskHandlers ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.DiskImage image ) { return getImages ( ) . contains ( image ) ; }
Source:
public void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public void getUserProfile ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUserProfile , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void getMigrationPolicies ( 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 returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( returnValue == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.migration.MigrationPolicy > ( ) ; } return returnValue ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllMigrationPolicies , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private void initMemoryHotUnplugSupportMap ( ) { 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 ) { memoryHotUnplugSupport = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetArchitectureCapabilities , new org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters ( org.ovirt.engine.core.common.queries.ArchCapabilitiesParameters.ArchCapabilitiesVerb.GetMemoryHotUnplugSupport ) , callback ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; asyncQuery.setModel ( this ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override @ java.lang.SuppressWarnings ( value = "unchecked" ) public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel.this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet > ) ( returnValue ) ) ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getExternalSubnetsByNetworkId ( asyncQuery , getEntity ( ) . getId ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } super . syncSearch ( VdcQueryType.GetExternalSubnetsOnProviderByNetwork , new org.ovirt.engine.core.common.queries.IdQueryParameters ( getEntity ( ) . getId ( ) ) ) ; }
Source:
protected boolean isOsSupportingHotPlug ( ) { int vmOs = org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getOs ( ) ; java.lang.String [ ] unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.HotPlugUnsupportedOsList ) . split ( "," ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( osRepository.getOsName ( vmOs ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; return false ; } } return true ; }

Target:
protected boolean canPerformDiskHotPlug ( org.ovirt.engine.core.common.businessentities.Disk disk ) { return ( isHotPlugSupported ( ) ) && ( isDiskSupportedForPlugUnPlug ( disk ) ) ; }
Source:
public org.ovirt.engine.api.model.VmPool populate ( org.ovirt.engine.api.model.VmPool pool , org.ovirt.engine.core.common.businessentities.vm_pools entity ) { if ( ( pool.isSetSize ( ) ) && ( ( pool.getSize ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , SearchType.VM , ( "Vms: pool=" + ( pool.getName ( ) ) ) ) ; pool.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; pool.getTemplate ( ) . setId ( vm.getVmtGuid ( ) . toString ( ) ) ; } return pool ; }

Target:
protected org.ovirt.engine.api.model.VmPool deprecatedPopulate ( org.ovirt.engine.api.model.VmPool model , org.ovirt.engine.core.common.businessentities.vm_pools entity ) { if ( ( model.isSetSize ( ) ) && ( ( model.getSize ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , SearchType.VM , ( "Vms: pool=" + ( model.getName ( ) ) ) ) ; model.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; model.getTemplate ( ) . setId ( vm.getVmtGuid ( ) . toString ( ) ) ; } return model ; }
Source:
public void invalidPropertyValue1 ( ) { org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils utils = mockDevicePropertiesUtils ( ) ; java.util.Map < java.lang.String , java.lang.String > map = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; map.put ( "bootable" , null ) ; java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > errors = utils.validateProperties ( Version.v3_3 , VmDeviceGeneralType.DISK , map ) ; org.ovirt.engine.core.utils.customprop.PropertiesUtilsTestHelper.validateFailure ( errors , ValidationFailureReason.INCORRECT_VALUE ) ; }

Target:
public void invalidPropertyValue1 ( ) { org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils utils = mockDevicePropertiesUtils ( ) ; java.util.Map < java.lang.String , java.lang.String > map = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; map.put ( "bootable" , null ) ; java.util.List < org.ovirt.engine.core.common.utils.customprop.ValidationError > errors = utils.validateProperties ( Version.v3_3 , VmDeviceGeneralType.DISK , map ) ; org.ovirt.engine.core.common.utils.customprop.PropertiesUtilsTestHelper.validateFailure ( errors , ValidationFailureReason.INCORRECT_VALUE ) ; }
Source:
public final boolean acquireLockAsyncTask ( ) { org.ovirt.engine.core.bll.LockIdNameAttribute annotation = getClass ( ) . getAnnotation ( org.ovirt.engine.core.bll.LockIdNameAttribute.class ) ; boolean returnValue = true ; if ( annotation != null ) { releaseLocksAtEndOfExecute = annotation.isReleaseAtEndOfExecute ( ) ; if ( ! ( releaseLocksAtEndOfExecute ) ) { returnValue = acquireLockInternal ( ) ; } } return returnValue ; }

Target:
protected boolean acquireLock ( ) { org.ovirt.engine.core.common.action.LockProperties lockProperties = getLockProperties ( ) ; boolean returnValue = true ; if ( ! ( Scope.None.equals ( lockProperties.getScope ( ) ) ) ) { releaseLocksAtEndOfExecute = Scope.Execution.equals ( lockProperties.getScope ( ) ) ; if ( ! ( lockProperties.isWait ( ) ) ) { returnValue = acquireLockInternal ( ) ; } else { acquireLockAndWait ( ) ; } } return returnValue ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
private java.util.Date getDateFromDiskDescription ( java.util.Map < java.lang.String , java.lang.Object > map ) { try { return new java.text.SimpleDateFormat ( org.ovirt.engine.core.utils.ovf.OvfParser.formatStrFromDiskDescription ) . parse ( map.get ( OvfInfoFileConstants.LastUpdated ) . toString ( ) ) ; } catch ( java.text.ParseException e ) { log.errorFormat ( "LastUpdate Date could not be parsed from disk desscription. Exception: {0}" , e ) ; return null ; } }

Target:
private java.util.Date getDateFromDiskDescription ( java.util.Map < java.lang.String , java.lang.Object > map ) { try { java.lang.Object lastUpdate = map.get ( OvfInfoFileConstants.LastUpdated ) ; if ( lastUpdate != null ) { return new java.text.SimpleDateFormat ( org.ovirt.engine.core.utils.ovf.OvfParser.formatStrFromDiskDescription ) . parse ( lastUpdate.toString ( ) ) ; } else { log.info ( "LastUpdate Date is not initialized in the OVF_STORE disk." ) ; } } catch ( java.text.ParseException e ) { log.errorFormat ( "LastUpdate Date could not be parsed from disk desscription. Exception: {0}" , e ) ; } return null ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM initializeMock ( final int domainSizeGB , final int sizeRequired ) { mockVmTemplateDAOReturnVmTemplate ( ) ; mockDiskImageDAOGetSnapshotById ( ) ; mockStorageDomainDAOGetForStoragePool ( domainSizeGB ) ; mockStorageDomainDAOGet ( domainSizeGB ) ; mockGetImageDomainsListVdsCommand ( ) ; mockConfig ( ) ; mockConfigSizeRequirements ( sizeRequired ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.AddVmCommandTest.createVm ( ) ; return vm ; }

Target:
private void mockMaxPciSlots ( ) { org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddVmCommandTest.MAX_PCI_SLOTS ) . when ( osRepository ) . getMaxPciDevices ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ; }
Source:
public void externalNetworkVmNetworkChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = mockExternalNetwork ( ) ; boolean vmNetwork = true ; org.mockito.Mockito.when ( externalNetwork.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( ( ! vmNetwork ) ) ; assertThatExternalNetworkDetailsUnchangedFails ( externalNetwork ) ; }

Target:
public void externalNetworkMtuChanged ( ) { org.ovirt.engine.core.common.businessentities.network.Network externalNetwork = createExternalNetwork ( ) ; externalNetwork.setMtu ( 0 ) ; network.setMtu ( 1 ) ; assertThatExternalNetworkDetailsUnchangedFails ( externalNetwork ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice = getParameters ( ) . getRngDevice ( ) ; if ( ( rngDevice.getDeviceId ( ) ) == null ) { rngDevice.setDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } getDbFacade ( ) . getVmDeviceDao ( ) . save ( rngDevice ) ; setActionReturnValue ( rngDevice.getDeviceId ( ) ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice = getParameters ( ) . getRngDevice ( ) ; if ( ( rngDevice.getDeviceId ( ) ) == null ) { rngDevice.setDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } vmDeviceDao.save ( rngDevice ) ; setActionReturnValue ( rngDevice.getDeviceId ( ) ) ; setSucceeded ( true ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( isRoleNetwork ( ) ) && ( ( ( ipConfiguration == null ) || ( ! ( ipConfiguration.hasIpv4PrimaryAddressSet ( ) ) ) ) || ( ( ipConfiguration.getIpv4PrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . when ( failWhen ) ; }

Target:
private boolean hasIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration ) { return ( ipConfiguration.hasIpv4PrimaryAddressSet ( ) ) && ( ( ipConfiguration.getIpv4PrimaryAddress ( ) . getBootProtocol ( ) ) != ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.NONE ) ) ; }
Source:
private void validateMessageDoesNotContainUnexpectedItems ( java.lang.String message , java.util.List < java.lang.Object > items ) { for ( int i = ReplacementUtils.MAX_NUMBER_OF_PRINTED_ITEMS ; i < ( items.size ( ) ) ; i ++ ) { org.junit.Assert.assertFalse ( message.contains ( buildPropertyValue ( i ) ) ) ; } }

Target:
private void validateReplacementsDoNotContainUnexpectedItems ( java.util.Collection < java.lang.String > replacements , java.util.List < java.lang.Object > items ) { java.util.Iterator < java.lang.String > iterator = replacements.iterator ( ) ; while ( iterator.hasNext ( ) ) { java.lang.String replacement = iterator.next ( ) ; for ( int i = ReplacementUtils.MAX_NUMBER_OF_PRINTED_ITEMS ; i < ( items.size ( ) ) ; i ++ ) { org.junit.Assert.assertFalse ( replacement.contains ( buildPropertyValue ( i ) ) ) ; } } }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > multipleParams ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getSessionId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . RunMultipleActions ( actionType , multipleParams ) ; return returnValues ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > multipleParams , boolean isRunOnlyIfAllCanDoPass ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getSessionId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . RunMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass ) ; return returnValues ; }
Source:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.common.asynctasks.AsyncTaskType taskType , org.ovirt.engine.core.compat.CommandStatus status ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; if ( taskType.equals ( AsyncTaskType.notsupported ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } } }

Target:
public void updateCommandStatus ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.common.asynctasks.AsyncTaskType taskType , org.ovirt.engine.core.compat.CommandStatus status ) { final org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCommandStatus ( status ) ; if ( ( taskType.equals ( AsyncTaskType.notSupported ) ) || ( cmdEntity.isCallBackEnabled ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . saveOrUpdate ( cmdEntity ) ; } } }
Source:
protected boolean checkDomainCanBeAttached ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { return ( ( ( ( checkStorageDomainType ( storageDomain ) ) && ( isStorageDomainFormatCorrectForPool ( storageDomain , org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ) ) ) && ( checkStorageDomainSharedStatusNotLocked ( storageDomain ) ) ) && ( ( ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) || ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ) || ( isStorageDomainNotInPool ( storageDomain ) ) ) ) && ( isStorageDomainTypeCorrect ( storageDomain ) ) ; }

Target:
private boolean isStorageDomainOfTypeIsoOrExport ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { return ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) || ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ; }
Source:
public void appendCustomValueDoesntHandleNullKeys ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = null ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.appendCustomValue ( key , value , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }

Target:
public void appendCustomValueAppendsWithNull ( ) { final java.lang.String key = "foo" ; final java.lang.String value = null ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model ) { driver.edit ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propName ) ) { appendMessage ( model.getMessage ( ) ) ; } } } ) ; }

Target:
private void updateMemoryBoxVisibility ( ) { org.ovirt.engine.core.common.businessentities.VM vm = model.getVm ( ) ; if ( vm == null ) { return ; } boolean memorySnapshotSupported = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) ; memoryEditor.setVisible ( ( memorySnapshotSupported && ( vm.isRunning ( ) ) ) ) ; if ( ! ( memoryEditor.isVisible ( ) ) ) { model.getMemory ( ) . setEntity ( false ) ; } }
Source:
protected void failedToRunVm ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { processVmPoolOnStopVm ( ) ; } } ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; }

Target:
protected void processVmPoolOnStopVm ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.bll.VmPoolHandler.processVmPoolOnStopVm ( getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( getExecutionContext ( ) ) ) ; } } ) ; }
Source:
private void addStyles ( ) { memValueEditor.addContentWidgetStyleName ( style.textBoxWidth ( ) ) ; memValueEditor.addLabelStyleName ( style.labelVisible ( ) ) ; cpuValueEditor.addContentWidgetStyleName ( style.textBoxWidth ( ) ) ; cpuValueEditor.addLabelStyleName ( style.labelVisible ( ) ) ; }

Target:
private void addStyles ( ) { memValueEditor.addContentWidgetContainerStyleName ( style.textBoxWidth ( ) ) ; memValueEditor.addLabelStyleName ( style.labelVisible ( ) ) ; cpuValueEditor.addContentWidgetContainerStyleName ( style.textBoxWidth ( ) ) ; cpuValueEditor.addLabelStyleName ( style.labelVisible ( ) ) ; }
Source:
private javax.ws.rs.core.Response cloneVmFromSnapshot ( org.ovirt.engine.core.common.businessentities.VmStatic staticVm , java.lang.String snapshotId , java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.compat.Guid sourceSnapshotId = asGuid ( snapshotId ) ; org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters params = new org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters ( staticVm , sourceSnapshotId ) ; params.setDiskInfoDestinationMap ( images ) ; params.setMakeCreatorExplicitOwner ( shouldMakeCreatorExplicitOwner ( ) ) ; return performCreation ( VdcActionType.AddVmFromSnapshot , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class ) ) ; }

Target:
private javax.ws.rs.core.Response cloneVmFromSnapshot ( org.ovirt.engine.core.common.businessentities.VmStatic staticVm , java.lang.String snapshotId , java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.compat.Guid sourceSnapshotId = asGuid ( snapshotId ) ; org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters params = new org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters ( staticVm , sourceSnapshotId ) ; params.setDiskInfoDestinationMap ( images ) ; params.setMakeCreatorExplicitOwner ( shouldMakeCreatorExplicitOwner ( ) ) ; return performCreate ( VdcActionType.AddVmFromSnapshot , params , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class ) ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable item : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) { return item ; } } return null ; }

Target:
public void getLocalStorageHost ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VDS > aQuery , java.lang.String dataCenterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetFirstConverter < > ( ) ; org.ovirt.engine.core.common.queries.SearchParameters sp = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "hosts: datacenter=" + dataCenterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , sp , aQuery ) ; }
Source:
static org.ovirt.engine.api.model.Disk getModel ( int index ) { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; model.setSparse ( true ) ; model.setBootable ( false ) ; model.setShareable ( false ) ; model.setAllowSnapshot ( false ) ; model.setPropagateErrors ( true ) ; return model ; }

Target:
static org.ovirt.engine.api.model.Disk getModel ( int index ) { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; model.setFormat ( DiskFormat.COW.toString ( ) ) ; model.setInterface ( DiskInterface.VirtIO.toString ( ) ) ; model.setSparse ( true ) ; model.setBootable ( false ) ; model.setShareable ( false ) ; model.setPropagateErrors ( true ) ; return model ; }
Source:
private static void validateDisksStatsList ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.Object > xml , boolean assertNullValues ) { org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateLocalDisksUsage ( vds , xml ) ; org.junit.Assert.assertNotNull ( vds.getLocalDisksUsage ( ) ) ; for ( java.lang.Long usage : vds.getLocalDisksUsage ( ) . values ( ) ) { if ( assertNullValues ) { org.junit.Assert.assertNull ( usage ) ; } else { org.junit.Assert.assertEquals ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.SIZE_FOR_DISK_STATS , usage.longValue ( ) ) ; } } }

Target:
private void validateDisksStatsList ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.Object > xml , boolean assertNullValues ) { vdsBrokerObjectsBuilder.updateLocalDisksUsage ( vds , xml ) ; org.junit.Assert.assertNotNull ( vds.getLocalDisksUsage ( ) ) ; for ( java.lang.Long usage : vds.getLocalDisksUsage ( ) . values ( ) ) { if ( assertNullValues ) { org.junit.Assert.assertNull ( usage ) ; } else { org.junit.Assert.assertEquals ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.SIZE_FOR_DISK_STATS , usage.longValue ( ) ) ; } } }