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

Target:
public static void getMinimalVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testGetEngineSessionTimeoutObject ( ) { org.codehaus.jackson.node.ObjectNode result = testServlet.getEngineSessionTimeoutObject ( 30 , 60 ) ; org.junit.Assert.assertEquals ( result.get ( "sessionTimeout" ) . asInt ( ) , 30 ) ; org.junit.Assert.assertEquals ( result.get ( "sessionHardLimit" ) . asInt ( ) , 60 ) ; }

Target:
public void testGetEngineSessionTimeoutObject ( ) { org.codehaus.jackson.node.ObjectNode result = testServlet.getEngineSessionTimeoutObject ( java.lang.Integer.valueOf ( 30 ) ) ; org.junit.Assert.assertEquals ( result.get ( "value" ) . asText ( ) , "30" ) ; }
Source:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
protected boolean CanAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getstorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } return true ; }

Target:
protected boolean CanAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } return true ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( checkRemoveEditValidations ( ) ) ) { return false ; } if ( ( getVdsGroupDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) . size ( ) ) > 0 ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE , java.lang.String.format ( "$clusters %1$s" , clustersListIntoTokenizedString ( ) ) ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( checkRemoveEditValidations ( ) ) ) { return false ; } if ( ( getVdsGroupDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) . size ( ) ) > 0 ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE , java.lang.String.format ( "$clusters %1$s" , clustersListIntoTokenizedString ( ) ) ) ; } return true ; }
Source:
private org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > setupCanAddVmFromTemplateTests ( final int domainSizeGB , final int sizeRequired , final int pctRequired ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired , pctRequired ) ; org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > cmd = createVmFromTemplateCommand ( vm ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; return cmd ; }

Target:
private org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > setupCanAddVmTests ( final int domainSizeGB , final int sizeRequired ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired ) ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > cmd = createCommand ( vm ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; org.mockito.Mockito.doReturn ( createVmTemplate ( ) ) . when ( cmd ) . getVmTemplate ( ) ; return cmd ; }
Source:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) , getVm ( ) . getstatus ( ) ) ; getVm ( ) . setstatus ( VMStatus.SavingState ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVmDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters ( getVdsId ( ) , getVm ( ) . getDynamicData ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) , getVm ( ) . getStatus ( ) ) ; getVm ( ) . setStatus ( VMStatus.SavingState ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVmDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters ( getVdsId ( ) , getVm ( ) . getDynamicData ( ) ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void testChangeValueAfterAdd ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "tag2" ) ; org.ovirt.engine.core.common.businessentities.Tags tagFromDirector = tagsDirector.GetTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertNotNull ( tagFromDirector ) ; org.junit.Assert.assertEquals ( "tag1" , tagFromDirector.gettag_name ( ) ) ; }

Target:
public void testChangeValueAfterAdd ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "tag2" ) ; org.ovirt.engine.core.common.businessentities.Tags tagFromDirector = tagsDirector.getTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertNotNull ( tagFromDirector ) ; org.junit.Assert.assertEquals ( "tag1" , tagFromDirector.gettag_name ( ) ) ; }
Source:
public static org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler getBackendCommandObjectsHandler ( org.ovirt.engine.core.utils.log.Log log ) { javax.naming.InitialContext ctx = null ; try { ctx = new javax.naming.InitialContext ( ) ; return ( ( org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler ) ( ctx.lookup ( org.ovirt.engine.core.bll.utils.BackendUtils.BACKEND_COMMAND_OBJECTS_HANDLER_JNDI_NAME ) ) ) ; } catch ( javax.naming.NamingException e ) { log.error ( ( "Getting backend command objects handler failed" + ( e.getMessage ( ) ) ) ) ; log.debug ( "" , e ) ; return null ; } finally { org.ovirt.engine.core.bll.utils.BackendUtils.closeContext ( log , ctx ) ; } }

Target:
public static org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler getBackendCommandObjectsHandler ( org.slf4j.Logger log ) { javax.naming.InitialContext ctx = null ; try { ctx = new javax.naming.InitialContext ( ) ; return ( ( org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler ) ( ctx.lookup ( org.ovirt.engine.core.bll.utils.BackendUtils.BACKEND_COMMAND_OBJECTS_HANDLER_JNDI_NAME ) ) ) ; } catch ( javax.naming.NamingException e ) { log.error ( "Getting backend command objects handler failed: {}" , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; return null ; } finally { org.ovirt.engine.core.bll.utils.BackendUtils.closeContext ( log , ctx ) ; } }
Source:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public 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:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.VDS server ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters nonOpParams = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( server.getId ( ) , org.ovirt.engine.core.common.businessentities.NonOperationalReason.GLUSTER_COMMAND_FAILED , java.util.Collections.singletonMap ( GlusterConstants.COMMAND , "gluster peer status" ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , nonOpParams , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
private void setNonOperational ( org.ovirt.engine.core.common.businessentities.VDS server ) { org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters nonOpParams = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( server.getId ( ) , org.ovirt.engine.core.common.businessentities.NonOperationalReason.GLUSTER_COMMAND_FAILED , java.util.Collections.singletonMap ( GlusterConstants.COMMAND , "gluster peer status" ) ) ; backend.runInternalAction ( VdcActionType.SetNonOperationalVds , nonOpParams , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
private void addAccessProtocols ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.AccessProtocol [ ] protocols ) { version.setAccessProtocols ( new org.ovirt.engine.api.model.AccessProtocols ( ) ) ; for ( org.ovirt.engine.api.model.AccessProtocol type : protocols ) { version.getAccessProtocols ( ) . getAccessProtocols ( ) . add ( type.value ( ) ) ; } }

Target:
private void addPermits ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.PermitType [ ] values ) { version.setPermits ( new org.ovirt.engine.api.model.Permits ( ) ) ; for ( org.ovirt.engine.api.model.PermitType permit : values ) { version.getPermits ( ) . getPermits ( ) . add ( map ( permit ) ) ; } }
Source:
boolean areRequiredNetworksAvailable ( final java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > vmNetworkInterfaces , final java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > allInterfacesForVds ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.List < java.lang.String > vmNetworkInterfacesStr = org.apache.commons.collections.ListUtils.transformedList ( vmNetworkInterfaces , org.ovirt.engine.core.bll.VdsSelector.toNetworkName ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.List < java.lang.String > vdsNetNames = org.apache.commons.collections.ListUtils.transformedList ( allInterfacesForVds , org.ovirt.engine.core.bll.VdsSelector.toNetworkName ) ; return vdsNetNames.containsAll ( vmNetworkInterfacesStr ) ; }

Target:
boolean areRequiredNetworksAvailable ( final java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > vmNetworkInterfaces , final java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > allInterfacesForVds ) { for ( final org.ovirt.engine.core.common.businessentities.VmNetworkInterface vmIf : vmNetworkInterfaces ) { boolean found = false ; for ( final org.ovirt.engine.core.common.businessentities.VdsNetworkInterface vdsIf : allInterfacesForVds ) { if ( org.apache.commons.lang.StringUtils.equals ( vmIf.getNetworkName ( ) , vdsIf.getNetworkName ( ) ) ) { found = true ; break ; } } if ( ! found ) { return false ; } } return true ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "Note" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ) ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( sender ) ) ; setNote ( entity.getNote ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "Note" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ) ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( sender ) ) ; setNote ( entity.getNote ( ) ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.VM map ( org.ovirt.engine.api.model.CdRom model , org.ovirt.engine.core.common.businessentities.VM template ) { org.ovirt.engine.core.common.businessentities.VM entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VM ( ) ; if ( ( model.isSetFile ( ) ) && ( model.getFile ( ) . isSetId ( ) ) ) { entity.getStaticData ( ) . setiso_path ( model.getFile ( ) . getId ( ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VM map ( org.ovirt.engine.api.model.CdRom model , org.ovirt.engine.core.common.businessentities.VM template ) { org.ovirt.engine.core.common.businessentities.VM entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VM ( ) ; if ( ( model.isSetFile ( ) ) && ( model.getFile ( ) . isSetId ( ) ) ) { entity.getStaticData ( ) . setIsoPath ( model.getFile ( ) . getId ( ) ) ; } return entity ; }
Source:
public static void GetHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }

Target:
public static void GetHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters ( id ) , aQuery ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertFalse ( model.isSetVm ( ) ) ; org.junit.Assert.assertTrue ( model.isSparse ( ) ) ; org.junit.Assert.assertTrue ( model.isPropagateErrors ( ) ) ; }

Target:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( model.isSetVm ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSparse ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isPropagateErrors ( ) ) ; }
Source:
public void addISCSINonEmptyIqn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; parameters.setStoragePoolId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . InitializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.VALIDATION_STORAGE_CONNECTION_EMPTY_IQN ) ; }

Target:
public void addISCSIEmptyIqn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; parameters.setStoragePoolId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.VALIDATION_STORAGE_CONNECTION_EMPTY_IQN ) ; }
Source:
org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface createNetworkInSyncWithVdsNetworkInterface ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos = effectiveHostNetworkQos.getQos ( networkAttachment , network ) ; return new org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface ( nic , network , hostNetworkQos , ( networkAttachment == null ? null : networkAttachment.getIpConfiguration ( ) ) ) ; }

Target:
org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface createNetworkInSyncWithVdsNetworkInterface ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos = effectiveHostNetworkQos.getQos ( networkAttachment , network ) ; return new org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterface ( nic , network , hostNetworkQos , networkAttachment , cluster ) ; }
Source:
private static java.util.ArrayList < org.ovirt.engine.api.extensions.ExtMap > flatGroups ( org.ovirt.engine.api.extensions.ExtMap entity , org.ovirt.engine.api.extensions.ExtKey key , java.util.ArrayList < org.ovirt.engine.api.extensions.ExtMap > accumulator ) { for ( org.ovirt.engine.api.extensions.ExtMap group : entity.get ( key , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) { accumulator.add ( group ) ; org.ovirt.engine.core.sso.utils.SSOUtils.flatGroups ( group , Authz.GroupRecord.GROUPS , accumulator ) ; } return accumulator ; }

Target:
public static void sendJsonData ( javax.servlet.http.HttpServletResponse response , java.util.Map < java.lang.String , java.lang.Object > payload ) throws java.io.IOException { try ( java.io.OutputStream os = response.getOutputStream ( ) ) { java.lang.String jsonPayload = org.ovirt.engine.core.sso.utils.SSOUtils.getJson ( payload ) ; response.setContentType ( "application/json" ) ; response.setContentLength ( jsonPayload.length ( ) ) ; os.write ( jsonPayload.getBytes ( java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ) ; org.ovirt.engine.core.sso.utils.SSOUtils.log.trace ( "Sending json data {}" , jsonPayload ) ; } }
Source:
private void assertGetAllForStoragePoolCorrectResult ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.Assert.assertEquals ( "Wrong storage pool for VDS" , existingVds.getStoragePoolId ( ) , vds.getStoragePoolId ( ) ) ; } }

Target:
private void assertGetAllForStoragePoolCorrectResult ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result ) { org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.jupiter.api.Assertions.assertEquals ( existingVds.getStoragePoolId ( ) , vds.getStoragePoolId ( ) , "Wrong storage pool for VDS" ) ; } }
Source:
private void UpdateOptionsLocalFSData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetLocalStorageHost ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel clusterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; clusterGuideModel.localStorageHost = localStorageHost ; clusterGuideModel.UpdateOptionsLocalFS ( ) ; } } ) , dataCenter.getname ( ) ) ; }

Target:
private void updateOptionsLocalFSData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getLocalStorageHost ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel clusterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; clusterGuideModel.localStorageHost = localStorageHost ; clusterGuideModel.updateOptionsLocalFS ( ) ; } } ) , dataCenter.getname ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > snapshots = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( returnValue ) ) ; if ( snapshotModel.showWarningForByVmSnapshotsValidation ( snapshots ) ) { snapshotModel.getCommands ( ) . add ( getCloseCommand ( ) ) ; snapshotModel.StopProgress ( ) ; } else { snapshotModel.initVmDisks ( ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > snapshots = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( returnValue ) ) ; if ( snapshotModel.showWarningForByVmSnapshotsValidation ( snapshots ) ) { snapshotModel.getCommands ( ) . add ( getCloseCommand ( ) ) ; snapshotModel.stopProgress ( ) ; } else { snapshotModel.initVmDisks ( ) ; } }
Source:
public void useDefaultMTU ( ) { org.ovirt.engine.core.common.businessentities.network net = new org.ovirt.engine.core.common.businessentities.network ( ) ; net.setMtu ( 0 ) ; java.util.Set < javax.validation.ConstraintViolation < org.ovirt.engine.core.common.businessentities.network > > validate = validate ( net ) ; junit.framework.Assert.assertTrue ( ( ( validate.size ( ) ) == 0 ) ) ; }

Target:
public void invalidHighMTU ( ) { java.util.Set < javax.validation.ConstraintViolation < org.ovirt.engine.core.common.utils.MTUValidatorTest.MtuContainer > > validate = validate ( new org.ovirt.engine.core.common.utils.MTUValidatorTest.MtuContainer ( ( ( org.ovirt.engine.core.common.utils.MTUValidatorTest.TEST_MAX_MTU ) + 1 ) ) ) ; junit.framework.Assert.assertTrue ( ( ( validate.size ( ) ) > 0 ) ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent clickEvent ) { storageNameEditor.setEnabled ( ( ! ( storageNameEditor.isEnabled ( ) ) ) ) ; storageButton.setText ( ( storageNameEditor.isEnabled ( ) ? getConstants ( ) . closeText ( ) : getConstants ( ) . editText ( ) ) ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent clickEvent ) { storageNameEditor.setEnabled ( ( ! ( storageNameEditor.isEnabled ( ) ) ) ) ; storageButton.setText ( ( storageNameEditor.isEnabled ( ) ? org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostConfigureLocalStoragePopupView.constants.closeText ( ) : org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostConfigureLocalStoragePopupView.constants.editText ( ) ) ) ; }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { getView ( ) . rdpSelected ( event.getValue ( ) ) ; getView ( ) . spiceSelected ( ( ! ( event.getValue ( ) ) ) ) ; }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { getView ( ) . rdpSelected ( event.getValue ( ) ) ; getView ( ) . spiceSelected ( ( ! ( event.getValue ( ) ) ) ) ; getView ( ) . setWanOptionsVisible ( ( ( wanOptionsAvailable ) && ( ! ( event.getValue ( ) ) ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getIsoStorageModels ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > models = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localIsoModel ) ; addTypeToStorageModels ( StorageDomainType.ISO , models ) ; return models ; }

Target:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getIsoStorageModels ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > models = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel glusterStorageModel = new org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel ( ) ; models.add ( glusterStorageModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localIsoModel ) ; addTypeToStorageModels ( StorageDomainType.ISO , models ) ; return models ; }
Source:
private boolean diskShouldBeUnPlugged ( ) { return java.lang.Boolean.TRUE.equals ( ( ( ( org.ovirt.engine.core.bll.storage.disk.DetachDiskFromVmCommand.getParameters ( ) . isPlugUnPlug ( ) ) && ( vmDevice.getIsPlugged ( ) ) ) && ( ( org.ovirt.engine.core.bll.storage.disk.DetachDiskFromVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ) ) ; }

Target:
private boolean diskShouldBeUnPlugged ( ) { return java.lang.Boolean.TRUE.equals ( ( ( ( org.ovirt.engine.core.bll.storage.disk.DetachDiskFromVmCommand.getParameters ( ) . isPlugUnPlug ( ) ) && ( vmDevice.isPlugged ( ) ) ) && ( ( org.ovirt.engine.core.bll.storage.disk.DetachDiskFromVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ) ) ; }
Source:
private void setUpGetBallooningExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , true ) ; } }

Target:
protected void setUpGetPayloadExpectations ( int times ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmPayload payload = new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ; for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPayload , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , payload ) ; } }
Source:
private void createTestCommand ( ) { org.ovirt.engine.core.common.action.StorageDomainParametersBase parameters = new org.ovirt.engine.core.common.action.StorageDomainParametersBase ( ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBaseTest.TestStorageCommandBase ( parameters ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain createDataStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setStorageName ( name ) ; storageDomain.setStatus ( status ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; storageDomain.setId ( HE_SD_ID ) ; return storageDomain ; }
Source:
public void canDoActionThinProvisioningSpaceCheckFailsSize ( ) { final int availableSize = 4 ; final int usedSize = 6 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; org.ovirt.engine.core.common.businessentities.storage_domains domains = mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; mockStorageDomainSpaceChecker ( domains , false ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW.toString ( ) ) ) ; }

Target:
public void canDoActionThinProvisioningSpaceCheckFailsSize ( ) { final int availableSize = 4 ; final int usedSize = 6 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; org.ovirt.engine.core.common.businessentities.storage_domains domains = mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage_pool extractStoragePoolFromQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { org.ovirt.engine.core.common.businessentities.storage_pool storagePool ; org.ovirt.engine.core.common.businessentities.Quota quota = org.ovirt.engine.core.bll.quota.QuotaManager.getQuotaDAO ( ) . getById ( quotaId ) ; storagePool = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; storagePool.setId ( quota.getStoragePoolId ( ) ) ; storagePool.setQuotaEnforcementType ( quota.getQuotaEnforcementType ( ) ) ; return storagePool ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage_pool extractStoragePoolFromQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { org.ovirt.engine.core.common.businessentities.storage_pool storagePool ; org.ovirt.engine.core.common.businessentities.Quota quota = org.ovirt.engine.core.bll.quota.QuotaManager.getQuotaDAO ( ) . getById ( quotaId ) ; storagePool = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; if ( quota != null ) { storagePool.setId ( quota.getStoragePoolId ( ) ) ; storagePool.setQuotaEnforcementType ( quota.getQuotaEnforcementType ( ) ) ; } else { storagePool.setId ( Guid.Empty ) ; storagePool.setQuotaEnforcementType ( QuotaEnforcementTypeEnum.DISABLED ) ; } return storagePool ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { New ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { Edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newEntity ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }
Source:
public void testAddSupportedClusterFeature ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > previouslySupportedFeatures = dao.getSupportedFeaturesByClusterId ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_VDS_GROUP ) ; dao.addSupportedClusterFeature ( buildSupportedFeature ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.NEW_SUPPORTED_FEATURE_1 , org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_VDS_GROUP , true ) ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > supportedFeatures = dao.getSupportedFeaturesByClusterId ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_VDS_GROUP ) ; org.junit.Assert.assertThat ( supportedFeatures , org.hamcrest.Matchers.hasSize ( ( ( previouslySupportedFeatures.size ( ) ) + 1 ) ) ) ; }

Target:
public void testAddSupportedClusterFeature ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > previouslySupportedFeatures = dao.getSupportedFeaturesByClusterId ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_CLUSTER ) ; dao.addSupportedClusterFeature ( buildSupportedFeature ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.NEW_SUPPORTED_FEATURE_1 , org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_CLUSTER , true ) ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > supportedFeatures = dao.getSupportedFeaturesByClusterId ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_CLUSTER ) ; org.junit.Assert.assertThat ( supportedFeatures , org.hamcrest.Matchers.hasSize ( ( ( previouslySupportedFeatures.size ( ) ) + 1 ) ) ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.users.VdcUser loggedUser = loginModel.getLoggedUser ( ) ; frontend.setLoggedInUser ( loggedUser ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = ( ( java.lang.String ) ( loginModel.getPassword ( ) . getEntity ( ) ) ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getDbFacade ( ) . getQuotaDao ( ) . getAllRelevantQuotasForVdsGroup ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getEngineSessionSeqId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForVdsGroupQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRelevantQuotasForClusterQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForClusterQuery.getDbFacade ( ) . getQuotaDao ( ) . getAllRelevantQuotasForCluster ( org.ovirt.engine.core.bll.GetAllRelevantQuotasForClusterQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForClusterQuery.getEngineSessionSeqId ( ) , org.ovirt.engine.core.bll.GetAllRelevantQuotasForClusterQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
public static void GetDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }
Source:
public < T > T executeRead ( final java.lang.String procedureName , final org.springframework.jdbc.core.simple.ParameterizedRowMapper < T > mapper , final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource ) { java.util.List < T > results = executeReadList ( procedureName , mapper , parameterSource ) ; return results.isEmpty ( ) ? null : results.get ( 0 ) ; }

Target:
public < T > T executeRead ( final java.lang.String procedureName , final org.springframework.jdbc.core.RowMapper < T > mapper , final org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource ) { java.util.List < T > results = executeReadList ( procedureName , mapper , parameterSource ) ; return results.isEmpty ( ) ? null : results.get ( 0 ) ; }
Source:
public static org.ovirt.engine.core.common.users.VdcUser map ( org.ovirt.engine.core.common.businessentities.AdUser adUser , org.ovirt.engine.core.common.users.VdcUser template ) { org.ovirt.engine.core.common.users.VdcUser vdcUser = ( template != null ) ? template : new org.ovirt.engine.core.common.users.VdcUser ( ) ; vdcUser.setUserId ( adUser.getUserId ( ) ) ; vdcUser.setUserName ( adUser.getUserName ( ) ) ; vdcUser.setSurName ( adUser.getSurName ( ) ) ; vdcUser.setDomainControler ( adUser.getDomainControler ( ) ) ; return vdcUser ; }

Target:
public static org.ovirt.engine.core.common.users.VdcUser map ( org.ovirt.engine.core.common.businessentities.LdapUser adUser , org.ovirt.engine.core.common.users.VdcUser template ) { org.ovirt.engine.core.common.users.VdcUser vdcUser = ( template != null ) ? template : new org.ovirt.engine.core.common.users.VdcUser ( ) ; vdcUser.setUserId ( adUser.getUserId ( ) ) ; vdcUser.setUserName ( adUser.getUserName ( ) ) ; vdcUser.setSurName ( adUser.getSurName ( ) ) ; vdcUser.setDomainControler ( adUser.getDomainControler ( ) ) ; return vdcUser ; }
Source:
public void testGetDefaultPool ( ) { final org.ovirt.engine.core.common.businessentities.MacPool defaultPool = dao.getDefaultPool ( ) ; org.junit.Assert.assertThat ( defaultPool , org.hamcrest.CoreMatchers.notNullValue ( ) ) ; org.junit.Assert.assertThat ( defaultPool.getId ( ) , org.hamcrest.CoreMatchers.is ( FixturesTool.DEFAULT_MAC_POOL_ID ) ) ; org.junit.Assert.assertThat ( defaultPool.isDefaultPool ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testGetDefaultPool ( ) { final org.ovirt.engine.core.common.businessentities.MacPool defaultPool = dao.getDefaultPool ( ) ; org.hamcrest.MatcherAssert.assertThat ( defaultPool , org.hamcrest.CoreMatchers.notNullValue ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( defaultPool.getId ( ) , org.hamcrest.CoreMatchers.is ( FixturesTool.DEFAULT_MAC_POOL_ID ) ) ; org.hamcrest.MatcherAssert.assertThat ( defaultPool.isDefaultPool ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
private void newVm ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) != null ) { return ; } java.util.List < org.ovirt.engine.ui.uicommonweb.UICommand > commands = new java.util.ArrayList < > ( ) ; commands.add ( org.ovirt.engine.ui.uicommonweb.UICommand.createDefaultOkUiCommand ( "OnSave" , this ) ) ; commands.add ( org.ovirt.engine.ui.uicommonweb.UICommand.createCancelUiCommand ( "Cancel" , this ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ( new org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ( ) , this ) ; setupNewVmModel ( model , VmType.Server , getSystemTreeSelectedItem ( ) , commands ) ; }

Target:
private void newVm ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) != null ) { return ; } java.util.List < org.ovirt.engine.ui.uicommonweb.UICommand > commands = new java.util.ArrayList < > ( ) ; commands.add ( org.ovirt.engine.ui.uicommonweb.UICommand.createDefaultOkUiCommand ( "OnSave" , this ) ) ; commands.add ( org.ovirt.engine.ui.uicommonweb.UICommand.createCancelUiCommand ( "Cancel" , this ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ( new org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ( ) , this ) ; setupNewVmModel ( model , VmType.Server , getSystemTreeSelectedItem ( ) , commands ) ; model.initForemanProviders ( null ) ; }