auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.dataCenterPopupStorageTypeLabel ( ) ) ; versionEditor.setLabel ( constants.dataCenterPopupVersionLabel ( ) ) ; quotaEnforceTypeEditor.setLabel ( constants.dataCenterPopupQuotaEnforceTypeLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; commentEditor.setLabel ( constants.commentLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.dataCenterPopupStorageTypeLabel ( ) ) ; versionEditor.setLabel ( constants.dataCenterPopupVersionLabel ( ) ) ; quotaEnforceTypeEditor.setLabel ( constants.dataCenterPopupQuotaEnforceTypeLabel ( ) ) ; }
Source:
protected void setUpEntityQueryExpectations ( int times , org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.ISCSI_BOND_ID } , iscsiBond ) ; } }

Target:
protected org.ovirt.engine.api.model.Network getEntity ( int index ) { org.ovirt.engine.api.model.Network entity = org.mockito.Mockito.mock ( org.ovirt.engine.api.model.Network.class ) ; org.mockito.Mockito.when ( entity.getId ( ) ) . thenReturn ( GUIDS [ index ] ) ; org.mockito.Mockito.when ( entity.getName ( ) ) . thenReturn ( NAMES [ index ] ) ; org.mockito.Mockito.when ( entity.getDescription ( ) ) . thenReturn ( DESCRIPTIONS [ index ] ) ; return entity ; }
Source:
private void verifyApplications ( org.ovirt.engine.api.model.Applications applications ) { org.junit.Assert.assertNotNull ( applications ) ; org.junit.Assert.assertEquals ( NAMES.length , applications.getApplications ( ) . size ( ) ) ; int index = 0 ; for ( org.ovirt.engine.api.model.Application app : applications.getApplications ( ) ) { org.junit.Assert.assertEquals ( NAMES [ index ] , app.getName ( ) ) ; verifyLinks ( app ) ; index ++ ; } }

Target:
private void verifyApplications ( org.ovirt.engine.api.model.Applications applications ) { org.junit.jupiter.api.Assertions.assertNotNull ( applications ) ; org.junit.jupiter.api.Assertions.assertEquals ( NAMES.length , applications.getApplications ( ) . size ( ) ) ; int index = 0 ; for ( org.ovirt.engine.api.model.Application app : applications.getApplications ( ) ) { org.junit.jupiter.api.Assertions.assertEquals ( NAMES [ index ] , app.getName ( ) ) ; verifyLinks ( app ) ; index ++ ; } }
Source:
public void testGetServerHooks ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook1 = getGlusterServerHook ( FixturesTool.VDS_GLUSTER_SERVER2 , GlusterHookStatus.ENABLED , GlusterHookContentType.TEXT , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.CHECKSUM_HOOK1_SERVER1 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook2 = getGlusterServerHook ( FixturesTool.GLUSTER_BRICK_SERVER1 , GlusterHookStatus.MISSING , null , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook > serverHooks = dao.getGlusterServerHooks ( FixturesTool.HOOK_ID ) ; org.junit.Assert.assertNotNull ( serverHooks ) ; org.junit.Assert.assertEquals ( 2 , serverHooks.size ( ) ) ; org.junit.Assert.assertTrue ( serverHooks.contains ( serverHook1 ) ) ; org.junit.Assert.assertTrue ( serverHooks.contains ( serverHook2 ) ) ; }

Target:
public void testGetServerHooks ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook1 = getGlusterServerHook ( FixturesTool.VDS_GLUSTER_SERVER2 , GlusterHookStatus.ENABLED , GlusterHookContentType.TEXT , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.CHECKSUM_HOOK1_SERVER1 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook2 = getGlusterServerHook ( FixturesTool.GLUSTER_BRICK_SERVER1 , GlusterHookStatus.MISSING , null , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook > serverHooks = dao.getGlusterServerHooks ( FixturesTool.HOOK_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( serverHooks ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , serverHooks.size ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( serverHooks.contains ( serverHook1 ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( serverHooks.contains ( serverHook2 ) ) ; }
Source:
public void testSaveOrUpdateExisting ( ) { int sizeBeforeSave = dao.getAll ( ) . size ( ) ; existingUser.setFirstName ( "changedname" ) ; existingUser.setLastName ( "changedsurname" ) ; dao.saveOrUpdate ( existingUser ) ; int sizeAfterSave = dao.getAll ( ) . size ( ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser result = dao.get ( existingUser.getId ( ) ) ; org.junit.Assert.assertEquals ( existingUser , result ) ; org.junit.Assert.assertEquals ( 0 , ( sizeAfterSave - sizeBeforeSave ) ) ; }

Target:
public void testSaveOrUpdateExisting ( ) { int sizeBeforeSave = dao.getAll ( ) . size ( ) ; existingUser.setFirstName ( "changedname" ) ; existingUser.setLastName ( "changedsurname" ) ; dao.saveOrUpdate ( existingUser ) ; int sizeAfterSave = dao.getAll ( ) . size ( ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser result = dao.get ( existingUser.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( existingUser , result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , ( sizeAfterSave - sizeBeforeSave ) ) ; }
Source:
public static void GetSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetGlusterHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress , java.lang.String rootPassword , java.lang.String fingerprint ) { 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.GlusterServersQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterServersQueryParameters ( hostAddress , rootPassword ) ; parameters.setFingerprint ( fingerprint ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServers , parameters , aQuery ) ; }
Source:
public static boolean isWindowsOsType ( org.ovirt.engine.core.common.businessentities.VmOsType osType ) { if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getWindowsOsTypes ( ) . contains ( osType ) ) { return true ; } return false ; }

Target:
public static void initUniqueOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }
Source:
public org.ovirt.engine.core.common.action.HostSetupNetworksParameters createHostSetupNetworksParameters ( ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters result = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( getEntity ( ) . getId ( ) ) ; result.setNetworkAttachments ( hostSetupNetworksParametersData.newOrModifiedNetworkAttachments ) ; result.setRemovedNetworkAttachments ( new java.util.HashSet ( org.ovirt.engine.core.common.businessentities.Entities.getIds ( hostSetupNetworksParametersData.removedNetworkAttachments ) ) ) ; fixLabelsInBondDefinitions ( hostSetupNetworksParametersData.newOrModifiedBonds , hostSetupNetworksParametersData.addedLabels , hostSetupNetworksParametersData.removedLabels ) ; result.setBonds ( hostSetupNetworksParametersData.newOrModifiedBonds ) ; result.setRemovedBonds ( new java.util.HashSet ( org.ovirt.engine.core.common.businessentities.Entities.getIds ( hostSetupNetworksParametersData.removedBonds ) ) ) ; result.setRemovedUnmanagedNetworks ( hostSetupNetworksParametersData.removedUnmanagedNetworks ) ; return result ; }

Target:
public org.ovirt.engine.core.common.action.HostSetupNetworksParameters createHostSetupNetworksParameters ( ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters result = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( getEntity ( ) . getId ( ) ) ; result.setNetworkAttachments ( hostSetupNetworksParametersData.newOrModifiedNetworkAttachments ) ; result.setRemovedNetworkAttachments ( new java.util.HashSet ( org.ovirt.engine.core.common.businessentities.Entities.getIds ( hostSetupNetworksParametersData.removedNetworkAttachments ) ) ) ; result.setBonds ( hostSetupNetworksParametersData.newOrModifiedBonds ) ; result.setRemovedBonds ( new java.util.HashSet ( org.ovirt.engine.core.common.businessentities.Entities.getIds ( hostSetupNetworksParametersData.removedBonds ) ) ) ; result.setRemovedUnmanagedNetworks ( hostSetupNetworksParametersData.removedUnmanagedNetworks ) ; result.setLabels ( hostSetupNetworksParametersData.addedLabels ) ; result.setRemovedLabels ( org.ovirt.engine.core.common.businessentities.Entities.objectNames ( hostSetupNetworksParametersData.removedLabels ) ) ; return result ; }
Source:
public void canDoActionThinProvisioningSpaceCheckFailsSize ( ) { final int availableSize = 4 ; final int usedSize = 6 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }

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 ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc migrateStatus ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.migrateStatus ( vmId ) ; 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 convertVmFromExternalSystem ( java.lang.String url , java.lang.String user , java.lang.String password , java.util.Map < java.lang.String , java.lang.Object > vm , java.lang.String jobUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.convertExternalVm ( url , user , password , vm , jobUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM v = createVM ( ) ; v.setName ( "testVm" ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( v , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM v = createVmWithSnapshots ( ) ; v.setName ( "testVm" ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( v , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
public org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.AuditLogType > disconnectHostFromStoragePoolServersCommandCompleted ( org.ovirt.engine.core.common.action.HostStoragePoolParametersBase parameters ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = backend.getResourceManager ( ) . runVdsCommand ( VDSCommandType.RegisterLibvirtSecrets , new org.ovirt.engine.core.common.vdscommands.RegisterLibvirtSecretsVDSParameters ( parameters.getVds ( ) . getId ( ) , java.util.Collections.emptyList ( ) , true ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper.log.error ( "Failed to unregister libvirt secret on vds {}." , parameters.getVds ( ) . getName ( ) ) ; return new org.ovirt.engine.core.common.utils.Pair ( false , org.ovirt.engine.core.common.AuditLogType.FAILED_TO_REGISTER_LIBVIRT_SECRET_ON_VDS ) ; } return new org.ovirt.engine.core.common.utils.Pair ( true , null ) ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.AuditLogType > disconnectHostFromStoragePoolServersCommandCompleted ( org.ovirt.engine.core.common.action.HostStoragePoolParametersBase parameters ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = resourceManager.runVdsCommand ( VDSCommandType.RegisterLibvirtSecrets , new org.ovirt.engine.core.common.vdscommands.RegisterLibvirtSecretsVDSParameters ( parameters.getVds ( ) . getId ( ) , java.util.Collections.emptyList ( ) , true ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper.log.error ( "Failed to unregister libvirt secret on vds {}." , parameters.getVds ( ) . getName ( ) ) ; return new org.ovirt.engine.core.common.utils.Pair ( false , org.ovirt.engine.core.common.AuditLogType.FAILED_TO_REGISTER_LIBVIRT_SECRET_ON_VDS ) ; } return new org.ovirt.engine.core.common.utils.Pair ( true , null ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { commonModelProvider.get ( ) . updateReportsAvailability ( ) ; }

Target:
public void onDynamicMainTabAdded ( org.ovirt.engine.ui.webadmin.section.main.presenter.DynamicMainTabAddedEvent event ) { java.lang.String historyToken = event.getHistoryToken ( ) ; java.lang.String searchPrefix = event.getSearchPrefix ( ) ; if ( loginComplete ) { addDynamicMainTabToCommonModel ( historyToken , searchPrefix ) ; } else { dynamicMainTabs.add ( new org.ovirt.engine.ui.webadmin.system.ApplicationInit.DynamicMainTabInfo ( historyToken , searchPrefix ) ) ; } }
Source:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.IdParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }

Target:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.IdParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
public void onChange ( com.google.gwt.event.dom.client.ChangeEvent event ) { int selectedIndex = bootSequenceBox.getSelectedIndex ( ) ; bootSequenceModel.setSelectedItem ( bootSequenceModel.getItems ( ) . get ( selectedIndex ) ) ; bootSequenceUpButton.setEnabled ( bootSequenceModel.getMoveItemUpCommand ( ) . getIsExecutionAllowed ( ) ) ; bootSequenceDownButton.setEnabled ( bootSequenceModel.getMoveItemDownCommand ( ) . getIsExecutionAllowed ( ) ) ; }

Target:
public void onChange ( com.google.gwt.event.dom.client.ChangeEvent event ) { int selectedIndex = bootSequenceBox.getSelectedIndex ( ) ; bootSequenceModel.setSelectedItem ( bootSequenceModel.getItems ( ) . get ( selectedIndex ) ) ; bootSequenceUpButton.setEnabled ( bootSequenceModel.getMoveItemUpCommand ( ) . getIsExecutionAllowed ( ) ) ; bootSequenceDownButton.setEnabled ( bootSequenceModel.getMoveItemDownCommand ( ) . getIsExecutionAllowed ( ) ) ; localizeBootSequenceButtons ( ) ; }
Source:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.storage.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setCreationDate ( fromIRS.getCreationDate ( ) ) ; getDestinationDiskImage ( ) . setLastModifiedDate ( fromIRS.getLastModifiedDate ( ) ) ; getDestinationDiskImage ( ) . setLastModified ( getDestinationDiskImage ( ) . getLastModifiedDate ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic destinationDiskDynamic = getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getActualSizeInBytes ( ) ) ; getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }

Target:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.storage.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setCreationDate ( fromIRS.getCreationDate ( ) ) ; getDestinationDiskImage ( ) . setLastModifiedDate ( fromIRS.getLastModifiedDate ( ) ) ; getDestinationDiskImage ( ) . setLastModified ( getDestinationDiskImage ( ) . getLastModifiedDate ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic destinationDiskDynamic = getDiskImageDynamicDao ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getActualSizeInBytes ( ) ) ; getDiskImageDynamicDao ( ) . update ( destinationDiskDynamic ) ; } }
Source:
public boolean checkQuotaNameExisting ( org.ovirt.engine.core.common.businessentities.Quota quota , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.Quota quotaByName = getQuotaDAO ( ) . getQuotaByQuotaName ( quota.getQuotaName ( ) ) ; if ( ( quotaByName != null ) && ( ! ( quotaByName.getId ( ) . equals ( quota.getId ( ) ) ) ) ) { messages.add ( VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED.toString ( ) ) ; return false ; } return true ; }

Target:
public boolean checkQuotaNameExisting ( org.ovirt.engine.core.common.businessentities.Quota quota , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.Quota quotaByName = getQuotaDao ( ) . getQuotaByQuotaName ( quota.getQuotaName ( ) ) ; if ( ( quotaByName != null ) && ( ! ( quotaByName.getId ( ) . equals ( quota.getId ( ) ) ) ) ) { messages.add ( VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED.toString ( ) ) ; return false ; } return true ; }
Source:
private boolean isBondModeFailover ( java.lang.String bondOptions ) { java.util.regex.Matcher matcher = org.ovirt.engine.core.bll.network.host.SetupNetworksHelper.BOND_OPTS_MODE_CAPTURE.matcher ( bondOptions ) ; matcher.find ( ) ; int bondMode = java.lang.Integer.parseInt ( matcher.group ( 1 ) ) ; return ( bondMode == 1 ) || ( bondMode == 3 ) ; }

Target:
private boolean qosShouldBeApplied ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = getNetworkAttachment ( iface , network ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos = effectiveHostNetworkQos.getQos ( networkAttachment , network ) ; return ( qos != null ) && ( ! ( qos.isEmpty ( ) ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( ( cachedCallback ) == null ) { cachedCallback = new org.ovirt.engine.core.bll.ConvertVmCallback ( org.ovirt.engine.core.bll.ConvertVmCommand.getCommandId ( ) ) ; if ( ( getCommandExecutionStatus ( ) ) == ( org.ovirt.engine.core.compat.backendcompat.CommandExecutionStatus.EXECUTED ) ) { monitorV2VJob ( JobStatus.UNKNOWN ) ; } } return cachedCallback ; }

Target:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( ( cachedCallback ) == null ) { cachedCallback = new org.ovirt.engine.core.bll.ConvertVmCallback ( org.ovirt.engine.core.bll.ConvertVmCommand.getCommandId ( ) ) ; if ( ( getCommandExecutionStatus ( ) ) == ( org.ovirt.engine.core.compat.backendcompat.CommandExecutionStatus.EXECUTED ) ) { getVdsManager ( ) . addV2VJobInfoForVm ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmId ( ) , JobStatus.UNKNOWN ) ; } } return cachedCallback ; }
Source:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; updateWipeAfterDelete ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; }

Target:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; updateWipeAfterDelete ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateDiskProfiles ( getDataCenter ( ) . getSelectedItem ( ) ) ; }
Source:
public void testParamsUpdated ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage readyImage = initReadyImageForUpload ( ) ; transferImageCommand.handleImageIsReadyForTransfer ( ) ; junit.framework.TestCase.assertTrue ( transferImageCommand.getParameters ( ) . getStorageDomainId ( ) . equals ( readyImage.getStorageIds ( ) . get ( 0 ) ) ) ; junit.framework.TestCase.assertTrue ( ( ( transferImageCommand.getParameters ( ) . getTransferSize ( ) ) == ( readyImage.getActualSizeInBytes ( ) ) ) ) ; }

Target:
public void testParamsUpdated ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage readyImage = initReadyImageForUpload ( ) ; transferImageCommand.handleImageIsReadyForTransfer ( ) ; junit.framework.TestCase.assertTrue ( transferImageCommand.getParameters ( ) . getStorageDomainId ( ) . equals ( readyImage.getStorageIds ( ) . get ( 0 ) ) ) ; junit.framework.TestCase.assertTrue ( ( ( transferImageCommand.getParameters ( ) . getTransferSize ( ) ) == ( readyImage.getSize ( ) ) ) ) ; }
Source:
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 ) ; }

Target:
public static void GetHighUtilizationForEvenDistribution ( 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 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HighUtilizationForEvenlyDistribute , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkCluster getManagementNetworkCluster ( ) { if ( ( managementNetworkCluster ) == null ) { org.ovirt.engine.core.compat.Guid clusterId = networkCluster.getClusterId ( ) ; org.ovirt.engine.core.common.businessentities.network.Network mgmt = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . getByNameAndCluster ( org.ovirt.engine.core.utils.NetworkUtils.getDefaultManagementNetworkName ( ) , clusterId ) ; managementNetworkCluster = getNetworkClusterDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.network.NetworkClusterId ( clusterId , mgmt.getId ( ) ) ) ; } return managementNetworkCluster ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkCluster getManagementNetworkCluster ( ) { if ( ( managementNetworkCluster ) == null ) { org.ovirt.engine.core.compat.Guid clusterId = networkCluster.getClusterId ( ) ; final org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil managementNetworkUtil = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil.class ) ; org.ovirt.engine.core.common.businessentities.network.Network mgmt = managementNetworkUtil.getManagementNetwork ( clusterId ) ; managementNetworkCluster = getNetworkClusterDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.network.NetworkClusterId ( clusterId , mgmt.getId ( ) ) ) ; } return managementNetworkCluster ; }
Source:
public void getSubPaths_multiplePathElements ( ) { java.lang.String [ ] subPaths = tested.getSubPaths ( "a.b.c" ) ; org.junit.Assert.assertThat ( subPaths.length , org.hamcrest.CoreMatchers.equalTo ( 3 ) ) ; org.junit.Assert.assertThat ( subPaths [ 0 ] , org.hamcrest.CoreMatchers.equalTo ( "a" ) ) ; org.junit.Assert.assertThat ( subPaths [ 1 ] , org.hamcrest.CoreMatchers.equalTo ( "a.b" ) ) ; org.junit.Assert.assertThat ( subPaths [ 2 ] , org.hamcrest.CoreMatchers.equalTo ( "a.b.c" ) ) ; }

Target:
public void getSubPaths_multiplePathElements ( ) { java.lang.String [ ] subPaths = tested.getSubPaths ( "a.b.c" ) ; org.hamcrest.MatcherAssert.assertThat ( subPaths.length , org.hamcrest.CoreMatchers.equalTo ( 3 ) ) ; org.hamcrest.MatcherAssert.assertThat ( subPaths [ 0 ] , org.hamcrest.CoreMatchers.equalTo ( "a" ) ) ; org.hamcrest.MatcherAssert.assertThat ( subPaths [ 1 ] , org.hamcrest.CoreMatchers.equalTo ( "a.b" ) ) ; org.hamcrest.MatcherAssert.assertThat ( subPaths [ 2 ] , org.hamcrest.CoreMatchers.equalTo ( "a.b.c" ) ) ; }
Source:
private void applyStyles ( ) { cardStatusEditor.addContentWidgetStyleName ( style.statusEditorContent ( ) ) ; pluggedEditor.addContentWidgetStyleName ( style.statusRadioContent ( ) ) ; unpluggedEditor.addContentWidgetStyleName ( style.statusRadioContent ( ) ) ; linkStateEditor.addContentWidgetStyleName ( style.statusEditorContent ( ) ) ; linkedEditor.addContentWidgetStyleName ( style.statusRadioContent ( ) ) ; unlinkedEditor.addContentWidgetStyleName ( style.statusRadioContent ( ) ) ; enableManualMacCheckbox.addContentWidgetStyleName ( style.checkBox ( ) ) ; }

Target:
private void applyStyles ( ) { cardStatusEditor.addContentWidgetContainerStyleName ( style.statusEditorContent ( ) ) ; pluggedEditor.addContentWidgetContainerStyleName ( style.statusRadioContent ( ) ) ; unpluggedEditor.addContentWidgetContainerStyleName ( style.statusRadioContent ( ) ) ; linkStateEditor.addContentWidgetContainerStyleName ( style.statusEditorContent ( ) ) ; linkedEditor.addContentWidgetContainerStyleName ( style.statusRadioContent ( ) ) ; unlinkedEditor.addContentWidgetContainerStyleName ( style.statusRadioContent ( ) ) ; enableManualMacCheckbox.addContentWidgetContainerStyleName ( style.checkBox ( ) ) ; }
Source:
protected void createVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = getDiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setActive ( true ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.mockito.Mockito.when ( osRepository.getDiskHotpluggableInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.HashSet < > ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.DISK_HOTPLUGGABLE_INTERFACES ) ) ; mockVmDevice ( false ) ; }

Target:
protected void mockVmDevice ( boolean plugged ) { vmDevice = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; vmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( ) ) ; vmDevice.setIsPlugged ( plugged ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.mockito.Mockito.when ( vmDeviceDao.get ( org.mockito.Mockito.any ( org.ovirt.engine.core.common.businessentities.VmDeviceId.class ) ) ) . thenReturn ( vmDevice ) ; }
Source:
public void UpdateMinAllocatedMemory ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getModel ( ) . getCluster ( ) . getSelectedItem ( ) ) ) ; if ( cluster == null ) { return ; } double overCommitFactor = 100.0 / ( cluster.getmax_vds_memory_over_commit ( ) ) ; getModel ( ) . getMinAllocatedMemory ( ) . setEntity ( ( ( int ) ( ( ( java.lang.Integer ) ( getModel ( ) . getMemSize ( ) . getEntity ( ) ) ) * overCommitFactor ) ) ) ; }

Target:
public void updateMinAllocatedMemory ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getModel ( ) . getCluster ( ) . getSelectedItem ( ) ) ) ; if ( cluster == null ) { return ; } double overCommitFactor = 100.0 / ( cluster.getmax_vds_memory_over_commit ( ) ) ; getModel ( ) . getMinAllocatedMemory ( ) . setEntity ( ( ( int ) ( ( ( java.lang.Integer ) ( getModel ( ) . getMemSize ( ) . getEntity ( ) ) ) * overCommitFactor ) ) ) ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM model = new org.ovirt.engine.api.model.VM ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "VM" , "add" , "cluster.id|name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Vm model = new org.ovirt.engine.api.model.Vm ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "add" , "cluster.id|name" ) ; } }
Source:
private void AddDaysOfWeek ( ) { java.lang.String day ; int dayIndex = 3 ; for ( int i = - 2 ; i > ( - 8 ) ; i -- ) { day = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( i ) . getDayOfWeek ( ) . toString ( ) ; enumValues.put ( day , dayIndex ) ; verbs.add ( day ) ; dayIndex ++ ; } }

Target:
private void addDaysOfWeek ( ) { java.lang.String day ; int dayIndex = 3 ; for ( int i = - 2 ; i > ( - 8 ) ; i -- ) { day = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( i ) . getDayOfWeek ( ) . toString ( ) ; enumValues.put ( day , dayIndex ) ; verbs.add ( day ) ; dayIndex ++ ; } }
Source:
public static void getUserMessageOfTheDayViaPublic ( 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.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getUserMessageOfTheDayViaPublic ( 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.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getAAANamespaces ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public void testList ( ) { int numOfEntitiesInList = 2 ; setUpGetEntityExpectations ( QueryType.GetStorageServerConnectionExtensionsByHostId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionExtensionsResourceTest.hostID } , getEntityList ( numOfEntitiesInList ) ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.util.List < org.ovirt.engine.api.model.StorageConnectionExtension > retCollection = getCollection ( ) ; org.junit.Assert.assertNotNull ( retCollection ) ; org.junit.Assert.assertEquals ( numOfEntitiesInList , retCollection.size ( ) ) ; }

Target:
public void testList ( ) { int numOfEntitiesInList = 2 ; setUpGetEntityExpectations ( QueryType.GetStorageServerConnectionExtensionsByHostId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionExtensionsResourceTest.hostID } , getEntityList ( numOfEntitiesInList ) ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.util.List < org.ovirt.engine.api.model.StorageConnectionExtension > retCollection = getCollection ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( retCollection ) ; org.junit.jupiter.api.Assertions.assertEquals ( numOfEntitiesInList , retCollection.size ( ) ) ; }
Source:
public void testGetFcp ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 , getFcpEntity ( ) ) ; setUpGetEntityExpectations ( VdcQueryType.GetLunsByVgId , org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters.class , new java.lang.String [ ] { "VgId" } , new java.lang.Object [ ] { GUIDS [ 0 ] . toString ( ) } , setUpLuns ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyGetFcp ( resource.get ( ) ) ; }

Target:
public void testGetFcp ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 , getFcpEntity ( ) ) ; setUpGetEntityExpectations ( QueryType.GetLunsByVgId , org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters.class , new java.lang.String [ ] { "VgId" } , new java.lang.Object [ ] { GUIDS [ 0 ] . toString ( ) } , setUpLuns ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyGetFcp ( resource.get ( ) ) ; }
Source:
private void setVmWatchdogToParams ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParams ) { org.ovirt.engine.core.common.businessentities.VmWatchdogType wdModel = model.getWatchdogModel ( ) . getSelectedItem ( ) ; updateVmParams.setUpdateWatchdog ( true ) ; if ( wdModel != null ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = new org.ovirt.engine.core.common.businessentities.VmWatchdog ( ) ; vmWatchdog.setAction ( model.getWatchdogAction ( ) . getSelectedItem ( ) ) ; vmWatchdog.setModel ( wdModel ) ; updateVmParams.setWatchdog ( vmWatchdog ) ; } }

Target:
private void onSetConsoleKey ( ) { org.ovirt.engine.ui.uicommonweb.models.PublicKeyModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.PublicKeyModel ) ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) ) ; model.onSetConsoleKey ( this , this ) ; }
Source:
public static void GetSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public static void getMaximalVmMemSize64OS ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : - 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void testISCSIInvalidPortWithCharacters ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "abc" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( getCommand ( ) , EngineMessage.VALIDATION_STORAGE_CONNECTION_INVALID_PORT ) ; }

Target:
public void testConnectionWithValidMountOptionsSucceeds ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.NFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( command ) . validateMountOptions ( ) ; org.mockito.Mockito.when ( command.getStorageConnDao ( ) . get ( newPosixConnection.getId ( ) ) ) . thenReturn ( newPosixConnection ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsByIds ( java.util.List < org.ovirt.engine.core.compat.Guid > vmsIds ) { return getCallsHandler ( ) . executeReadList ( "GetVmsByIds" , org.ovirt.engine.core.dao.VmDaoImpl.VMRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vms_ids" , org.apache.commons.lang.StringUtils.join ( vmsIds , ',' ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsByOrigins ( java.util.List < org.ovirt.engine.core.common.businessentities.OriginType > origins ) { java.lang.Object [ ] originValues = origins.stream ( ) . map ( OriginType :: getValue ) . toArray ( ) ; return getCallsHandler ( ) . executeReadList ( "GetVmsByOrigin" , org.ovirt.engine.core.dao.VmDaoImpl.VMRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "origins" , createArrayOf ( "int" , originValues ) ) ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getBroker ( ) . glusterHookUpdate ( org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookContent ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getChecksum ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getBroker ( ) . glusterHookUpdate ( org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getGlusterCommand ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookStage ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookName ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getHookContent ( ) , org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.getParameters ( ) . getChecksum ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.UpdateGlusterHookVDSCommand.proceedProxyReturnValue ( ) ; }