auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void remove ( org.ovirt.engine.core.compat.Guid id ) { getCallsHandler ( ) . executeModification ( "DeleteGlusterServerHookByGuid" , getCustomMapSqlParameterSource ( ) . addValue ( "hook_id" , id ) ) ; getCallsHandler ( ) . executeModification ( "DeleteGlusterHookByGuid" , createGlusterHookIdParams ( id ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getGlusterHook ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String glusterCommand , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStage stage , java.lang.String hookName ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook = getCallsHandler ( ) . executeRead ( "GetGlusterHook" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "gluster_command" , glusterCommand ) . addValue ( "stage" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( stage ) ) . addValue ( "name" , hookName ) . addValue ( "includeContent" , false ) ) ; return glusterHook ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.AlignmentScanReturn getDiskAlignment ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > driveSpecs ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.getDiskAlignment" ) . withParameter ( "vmID" , vmId ) . withParameter ( "disk" , driveSpecs ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "alignment" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.AlignmentScanReturn ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterLocalLogicalVolumeListReturn glusterLogicalVolumeList ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterHost.logicalVolumeList" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterLocalLogicalVolumeListReturn ( response ) ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
protected boolean validate ( org.ovirt.engine.core.bll.ValidationResult validationResult ) { if ( ! ( validationResult.isValid ( ) ) ) { addCanDoActionMessage ( validationResult.getMessage ( ) ) ; } return validationResult.isValid ( ) ; }

Target:
protected boolean validate ( org.ovirt.engine.core.bll.ValidationResult validationResult ) { if ( ! ( validationResult.isValid ( ) ) ) { addCanDoActionMessage ( validationResult.getMessage ( ) ) ; if ( ( validationResult.getVariableReplacements ( ) ) != null ) { for ( java.lang.String variableReplacement : validationResult.getVariableReplacements ( ) ) { addCanDoActionMessage ( variableReplacement ) ; } } } return validationResult.isValid ( ) ; }
Source:
public int hashCode ( ) { int result = ( ( transport ) != null ) ? transport.hashCode ( ) : 0 ; result = ( 31 * result ) + ( ( name ) != null ? name.hashCode ( ) : 0 ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( transport , name ) ; }
Source:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.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.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
public void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { asyncQuery.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.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }
Source:
public static void GetAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public void testGetSameID ( ) throws java.lang.Exception { final org.ovirt.engine.core.common.businessentities.Tags existing = dao.get ( org.ovirt.engine.core.dao.MultiThreadedDaoTest.EXISTING_TAGS_IDS [ 0 ] ) ; createAndRunThreadsForRunner ( ( ) -> { org.ovirt.engine.core.common.businessentities.Tags result = dao.get ( existing.getTagId ( ) ) ; org.junit.Assert.assertEquals ( existing , result ) ; } , 100 ) ; }

Target:
public void testGetSameID ( ) throws java.lang.Exception { final org.ovirt.engine.core.common.businessentities.Tags existing = dao.get ( org.ovirt.engine.core.dao.MultiThreadedDaoTest.EXISTING_TAGS_IDS [ 0 ] ) ; createAndRunThreadsForRunner ( ( ) -> { org.ovirt.engine.core.common.businessentities.Tags result = dao.get ( existing.getTagId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( existing , result ) ; } , 100 ) ; }
Source:
public com.google.gwt.editor.client.adapters.TakesValueEditor < java.lang.Object > asEditor ( ) { return org.ovirt.engine.ui.common.widget.editor.TakesConstrainedValueEditor.of ( this , this , this ) ; }

Target:
protected void toggleGhost ( org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType value , org.ovirt.engine.ui.common.widget.profile.ProfileInstanceTypeEditor item , boolean becomingGhost ) { item.profileEditor.setEnabled ( ( ! becomingGhost ) ) ; item.profileEditor.asWidget ( ) . setEnabled ( true ) ; if ( ! becomingGhost ) { vnics.add ( value.getNetworkInterface ( ) ) ; } realEntryCount += ( becomingGhost ) ? - 1 : 1 ; updateHeaderLabel ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNic ( java.lang.String nicName , java.lang.String networkName ) { return createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , nicName , false , null , null , null , networkName , true , null , false , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createBond ( java.lang.String name , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , name , true , null , null , null , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenBaseNicIsPassed ( bond ) ; return bond ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; this . existingNetworkAttachments = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ) ( returnValue2 ) ) ; queryVfsConfig ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; hostSetupNetworksParametersData.getNetworkAttachments ( ) . addAll ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ) ( returnValue2 ) ) ) ; queryVfsConfig ( ) ; }
Source:
private void addSharedLockEntry ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( sharedLockMap ) == null ) { sharedLockMap = new java.util.HashMap < > ( ) ; } sharedLockMap.put ( vds.getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.POOL , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }

Target:
private void addSharedLockEntry ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( sharedLockMap ) == null ) { sharedLockMap = new java.util.HashMap < > ( ) ; } sharedLockMap.put ( vds.getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.POOL , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.DbUser persistAuthenticatedUser ( org.ovirt.engine.core.aaa.DirectoryUser directoryUser ) { org.ovirt.engine.core.dao.DbUserDAO dao = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) ; org.ovirt.engine.core.common.businessentities.DbUser dbUser = dao.getByExternalId ( directoryUser.getDirectoryName ( ) , directoryUser.getId ( ) ) ; if ( dbUser != null ) { dao.update ( dbUser ) ; } else { dbUser = new org.ovirt.engine.core.common.businessentities.DbUser ( directoryUser ) ; dbUser.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; dao.save ( dbUser ) ; } return dbUser ; }

Target:
public static org.ovirt.engine.core.common.businessentities.aaa.DbUser persistAuthenticatedUser ( org.ovirt.engine.core.aaa.DirectoryUser directoryUser ) { org.ovirt.engine.core.dao.DbUserDAO dao = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser dbUser = dao.getByExternalId ( directoryUser.getDirectoryName ( ) , directoryUser.getId ( ) ) ; if ( dbUser != null ) { dao.update ( dbUser ) ; } else { dbUser = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( directoryUser ) ; dbUser.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; dao.save ( dbUser ) ; } return dbUser ; }
Source:
protected void initConnectionList ( ) { _connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllConnectableStorageSeverConnection ( org.ovirt.engine.core.bll.storage.ConnectHostToStoragePoolServerCommandBase.getStoragePool ( ) . getId ( ) ) ; updateConnectionsTypeMap ( ) ; }

Target:
protected void initConnectionList ( boolean includeInactiveDomains ) { java.util.Set < org.ovirt.engine.core.common.businessentities.StorageDomainStatus > statuses ; statuses = ( includeInactiveDomains ) ? java.util.EnumSet.of ( StorageDomainStatus.Active , StorageDomainStatus.Unknown , StorageDomainStatus.Inactive ) : java.util.EnumSet.of ( StorageDomainStatus.Active , StorageDomainStatus.Unknown ) ; _connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getStorageConnectionsByStorageTypeAndStatus ( org.ovirt.engine.core.bll.storage.ConnectHostToStoragePoolServerCommandBase.getStoragePool ( ) . getId ( ) , null , statuses ) ; updateConnectionsTypeMap ( ) ; }
Source:
public boolean isCacheUpdateNeeded ( ) { int quotaCount = getQuotaDAO ( ) . getQuotaCount ( ) ; int cacheCount = 0 ; org.ovirt.engine.core.bll.quota.QuotaManager.lock.readLock ( ) . lock ( ) ; try { for ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Quota > quotaMap : org.ovirt.engine.core.bll.quota.QuotaManager.storagePoolQuotaMap.values ( ) ) { cacheCount += quotaMap.size ( ) ; } } finally { org.ovirt.engine.core.bll.quota.QuotaManager.lock.readLock ( ) . unlock ( ) ; } return cacheCount < ( ( quotaCount * ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MinimumPercentageToUpdateQuotaCache ) ) ) / 100 ) ; }

Target:
public boolean isCacheUpdateNeeded ( ) { int quotaCount = getQuotaDAO ( ) . getQuotaCount ( ) ; int cacheCount = 0 ; lock.readLock ( ) . lock ( ) ; try { for ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Quota > quotaMap : storagePoolQuotaMap.values ( ) ) { cacheCount += quotaMap.size ( ) ; } } finally { lock.readLock ( ) . unlock ( ) ; } return cacheCount < ( ( quotaCount * ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MinimumPercentageToUpdateQuotaCache ) ) ) / 100 ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand.equals ( getModel ( ) . getDetailsCommand ( ) ) ) { return eventPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . update ( getNetworkCluster ( ) ) ; if ( getNetworkCluster ( ) . getis_display ( ) ) { org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . setNetworkExclusivelyAsDisplay ( org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) . getId ( ) ) ; } org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) ) ; org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . update ( getNetworkCluster ( ) ) ; if ( getNetworkCluster ( ) . isDisplay ( ) ) { org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . setNetworkExclusivelyAsDisplay ( org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) . getId ( ) ) ; } org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) ) ; org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.setSucceeded ( true ) ; }
Source:
private void populateDisksWithVmData ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.storage.Disk > disks , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = getDiskVmElementDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vmId ) ) ; disk.setDiskVmElements ( java.util.Collections.singletonList ( dve ) ) ; } }

Target:
private void populateDisksWithVmData ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.storage.Disk > disks , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = diskVmElementDao.get ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vmId ) ) ; disk.setDiskVmElements ( java.util.Collections.singletonList ( dve ) ) ; } }
Source:
protected UnitVmModel.GraphicsTypes getRawValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) ) { return null ; } java.util.Map < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.GraphicsInfo > graphicsInfos = vm.getGraphicsInfos ( ) ; return UnitVmModel.GraphicsTypes.fromGraphicsTypes ( graphicsInfos.keySet ( ) ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { return null ; } if ( ( vm.getBackgroundOperationDescription ( ) ) != null ) { return null ; } return super . getValue ( vm ) ; }
Source:
protected void updateConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { super . updateConsoleModel ( item ) ; if ( ( ( item.getEntity ( ) ) != null ) && ( ( item.getDefaultConsole ( ) ) != null ) ) { item.getDefaultConsole ( ) . setForceVmStatusUp ( false ) ; } }

Target:
protected void updateConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { super . updateConsoleModel ( item ) ; if ( ( ( item.getEntity ( ) ) != null ) && ( ( item.getDefaultConsoleModel ( ) ) != null ) ) { item.getDefaultConsoleModel ( ) . setForceVmStatusUp ( false ) ; } }
Source:
public static void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public static boolean isMixedStorageDomainsSupported ( org.ovirt.engine.core.compat.Version version ) { return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MixedDomainTypesInDataCenter , version.toString ( ) ) ) ) ; }
Source:
private void initFullList ( java.util.Map < java.lang.String , java.lang.Object > ... deviceInfos ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.Map [ ] { getFullList ( org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoringTest.VM_ID , deviceInfos ) } ) ; returnValue.setSucceeded ( true ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( resourceManager ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.FullList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters.class ) ) ; }

Target:
private void initFullList ( java.util.Map < java.lang.String , java.lang.Object > ... deviceInfos ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.Map [ ] { getFullList ( org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoringTest.VM_ID , deviceInfos ) } ) ; returnValue.setSucceeded ( true ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( resourceManager ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.FullList ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters.class ) ) ; }
Source:
public void testJsonEmptyDiskDescription ( ) throws java.io.IOException { java.lang.String jsonDescription = org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( "DiskAlias" , "" ) ; org.junit.Assert.assertTrue ( "Should be map of disk alias and disk description" , jsonDescription.equals ( "{\"DiskAlias\":\"DiskAlias\",\"DiskDescription\":\"\"}" ) ) ; }

Target:
private static void assertDiskDescriptionMap ( java.lang.String diskAlias , java.lang.String diskDescription ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , diskAlias , org.apache.commons.lang.StringUtils.defaultString ( diskDescription ) ) , org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( diskAlias , diskDescription ) ) ; }
Source:
public void testNotEnoughSpaceToMergeSnapshotsWithOneDisk ( ) { spySdValidatorForOneDomain ( ) ; org.mockito.Mockito.when ( diskImageDAO.get ( mockSourceImage ( ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; mockStorageDomainDAOGetForStoragePool ( 3 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; org.junit.Assert.assertFalse ( "Validation should fail. Free space minus threshold should be smaller then disk size" , cmd.validateStorageDomains ( ) ) ; }

Target:
private org.ovirt.engine.core.compat.Guid mockSourceImageAndGetId ( ) { return mockSourceImage ( ) . getImageId ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; return new org.ovirt.engine.core.common.businessentities.AsyncTasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getVdsmTaskId ( ) , parentParameters , getParameters ( ) , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) , parentParameters.getCommandId ( ) , asyncTaskCreationInfo.getStoragePoolID ( ) , asyncTaskCreationInfo.getTaskType ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.CommandEntity buildCommandEntity ( org.ovirt.engine.core.compat.Guid parentCommandId , boolean callBackEnabled ) { return org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentCommandId , ( ( getExecutionContext ( ) . getJob ( ) ) == null ? org.ovirt.engine.core.compat.Guid.Empty : getExecutionContext ( ) . getJob ( ) . getId ( ) ) , ( ( getExecutionContext ( ) . getStep ( ) ) == null ? org.ovirt.engine.core.compat.Guid.Empty : getExecutionContext ( ) . getStep ( ) . getId ( ) ) , getActionType ( ) , getParameters ( ) , commandStatus , callBackEnabled , getReturnValue ( ) ) ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; org.ovirt.engine.api.restapi.resource.BackendTemplateBasedResourceTest.setUpGetConsoleExpectations ( new int [ ] { 0 } ) ; setUpGetVirtioScsiExpectations ( new int [ ] { 0 } ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( getRestModel ( 0 ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; org.ovirt.engine.api.restapi.resource.BackendTemplateBasedResourceTest.setUpGetConsoleExpectations ( new int [ ] { 0 } ) ; setUpGetVirtioScsiExpectations ( new int [ ] { 0 } ) ; org.ovirt.engine.api.restapi.resource.BackendTemplateBasedResourceTest.setUpGetRngDeviceExpectations ( new int [ ] { 0 } ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyModel ( resource.update ( getRestModel ( 0 ) ) , 0 ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSParametersBase createVDSParameters ( ) { return org.ovirt.engine.core.bll.storage.domain.PostZeroHandler.fixParametersWithPostZero ( new org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageList ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isPostZero ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isForce ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSParametersBase createVDSParameters ( ) { return org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageList ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isPostZero ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isForce ( ) ) ) ; }
Source:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) : java.lang.Boolean.FALSE ; } } ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }

Target:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( java.lang.Boolean.FALSE ) ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }
Source:
private java.lang.String getInnerQuery ( java.lang.String tableName , java.lang.String primeryKey , java.lang.String fromStatement , java.lang.StringBuilder wherePhrase ) { return org.ovirt.engine.core.compat.StringFormat.format ( "SELECT distinct %1$s.%2$s FROM %3$s %4$s" , tableName , primeryKey , fromStatement , wherePhrase ) ; }

Target:
private java.lang.String getInnerQuery ( java.lang.String tableName , java.lang.String primeryKey , java.lang.String fromStatement , java.lang.StringBuilder wherePhrase , java.lang.StringBuilder sortExpr ) { if ( ( sortExpr.indexOf ( "(" ) ) > 0 ) { return org.ovirt.engine.core.compat.StringFormat.format ( "SELECT %1$s.%2$s FROM %3$s %4$s" , tableName , primeryKey , fromStatement , wherePhrase ) ; } else { return org.ovirt.engine.core.compat.StringFormat.format ( "SELECT distinct %1$s.%2$s FROM %3$s %4$s" , tableName , primeryKey , fromStatement , wherePhrase ) ; } }
Source:
private void fillDefaults ( java.util.Map < java.lang.String , java.lang.Object > argMap ) { for ( org.ovirt.engine.core.uutils.cli.parser.Argument arg : arguments.values ( ) ) { if ( ( ! ( argMap.containsKey ( arg.getName ( ) ) ) ) && ( ( arg.getDefaultValue ( ) ) != null ) ) { putValue ( argMap , arg , org.ovirt.engine.core.uutils.cli.parser.StringValueConverter.getObjectValueByString ( arg.getValueType ( ) , arg.getDefaultValue ( ) ) ) ; } } }

Target:
private void fillDefaults ( java.util.Map < java.lang.String , java.lang.Object > argMap ) { for ( org.ovirt.engine.core.uutils.cli.parser.Argument arg : arguments.values ( ) ) { if ( ( ! ( argMap.containsKey ( arg.getName ( ) ) ) ) && ( ( arg.getDefaultValue ( ) ) != null ) ) { putValue ( argMap , arg , org.ovirt.engine.core.uutils.cli.parser.StringValueConverter.getObjectValueByString ( arg.getValueType ( ) , doSubstitutions ( arg.getDefaultValue ( ) ) ) ) ; } } }
Source:
public org.ovirt.engine.core.bll.ValidationResult allValuesPresent ( ) { if ( ( missingCategoryValues ( getQos ( ) . getMaxThroughput ( ) , getQos ( ) . getMaxReadThroughput ( ) , getQos ( ) . getMaxWriteThroughput ( ) ) ) || ( missingCategoryValues ( getQos ( ) . getMaxIops ( ) , getQos ( ) . getMaxReadIops ( ) , getQos ( ) . getMaxWriteIops ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QOS_MISSING_VALUES ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult requiredValuesPresent ( ) { if ( ( missingCategoryValues ( getQos ( ) . getMaxThroughput ( ) , getQos ( ) . getMaxReadThroughput ( ) , getQos ( ) . getMaxWriteThroughput ( ) ) ) || ( missingCategoryValues ( getQos ( ) . getMaxIops ( ) , getQos ( ) . getMaxReadIops ( ) , getQos ( ) . getMaxWriteIops ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QOS_MISSING_VALUES ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void addVmToPool ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.AddVmToPoolParameters parameters = new org.ovirt.engine.core.common.action.AddVmToPoolParameters ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getPoolId ( ) , vmStatic.getId ( ) ) ; parameters.setShouldBeLogged ( false ) ; setSucceeded ( runInternalAction ( VdcActionType.AddVmToPool , parameters ) . getSucceeded ( ) ) ; org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.addVmPermission ( ) ; }

Target:
private void addVmToPool ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.AddVmToPoolParameters parameters = new org.ovirt.engine.core.common.action.AddVmToPoolParameters ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getPoolId ( ) , vmStatic.getId ( ) ) ; parameters.setShouldBeLogged ( false ) ; setSucceeded ( runInternalActionWithTasksContext ( VdcActionType.AddVmToPool , parameters ) . getSucceeded ( ) ) ; org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.addVmPermission ( ) ; }
Source:
public java.lang.String ExportVm ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.compat.backendcompat.XmlDocument document = new org.ovirt.engine.core.compat.backendcompat.XmlDocument ( ) ; org.ovirt.engine.core.utils.ovf.OvfWriter ovf = new org.ovirt.engine.core.utils.ovf.OvfVmWriter ( document , vm , images ) ; try { BuildOvf ( ovf ) ; } finally { ovf.dispose ( ) ; } return document.OuterXml ; }

Target:
public java.lang.String ExportVm ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.utils.ovf.OvfWriter ovf = new org.ovirt.engine.core.utils.ovf.OvfVmWriter ( vm , images ) ; BuildOvf ( ovf ) ; return ovf.getStringRepresentation ( ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain a ) { return ( a.getId ( ) . equals ( getStorageDomain ( ) . getId ( ) ) ) && ( ( a.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; }

Target:
protected boolean isDetachAllowed ( final boolean isRemoveLast ) { boolean returnValue = true ; if ( ( getStoragePoolIsoMap ( ) ) == null ) { returnValue = false ; addCanDoActionMessage ( EngineMessage.STORAGE_DOMAIN_NOT_ATTACHED_TO_STORAGE_POOL ) ; } else if ( ( ! isRemoveLast ) && ( isMaster ( ) ) ) { returnValue = false ; addCanDoActionMessage ( EngineMessage.ERROR_CANNOT_DETACH_LAST_STORAGE_DOMAIN ) ; } return returnValue ; }
Source:
private org.ovirt.engine.core.compat.Guid getPrestartedVmToAttach ( org.ovirt.engine.core.compat.Guid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Up ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachPrestartedVmToUser ( map.getvm_guid ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
private org.ovirt.engine.core.compat.Guid getPrestartedVmToAttach ( org.ovirt.engine.core.compat.Guid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Up ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachPrestartedVmToUser ( map.getvm_guid ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
public void getHostPublicKey ( 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) return true ; if ( ( obj == null ) || ( ( obj.getClass ( ) ) != ( this . getClass ( ) ) ) ) return false ; org.ovirt.engine.core.vdsbroker.attestation.AttestationValue other = ( ( org.ovirt.engine.core.vdsbroker.attestation.AttestationValue ) ( obj ) ) ; return ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( hostName , other.hostName ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( trustLevel , other.trustLevel ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) return true ; if ( ( obj == null ) || ( ( obj.getClass ( ) ) != ( this . getClass ( ) ) ) ) return false ; org.ovirt.engine.core.vdsbroker.attestation.AttestationValue other = ( ( org.ovirt.engine.core.vdsbroker.attestation.AttestationValue ) ( obj ) ) ; return ( java.util.Objects.equals ( hostName , other.hostName ) ) && ( java.util.Objects.equals ( trustLevel , other.trustLevel ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean interfaceHasSiblingVlanInterfaces = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! interfaceHasSiblingVlanInterfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaceList ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( i.getBondName ( ) , vlanParent.getName ( ) ) ) { ifacesOptions.add ( i ) ; } } } defaultInterfaceName.append ( vlanParent.getName ( ) ) ; asyncQuery.asyncCallback.onSuccess ( asyncQuery.model , ifacesOptions ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean interfaceHasSiblingVlanInterfaces = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! interfaceHasSiblingVlanInterfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaceList ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( i.getBondName ( ) , vlanParent.getName ( ) ) ) { ifacesOptions.add ( i ) ; } } } defaultInterfaceName.append ( vlanParent.getName ( ) ) ; asyncQuery.asyncCallback.onSuccess ( asyncQuery.model , ifacesOptions ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command.getName ( ) . equals ( "OnRemove" ) ) { OnRemove ( ) ; } else if ( command.getName ( ) . equals ( "OnRestore" ) ) { OnRestore ( ) ; } else if ( command.getName ( ) . equals ( "onClone" ) ) { onClone ( ) ; } else if ( command.getName ( ) . equals ( "closeClone" ) ) { closeClone ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command.getName ( ) . equals ( "OnRemove" ) ) { onRemove ( ) ; } else if ( command.getName ( ) . equals ( "OnRestore" ) ) { onRestore ( ) ; } else if ( command.getName ( ) . equals ( "onClone" ) ) { onClone ( ) ; } else if ( command.getName ( ) . equals ( "closeClone" ) ) { closeClone ( ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean isProvisioningChangable = object.getProvisioning ( ) . getIsChangable ( ) ; provisioningThinEditor.setEnabled ( isProvisioningChangable ) ; provisioningCloneEditor.setEnabled ( isProvisioningChangable ) ; boolean isProvisioningAvailable = object.getProvisioning ( ) . getIsAvailable ( ) ; provisionSelectionPanel.setVisible ( isProvisioningAvailable ) ; boolean isDisksAvailable = object.getIsDisksAvailable ( ) ; disksAllocationPanel.setVisible ( isDisksAvailable ) ; storageAllocationPanel.setVisible ( ( isProvisioningAvailable || isDisksAvailable ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean isProvisioningChangable = object.getProvisioning ( ) . getIsChangable ( ) ; provisioningThinEditor.setEnabled ( isProvisioningChangable ) ; provisioningCloneEditor.setEnabled ( isProvisioningChangable ) ; boolean isProvisioningAvailable = object.getProvisioning ( ) . getIsAvailable ( ) ; changeApplicationLevelVisibility ( provisionSelectionPanel , isProvisioningAvailable ) ; boolean isDisksAvailable = object.getIsDisksAvailable ( ) ; changeApplicationLevelVisibility ( disksAllocationPanel , isDisksAvailable ) ; changeApplicationLevelVisibility ( storageAllocationPanel , ( isProvisioningAvailable || isDisksAvailable ) ) ; }