auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAllDomainsWithinThreshold ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getNonEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleStorageDomainsValidator ) . allDomainsExistAndActive ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN.name ( ) ) ) ; }

Target:
public void testAllDomainsHaveSpaceForNewDisksFailure ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList = java.util.Collections.emptyList ( ) ; org.mockito.Mockito.doReturn ( disksList ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( disksList ) . when ( cmd ) . getDisksListForChecks ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleStorageDomainsValidator ) . allDomainsHaveSpaceForNewDisks ( disksList ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; org.mockito.Mockito.verify ( multipleStorageDomainsValidator ) . allDomainsHaveSpaceForNewDisks ( disksList ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = control.createMock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.easymock.EasyMock.expect ( group.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( group.getId ( ) ) . thenReturn ( id ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }
Source:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public 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.storage.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:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc getVGList ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getLVMVolumeGroups" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vglist" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc allocateVolume ( java.lang.String spUUID , java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String size ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.allocate" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "size" , size ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String operation , java.lang.Throwable throwable ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) ) ; java.lang.String op = ( operation == null ) ? org.ovirt.engine.core.bll.VdsCommand.getActionType ( ) . name ( ) : operation ; alert.addCustomValue ( "Operation" , op ) ; alert.updateCallStackFromThrowable ( throwable ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType ) ; }

Target:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String operation , java.lang.Throwable throwable ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) ) ; java.lang.String op = ( operation == null ) ? org.ovirt.engine.core.bll.VdsCommand.getActionType ( ) . name ( ) : operation ; alert.addCustomValue ( "Operation" , op ) ; alert.updateCallStackFromThrowable ( throwable ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType , auditLogDirector ) ; }
Source:
protected void setUpGetEntityExpectations ( int index , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmIcon , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , ( notFound ? null : getEntity ( index ) ) ) ; }

Target:
protected void setUpGetEntityExpectations ( int index , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetVmIcon , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , ( notFound ? null : getEntity ( index ) ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.CancelConvertVmCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( org.ovirt.engine.core.bll.CancelConvertVmCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.CancelConvertVmCommand.getVdsId ( ) ) ) { return failCanDoAction ( EngineMessage.VM_CANNOT_CANCEL_CONVERSION_WHEN_VM_IS_NOT_BEING_CONVERTED ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.CancelConvertVmCommand.getVm ( ) ) == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( org.ovirt.engine.core.bll.CancelConvertVmCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.CancelConvertVmCommand.getVdsId ( ) ) ) { return failValidation ( EngineMessage.VM_CANNOT_CANCEL_CONVERSION_WHEN_VM_IS_NOT_BEING_CONVERTED ) ; } return true ; }
Source:
private void GetImageChildren ( org.ovirt.engine.core.compat.Guid snapshot , java.util.List < org.ovirt.engine.core.compat.Guid > children ) { java.util.List < org.ovirt.engine.core.compat.Guid > list = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImageDao ( ) . getAllSnapshotsForParent ( snapshot ) ) { list.add ( image.getImageId ( ) ) ; } children.addAll ( list ) ; for ( org.ovirt.engine.core.compat.Guid snapshotId : list ) { GetImageChildren ( snapshotId , children ) ; } }

Target:
private void getImageChildren ( org.ovirt.engine.core.compat.Guid snapshot , java.util.List < org.ovirt.engine.core.compat.Guid > children ) { java.util.List < org.ovirt.engine.core.compat.Guid > list = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImageDao ( ) . getAllSnapshotsForParent ( snapshot ) ) { list.add ( image.getImageId ( ) ) ; } children.addAll ( list ) ; for ( org.ovirt.engine.core.compat.Guid snapshotId : list ) { getImageChildren ( snapshotId , children ) ; } }
Source:
public static boolean vmDeviceChanged ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , org.ovirt.engine.core.common.businessentities.VmDevice device ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.vmDeviceChanged ( vmId , deviceType , null , device ) ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmBase getVmBase ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVmDao ( ) . get ( vmId ) ; org.ovirt.engine.core.common.businessentities.VmBase vmBase = ( vm != null ) ? vm.getStaticData ( ) : null ; if ( vmBase == null ) { vmBase = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVmTemplateDao ( ) . get ( vmId ) ; } return vmBase ; }
Source:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }

Target:
public static void GetStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public java.lang.String getImageUrl ( java.lang.String id ) { return ( ( ( getProvider ( ) . getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.storage.OpenStackImageProviderProxy.API_VERSION ) ) + "/images/" ) + id ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getDownloadHeaders ( ) { java.util.HashMap < java.lang.String , java.lang.String > httpHeaders = new java.util.HashMap < > ( ) ; if ( ( getTokenProvider ( ) ) != null ) { httpHeaders.put ( "X-Auth-Token" , getTokenProvider ( ) . getToken ( ) ) ; } return httpHeaders ; }
Source:
private void checkActions ( java.util.Set < java.nio.channels.SelectionKey > keys ) { keys.stream ( ) . filter ( ( key ) -> org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.class . isInstance ( key.attachment ( ) ) ) . forEach ( ( key ) -> ( ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient ) ( key.attachment ( ) ) ) . performAction ( ) ) ; }

Target:
private void checkActions ( java.util.Set < java.nio.channels.SelectionKey > keys ) { keys.stream ( ) . filter ( ( key ) -> org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.class . isInstance ( key.attachment ( ) ) ) . forEach ( ( key ) -> { final org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client = ( ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient ) ( key.attachment ( ) ) ) ; try { client.performAction ( ) ; } catch ( java.io.IOException | org.ovirt.vdsm.jsonrpc.client.ClientConnectionException e ) { handleException ( e , client , key , "Unable to process messages " ) ; } } ) ; }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImageBase > mapDisks ( org.ovirt.engine.api.model.Disks disks ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImageBase > diskImages = null ; if ( ( disks != null ) && ( disks.isSetDisks ( ) ) ) { diskImages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImageBase > ( ) ; for ( org.ovirt.engine.api.model.Disk disk : disks.getDisks ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.api.restapi.types.DiskMapper.map ( disk , null ) ) ) ; diskImages.add ( diskImage ) ; } } return diskImages ; }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImageBase > mapDisks ( org.ovirt.engine.api.model.Disks disks ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImageBase > diskImages = null ; if ( ( disks != null ) && ( disks.isSetDisks ( ) ) ) { diskImages = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImageBase > ( ) ; for ( org.ovirt.engine.api.model.Disk disk : disks.getDisks ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( org.ovirt.engine.api.restapi.types.DiskMapper.map ( disk , null ) ) ) ; diskImages.add ( diskImage ) ; } } return diskImages ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc getIsoList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getIsoList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc ( 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.irsbroker.StatusReturnForXmlRpc verifyUntrustedVolume ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.verifyUntrustedVolume ( sdID , spID , imageID , volumeID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStoragePoolDao ( ) ) ; existingPool = dao.get ( new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; existingPool.setstatus ( StoragePoolStatus.Up ) ; vds = new org.ovirt.engine.core.compat.Guid ( "afce7a39-8e8c-4819-ba9c-796d316592e6" ) ; vdsGroup = new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ; storageDomain = new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ; newPool = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; newPool.setname ( "newPoolDude" ) ; newPool.setcompatibility_version ( new org.ovirt.engine.core.compat.Version ( "3.0" ) ) ; }

Target:
public void testIncreaseStoragePoolMasterVersion ( ) { int result = dao.increaseStoragePoolMasterVersion ( existingPool.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool dbPool = dao.get ( existingPool.getId ( ) ) ; org.junit.Assert.assertEquals ( result , ( ( existingPool.getmaster_domain_version ( ) ) + 1 ) ) ; org.junit.Assert.assertEquals ( result , dbPool.getmaster_domain_version ( ) ) ; }
Source:
private void InitVdsBroker ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Initialize vdsBroker ({0},{1})" , _vds.getHostName ( ) , _vds.getPort ( ) ) ; _vdsProxy = new org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ( _vds.getHostName ( ) , _vds.getPort ( ) ) ; }

Target:
public java.lang.Void runInTransaction ( ) { if ( ! ( numaNodesToRemove.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsNumaNodeDAO ( ) . massRemoveNumaNodeByNumaNodeId ( numaNodesToRemove ) ; } if ( ! ( numaNodesToUpdate.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsNumaNodeDAO ( ) . massUpdateNumaNode ( numaNodesToUpdate ) ; } if ( ! ( numaNodesToSave.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsNumaNodeDAO ( ) . massSaveNumaNode ( numaNodesToSave , vds.getId ( ) , null ) ; } return null ; }
Source:
public void versionDecreaseNoHostsOrNetwork ( ) { createCommandWithOlderVersion ( true , false ) ; setupCpu ( ) ; org.ovirt.engine.core.dao.StoragePoolDao storagePoolDao2 = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; org.mockito.Mockito.when ( storagePoolDao2.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFS ( ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( cmd ) . getStoragePoolDao ( ) ; initAndAssertValidation ( true ) ; }

Target:
public void versionDecreaseLowerVersionThanDC ( ) { createCommandWithOlderVersion ( ) ; org.mockito.Mockito.when ( storagePoolDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFSOldVersion ( ) ) ; setupCpu ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION_UNDER_DC ) ; }
Source:
private void changeStatus ( org.ovirt.engine.core.common.vdscommands.DestroyVmVDSCommandParameters parameters , org.ovirt.engine.core.common.businessentities.VM curVm ) { if ( org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand.getParameters ( ) . getVdsId ( ) . equals ( curVm.getRunOnVds ( ) ) ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . InternalSetVmStatus ( curVm , ( parameters.getGracefully ( ) ? org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown : org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ; } }

Target:
private void changeStatus ( org.ovirt.engine.core.common.vdscommands.DestroyVmVDSCommandParameters parameters , org.ovirt.engine.core.common.businessentities.VM curVm ) { if ( org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand.getParameters ( ) . getVdsId ( ) . equals ( curVm.getRunOnVds ( ) ) ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . InternalSetVmStatus ( curVm , VMStatus.PoweringDown ) ; } }
Source:
private void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ( constants.removeInterface ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getRemoveCommand ( ) ; } } ) ; }

Target:
private void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; initSorting ( ) ; getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ( constants.removeInterface ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getRemoveCommand ( ) ; } } ) ; }
Source:
public void testPrefixChange ( ) { mcr.mockConfigValue ( ConfigValues.OvirtIsoPrefix , "a different prefix" ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.junit.Assert.assertTrue ( "Prefix was changed, no ISOs should be returned" , ( ( java.util.List < org.ovirt.engine.core.compat.RpmVersion > ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) . isEmpty ( ) ) ; }

Target:
public void testPrefixChange ( ) { mcr.mockConfigValue ( ConfigValues.OvirtIsoPrefix , "a different prefix" ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.ovirt.engine.core.bll.GetoVirtISOsTest.checkReturnValueEmpty ( getQuery ( ) ) ; }
Source:
public boolean validate ( org.ovirt.engine.core.config.entity.ConfigKey key , java.lang.String value ) { java.util.Collection < java.lang.String > validValues = key.getValidValues ( ) ; boolean isValid = false ; if ( ( validValues.isEmpty ( ) ) || ( value.equals ( "" ) ) ) { isValid = true ; } else { isValid = org.apache.commons.collections.CollectionUtils.isSubCollection ( java.util.Arrays.asList ( value.split ( "," ) ) , validValues ) ; } return isValid ; }

Target:
public org.ovirt.engine.core.config.entity.helper.ValidationResult validate ( org.ovirt.engine.core.config.entity.ConfigKey key , java.lang.String value ) { java.util.Collection < java.lang.String > validValues = key.getValidValues ( ) ; boolean isValid = false ; if ( ( validValues.isEmpty ( ) ) || ( value.equals ( "" ) ) ) { isValid = true ; } else { isValid = org.apache.commons.collections.CollectionUtils.isSubCollection ( java.util.Arrays.asList ( value.split ( "," ) ) , validValues ) ; } return new org.ovirt.engine.core.config.entity.helper.ValidationResult ( isValid ) ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
protected void updateInputTitle ( java.util.ArrayList < java.lang.String > grayOutReasons , com.google.gwt.dom.client.Element input ) { java.lang.StringBuilder title = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.empty ( ) ) ; for ( java.lang.String reason : grayOutReasons ) { title.append ( reason ) . append ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.space ( ) ) ; } input.setTitle ( title.toString ( ) ) ; }

Target:
protected void updateInputTitle ( java.util.ArrayList < java.lang.String > grayOutReasons , com.google.gwt.dom.client.Element input ) { java.lang.StringBuilder title = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.empty ( ) ) ; for ( java.lang.String reason : grayOutReasons ) { title.append ( reason ) . append ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.space ( ) ) ; } org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( title.toString ( ) ) , input ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.StopRebalanceGlusterVolumeVDSCommand.getBroker ( ) . glusterVolumeRebalanceStop ( org.ovirt.engine.core.vdsbroker.gluster.StopRebalanceGlusterVolumeVDSCommand.getParameters ( ) . getVolumeName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.StopRebalanceGlusterVolumeVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { java.lang.String volumeName = org.ovirt.engine.core.vdsbroker.gluster.StopRebalanceGlusterVolumeVDSCommand.getParameters ( ) . getVolumeName ( ) ; result = org.ovirt.engine.core.vdsbroker.gluster.StopRebalanceGlusterVolumeVDSCommand.getBroker ( ) . glusterVolumeRebalanceStop ( volumeName ) ; org.ovirt.engine.core.vdsbroker.gluster.StopRebalanceGlusterVolumeVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity entity = result.getStatusDetails ( ) ; entity.setStatusTime ( new java.util.Date ( ) ) ; setReturnValue ( entity ) ; }
Source:
private static void dumpActionDetails ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; sb.append ( ( ( "actionType Type: '" + actionType ) + "', " ) ) ; sb.append ( ( "Params: " + parameters ) ) ; org.ovirt.engine.ui.frontend.Frontend.logger.info ( sb.toString ( ) ) ; }

Target:
private static void dumpActionDetails ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( ) ; sb.append ( ( ( "actionType Type: '" + actionType ) + "', " ) ) ; sb.append ( ( "Params: " + parameters ) ) ; org.ovirt.engine.ui.frontend.Frontend.logger.fine ( sb.toString ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.PersistentSetupNetworks , createPersistentSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.LabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( result.getSucceeded ( ) ) { org.ovirt.engine.core.bll.network.host.LabelNicCommand.getReturnValue ( ) . setActionReturnValue ( getLabel ( ) ) ; } else { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.PersistentSetupNetworks , createPersistentSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.LabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( result.getSucceeded ( ) ) { org.ovirt.engine.core.bll.network.host.LabelNicCommand.getReturnValue ( ) . setActionReturnValue ( getLabel ( ) ) ; } else { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , 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.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getDbFacade ( ) . getDiskDao ( ) . get ( org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getParameters ( ) . getDiskId ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getDbFacade ( ) . getDiskDao ( ) . get ( org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getParameters ( ) . getDiskId ( ) , org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetDiskByDiskIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid pickProxyHostFromDataCenter ( ) { org.ovirt.engine.core.compat.Guid dataCenterId = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getDataCenterId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdss = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getVdsDao ( ) . getAllForStoragePoolAndStatus ( dataCenterId , VDSStatus.Up ) ; if ( vdss.isEmpty ( ) ) { logNoProxyAvailable ( dataCenterId ) ; throw new java.lang.IllegalArgumentException ( ) ; } return vdss.get ( 0 ) . getId ( ) ; }

Target:
private org.ovirt.engine.core.compat.Guid pickProxyHostFromDataCenter ( ) { org.ovirt.engine.core.compat.Guid dataCenterId = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getDataCenterId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdss = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getDbFacade ( ) . getVdsDao ( ) . getAllForStoragePoolAndStatus ( dataCenterId , VDSStatus.Up ) ; if ( vdss.isEmpty ( ) ) { logNoProxyAvailable ( dataCenterId ) ; throw new java.lang.IllegalArgumentException ( ) ; } return vdss.get ( 0 ) . getId ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel diskViewType = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; if ( ! ( disksViewRadioGroup.getAllButton ( ) . getValue ( ) ) ) { disksViewRadioGroup.getAllButton ( ) . setValue ( ( ( diskViewType.getEntity ( ) ) == null ) ) ; handleRadioButtonClick ( null ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel diskViewType = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; disksViewRadioGroup.setDiskStorageType ( ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType ) ( diskViewType.getEntity ( ) ) ) ) ; onDiskViewTypeChanged ( ) ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static 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 ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc getVGList ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getVGList ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc ( 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.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.get_image_transfer_session_stats ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { customPropertiesSheetEditor.edit ( profile.getCustomPropertySheet ( ) ) ; }

Target:
public void initCustomPropertySheet ( final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel profile ) { profile.getCustomPropertySheet ( ) . getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsChangable" . equals ( propName ) ) { customPropertiesSheetEditor.setEnabled ( false ) ; } } } ) ; }
Source:
protected void addExternallyManagedVm ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalAction ( VdcActionType.AddVmFromScratch , new org.ovirt.engine.core.common.action.AddVmParameters ( vmStatic ) , createAddExternalVmContext ( vmStatic ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { log.debug ( "Failed adding Externally managed VM '{}'" , vmStatic.getName ( ) ) ; } }

Target:
protected void addExternallyManagedVm ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalAction ( VdcActionType.AddVmFromScratch , new org.ovirt.engine.core.common.action.AddVmParameters ( vmStatic ) , createAddExternalVmContext ( vmStatic ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { log.debug ( "Failed adding Externally managed VM '{}'" , vmStatic.getName ( ) ) ; return ; } resourceManager.getVmManager ( vmStatic.getId ( ) ) . update ( vmStatic ) ; }
Source:
protected java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData > getImportEntities ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData > entities = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { entities.add ( createImportEntityData ( item ) ) ; } java.util.Collections.sort ( entities , new org.ovirt.engine.ui.uicommonweb.Linq.ImportEntityComparator ( ) ) ; return entities ; }

Target:
protected java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData < T > > getImportEntities ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData < T > > entities = new java.util.ArrayList < > ( ) ; for ( T item : org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getSelectedItems ( ) ) { entities.add ( createImportEntityData ( item ) ) ; } java.util.Collections.sort ( entities , new org.ovirt.engine.ui.uicommonweb.Linq.ImportEntityComparator < T > ( ) ) ; return entities ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkName ( ) ) == null ) { return null ; } java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkName ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.NETWORK , VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IS_USED ) ) ; return locks ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkName ( ) ) == null ) { return null ; } java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkName ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.NETWORK , EngineMessage.ACTION_TYPE_FAILED_NETWORK_IS_USED ) ) ; return locks ; }
Source:
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 ) ; }

Target:
public 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.storage.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:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } if ( isLunsAlreadyPartOfStorageDomains ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) ) { return false ; } return true ; }

