auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : 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 ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmDiskAttachPopupWidget.constants.bootableDisk ( ) ) ; } return null ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolDiskListModel poolDiskListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolDiskListModel ) ( model ) ) ; poolDiskListModel.setVM ( vm ) ; poolDiskListModel.SyncSearch ( ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolDiskListModel poolDiskListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolDiskListModel ) ( model ) ) ; poolDiskListModel.setVM ( vm ) ; poolDiskListModel.syncSearch ( ) ; } }
Source:
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 ) ; }

Target:
public static void isAnyHostUpInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( ( source != null ) && ( ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , 1 ) ; }
Source:
public void canDoActionMaxBlockDiskSizeCheckSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.createDiskImage ( org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.MAX_BLOCK_SIZE ) ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , StorageType.ISCSI ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void validateMaxBlockDiskSizeCheckSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.createDiskImage ( org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.MAX_BLOCK_SIZE ) ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , StorageType.ISCSI ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; runAndAssertValidateSuccess ( ) ; }
Source:
public void hostNameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.Matchers.any ( java.lang.String.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) ; org.mockito.Mockito.when ( dbFacade.getVdsDao ( ) ) . thenReturn ( hostDao ) ; validator = new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST ) ) ; }

Target:
public void hostNameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.Matchers.any ( java.lang.String.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) ; org.mockito.Mockito.when ( dbFacade.getVdsDao ( ) ) . thenReturn ( hostDao ) ; validator = new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host , hostedEngineHelper ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST ) ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . addNetworks ( networks ) . build ( ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addRemovedNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( nullParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getRemovedNetworkAttachments ( ) ) == null ) { parameters.setRemovedNetworkAttachments ( new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment : networkAttachments ) { parameters.getRemovedNetworkAttachments ( ) . add ( networkAttachment.getId ( ) ) ; } return this ; }
Source:
public void getVolumeList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { getVolumeList ( aQuery , null , doRefresh ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void testPersistNetworkAttachmentsWhenCustomPropertiesChanged ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( new java.util.HashMap < > ( ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createLegacyPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IpConfiguration createIpConfiguration ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration result = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address ipv4Address = createIpv4Address ( ) ; org.ovirt.engine.core.common.businessentities.network.IpV6Address ipv6Address = createIpv6Address ( ) ; result.setIPv4Addresses ( java.util.Collections.singletonList ( ipv4Address ) ) ; result.setIpV6Addresses ( java.util.Collections.singletonList ( ipv6Address ) ) ; return result ; }
Source:
public void testTryParse ( ) { org.ovirt.engine.core.compat.TimeSpan ref = org.ovirt.engine.core.compat.TimeSpan.tryParse ( "-1.02:03:04.05" ) ; assertNotNull ( "A TimeSpan should be returned" , ref ) ; assertEquals ( "days" , ( - 1 ) , ref.Days ) ; ref = org.ovirt.engine.core.compat.TimeSpan.tryParse ( "A Long Time" ) ; assertNull ( "A TimeSpan should not be returned" , ref ) ; }

Target:
public void testTryParse ( ) { org.ovirt.engine.core.compat.TimeSpan ref = org.ovirt.engine.core.compat.TimeSpan.tryParse ( "-1.02:03:04.05" ) ; org.junit.Assert.assertNotNull ( "A TimeSpan should be returned" , ref ) ; org.junit.Assert.assertEquals ( "days" , ( - 1 ) , ref.Days ) ; ref = org.ovirt.engine.core.compat.TimeSpan.tryParse ( "A Long Time" ) ; org.junit.Assert.assertNull ( "A TimeSpan should not be returned" , ref ) ; }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public 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 ) ; }
Source:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
private void verifyBuiltPoolVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { verifyBuiltCoreVm ( vm.getStaticData ( ) ) ; verifyBuiltKernelOptions ( vm.getStaticData ( ) ) ; verifyBuiltMigrationOptions ( vm.getStaticData ( ) ) ; verifyBuiltVmSpecific ( vm ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.VM_NAME , vm.getName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.USB_POLICY , vm.getUsbPolicy ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.HOST_ID , vm.getDedicatedVmForVdsList ( ) . get ( 0 ) ) ; }

Target:
private void verifyBuiltPoolVm ( org.ovirt.engine.core.common.businessentities.VM vm ) { verifyBuiltCoreVm ( vm.getStaticData ( ) ) ; verifyBuiltKernelOptions ( vm.getStaticData ( ) ) ; verifyBuiltMigrationOptions ( vm.getStaticData ( ) ) ; verifyBuiltVmSpecific ( vm ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.VM_NAME , vm.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.USB_POLICY , vm.getUsbPolicy ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.ui.uicommonweb.models.pools.HOST_ID , vm.getDedicatedVmForVdsList ( ) . get ( 0 ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , getStorageDomainId ( ) , getRequestDiskSpace ( ) ) ) ; } return list ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , getStorageDomainId ( ) , getRequestDiskSpace ( ) ) ) ; } return list ; }
Source:
protected void onPropertyChanged ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . onPropertyChanged ( e ) ; if ( ( e.propertyName.equals ( "Disks" ) ) || ( e.propertyName.equals ( org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel.VOLUME_TYPE ) ) ) { updateStorageDomainsAvailability ( ) ; updateQuotaAvailability ( ) ; } }

Target:
protected void onPropertyChanged ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . onPropertyChanged ( e ) ; if ( ( ( ( e.propertyName.equals ( "Disks" ) ) || ( e.propertyName.equals ( org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel.VOLUME_TYPE ) ) ) || ( e.propertyName.equals ( org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel.VOLUME_FORMAT ) ) ) || ( e.propertyName.equals ( org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel.THIN_PROVISIONING ) ) ) { updateStorageDomainsAvailability ( ) ; updateQuotaAvailability ( ) ; } }
Source:
protected static boolean doesStorageDomainHaveSpaceForRequest ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , long sizeRequested ) { return new org.ovirt.engine.core.bll.validator.StorageDomainValidator ( storageDomain ) . isDomainHasSpaceForRequest ( sizeRequested ) . isValid ( ) ; }

Target:
private static boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( disksList ) . isValid ( ) ) ; }
Source:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetAllTasksInfoVDSCommand.log.infoFormat ( "-- executeIrsBrokerCommand: Attempting on storage pool '{0}'" , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetAllTasksInfoVDSCommand.getParameters ( ) . getStoragePoolId ( ) ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.HSMGetAllTasksInfo , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetAllTasksInfoVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) ) ) . getReturnValue ( ) ) ; }

Target:
protected void executeIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetAllTasksInfoVDSCommand.log.info ( "-- executeIrsBrokerCommand: Attempting on storage pool '{}'" , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetAllTasksInfoVDSCommand.getParameters ( ) . getStoragePoolId ( ) ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.HSMGetAllTasksInfo , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetAllTasksInfoVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) ) ) . getReturnValue ( ) ) ; }
Source:
public void copyDataTo ( ovirt_engine_dwh.configurationsync_3_5.ConfigurationSync.after_tJDBCInput_11Struct other ) { other.user_join_id = this . user_join_id ; other.first_name = this . first_name ; other.last_name = this . last_name ; other.domain = this . domain ; other.username = this . username ; other.department = this . department ; other.user_role_title = this . user_role_title ; other.email = this . email ; other.external_id = this . external_id ; other.active = this . active ; other.create_date = this . create_date ; other.update_date = this . update_date ; }

Target:
public void copyDataTo ( ovirt_engine_dwh.configurationsync_3_5.ConfigurationSync.after_tJDBCInput_11Struct other ) { other.user_id = this . user_id ; other.user_join_id = this . user_join_id ; other.first_name = this . first_name ; other.last_name = this . last_name ; other.domain = this . domain ; other.username = this . username ; other.department = this . department ; other.user_role_title = this . user_role_title ; other.email = this . email ; other.external_id = this . external_id ; other.active = this . active ; other.create_date = this . create_date ; other.update_date = this . update_date ; }
Source:
public void appendCustomValue ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.AppendCustomValue ( key , value , sep ) ; final java.lang.String s = b.GetCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }

Target:
public void appendCustomValue ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String sep = "_" ; b.appendCustomValue ( key , value , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( value , s ) ; }
Source:
public void getMaxSpmPriority ( 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 ( ) , 10 ) ; }

Target:
public 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 ) ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
public void testGetLunsToUpdateInDbDiffDeviceSize ( ) { setLunsSameLunAndPvIds ( ) ; lunFromVg.setDeviceSize ( 20 ) ; lunFromDb.setDeviceSize ( 10 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( ) . get ( command.updateExistingLuns ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunFromVg.getLUNId ( ) ) ; }

Target:
public void testGetLunsToUpdateInDbDiffDeviceSize ( ) { lunFromVg.setDeviceSize ( 20 ) ; lunFromDb.setDeviceSize ( 10 ) ; assertLunShouldBeUpdatedDueToFieldChange ( ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { sb.append ( org.ovirt.engine.ui.common.widget.table.column.StyledImageResourceCell.template.imageContainer ( style , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ) ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { sb.append ( org.ovirt.engine.ui.common.widget.table.column.StyledImageResourceCell.template.imageContainerWithStyleClass ( style , styleClass , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ) ) ; } }
Source:
private void logNetworkException ( org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException e ) { switch ( cachedVds.getStatus ( ) ) { case Down : break ; case NonResponsive : org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Failed to refresh VDS , cachedVds = '{}' : '{}', VDS Network Error, continuing. '{}'" , cachedVds.getId ( ) , cachedVds.getName ( ) , e.getMessage ( ) ) ; break ; default : org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( "Failed to refresh VDS , cachedVds = '{}' : '{}', VDS Network Error, continuing. '{}'" , cachedVds.getId ( ) , cachedVds.getName ( ) , e.getMessage ( ) ) ; } org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Exception" , e ) ; }

Target:
private void logHostNonResponding ( long timeoutToFence ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warn ( ( "Host '{}' is not responding. It will stay in Connecting state for a grace period " + "of seconds and after that an attempt to fence the host will be issued." ) , cachedVds.getName ( ) , java.util.concurrent.TimeUnit.MILLISECONDS.toSeconds ( timeoutToFence ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVdsId ( cachedVds.getId ( ) ) ; logable.addCustomValue ( "Seconds" , java.lang.Long.toString ( java.util.concurrent.TimeUnit.MILLISECONDS.toSeconds ( timeoutToFence ) ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VDS_HOST_NOT_RESPONDING_CONNECTING ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > GetEventNotificationTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ret = new java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ( ) ; for ( org.ovirt.engine.core.common.EventNotificationEntity entity : org.ovirt.engine.core.common.EventNotificationEntity.values ( ) ) { if ( entity != ( org.ovirt.engine.core.common.EventNotificationEntity.UNKNOWN ) ) { ret.add ( entity ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > getEventNotificationTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ret = new java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ( ) ; for ( org.ovirt.engine.core.common.EventNotificationEntity entity : org.ovirt.engine.core.common.EventNotificationEntity.values ( ) ) { if ( entity != ( org.ovirt.engine.core.common.EventNotificationEntity.UNKNOWN ) ) { ret.add ( entity ) ; } } return ret ; }
Source:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . innerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . innerText ) ; } return - 1 ; }

Target:
private int getResourceType ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . innerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . innerText ) ; } return - 1 ; }
Source:
static org.ovirt.engine.api.model.Network setUpEntityExpectations ( org.ovirt.engine.api.model.Network entity , boolean isDisplay , boolean isRequired , int index ) { org.ovirt.engine.core.common.businessentities.NetworkCluster networkCluster = new org.ovirt.engine.core.common.businessentities.NetworkCluster ( ) ; networkCluster.setis_display ( isDisplay ) ; networkCluster.setRequired ( isRequired ) ; org.easymock.EasyMock.expect ( entity.getCluster ( ) ) . andReturn ( networkCluster ) . anyTimes ( ) ; return org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.setUpEntityExpectations ( entity , index ) ; }

Target:
static org.ovirt.engine.api.model.Network setUpEntityExpectations ( org.ovirt.engine.api.model.Network entity , boolean isDisplay , boolean isRequired , int index ) { org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster = new org.ovirt.engine.core.common.businessentities.network.NetworkCluster ( ) ; networkCluster.setis_display ( isDisplay ) ; networkCluster.setRequired ( isRequired ) ; org.easymock.EasyMock.expect ( entity.getCluster ( ) ) . andReturn ( networkCluster ) . anyTimes ( ) ; return org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.setUpEntityExpectations ( entity , index ) ; }
Source:
public org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > > > mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return new org.ovirt.engine.core.common.utils.Pair ( getGuid ( rs , "assigned_vm_numa_node_id" ) , new org.ovirt.engine.core.common.utils.Pair ( getGuid ( rs , "run_in_vds_numa_node_id" ) , new org.ovirt.engine.core.common.utils.Pair ( rs.getBoolean ( "is_pinned" ) , rs.getInt ( "run_in_vds_numa_node_index" ) ) ) ) ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return new org.ovirt.engine.core.common.utils.Pair ( getGuid ( rs , "assigned_vm_numa_node_id" ) , rs.getInt ( "last_run_in_vds_numa_node_index" ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc getXmlRpcStatus ( ) { if ( ( status ) == null ) { java.util.Map < java.lang.String , java.lang.Object > statusMap = ( ( java.util.Map < java.lang.String , java.lang.Object > ) ( innerMap.get ( org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc.STATUS ) ) ) ; status = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc ( statusMap ) ; } return status ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.Status getStatus ( ) { if ( ( status ) == null ) { java.util.Map < java.lang.String , java.lang.Object > statusMap = ( ( java.util.Map < java.lang.String , java.lang.Object > ) ( innerMap.get ( org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturn.STATUS ) ) ) ; status = new org.ovirt.engine.core.vdsbroker.vdsbroker.Status ( statusMap ) ; } return status ; }
Source:
public void getQosByDiskProfileIds ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.qos.StorageQos > qosMap = dao.getQosByDiskProfileIds ( java.util.Collections.singleton ( FixturesTool.DISK_PROFILE_1 ) ) ; org.junit.Assert.assertNotNull ( qosMap ) ; org.junit.Assert.assertEquals ( FixturesTool.QOS_ID_1 , qosMap.get ( FixturesTool.DISK_PROFILE_1 ) . getId ( ) ) ; }

Target:
public void getQosByDiskProfileIds ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.qos.StorageQos > qosMap = dao.getQosByDiskProfileIds ( java.util.Collections.singleton ( FixturesTool.DISK_PROFILE_1 ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( qosMap ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.QOS_ID_1 , qosMap.get ( FixturesTool.DISK_PROFILE_1 ) . getId ( ) ) ; }
Source:
public void isConnWithSameDetailsExistBlockDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; connections.add ( connection1 ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistBlockDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; org.mockito.Mockito.when ( command.findConnectionWithSameDetails ( newISCSIConnection ) ) . thenReturn ( connection1 ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }
Source:
public void testValidateNotRemovingUsedNetworkByVmsSingleNetworkMultipleVms ( ) { final java.util.List < java.lang.String > vmsNames = java.util.Arrays.asList ( org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidatorTest.VM_A , org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidatorTest.VM_B ) ; final java.util.List < java.lang.String > removedNetworks = java.util.Arrays.asList ( org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidatorTest.NETWORK_A ) ; underTest = new org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidator ( vmsNames , removedNetworks ) ; org.junit.Assert.assertThat ( underTest.validate ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , org.ovirt.engine.core.utils.linq.LinqUtils.concat ( org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( DetachNetworkUsedByVmValidator.VAR_VM_NAMES , vmsNames ) , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( DetachNetworkUsedByVmValidator.VAR_NETWORK_NAME , removedNetworks ) ) ) ) ; }

Target:
public void testValidateNotRemovingUsedNetworkByVmsSingleNetworkMultipleVms ( ) { final java.util.List < java.lang.String > vmsNames = java.util.Arrays.asList ( org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidatorTest.VM_A , org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidatorTest.VM_B ) ; final java.util.List < java.lang.String > removedNetworks = java.util.Arrays.asList ( org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidatorTest.NETWORK_A ) ; underTest = new org.ovirt.engine.core.bll.validator.network.DetachNetworkUsedByVmValidator ( vmsNames , removedNetworks ) ; org.junit.Assert.assertThat ( underTest.validate ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.SINGLE_NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , org.ovirt.engine.core.utils.linq.LinqUtils.concat ( org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( DetachNetworkUsedByVmValidator.VAR_VM_NAMES , vmsNames ) , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( DetachNetworkUsedByVmValidator.VAR_NETWORK_NAME , removedNetworks ) ) ) ) ; }
Source:
protected java.util.List < java.lang.String > getEntityNames ( org.ovirt.engine.core.common.scheduling.AffinityGroup object ) { java.util.List < java.lang.String > entityNames = super . getEntityNames ( object ) ; java.lang.String vmName = getDetailModel ( ) . getEntity ( ) . getName ( ) ; for ( int i = 0 ; i < ( entityNames.size ( ) ) ; i ++ ) { if ( entityNames.get ( i ) . equals ( vmName ) ) { entityNames.remove ( i ) ; break ; } } return entityNames ; }

Target:
protected java.util.List < java.lang.String > getVmNames ( org.ovirt.engine.core.common.scheduling.AffinityGroup group ) { java.util.List < java.lang.String > entityNames = super . getVmNames ( group ) ; java.lang.String vmName = getDetailModel ( ) . getEntity ( ) . getName ( ) ; for ( int i = 0 ; i < ( entityNames.size ( ) ) ; i ++ ) { if ( entityNames.get ( i ) . equals ( vmName ) ) { entityNames.remove ( i ) ; break ; } } return entityNames ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates = org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getDbFacade ( ) . getVmTemplateDAO ( ) . getAllTemplatesRelatedToQuotaId ( org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getParameters ( ) . getQuotaId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplates ) { org.ovirt.engine.core.bll.VmTemplateHandler.UpdateDisksFromDb ( vmTemplate ) ; } org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vmTemplates ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates = org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getDbFacade ( ) . getVmTemplateDao ( ) . getAllTemplatesRelatedToQuotaId ( org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getParameters ( ) . getQuotaId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplates ) { org.ovirt.engine.core.bll.VmTemplateHandler.UpdateDisksFromDb ( vmTemplate ) ; } org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vmTemplates ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.String value , com.google.gwt.dom.client.Element parent ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml safeHtmlValue = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( value ) ; if ( ( maxTextLength ) >= 0 ) { com.google.gwt.safehtml.shared.SafeHtml renderedValue = getRenderedValue ( safeHtmlValue ) ; if ( ! ( safeHtmlValue.equals ( renderedValue ) ) ) { return safeHtmlValue ; } } else if ( contentOverflows ( parent.getFirstChildElement ( ) ) ) { return safeHtmlValue ; } } return null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.String value , com.google.gwt.dom.client.Element parent , com.google.gwt.dom.client.NativeEvent event ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml safeHtmlValue = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( value ) ; if ( ( maxTextLength ) >= 0 ) { com.google.gwt.safehtml.shared.SafeHtml renderedValue = getRenderedValue ( safeHtmlValue ) ; if ( ! ( safeHtmlValue.equals ( renderedValue ) ) ) { return safeHtmlValue ; } } else if ( contentOverflows ( parent.getFirstChildElement ( ) ) ) { return safeHtmlValue ; } } return null ; }
Source:
protected void executeCommand ( ) { java.lang.String connectionId = org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getConnection ( ) . getid ( ) ; getStorageServerConnectionDao ( ) . remove ( connectionId ) ; org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.disconnectStorage ( ) ; org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { java.lang.String connectionId = org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getConnection ( ) . getid ( ) ; getStorageServerConnectionDao ( ) . remove ( connectionId ) ; log.infoFormat ( "Removing connection {0} from database " , connectionId ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) ) ) { log.info ( "No vdsId passed - hosts will not be disconnected." ) ; } else { org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.disconnectStorage ( ) ; } org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.setSucceeded ( true ) ; }
Source:
protected boolean setAndValidateDiskProfiles ( ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . setDiskProfileId ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getDiskProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getStorageDomainId ( ) ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ) ; }

Target:
protected boolean setAndValidateDiskProfiles ( ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . setDiskProfileId ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getDiskProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getStorageDomainId ( ) ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStoragePool ( ) . getcompatibility_version ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getCurrentUser ( ) ) ) ; }
Source:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandBase.getParameters ( ) . getHookId ( ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED ) ; return false ; } if ( ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandBase.getGlusterHooksDao ( ) . getById ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandBase.getParameters ( ) . getHookId ( ) ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandBase.getParameters ( ) . getHookId ( ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED ) ; return false ; } if ( ( glusterHooksDao.getById ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandBase.getParameters ( ) . getHookId ( ) ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST ) ; return false ; } return true ; }
Source:
protected void updateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( storageType.isFileDomain ( ) ) { getIsWipeAfterDelete ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.CONSTANTS.wipeAfterDeleteNotSupportedForFileDomains ( ) ) ; getIsWipeAfterDelete ( ) . setIsChangable ( false ) ; getIsWipeAfterDelete ( ) . setEntity ( false ) ; } else { getIsWipeAfterDelete ( ) . setIsChangable ( true ) ; getIsWipeAfterDelete ( ) . setEntity ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.SANWipeAfterDelete ) ) ; } }

Target:
protected void updateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( storageType.isFileDomain ( ) ) { getIsWipeAfterDelete ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.CONSTANTS.wipeAfterDeleteNotSupportedForFileDomains ( ) ) ; getIsWipeAfterDelete ( ) . setIsChangable ( false ) ; getIsWipeAfterDelete ( ) . setEntity ( false ) ; } else { getIsWipeAfterDelete ( ) . setIsChangable ( true ) ; getIsWipeAfterDelete ( ) . setEntity ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SANWipeAfterDelete ) ) ; } }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { return getBackend ( ) . runInternalAction ( VdcActionType.SetupGlusterGeoRepMountBrokerInternal , new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( currentSlaveServer.getId ( ) , getParameters ( ) . getSlaveVolumeName ( ) , getParameters ( ) . getUserName ( ) , getParameters ( ) . getUserGroup ( ) ) ) . getSucceeded ( ) ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { return getBackend ( ) . runInternalAction ( VdcActionType.SetupGlusterGeoRepMountBrokerInternal , new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( currentSlaveServerId , getParameters ( ) . getSlaveVolumeName ( ) , getParameters ( ) . getUserName ( ) , getParameters ( ) . getUserGroup ( ) , true ) ) . getSucceeded ( ) ; }
Source:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setstatus ( VMStatus.ImageLocked ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setapp_list ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getapp_list ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }

Target:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setstatus ( VMStatus.ImageLocked ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setapp_list ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getapp_list ( ) ) ; getVmDynamicDAO ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }