auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public void getClusterFeaturesByVersionAndCategory ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > > aQuery , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.mode.ApplicationMode category ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SetConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByVersionAndCategory , new org.ovirt.engine.core.common.queries.GetClusterFeaturesByVersionAndCategoryParameters ( version , category ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult canDoSnapshot ( ) { if ( ! ( org.ovirt.engine.core.bll.validator.LiveSnapshotValidator.isLiveSnapshotEnabled ( compatibilityVersion ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DATA_CENTER_VERSION_DOESNT_SUPPORT_LIVE_SNAPSHOT ) ; } if ( ( ( vds ) != null ) && ( ! ( vds.getLiveSnapshotSupport ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QEMU_UNSUPPORTED_OPERATION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateSnapshot ( ) { if ( ! ( org.ovirt.engine.core.bll.validator.LiveSnapshotValidator.isLiveSnapshotEnabled ( compatibilityVersion ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DATA_CENTER_VERSION_DOESNT_SUPPORT_LIVE_SNAPSHOT ) ; } if ( ( ( vds ) != null ) && ( ! ( vds.getLiveSnapshotSupport ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QEMU_UNSUPPORTED_OPERATION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void setUpGetBallooningExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , true ) ; } }

Target:
private void setUpGetBallooningExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( QueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , true ) ; } }
Source:
public boolean validateAndSetQuota ( ) { if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return org.ovirt.engine.core.bll.AddDiskCommand.getQuotaManager ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.AddDiskCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; } return true ; }

Target:
public boolean validateAndSetQuota ( ) { if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getStoragePool ( ) ) == null ) { setStoragePoolId ( org.ovirt.engine.core.bll.AddDiskCommand.getStorageDomain ( ) . getstorage_pool_id ( ) . getValue ( ) ) ; } return org.ovirt.engine.core.bll.AddDiskCommand.getQuotaManager ( ) . validateAndSetStorageQuota ( org.ovirt.engine.core.bll.AddDiskCommand.getStoragePool ( ) , getStorageQuotaListParameters ( ) , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; } return true ; }
Source:
public org.ovirt.engine.core.common.osinfo.OsRepository getOsRepository ( ) { return org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isCompatibleWithOs ( ) { java.util.List < java.lang.String > networkDevices = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getNetworkDevices ( osId , version ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > interfaceTypes = new java.util.ArrayList < > ( ) ; for ( java.lang.String networkDevice : networkDevices ) { interfaceTypes.add ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.valueOf ( networkDevice ) ) ; } return ! ( interfaceTypes.contains ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.forValue ( nic.getType ( ) ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_INTERFACE_TYPE_IS_NOT_SUPPORTED_BY_OS ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private java.lang.String GetValue ( java.lang.Object obj ) { if ( obj instanceof org.ovirt.engine.core.common.businessentities.VM ) { return ( ( org.ovirt.engine.core.common.businessentities.VM ) ( obj ) ) . getVmName ( ) ; } if ( obj instanceof org.ovirt.engine.core.common.businessentities.vm_pools ) { return ( ( org.ovirt.engine.core.common.businessentities.vm_pools ) ( obj ) ) . getvm_pool_name ( ) ; } throw new org.ovirt.engine.core.compat.NotImplementedException ( ) ; }

Target:
private java.lang.String GetValue ( java.lang.Object obj ) { if ( obj instanceof org.ovirt.engine.core.common.businessentities.VM ) { return ( ( org.ovirt.engine.core.common.businessentities.VM ) ( obj ) ) . getVmName ( ) ; } if ( obj instanceof org.ovirt.engine.core.common.businessentities.VmPool ) { return ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( obj ) ) . getVmPoolName ( ) ; } throw new org.ovirt.engine.core.compat.NotImplementedException ( ) ; }
Source:
protected void markImageAsIllegal ( ) { setImageStatus ( ImageStatus.ILLEGAL ) ; }

Target:
protected void lockImageWithCompensation ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getRelevantDiskImage ( ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( diskImage.getImage ( ) , diskImage.getImageStatus ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; setImageStatus ( ImageStatus.LOCKED ) ; return null ; } } ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; host.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; managementNetworkUtil = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil.class ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; host.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; final org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = new org.ovirt.engine.core.common.businessentities.VdsDynamic ( ) ; vdsDynamic.setSupportedClusterLevels ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.TEST_VERSION ) ; host.setDynamicData ( vdsDynamic ) ; bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( mockNetworkExclusivenessValidatorResolver.resolveNetworkExclusivenessValidator ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.TEST_SUPPORTED_VERSIONS ) ) . thenReturn ( mockNetworkExclusivenessValidator ) ; }
Source:
private boolean hasFreeSpace ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain ) { if ( ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ) . getvolume_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ) ) { return org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.hasSpaceForRequest ( storageDomain , ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ) . getSizeInGigabytes ( ) ) ; } else { return org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( storageDomain ) ; } }

Target:
private boolean hasFreeSpace ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain ) { if ( ( getDiskImageInfo ( ) . getvolume_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ) ) { return doesStorageDomainhaveSpaceForRequest ( storageDomain ) ; } return isStorageDomainBelowThresholds ( storageDomain ) ; }
Source:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }

Target:
public void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsNonEmptyCollectionConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void testPrimaryKeyValidation ( ) { org.ovirt.engine.core.common.businessentities.storage.RepoImage newRepoFileMap = org.ovirt.engine.core.dao.RepoFileMetaDataDAOTest.getNewIsoRepoFile ( ) ; org.ovirt.engine.core.dao.RepoFileMetaDataDAOTest.getNewIsoRepoFile ( ) ; repoFileMetaDataDao.addRepoFileMap ( newRepoFileMap ) ; try { repoFileMetaDataDao.addRepoFileMap ( newRepoFileMap ) ; } catch ( java.lang.Exception e ) { org.junit.Assert.assertTrue ( true ) ; } }

Target:
public void testPrimaryKeyValidation ( ) { org.ovirt.engine.core.common.businessentities.storage.RepoImage newRepoFileMap = org.ovirt.engine.core.dao.RepoFileMetaDataDAOTest.getNewIsoRepoFile ( ) ; repoFileMetaDataDao.addRepoFileMap ( newRepoFileMap ) ; org.junit.Assert.assertTrue ( "Able to insert new file once" , true ) ; repoFileMetaDataDao.addRepoFileMap ( newRepoFileMap ) ; }
Source:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.VmDiskOperationParameterBase ( vmId , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }

Target:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.VmDiskOperationParameterBase ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( diskImageGuid , vmId ) , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
protected boolean canDoAction ( ) { java.lang.String directory = org.ovirt.engine.core.bll.AddUserCommand.getParameters ( ) . getDirectory ( ) ; org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.AddUserCommand.getParameters ( ) . getId ( ) ; directoryUser = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( directory ) . RunAdAction ( AdActionType.GetAdUserByUserId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( directory , id ) ) . getReturnValue ( ) ) ) ; if ( ( directoryUser ) == null ) { addCanDoActionMessage ( VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY ) ; return false ; } addCustomValue ( "NewUserName" , directoryUser.getUserName ( ) ) ; return true ; }

Target:
protected boolean canDoAction ( ) { java.lang.String directory = org.ovirt.engine.core.bll.AddUserCommand.getParameters ( ) . getDirectory ( ) ; org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.AddUserCommand.getParameters ( ) . getId ( ) ; directoryUser = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( directory ) . runAdAction ( AdActionType.GetAdUserByUserId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( directory , id ) ) . getReturnValue ( ) ) ) ; if ( ( directoryUser ) == null ) { addCanDoActionMessage ( VdcBllMessages.USER_MUST_EXIST_IN_DIRECTORY ) ; return false ; } addCustomValue ( "NewUserName" , directoryUser.getUserName ( ) ) ; return true ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters tempVar = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; tempVar.setShouldBeLogged ( false ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , tempVar ) ; } org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getDbUserDao ( ) . remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveUserCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters tempVar = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; tempVar.setShouldBeLogged ( false ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , tempVar ) ; } dbUserDao.remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveUserCommand.setSucceeded ( true ) ; }
Source:
public static org.ovirt.engine.core.utils.EngineLocalConfig getInstance ( ) { return org.ovirt.engine.core.utils.EngineLocalConfig.instance ; }

