auphong2707/dl4se-code-review-dataset huggingface dataset:
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 getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidator mock = new org.ovirt.engine.core.bll.validator.RunVmValidator ( ) { @ java.lang.Override protected org.ovirt.engine.core.bll.IsoDomainListSyncronizer getIsoDomainListSyncronizer ( ) { return new org.ovirt.engine.core.bll.IsoDomainListSyncronizer ( ) { @ java.lang.Override protected void init ( ) { } @ java.lang.Override public org.ovirt.engine.core.compat.Guid findActiveISODomain ( org.ovirt.engine.core.compat.Guid storagePoolId ) { return new org.ovirt.engine.core.compat.Guid ( ) ; } } ; } } ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( mock.validateBootSequence ( vm , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , true , null ) ; }

Target:
public void testVmNotDuringInitialization ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.doReturn ( false ) . when ( runVmValidator ) . isVmDuringInitiating ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.vmDuringInitialization ( vm ) , true , null ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.Label label = org.ovirt.engine.api.restapi.resource.BackendAffinityLabelHelper.getLabel ( this , labelId ) ; if ( ! ( label.getVms ( ) . contains ( guid ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } org.ovirt.engine.core.common.businessentities.VM entity = new org.ovirt.engine.core.common.businessentities.VM ( ) ; entity.setId ( guid ) ; org.ovirt.engine.core.common.businessentities.Label updatedLabel = new org.ovirt.engine.core.common.businessentities.LabelBuilder ( label ) . removeEntity ( entity ) . build ( ) ; return performAction ( VdcActionType.UpdateLabel , new org.ovirt.engine.core.common.action.LabelActionParameters ( updatedLabel ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.Label label = org.ovirt.engine.api.restapi.resource.BackendAffinityLabelHelper.getLabel ( this , labelId ) ; if ( ! ( label.getVms ( ) . contains ( guid ) ) ) { throw new javax.ws.rs.WebApplicationException ( Response.Status.NOT_FOUND ) ; } org.ovirt.engine.core.common.businessentities.VM entity = new org.ovirt.engine.core.common.businessentities.VM ( ) ; entity.setId ( guid ) ; org.ovirt.engine.core.common.businessentities.Label updatedLabel = new org.ovirt.engine.core.common.businessentities.LabelBuilder ( label ) . removeEntity ( entity ) . build ( ) ; return performAction ( ActionType.UpdateLabel , new org.ovirt.engine.core.common.action.LabelActionParameters ( updatedLabel ) ) ; }
Source:
public void persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { commandsCache.put ( cmdEntity ) ; if ( cmdEntity.isCallBackEnabled ( ) ) { buildCmdHierarchy ( cmdEntity ) ; if ( ! ( cmdEntity.isCallBackNotified ( ) ) ) { cmdExecutor.addToCallBackMap ( cmdEntity ) ; } } }

Target:
public void persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { org.ovirt.engine.core.common.businessentities.CommandEntity existingCmdEntity = commandsCache.get ( cmdEntity.getId ( ) ) ; if ( existingCmdEntity != null ) { cmdEntity.setExecuted ( existingCmdEntity.isExecuted ( ) ) ; cmdEntity.setCallBackNotified ( existingCmdEntity.isCallBackNotified ( ) ) ; } commandsCache.put ( cmdEntity ) ; if ( cmdEntity.isCallBackEnabled ( ) ) { buildCmdHierarchy ( cmdEntity ) ; if ( ! ( cmdEntity.isCallBackNotified ( ) ) ) { cmdExecutor.addToCallBackMap ( cmdEntity ) ; } } }
Source:
public void setFirstLevelDistanceSetList ( java.util.List < org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , java.util.Set < org.ovirt.engine.core.common.businessentities.VdsNumaNode > > > firstLevelDistanceSetList ) { this . firstLevelDistanceSetList = firstLevelDistanceSetList ; }

Target:
public void pinVNode ( org.ovirt.engine.core.compat.Guid sourceVMGuid , int sourceVNumaIndex , int pNumaNodeIndex ) { org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel vNodeModel = getNodeModel ( sourceVMGuid , sourceVNumaIndex ) ; if ( vNodeModel.isPinned ( ) ) { assignedNumaNodes.get ( vNodeModel.getHostNodeIndex ( ) ) . remove ( vNodeModel ) ; } else { unassignedNumaNodes.remove ( vNodeModel ) ; } vmsToUpdate.add ( vNodeModel.getVm ( ) . getId ( ) ) ; vNodeModel.pinTo ( pNumaNodeIndex ) ; assignVNumaToPhysicalNuma ( vNodeModel ) ; modelReady ( ) ; }
Source:
public void getStorageDomainsWithAttachedStoragePoolGuid ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source == null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; } } ; org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters parameters = new org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters ( storageDomains , storagePool.getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsWithAttachedStoragePoolGuid , parameters , aQuery ) ; }

Target:
public void getStorageDomainsWithAttachedStoragePoolGuid ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomainStatic > > aQuery , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters parameters = new org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters ( storageDomains , storagePool.getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsWithAttachedStoragePoolGuid , parameters , aQuery ) ; }
Source:
public void setInputFieldsEnabled ( boolean enabled ) { nameEditor.setEnabled ( enabled ) ; descriptionEditor.setEnabled ( enabled ) ; isVmNetworkEditor.setEnabled ( enabled ) ; vlanTagging.setEnabled ( enabled ) ; vlanTag.setEnabled ( enabled ) ; hasMtuEditor.setEnabled ( enabled ) ; mtuEditor.setEnabled ( enabled ) ; }

Target:
public void setVLanTagEnabled ( boolean flag ) { vlanTag.setEnabled ( flag ) ; }
Source:
public void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

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

Target:
public static void getGlusterHooks ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public void nameNotUsed ( ) { org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( java.lang.Boolean.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( dbFacade.getClusterDao ( ) ) . thenReturn ( clusterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void nameNotUsed ( ) { org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( dbFacade.getClusterDao ( ) ) . thenReturn ( clusterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.nameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void assertNumOfVfsInValidRange ( int numOfVfs ) { org.junit.Assert.assertThat ( validator.numOfVfsInValidRange ( numOfVfs ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NUM_OF_VFS_NOT_IN_VALID_RANGE , java.lang.String.format ( VfsConfigValidator.NIC_NAME_REPLACEMENT , nic.getName ( ) ) , java.lang.String.format ( VfsConfigValidator.NUM_OF_VFS_REPLACEMENT , numOfVfs ) , java.lang.String.format ( VfsConfigValidator.MAX_NUM_OF_VFS_REPLACEMENT , oldVfsConfig.getMaxNumOfVfs ( ) ) ) ) ; }

Target:
private void assertNumOfVfsInValidRange ( int numOfVfs ) { org.hamcrest.MatcherAssert.assertThat ( validator.numOfVfsInValidRange ( numOfVfs ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NUM_OF_VFS_NOT_IN_VALID_RANGE , java.lang.String.format ( VfsConfigValidator.NIC_NAME_REPLACEMENT , nic.getName ( ) ) , java.lang.String.format ( VfsConfigValidator.NUM_OF_VFS_REPLACEMENT , numOfVfs ) , java.lang.String.format ( VfsConfigValidator.MAX_NUM_OF_VFS_REPLACEMENT , oldVfsConfig.getMaxNumOfVfs ( ) ) ) ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean resolveGroups , boolean recursiveGroupResolving ) { return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , namespace , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) . mput ( Authz.InvokeKeys.QUERY_FLAGS , org.ovirt.engine.core.aaa.AuthzUtils.queryFlagValue ( resolveGroups , recursiveGroupResolving ) ) ) ; }

Target:
public static java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryGroupRecords ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { org.ovirt.engine.api.extensions.ExtMap inputMap = new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FLAGS , org.ovirt.engine.core.aaa.AuthzUtils.queryFlagValue ( groupsResolving , groupsResolvingRecursive ) ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) . mput ( Authz.InvokeKeys.NAMESPACE , namespace ) ; return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , namespace , inputMap ) ; }
Source:
protected boolean canDoAction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( ( poolDomain.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) { addInvalidSDStatusMessage ( poolDomain.getstatus ( ) ) ; return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }

Target:
protected boolean canDoAction ( ) { if ( checkIsDomainLocked ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( checkIsDomainLocked ( poolDomain ) ) { return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }
Source:
protected void onGetClusterList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterList ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > items = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusterList ) { items.add ( createNetworkClusterModel ( cluster ) ) ; } getNetworkClusterList ( ) . setItems ( items ) ; }

Target:
protected void onGetClusterList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > clusterList ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > items = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster cluster : clusterList ) { items.add ( createNetworkClusterModel ( cluster ) ) ; } getNetworkClusterList ( ) . setItems ( items ) ; }
Source:
public void testPersistNetworkAttachmentsWhenIpConfigurationChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; networkAttachmentForClusterNetworkA.setNicId ( interfaceWithAttachedClusterNetworkA.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; ipConfiguration.getPrimaryAddress ( ) . setAddress ( "192.168.1.11" ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( interfaceWithAttachedClusterNetworkA ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createLegacyPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }

Target:
public void testPersistNetworkAttachmentsWhenIpConfigurationChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; networkAttachmentForClusterNetworkA.setNicId ( interfaceWithAttachedClusterNetworkA.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.common.utils.NetworkCommonUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; ipConfiguration.getPrimaryAddress ( ) . setAddress ( "192.168.1.11" ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( interfaceWithAttachedClusterNetworkA ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createLegacyPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalConsolePopupModel model ) { editCheckBoxes ( model , ctrlAltDel , enableUsbAutoshare , openInFullScreen , useLocalDrives , wanEnabled , disableSmartcard ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalConsolePopupModel model ) { this . model = model ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel defaultConsole = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( model.getModel ( ) . getSelectedItem ( ) ) ) . getDefaultConsole ( ) ; editCheckBoxes ( defaultConsole , ctrlAltDel , enableUsbAutoshare , openInFullScreen , wanEnabled , disableSmartcard ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel additionalConsole = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( model.getModel ( ) . getSelectedItem ( ) ) ) . getAdditionalConsole ( ) ; editCheckBoxes ( additionalConsole , useLocalDrives ) ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForDisplayNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( getNetworkCluster ( ) . isDisplay ( ) ) && ( ( ipConfiguration == null ) || ( ( ipConfiguration.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForDisplayNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( getNetworkCluster ( ) . isDisplay ( ) ) && ( ( ( ipConfiguration == null ) || ( ! ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) ) || ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . when ( failWhen ) ; }
Source:
public void testParseSecureOptions ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( org.ovirt.engine.api.restapi.util.FenceOptionsParserTest.FENCE_OPTION , org.ovirt.engine.api.restapi.util.FenceOptionsParserTest.FENCE_OPTION_TYPES ) ; assertNotNull ( ret ) ; assertEquals ( 16 , ret.size ( ) ) ; verifyResult ( ret.get ( 1 ) , "apc_snmp" , "port" , "int" , "port" , "encrypt_options" , "bool" , "encrypt_options" ) ; }

Target:
public void testParseSecureOptions ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( org.ovirt.engine.api.restapi.util.FenceOptionsParserTest.FENCE_OPTION , org.ovirt.engine.api.restapi.util.FenceOptionsParserTest.FENCE_OPTION_TYPES ) ; org.junit.Assert.assertNotNull ( ret ) ; org.junit.Assert.assertEquals ( 16 , ret.size ( ) ) ; verifyResult ( ret.get ( 1 ) , "apc_snmp" , "port" , "int" , "port" , "encrypt_options" , "bool" , "encrypt_options" ) ; }
Source:
public void testEchoStdout ( ) throws java.lang.Exception { java.lang.String content = "hello\nworld!\nother\ndata" ; java.io.InputStream stdin = new java.io.ByteArrayInputStream ( content.getBytes ( "UTF-8" ) ) ; java.io.ByteArrayOutputStream stdout = new java.io.ByteArrayOutputStream ( ) ; java.io.ByteArrayOutputStream stderr = new java.io.ByteArrayOutputStream ( ) ; client.executeCommand ( "cat" , stdin , stdout , stderr ) ; assertEquals ( content , new java.lang.String ( stdout.toByteArray ( ) , "UTF-8" ) ) ; assertEquals ( 0 , stderr.size ( ) ) ; }

Target:
public void testEchoStdout ( ) throws java.lang.Exception { java.lang.String content = "hello\nworld!\nother\ndata" ; java.io.InputStream stdin = new java.io.ByteArrayInputStream ( content.getBytes ( "UTF-8" ) ) ; java.io.ByteArrayOutputStream stdout = new java.io.ByteArrayOutputStream ( ) ; java.io.ByteArrayOutputStream stderr = new java.io.ByteArrayOutputStream ( ) ; client.executeCommand ( "cat" , stdin , stdout , stderr ) ; org.junit.Assert.assertEquals ( content , new java.lang.String ( stdout.toByteArray ( ) , "UTF-8" ) ) ; org.junit.Assert.assertEquals ( 0 , stderr.size ( ) ) ; }
Source:
protected java.lang.Object [ ] getSelectedKeys ( ) { if ( ( getSelectedItems ( ) ) == null ) { return new java.lang.Object [ 0 ] ; } else { java.lang.Object [ ] keys = new java.lang.Object [ getSelectedItems ( ) . size ( ) ] ; for ( int i = 0 ; i < ( getSelectedItems ( ) . size ( ) ) ; i ++ ) { keys [ i ] = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( getSelectedItems ( ) . get ( i ) ) ) . getvm_pool_id ( ) ; } return keys ; } }

Target:
protected java.lang.Object [ ] getSelectedKeys ( ) { if ( ( getSelectedItems ( ) ) == null ) { return new java.lang.Object [ 0 ] ; } else { java.lang.Object [ ] keys = new java.lang.Object [ getSelectedItems ( ) . size ( ) ] ; for ( int i = 0 ; i < ( getSelectedItems ( ) . size ( ) ) ; i ++ ) { keys [ i ] = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( getSelectedItems ( ) . get ( i ) ) ) . getVmPoolId ( ) ; } return keys ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionSubjects = new java.util.ArrayList < > ( ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getParameters ( ) . getSourceStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.ACCESS_IMAGE_STORAGE ) ) ; return permissionSubjects ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionSubjects = new java.util.ArrayList < > ( ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; permissionSubjects.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getSourceStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.ACCESS_IMAGE_STORAGE ) ) ; return permissionSubjects ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Role > getAllForUserAndGroups ( org.ovirt.engine.core.compat.Guid id , java.lang.String groupIds ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , id ) . addValue ( "group_ids" , groupIds ) ; return getCallsHandler ( ) . executeReadList ( "GetAllRolesByUserIdAndGroupIds" , RolesRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Role > getAllForUserAndGroups ( org.ovirt.engine.core.compat.Guid id , java.lang.String groupIds ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , id ) . addValue ( "group_ids" , groupIds ) ; return getCallsHandler ( ) . executeReadList ( "GetAllRolesByUserIdAndGroupIds" , org.ovirt.engine.core.dao.RoleDAODbFacadeImpl.RolesRowMapper.instance , parameterSource ) ; }
Source:
protected void migrateVM ( final org.ovirt.engine.core.common.businessentities.VM vmToMigrate ) { org.ovirt.engine.core.common.action.MigrateVmParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmParameters ( false , vmToMigrate.getId ( ) ) ; parameters.setReason ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getMessage ( AuditLogType.MIGRATION_REASON_AFFINITY_ENFORCEMENT ) ) ; backend.runInternalAction ( VdcActionType.BalanceVm , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
protected void migrateVM ( final org.ovirt.engine.core.common.businessentities.VM vmToMigrate ) { org.ovirt.engine.core.common.action.MigrateVmParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmParameters ( false , vmToMigrate.getId ( ) ) ; parameters.setReason ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.MessageBundler.getMessage ( AuditLogType.MIGRATION_REASON_AFFINITY_ENFORCEMENT ) ) ; backend.runInternalAction ( ActionType.BalanceVm , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getStorageDomainListByTemplate ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
protected java.lang.String getDiskSharedLockMessage ( ) { if ( ( cachedDiskSharedLockMessage ) == null ) { cachedDiskSharedLockMessage = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_IS_USED_FOR_CREATE_VM.name ( ) ) . append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.AddVmCommand.getVmName ( ) ) ) . toString ( ) ; } return cachedDiskSharedLockMessage ; }

Target:
private java.lang.String getTemplateSharedLockMessage ( ) { return new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_TEMPLATE_IS_USED_FOR_CREATE_VM.name ( ) ) . append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.AddVmCommand.getVmName ( ) ) ) . toString ( ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid id : getNetworksIds ( ) ) { networks.add ( org.ovirt.engine.core.bll.GetNetworksByIscsiBondIdQuery.getDbFacade ( ) . getNetworkDao ( ) . get ( id ) ) ; } org.ovirt.engine.core.bll.GetNetworksByIscsiBondIdQuery.getQueryReturnValue ( ) . setReturnValue ( networks ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid id : getNetworksIds ( ) ) { networks.add ( networkDao.get ( id ) ) ; } org.ovirt.engine.core.bll.GetNetworksByIscsiBondIdQuery.getQueryReturnValue ( ) . setReturnValue ( networks ) ; }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.statisticssync_3_2.StatisticsSync.row2Struct.commonByteArrayLock ) { try { int length = 0 ; this . key = readString ( dis ) ; this . value = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.statisticssync_3_2.StatisticsSync.row2Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_StatisticsSync ) { try { int length = 0 ; this . key = readString ( dis ) ; this . value = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > queryDirectoryUsers ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { return org.ovirt.engine.core.aaa.DirectoryUtils.mapPrincipalRecords ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) ; }

Target:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > queryDirectoryUsers ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { return org.ovirt.engine.core.aaa.DirectoryUtils.mapPrincipalRecordsToDirectoryUsers ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) ; }
Source:
public void render ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Context context , org.ovirt.engine.core.common.businessentities.VmTemplate template , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.append ( templates.vmNameCellItem ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , "name" , context ) , template.getname ( ) ) ) ; java.lang.String description = template.getdescription ( ) ; if ( ( description != null ) && ( ! ( description.isEmpty ( ) ) ) ) { sb.append ( templates.vmDescriptionCellItem ( description ) ) ; } }

Target:
public void render ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Context context , org.ovirt.engine.core.common.businessentities.VmTemplate template , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.append ( templates.vmNameCellItem ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , "name" , context ) , template.getname ( ) ) ) ; java.lang.String description = template.getDescription ( ) ; if ( ( description != null ) && ( ! ( description.isEmpty ( ) ) ) ) { sb.append ( templates.vmDescriptionCellItem ( description ) ) ; } }
Source:
public static void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIpConfigurationIsNotStatic ( ) throws java.lang.Exception { for ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol networkBootProtocol : org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) ) { if ( networkBootProtocol == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { continue ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( networkBootProtocol , null , null ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , null ) . networkIpAddressWasSameAsHostnameAndChanged ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; } }

Target:
public void testBootProtocolSetForDisplayNetworkWhenNetworkIsNonDisplay ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public 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:
private org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( java.lang.String name , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = control.createMock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.easymock.classextension.EasyMock.expect ( vdsGroup.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; org.easymock.classextension.EasyMock.expect ( vdsGroup.getname ( ) ) . andReturn ( name ) . anyTimes ( ) ; return vdsGroup ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( java.lang.String name , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = control.createMock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.easymock.EasyMock.expect ( vdsGroup.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( vdsGroup.getname ( ) ) . andReturn ( name ) . anyTimes ( ) ; return vdsGroup ; }
Source:
public void testHotsetUpdateableWhenHotsetRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addField ( VMStatus.Down , "name" ) ; oic.addHotsetFields ( "name" ) ; org.junit.Assert.assertTrue ( "hot set requested for hot set fields should be true" , oic.isFieldUpdatable ( VMStatus.Down , "name" , null , true ) ) ; }

Target:
public void testHotsetUpdateableWhenHotsetRequestedWithStatus ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addField ( VMStatus.Down , "name" ) ; oic.addHotsetField ( "name" , java.util.EnumSet.of ( VMStatus.Up ) ) ; org.junit.Assert.assertTrue ( "hot set requested for hot set fields should be true" , oic.isFieldUpdatable ( VMStatus.Down , "name" , null , true ) ) ; }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testChangeCaseDisplay ( ) { org.ovirt.engine.core.searchbackend.BaseAutoCompleter bac = new org.ovirt.engine.core.searchbackend.BaseAutoCompleter ( ) ; org.junit.Assert.assertEquals ( "normal" , "jarjarbinks" , bac.changeCaseDisplay ( "JarJarBinks" ) ) ; org.junit.Assert.assertEquals ( "dayOfWeek" , "Monday" , bac.changeCaseDisplay ( "Monday" ) ) ; org.junit.Assert.assertEquals ( "dayOfWeek" , "monday" , bac.changeCaseDisplay ( "monday" ) ) ; }

Target:
public void testChangeCaseDisplay ( ) { org.ovirt.engine.core.searchbackend.BaseAutoCompleter bac = new org.ovirt.engine.core.searchbackend.BaseAutoCompleter ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( "jarjarbinks" , bac.changeCaseDisplay ( "JarJarBinks" ) , "normal" ) ; org.junit.jupiter.api.Assertions.assertEquals ( "Monday" , bac.changeCaseDisplay ( "Monday" ) , "dayOfWeek" ) ; org.junit.jupiter.api.Assertions.assertEquals ( "monday" , bac.changeCaseDisplay ( "monday" ) , "dayOfWeek" ) ; }