auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void GetPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByAdElementIdParameters ( userId ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public static void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskImage ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) , vmId ) ; }

Target:
public void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }
Source:
private org.ovirt.engine.api.model.NIC clone ( org.ovirt.engine.api.model.NIC parent ) { org.ovirt.engine.api.model.NIC nic = new org.ovirt.engine.api.model.NIC ( ) ; nic.setId ( parent.getId ( ) ) ; nic.setVm ( new org.ovirt.engine.api.model.VM ( ) ) ; nic.getVm ( ) . setId ( parent.getVm ( ) . getId ( ) ) ; return nic ; }

Target:
private org.ovirt.engine.api.model.Nic clone ( org.ovirt.engine.api.model.Nic parent ) { org.ovirt.engine.api.model.Nic nic = new org.ovirt.engine.api.model.Nic ( ) ; nic.setId ( parent.getId ( ) ) ; nic.setVm ( new org.ovirt.engine.api.model.VM ( ) ) ; nic.getVm ( ) . setId ( parent.getVm ( ) . getId ( ) ) ; return nic ; }
Source:
private org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister createHostNetworkAttachmentsPersister ( org.ovirt.engine.core.common.businessentities.VDS host , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks , org.ovirt.engine.core.common.vdscommands.UserConfiguredNetworkData userConfiguredData ) { if ( userConfiguredData.isLegacyMode ( ) ) { return new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister ( networkAttachmentDao , host.getId ( ) , host.getInterfaces ( ) , userConfiguredData.getCustomPropertiesForVdsNetworkInterface ( ) , userConfiguredData.getNetworkAttachments ( ) , clusterNetworks ) ; } else { return new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister ( networkAttachmentDao , host.getId ( ) , host.getInterfaces ( ) , userConfiguredData.getNetworkAttachments ( ) , clusterNetworks ) ; } }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister createHostNetworkAttachmentsPersister ( org.ovirt.engine.core.common.businessentities.VDS host , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks , org.ovirt.engine.core.common.vdscommands.UserConfiguredNetworkData userConfiguredData ) { return new org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister ( networkAttachmentDao , host.getId ( ) , host.getInterfaces ( ) , userConfiguredData.getNetworkAttachments ( ) , userConfiguredData.getRemovedNetworkAttachments ( ) , clusterNetworks ) ; }
Source:
public void testGetLunsToUpdateInDbDiffLunIdSamePvId ( ) { org.ovirt.engine.core.compat.Guid pvID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.Map < org.ovirt.engine.core.bll.storage.domain.SyncLunsInfoForBlockStorageDomainCommand.LunHandler , java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > > lunsToUpdateInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , pvID , pvID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = lunsToUpdateInDb.get ( command.saveLunsHandler ) ; org.junit.Assert.assertEquals ( java.util.stream.Stream.of ( command.saveLunsHandler , command.removeLunsHandler ) . collect ( java.util.stream.Collectors.toSet ( ) ) , lunsToUpdateInDb.keySet ( ) ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }

Target:
public void testGetLunsToUpdateInDbDiffLunIdSamePvId ( ) { org.ovirt.engine.core.compat.Guid pvID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.Map < org.ovirt.engine.core.bll.storage.domain.SyncLunsInfoForBlockStorageDomainCommand.LunHandler , java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > > lunsToUpdateInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , pvID , pvID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = lunsToUpdateInDb.get ( command.saveLunsHandler ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.util.stream.Stream.of ( command.saveLunsHandler , command.removeLunsHandler ) . collect ( java.util.stream.Collectors.toSet ( ) ) , lunsToUpdateInDb.keySet ( ) ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }
Source:
protected void executeCommand ( ) { boolean succeeded = false ; try { succeeded = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( getVds ( ) , getVdsGroup ( ) . isEnableBallooning ( ) , getVdsGroup ( ) . isEnableKsm ( ) , getVdsGroup ( ) . isKsmMergeAcrossNumaNodes ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}': {}" , getVdsName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } getReturnValue ( ) . setSucceeded ( succeeded ) ; }

Target:
protected void executeCommand ( ) { boolean succeeded = false ; try { succeeded = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( getVds ( ) , getVdsGroup ( ) . isEnableBallooning ( ) , getVdsGroup ( ) . isEnableKsm ( ) , getVdsGroup ( ) . isKsmMergeAcrossNumaNodes ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.error ( "Could not update MoM policy on host '{}': {}" , getVdsName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } getReturnValue ( ) . setSucceeded ( succeeded ) ; }
Source:
public static boolean isLastSuperUserGroup ( org.ovirt.engine.core.compat.Guid groupId ) { boolean retValue = false ; java.util.List < org.ovirt.engine.core.common.businessentities.Permission > permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForRole ( PredefinedRoles.SUPER_USER.getId ( ) ) ; if ( ( permissions.size ( ) ) <= 1 ) { permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDAO ( ) . getAllForAdElement ( groupId ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissions ) { if ( permission.getRoleId ( ) . equals ( PredefinedRoles.SUPER_USER.getId ( ) ) ) { retValue = true ; break ; } } } return retValue ; }

Target:
public static boolean isLastSuperUserGroup ( org.ovirt.engine.core.compat.Guid groupId ) { boolean retValue = false ; java.util.List < org.ovirt.engine.core.common.businessentities.Permission > permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDao ( ) . getAllForRole ( PredefinedRoles.SUPER_USER.getId ( ) ) ; if ( ( permissions.size ( ) ) <= 1 ) { permissions = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getPermissionDao ( ) . getAllForAdElement ( groupId ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissions ) { if ( permission.getRoleId ( ) . equals ( PredefinedRoles.SUPER_USER.getId ( ) ) ) { retValue = true ; break ; } } } return retValue ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "(status = " + ( getStatus ( ) ) ) + ", result = " ) + ( getResult ( ) ) ) + ", exception = " ) + ( getException ( ) ) ) + ", message = " ) + ( getMessage ( ) ) ) + ")" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "status" , getStatus ( ) ) . append ( "result" , getResult ( ) ) . append ( "exception" , getException ( ) ) . append ( "message" , getMessage ( ) ) . build ( ) ; }
Source:
public void migrationNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . migrationSupportedForArch ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.MIGRATION_ON_ERROR_IS_NOT_SUPPORTED ) ) ; }

Target:
public void migrationNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.MIGRATION_ON_ERROR_IS_NOT_SUPPORTED ) ) ; }
Source:
public org.ovirt.engineextensions.aaa.ldap.LDAPConnectionPool getConnectionPool ( java.lang.String name ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "getConnectionPool Entry name='{}'" , name ) ; org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry entry = connectionPools.get ( name ) ; if ( entry == null ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "No connection pool '%s'" , name ) ) ; } return entry.connectionPool ; }

Target:
public org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry getConnectionPoolEntry ( java.lang.String name , java.util.Map < java.lang.String , java.lang.Object > vars ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "getConnectionPoolEntry Entry name='{}'" , name ) ; org.ovirt.engineextensions.aaa.ldap.Framework.ConnectionPoolEntry entry = connectionPools.get ( name ) ; if ( entry == null ) { entry = createConnectionPoolEntry ( name , vars ) ; connectionPools.put ( entry.name , entry ) ; } return entry ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( "OnSave" . equals ( lastExecutedCommand.getName ( ) ) ) { return nextRunProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( ( source.getConfirmWindow ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.vms.VmNextRunConfigurationModel ) { return nextRunProvider.get ( ) ; } else if ( "OnSave" . equals ( lastExecutedCommand.getName ( ) ) ) { return defaultPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public void testIsNetworkInSyncWhenBootProtocolDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocol ( false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4BootProtocolDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocol ( false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public static void GetDiskMaxSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxBlockDiskSize , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void isAnyHostUpInCluster ( 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 ) { if ( ( source != null ) && ( ( ( ( java.util.List ) ( source ) ) . size ( ) ) > 0 ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetUpHostListByCluster ( aQuery , clusterName , 1 ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterSnapshotInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName , java.lang.String snapshotName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.info" ) . withOptionalParameter ( "snapName" , snapshotName ) . withOptionalParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , volumeName , response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc glusterVolumeSnapshotConfigGet ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.configList" ) . withOptionalParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc ( clusterId , response ) ; }
Source:
public static < S > java.lang.String marshall ( java.lang.Class < S > clz , S obj ) { try { return org.ovirt.engine.sdk.utils.SerializationHelper.marshall ( new javax.xml.bind.JAXBElement < S > ( new javax.xml.namespace.QName ( "" , clz.getSimpleName ( ) . toLowerCase ( ) ) , clz , null , obj ) ) ; } catch ( javax.xml.bind.JAXBException e ) { throw new org.ovirt.engine.sdk.exceptions.MarshallingException ( e ) ; } }

Target:
public static < S > java.lang.String marshall ( java.lang.Class < S > clz , S obj ) { try { javax.xml.bind.JAXBElement < S > element = org.ovirt.engine.sdk.utils.SerializationHelper.getElement ( clz , obj ) ; if ( element != null ) return org.ovirt.engine.sdk.utils.SerializationHelper.marshall ( element ) ; throw new org.ovirt.engine.sdk.exceptions.MarshallingException ( ( ( "Coresponding JAXBElement for \"" + ( clz.getSimpleName ( ) ) ) + "\" is not found." ) ) ; } catch ( javax.xml.bind.JAXBException e ) { throw new org.ovirt.engine.sdk.exceptions.MarshallingException ( e ) ; } }
Source:
private void assertQueryDaoCall ( boolean isDirectOnly ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getObjectId ( ) ) . thenReturn ( objectID ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getDirectOnly ( ) ) . thenReturn ( isDirectOnly ) ; org.mockito.Mockito.when ( getQuery ( ) . getEngineSessionSeqId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.UNPRIVILEGED_USER_SESSION_ID ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertEquals ( "Wrong permissions returned from the query" , mockedPermissions , result ) ; }

Target:
private void assertQueryDaoCall ( boolean isDirectOnly ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getObjectId ( ) ) . thenReturn ( objectID ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getDirectOnly ( ) ) . thenReturn ( isDirectOnly ) ; org.mockito.Mockito.when ( getQuery ( ) . getEngineSessionSeqId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.UNPRIVILEGED_USER_SESSION_ID ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( mockedPermissions , result , "Wrong permissions returned from the query" ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec , java.lang.String connectionAction , java.util.Map < java.lang.String , java.lang.String > params ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec , connectionAction , params ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc getHostJobs ( java.lang.String jobType , java.util.List < java.lang.String > jobIds ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getHostJobs ( jobType , jobIds ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void clusterChanged ( ) { org.mockito.Mockito.when ( oldHost.getClusterId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( host.getClusterId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( validator.clusterNotChanged ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_CANNOT_UPDATE_CLUSTER ) ) ; }

Target:
public void clusterChanged ( ) { org.mockito.Mockito.when ( oldHost.getClusterId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( host.getClusterId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.clusterNotChanged ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_CANNOT_UPDATE_CLUSTER ) ) ; }
Source:
public 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 ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
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 GetGlusterHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress , java.lang.String rootPassword , java.lang.String fingerprint ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters ( hostAddress , rootPassword ) ; parameters.setFingerprint ( fingerprint ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServers , parameters , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeSnapshotCreate ( volumeName , snapshotName , description , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterSnapshotActivate ( java.lang.String snapshotName , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterSnapshotActivate ( snapshotName , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { plusButton.addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { object.getAddLine ( ) . Execute ( ) ; } } ) ; minusButton.addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { object.getRemoveLine ( ) . Execute ( ) ; } } ) ; org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget.Driver.driver.edit ( object ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { plusButton.addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { object.getAddLine ( ) . Execute ( ) ; } } ) ; minusButton.addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { object.getRemoveLine ( ) . Execute ( ) ; } } ) ; driver.edit ( object ) ; }
Source:
private org.ovirt.engine.sdk.entities.API getEntryPoint ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException , org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError { java.lang.String entryPointXML = this . proxy.get ( this . proxy.getRoot ( ) ) ; if ( ( entryPointXML != null ) && ( ! ( entryPointXML.equals ( "" ) ) ) ) { return org.ovirt.engine.sdk.utils.SerializationHelper.unmarshall ( org.ovirt.engine.sdk.entities.API.class , entryPointXML ) ; } throw new org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError ( ) ; }

Target:
private org.ovirt.engine.sdk.entities.Api getEntryPoint ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException , org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError { java.lang.String entryPointXML = this . proxy.get ( this . proxy.getRoot ( ) ) ; if ( ( entryPointXML != null ) && ( ! ( entryPointXML.equals ( "" ) ) ) ) { return org.ovirt.engine.sdk.utils.SerializationHelper.unmarshall ( org.ovirt.engine.sdk.entities.Api.class , entryPointXML ) ; } throw new org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError ( ) ; }
Source:
public static void serialize ( com.google.gwt.user.client.rpc.SerializationStreamWriter writer , org.ovirt.engine.core.aaa.DirectoryGroup group ) throws com.google.gwt.user.client.rpc.SerializationException { writer.writeObject ( group.getDirectoryName ( ) ) ; writer.writeObject ( group.getNamespace ( ) ) ; writer.writeObject ( group.getId ( ) ) ; writer.writeString ( group.getName ( ) ) ; }

Target:
public static void serialize ( com.google.gwt.user.client.rpc.SerializationStreamWriter writer , org.ovirt.engine.core.aaa.DirectoryGroup group ) throws com.google.gwt.user.client.rpc.SerializationException { writer.writeObject ( group.getDirectoryName ( ) ) ; writer.writeObject ( group.getNamespace ( ) ) ; writer.writeObject ( group.getId ( ) ) ; writer.writeString ( group.getName ( ) ) ; writer.writeString ( group.getDisplayName ( ) ) ; }
Source:
public void addMethod ( org.ovirt.api.metamodel.concepts.Method action ) { methods.add ( action ) ; }

Target:
public org.ovirt.api.metamodel.concepts.Method getMethod ( org.ovirt.api.metamodel.concepts.Name name ) { for ( org.ovirt.api.metamodel.concepts.Method method : methods ) { if ( java.util.Objects.equals ( method.getName ( ) , name ) ) { return method ; } } if ( ( base ) != null ) { return base.getMethod ( name ) ; } return null ; }
Source:
protected boolean validateSpaceRequirements ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > sdImageEntry : storageToDisksMap.entrySet ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain destStorageDomain = destStorages.get ( sdImageEntry.getKey ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList = sdImageEntry.getValue ( ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator storageDomainValidator = createStorageDomainValidator ( destStorageDomain ) ; if ( ( ! ( validateDomainsThreshold ( storageDomainValidator ) ) ) || ( ! ( validateFreeSpace ( storageDomainValidator , disksList ) ) ) ) { return false ; } } return true ; }

Target:
protected boolean validateFreeSpace ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = org.ovirt.engine.core.bll.ImagesHandler.getDisksDummiesForStorageAllocations ( disksList ) ; return validate ( storageDomainValidator.hasSpaceForNewDisks ( disks ) ) ; }
Source:
void initComboBox ( ) { sysPrepDomainNameListBoxEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( ) ; sysPrepDomainNameTextBoxEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxEditor ( ) ; sysPrepDomainNameComboBox = new org.ovirt.engine.ui.common.widget.ComboBox ( sysPrepDomainNameListBoxEditor , sysPrepDomainNameTextBoxEditor ) ; defaultHostEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( object ) ) . getName ( ) ; } } ) ; }

Target:
public void onFocus ( com.google.gwt.event.dom.client.FocusEvent event ) { sysPrepDomainNameListBoxEditor.asListBox ( ) . setSelectedIndex ( ( - 1 ) ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS p ) { return ( ( ( p.getUsageCpuPercent ( ) ) + ( calcSpmCpuConsumption ( p ) ) ) < highVdsCount ) && ( ( p.getUsageCpuPercent ( ) ) > lowUtilization ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondaryDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long notEnoughMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.LOW_MEMORY_LIMIT_FOR_OVER_UTILIZED ) ) : 0L ; long tooMuchMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) : 0L ; return getNormallyUtilizedMemoryHosts ( candidateHosts , notEnoughMemory , tooMuchMemory ) ; }
Source:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , 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 canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmInUpPausedDownStatus ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmNotInPreviewSnapshot ( ) ) ; }

Target:
protected boolean canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmInUpPausedDownStatus ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmNotInPreviewSnapshot ( ) ) ) && ( imageStorageValidation ( ) ) ; }
Source:
public void removeRole ( ) { runAsSuperAdmin ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase action = backend.RunAction ( VdcActionType.RemoveRole , sessionize ( new org.ovirt.engine.core.common.action.RolesParameterBase ( org.ovirt.engine.core.itests.RoleActionGroupsTest.roleId ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > groups = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getRoleGroupMapDAO ( ) . getAllForRole ( org.ovirt.engine.core.itests.RoleActionGroupsTest.roleId ) ; junit.framework.Assert.assertTrue ( ( ( groups == null ) || ( groups.isEmpty ( ) ) ) ) ; }

Target:
public void removeRole ( ) { runAsSuperAdmin ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase action = backend.RunAction ( VdcActionType.RemoveRole , sessionize ( new org.ovirt.engine.core.common.action.RolesParameterBase ( org.ovirt.engine.core.itests.RoleActionGroupsTest.roleId ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > groups = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getRoleGroupMapDao ( ) . getAllForRole ( org.ovirt.engine.core.itests.RoleActionGroupsTest.roleId ) ; junit.framework.Assert.assertTrue ( ( ( groups == null ) || ( groups.isEmpty ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase Login ( java.lang.String userName , java.lang.String password , java.lang.String domain , org.ovirt.engine.core.common.action.VdcActionType loginType ) { org.ovirt.engine.core.common.action.LoginUserParameters params = new org.ovirt.engine.core.common.action.LoginUserParameters ( userName , password , domain , null , null , null ) ; params.setSessionId ( getSessionId ( ) ) ; params.setActionType ( loginType ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = getBackend ( ) . login ( params ) ; return returnValue ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase Login ( java.lang.String userName , java.lang.String password , java.lang.String profileName , org.ovirt.engine.core.common.action.VdcActionType loginType ) { org.ovirt.engine.core.common.action.LoginUserParameters params = new org.ovirt.engine.core.common.action.LoginUserParameters ( profileName , userName , password ) ; params.setSessionId ( getSessionId ( ) ) ; params.setActionType ( loginType ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = getBackend ( ) . login ( params ) ; return returnValue ; }
Source:
public void testGetUserID ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; org.mockito.Mockito.when ( user.getId ( ) ) . thenReturn ( Guid.EVERYONE ) ; java.lang.String session = org.jgroups.util.UUID.randomUUID ( ) . toString ( ) ; org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . setUser ( session , user ) ; org.ovirt.engine.core.common.queries.VdcQueryParametersBase params = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( session ) ; params.setRefresh ( false ) ; org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery query = new org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery ( params ) ; org.junit.Assert.assertEquals ( "wrong guid" , Guid.EVERYONE , query.getUserID ( ) ) ; }

Target:
public void testGetUserID ( ) { org.mockito.Mockito.when ( mockDbUser.getId ( ) ) . thenReturn ( Guid.EVERYONE ) ; java.lang.String session = org.jgroups.util.UUID.randomUUID ( ) . toString ( ) ; org.mockito.Mockito.when ( mockSessionDataContainer.getUser ( session , false ) ) . thenReturn ( mockDbUser ) ; org.ovirt.engine.core.common.queries.VdcQueryParametersBase params = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( session ) ; params.setRefresh ( false ) ; org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery query = new org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery ( params ) ; org.junit.Assert.assertEquals ( "wrong guid" , Guid.EVERYONE , query.getUserID ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VmDevice createVMDevice ( org.ovirt.engine.core.compat.Guid vmID , org.ovirt.engine.core.common.businessentities.DiskImage disk ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getImageId ( ) , vmID ) , VmDeviceType.DISK.getName ( ) , VmDeviceType.DISK.getName ( ) , "" , 1 , null , true , true , true , "" ) ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmDevice createVMDevice ( org.ovirt.engine.core.compat.Guid vmID , org.ovirt.engine.core.common.businessentities.DiskImage disk ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getImageId ( ) , vmID ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 1 , null , true , true , true , "" , null ) ; }
Source:
public void testIncompleteMove ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.move ( new org.ovirt.engine.api.model.Action ( ) ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "move" , "storageDomain.id|name" ) ; } }

Target:
public void testIncompleteMove ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { resource.move ( new org.ovirt.engine.api.model.Action ( ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "move" , "storageDomain.id|name" ) ; } }
Source:
public void setSpmPriority ( java.lang.String spmPriority ) { if ( ( ( this . spmPriority ) == null ) || ( ! ( this . spmPriority.equals ( spmPriority ) ) ) ) { this . spmPriority = spmPriority ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SpmPriority" ) ) ; } }

Target:
public void setSpmPriority ( java.lang.String spmPriority ) { if ( ( ( this . spmPriority ) == null ) || ( ! ( this . spmPriority.equals ( spmPriority ) ) ) ) { this . spmPriority = spmPriority ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SpmPriority" ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn allocateVolume ( java.lang.String spUUID , java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String size ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.allocate" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "size" , size ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn glusterVolumeResetBrickStart ( java.lang.String volumeName , java.lang.String existingBrickDir ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.resetBrickStart" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "existingBrick" , existingBrickDir ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getSourceDomainId ( ) ) ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > ) ( qRetVal.getSucceeded ( ) ? qRetVal.getReturnValue ( ) : java.util.Collections.emptyList ( ) ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( org.ovirt.engine.core.bll.ImportVmCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.ImportVmCommand.getParameters ( ) . getSourceDomainId ( ) ) ) ; return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > ) ( qRetVal.getSucceeded ( ) ? qRetVal.getReturnValue ( ) : java.util.Collections.emptyList ( ) ) ) ; }