auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void RecursiveSetSelection ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel tagModel , java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.Boolean > attachedEntities ) { if ( ( attachedEntities.containsKey ( tagModel.getId ( ) ) ) && ( attachedEntities.get ( tagModel.getId ( ) ) ) ) { tagModel.setSelection ( true ) ; } else { tagModel.setSelection ( false ) ; } if ( ( tagModel.getChildren ( ) ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel subModel : tagModel.getChildren ( ) ) { RecursiveSetSelection ( subModel , attachedEntities ) ; } } }

Target:
public void recursiveSetSelection ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel tagModel , java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.Boolean > attachedEntities ) { if ( ( attachedEntities.containsKey ( tagModel.getId ( ) ) ) && ( attachedEntities.get ( tagModel.getId ( ) ) ) ) { tagModel.setSelection ( true ) ; } else { tagModel.setSelection ( false ) ; } if ( ( tagModel.getChildren ( ) ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel subModel : tagModel.getChildren ( ) ) { recursiveSetSelection ( subModel , attachedEntities ) ; } } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.lang.Boolean isSingleDestStorage = ( ( java.lang.Boolean ) ( object.getIsSingleDestStorage ( ) . getEntity ( ) ) ) ; object.getDestinationStorage ( ) . setIsChangable ( isSingleDestStorage ) ; diskTable.edit ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmImportDiskListModel ) ( object.getDetailModels ( ) . get ( 2 ) ) ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { destClusterEditor.setLabel ( constants.importVm_destCluster ( ) ) ; destClusterQuotaEditor.setLabel ( constants.importVm_destClusterQuota ( ) ) ; destStorageEditor.setLabel ( constants.defaultStorage ( ) ) ; collapseSnapshotEditor.setLabel ( constants.importVm_collapseSnapshots ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskImagesToValidate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getDiskDao ( ) . getAllForVm ( getSourceVmFromDb ( ) . getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > allDisks = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( disks , true , false , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks = org.ovirt.engine.core.bll.ImagesHandler.filterDisksBasedOnCinder ( disks , true ) ; allDisks.addAll ( cinderDisks ) ; return allDisks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskImagesToValidate ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getDiskDao ( ) . getAllForVm ( getSourceVmFromDb ( ) . getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > allDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( disks , true , false , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterDisksBasedOnCinder ( disks , true ) ; allDisks.addAll ( cinderDisks ) ; return allDisks ; }
Source:
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.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setEnumTitle ( object.getVmEntityType ( ) ) ; return ( object.getVmEntityType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.VM ) ? resources.vmsImage ( ) : ( object.getVmEntityType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.TEMPLATE ) ? resources.templatesImage ( ) : null ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getMainModel ( ) . getCopyCommand ( ) ; }
Source:
public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { final org.ovirt.engine.core.dao.VdsGroupDAO v = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsGroupDAO.class ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; g.setvds_group_id ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( g ) ; return v ; }

Target:
public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { final org.ovirt.engine.core.dao.VdsGroupDAO v = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsGroupDAO.class ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; g.setvds_group_id ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( g ) ; org.mockito.Mockito.when ( v.getFromCache ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( g ) ; return v ; }
Source:
public void testFilterNicsWithUnmanagedNetworksNetworkImplementationDetailsIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithNetworkImplementationsDetailsNull = createNic ( "eth1" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces = java.util.Collections.singletonList ( nicWithNetworkImplementationsDetailsNull ) ; java.util.Set < java.lang.String > unmanagedNicsSet = validator.filterNicsWithUnmanagedNetworks ( existingInterfaces , java.util.Collections.emptySet ( ) ) ; org.junit.Assert.assertTrue ( unmanagedNicsSet.isEmpty ( ) ) ; }

Target:
public void testFilterNicsWithUnmanagedNetworksNetworkImplementationDetailsIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithNetworkImplementationsDetailsNull = createNic ( "eth1" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces = java.util.Collections.singletonList ( nicWithNetworkImplementationsDetailsNull ) ; java.util.Set < java.lang.String > unmanagedNicsSet = validator.filterNicsWithUnmanagedNetworks ( existingInterfaces , java.util.Collections.emptySet ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( unmanagedNicsSet.isEmpty ( ) ) ; }
Source:
public void testAttachPosixCompatibilityOnLowVersion ( ) { storagePool.setCompatibilityVersion ( Version.v3_0 ) ; storageDomain.setStorageType ( StorageType.POSIXFS ) ; storageDomain.setStorageFormat ( StorageFormatType.V1 ) ; org.ovirt.engine.core.bll.ValidationResult attachPosixToLowVersionResult = validator.validateDomainCanBeAttachedToPool ( ) ; org.junit.Assert.assertFalse ( "Attaching a POSIX domain succeeded while it should have failed" , attachPosixToLowVersionResult.isValid ( ) ) ; assertFailingMessage ( "Attaching a POSIX domain failed with the wrong message" , attachPosixToLowVersionResult , EngineMessage.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }

Target:
public void testAttachPosixCompatibilityOnLowVersion ( ) { storagePool.setCompatibilityVersion ( Version.v3_0 ) ; storageDomain.setStorageType ( StorageType.POSIXFS ) ; storageDomain.setStorageFormat ( StorageFormatType.V1 ) ; org.ovirt.engine.core.bll.ValidationResult attachPosixToLowVersionResult = validator.validateDomainCanBeAttachedToPool ( ) ; org.junit.Assert.assertThat ( attachPosixToLowVersionResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.roles role ) { switch ( role.getType ( ) ) { case ADMIN : return getApplicationResources ( ) . adminImage ( ) ; case USER : return getApplicationResources ( ) . userImage ( ) ; } return getApplicationResources ( ) . adminImage ( ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Role role ) { switch ( role.getType ( ) ) { case ADMIN : return getApplicationResources ( ) . adminImage ( ) ; case USER : return getApplicationResources ( ) . userImage ( ) ; } return getApplicationResources ( ) . adminImage ( ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , 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:
public static void GetDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void GetHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }
Source:
public void testUnknownTypeLunCantBeAdded ( ) { org.ovirt.engine.core.common.businessentities.LunDisk disk = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createISCSILunDisk ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; initializeCommand ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , parameters ) ; disk.getLun ( ) . setLunType ( StorageType.UNKNOWN ) ; org.junit.Assert.assertFalse ( "checkIfLunDiskCanBeAdded() succeded for LUN with UNKNOWN type" , command.checkIfLunDiskCanBeAdded ( ) ) ; org.junit.Assert.assertTrue ( "checkIfLunDiskCanBeAdded() failed but correct can do action hasn't been added to the return response" , verifyCanDoActionMessagesContainMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE ) ) ; }

Target:
public void testUnknownTypeLunCantBeAdded ( ) { org.ovirt.engine.core.common.businessentities.LunDisk disk = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createISCSILunDisk ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; initializeCommand ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , parameters ) ; disk.getLun ( ) . setLunType ( StorageType.UNKNOWN ) ; org.junit.Assert.assertFalse ( "checkIfLunDiskCanBeAdded() succeded for LUN with UNKNOWN type" , command.checkIfLunDiskCanBeAdded ( spyDiskValidator ( disk ) ) ) ; org.junit.Assert.assertTrue ( "checkIfLunDiskCanBeAdded() failed but correct can do action hasn't been added to the return response" , verifyCanDoActionMessagesContainMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_HAS_NO_VALID_TYPE ) ) ; }
Source:
private void verifyModel ( org.ovirt.engine.api.model.Cdrom model ) { org.junit.Assert.assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSetTemplate ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.TEMPLATE_ID.toString ( ) , model.getTemplate ( ) . getId ( ) ) ; org.junit.Assert.assertTrue ( model.isSetFile ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.ISO_PATH , model.getFile ( ) . getId ( ) ) ; }

Target:
private void verifyModel ( org.ovirt.engine.api.model.Cdrom model ) { org.junit.jupiter.api.Assertions.assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSetTemplate ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.TEMPLATE_ID.toString ( ) , model.getTemplate ( ) . getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isSetFile ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendTemplateCdromResourceTest.ISO_PATH , model.getFile ( ) . getId ( ) ) ; }
Source:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; updateActionAvailability ( ) ; getBrickListModel ( ) . setVolumeEntity ( ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( provideDetailModelEntity ( getSelectedItem ( ) ) ) ) ) ; getSnapshotListModel ( ) . setEntity ( ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( provideDetailModelEntity ( getSelectedItem ( ) ) ) ) ) ; }

Target:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; updateActionAvailability ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity selectedVolume = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( provideDetailModelEntity ( getSelectedItem ( ) ) ) ) ; getBrickListModel ( ) . setVolumeEntity ( selectedVolume ) ; getGeoRepListModel ( ) . setEntity ( selectedVolume ) ; getSnapshotListModel ( ) . setEntity ( selectedVolume ) ; }
Source:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , true ) , executionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }

Target:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , true ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return command ; }

Target:
public void addSubTabActionButton ( org.ovirt.engine.ui.webadmin.plugin.entity.EntityType mainTabEntityType , org.ovirt.engine.ui.webadmin.plugin.entity.EntityType subTabEntityType , java.lang.String label , org.ovirt.engine.ui.webadmin.plugin.api.ActionButtonInterface actionButtonInterface ) { java.lang.String historyToken = mainTabEntityType.getSubTabHistoryToken ( subTabEntityType ) ; if ( historyToken != null ) { org.ovirt.engine.ui.common.presenter.AddTabActionButtonEvent.fire ( this , historyToken , createButtonDefinition ( label , actionButtonInterface ) ) ; } }
Source:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }

Target:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.StorageDevice > > aQuery , org.ovirt.engine.core.compat.Guid hostId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }
Source:
public void validateFailsWithDuplicateVolumeName ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getVolume ( 2 , false ) ) . when ( volumeDao ) . getByName ( clusterId , "vol1" ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NAME_ALREADY_EXISTS ) ; }

Target:
public void validateFailsWithDuplicateVolumeName ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( getVolume ( 2 , false ) ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( getVolume ( 2 , false ) ) . when ( volumeDao ) . getByName ( org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommandTest.clusterId , "vol1" ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NAME_ALREADY_EXISTS ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( map , map.getstatus ( ) ) ; map.setstatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDAO ( ) . updateStatus ( map.getId ( ) , map.getstatus ( ) ) ; if ( ( getStorageDomain ( ) . getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) { CalcStoragePoolStatusByDomainsStatus ( ) ; } getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( map , map.getstatus ( ) ) ; map.setstatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDAO ( ) . updateStatus ( map.getId ( ) , map.getstatus ( ) ) ; if ( ( getStorageDomain ( ) . getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) { calcStoragePoolStatusByDomainsStatus ( ) ; } getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE , result.getId ( ) ) ; org.junit.Assert.assertFalse ( result.isPortMirroring ( ) ) ; org.junit.Assert.assertFalse ( result.isPassthrough ( ) ) ; }

Target:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE , result.getId ( ) ) ; org.junit.Assert.assertFalse ( result.isPortMirroring ( ) ) ; org.junit.Assert.assertFalse ( result.isPassthrough ( ) ) ; org.junit.Assert.assertTrue ( result.isMigratable ( ) ) ; }
Source:
private void setNetworkToDcValues ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.DcNetworkParams dcNetParams = getSetupModel ( ) . getNetDcParams ( getName ( ) ) ; if ( dcNetParams != null ) { getEntity ( ) . setvlan_id ( dcNetParams.getVlanId ( ) ) ; getEntity ( ) . setMtu ( dcNetParams.getMtu ( ) ) ; getEntity ( ) . setVmNetwork ( dcNetParams.isVmNetwork ( ) ) ; } }

Target:
private void syncNetworkValues ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.DcNetworkParams dcNetParams = getSetupModel ( ) . getNetDcParams ( getName ( ) ) ; if ( dcNetParams != null ) { getEntity ( ) . setvlan_id ( dcNetParams.getVlanId ( ) ) ; getEntity ( ) . setMtu ( dcNetParams.getMtu ( ) ) ; getEntity ( ) . setVmNetwork ( dcNetParams.isVmNetwork ( ) ) ; } }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.PoolModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.PoolModelBehaviorBase ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; model.SetClusters ( model , clusters , null ) ; behavior.InitTemplate ( ) ; behavior.InitCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initTemplate ( ) ; initCdImage ( ) ; getPoolModelBehaviorInitializedEvent ( ) . raise ( this , EventArgs.Empty ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmId ( ) ) != null ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmId ( ) ) != null ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return null ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepStart ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.Boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepStart ( volumeName , remoteHost , remoteVolumeName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionPause ( masterVolumeName , slaveHost , slaveVolumeName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public org.ovirt.engine.api.model.Permissions list ( ) { return mapCollection ( getBackendCollection ( queryType , queryParams ) ) ; }

Target:
public org.ovirt.engine.api.model.Permissions list ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.permissions > permissions = new java.util.TreeSet < org.ovirt.engine.core.common.businessentities.permissions > ( new org.ovirt.engine.api.restapi.resource.BackendAssignedPermissionsResource.PermissionsComparator ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.permissions > directPermissions = getBackendCollection ( queryType , queryParams ) ; permissions.addAll ( directPermissions ) ; if ( queryType.equals ( VdcQueryType.GetPermissionsForObject ) ) { permissions.addAll ( getInheritedPermissions ( ) ) ; } return mapCollection ( permissions ) ; }
Source:
public void diskImagesHasDerivedDisksNoStorageDomainSpecifiedFailure ( ) { disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Arrays.asList ( disk2 ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DETECTED_DERIVED_DISKS ) ) ; }

Target:
public void diskImagesHasDerivedDisksNoStorageDomainSpecifiedFailure ( ) { disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( disk2 ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DETECTED_DERIVED_DISKS ) ) ; }
Source:
public void subscribe ( org.ovirt.engine.core.common.businessentities.event_subscriber subscriber ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "event_up_name" , subscriber.getevent_up_name ( ) ) . addValue ( "method_id" , subscriber.getmethod_id ( ) ) . addValue ( "method_address" , subscriber.getmethod_address ( ) ) . addValue ( "subscriber_id" , subscriber.getsubscriber_id ( ) ) . addValue ( "tag_name" , subscriber.gettag_name ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertevent_subscriber" , parameterSource ) ; }

Target:
public void subscribe ( org.ovirt.engine.core.common.businessentities.event_subscriber subscriber ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "event_up_name" , subscriber.getevent_up_name ( ) ) . addValue ( "notification_method" , subscriber.getevent_notification_method ( ) . name ( ) ) . addValue ( "method_address" , subscriber.getmethod_address ( ) ) . addValue ( "subscriber_id" , subscriber.getsubscriber_id ( ) ) . addValue ( "tag_name" , subscriber.gettag_name ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertevent_subscriber" , parameterSource ) ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void testGetByIdReturnsItemOfThatId ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid itemId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , null ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Arrays.asList ( testItem ) ) ; org.junit.Assert.assertThat ( map.get ( itemId ) , org.hamcrest.CoreMatchers.is ( testItem ) ) ; }

Target:
public void testGetByIdReturnsItemOfThatId ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid itemId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , null ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.singletonList ( testItem ) ) ; org.junit.Assert.assertThat ( map.get ( itemId ) , org.hamcrest.CoreMatchers.is ( testItem ) ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getParametersForTask ( org.ovirt.engine.core.common.action.VdcActionType parentCommandType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = parameters.getParentParameters ( ) ; if ( ( parentCommandType == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) || ( parentParameters == null ) ) { return parameters ; } parentParameters.setExecutionReason ( parameters.getExecutionReason ( ) ) ; parentParameters.setCommandType ( parentCommandType ) ; return parentParameters ; }

Target:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getParametersForTask ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { org.ovirt.engine.core.common.action.VdcActionType parentCommandType = getParentCommandType ( actionType ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( ) ; if ( ( parentCommandType == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) || ( parentParameters == null ) ) { return parameters ; } parentParameters.setExecutionReason ( parameters.getExecutionReason ( ) ) ; parentParameters.setCommandType ( parentCommandType ) ; return parentParameters ; }
Source:
public void setUiMode ( org.ovirt.engine.core.common.mode.ApplicationMode applicationMode ) { switch ( applicationMode ) { case AllModes : getMenuLayout ( org.ovirt.engine.ui.webadmin.widget.tab.AllModesMenuLayout.values ( ) , org.ovirt.engine.ui.webadmin.widget.tab.AllModesSubMenu.values ( ) ) ; break ; case GlusterOnly : getMenuLayout ( org.ovirt.engine.ui.webadmin.widget.tab.GlusterModeMenuLayout.values ( ) , org.ovirt.engine.ui.webadmin.widget.tab.GlusterModeSubMenu.values ( ) ) ; break ; case VirtOnly : getMenuLayout ( org.ovirt.engine.ui.webadmin.widget.tab.AllModesMenuLayout.values ( ) , org.ovirt.engine.ui.webadmin.widget.tab.AllModesSubMenu.values ( ) ) ; break ; default : break ; } }

Target:
public void setUiMode ( org.ovirt.engine.core.common.mode.ApplicationMode applicationMode ) { switch ( applicationMode ) { case AllModes : initLayoutMap ( org.ovirt.engine.ui.webadmin.widget.tab.AllModesMenuLayout.values ( ) , org.ovirt.engine.ui.webadmin.widget.tab.AllModesSubMenu.values ( ) ) ; break ; case GlusterOnly : initLayoutMap ( org.ovirt.engine.ui.webadmin.widget.tab.GlusterModeMenuLayout.values ( ) , org.ovirt.engine.ui.webadmin.widget.tab.GlusterModeSubMenu.values ( ) ) ; break ; case VirtOnly : initLayoutMap ( org.ovirt.engine.ui.webadmin.widget.tab.AllModesMenuLayout.values ( ) , org.ovirt.engine.ui.webadmin.widget.tab.AllModesSubMenu.values ( ) ) ; break ; default : break ; } }
Source:
protected void executeCommand ( ) { getStorageDeviceSyncJobInstance ( ) . refreshStorageDevicesFromServers ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) ) ) ; org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.GetStorageDeviceList , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) . getId ( ) ) ) ; if ( returnValue.getSucceeded ( ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.StorageDevice > storageDevices = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.StorageDevice > ) ( returnValue.getReturnValue ( ) ) ) ; getStorageDeviceSyncJobInstance ( ) . updateStorageDevices ( org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.getVds ( ) , storageDevices ) ; org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.setSucceeded ( true ) ; } else { handleVdsError ( returnValue ) ; org.ovirt.engine.core.bll.gluster.SyncStorageDevicesCommand.setSucceeded ( false ) ; } }
Source:
private void dataCenter_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenter_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ; if ( dataCenter != null ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenter.getQuotaEnforcementType ( ) ) ; } }

Target:
private void vmTypeChanged ( ) { behavior.vmTypeChanged ( ( ( org.ovirt.engine.core.common.businessentities.VmType ) ( getVmType ( ) . getSelectedItem ( ) ) ) ) ; }
Source:
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 ; }

Target:
public void getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , final boolean supportsVirtService , final boolean supportsGlusterService ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetDataCentersWithPermittedActionOnClustersParameters getDataCentersWithPermittedActionOnClustersParameters = new org.ovirt.engine.core.common.queries.GetDataCentersWithPermittedActionOnClustersParameters ( ) ; getDataCentersWithPermittedActionOnClustersParameters.setActionGroup ( actionGroup ) ; getDataCentersWithPermittedActionOnClustersParameters.setSupportsVirtService ( supportsVirtService ) ; getDataCentersWithPermittedActionOnClustersParameters.setSupportsGlusterService ( supportsGlusterService ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getDataCentersWithPermittedActionOnClustersParameters , aQuery ) ; }
Source:
public void RequestSearch ( ) { searchRequested = true ; model.setItems ( new java.util.ArrayList ( ) ) ; model.getSelectedItemChangedEvent ( ) . raise ( this , new org.ovirt.engine.core.compat.EventArgs ( ) ) ; model.getSelectedItemsChangedEvent ( ) . raise ( this , new org.ovirt.engine.core.compat.EventArgs ( ) ) ; }

Target:
private void ApplySearchPageSize ( int value ) { model.setSearchPageSize ( value ) ; if ( ( searchRequested ) && ( model.getIsTimerDisabled ( ) ) ) { model.getSearchCommand ( ) . Execute ( ) ; } model.UpdatePagingAvailability ( ) ; }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }

Target:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( disks ) ; getAttachableDisksMap ( ) . get ( DiskStorageType.IMAGE ) . setItems ( org.ovirt.engine.ui.uicommonweb.Linq.toEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByType ( diskModels , Disk.DiskStorageType.IMAGE ) ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Disk > adjustReturnValue ( java.lang.Object returnValue ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; }