auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean hasTasksWithoutVdsmId ( java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTasks > tasks ) { for ( org.ovirt.engine.core.common.businessentities.AsyncTasks task : tasks ) { if ( org.ovirt.engine.core.bll.tasks.AsyncTaskManager.hasEmptyVdsmId ( task ) ) { return true ; } } return false ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTask > > groupTasksByRootCommandId ( java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTask > tasksInDB ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.AsyncTask > > rootCommandIdToCommandsMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.AsyncTask task : tasksInDB ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( task.getRootCommandId ( ) , task , rootCommandIdToCommandsMap ) ; } return rootCommandIdToCommandsMap ; }
Source:
private static org.ovirt.engine.api.model.DataCenterStatus map ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus storagePoolStatus , org.ovirt.engine.api.model.DataCenterStatus dataCenterStatus ) { switch ( storagePoolStatus ) { case Contend : return org.ovirt.engine.api.model.DataCenterStatus.CONTEND ; case Maintenance : return org.ovirt.engine.api.model.DataCenterStatus.MAINTENANCE ; case NotOperational : return org.ovirt.engine.api.model.DataCenterStatus.NOT_OPERATIONAL ; case Problematic : return org.ovirt.engine.api.model.DataCenterStatus.PROBLEMATIC ; case Uninitialized : return org.ovirt.engine.api.model.DataCenterStatus.UNINITIALIZED ; case Up : return org.ovirt.engine.api.model.DataCenterStatus.UP ; default : throw new java.lang.IllegalStateException ( "Enum mapping failed" ) ; } }

Target:
private static org.ovirt.engine.api.model.DataCenterStatus map ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus storagePoolStatus , org.ovirt.engine.api.model.DataCenterStatus dataCenterStatus ) { switch ( storagePoolStatus ) { case Contend : return org.ovirt.engine.api.model.DataCenterStatus.CONTEND ; case Maintenance : return org.ovirt.engine.api.model.DataCenterStatus.MAINTENANCE ; case NotOperational : return org.ovirt.engine.api.model.DataCenterStatus.NOT_OPERATIONAL ; case NonResponsive : return org.ovirt.engine.api.model.DataCenterStatus.PROBLEMATIC ; case Uninitialized : return org.ovirt.engine.api.model.DataCenterStatus.UNINITIALIZED ; case Up : return org.ovirt.engine.api.model.DataCenterStatus.UP ; default : throw new java.lang.IllegalStateException ( "Enum mapping failed" ) ; } }
Source:
private void setSearchStringPage ( int newSearchPageNumber ) { if ( org.ovirt.engine.core.compat.Regex.IsMatch ( getSearchString ( ) , org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.PAGE_STRING_REGEX , RegexOptions.IgnoreCase ) ) { setSearchString ( org.ovirt.engine.core.compat.Regex.replace ( getSearchString ( ) , org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.PAGE_STRING_REGEX , ( " page " + newSearchPageNumber ) ) ) ; } else { setSearchString ( ( ( ( getSearchString ( ) ) + " page " ) + newSearchPageNumber ) ) ; } }

Target:
public java.lang.String getSearchString ( ) { return ( searchString ) + ( ( pagingSearchString ) == null ? "" : pagingSearchString ) ; }
Source:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ( getConfigurator ( ) . IsDisplayTypeSupported ( DisplayType.qxl ) ) && ( ! ( getIsConnected ( ) ) ) ) && ( ( getEntity ( ) ) != null ) ) && ( ( getEntity ( ) . getdisplay_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.DisplayType.vnc ) ) ) && ( IsVmConnectReady ( ) ) ) ) ; }

Target:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( ( getConfigurator ( ) . IsDisplayTypeSupported ( DisplayType.qxl ) ) && ( ! ( getIsConnected ( ) ) ) ) && ( ( getEntity ( ) ) != null ) ) && ( ( getEntity ( ) . getDisplayType ( ) ) != ( org.ovirt.engine.core.common.businessentities.DisplayType.vnc ) ) ) && ( IsVmConnectReady ( ) ) ) ) ; }
Source:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; if ( getIsNew ( ) ) { getIsWipeAfterDelete ( ) . setEntity ( selectedStorage.getWipeAfterDelete ( ) ) ; } } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateDiskProfiles ( getDataCenter ( ) . getSelectedItem ( ) ) ; }

Target:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; if ( getIsNew ( ) ) { getIsWipeAfterDelete ( ) . setEntity ( selectedStorage.getWipeAfterDelete ( ) ) ; } } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateDiskProfiles ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateCinderVolumeTypes ( ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( vdsStatic , cpuName , spmStatus , imagesLastCheck , imagesLastDelay , interfaces , networkNames , maxVdsMemoryOverCommit , privateDomains , vdsSpmId , storagePoolId , storagePoolName , clusterCompatibilityVersion , clusterCpuName , clusterDescription , clusterName , clusterVirtService , clusterGlusterService , balloonEnabled , countThreadsAsCores ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( vdsStatic , cpuName , spmStatus , imagesLastCheck , imagesLastDelay , interfaces , networkNames , maxVdsMemoryOverCommit , privateDomains , vdsSpmId , storagePoolId , storagePoolName , clusterCompatibilityVersion , clusterCpuName , clusterDescription , clusterName , clusterVirtService , clusterGlusterService , balloonEnabled , countThreadsAsCores , glusterPeerStatus ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; return new org.ovirt.engine.core.common.businessentities.AsyncTasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getVdsmTaskId ( ) , parentParameters , getParameters ( ) , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) , parentParameters.getCommandId ( ) , asyncTaskCreationInfo.getStoragePoolID ( ) , asyncTaskCreationInfo.getTaskType ( ) ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.bll.context.CommandContext cmdContext , boolean enableCallBack ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.persistCommand ( buildCommandEntity ( getParentParameters ( parentCommand ) . getCommandId ( ) , enableCallBack ) , cmdContext ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }
Source:
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.storage.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

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 = org.ovirt.engine.core.common.businessentities.storage.ImageFileType.ISO ; getIrsImageList ( aQuery , storagePoolId , forceRefresh , imageFileType ) ; }
Source:
private void initImportSources ( ) { importSources.setItems ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportSource.values ( ) ) ) ; onImportSourceChanged ( ) ; }

Target:
public void loadVmsFromExportDomain ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenters ( ) . getSelectedItem ( ) . getId ( ) , exportDomain.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { updateVms ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) ; } } ) ) ; }
Source:
public void testIscsiLunCannotBeAddedIfAddingFloatingDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.LunDisk disk = createISCSILunDisk ( ScsiGenericIO.UNFILTERED , true , DiskInterface.IDE ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; initializeCommand ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , parameters ) ; org.junit.Assert.assertFalse ( "Floating disk with SCSI reservation set successfully added" , command.checkIfLunDiskCanBeAdded ( spyDiskValidator ( disk ) ) ) ; verifyCanDoActionMessagesContainMessage ( EngineMessage.ACTION_TYPE_FAILED_SCSI_RESERVATION_NOT_VALID_FOR_FLOATING_DISK ) ; }

Target:
public void testIscsiLunCannotBeAddedIfAddingFloatingDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.LunDisk disk = createISCSILunDisk ( ScsiGenericIO.UNFILTERED , true , DiskInterface.IDE ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; initializeCommand ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , parameters ) ; org.junit.Assert.assertFalse ( "Floating disk with SCSI reservation set successfully added" , command.checkIfLunDiskCanBeAdded ( spyDiskValidator ( disk ) ) ) ; verifyValidationMessagesContainMessage ( EngineMessage.ACTION_TYPE_FAILED_SCSI_RESERVATION_NOT_VALID_FOR_FLOATING_DISK ) ; }
Source:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getVDSReturnValue ( ) . setSucceeded ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.ResetIrs , new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getPreferredSPMId ( ) ) ) . getSucceeded ( ) ) ; }

Target:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getVDSReturnValue ( ) . setSucceeded ( resourceManager.runVdsCommand ( VDSCommandType.ResetIrs , new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommand.getParameters ( ) . getPreferredSPMId ( ) ) ) . getSucceeded ( ) ) ; }
Source:
public void testGlobalSpiceProxy ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; mcr.mockConfigValue ( ConfigValues.SpiceProxyDefault , org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY , model.getDisplay ( ) . getProxy ( ) ) ; }

Target:
public static java.util.stream.Stream < org.ovirt.engine.core.utils.MockConfigDescriptor < ? > > mockSpiceConfiguration ( ) { return java.util.stream.Stream.of ( org.ovirt.engine.core.utils.MockConfigDescriptor.of ( ConfigValues.SpiceProxyDefault , org.ovirt.engine.api.restapi.types.VmMapperTest.GLOBAL_SPICE_PROXY ) ) ; }
Source:
public void getAuthzGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAuthzGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , false ) ; setUpEntityQueryExpectations ( 1 , true ) ; setUpVDSGroupExpectations ( GUIDS [ 1 ] ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateDisplayToVdsGroup , org.ovirt.engine.core.common.action.DisplayNetworkToVdsGroupParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyUpdate ( resource.update ( getModel ( 0 ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , false ) ; setUpEntityQueryExpectations ( 1 , true ) ; setUpVDSGroupExpectations ( GUIDS [ 1 ] ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateNetworkOnCluster , org.ovirt.engine.core.common.action.NetworkClusterParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyUpdate ( resource.update ( getModel ( 0 ) ) , 0 ) ; }
Source:
public void testAttachSuccess ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpActionExpectations ( ActionType.AttachStorageConnectionToStorageDomain , org.ovirt.engine.core.common.action.AttachDetachStorageConnectionParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ; org.ovirt.engine.api.model.StorageConnection connection = new org.ovirt.engine.api.model.StorageConnection ( ) ; connection.setId ( GUIDS [ 3 ] . toString ( ) ) ; javax.ws.rs.core.Response response = collection.add ( connection ) ; assertEquals ( 200 , response.getStatus ( ) ) ; }

Target:
public void testAttachSuccess ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpActionExpectations ( ActionType.AttachStorageConnectionToStorageDomain , org.ovirt.engine.core.common.action.AttachDetachStorageConnectionParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ; org.ovirt.engine.api.model.StorageConnection connection = new org.ovirt.engine.api.model.StorageConnection ( ) ; connection.setId ( GUIDS [ 3 ] . toString ( ) ) ; javax.ws.rs.core.Response response = collection.add ( connection ) ; org.junit.Assert.assertEquals ( 200 , response.getStatus ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc reset ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.reset ( vmId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( 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 glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookUpdate ( glusterCommand , stage , hookName , content , checksum ) ; 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:
protected void extractBond ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > bonds , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String name ) { if ( org.apache.commons.lang.StringUtils.isBlank ( iface.getNetworkName ( ) ) ) { violations.add ( VdcBllMessages.NETWROK_NOT_EXISTS ) ; } else { if ( bonds.containsKey ( name ) ) { violations.add ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { bonds.put ( name , iface ) ; } } }

Target:
protected void extractBondIfModified ( java.util.Set < java.lang.String > bonds , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String name ) { if ( bonds.contains ( name ) ) { violations.add ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { bonds.add ( name ) ; if ( interfaceWasModified ( iface ) ) { modifiedBonds.put ( name , iface ) ; } } }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public java.lang.String getDisplayHost ( ) { java.lang.StringBuilder ret = new java.lang.StringBuilder ( 100 ) ; if ( ( this . host ) == null ) { ret.append ( "N/A" ) ; } else { if ( ( this . user ) != null ) { ret.append ( this . user ) ; ret.append ( "@" ) ; } ret.append ( this . host ) ; if ( ( this . port ) != ( org.ovirt.engine.core.utils.ssh.SSHClient.DEFAULT_SSH_PORT ) ) { ret.append ( ":" ) ; ret.append ( this . port ) ; } } return ret.toString ( ) ; }

Target:
public java.lang.String getDisplayHost ( ) { java.lang.StringBuilder ret = new java.lang.StringBuilder ( 100 ) ; if ( ( _host ) == null ) { ret.append ( "N/A" ) ; } else { if ( ( _user ) != null ) { ret.append ( _user ) ; ret.append ( "@" ) ; } ret.append ( _host ) ; if ( ( _port ) != ( org.ovirt.engine.core.utils.ssh.SSHClient.DEFAULT_SSH_PORT ) ) { ret.append ( ":" ) ; ret.append ( _port ) ; } } return ret.toString ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { if ( returnValue != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; updateVms ( java.util.Collections.singletonList ( vm ) ) ; clearErrorAndWarning ( ) ; } else { setError ( messages.failedToLoadOva ( getOvaPath ( ) . getEntity ( ) ) ) ; } stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = queryReturnValue.getReturnValue ( ) ; updateVms ( java.util.Collections.singletonList ( vm ) ) ; } else { setError ( messages.failedToLoadOva ( getOvaPath ( ) . getEntity ( ) ) ) ; } stopProgress ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { int count = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( count <= 1 ) { getModel ( ) . disableEditing ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . notAvailableWithNoTemplates ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object target1 , java.lang.Object returnValue1 ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > baseTemplates = filterNotBaseTemplates ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue1 ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > filteredTemplates = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterTemplatesByArchitecture ( baseTemplates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ; getModel ( ) . getBaseTemplate ( ) . setItems ( filteredTemplates ) ; }
Source:
public static java.lang.Number convert ( long size , org.ovirt.engine.ui.uicommonweb.models.SizeConverter.SizeUnit fromUnit , org.ovirt.engine.ui.uicommonweb.models.SizeConverter.SizeUnit toUnit ) { long fromType = fromUnit.getUnitWeight ( ) ; long toType = toUnit.getUnitWeight ( ) ; return size * ( ( java.lang.Math.pow ( org.ovirt.engine.ui.uicommonweb.models.SizeConverter.CONVERT_FACTOR , fromType ) ) / ( java.lang.Math.pow ( org.ovirt.engine.ui.uicommonweb.models.SizeConverter.CONVERT_FACTOR , toType ) ) ) ; }

Target:
public static java.lang.Number convert ( long size , org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit fromUnit , org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit toUnit ) { long fromType = fromUnit.getUnitWeight ( ) ; long toType = toUnit.getUnitWeight ( ) ; return size * ( ( java.lang.Math.pow ( org.ovirt.engine.core.common.utils.SizeConverter.CONVERT_FACTOR , fromType ) ) / ( java.lang.Math.pow ( org.ovirt.engine.core.common.utils.SizeConverter.CONVERT_FACTOR , toType ) ) ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; javax.ws.rs.core.Response performAction = null ; try { performAction = performAction ( ActionType.RemoveClusterPolicy , new org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters ( asGuid ( id ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetClusterPolicyById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) . lookupEntity ( asGuid ( id ) ) ) ) ; } catch ( org.ovirt.engine.api.restapi.resource.BackendFailureException e ) { org.ovirt.engine.api.restapi.resource.BackendSchedulingPolicyResource.log.error ( "Failed performing action" , e ) ; } return performAction ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; javax.ws.rs.core.Response performAction = null ; try { performAction = performAction ( ActionType.RemoveClusterPolicy , new org.ovirt.engine.core.common.scheduling.parameters.ClusterPolicyCRUDParameters ( asGuid ( id ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetClusterPolicyById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) . lookupEntity ( asGuid ( id ) ) ) ) ; } catch ( org.ovirt.engine.api.restapi.resource.BackendFailureException e ) { org.ovirt.engine.api.restapi.resource.BackendSchedulingPolicyResource.log.error ( "Failed performing action" , e ) ; } return performAction ; }
Source:
private java.lang.String getDirectoryGroupSearchPattern ( java.lang.String groupname , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( httpHeaders , uriInfo , org.ovirt.engine.core.common.businessentities.aaa.DbGroup.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( ResourceConstants.AAA_GROUPS_SEARCH_TEMPLATE , domain , "" ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "name=" + groupname : constraint ) ) ; return sb.toString ( ) ; }

Target:
private java.lang.String getDirectoryGroupSearchPattern ( java.lang.String groupname , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.restapi.util.QueryHelper.getConstraint ( httpHeaders , uriInfo , org.ovirt.engine.core.common.businessentities.aaa.DbGroup.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( ResourceConstants.AAA_GROUPS_SEARCH_TEMPLATE , domain , "" ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "name=" + groupname : constraint ) ) ; return sb.toString ( ) ; }
Source:
private void verifyInvalidValueException ( javax.ws.rs.WebApplicationException wae , java.lang.String value , java.lang.String typeName ) { org.junit.Assert.assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; org.ovirt.engine.api.model.Fault fault = ( ( org.ovirt.engine.api.model.Fault ) ( wae.getResponse ( ) . getEntity ( ) ) ) ; org.junit.Assert.assertNotNull ( fault ) ; org.junit.Assert.assertEquals ( "Invalid value" , fault.getReason ( ) ) ; org.junit.Assert.assertEquals ( ( ( ( value + " is not a member of " ) + typeName ) + ". Possible values for State are: new, runnable, blocked, waiting, timed_waiting, terminated" ) , fault.getDetail ( ) ) ; }

Target:
private void verifyInvalidValueException ( javax.ws.rs.WebApplicationException wae , java.lang.String value , java.lang.String typeName ) { org.junit.jupiter.api.Assertions.assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; org.ovirt.engine.api.model.Fault fault = ( ( org.ovirt.engine.api.model.Fault ) ( wae.getResponse ( ) . getEntity ( ) ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( fault ) ; org.junit.jupiter.api.Assertions.assertEquals ( "Invalid value" , fault.getReason ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( ( ( ( value + " is not a member of " ) + typeName ) + ". Possible values for State are: new, runnable, blocked, waiting, timed_waiting, terminated" ) , fault.getDetail ( ) ) ; }
Source:
public static void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void UpdateIsSysprepEnabled ( ) { boolean isFloppyAttached = ( ( java.lang.Boolean ) ( getAttachFloppy ( ) . getEntity ( ) ) ) ; boolean isVmFirstRun = ( ( java.lang.Boolean ) ( getIsVmFirstRun ( ) . getEntity ( ) ) ) ; getIsSysprepEnabled ( ) . setEntity ( ( ( getIsWindowsOS ( ) ) && ( getReinitialize ( ) ) ) ) ; }

Target:
private void updateIsSysprepEnabled ( ) { getIsSysprepEnabled ( ) . setEntity ( ( ( getIsWindowsOS ( ) ) && ( getReinitialize ( ) ) ) ) ; }
Source:
private void AddNetworkUpdateData ( ) { nics = null ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetVmNicList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( returnValue ) ) ; vmGuideModel.nics = nics ; vmGuideModel.AddNetworkPostData ( ) ; } } ) , getEntity ( ) . getId ( ) ) ; }

Target:
private void addNetworkUpdateData ( ) { nics = null ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getVmNicList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > nics = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( returnValue ) ) ; vmGuideModel.nics = nics ; vmGuideModel.addNetworkPostData ( ) ; } } ) , getEntity ( ) . getId ( ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateParametersBase.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; verifyRemove ( response ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetGraphicsExpectations ( 1 ) ; setUpGetEntityExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateParametersBase.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; javax.ws.rs.core.Response response = resource.remove ( ) ; verifyRemove ( response ) ; }
Source:
private void mockGetImageDomainsListVdsCommand ( ) { java.util.ArrayList < org.ovirt.engine.core.compat.Guid > guids = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( 1 ) ; guids.add ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( guids ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetImageDomainsList ) , org.mockito.Matchers.< org.ovirt.engine.core.common.vdscommands.VDSParametersBase > any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroup ( ) { if ( ( vdsGroup ) == null ) { vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_3 ) ; } return vdsGroup ; }
Source:
public void setSelectedItem ( java.lang.Object value ) { if ( ( selectedItem ) != value ) { OnSelectedItemChanging ( value , selectedItem ) ; selectedItem = value ; OnSelectedItemChanged ( ) ; getSelectedItemChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItem" ) ) ; } }

Target:
public void setSelectedItem ( java.lang.Object value ) { if ( ( selectedItem ) != value ) { OnSelectedItemChanging ( value , selectedItem ) ; selectedItem = value ; OnSelectedItemChanged ( ) ; getSelectedItemChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItem" ) ) ; } }
Source:
public void testFetchSpecificAndGeneralQuotaForStorage ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaStorage > quotaStorageList = dao.getQuotaStorageByStorageGuid ( null , FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ; org.ovirt.engine.core.common.businessentities.QuotaStorage quotaStorage = quotaStorageList.get ( 0 ) ; org.junit.Assert.assertEquals ( 1 , quotaStorageList.size ( ) ) ; org.junit.Assert.assertNotNull ( quotaStorage ) ; org.junit.Assert.assertTrue ( ( ( quotaStorage.getStorageSizeGBUsage ( ) ) > 0 ) ) ; }

Target:
public void testFetchSpecificAndGeneralQuotaForStorage ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaStorage > quotaStorageList = dao.getQuotaStorageByStorageGuid ( null , FixturesTool.QUOTA_SPECIFIC_AND_GENERAL ) ; org.ovirt.engine.core.common.businessentities.QuotaStorage quotaStorage = quotaStorageList.get ( 0 ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , quotaStorageList.size ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quotaStorage ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ( quotaStorage.getStorageSizeGBUsage ( ) ) > 0 ) ) ; }
Source:
private java.lang.String getVmIsBeingRemovedFromExportDomainMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_BEING_REMOVED_FROM_EXPORT_DOMAIN.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getVmName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getVmName ( ) ) ) ; } return builder.toString ( ) ; }

Target:
private java.lang.String getVmIsBeingRemovedFromExportDomainMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_BEING_REMOVED_FROM_EXPORT_DOMAIN.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getVmName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getVmName ( ) ) ) ; } return builder.toString ( ) ; }
Source:
public void testManualFence ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.FenceVdsManualy , org.ovirt.engine.core.common.action.FenceVdsManualyParameters.class , new java.lang.String [ ] { "VdsId" , "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] , GUIDS [ 1 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setFenceType ( FenceType.MANUAL.value ( ) ) ; verifyActionResponse ( resource.fence ( action ) ) ; }

Target:
public void testManualFence ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.FenceVdsManualy , org.ovirt.engine.core.common.action.FenceVdsManualyParameters.class , new java.lang.String [ ] { "VdsId" , "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] , GUIDS [ 1 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setFenceType ( FenceType.MANUAL.value ( ) ) ; verifyActionResponse ( resource.fence ( action ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( 25 ) ; builder.append ( "refresh: " ) ; builder.append ( refresh ) ; builder.append ( ", filtered: " ) ; builder.append ( isFiltered ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { return appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) ) . build ( ) ; }
Source:
public void testGetNotFound1 ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( new java.util.ArrayList < > ( ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound1 ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( new java.util.ArrayList < > ( ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public static void GetRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getStorageDomainId ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.api.model.StorageDomain storageDomain : storageDomains ) { if ( storageDomain.getStorageName ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }

Target:
private org.ovirt.engine.core.compat.Guid getStorageDomainIdByName ( java.lang.String storageDomainName ) { java.util.List < org.ovirt.engine.api.model.StorageDomain > storageDomains = getBackendCollection ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetAllStorageDomains , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; for ( org.ovirt.engine.api.model.StorageDomain storageDomain : storageDomains ) { if ( storageDomain.getStorageName ( ) . equals ( storageDomainName ) ) { return storageDomain.getId ( ) ; } } return null ; }
Source:
private void removePoolIfNeeded ( ) { if ( ! ( isPoolRemovalEnabled ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid poolId = getPoolId ( ) ; if ( poolId == null ) { return ; } boolean allVmsRemoved = ( vmPoolDao.getVmPoolsMapByVmPoolId ( poolId ) . size ( ) ) == 0 ; if ( ! allVmsRemoved ) { return ; } org.ovirt.engine.core.common.action.VmPoolParametersBase removePoolParam = new org.ovirt.engine.core.common.action.VmPoolParametersBase ( poolId ) ; removePoolParam.setSessionId ( getSessionId ( ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( ActionType.RemoveVmPool , removePoolParam , commandContext ) ; }

Target:
private void removePoolIfNeeded ( ) { if ( ! ( isPoolRemovalEnabled ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid poolId = getPoolId ( ) ; if ( poolId == null ) { return ; } boolean allVmsRemoved = ( vmPoolDao.getVmPoolsMapByVmPoolId ( poolId ) . size ( ) ) == 0 ; if ( ! allVmsRemoved ) { return ; } org.ovirt.engine.core.common.action.VmPoolParametersBase removePoolParam = new org.ovirt.engine.core.common.action.VmPoolParametersBase ( poolId ) ; removePoolParam.setSessionId ( getSessionId ( ) ) ; backend.runInternalAction ( ActionType.RemoveVmPool , removePoolParam , commandContext ) ; }
Source:
boolean isTaskOverPrePollingLapse ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters parameters = getParameters ( ) ; long taskStartTime = parameters.getDbAsyncTask ( ) . getaction_parameters ( ) . getTaskStartTime ( ) ; java.lang.Integer prePollingPeriod = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( org.ovirt.engine.core.common.config.ConfigValues.UknownTaskPrePollingLapse ) ; boolean idlePeriodPassed = ( ( java.lang.System.currentTimeMillis ( ) ) - taskStartTime ) > prePollingPeriod ; org.ovirt.engine.core.bll.SPMAsyncTask.log.infoFormat ( "task id {0} {1}. Pre-polling period is {2} millis. " , parameters.getTaskID ( ) , ( idlePeriodPassed ? "has passed pre-polling period time and should be polled" : "is in pre-polling period and should not be polled" ) , prePollingPeriod ) ; return idlePeriodPassed ; }

Target:
boolean isTaskOverPrePollingLapse ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters parameters = getParameters ( ) ; long taskStartTime = parameters.getDbAsyncTask ( ) . getStartTime ( ) . getTime ( ) ; java.lang.Integer prePollingPeriod = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( org.ovirt.engine.core.common.config.ConfigValues.UknownTaskPrePollingLapse ) ; boolean idlePeriodPassed = ( ( java.lang.System.currentTimeMillis ( ) ) - taskStartTime ) > prePollingPeriod ; org.ovirt.engine.core.bll.SPMAsyncTask.log.infoFormat ( "task id {0} {1}. Pre-polling period is {2} millis. " , parameters.getTaskID ( ) , ( idlePeriodPassed ? "has passed pre-polling period time and should be polled" : "is in pre-polling period and should not be polled" ) , prePollingPeriod ) ; return idlePeriodPassed ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getMovedDisks ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > movedDiskIds = getMovedDiskIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid diskId : movedDiskIds ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( diskId ) ; disks.add ( disk ) ; } return disks ; }

Target:
public void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getStage ( ) ) == ( org.ovirt.engine.core.common.action.LiveMigrateVmDisksParameters.LiveMigrateStage.CREATE_SNAPSHOT ) ) { imagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.OK , ImageStatus.OK , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCompensationContext ( ) ) ; } org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.setSucceeded ( true ) ; }
Source:
protected void selectionChanged ( java.lang.Boolean value ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getNetworksTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel clusterNetworkManageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel ) ( model ) ) ; if ( canEditRequired ( clusterNetworkManageModel ) ) { clusterNetworkManageModel.setRequired ( value ) ; } refreshNetworksTable ( ) ; } }

Target:
protected void selectionChanged ( java.lang.Boolean value ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getNetworksTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkManageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel ) ( model ) ) ; if ( canEditRequired ( clusterNetworkManageModel ) ) { clusterNetworkManageModel.setRequired ( value ) ; } refreshNetworksTable ( ) ; } }
Source:
public void Search ( ) { if ( ( getEntity ( ) ) != null ) { setSearchString ( ( "Vms: host.name=" + ( getEntity ( ) . getName ( ) ) ) ) ; super . Search ( ) ; } }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( returnValue ) ) ; final org.ovirt.engine.ui.uicommonweb.models.hosts.HostVmListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostVmListModel ) ( target ) ) ; model.setItems ( list ) ; }