auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.network.Network , java.util.Set < org.ovirt.engine.core.compat.Guid > > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }

Target:
public void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.network.Network , java.util.Set < org.ovirt.engine.core.compat.Guid > > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.VmTemplate paramT1 , org.ovirt.engine.core.common.businessentities.VmTemplate paramT2 ) { return paramT1.getName ( ) . compareTo ( paramT2.getName ( ) ) ; }

Target:
public void setItems ( java.lang.Iterable value ) { if ( value != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > itemList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( value ) ) ; java.util.Collections.sort ( itemList , new org.ovirt.engine.ui.uicommonweb.Linq.VmTemplateComparator ( ) ) ; } super . setItems ( value ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > FindAllInterfaceNetworkNameNotEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkInterface i : items ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getNetworkName ( ) ) ) ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > findAllInterfaceNetworkNameNotEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkInterface i : items ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getNetworkName ( ) ) ) ) { ret.add ( i ) ; } } return ret ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionDelete ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionDelete ( volumeName , remoteHost , remoteVolumeName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc ( vdsServer.glusterVolumeGeoRepConfigList ( volumeName , slaveHost , slaveVolumeName , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private static boolean canPlugInterface ( org.ovirt.engine.core.common.businessentities.network.VmNic iface , org.ovirt.engine.core.compat.Guid vdsGroupId ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVdsGroupDao ( ) . get ( vdsGroupId ) ; org.ovirt.engine.core.compat.Guid dataCenterId = ( vdsGroup == null ) ? null : vdsGroup.getStoragePoolId ( ) ; java.lang.String macAddress = iface.getMacAddress ( ) ; boolean canPlugInterface = org.ovirt.engine.core.bll.utils.VmDeviceUtils.canPlugInterfaceInDc ( macAddress , dataCenterId ) ; if ( ! canPlugInterface ) { new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) . auditLogMacInUseUnplug ( iface ) ; } return canPlugInterface ; }

Target:
private static java.util.Map < java.lang.String , java.lang.Object > getVideoDeviceSpecParams ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { return org.ovirt.engine.core.bll.utils.VideoDeviceSettings.getVideoDeviceSpecParams ( vmBase ) ; }
Source:
public void testUpdate ( ) { java.lang.String oldName = existingVdsGroup.getname ( ) ; existingVdsGroup.setname ( "This is the new name" ) ; existingVdsGroup.setVirtService ( false ) ; existingVdsGroup.setGlusterService ( true ) ; dao.update ( existingVdsGroup ) ; org.ovirt.engine.core.common.businessentities.VDSGroup result = dao.get ( existingVdsGroup.getId ( ) ) ; assertCorrectVDSGroup ( result ) ; result = dao.getByName ( oldName ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testUpdate ( ) { java.lang.String oldName = existingVdsGroup.getName ( ) ; existingVdsGroup.setName ( "This is the new name" ) ; existingVdsGroup.setVirtService ( false ) ; existingVdsGroup.setGlusterService ( true ) ; dao.update ( existingVdsGroup ) ; org.ovirt.engine.core.common.businessentities.VDSGroup result = dao.get ( existingVdsGroup.getId ( ) ) ; assertCorrectVDSGroup ( result ) ; result = dao.getByName ( oldName ) ; org.junit.Assert.assertNull ( result ) ; }
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 getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void handleFinalizingFailure ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.error ( "Finalizing failed transfer. {}" , getTransferDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; setImageStatus ( ImageStatus.ILLEGAL ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; }

Target:
private void handleFinalizingFailure ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.error ( "Finalizing failed transfer. {}" , getTransferDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; setImageStatus ( ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ? org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL : org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ) ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; }
Source:
public void testValueCaps ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "FA" ) ) ; assertTrue ( "false" , comps.contains ( "false" ) ) ; assertTrue ( "true" , ( ! ( comps.contains ( "true" ) ) ) ) ; }

Target:
public void testValueCaps ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "FA" ) ) ; org.junit.Assert.assertTrue ( "false" , comps.contains ( "false" ) ) ; org.junit.Assert.assertTrue ( "true" , ( ! ( comps.contains ( "true" ) ) ) ) ; }
Source:
public java.lang.String nextString ( int length , char [ ] chars ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( length ) ; for ( int i = 0 ; i < length ; ++ i ) { sb.append ( pickRandom ( org.apache.commons.lang.ArrayUtils.toObject ( chars ) ) ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String nextString ( int length , char [ ] chars ) { java.lang.Character [ ] characters = org.apache.commons.lang.ArrayUtils.toObject ( chars ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( length ) ; for ( int i = 0 ; i < length ; ++ i ) { sb.append ( pickRandom ( characters ) ) ; } return sb.toString ( ) ; }
Source:
public void postOnNew ( java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; if ( ( returnValues != null ) && ( org.ovirt.engine.ui.uicommonweb.Linq.all ( returnValues , new org.ovirt.engine.ui.uicommonweb.Linq.ValidateSucceedPredicate ( ) ) ) ) { cancel ( ) ; } }

Target:
public void postOnNew ( java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; if ( ( returnValues != null ) && ( returnValues.stream ( ) . allMatch ( new org.ovirt.engine.ui.uicommonweb.Linq.ValidateSucceedPredicate ( ) ) ) ) { cancel ( ) ; } }
Source:
public void testUpdateSetAndUploadIconFailure ( ) throws java.lang.Exception { control.replay ( ) ; final org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.getModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }

Target:
protected void verifyModelClearingPayloads ( org.ovirt.engine.api.model.Vm model , int index ) { verifyModel ( model , index ) ; assertNull ( model.getPayloads ( ) ) ; }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void GetNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.GetAllNetworkQueryParamenters ( dataCenterId ) , aQuery ) ; }
Source:
public void testNetworkNotChanged ( ) { org.ovirt.engine.core.compat.Guid networkId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; oldAttachment.setNetworkId ( networkId ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( networkId ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotChanged ( oldAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworkNotChanged ( ) { org.ovirt.engine.core.compat.Guid networkId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; oldAttachment.setNetworkId ( networkId ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( networkId ) ; org.hamcrest.MatcherAssert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotChanged ( oldAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testQueryWithNonExistingHostId ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getVdsId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.ovirt.engine.core.bll.GetoVirtISOsTest.checkReturnValue ( getQuery ( ) ) ; }

Target:
public void testQueryWithoutHostId ( ) { getQuery ( ) . setInternalExecution ( true ) ; getQuery ( ) . executeCommand ( ) ; org.ovirt.engine.core.bll.CommandAssertUtils.checkSucceeded ( getQuery ( ) , true ) ; org.ovirt.engine.core.bll.GetoVirtISOsTest.checkReturnValueEmpty ( getQuery ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.storage_domains mockStorageDomain ( int availableSize , int usedSize , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.storage_domains sd = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; sd.setavailable_disk_size ( availableSize ) ; sd.setused_disk_size ( usedSize ) ; sd.setstatus ( StorageDomainStatus.Active ) ; sd.setstorage_type ( storageType ) ; return sd ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StorageDomain mockStorageDomain ( int availableSize , int usedSize , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd.setAvailableDiskSize ( availableSize ) ; sd.setUsedDiskSize ( usedSize ) ; sd.setStatus ( StorageDomainStatus.Active ) ; sd.setStorageType ( storageType ) ; return sd ; }
Source:
public void testRemoveNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetNetworksByDataCenterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testRemoveNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.NETWORK_ID } , null , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void testJsonNullDiskDescription ( ) throws java.io.IOException { disk.setDiskAlias ( "DiskAlias" ) ; disk.setDiskDescription ( null ) ; assertDiskDescriptionMap ( disk ) ; }

Target:
public void setUp ( ) { disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; metadataDiskDescriptionHandler = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.getInstance ( ) ) ; org.mockito.Mockito.doReturn ( auditLogDirector ) . when ( metadataDiskDescriptionHandler ) . getAuditLogDirector ( ) ; org.mockito.Mockito.doNothing ( ) . when ( auditLogDirector ) . log ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
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 ) ; }
Source:
private static java.lang.String extractIpv6Address ( java.util.Map < java.lang.String , java.lang.Object > properties ) { final java.lang.Object [ ] ipv6Addresses = ( ( java.lang.Object [ ] ) ( properties.get ( "ipv6addrs" ) ) ) ; if ( ( ipv6Addresses == null ) || ( ( ipv6Addresses.length ) == 0 ) ) { return null ; } return ( ( java.lang.String ) ( ipv6Addresses [ 0 ] ) ) ; }

Target:
private static java.lang.String getIpv6Address ( java.util.Map < java.lang.String , java.lang.Object > properties ) { final java.lang.Object [ ] ipv6Addresses = ( ( java.lang.Object [ ] ) ( properties.get ( "ipv6addrs" ) ) ) ; if ( ( ipv6Addresses == null ) || ( ( ipv6Addresses.length ) == 0 ) ) { return null ; } return ( ( java.lang.String ) ( ipv6Addresses [ 0 ] ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.updateOptionsPostData ( ) ; }

Target:
private void updateOptionsPostData ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Disk > disks ) { org.ovirt.engine.ui.uicommonweb.UICommand addDiskAction = new org.ovirt.engine.ui.uicommonweb.UICommand ( "AddDisk" , this ) ; if ( disks.isEmpty ( ) ) { addDiskAction.setTitle ( VmConfigureVirtualDisksAction ) ; getCompulsoryActions ( ) . add ( addDiskAction ) ; } else { addDiskAction.setTitle ( VmAddAnotherVirtualDiskAction ) ; getOptionalActions ( ) . add ( addDiskAction ) ; } stopProgress ( ) ; }
Source:
private void initInfoIcons ( org.ovirt.engine.ui.webadmin.ApplicationResources resources , org.ovirt.engine.ui.webadmin.ApplicationConstants constants , org.ovirt.engine.ui.webadmin.ApplicationTemplates templates ) { filterInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicWordWrapMaxWidth ( constants.clusterPolicyFilterInfo ( ) ) , resources ) ; functionInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicWordWrapMaxWidth ( constants.clusterPolicyWeightFunctionInfo ( ) ) , resources ) ; loadBalancingInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicWordWrapMaxWidth ( constants.clusterPolicyLoadBalancingInfo ( ) ) , resources ) ; propertiesInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicWordWrapMaxWidth ( constants.clusterPolicyPropertiesInfo ( ) ) , resources ) ; }

Target:
private void initInfoIcons ( ) { filterInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.templates.italicWordWrapMaxWidth ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.constants.clusterPolicyFilterInfo ( ) ) ) ; functionInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.templates.italicWordWrapMaxWidth ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.constants.clusterPolicyWeightFunctionInfo ( ) ) ) ; loadBalancingInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.templates.italicWordWrapMaxWidth ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.constants.clusterPolicyLoadBalancingInfo ( ) ) ) ; propertiesInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.templates.italicWordWrapMaxWidth ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyPopupView.constants.clusterPolicyPropertiesInfo ( ) ) ) ; }
Source:
private void logMessage ( org.ovirt.engine.core.compat.Guid clusterId , final java.lang.String hookName , org.ovirt.engine.core.common.AuditLogType logType ) { logUtil.logAuditMessage ( clusterId , null , null , logType , new java.util.HashMap < java.lang.String , java.lang.String > ( ) { { put ( "hookName" , hookName ) ; } } ) ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.core.common.vdscommands.VDSReturnValue > call ( ) throws java.lang.Exception { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.GetGlusterHookContent , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterHookVDSParameters ( server.getId ( ) , hook.getGlusterCommand ( ) , hook.getStage ( ) , hook.getName ( ) ) ) ; return new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.core.common.vdscommands.VDSReturnValue > ( hook , returnValue ) ; }
Source:
public void canDoActionSpaceValidationSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Preallocated ) ; mockVm ( ) ; mockEntities ( storageId ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void canDoActionSpaceValidationSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Preallocated ) ; mockVm ( ) ; mockEntities ( storageId ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
private boolean isEditAvailable ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain ) { if ( storageDomain == null ) { return false ; } boolean isActive = ( ( storageDomain.getstorage_domain_shared_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Active ) ) || ( ( storageDomain.getstorage_domain_shared_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Mixed ) ) ; boolean isBlockStorage = storageDomain.getstorage_type ( ) . isBlockDomain ( ) ; return isBlockStorage ? true : isActive ; }

Target:
private boolean isEditAvailable ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { if ( storageDomain == null ) { return false ; } boolean isActive = ( ( storageDomain.getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Active ) ) || ( ( storageDomain.getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Mixed ) ) ; boolean isBlockStorage = storageDomain.getStorageType ( ) . isBlockDomain ( ) ; return isBlockStorage ? true : isActive ; }
Source:
public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { return ( ( org.ovirt.engine.core.utils.transaction.TransactionMethod < ? > ) ( invocation.getArguments ( ) [ 0 ] ) ) . runInTransaction ( ) ; }

Target:
protected org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand < org.ovirt.engine.core.common.action.RemoveStorageDomainParameters > createCommand ( boolean format ) { org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand < org.ovirt.engine.core.common.action.RemoveStorageDomainParameters > cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand < org.ovirt.engine.core.common.action.RemoveStorageDomainParameters > ( getParams ( format ) ) ) ; org.mockito.Mockito.doReturn ( db ) . when ( cmd ) . getDbFacade ( ) ; org.mockito.Mockito.doReturn ( backend ) . when ( cmd ) . getBackend ( ) ; return cmd ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( "IconWithOsDefault{" + "icon='" ) + ( org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault.iconUriToString ( icon ) ) ) + "', osDefaultIcon='" ) + ( org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault.iconUriToString ( osDefaultIcon ) ) ) + "'" ) + ", smallIconId='" ) + ( smallIconId ) ) + "'" ) + '}' ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( "IconWithOsDefault{" + "icon='" ) + ( org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault.iconUriToString ( icon ) ) ) + "', osDefaultIcon='" ) + ( org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault.iconUriToString ( osDefaultIcon ) ) ) + "'" ) + ", smallIconId='" ) + ( smallIconId ) ) + "'" ) + ", validationResult='" ) + ( validationResult ) ) + "'" ) + '}' ; }
Source:
private boolean interfaceWasModified ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { return ! ( iface.equals ( getExistingIfaces ( ) . get ( iface.getName ( ) ) ) ) ; }

Target:
private boolean unmanagedNetworkChanged ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface existingIface = getExistingIfaces ( ) . get ( iface.getName ( ) ) ; return ( existingIface == null ) || ( ! ( iface.getNetworkName ( ) . equals ( existingIface.getNetworkName ( ) ) ) ) ; }
Source:
protected java.lang.String applySortOptions ( java.lang.String searchString ) { java.lang.String result = searchString ; if ( ( sortBy ) != null ) { result += ( ( ( ( " " + ( org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTBY ) ) + " " ) + ( sortBy ) ) + " " ) + ( sortAscending ? org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTDIR_ASC : org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTDIR_DESC ) ; } return result ; }

Target:
protected java.lang.String applySortOptions ( java.lang.String searchString ) { java.lang.String result = searchString ; if ( ( sortBy ) != null ) { result += ( ( ( ( " " + ( org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTBY ) ) + " " ) + ( sortBy ) ) + " " ) + ( sortAscending ? org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTDIR_ASC : org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTDIR_DESC ) ; } if ( ( result != null ) && ( ( pagingSearchString ) != null ) ) { result += " " + ( pagingSearchString ) ; } return result ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.TemplateBackupModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( ( source.getConfirmWindow ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.ImportCloneModel ) { return importClonePopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageDiskListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , java.lang.Boolean value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { java.lang.Object key = context.getKey ( ) ; java.lang.Boolean viewData = getViewData ( key ) ; if ( ( viewData != null ) && ( viewData.equals ( value ) ) ) { clearViewData ( key ) ; viewData = null ; } if ( ( value != null ) && ( viewData != null ? viewData : value ) ) { sb.append ( org.ovirt.engine.ui.common.widget.table.column.RadioboxCell.INPUT_CHECKED ) ; } else { sb.append ( org.ovirt.engine.ui.common.widget.table.column.RadioboxCell.INPUT_UNCHECKED ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , java.lang.Boolean value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { java.lang.Object key = context.getKey ( ) ; java.lang.Boolean viewData = getViewData ( key ) ; if ( ( viewData != null ) && ( viewData.equals ( value ) ) ) { clearViewData ( key ) ; viewData = null ; } if ( ( value != null ) && ( viewData != null ? viewData : value ) ) { sb.append ( org.ovirt.engine.ui.common.widget.table.cell.RadioboxCell.INPUT_CHECKED ) ; } else { sb.append ( org.ovirt.engine.ui.common.widget.table.cell.RadioboxCell.INPUT_UNCHECKED ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { DestinationStorage_SelectedItemChanged ( ) ; }

Target:
public void OnSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel importVmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > quotaList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; importVmModel.getClusterQuota ( ) . setItems ( quotaList ) ; }
Source:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }

Target:
public void validateFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
public static void getMinimalVmMemSize ( 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 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getDataCenterId ( org.ovirt.engine.api.model.Network network ) { java.lang.String networkName = network.getDataCenter ( ) . getName ( ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.StoragePool.class , VdcQueryType.GetStoragePoolByDatacenterName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( networkName ) , ( "Datacenter: name=" + networkName ) ) . getId ( ) ; }

Target:
private org.ovirt.engine.core.compat.Guid getDataCenterId ( org.ovirt.engine.api.model.Network network ) { java.lang.String networkName = network.getDataCenter ( ) . getName ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getEntity ( org.ovirt.engine.core.common.businessentities.StoragePool.class , VdcQueryType.GetStoragePoolByDatacenterName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( networkName ) , networkName , true ) ; return dataCenter.getId ( ) ; }
Source:
public static 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.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 static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public void onSuccess ( final java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from RunMultipleQueries!" ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , result ) ; callback.executed ( f ) ; org.ovirt.engine.ui.frontend.Frontend.raiseQueryCompleteEvent ( queryTypeList , context ) ; }

Target:
public void onSuccess ( final java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.VdcQueryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase > > operationList , final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > resultObject ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from runMultipleQueries!" ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , resultObject ) ; callback.executed ( f ) ; raiseQueryCompleteEvent ( queryTypeList , context ) ; }
Source:
public void checkEqualSubnetStringAndIntegerRepresentation ( ) { org.mockito.Mockito.when ( mockedMaskValidator.isValidNetmaskFormat ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockedMaskValidator.isPrefixValid ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockIpAddressConverter.convertPrefixToNetmask ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ; org.junit.Assert.assertTrue ( underTest.equalSubnet ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT , org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) ; }

Target:
public void checkEqualSubnetStringAndIntegerRepresentation ( ) { org.mockito.Mockito.when ( mockedMaskValidator.isValidNetmaskFormat ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockedMaskValidator.isPrefixValid ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockIpAddressConverter.convertPrefixToNetmask ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) . thenReturn ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT ) ; org.junit.jupiter.api.Assertions.assertTrue ( underTest.equalSubnet ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT , org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_PREFIX ) ) ; }
Source:
public static void updateConsoleDevice ( org.ovirt.engine.core.compat.Guid vmId , java.lang.Boolean consoleEnabled ) { if ( consoleEnabled == null ) { return ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > consoles = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.CONSOLE , VmDeviceType.CONSOLE.getName ( ) ) ; if ( consoleEnabled ) { if ( consoles.isEmpty ( ) ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addConsoleDevice ( vmId ) ; } } else { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : consoles ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( device.getId ( ) ) ; } } }

Target:
public static void updateConsoleDevice ( org.ovirt.engine.core.compat.Guid vmId , java.lang.Boolean consoleEnabled ) { if ( consoleEnabled == null ) { return ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > consoles = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.CONSOLE , VmDeviceType.CONSOLE.getName ( ) ) ; if ( consoleEnabled ) { if ( consoles.isEmpty ( ) ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addConsoleDevice ( vmId ) ; } } else { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : consoles ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( device.getId ( ) ) ; } } }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; } jobProperties.put ( "address" , org.ovirt.engine.core.bll.EventSubscriptionCommandBase.getParameters ( ) . getEventSubscriber ( ) . getmethod_address ( ) ) ; jobProperties.put ( "eventtype" , org.ovirt.engine.core.bll.EventSubscriptionCommandBase.getParameters ( ) . getEventSubscriber ( ) . getevent_up_name ( ) ) ; return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; } jobProperties.put ( "address" , org.ovirt.engine.core.bll.EventSubscriptionCommandBase.getParameters ( ) . getEventSubscriber ( ) . getMethodAddress ( ) ) ; jobProperties.put ( "eventtype" , org.ovirt.engine.core.bll.EventSubscriptionCommandBase.getParameters ( ) . getEventSubscriber ( ) . getEventUpName ( ) ) ; return jobProperties ; }
Source:
public static void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpGetPayloadExpectations ( 1 , 0 ) ; setUpGetBallooningExpectations ( 1 ) ; setUpActionExpectations ( VdcActionType.RemoveVm , org.ovirt.engine.core.common.action.RemoveVmParameters.class , new java.lang.String [ ] { "VmId" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.model.Action ( ) { { } } ) ) ; }

Target:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; mockUniqueOsNames ( ) ; setUpGetEntityExpectations ( ) ; setUpGetPayloadExpectations ( 1 , 0 ) ; setUpGetBallooningExpectations ( 1 ) ; setUpActionExpectations ( VdcActionType.RemoveVm , org.ovirt.engine.core.common.action.RemoveVmParameters.class , new java.lang.String [ ] { "VmId" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.model.Action ( ) { { } } ) ) ; }