Target:
protected boolean canAddDomain ( ) { if ( ( ( ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) == null ) || ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) . isEmpty ( ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV ) ; } if ( isLunsAlreadyInUse ( org.ovirt.engine.core.bll.storage.AddSANStorageDomainCommand.getParameters ( ) . getLunIds ( ) ) ) { return false ; } return true ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.IscsiBond iscsiBond ) { validateParameters ( iscsiBond , "name" ) ; org.ovirt.engine.api.model.IscsiBond entity = getMapper ( org.ovirt.engine.api.model.IscsiBond.class , org.ovirt.engine.api.model.IscsiBond.class ) . map ( iscsiBond , null ) ; entity.setStoragePoolId ( dataCenterId ) ; return performCreate ( ActionType.AddIscsiBond , new org.ovirt.engine.core.common.action.AddIscsiBondParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.IscsiBond iscsiBond ) { validateParameters ( iscsiBond , "name" ) ; org.ovirt.engine.api.model.IscsiBond entity = getMapper ( org.ovirt.engine.api.model.IscsiBond.class , org.ovirt.engine.api.model.IscsiBond.class ) . map ( iscsiBond , null ) ; entity.setStoragePoolId ( dataCenterId ) ; return performCreate ( ActionType.AddIscsiBond , new org.ovirt.engine.core.common.action.AddIscsiBondParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }