auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testBlockSettingHaOnHostedEngine ( ) { prepareVmToPassValidate ( ) ; command.initEffectiveCompatibilityVersion ( ) ; vm.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; vmStatic.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; command.getParameters ( ) . getVm ( ) . setAutoStartup ( true ) ; boolean validInput = command.validate ( ) ; org.junit.Assert.assertFalse ( validInput ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_CANNOT_BE_HIGHLY_AVAILABLE_AND_HOSTED_ENGINE.name ( ) ) ) ; }

Target:
public void testBlockSettingHaOnHostedEngine ( ) { prepareVmToPassValidate ( ) ; command.initEffectiveCompatibilityVersion ( ) ; vm.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; vmStatic.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; command.getParameters ( ) . getVm ( ) . setAutoStartup ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_CANNOT_BE_HIGHLY_AVAILABLE_AND_HOSTED_ENGINE ) ; }
Source:
public static void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
public 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 ) ; }

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:
private void validateEmail ( java.lang.String propName , java.lang.String propVal ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( propVal ) ) ) { try { new javax.mail.internet.InternetAddress ( propVal ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( ( ( org.ovirt.engine.core.notifier.utils.NotificationProperties.GENERIC_MESSAGE ) + "invalid format in '%s'" ) , propName ) , ex ) ; } } }

Target:
public javax.mail.internet.InternetAddress validateEmail ( java.lang.String property ) { try { javax.mail.internet.InternetAddress ret = null ; java.lang.String value = getProperty ( property ) ; if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( value ) ) ) { ret = new javax.mail.internet.InternetAddress ( value ) ; } return ret ; } catch ( java.lang.Exception ex ) { throw new java.lang.IllegalArgumentException ( java.lang.String.format ( ( ( org.ovirt.engine.core.notifier.utils.NotificationProperties.GENERIC_MESSAGE ) + "invalid format in '%s'" ) , property ) , ex ) ; } }
Source:
protected void configure ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ConsoleOptionsFrontendPersister.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleUtilsImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.presenter.PluginActionButtonHandler.class ) . in ( com.google.inject.Singleton.class ) ; }

Target:
protected void configure ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ConsoleOptionsFrontendPersister.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleUtilsImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.presenter.PluginActionButtonHandler.class ) . asEagerSingleton ( ) ; }
Source:
public static final java.lang.String fixupKeyFingerprintHash ( java.lang.String fingerprint ) { java.lang.String h = fingerprint.split ( ":" , 2 ) [ 0 ] ; try { if ( ( h.length ( ) ) == 2 ) { java.lang.Integer.parseInt ( h , 16 ) ; fingerprint = "MD5:" + fingerprint ; } } catch ( java.lang.NumberFormatException e ) { } return fingerprint ; }

Target:
private static byte [ ] getByteArrayOfData ( java.io.DataInputStream dataInputStream ) throws java.io.IOException { byte [ ] contents = new byte [ dataInputStream.readInt ( ) ] ; if ( ( dataInputStream.read ( contents , 0 , contents.length ) ) != ( contents.length ) ) { throw new java.io.IOException ( "Invalid ASN1 array" ) ; } return contents ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed ) { getView ( ) . updateReportsPanel ( getModel ( ) . getUrl ( ) , getModel ( ) . getParams ( ) ) ; } else { checkUpdateReportsPanel ( getModel ( ) . getUrl ( ) , getModel ( ) . getParams ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed ) && ( ( getModel ( ) . getUri ( ) ) != null ) ) { getView ( ) . updateReportsPanel ( getModel ( ) . getUrl ( ) , getModel ( ) . getParams ( ) ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.DiskImage createDiskImageWithExcessData ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage , org.ovirt.engine.core.compat.Guid sdId ) { org.ovirt.engine.core.common.businessentities.DiskImage dummy = org.ovirt.engine.core.common.businessentities.DiskImage.copyOf ( diskImage ) ; dummy.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( sdId ) ) ) ; dummy.getSnapshots ( ) . addAll ( org.ovirt.engine.core.bll.ImagesHandler.getAllImageSnapshots ( dummy.getImageId ( ) ) ) ; return dummy ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImageWithExcessData ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.core.compat.Guid sdId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage dummy = org.ovirt.engine.core.common.businessentities.storage.DiskImage.copyOf ( diskImage ) ; dummy.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( sdId ) ) ) ; dummy.getSnapshots ( ) . addAll ( org.ovirt.engine.core.bll.ImagesHandler.getAllImageSnapshots ( dummy.getImageId ( ) ) ) ; return dummy ; }
Source:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }

Target:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic staticData = getVds ( ) . getStaticData ( ) ; getCompensationContext ( ) . snapshotEntity ( staticData ) ; staticData.setvds_group_id ( targetClusterId ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . update ( staticData ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic staticData = getVds ( ) . getStaticData ( ) ; getCompensationContext ( ) . snapshotEntity ( staticData ) ; staticData.setVdsGroupId ( targetClusterId ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . update ( staticData ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
private void updateDestinitationImageId ( ) { org.ovirt.engine.core.common.businessentities.Image oldLeaf = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . get ( enclosingCommand.getParameters ( ) . getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > allImages = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( oldLeaf.getDiskId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : allImages ) { if ( image.getImage ( ) . isActive ( ) ) { enclosingCommand.getParameters ( ) . setDestinationImageId ( image.getImageId ( ) ) ; break ; } } }

Target:
private void updateDestinitationImageId ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.Image oldLeaf = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . get ( parameters.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > allImages = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( oldLeaf.getDiskId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : allImages ) { if ( image.getImage ( ) . isActive ( ) ) { parameters.setDestinationImageId ( image.getImageId ( ) ) ; break ; } } }
Source:
public static void getoVirtISOsList ( 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 ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public static void getDefaultSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
private boolean properiesRequiringVmUpdateDeviceWereUpdated ( ) { return ( ! ( org.apache.commons.lang.StringUtils.equals ( oldIface.getNetworkName ( ) , getNetworkName ( ) ) ) ) || ( ( oldIface.isLinked ( ) ) != ( getInterface ( ) . isLinked ( ) ) ) ; }

Target:
private boolean properiesRequiringVmUpdateDeviceWereUpdated ( ) { return ( ! ( org.apache.commons.lang.StringUtils.equals ( oldIface.getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getNetworkName ( ) ) ) ) || ( ( oldIface.isLinked ( ) ) != ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ) ; }
Source:
public void testNetworkCanBeAttached ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworkCanBeAttachedNetworkAttachmentCannotBeAddedOnVlanInterfaces ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; java.lang.String networkName = "networkName" ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( networkName ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NETWORK_NAME , networkName ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , vdsNetworkInterface.getName ( ) ) ) ) ; }
Source:
public void testValidateModifiedBondSlavesWhenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) ) ; }

Target:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ) ) ; }
Source:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( storageId ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void canDoActionSucceedsOnDiskDomainCheckWhenStorageGuidInParamsMismatches ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVmWithDisk ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
public javax.ws.rs.core.Response export ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.common.action.MoveVmParameters params = new org.ovirt.engine.core.common.action.MoveVmParameters ( guid , getStorageDomainId ( action ) ) ; if ( ( action.isSetExclusive ( ) ) && ( action.isExclusive ( ) ) ) { params.setForceOverride ( true ) ; } if ( ( action.isSetDiscardSnapshots ( ) ) && ( action.isDiscardSnapshots ( ) ) ) { params.setCopyCollapse ( true ) ; } return doAction ( VdcActionType.ExportVm , params , action ) ; }

Target:
public javax.ws.rs.core.Response move ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; return doAction ( VdcActionType.MoveVm , new org.ovirt.engine.core.common.action.MoveVmParameters ( guid , getStorageDomainId ( action ) ) , action ) ; }
Source:
protected void executeCommand ( ) { getMacPoolDao ( ) . update ( getMacPoolEntity ( ) ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDcSingleton.getInstance ( ) . modifyPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }

Target:
protected void executeCommand ( ) { registerRollbackHandler ( new org.ovirt.engine.core.bll.UpdateMacPoolCommand.CustomTransactionCompletionListener ( ) ) ; getMacPoolDao ( ) . update ( getMacPoolEntity ( ) ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDcSingleton.getInstance ( ) . modifyPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }
Source:
private boolean handleQueryError ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel model ) { model.setMessage ( null ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { model.setMessage ( org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . getAppErrorsTranslator ( ) . TranslateErrorTextSingle ( returnValue.getExceptionString ( ) ) ) ; getSearchInProgress ( ) . setEntity ( false ) ; return true ; } return false ; }

Target:
private boolean handleQueryError ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel model ) { model.setMessage ( null ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { model.setMessage ( org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . getAppErrorsTranslator ( ) . translateErrorTextSingle ( returnValue.getExceptionString ( ) ) ) ; getSearchInProgress ( ) . setEntity ( false ) ; return true ; } return false ; }
Source:
public void testGetAllByStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > result = dao.getAllByStatus ( StoragePoolStatus.Up ) ; org.junit.Assert.assertNotNull ( "list of returned pools in status up shouldn't be null" , result ) ; org.junit.Assert.assertEquals ( "wrong number of storage pools returned for up status" , 5 , result.size ( ) ) ; result = dao.getAllByStatus ( StoragePoolStatus.Maintenance ) ; org.junit.Assert.assertNotNull ( "list of returned pools in maintenance status shouldn't be null" , result ) ; org.junit.Assert.assertEquals ( "wrong number of storage pool returned for maintenance status" , 0 , result.size ( ) ) ; }

Target:
public void testGetAllByStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > result = dao.getAllByStatus ( StoragePoolStatus.Up ) ; org.junit.Assert.assertNotNull ( "list of returned pools in status up shouldn't be null" , result ) ; org.junit.Assert.assertEquals ( "wrong number of storage pools returned for up status" , 6 , result.size ( ) ) ; result = dao.getAllByStatus ( StoragePoolStatus.Maintenance ) ; org.junit.Assert.assertNotNull ( "list of returned pools in maintenance status shouldn't be null" , result ) ; org.junit.Assert.assertEquals ( "wrong number of storage pool returned for maintenance status" , 0 , result.size ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.LdapGroup getAdGroupWithDomain ( int index ) { org.ovirt.engine.core.common.businessentities.LdapGroup adGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; adGroup.setid ( GUIDS [ index ] ) ; adGroup.setname ( ( ( ( DOMAIN ) + "/" ) + ( NAMES [ index ] ) ) ) ; adGroup.setdomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return adGroup ; }

Target:
private org.ovirt.engine.core.common.businessentities.LdapGroup getDirectoryGroup ( int index ) { org.ovirt.engine.core.common.businessentities.LdapGroup directoryGroup = new org.ovirt.engine.core.common.businessentities.LdapGroup ( ) ; directoryGroup.setid ( GUIDS [ index ] ) ; directoryGroup.setname ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ; directoryGroup.setdomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return directoryGroup ; }
Source:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getimage_group_id ( ) ) ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDAO ( ) . get ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDAO ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ; } } super . endWithFailure ( ) ; }

Target:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getimage_group_id ( ) ) ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . get ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDynamicDao ( ) . remove ( org.ovirt.engine.core.bll.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ) ; } } super . endWithFailure ( ) ; }
Source:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , 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.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void GetRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.MapConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
public final boolean IsUpdateValid ( java.lang.Object source , java.lang.Object destination , java.lang.Enum < ? > status , boolean hotsetEnabled ) { if ( ( source.getClass ( ) ) != ( destination.getClass ( ) ) ) { return false ; } for ( java.lang.String fieldName : org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields ( source , destination ) ) { if ( ! ( IsFieldUpdatable ( status , fieldName , null , hotsetEnabled ) ) ) { org.ovirt.engine.core.utils.ObjectIdentityChecker.log.warn ( "ObjectIdentityChecker.IsUpdateValid:: Not updatable field '{}' was updated" , fieldName ) ; return false ; } } return true ; }

Target:
public final boolean isUpdateValid ( java.lang.Object source , java.lang.Object destination , java.lang.Enum < ? > status , boolean hotsetEnabled ) { if ( ( source.getClass ( ) ) != ( destination.getClass ( ) ) ) { return false ; } for ( java.lang.String fieldName : org.ovirt.engine.core.utils.ObjectIdentityChecker.getChangedFields ( source , destination ) ) { if ( ! ( isFieldUpdatable ( status , fieldName , null , hotsetEnabled ) ) ) { org.ovirt.engine.core.utils.ObjectIdentityChecker.log.warn ( "ObjectIdentityChecker.isUpdateValid:: Not updatable field '{}' was updated" , fieldName ) ; return false ; } } return true ; }
Source:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public void begin ( ) { if ( ! ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.isEmpty ( this . transactionId ) ) ) { throw new java.lang.IllegalStateException ( "Already opened transaction" ) ; } this . transactionId = java.util.UUID.randomUUID ( ) . toString ( ) ; this . transport.send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . begin ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_TRANSACTION , this . transactionId ) . build ( ) , key ) ; }

Target:
public void begin ( ) { try ( org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper wrapper = new org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper ( this . lock ) ) { if ( ! ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.isEmpty ( this . transactionId ) ) ) { throw new java.lang.IllegalStateException ( "Already opened transaction" ) ; } this . transactionId = java.util.UUID.randomUUID ( ) . toString ( ) ; this . transport.send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . begin ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_TRANSACTION , this . transactionId ) . build ( ) , key ) ; } }
Source:
protected void init ( ) { T parameters = org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) ; if ( ( parameters.isImportAsNewEntity ( ) ) && ( parameters.getVmId ( ) . equals ( parameters.getVm ( ) . getId ( ) ) ) ) { parameters.getVm ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } setVdsGroupId ( parameters.getVdsGroupId ( ) ) ; setVm ( parameters.getVm ( ) ) ; }

Target:
protected void init ( ) { super . init ( ) ; T parameters = org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) ; if ( ( parameters.isImportAsNewEntity ( ) ) && ( parameters.getVmId ( ) . equals ( parameters.getVm ( ) . getId ( ) ) ) ) { parameters.getVm ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } setVdsGroupId ( parameters.getVdsGroupId ( ) ) ; setVm ( parameters.getVm ( ) ) ; initEffectiveCompatibilityVersion ( ) ; }
Source:
public void getLabelListByEntityId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid entityId ) { 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.Label > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLabelByEntityId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( entityId ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected boolean validateQuota ( ) { getParameters ( ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVm ( ) . getStaticData ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.Disk dit : getVm ( ) . getDiskMap ( ) . values ( ) ) { ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( dit ) ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVm ( ) . getStaticData ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; } return true ; }

Target:
protected void executeCommand ( ) { addVmToDb ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; if ( ! ( hasSnappableDisks ( vm ) ) ) { endVmRelatedOps ( ) ; } else { processImages ( ) ; } setSucceeded ( true ) ; }
Source:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
private void handlePut ( java.lang.String prefix , java.util.Collection < org.ovirt.engine.api.model.DetailedLink > results , java.lang.String returnValueStr ) { results.add ( new org.ovirt.engine.api.rsdl.RsdlBuilder.LinkBuilder ( ) . url ( prefix ) . rel ( org.ovirt.engine.api.rsdl.RsdlBuilder.UPDATE ) . requestParameter ( returnValueStr ) . responseType ( returnValueStr ) . httpMethod ( HttpMethod.PUT ) . build ( ) ) ; }

Target:
private void handlePut ( java.lang.String prefix , java.util.Collection < org.ovirt.engine.api.model.DetailedLink > results , java.lang.String returnValueStr ) { org.ovirt.engine.api.model.DetailedLink link = new org.ovirt.engine.api.rsdl.RsdlBuilder.LinkBuilder ( ) . url ( prefix ) . rel ( org.ovirt.engine.api.rsdl.RsdlBuilder.UPDATE ) . requestParameter ( returnValueStr ) . responseType ( returnValueStr ) . httpMethod ( HttpMethod.PUT ) . build ( ) ; addAsyncMatrixParameter ( link ) ; results.add ( link ) ; }
Source:
public static void GetClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , 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.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > multipleParams , boolean isRunOnlyIfAllCanDoPass , boolean isWaitForResult ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getEngineSessionId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . runMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass , isWaitForResult ) ; return returnValues ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > multipleParams , boolean isRunOnlyIfAllCanDoPass , boolean isWaitForResult ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunMultipleAction invoked! [amount of actions: {}]" , multipleParams.size ( ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getEngineSessionId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . runMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass , isWaitForResult ) ; return returnValues ; }
Source:
public void RemoveTag ( org.ovirt.engine.core.compat.Guid tagId ) { if ( tagsMapByID.containsKey ( tagId ) ) { org.ovirt.engine.core.common.businessentities.Tags tag = tagsMapByID.get ( tagId ) ; RemoveTagAndChildren ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags parent = tagsMapByID.get ( tag.getparent_id ( ) ) ; parent.getChildren ( ) . remove ( tag ) ; addTagToHash ( parent ) ; } else { org.ovirt.engine.core.bll.TagsDirector.log.warnFormat ( "Trying to remove tag, not exists in Data Structure - {0}" , tagId ) ; } }

Target:
public void RemoveTag ( org.ovirt.engine.core.compat.Guid tagId ) { if ( tagsMapByID.containsKey ( tagId ) ) { org.ovirt.engine.core.common.businessentities.Tags tag = tagsMapByID.get ( tagId ) ; RemoveTagAndChildren ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags parent = tagsMapByID.get ( tag.getparent_id ( ) ) ; parent.getChildren ( ) . remove ( tag ) ; addTagToHash ( parent ) ; } else { org.ovirt.engine.core.bll.TagsDirector.log.warn ( "Trying to remove tag, not exists in Data Structure - '{}'" , tagId ) ; } }
Source:
public void vdsGroupWithNoServiceEnabled ( ) { createCommandWithNoService ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( EngineMessage.VDS_GROUP_AT_LEAST_ONE_SERVICE_MUST_BE_ENABLED ) ; }

Target:
public void vdsGroupWithNoServiceEnabled ( ) { createCommandWithNoService ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; cpuExists ( ) ; allQueriesForVms ( ) ; validateFailedWithReason ( EngineMessage.VDS_GROUP_AT_LEAST_ONE_SERVICE_MUST_BE_ENABLED ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkVlanOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , ( ( iface.getVlanId ( ) ) + 1 ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkVlanOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , ( ( iface.getVlanId ( ) ) + 1 ) , createQos ( ) ) ; }
Source:
java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > getGraphicsTypesForVm ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypes = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) { if ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.GRAPHICS ) == ( vmDevice.getType ( ) ) ) { graphicsTypes.add ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromVmDeviceType ( org.ovirt.engine.core.common.utils.VmDeviceType.valueOf ( vmDevice.getDevice ( ) ) ) ) ; } } return graphicsTypes ; }

Target:
java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > getGraphicsTypesForVm ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypes = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice graphics : getDevicesOfType ( VmDeviceGeneralType.GRAPHICS ) ) { graphicsTypes.add ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromVmDeviceType ( org.ovirt.engine.core.common.utils.VmDeviceType.getByName ( graphics.getDevice ( ) ) ) ) ; } return graphicsTypes ; }
Source:
private static void raiseQueryEvent ( final org.ovirt.engine.ui.uicompat.Event queryEvent , final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { if ( ( context != null ) && ( ( org.ovirt.engine.ui.frontend.Frontend.subscribedQueryTypes ) != null ) ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType : org.ovirt.engine.ui.frontend.Frontend.subscribedQueryTypes ) { if ( queryType.equals ( vdcQueryType ) ) { org.ovirt.engine.ui.frontend.Frontend.currentContext = context ; queryEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , EventArgs.Empty ) ; } } } }

Target:
private void raiseQueryEvent ( final org.ovirt.engine.ui.uicompat.Event queryEvent , final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { if ( ( context != null ) && ( ( subscribedQueryTypes ) != null ) ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType : subscribedQueryTypes ) { if ( queryType.equals ( vdcQueryType ) ) { currentContext = context ; queryEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , EventArgs.Empty ) ; } } } }