auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void setUpEntityQueryExpectations ( int times , org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.ISCSI_BOND_ID } , iscsiBond ) ; } }

Target:
public void testGetNetworkNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.ISCSI_BOND_ID } , getIscsiBondContainingNetwork ( ) ) ; 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.BackendIscsiBondNetworkResourceTest.NETWORK_ID } , null , null ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { getView ( ) . spiceSelected ( event.getValue ( ) ) ; getView ( ) . setWanOptionsVisible ( ( ( wanOptionsAvailable ) && ( event.getValue ( ) ) ) ) ; getView ( ) . rdpSelected ( ( ! ( event.getValue ( ) ) ) ) ; }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { getView ( ) . selectRdpImplementation ( RdpConsoleModel.ClientConsoleMode.Native ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > storagePools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool storagePool = ( ( storagePools.size ( ) ) > 0 ) ? storagePools.get ( 0 ) : null ; vmListModel.PostGetTemplatesNotPresentOnExportDomain ( storagePool ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > storagePools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool storagePool = ( ( storagePools.size ( ) ) > 0 ) ? storagePools.get ( 0 ) : null ; vmListModel.postGetTemplatesNotPresentOnExportDomain ( storagePool ) ; }
Source:
public void testStoragePoolIsNotUp ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND ) ) . when ( storagePoolValidator ) . isUp ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND.name ( ) ) ) ; }

Target:
public void testStoragePoolIsNotUp ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND ) ) . when ( storagePoolValidator ) . isUp ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_IMAGE_REPOSITORY_NOT_FOUND.name ( ) ) ) ; }
Source:
public void dataCenterDoesNotExist ( ) { org.mockito.Mockito.when ( cluster.getStoragePoolId ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( dataCenterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.dataCenterExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ) ; }

Target:
public void dataCenterDoesNotExist ( ) { org.mockito.Mockito.when ( cluster.getStoragePoolId ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( dataCenterDao ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.dataCenterExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel vmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; vmModel.set_MaxMemSize64 ( ( ( java.lang.Integer ) ( returnValue ) ) ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validate ( java.lang.Object value ) { org.ovirt.engine.ui.uicommonweb.validation.ValidationResult res = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( ) ; res.setSuccess ( ( ! ( ( ( rngBytes.getEntity ( ) ) == null ) && ( ( rngPeriod.getEntity ( ) ) != null ) ) ) ) ; res.setReasons ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . rngRateInvalid ( ) ) ) ; return res ; }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Tag > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( ( ( NAMES.length ) + 1 ) , collection.size ( ) ) ; verifyRoot ( collection.get ( NAMES.length ) ) ; collection.remove ( NAMES.length ) ; super . verifyCollection ( collection ) ; }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Tag > collection ) throws java.lang.Exception { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( ( ( NAMES.length ) + 1 ) , collection.size ( ) ) ; verifyRoot ( collection.get ( NAMES.length ) ) ; collection.remove ( NAMES.length ) ; super . verifyCollection ( collection ) ; }
Source:
public void validateIsoPrefixInTheMiddleOfTheInitrdAndKerenelName ( ) throws java.lang.Exception { java.lang.String initrd = "initrd " + ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) ; java.lang.String kernelUrl = "kernelUrl " + ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( initrd , kernelUrl ) ; org.junit.Assert.assertEquals ( vm.getinitrd_url ( ) , initrd ) ; org.junit.Assert.assertEquals ( vm.getkernel_url ( ) , kernelUrl ) ; }

Target:
public void validateIsoPrefixInTheMiddleOfTheInitrdAndKerenelName ( ) throws java.lang.Exception { java.lang.String initrd = "initrd " + ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) ; java.lang.String kernelUrl = "kernelUrl " + ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( initrd , kernelUrl ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , initrd ) ; org.junit.Assert.assertEquals ( vm.getKernelUrl ( ) , kernelUrl ) ; }
Source:
public static void GetAllAttachableDisks ( 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) , aQuery ) ; }

Target:
public static void IsDirectLunDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { existingSnapshot = createSnapshot ( existingSnapshotId ) ; existingVm = createVm ( existingVmId ) ; existingSnapshot.setVmConfiguration ( org.ovirt.engine.core.bll.snapshots.SnapshotVmConfigurationHelperTest.EXISTING_VM_NAME ) ; existingDiskImage = createDiskImage ( existingImageId , existingImageGroupId ) ; snapshotVmConfigurationHelper = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.snapshots.SnapshotVmConfigurationHelper ( ) ) ; snapshotsManager = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.snapshots.SnapshotsManager.class ) ; org.mockito.Mockito.when ( snapshotVmConfigurationHelper.getSnapshotManager ( ) ) . thenReturn ( snapshotsManager ) ; setUpDaoMocks ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { injectorRule.bind ( org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDc.class , org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDc.class ) ) ; existingSnapshot = createSnapshot ( existingSnapshotId ) ; existingVm = createVm ( existingVmId ) ; existingSnapshot.setVmConfiguration ( org.ovirt.engine.core.bll.snapshots.SnapshotVmConfigurationHelperTest.EXISTING_VM_NAME ) ; existingDiskImage = createDiskImage ( existingImageId , existingImageGroupId ) ; snapshotVmConfigurationHelper = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.snapshots.SnapshotVmConfigurationHelper ( ) ) ; snapshotsManager = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.snapshots.SnapshotsManager.class ) ; org.mockito.Mockito.when ( snapshotVmConfigurationHelper.getSnapshotManager ( ) ) . thenReturn ( snapshotsManager ) ; setUpDaoMocks ( ) ; }
Source:
private void initIpConfigurationBootProtocol ( boolean sameBootProtocol ) { initIpConfiguration ( ) ; org.mockito.Mockito.when ( mockedIPv4Address.getBootProtocol ( ) ) . thenReturn ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL ) ; org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol ifaceBootProtocol = ( sameBootProtocol ) ? org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL : org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) . length ) ) ) ; iface.setIpv4BootProtocol ( ifaceBootProtocol ) ; }

Target:
private void initIpConfigurationBootProtocol ( boolean sameBootProtocol ) { initIpConfiguration ( ) ; org.mockito.Mockito.when ( mockedIPv4Address.getBootProtocol ( ) ) . thenReturn ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL ) ; org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol ifaceBootProtocol = ( sameBootProtocol ) ? org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL : org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ; iface.setIpv4BootProtocol ( ifaceBootProtocol ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Template incoming , org.ovirt.engine.core.common.businessentities.VmTemplate entity ) { org.ovirt.engine.core.common.businessentities.VmTemplate updated = getMapper ( modelType , org.ovirt.engine.core.common.businessentities.VmTemplate.class ) . map ( incoming , entity ) ; org.ovirt.engine.core.common.businessentities.UsbPolicy usbPolicy = org.ovirt.engine.api.restapi.resource.utils.UsbResourceUtils.getUsbPolicy ( incoming.getUsb ( ) , lookupCluster ( updated.getvds_group_id ( ) ) ) ; if ( usbPolicy != null ) { updated.setusb_policy ( usbPolicy ) ; } return new org.ovirt.engine.core.common.action.UpdateVmTemplateParameters ( updated ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Template incoming , org.ovirt.engine.core.common.businessentities.VmTemplate entity ) { org.ovirt.engine.core.common.businessentities.VmTemplate updated = getMapper ( modelType , org.ovirt.engine.core.common.businessentities.VmTemplate.class ) . map ( incoming , entity ) ; updated.setusb_policy ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( incoming.getUsb ( ) , entity.getusb_policy ( ) , lookupCluster ( updated.getvds_group_id ( ) ) ) ) ; return new org.ovirt.engine.core.common.action.UpdateVmTemplateParameters ( updated ) ; }
Source:
private void updateReportsAvailability ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { if ( org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . isReportsEnabled ( ) ) { java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < org.ovirt.engine.core.common.businessentities.StorageDomain > > resourceSubActions = org.ovirt.engine.ui.webadmin.uicommon.ReportActionsHelper.getInstance ( ) . getResourceSubActions ( "Storage" , getModelProvider ( ) ) ; if ( ( resourceSubActions != null ) && ( ( resourceSubActions.size ( ) ) > 0 ) ) { getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition < org.ovirt.engine.core.common.businessentities.StorageDomain > ( constants.showReportStorage ( ) , resourceSubActions ) ) ; } } }

Target:
private void updateReportsAvailability ( ) { if ( org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . isReportsEnabled ( ) ) { java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < org.ovirt.engine.core.common.businessentities.StorageDomain > > resourceSubActions = org.ovirt.engine.ui.webadmin.uicommon.ReportActionsHelper.getInstance ( ) . getResourceSubActions ( "Storage" , getModelProvider ( ) ) ; if ( ( resourceSubActions != null ) && ( ( resourceSubActions.size ( ) ) > 0 ) ) { getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminMenuBarButtonDefinition < org.ovirt.engine.core.common.businessentities.StorageDomain > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.MainTabStorageView.constants.showReportStorage ( ) , resourceSubActions ) ) ; } } }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.vms.ISpice extractSpice ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel consoleModel = model.getModel ( ) . getDefaultConsoleModel ( ) ; if ( ! ( consoleModel instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ) { return null ; } org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( consoleModel ) ) . getspice ( ) ; return spice ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.vms.ISpice extractSpice ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceModel = extractSpiceModel ( model ) ; if ( spiceModel != null ) { return spiceModel.getspice ( ) ; } return null ; }
Source:
public void getDataCenterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getLabelList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Label > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllLabels , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public 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 ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void testGetDefaultQuotaForDCWithDefaultQuotaWithNoReuse ( ) throws java.lang.Exception { org.mockito.Mockito.when ( quotaDAO.getDefaultQuotaByStoragePoolId ( storagePoolUUID ) ) . thenReturn ( mockGeneralStorageQuota ( ) ) ; org.ovirt.engine.core.common.businessentities.Quota quotaUnlimited = quotaHelper.getUnlimitedQuota ( mockStoragePool ( ) , true , false ) . getFirst ( ) ; assertQuotaUnlimited ( quotaUnlimited ) ; assertQuotaUnlimitedName ( quotaUnlimited ) ; }

Target:
public void testGetDefaultQuotaForDCWithDefaultQuotaWithNoReuse ( ) throws java.lang.Exception { java.lang.String defaultQuotaName = quotaHelper.getDefaultQuotaName ( storagePool.getname ( ) ) ; org.mockito.Mockito.when ( quotaHelper.generateDefaultQuotaName ( storagePool ) ) . thenReturn ( defaultQuotaName ) ; org.mockito.Mockito.when ( quotaDAO.getDefaultQuotaByStoragePoolId ( storagePoolUUID ) ) . thenReturn ( mockGeneralStorageQuota ( ) ) ; org.ovirt.engine.core.common.businessentities.Quota quotaUnlimited = quotaHelper.getUnlimitedQuota ( mockStoragePool ( ) , true , false ) . getFirst ( ) ; assertQuotaUnlimited ( quotaUnlimited ) ; assertQuotaUnlimitedName ( quotaUnlimited ) ; }
Source:
public java.lang.Object runInTransaction ( ) { getStorageHelper ( dom ) . StorageDomainRemoved ( dom.getStorageStaticData ( ) ) ; getDbFacade ( ) . getStorageDomainDynamicDAO ( ) . remove ( dom.getId ( ) ) ; getDbFacade ( ) . getStorageDomainStaticDAO ( ) . remove ( dom.getId ( ) ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { getStorageHelper ( dom ) . StorageDomainRemoved ( dom.getStorageStaticData ( ) ) ; getDbFacade ( ) . getStorageDomainDynamicDao ( ) . remove ( dom.getId ( ) ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . remove ( dom.getId ( ) ) ; return null ; }
Source:
public java.net.URI constructURI ( java.lang.String protocol , java.lang.String address ) throws java.net.URISyntaxException { java.lang.String [ ] parts = address.split ( "\\.:" ) ; if ( ( parts.length ) != 2 ) { throw new java.lang.IllegalArgumentException ( "the address in SRV record should contain host and port" ) ; } java.lang.StringBuilder uriSB = new java.lang.StringBuilder ( protocol ) ; uriSB.append ( "://" ) . append ( parts [ 0 ] ) . append ( ":" ) . append ( parts [ 1 ] ) ; return new java.net.URI ( uriSB.toString ( ) ) ; }

Target:
public java.net.URI constructURI ( java.lang.String protocol , java.lang.String address , java.lang.String defaultLdapSeverPort ) throws java.net.URISyntaxException { java.lang.String [ ] parts = address.split ( "\\:" ) ; java.lang.String hostname = address ; java.lang.String port = defaultLdapSeverPort ; if ( ( parts.length ) == 2 ) { hostname = parts [ 0 ] ; port = parts [ 1 ] ; } else { if ( port == null ) { throw new java.lang.IllegalArgumentException ( "the address in SRV record should contain host and port" ) ; } } java.lang.StringBuilder uriSB = new java.lang.StringBuilder ( protocol ) ; uriSB.append ( "://" ) . append ( hostname ) . append ( ":" ) . append ( port ) ; return new java.net.URI ( uriSB.toString ( ) ) ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; if ( ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateCpuPinningVisibility ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; if ( ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateCpuPinningVisibility ( ) ; initNetworkInterfaces ( networkBehavior , null ) ; }
Source:
public void checkDifferentSubnetStringAndIntegerRepresentation ( ) { 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.DIFFERENT_PREFIX ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockIpAddressConverter.convertPrefixToNetmask ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.DIFFERENT_PREFIX ) ) . thenReturn ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.INVALID_NETMASK_FORMAT ) ; org.junit.Assert.assertFalse ( underTest.equalSubnet ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT , org.ovirt.engine.core.common.utils.SubnetUtilsTest.DIFFERENT_PREFIX ) ) ; }

Target:
public void checkDifferentSubnetStringAndIntegerRepresentation ( ) { 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.DIFFERENT_PREFIX ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mockIpAddressConverter.convertPrefixToNetmask ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.DIFFERENT_PREFIX ) ) . thenReturn ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.INVALID_NETMASK_FORMAT ) ; org.junit.jupiter.api.Assertions.assertFalse ( underTest.equalSubnet ( org.ovirt.engine.core.common.utils.SubnetUtilsTest.VALID_NETMASK_FORMAT , org.ovirt.engine.core.common.utils.SubnetUtilsTest.DIFFERENT_PREFIX ) ) ; }
Source:
public void testListCrash ( ) throws java.lang.Exception { java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }

Target:
public void testListCrash ( ) throws java.lang.Exception { java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.GetHostArchitectureQuery.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetHostArchitectureQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.common.businessentities.ServerCpu sc = cpuFlagsManagerHandler.findMaxServerCpuByFlags ( host.getCpuFlags ( ) , host.getVdsGroupCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.GetHostArchitectureQuery.getQueryReturnValue ( ) . setReturnValue ( ( sc == null ? org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined : sc.getArchitecture ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.GetHostArchitectureQuery.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetHostArchitectureQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.common.businessentities.ServerCpu sc = cpuFlagsManagerHandler.findMaxServerCpuByFlags ( host.getCpuFlags ( ) , host.getClusterCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.GetHostArchitectureQuery.getQueryReturnValue ( ) . setReturnValue ( ( sc == null ? org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined : sc.getArchitecture ( ) ) ) ; }
Source:
protected void executeCommand ( ) { java.lang.String connectionId = org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getConnection ( ) . getid ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( connectionId ) ) { org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getDbFacade ( ) . getStorageServerConnectionDao ( ) . remove ( connectionId ) ; } org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.disconnectStorage ( ) ; org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.setSucceeded ( true ) ; }

Target:
protected org.ovirt.engine.core.dao.StorageServerConnectionDAO getStorageServerConnectionDao ( ) { return org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getDbFacade ( ) . getStorageServerConnectionDao ( ) ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.getSoundDevice ( vmBase , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null ) ; }

Target:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = OsRepositoryImpl.INSTANCE.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null ) ; }
Source:
public static void addOrUpdateTaskInDB ( org.ovirt.engine.core.common.businessentities.AsyncTasks task , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { try { if ( task != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( task , entityType , entityIds ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.log.error ( java.lang.String.format ( "Adding/Updating task %1$s to DataBase threw an exception." , task.getTaskId ( ) ) , e ) ; } }

Target:
private static org.ovirt.engine.core.dao.AsyncTaskDAO getAsyncTaskDao ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) ; }
Source:
public void isTemplateNameUnique ( 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.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , 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.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
private void raiseQueryEvent ( final org.ovirt.engine.ui.uicompat.Event queryEvent , final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { if ( ( context != null ) && ( ( subscribedQueryTypes ) != null ) ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType : subscribedQueryTypes ) { if ( queryType.equals ( vdcQueryType ) ) { currentContext = context ; queryEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , EventArgs.Empty ) ; } } } }

Target:
private void raiseQueryEvent ( final org.ovirt.engine.ui.uicompat.Event queryEvent , final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { if ( ( context != null ) && ( ( subscribedQueryTypes ) != null ) ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType : subscribedQueryTypes ) { if ( queryType.equals ( vdcQueryType ) ) { currentContext = context ; queryEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , EventArgs.EMPTY ) ; } } } }
Source:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.StorageDomain selectedItem ) { org.ovirt.engine.ui.webadmin.section.main.view.tab.storage.SubTabStorageGeneralView.Driver.driver.edit ( getDetailModel ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain entity = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getDetailModel ( ) . getEntity ( ) ) ) ; if ( entity == null ) return ; totalSize.setValue ( entity.getTotalDiskSize ( ) ) ; availableSize.setValue ( entity.getavailable_disk_size ( ) ) ; usedSize.setValue ( entity.getused_disk_size ( ) ) ; overAllocationRatio.setValue ( entity.getstorage_domain_over_commit_percent ( ) ) ; formBuilder.showForm ( getDetailModel ( ) ) ; }

Target:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.StorageDomain selectedItem ) { org.ovirt.engine.ui.webadmin.section.main.view.tab.storage.SubTabStorageGeneralView.Driver.driver.edit ( getDetailModel ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain entity = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getDetailModel ( ) . getEntity ( ) ) ) ; if ( entity == null ) return ; totalSize.setValue ( entity.getTotalDiskSize ( ) ) ; availableSize.setValue ( entity.getAvailableDiskSize ( ) ) ; usedSize.setValue ( entity.getUsedDiskSize ( ) ) ; overAllocationRatio.setValue ( entity.getStorageDomainOverCommitPercent ( ) ) ; formBuilder.showForm ( getDetailModel ( ) ) ; }
Source:
private void initSorting ( ) { vmStatusColumn.makeSortable ( ) ; nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; ipColumn.makeSortable ( ) ; fqdnColumn.makeSortable ( ) ; vnicNameColumn.makeSortable ( ) ; descriptionColumn.makeSortable ( ) ; }

Target:
private void initSorting ( ) { vmStatusColumn.makeSortable ( ) ; nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; ipColumn.makeSortable ( ) ; fqdnColumn.makeSortable ( ) ; nicActivateStatusColumn.makeSortable ( ) ; vnicNameColumn.makeSortable ( ) ; descriptionColumn.makeSortable ( ) ; }
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:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetAllStorageDomains , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , getStorageDomains ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetCinderVolumeTypesByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getCinderVolumeTypes ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetAllStorageDomains , org.ovirt.engine.core.common.queries.QueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , getStorageDomains ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetCinderVolumeTypesByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getCinderVolumeTypes ( ) , failure ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getDateCreatedColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractFullDateTimeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.util.Date getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getCreationDate ( ) : null ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Disk > getDateCreatedColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractFullDateTimeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.util.Date getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getCreationDate ( ) : null ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertFalse ( model.isSetVm ( ) ) ; assertTrue ( model.isSparse ( ) ) ; assertTrue ( model.isPropagateErrors ( ) ) ; }

Target:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Disk model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertFalse ( model.isSetVm ( ) ) ; org.junit.Assert.assertTrue ( model.isSparse ( ) ) ; org.junit.Assert.assertTrue ( model.isPropagateErrors ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage getDiskImageByImageId ( org.ovirt.engine.core.compat.Guid imageId ) { if ( diskImagesMap.containsKey ( imageId ) ) { return diskImagesMap.get ( imageId ) ; } org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageDao ( ) . get ( imageId ) ; diskImagesMap.put ( imageId , diskImage ) ; return diskImage ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskImageByImageId ( org.ovirt.engine.core.compat.Guid imageId ) { if ( diskImagesMap.containsKey ( imageId ) ) { return diskImagesMap.get ( imageId ) ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageDao ( ) . get ( imageId ) ; diskImagesMap.put ( imageId , diskImage ) ; return diskImage ; }
Source:
public void getAncestorImagesByImagesIds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.util.List < org.ovirt.engine.core.compat.Guid > imagesIds ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) { @ java.lang.Override public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.IdsQueryParameters params = new org.ovirt.engine.core.common.queries.IdsQueryParameters ( imagesIds ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAncestorImagesByImagesIds , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { org.ovirt.engine.api.model.Disk populatedDisk = super . doPopulate ( model , entity ) ; populatedDisk.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; populatedDisk.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return model ; }

Target:
public org.ovirt.engine.api.model.Disk update ( org.ovirt.engine.api.model.Disk disk ) { return getDelegate ( ) . update ( disk ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4StaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { model.getApplyCommand ( ) . Execute ( ) ; }

Target:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkModel model ) { super . init ( model ) ; model.getApplyCommand ( ) . getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsExecutionAllowed" . equals ( propertyName ) ) { getView ( ) . setApplyEnabled ( model.getApplyCommand ( ) . getIsExecutionAllowed ( ) ) ; } } } ) ; }
Source:
public void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getRpmVersion ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }