auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public 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 ) { uniqueOsNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( uniqueOsNames ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }

Target:
public 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 ) { uniqueOsNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( uniqueOsNames ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }
Source:
void setupCloneVmPermissions ( org.ovirt.engine.core.common.action.AddVmTemplateParameters params ) { boolean clonePermissions = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplatesResource.CLONE_PERMISSIONS , true , false ) ; if ( clonePermissions ) { params.setCopyVmPermissions ( clonePermissions ) ; } }

Target:
void setupOptionalParameters ( org.ovirt.engine.core.common.action.AddVmTemplateParameters params ) { boolean clonePermissions = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplatesResource.CLONE_PERMISSIONS , true , false ) ; boolean seal = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplatesResource.SEAL , true , false ) ; if ( clonePermissions ) { params.setCopyVmPermissions ( clonePermissions ) ; } if ( seal ) { params.setSealTemplate ( seal ) ; } }
Source:
public void getTemplateNicList ( 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.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmNicList ( 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 < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testExecuteCommandFailsWithServerIdForStart ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , null , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT , org.ovirt.engine.core.common.constants.gluster.GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START ) ) ) ; setUpMockUpForStart ( ) ; mockBackend ( false , VdcBllErrors.GlusterServiceManageFailed , GlusterServiceStatus.STOPPED ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( serverServiceDao , org.mockito.Mockito.never ( ) ) . updateByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_SERVICE_START_FAILED ) ; }

Target:
public void testExecuteCommandFailsWithServerIdForStart ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , null , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT , org.ovirt.engine.core.common.constants.gluster.GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START ) ) ) ; setUpMockUpForStart ( ) ; mockBackend ( false , VdcBllErrors.GlusterServiceManageFailed , GlusterServiceStatus.STOPPED ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( serverServiceDao , org.mockito.Mockito.never ( ) ) . updateByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_SERVICE_START_FAILED ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity createBrick ( org.ovirt.engine.core.compat.Guid serverId , java.lang.String serverName , java.lang.String brickDir ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; brick.setServerId ( serverId ) ; brick.setServerName ( serverName ) ; brick.setBrickDirectory ( brickDir ) ; return brick ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity createBrick ( org.ovirt.engine.core.compat.Guid serverId , java.lang.String serverName , java.lang.String brickDir ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; brick.setServerId ( serverId ) ; brick.setServerName ( serverName ) ; brick.setBrickDirectory ( brickDir ) ; return brick ; }
Source:
public void enableResizeSupport ( boolean enabled ) { this . resizeSupportEnabled = enabled ; java.lang.String bottomRightCornerImageUrl = ( enabled ) ? "images/dialog/panel_edge_BR_resize.png" : "images/dialog/panel_edge_BR.png" ; setBackgroundImageByClassName ( "dialogBottomRight" , bottomRightCornerImageUrl ) ; }

Target:
public void enableResizeSupport ( boolean enabled ) { this . resizeSupportEnabled = enabled ; com.google.gwt.dom.client.Element dialogBottomRight = getElementByTagAndClassName ( "td" , "dialogBottomRight" ) ; assert dialogBottomRight != null ; if ( enabled ) { dialogBottomRight.addClassName ( org.ovirt.engine.ui.common.widget.dialog.ResizableDialogBox.STYLE_RESIZE_POSTFIX ) ; } else { dialogBottomRight.removeClassName ( org.ovirt.engine.ui.common.widget.dialog.ResizableDialogBox.STYLE_RESIZE_POSTFIX ) ; } }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { 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.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( boolean active ) { org.ovirt.engine.core.common.businessentities.DiskImage di = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; di.setActive ( active ) ; di.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setParentId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setImageStatus ( ImageStatus.OK ) ; return di ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( boolean active ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage di = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; di.setActive ( active ) ; di.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setParentId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; di.setImageStatus ( ImageStatus.OK ) ; return di ; }
Source:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONFIGURE_VM_STORAGE , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }

Target:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONFIGURE_VM_STORAGE , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( existingDomain.getId ( ) , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 8 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 4 , domain.getActualImagesSize ( ) ) ; }
Source:
public void testNetworkCanBeAttachedNetworkAttachmentCannotBeAddedOnVlanInterfaces ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN ) ) ; }

Target:
public void testInterfaceIsValidSlaveWhenInterfaceIsVlan ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_INTERFACE_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }
Source:
public void testExecuteQueryVmWithMultipleDisks ( ) throws java.lang.Exception { mockDAOForQuery ( ) ; vm = mockVmAndReturnFromDAO ( ) ; populateVmDiskMap ( vm , 5 ) ; java.lang.String expectedDiskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( vm.getName ( ) , "6" ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( expectedDiskAlias , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testExecuteQueryVmWithMultipleDisks ( ) throws java.lang.Exception { mockDaoForQuery ( ) ; vm = mockVmAndReturnFromDao ( ) ; populateVmDiskMap ( vm , 5 ) ; java.lang.String expectedDiskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( vm.getName ( ) , "6" ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( expectedDiskAlias , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.DB , ex ) ; } }

Target:
public void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , org.ovirt.engine.core.compat.Guid vmId ) { addDiskImage ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) , vmId ) ; }
Source:
protected void analyze ( ) { if ( ( vdsmVm ) == null ) { removeVmFromCache ( ) ; return ; } proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; }

Target:
protected void analyze ( ) { if ( ( vdsmVm ) == null ) { removeVmFromCache ( ) ; return ; } if ( isUnmanagedVm ( ) ) { saveDynamic ( vdsmVm.getVmDynamic ( ) ) ; return ; } proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; }
Source:
private void initImportClonedTemplate ( ) { getParameters ( ) . getVmTemplate ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : getParameters ( ) . getVmTemplate ( ) . getInterfaces ( ) ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } }

Target:
private void initImportClonedTemplate ( ) { getParameters ( ) . getVmTemplate ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : getParameters ( ) . getVmTemplate ( ) . getInterfaces ( ) ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } }
Source:
public void execute ( ) { if ( enclosingCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalTaskIdList ( ) ) ; } enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void execute ( ) { if ( enclosingCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; enclosingCommand.getReturnValue ( ) . getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalTaskIdList ( ) ) ; } enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public static void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public static void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { return null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; if ( disk.isBoot ( ) ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( constants.bootableDisk ( ) ) ; } return null ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( "IpConfiguration [bootProtocol=" + ( bootProtocol ) ) + ", address=" ) + ( address ) ) + ", netmask=" ) + ( netmask ) ) + ", gateway=" ) + ( gateway ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "bootProtocol" , getBootProtocol ( ) ) . append ( "address" , getAddress ( ) ) . append ( "netmask" , getNetmask ( ) ) . append ( "gateway" , getGateway ( ) ) . build ( ) ; }
Source:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.DiskImage cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase createParams = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( cinderDisk.getId ( ) ) ; createParams.setVmSnapshotId ( newActiveSnapshotId ) ; createParams.setParentHasTasks ( isImagesExists ( ) ) ; return withRootCommandInfo ( createParams , getActionType ( ) ) ; }

Target:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.DiskImage cinderDisk ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase createParams = new org.ovirt.engine.core.common.action.ImagesContainterParametersBase ( cinderDisk.getId ( ) ) ; createParams.setVmSnapshotId ( newActiveSnapshotId ) ; createParams.setParentHasTasks ( ( ! ( cachedImagesDisks.isEmpty ( ) ) ) ) ; return withRootCommandInfo ( createParams , getActionType ( ) ) ; }
Source:
private void fastForwardDisksToActiveSnapshot ( ) { if ( ( getParameters ( ) . getDisks ( ) ) != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImagesToUpdate = org.ovirt.engine.core.bll.ImagesHandler.imagesSubtract ( getDiskImagesForVm ( ) , getParameters ( ) . getDisks ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : diskImagesToUpdate ) { org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getImageDao ( ) . updateImageVmSnapshotId ( diskImage.getImageId ( ) , newActiveSnapshotId ) ; } } }

Target:
private void fastForwardDisksToActiveSnapshot ( ) { if ( ( getParameters ( ) . getDisks ( ) ) != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImagesToUpdate = org.ovirt.engine.core.bll.ImagesHandler.imagesSubtract ( getDiskImagesForVm ( ) , getParameters ( ) . getDisks ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : diskImagesToUpdate ) { org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getImageDao ( ) . updateImageVmSnapshotId ( diskImage.getImageId ( ) , newActiveSnapshotId ) ; } } }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getHostPublicKey ( 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 ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void doTestBadUpdate ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , canDo , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void testRetry ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy ( 5 , 3 ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; retryable.call ( ) ; org.mockito.Mockito.verify ( callable , org.mockito.Mockito.times ( 1 ) ) . call ( ) ; }

Target:
public void testRetry ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy ( 5 , 3 , 10 ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; retryable.call ( ) ; org.mockito.Mockito.verify ( callable , org.mockito.Mockito.times ( 1 ) ) . call ( ) ; }
Source:
protected void endWithFailure ( ) { if ( ( isDestinationImageExists ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) . getId ( ) ) ) && ( isImageSnapshot ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) ) ) ) { updateLastModifiedInParent ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) . getParentId ( ) ) ; } super . endWithFailure ( ) ; if ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getParameters ( ) . getSnapshotType ( ) . equals ( Snapshot.SnapshotType.STATELESS ) ) { updateOldImageAsActive ( Snapshot.SnapshotType.ACTIVE , true ) ; } }

Target:
protected void endWithFailure ( ) { revertCinderVolume ( ( ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk ) ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) ) ) ) ; if ( ( isDestinationImageExists ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) . getId ( ) ) ) && ( isImageSnapshot ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) ) ) ) { updateLastModifiedInParent ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getDestinationDiskImage ( ) . getParentId ( ) ) ; } super . endWithFailure ( ) ; if ( org.ovirt.engine.core.bll.storage.CreateCinderSnapshotCommand.getParameters ( ) . getSnapshotType ( ) . equals ( Snapshot.SnapshotType.STATELESS ) ) { updateOldImageAsActive ( Snapshot.SnapshotType.ACTIVE , true ) ; } }
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 ) { importGlusterExplanationLabel.setVisible ( ( ( object.getEnableGlusterService ( ) . getEntity ( ) ) && ( object.getIsNew ( ) ) ) ) ; }

Target:
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 ) { importGlusterExplanationLabel.setVisible ( ( ( object.getEnableGlusterService ( ) . getEntity ( ) ) && ( object.getIsNew ( ) ) ) ) ; updateGlusterFencingPolicyVisibility ( object ) ; }
Source:
private void commonSave ( boolean allNetworksAllowed ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; newConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newConfig.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE2 ) ; newConfig.setAllNetworksAllowed ( allNetworksAllowed ) ; if ( ! allNetworksAllowed ) { addNetworks ( newConfig ) ; addLabels ( newConfig ) ; } dao.save ( newConfig ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( newConfig.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; assertHostNicVfsConfigEquals ( newConfig , result ) ; }

Target:
private void commonSave ( boolean allNetworksAllowed ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; newConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newConfig.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE_WITHOUT_QOS ) ; newConfig.setAllNetworksAllowed ( allNetworksAllowed ) ; if ( ! allNetworksAllowed ) { addNetworks ( newConfig ) ; addLabels ( newConfig ) ; } dao.save ( newConfig ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( newConfig.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; assertHostNicVfsConfigEquals ( newConfig , result ) ; }
Source:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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 ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , 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 org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc powerDown ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.shutdown ( vmId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterHookContentInfoReturnForXmlRpc glusterHookRead ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookRead ( glusterCommand , stage , hookName ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterHookContentInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterHookContentInfoReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
private void removeMemoryVolumes ( ) { java.util.Set < java.lang.String > memoryStates = org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( org.ovirt.engine.core.bll.RemoveVmCommand.getDbFacade ( ) . getSnapshotDao ( ) . getAll ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; for ( java.lang.String memoryState : memoryStates ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( VdcActionType.RemoveMemoryVolumes , buildRemoveMemoryVolumesParameters ( memoryState , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.RemoveVmCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { log.errorFormat ( "Failed to remove memory volumes whie removing vm {0} (volumes: {1})" , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , memoryState ) ; } } }

Target:
private void removeMemoryVolumes ( ) { java.util.Set < java.lang.String > memoryStates = org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( org.ovirt.engine.core.bll.RemoveVmCommand.getDbFacade ( ) . getSnapshotDao ( ) . getAll ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; for ( java.lang.String memoryState : memoryStates ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( VdcActionType.RemoveMemoryVolumes , new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( memoryState , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.RemoveVmCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { log.errorFormat ( "Failed to remove memory volumes whie removing vm {0} (volumes: {1})" , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , memoryState ) ; } } }
Source:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( asList ( getEntity ( 1 ) ) ) ; setUpActionExpectations ( VdcActionType.RemoveSnapshot , org.ovirt.engine.core.common.action.RemoveSnapshotParameters.class , new java.lang.String [ ] { "SnapshotId" , "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.SNAPSHOT_ID , org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.VM_ID } , true , true ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( asList ( getEntity ( 1 ) ) ) ; setUpActionExpectations ( ActionType.RemoveSnapshot , org.ovirt.engine.core.common.action.RemoveSnapshotParameters.class , new java.lang.String [ ] { "SnapshotId" , "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.SNAPSHOT_ID , org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.VM_ID } , true , true ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public 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 , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void PctThresholdLessThanZero ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 10 ; settings.diskSpaceUsed = 0 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = - 10 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( domain ) ) ; }

Target:
public void PctThresholdLessThanZero ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 10 ; settings.diskSpaceUsed = 0 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = - 10 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isWithinThresholds ( domain ) ) ; }
Source:
protected void fillMacAddressIfMissing ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface ) { if ( ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getMacAddress ( ) ) ) && ( ( org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . getavailableMacsCount ( ) ) >= 1 ) ) { iface.setMacAddress ( org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . allocateNewMac ( ) ) ; } }

Target:
protected void fillMacAddressIfMissing ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface ) { if ( ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getMacAddress ( ) ) ) && ( ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . getavailableMacsCount ( ) ) >= 1 ) ) { iface.setMacAddress ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . allocateNewMac ( ) ) ; } }
Source:
public static void IsHotPlugAvailable ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void IsLiveStorageMigrationEnabled ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LiveStorageMigrationEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
public void onLogout ( ) { org.ovirt.engine.ui.frontend.AsyncQuery query = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; query.setHandleFailure ( true ) ; query.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { Window.Location.reload ( ) ; } } ; frontend.logoffAsync ( frontend.getLoggedInUser ( ) , query ) ; }