auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > createMigrateVmToServerParametersList ( java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > vmsToMigrate , final org.ovirt.engine.core.common.businessentities.VDS vds ) { return org.ovirt.engine.core.utils.linq.LinqUtils.foreach ( vmsToMigrate , new org.ovirt.engine.core.utils.linq.Function < org.ovirt.engine.core.common.businessentities.VmStatic , org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase eval ( org.ovirt.engine.core.common.businessentities.VmStatic vm ) { org.ovirt.engine.core.common.action.MigrateVmToServerParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmToServerParameters ( false , vm.getId ( ) , vds.getId ( ) ) ; parameters.setShouldBeLogged ( false ) ; return parameters ; } } ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > createMigrateVmToServerParametersList ( java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > vmsToMigrate , final org.ovirt.engine.core.common.businessentities.VDS vds ) { return org.ovirt.engine.core.utils.linq.LinqUtils.transformToList ( vmsToMigrate , new org.ovirt.engine.core.utils.linq.Function < org.ovirt.engine.core.common.businessentities.VmStatic , org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase eval ( org.ovirt.engine.core.common.businessentities.VmStatic vm ) { org.ovirt.engine.core.common.action.MigrateVmToServerParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmToServerParameters ( false , vm.getId ( ) , vds.getId ( ) ) ; parameters.setShouldBeLogged ( false ) ; return parameters ; } } ) ; }
Source:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.EventSubscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , org.ovirt.engine.core.common.EventNotificationMethod eventNotificationMethod ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.EventSubscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getSubscriberId ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getEventUpName ( ) , eventName ) ) ) && ( ( eventSubscriber.getEventNotificationMethod ( ) ) == eventNotificationMethod ) ) { retval = true ; break ; } } return retval ; }

Target:
private static boolean isAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.EventSubscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , org.ovirt.engine.core.common.EventNotificationMethod eventNotificationMethod ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.EventSubscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getSubscriberId ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getEventUpName ( ) , eventName ) ) ) && ( ( eventSubscriber.getEventNotificationMethod ( ) ) == eventNotificationMethod ) ) { retval = true ; break ; } } return retval ; }
Source:
protected void endWithFailure ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . isImportEntity ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.unLockImage ( ) ; } if ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getAddImageDomainMapping ( ) ) { org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMapId ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; } revertTasks ( ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . isImportEntity ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.unLockImage ( ) ; } if ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getAddImageDomainMapping ( ) ) { imageStorageDomainMapDao.remove ( new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMapId ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; } revertTasks ( ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.setSucceeded ( true ) ; }
Source:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getStorageDoaminsByDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks , boolean isFillStorageTodDiskMap ) { java.util.Set < org.ovirt.engine.core.compat.Guid > domainsList = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; if ( disks != null ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { domainsList.addAll ( disk.getstorage_ids ( ) ) ; if ( isFillStorageTodDiskMap ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : disk.getstorage_ids ( ) ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( storageDomainId , disk , storageToDisksMap ) ; } } } } return domainsList ; }

Target:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getStorageDoaminsByDisks ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks , boolean isFillStorageTodDiskMap ) { java.util.Set < org.ovirt.engine.core.compat.Guid > domainsList = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; if ( disks != null ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { domainsList.addAll ( disk.getStorageIds ( ) ) ; if ( isFillStorageTodDiskMap ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : disk.getStorageIds ( ) ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( storageDomainId , disk , storageToDisksMap ) ; } } } } return domainsList ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( object.getReadOnly ( ) ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.constants.readOnly ( ) ) ; } return null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getDiskVmElements ( ) . size ( ) ) == 1 ) { return object.getDiskVmElements ( ) . iterator ( ) . next ( ) . isReadOnly ( ) ? com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.constants.readOnly ( ) ) : null ; } return null ; }
Source:
public void testSetStatusForNonRequiredNetworkAlreadyOperational ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; org.mockito.Mockito.verify ( networkClusterDao , org.mockito.Mockito.never ( ) ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; }

Target:
public void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.Matchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
Source:
public static void GetAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void GetPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
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.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volName" , 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.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
public void testMemoryMapping ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( Guid.Empty ) ; vds.setphysical_mem_mb ( 4000 ) ; org.ovirt.engine.api.model.Host host = org.ovirt.engine.api.restapi.types.HostMapper.map ( vds , ( ( org.ovirt.engine.api.model.Host ) ( null ) ) ) ; assertNotNull ( host.getMemory ( ) ) ; assertEquals ( new java.lang.Long ( host.getMemory ( ) ) , new java.lang.Long ( 4194304000L ) ) ; }