Target:
public static org.ovirt.engine.core.utils.EngineLocalConfig getInstance ( java.util.Map < java.lang.String , java.lang.String > values ) { if ( values != null ) { org.ovirt.engine.core.utils.EngineLocalConfig.instance = new org.ovirt.engine.core.utils.EngineLocalConfig ( values ) ; } else { if ( ( org.ovirt.engine.core.utils.EngineLocalConfig.instance ) == null ) { synchronized ( org.ovirt.engine.core.utils.EngineLocalConfig.class ) { if ( ( org.ovirt.engine.core.utils.EngineLocalConfig.instance ) == null ) { org.ovirt.engine.core.utils.EngineLocalConfig.instance = new org.ovirt.engine.core.utils.EngineLocalConfig ( ) ; } } } } return org.ovirt.engine.core.utils.EngineLocalConfig.instance ; }
Source:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.core.compat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.core.compat.EventArgs ( ) ) ; }

Target:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicompat.EventArgs ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addDiskDevice ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid deviceId , java.lang.Boolean isPlugged , java.lang.Boolean isReadOnly , boolean isUsingScsiReservation ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addDiskDevice ( vmId , deviceId , isPlugged , isReadOnly , "" , isUsingScsiReservation ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmDevice addDiskDevice ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid deviceId , java.lang.Boolean isPlugged , java.lang.Boolean isReadOnly , java.lang.String address , boolean isUsingScsiReservation ) { return addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( deviceId , vmId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , org.ovirt.engine.core.bll.utils.VmDeviceUtils.EMPTY_SPEC_PARAMS , isPlugged , isReadOnly , address , null , isUsingScsiReservation ) ; }
Source:
private static java.lang.Boolean AssignBoolValue ( java.util.Map < java.lang.String , java.lang.Object > input , java.lang.String name ) { if ( input.containsKey ( name ) ) { if ( ( input.get ( name ) ) instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( input.get ( name ) ) ) ; } return java.lang.Boolean.parseBoolean ( input.get ( name ) . toString ( ) ) ; } return java.lang.Boolean.FALSE ; }

Target:
private static java.lang.Boolean assignBoolValue ( java.util.Map < java.lang.String , java.lang.Object > input , java.lang.String name ) { if ( input.containsKey ( name ) ) { if ( ( input.get ( name ) ) instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( input.get ( name ) ) ) ; } return java.lang.Boolean.parseBoolean ( input.get ( name ) . toString ( ) ) ; } return java.lang.Boolean.FALSE ; }
Source:
public 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 getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected org.ovirt.engine.ui.common.widget.AbstractUiCommandButton createCommandButton ( java.lang.String label , java.lang.String uniqueId ) { if ( VmBasedWidgetSwitchModeCommand.NAME.equals ( uniqueId ) ) { org.ovirt.engine.ui.common.widget.LeftAlignedUiCommandButton leftAlignedUiCommandButton = new org.ovirt.engine.ui.common.widget.LeftAlignedUiCommandButton ( label ) ; leftAlignedUiCommandButton.setCustomContentStyle ( style.showAdvancedOptionsButton ( ) ) ; return leftAlignedUiCommandButton ; } return super . createCommandButton ( label , uniqueId ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.UiCommandButton createCommandButton ( java.lang.String label , java.lang.String uniqueId ) { if ( VmBasedWidgetSwitchModeCommand.NAME.equals ( uniqueId ) ) { org.ovirt.engine.ui.common.widget.LeftAlignedUiCommandButton leftAlignedUiCommandButton = new org.ovirt.engine.ui.common.widget.LeftAlignedUiCommandButton ( label ) ; return leftAlignedUiCommandButton ; } return super . createCommandButton ( label , uniqueId ) ; }
Source:
public void testChangeValueAfterAdd ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.AddTag ( tag ) ; tag.settag_name ( "tag2" ) ; org.ovirt.engine.core.common.businessentities.Tags tagFromDirector = tagsDirector.GetTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertNotNull ( tagFromDirector ) ; org.junit.Assert.assertEquals ( "tag1" , tagFromDirector.gettag_name ( ) ) ; }

Target:
public void testChangeValueAfterAdd ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "tag2" ) ; org.ovirt.engine.core.common.businessentities.Tags tagFromDirector = tagsDirector.GetTagById ( tag.gettag_id ( ) ) ; org.junit.Assert.assertNotNull ( tagFromDirector ) ; org.junit.Assert.assertEquals ( "tag1" , tagFromDirector.gettag_name ( ) ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel ) ( result.getState ( ) ) ) ; if ( ( ( java.lang.Boolean ) ( model.getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { localModel.postOnSaveInternalWithImport ( result.getReturnValue ( ) ) ; } else { localModel.PostOnSaveInternal ( result.getReturnValue ( ) ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel ) ( result.getState ( ) ) ) ; if ( ( ( java.lang.Boolean ) ( model.getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { localModel.postOnSaveInternalWithImport ( result.getReturnValue ( ) ) ; } else { localModel.PostOnSaveInternal ( result.getReturnValue ( ) ) ; } }
Source:
public void starting ( org.junit.runner.Description description ) { java.lang.String seedProperty = java.lang.System.getProperty ( org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; java.lang.Long seed ; try { seed = java.lang.Long.parseLong ( seedProperty ) ; } catch ( java.lang.NumberFormatException e ) { org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.infoFormat ( "Property \"{0}\" was not set, using System.currentTimeMillis() as a seed." , org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; seed = java.lang.System.currentTimeMillis ( ) ; } org.ovirt.engine.core.utils.RandomUtils.instance ( ) . setSeed ( seed ) ; org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.info ( ( "Running test with random seed: " + ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . getSeed ( ) ) ) ) ; }

Target:
public void starting ( org.junit.runner.Description description ) { java.lang.String seedProperty = java.lang.System.getProperty ( org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; java.lang.Long seed ; try { seed = java.lang.Long.parseLong ( seedProperty ) ; } catch ( java.lang.NumberFormatException e ) { org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.info ( "Property '{}' was not set, using System.currentTimeMillis() as a seed." , org.ovirt.engine.core.utils.RandomUtilsSeedingRule.RANDOM_SEED_PROPERTY ) ; seed = java.lang.System.currentTimeMillis ( ) ; } org.ovirt.engine.core.utils.RandomUtilsSeedingRule.log.info ( "Running test with random seed '{}'" , seed ) ; org.ovirt.engine.core.utils.RandomUtils.instance ( ) . setSeed ( seed ) ; }
Source:
public void removeAll ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ids ) { getCallsHandler ( ) . executeModification ( "DeleteGlusterServerHooksByGuids" , getCustomMapSqlParameterSource ( ) . addValue ( "ids" , org.apache.commons.lang.StringUtils.join ( ids , ',' ) ) ) ; getCallsHandler ( ) . executeModification ( "DeleteGlusterHooksByGuids" , getCustomMapSqlParameterSource ( ) . addValue ( "ids" , org.apache.commons.lang.StringUtils.join ( ids , ',' ) ) ) ; }

Target:
public void removeAll ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ids ) { getCallsHandler ( ) . executeModification ( "DeleteGlusterHooksByIds" , getCustomMapSqlParameterSource ( ) . addValue ( "ids" , org.apache.commons.lang.StringUtils.join ( ids , ',' ) ) ) ; }
Source:
public void endSuccessfully ( ) { updateDestinitationImageId ( ) ; endCreateAllSnapshots ( ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( enclosingCommand.getParameters ( ) . getDestinationImageId ( ) , ImageStatus.LOCKED ) ; }

Target:
public void endSuccessfully ( ) { endCreateAllSnapshots ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinitationImageId ( parameters ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( parameters.getDestinationImageId ( ) , ImageStatus.LOCKED ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , true ) ; enclosingCommand.setExecutionContext ( null ) ; }
Source:
public void executeCommandWhenFailed ( ) { setupMocks ( ) ; org.mockito.Mockito.doThrow ( new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.GlusterHookListException ) ) . when ( hookSyncJob ) . refreshHooksInCluster ( getCluster ( ) , true ) ; try { cmd.executeCommand ( ) ; org.junit.jupiter.api.Assertions.fail ( "Expected EngineException" ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.junit.jupiter.api.Assertions.assertEquals ( EngineError.GlusterHookListException , e.getErrorCode ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.GLUSTER_HOOK_REFRESH_FAILED , cmd.getAuditLogTypeValue ( ) ) ; } }

Target:
public void executeCommandWhenFailed ( ) { setupMocks ( ) ; org.mockito.Mockito.doThrow ( new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.GlusterHookListException ) ) . when ( hookSyncJob ) . refreshHooksInCluster ( getCluster ( ) , true ) ; org.ovirt.engine.core.common.errors.EngineException e = org.junit.jupiter.api.Assertions.assertThrows ( org.ovirt.engine.core.common.errors.EngineException.class , cmd :: executeCommand ) ; org.junit.jupiter.api.Assertions.assertEquals ( EngineError.GlusterHookListException , e.getErrorCode ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.GLUSTER_HOOK_REFRESH_FAILED , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNetworkIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.compat.Guid networkId = attachment.getNetworkId ( ) ; java.lang.String networkName = attachment.getNetworkName ( ) ; boolean bothIdentificationSet = ( networkId != null ) && ( networkName != null ) ; java.lang.String [ ] replacements = createIncoherentNetworkIdentificationErrorReplacements ( attachment.getId ( ) , networkId , networkName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_ATTACHMENT_REFERENCES_NETWORK_INCOHERENTLY , replacements ) . when ( ( bothIdentificationSet && ( networkNameAndNetworkIdIsIncoherent ( networkId , networkName ) ) ) ) ; }

Target:
org.ovirt.engine.core.bll.ValidationResult notMovingLabeledNetworkToDifferentNic ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.common.businessentities.network.Network movedNetwork = existingNetworkRelatedToAttachment ( attachment ) ; if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( movedNetwork ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment = attachmentsById.get ( attachment.getId ( ) ) ; boolean movedToDifferentNic = ! ( existingAttachment.getNicId ( ) . equals ( attachment.getNicId ( ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC_ENTITY , movedNetwork.getLabel ( ) ) ) . when ( movedToDifferentNic ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VM mapToVM ( org.ovirt.engine.api.model.VmPool model , org.ovirt.engine.core.common.businessentities.VmTemplate template ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = getMapper ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , org.ovirt.engine.core.common.businessentities.VmStatic.class ) . map ( template , null ) ; org.ovirt.engine.core.common.businessentities.VM vm = getMapper ( org.ovirt.engine.api.model.VmPool.class , org.ovirt.engine.core.common.businessentities.VM.class ) . map ( model , new org.ovirt.engine.core.common.businessentities.VM ( vmStatic , new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) , new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ) ) ; return vm ; }

Target:
protected org.ovirt.engine.api.model.VmPool deprecatedPopulate ( org.ovirt.engine.api.model.VmPool model , org.ovirt.engine.api.model.VmPool entity ) { if ( ( model.isSetSize ( ) ) && ( ( model.getSize ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.VM vm = getVM ( model ) ; model.setTemplate ( new org.ovirt.engine.api.model.Template ( ) ) ; model.getTemplate ( ) . setId ( vm.getVmtGuid ( ) . toString ( ) ) ; model = getMapper ( org.ovirt.engine.core.common.businessentities.VM.class , org.ovirt.engine.api.model.VmPool.class ) . map ( vm , model ) ; } return model ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.String object ) { return null ; }

Target:
protected void initAppTable ( ) { appTable = new org.ovirt.engine.ui.common.widget.editor.ListModelObjectCellTable ( ) ; appTable.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String object ) { return object ; } } , org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.installedApp ( ) ) ; appTable.getElement ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; com.google.gwt.user.client.ui.ScrollPanel appPanel = new com.google.gwt.user.client.ui.ScrollPanel ( ) ; appPanel.add ( appTable ) ; subTabLayoutPanel.add ( appPanel , org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.importVmApplicationslSubTabLabel ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addNetworkInterfaceDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , boolean plugged ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , VmDeviceGeneralType.INTERFACE , VmDeviceType.BRIDGE , java.util.Collections.< java.lang.String , java.lang.Object > emptyMap ( ) , plugged , false , null ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addNetworkInterfaceDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , boolean plugged , java.util.Map < java.lang.String , java.lang.String > customProp ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , VmDeviceGeneralType.INTERFACE , VmDeviceType.BRIDGE , java.util.Collections.< java.lang.String , java.lang.Object > emptyMap ( ) , plugged , false , customProp ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler > initTaskHandlers ( ) { return java.util.Arrays.< org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler > asList ( new org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCreateTaskHandler ( this ) , new org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCopyTaskHandler ( this ) ) ; }

Target:
protected void executeCommand ( ) { setupParameters ( ) ; persistCommand ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddDisk , createAddDiskParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setNextPhase ( ImportRepoImageParameters.Phase.DOWNLOAD ) ; persistCommand ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.setSucceeded ( true ) ; }
Source:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.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 java.lang.Void call ( ) { proxy.deleteSnapshot ( snapshotId.toString ( ) ) ; return null ; }

Target:
public java.lang.Boolean call ( ) { try { proxy.deleteSnapshot ( snapshotId.toString ( ) ) ; return true ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { return false ; } throw ex ; } }
Source:
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 ) ; }

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:
private org.ovirt.engine.core.common.businessentities.Quota mockBasicQuota ( ) { ( dbCalls ) ++ ; org.ovirt.engine.core.common.businessentities.Quota quota = new org.ovirt.engine.core.common.businessentities.Quota ( ) ; quota.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; quota.setStoragePoolId ( storage_pool.getId ( ) ) ; quota.setDescription ( "My Quota description" ) ; quota.setQuotaName ( "My Quota Name" ) ; quota.setGraceStoragePercentage ( 20 ) ; quota.setGraceVdsGroupPercentage ( 20 ) ; quota.setThresholdStoragePercentage ( 80 ) ; quota.setThresholdVdsGroupPercentage ( 80 ) ; quota.setQuotaEnforcementType ( QuotaEnforcementTypeEnum.HARD_ENFORCEMENT ) ; return quota ; }

Target:
private org.ovirt.engine.core.common.businessentities.Quota mockBasicQuota ( ) { ( dbCalls ) ++ ; org.ovirt.engine.core.common.businessentities.Quota quota = new org.ovirt.engine.core.common.businessentities.Quota ( ) ; quota.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; quota.setStoragePoolId ( storage_pool.getId ( ) ) ; quota.setDescription ( "My Quota description" ) ; quota.setQuotaName ( "My Quota Name" ) ; quota.setGraceStoragePercentage ( 20 ) ; quota.setGraceVdsGroupPercentage ( 20 ) ; quota.setThresholdStoragePercentage ( 80 ) ; quota.setThresholdVdsGroupPercentage ( 80 ) ; quota.setQuotaEnforcementType ( QuotaEnforcementTypeEnum.HARD_ENFORCEMENT ) ; return quota ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc shutdownHost ( int reboot ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.shutdownHost ( reboot ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public javax.ws.rs.core.Response previewSnapshot ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters tryBackParams = new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( guid , asGuid ( action.getSnapshot ( ) . getId ( ) ) ) ; javax.ws.rs.core.Response response = doAction ( VdcActionType.TryBackToAllSnapshotsOfVm , tryBackParams , action ) ; return response ; }

Target:
public javax.ws.rs.core.Response previewSnapshot ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "snapshot.id" ) ; org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters tryBackParams = new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( guid , asGuid ( action.getSnapshot ( ) . getId ( ) ) ) ; javax.ws.rs.core.Response response = doAction ( VdcActionType.TryBackToAllSnapshotsOfVm , tryBackParams , action ) ; return response ; }
Source:
private void deletePreviewedVolume ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderSnapshot ) { org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . setDestinationImageId ( cinderSnapshot.getImageId ( ) ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . setCinderDiskToBeRemoved ( cinderSnapshot ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . setRemoveParent ( false ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getCinderBroker ( ) . deleteVolumeUnknownType ( cinderSnapshot ) ; }

Target:
private void deletePreviewedVolume ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderSnapshot ) { org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . setDestinationImageId ( cinderSnapshot.getImageId ( ) ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . setCinderDiskToBeRemoved ( cinderSnapshot ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . setRemoveParent ( false ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getCinderBroker ( ) . deleteVolumeByClassificationType ( cinderSnapshot ) ; }