Target:
public void testMemoryMapping ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( Guid.Empty ) ; vds.setPhysicalMemMb ( 4000 ) ; org.ovirt.engine.api.model.Host host = org.ovirt.engine.api.restapi.types.HostMapper.map ( vds , ( ( org.ovirt.engine.api.model.Host ) ( null ) ) ) ; assertNotNull ( host.getMemory ( ) ) ; assertEquals ( new java.lang.Long ( host.getMemory ( ) ) , new java.lang.Long ( 4194304000L ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.hosts.MoveHost object ) { if ( ! ( object.isMultiSelection ( ) ) ) table.setSelectionModel ( new com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; driver.edit ( object ) ; table.asEditor ( ) . edit ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.hosts.MoveHost object ) { if ( ! ( object.isMultiSelection ( ) ) ) { table.setSelectionModel ( new com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; table.addSelectionChangeHandler ( ) ; } driver.edit ( object ) ; table.asEditor ( ) . edit ( object ) ; }
Source:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeBrickListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel ( ) ) ; setDetailModels ( list ) ; }

Target:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; setBrickListModel ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeBrickListModel ( ) ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel ( ) ) ; list.add ( getBrickListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
protected void postConstruct ( ) { setVmId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVmId ( ) ) ; setVmName ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVmName ( ) ) ; setVdsId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getProxyHostId ( ) ) ; setStoragePoolId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getDataCenterId ( ) ) ; }

Target:
protected void init ( ) { setVmName ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVmName ( ) ) ; setVdsId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getProxyHostId ( ) ) ; setVdsGroupId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVdsGroupId ( ) ) ; setStoragePoolId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getStoragePoolId ( ) ) ; setStorageDomainId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getStorageDomainId ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.UserProfile mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.UserProfile entity = new org.ovirt.engine.core.common.businessentities.UserProfile ( ) ; entity.setId ( getGuidDefaultEmpty ( rs , "profile_id" ) ) ; entity.setUserId ( getGuidDefaultEmpty ( rs , "user_id" ) ) ; entity.setSshPublicKey ( rs.getString ( "ssh_public_key" ) ) ; entity.setLoginName ( rs.getString ( "login_name" ) ) ; entity.setUserPortalVmLoginAutomatically ( rs.getBoolean ( "user_portal_vm_auto_login" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.UserProfile mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.UserProfile entity = new org.ovirt.engine.core.common.businessentities.UserProfile ( ) ; entity.setId ( getGuidDefaultEmpty ( rs , "profile_id" ) ) ; entity.setUserId ( getGuidDefaultEmpty ( rs , "user_id" ) ) ; entity.setSshPublicKeyId ( getGuidDefaultEmpty ( rs , "ssh_public_key_id" ) ) ; entity.setSshPublicKey ( rs.getString ( "ssh_public_key" ) ) ; entity.setLoginName ( rs.getString ( "login_name" ) ) ; entity.setUserPortalVmLoginAutomatically ( rs.getBoolean ( "user_portal_vm_auto_login" ) ) ; return entity ; }
Source:
protected void configure ( ) { bind ( org.ovirt.engine.ui.userportal.widget.basic.ConsoleUtils.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemMessagesTranslator.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.section.login.presenter.ConnectAutomaticallyProvider.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.utils.ConsoleManager.class ) . in ( com.google.inject.Singleton.class ) ; }

Target:
protected void configure ( ) { bind ( org.ovirt.engine.ui.common.utils.ConsoleUtils.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.widget.basic.MainTabBasicListItemMessagesTranslator.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.section.login.presenter.ConnectAutomaticallyProvider.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.utils.ConsoleManager.class ) . in ( com.google.inject.Singleton.class ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections getStorageServerConnection ( java.lang.String id ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( VdcQueryType.GetStorageServerConnectionById , new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ) ; if ( ( result.getSucceeded ( ) ) && ( ( result.getReturnValue ( ) ) != null ) ) { return ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( result.getReturnValue ( ) ) ) ; } throw new org.ovirt.engine.api.restapi.resource.WebFaultException ( null , ( ( "Can't find storage server connection for id '" + id ) + "'." ) , javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections getStorageServerConnection ( java.lang.String id ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( QueryType.GetStorageServerConnectionById , new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ) ; if ( ( result.getSucceeded ( ) ) && ( ( result.getReturnValue ( ) ) != null ) ) { return ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( result.getReturnValue ( ) ) ) ; } throw new org.ovirt.engine.api.restapi.resource.WebFaultException ( null , ( ( "Can't find storage server connection for id '" + id ) + "'." ) , javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR ) ; }
Source:
public boolean validateAndSetQuota ( ) { if ( org.ovirt.engine.core.bll.RunVmOnceCommand.isInternalExecution ( ) ) { return true ; } boolean quotaAcc = super . validateAndSetQuota ( ) ; if ( ! quotaAcc ) { return false ; } if ( ! ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) { return quotaAcc ; } return org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.RunVmOnceCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.RunVmOnceCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
public boolean validateAndSetQuota ( ) { if ( org.ovirt.engine.core.bll.RunVmOnceCommand.isInternalExecution ( ) ) { return true ; } boolean quotaAcc = super . validateAndSetQuota ( ) ; if ( ! quotaAcc ) { return false ; } if ( ! ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) ) { return quotaAcc ; } return org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.RunVmOnceCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.RunVmOnceCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public boolean isStatusUp ( ) { return org.ovirt.engine.core.common.businessentities.VM.isStatusUp ( getstatus ( ) ) ; }

Target:
public double getDiskSize ( ) { if ( ( diskSize ) == 0 ) { for ( org.ovirt.engine.core.common.businessentities.Disk disk : getDiskMap ( ) . values ( ) ) { if ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) == ( disk.getDiskStorageType ( ) ) ) { diskSize += ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getsize ( ) ) / ( java.lang.Double.valueOf ( ( ( 1024 * 1024 ) * 1024 ) ) ) ; } } } return diskSize ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public static void getRoleList ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
private boolean removeMemoryVolumes ( java.lang.String memoryVolumes ) { org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters parameters = new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( memoryVolumes , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) ; parameters.setParentCommand ( getActionType ( ) ) ; parameters.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; parameters.setParentParameters ( getParameters ( ) ) ; return org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.RemoveMemoryVolumes , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( getExecutionContext ( ) ) ) . getSucceeded ( ) ; }

Target:
private boolean removeMemoryVolumes ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.RemoveMemoryVolumes , new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( snapshot.getMemoryVolume ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) ) ) ; return retVal.getSucceeded ( ) ; }
Source:
public void getDiskList ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
public void balance ( ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object [ ] sentObject = new java.lang.Object [ 3 ] ; sentObject [ 0 ] = org.ovirt.schedulerproxy.SchedulerProxy.FILE_NAME ; sentObject [ 1 ] = org.ovirt.schedulerproxy.SchedulerProxy.HOSTS_EXAMPLE ; sentObject [ 2 ] = "" ; java.lang.Object execute = client.execute ( "runLoadBalancing" , sentObject ) ; java.lang.System.out.println ( parseBalanceResults ( execute ) ) ; }

Target:
public java.lang.String balance ( java.lang.String balanceName , java.lang.String [ ] HostID , java.lang.String args ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object [ ] sentObject = new java.lang.Object [ 3 ] ; sentObject [ 0 ] = balanceName ; sentObject [ 1 ] = HostID ; sentObject [ 2 ] = args ; java.lang.Object execute = client.execute ( "runLoadBalancing" , sentObject ) ; return parseBalanceResults ( execute ) ; }
Source:
public void testGetAllForVmPool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllForVmPool ( org.ovirt.engine.core.dao.VmDAOTest.POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( "wrong number of VMs attached to pool" , 2 , result.size ( ) ) ; }

Target:
public void testUpdateOriginalTemplateName ( ) { dao.updateOriginalTemplateName ( FixturesTool.VM_TEMPLATE_RHEL6_2 , "renamed" ) ; java.util.List < java.lang.String > renamedTemplates = java.util.Arrays.asList ( "77296e00-0cad-4e5a-9299-008a7b6f4354" , "77296e00-0cad-4e5a-9299-008a7b6f4355" , "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ; java.util.List < java.lang.String > notRenamedTemplate = java.util.Arrays.asList ( "77296e00-0cad-4e5a-9299-008a7b6f4359" ) ; assertOriginalTemplateNameIs ( renamedTemplates , "renamed" ) ; assertOriginalTemplateNameIs ( notRenamedTemplate , "otherTemplateName" ) ; }
Source:
protected void addStorageDomains ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > allStorageDomains = new java.util.ArrayList < > ( ) ; allStorageDomains.addAll ( getStorageDomains ( ) . getItems ( ) ) ; allStorageDomains.addAll ( storageDomains ) ; getStorageDomains ( ) . setItems ( allStorageDomains ) ; }

Target:
protected void addStorageDomains ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.Set < org.ovirt.engine.core.common.businessentities.StorageDomain > allStorageDomains = new java.util.HashSet < > ( ) ; allStorageDomains.addAll ( getStorageDomains ( ) . getItems ( ) ) ; allStorageDomains.addAll ( storageDomains ) ; getStorageDomains ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( allStorageDomains ) ) ; }
Source:
void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef , java.util.List selectedItems ) { item.setVisible ( ( ( buttonDef.isAccessible ( selectedItems ) ) && ( buttonDef.isVisible ( selectedItems ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( selectedItems ) ) ; if ( ( buttonDef.getButtonToolTip ( ) ) != null ) { org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( buttonDef.getButtonToolTip ( ) ) , item.getElement ( ) ) ; } }

Target:
void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef , java.util.List selectedItems ) { item.setVisible ( ( ( buttonDef.isAccessible ( selectedItems ) ) && ( buttonDef.isVisible ( selectedItems ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( selectedItems ) ) ; if ( ( buttonDef.getTooltip ( ) ) != null ) { org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( buttonDef.getTooltip ( ) , item.getElement ( ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool > getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , boolean supportsVirtService , boolean supportsGlusterService ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userId ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) . addValue ( "supports_virt_service" , supportsVirtService ) . addValue ( "supports_gluster_service" , supportsGlusterService ) ; org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper mapper = new org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.StoragePoolRawMapper ( ) ; return getCallsHandler ( ) . executeReadList ( "fn_perms_get_storage_pools_with_permitted_action_on_vds_groups" , mapper , parameterSource ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage_pool getForVds ( org.ovirt.engine.core.compat.Guid vds ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vdsId" , vds ) ; return getCallsHandler ( ) . executeRead ( "Getstorage_poolsByVdsId" , org.ovirt.engine.core.dao.StoragePoolDAODbFacadeImpl.mapper , parameterSource ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId } , helper.getVolumeEntity ( 0 ) ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.GlusterVolumeRemoveBricks , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters.class , new java.lang.String [ ] { "VolumeId" , "Bricks" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId , getBricksToRemove ( ) } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId } , helper.getVolumeEntity ( 0 ) ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.GlusterVolumeRemoveBricks , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters.class , new java.lang.String [ ] { "VolumeId" , "Bricks" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId , getBrickEntitiesToRemove ( ) } , true , true ) ) ; verifyRemove ( collection.remove ( getBrickModelsToRemove ( ) ) ) ; }
Source:
private boolean storageDomainStatusIsValid ( ) { boolean returnValue ; if ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.isInternalExecution ( ) ) { returnValue = checkStorageDomainStatus ( StorageDomainStatus.InActive , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , StorageDomainStatus.Maintenance , StorageDomainStatus.PreparingForMaintenance ) ; } else { returnValue = checkStorageDomainStatus ( StorageDomainStatus.InActive , StorageDomainStatus.Unknown , StorageDomainStatus.Maintenance , StorageDomainStatus.PreparingForMaintenance ) ; } return returnValue ; }

Target:
private boolean storageDomainStatusIsValid ( ) { boolean returnValue ; if ( org.ovirt.engine.core.bll.storage.ActivateStorageDomainCommand.isInternalExecution ( ) ) { returnValue = checkStorageDomainStatus ( StorageDomainStatus.Inactive , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , StorageDomainStatus.Maintenance , StorageDomainStatus.PreparingForMaintenance ) ; } else { returnValue = checkStorageDomainStatus ( StorageDomainStatus.Inactive , StorageDomainStatus.Unknown , StorageDomainStatus.Maintenance , StorageDomainStatus.PreparingForMaintenance ) ; } return returnValue ; }
Source:
public void tooLowPct ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 6 ; settings.diskSpaceUsed = 4 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = 70 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( domain ) ) ; }

Target:
public void tooLowPct ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 6 ; settings.diskSpaceUsed = 4 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = 70 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isWithinThresholds ( domain ) ) ; }
Source:
public void setMemoryStats ( long totalMemory , long usedMemory ) { java.lang.String totalMemoryString = messages.numaMemory ( totalMemory ) ; totalLabel.setTitle ( totalMemoryString ) ; totalLabel.setText ( totalMemoryString ) ; java.lang.String usedMemoryString = messages.numaMemoryUsed ( usedMemory ) ; usedLabel.setTitle ( usedMemoryString ) ; usedLabel.setText ( usedMemoryString ) ; }

Target:
public void setMemoryStats ( long totalMemory , long usedMemory ) { java.lang.String totalMemoryString = org.ovirt.engine.ui.common.view.popup.numa.MemorySummaryPanel.messages.numaMemory ( totalMemory ) ; totalLabel.setText ( totalMemoryString ) ; java.lang.String usedMemoryString = org.ovirt.engine.ui.common.view.popup.numa.MemorySummaryPanel.messages.numaMemoryUsed ( usedMemory ) ; usedLabel.setText ( usedMemoryString ) ; }
Source:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
public void setUp ( ) { org.mockito.Mockito.doNothing ( ) . when ( command ) . addStorageDomainInDb ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateStorageDomainDynamicFromIrs ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . saveLUNsInDB ( org.mockito.ArgumentMatchers.anyList ( ) ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateMetadataDevices ( ) ; }

Target:
public void setUp ( ) { org.mockito.Mockito.doNothing ( ) . when ( command ) . addStorageDomainInDb ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateStorageDomainDynamicFromIrs ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . saveLUNsInDB ( org.mockito.ArgumentMatchers.anyList ( ) ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateMetadataDevices ( ) ; command.setStoragePool ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStoragePool ( ) ) ; command.init ( ) ; }
Source:
private boolean networkRequiredOnVds ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface vmIface , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > networksByName , boolean onlyRequiredNetworks ) { boolean networkRequiredOnVds = true ; if ( ! ( vmIface.isPlugged ( ) ) ) { networkRequiredOnVds = false ; } else if ( onlyRequiredNetworks ) { networkRequiredOnVds = networksByName.get ( vmIface.getNetworkName ( ) ) . getCluster ( ) . isRequired ( ) ; } return networkRequiredOnVds ; }

Target:
private boolean networkRequiredOnVds ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmIface , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > networksByName , boolean onlyRequiredNetworks ) { boolean networkRequiredOnVds = true ; if ( ! ( vmIface.isPlugged ( ) ) ) { networkRequiredOnVds = false ; } else if ( onlyRequiredNetworks ) { networkRequiredOnVds = networksByName.get ( vmIface.getNetworkName ( ) ) . getCluster ( ) . isRequired ( ) ; } return networkRequiredOnVds ; }
Source:
public void onTimeout ( ) { if ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPools.containsKey ( poolId ) ) { try { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( poolId ) ; if ( ( pool != null ) && ( ( pool.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPoolTreatment ( pool ) ; } } catch ( java.lang.Exception ignore ) { } } }

Target:
private void handleTimeout ( ) { if ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPools.containsKey ( poolId ) ) { try { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( poolId ) ; if ( ( pool != null ) && ( ( pool.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPoolTreatment ( pool ) ; } } catch ( java.lang.Exception ignore ) { } } }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { java.lang.String storageDomainName = value.substring ( 0 , value.lastIndexOf ( " (" ) ) ; importModel.getDiskImportData ( disk.getId ( ) ) . setSelectedStorageDomainString ( storageDomainName ) ; diskTable.asEditor ( ) . edit ( importModel.getImportDiskListModel ( ) ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk , java.lang.String value ) { importModel.getDiskImportData ( disk.getId ( ) ) . setSelectedQuotaString ( value ) ; }
Source:
protected void executeCommand ( ) { final org.ovirt.engine.core.compat.Guid providerId = org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ; if ( ( getProviderProxy ( ) ) != null ) { getProviderProxy ( ) . onRemoval ( ) ; } org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getProviderDao ( ) . remove ( providerId ) ; org.ovirt.engine.core.bll.provider.RemoveProviderCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { final org.ovirt.engine.core.compat.Guid providerId = org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ; if ( ( getProviderProxy ( ) ) != null ) { getProviderProxy ( ) . onRemoval ( ) ; } providerDao.remove ( providerId ) ; org.ovirt.engine.core.bll.provider.RemoveProviderCommand.setSucceeded ( true ) ; }
Source:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageFileType ) { getIrsImageList ( aQuery , storagePoolId , forceRefresh , imageFileType , new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.RepoImageToImageFileNameAsyncConverter ( ) ) ; }