auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean validateVM ( org.ovirt.engine.core.bll.validator.VmValidator vmValidator ) { return ( canDoSnapshot ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) ) ) && ( validate ( vmValidator.vmNotSavingRestoring ( ) ) ) ; }

Target:
protected boolean validateVM ( org.ovirt.engine.core.bll.validator.VmValidator vmValidator ) { org.ovirt.engine.core.bll.validator.LiveSnapshotValidator validator = new org.ovirt.engine.core.bll.validator.LiveSnapshotValidator ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getStoragePool ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVds ( ) ) ; return ( ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . isDown ( ) ) || ( validate ( validator.canDoSnapshot ( ) ) ) ) && ( validate ( vmValidator.vmNotSavingRestoring ( ) ) ) ) && ( validate ( vmValidator.validateVmStatusUsingMatrix ( VdcActionType.CreateAllSnapshotsFromVm ) ) ) ; }
Source:
private void useBytesIO ( ) throws java.io.IOException { for ( int i = 0 ; i < ( source.size ( ) ) ; i ++ ) { java.lang.String line = source.get ( i ) ; line = line.replace ( "from StringIO import StringIO" , "from io import BytesIO" ) ; line = line.replace ( "doc = parsexml_(StringIO(inString))" , "doc = parsexml_(BytesIO(inString))" ) ; source.set ( i , line ) ; } }

Target:
private void addBasestringHack ( ) throws java.io.IOException { java.lang.String text = new org.ovirt.engine.sdk.generator.python.templates.BasestringHackTemplate ( ) . evaluate ( ) ; java.lang.String [ ] lines = text.split ( "\n" ) ; addLines ( ( ( findLastImport ( ) ) + 1 ) , 0 , lines ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.imagesIntersection ( imagesForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }
Source:
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 ) ; }

Target:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
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.Arrays.asList ( 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.Assert.assertTrue ( unmanagedNicsSet.isEmpty ( ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase addVm ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.VmManagementParametersBase parameters = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( vmStatic ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getSessionId ( ) ) ; parameters.setDontCheckTemplateImages ( true ) ; parameters.setDontAttachToDefaultTag ( true ) ; parameters.setDiskInfoDestinationMap ( diskInfoDestinationMap ) ; return org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddVm , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getExecutionContext ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase addVm ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { org.ovirt.engine.core.common.action.VmManagementParametersBase parameters = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( vmStatic ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getSessionId ( ) ) ; parameters.setDontAttachToDefaultTag ( true ) ; parameters.setDiskInfoDestinationMap ( diskInfoDestinationMap ) ; parameters.setSoundDeviceEnabled ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . isSoundDeviceEnabled ( ) ) ; return org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddVm , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getExecutionContext ( ) ) ) ; }
Source:
private void pause ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VmOperationParameterBase ( a.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.HibernateVm , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void run ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.RunVmParams ( a.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RunVm , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
public void testGetEntityNameByIdAndTypeForHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vds = dbFacade.getVdsStaticDAO ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VDS_ID ) ; org.junit.Assert.assertNotNull ( vds ) ; java.lang.String name = vds.getvds_name ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VDS_ID , VdcObjectType.VDS ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vds = dbFacade.getVdsStaticDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VDS_ID ) ; org.junit.Assert.assertNotNull ( vds ) ; java.lang.String name = vds.getvds_name ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VDS_ID , VdcObjectType.VDS ) ) ) ; }
Source:
public void testGetDefaultQuotaToDCWithoutDefaultQuotaWithNoReuse ( ) throws java.lang.Exception { 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 void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public void testDedicatedHostNotExist ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }

Target:
public void testValidName ( ) { prepareVmToPassCanDoAction ( ) ; boolean c = command.canDoAction ( ) ; java.lang.System.out.println ( command.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; java.lang.System.out.println ( command.getParameters ( ) . getVm ( ) . getOs ( ) ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , c ) ; }
Source:
protected org.ovirt.engine.api.model.HostNIC postPopulate ( org.ovirt.engine.api.model.HostNIC model ) { org.ovirt.engine.api.model.HostNIC hostNIC = super . postPopulate ( model ) ; org.ovirt.engine.api.model.QoS qos = hostNIC.getQos ( ) ; qos.setType ( QosType.HOSTNETWORK.name ( ) ) ; qos.setName ( null ) ; qos.setDataCenter ( null ) ; return hostNIC ; }

Target:
protected org.ovirt.engine.api.model.HostNic postPopulate ( org.ovirt.engine.api.model.HostNic model ) { org.ovirt.engine.api.model.HostNic hostNIC = super . postPopulate ( model ) ; org.ovirt.engine.api.model.QoS qos = hostNIC.getQos ( ) ; qos.setType ( QosType.HOSTNETWORK.name ( ) ) ; qos.setName ( null ) ; qos.setDataCenter ( null ) ; return hostNIC ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.get_image_transfer_session_stats ( ticketId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void executeCommand ( ) { setStorageDomainId ( org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( isRemoveEntireDisk ( ) ) { removeEntireDisk ( ) ; } else { removeCinderVolume ( ) ; } org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.setSucceeded ( true ) ; }

Target:
private void removeCinderVolume ( ) { org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderSnapshotToRemove = ( ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk ) ( org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getDiskImageDao ( ) . getSnapshotById ( org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getParameters ( ) . getImageId ( ) ) ) ) ; cinderSnapshotToRemove.setActive ( false ) ; org.ovirt.engine.core.bll.storage.RestoreFromCinderSnapshotCommand.getImageDao ( ) . update ( cinderSnapshotToRemove.getImage ( ) ) ; removeDescendentSnapshots ( cinderSnapshotToRemove ) ; removeCinderVolume ( cinderSnapshotToRemove.getStorageIds ( ) . get ( 0 ) , 0 ) ; }
Source:
public static void getHostById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public void templateWithVersion_SelectedItemChanged ( ) { super . templateWithVersion_SelectedItemChanged ( ) ; getModel ( ) . setIsDisksAvailable ( true ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplateWithVersion ( ) . getSelectedItem ( ) . getTemplateVersion ( ) ; updateRngDevice ( template.getId ( ) ) ; getModel ( ) . getCustomPropertySheet ( ) . deserialize ( template.getCustomProperties ( ) ) ; }

Target:
public void activated ( ) { getInstanceTypeManager ( ) . updateAll ( ) ; }
Source:
public void testUpdateStatus ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic before = dao.get ( existingVm.getId ( ) ) ; before.setstatus ( VMStatus.Down ) ; dao.updateStatus ( before.getId ( ) , before.getstatus ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic after = dao.get ( existingVm.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testUpdateStatus ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic before = dao.get ( existingVm.getId ( ) ) ; before.setStatus ( VMStatus.Down ) ; dao.updateStatus ( before.getId ( ) , before.getStatus ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic after = dao.get ( existingVm.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
private boolean shouldWaitForEndMethodsCompletion ( org.ovirt.engine.core.bll.CommandBase < ? > childCommand , org.ovirt.engine.core.bll.CommandBase < ? > parentCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getCommandEntity ( childCommand.getCommandId ( ) ) ; boolean hasNotifiedCallback = ( cmdEntity.isCallbackEnabled ( ) ) && ( cmdEntity.isCallbackNotified ( ) ) ; if ( ( ! ( childCommand.getParameters ( ) . getShouldBeEndedByParent ( ) ) ) && ( ! hasNotifiedCallback ) ) { logWaitingForChildCommand ( childCommand , parentCommand ) ; return true ; } return false ; }

Target:
private boolean shouldWaitForEndMethodsCompletion ( org.ovirt.engine.core.bll.CommandBase < ? > childCommand , org.ovirt.engine.core.bll.CommandBase < ? > parentCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getCommandEntity ( childCommand.getCommandId ( ) ) ; boolean hasNotifiedCallback = ( cmdEntity.isCallbackEnabled ( ) ) && ( cmdEntity.isCallbackNotified ( ) ) ; if ( ( shouldCommandEndOnAsyncOpEnd ( childCommand ) ) && ( ! hasNotifiedCallback ) ) { logWaitingForChildCommand ( childCommand , parentCommand ) ; return true ; } return false ; }
Source:
public void testNetworkExistWhenOnlyNetworkIdIsSet ( ) { org.ovirt.engine.core.compat.Guid networkId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( networkId ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( networkAttachment ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_HAVING_ID_NOT_EXISTS ; org.junit.Assert.assertThat ( validator.networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , networkId.toString ( ) ) ) ) ; }

Target:
public void testNetworkExistWhenOnlyNetworkIdIsSet ( ) { org.ovirt.engine.core.compat.Guid networkId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( networkId ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( networkAttachment ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_HAVING_ID_NOT_EXISTS ; org.hamcrest.MatcherAssert.assertThat ( validator.networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , networkId.toString ( ) ) ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( org.ovirt.engine.core.compat.Guid storagePoolId , long sizeRequested ) { return org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( storagePoolId , sizeRequested , java.util.Collections.< org.ovirt.engine.core.common.businessentities.StorageDomain , java.lang.Integer > emptyMap ( ) ) ; }

Target:
private static void updateDisksStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disksList ) { disk.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( storageDomain.getId ( ) ) ) ) ; } org.ovirt.engine.core.bll.VmHandler.updateDiskVolumeType ( storageDomain.getStorageType ( ) , disksList.get ( 0 ) ) ; }
Source:
protected void build ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.common.businessentities.VDS defaultHost = model.getDefaultHost ( ) . getSelectedItem ( ) ; if ( model.getIsAutoAssign ( ) . getEntity ( ) ) { vm.setDedicatedVmForVdsList ( java.util.Collections.< org.ovirt.engine.core.compat.Guid > emptyList ( ) ) ; } else { vm.setDedicatedVmForVdsList ( defaultHost.getId ( ) ) ; } }

Target:
protected void build ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.businessentities.VmBase vm ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > defaultHosts = model.getDefaultHost ( ) . getSelectedItems ( ) ; if ( model.getIsAutoAssign ( ) . getEntity ( ) ) { vm.setDedicatedVmForVdsList ( java.util.Collections.< org.ovirt.engine.core.compat.Guid > emptyList ( ) ) ; } else { java.util.List < org.ovirt.engine.core.compat.Guid > defaultHostsGuids = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : defaultHosts ) { defaultHostsGuids.add ( host.getId ( ) ) ; } vm.setDedicatedVmForVdsList ( defaultHostsGuids ) ; } }
Source:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
private void UpdateActionAvailability ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getEntity ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > selectedItems = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.StorageDomainModel > ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( isRemoveCommandAvailable ( ) ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { onRemove ( ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage getSnapshotLeaf ( org.ovirt.engine.core.compat.Guid diskId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskSnapshots = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( diskId ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.sortImageList ( diskSnapshots ) ; return diskSnapshots.get ( ( ( diskSnapshots.size ( ) ) - 1 ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.DiskImage getSnapshotLeaf ( org.ovirt.engine.core.compat.Guid diskId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskSnapshots = diskImageDao.getAllSnapshotsForImageGroup ( diskId ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.sortImageList ( diskSnapshots ) ; return diskSnapshots.get ( ( ( diskSnapshots.size ( ) ) - 1 ) ) ; }
Source:
private org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( ) { if ( hasTaskHandlers ( ) ) { if ( ( getParameters ( ) . getExecutionReason ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; } return getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return getTaskType ( ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > getDiskInterfaceList ( ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO } ) ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > getDiskInterfaceList ( org.ovirt.engine.core.compat.Version clusterVersion ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > diskInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO } ) ) ; boolean isVirtIOScsiEnabled = ( clusterVersion != null ) ? ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.VirtIoScsiEnabled , clusterVersion.getValue ( ) ) ) ) : true ; if ( isVirtIOScsiEnabled ) { diskInterfaces.add ( DiskInterface.VirtIO_SCSI ) ; } return diskInterfaces ; }
Source:
public org.ovirt.engine.sdk.decorators.HostNIC update ( java.lang.Boolean async ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; if ( async != null ) { urlBuilder.add ( "async" , async , UrlParameterType.MATRIX ) ; } url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.HostNIC.class , org.ovirt.engine.sdk.decorators.HostNIC.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.HostHostNic update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.HostNic.class , org.ovirt.engine.sdk.decorators.HostHostNic.class , headers ) ; }
Source:
private static java.io.File createOutputDirectory ( java.lang.String outputDirectory ) { java.io.File outputDir = new java.io.File ( outputDirectory ) ; if ( ! ( outputDir.exists ( ) ) ) { outputDir.mkdirs ( ) ; } return outputDir ; }

Target:
private static java.io.File createOutputDirectory ( java.lang.String outputDirectory ) throws java.io.IOException { java.io.File outputDir = new java.io.File ( outputDirectory ) ; if ( ! ( outputDir.exists ( ) ) ) { boolean success = outputDir.mkdirs ( ) ; if ( ! success ) { throw new java.io.IOException ( ( ( "Falied to create directory: " + outputDirectory ) + ". rsdl.xml will not be copied there." ) ) ; } } return outputDir ; }
Source:
public void registerModel ( final org.ovirt.engine.ui.uicommonweb.models.userportal.IUserPortalListModel model ) { if ( ( alreadyOpened ) || ( ! ( connectAutomatically.readConnectAutomatically ( ) ) ) ) { return ; } org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.EventChangeListener listener = new org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.EventChangeListener ( model ) ; if ( ( listeners ) == null ) { listeners = new java.util.ArrayList < org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.EventChangeListener > ( ) ; } listeners.add ( listener ) ; listener.register ( ) ; }

Target:
public void registerModel ( final org.ovirt.engine.ui.uicommonweb.models.userportal.AbstractUserPortalListModel model ) { if ( ( alreadyOpened ) || ( ! ( connectAutomatically.readConnectAutomatically ( ) ) ) ) { return ; } org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.EventChangeListener listener = new org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.EventChangeListener ( model ) ; if ( ( listeners ) == null ) { listeners = new java.util.ArrayList < org.ovirt.engine.ui.userportal.utils.ConnectAutomaticallyManager.EventChangeListener > ( ) ; } listeners.add ( listener ) ; listener.register ( ) ; }
Source:
public void failGetSpiceOnVncVm ( ) { org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams params = new org.ovirt.engine.core.common.queries.ConfigureConsoleOptionsParams ( getValidOptions ( GraphicsType.SPICE ) , false ) ; org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery query = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery ( params ) ) ; org.ovirt.engine.core.common.businessentities.VM mockVm = mockVm ( GraphicsType.VNC ) ; org.mockito.Mockito.doReturn ( mockVm ) . when ( query ) . getCachedVm ( ) ; query.validateInputs ( ) ; org.junit.Assert.assertFalse ( query.getQueryReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void failGetSpiceOnVncVm ( ) { org.mockito.Mockito.when ( getQueryParameters ( ) . getOptions ( ) ) . thenReturn ( getValidOptions ( GraphicsType.SPICE ) ) ; org.ovirt.engine.core.common.businessentities.VM mockVm = mockVm ( GraphicsType.VNC ) ; org.mockito.Mockito.doReturn ( mockVm ) . when ( getQuery ( ) ) . getCachedVm ( ) ; getQuery ( ) . validateInputs ( ) ; org.junit.Assert.assertFalse ( getQuery ( ) . getQueryReturnValue ( ) . getSucceeded ( ) ) ; }
Source:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterList ( 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.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( 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.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public void unmanagedNetworkAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( "net" ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER , nic.getNetworkName ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public void setIsSelectedNullable ( java.lang.Boolean value ) { if ( ( ( isSelectedNullable ) == null ) && ( value == null ) ) { return ; } if ( ( ( isSelectedNullable ) == null ) || ( ! ( isSelectedNullable.equals ( value ) ) ) ) { isSelectedNullable = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "IsSelectedNullable" ) ) ; if ( ! ( getIsSelectedNotificationPrevent ( ) ) ) { IsSelectedChanged ( ) ; } } }

Target:
public void setIsSelectedNullable ( java.lang.Boolean value ) { if ( ( ( isSelectedNullable ) == null ) && ( value == null ) ) { return ; } if ( ( ( isSelectedNullable ) == null ) || ( ! ( isSelectedNullable.equals ( value ) ) ) ) { isSelectedNullable = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "IsSelectedNullable" ) ) ; if ( ! ( getIsSelectedNotificationPrevent ( ) ) ) { IsSelectedChanged ( ) ; } } }
Source:
public void addActionVersionMap ( org.ovirt.engine.core.common.businessentities.action_version_map action_version_map ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "action_type" , action_version_map.getaction_type ( ) ) . addValue ( "cluster_minimal_version" , action_version_map.getcluster_minimal_version ( ) ) . addValue ( "storage_pool_minimal_version" , action_version_map.getstorage_pool_minimal_version ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertaction_version_map" , parameterSource ) ; }

Target:
public void addActionVersionMap ( org.ovirt.engine.core.common.businessentities.ActionVersionMap actionVersionMap ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "action_type" , actionVersionMap.getaction_type ( ) ) . addValue ( "cluster_minimal_version" , actionVersionMap.getcluster_minimal_version ( ) ) . addValue ( "storage_pool_minimal_version" , actionVersionMap.getstorage_pool_minimal_version ( ) ) ; getCallsHandler ( ) . executeModification ( "Insertaction_version_map" , parameterSource ) ; }
Source:
protected void init ( ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Start initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; tagsMapByID.clear ( ) ; tagsMapByName.clear ( ) ; org.ovirt.engine.core.common.businessentities.Tags root = new org.ovirt.engine.core.common.businessentities.Tags ( "root" , null , true , org.ovirt.engine.core.bll.TagsDirector.ROOT_TAG_ID , "root" ) ; addTagToHash ( root ) ; addChildren ( root ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Finished initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; }

Target:
protected void init ( ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Start initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; tagsMapByID.clear ( ) ; tagsMapByName.clear ( ) ; org.ovirt.engine.core.common.businessentities.Tags root = new org.ovirt.engine.core.common.businessentities.Tags ( "root" , null , true , org.ovirt.engine.core.bll.TagsDirector.ROOT_TAG_ID , "root" ) ; addTagToHash ( root ) ; addChildren ( root ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( "Finished initializing {}" , getClass ( ) . getSimpleName ( ) ) ; }
Source:
protected void onBind ( ) { super . onBind ( ) ; org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel < ? > tableSelectionModel = ( ( getTable ( ) ) != null ) ? getTable ( ) . getSelectionModel ( ) : null ; if ( tableSelectionModel != null ) { registerHandler ( tableSelectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { updateDetailModelSelection ( ) ; } } ) ) ; } initializeHandlers ( ) ; }

Target:
protected void onBind ( ) { super . onBind ( ) ; org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel < ? > tableSelectionModel = ( ( getTable ( ) ) != null ) ? getTable ( ) . getSelectionModel ( ) : null ; if ( tableSelectionModel != null ) { registerHandler ( tableSelectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { updateDetailModelSelection ( ) ; } } ) ) ; } initializeHandlers ( ) ; getSelectedMainItems ( ) . registerListener ( this ) ; itemChanged ( getSelectedMainItems ( ) . getSelectedItem ( ) ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { disk.getDiskStorageType ( ) . setEntity ( DiskStorageType.IMAGE ) ; revealDiskPanel ( disk ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.String propName = args.propertyName ; if ( "Message" . equals ( propName ) ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( disk.getMessage ( ) ) ) ) { disableWidget ( getWidget ( ) ) ; disk.getDefaultCommand ( ) . setIsExecutionAllowed ( false ) ; } } }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmNetworkInterface entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NIC , org.ovirt.engine.core.common.businessentities.VmNetworkInterface > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NIC , org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ) ( ( ( org.ovirt.engine.api.resource.NicResource ) ( resource ) ) . getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NIC , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NIC , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( ( ( org.ovirt.engine.api.resource.NicResource ) ( resource ) ) . getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
protected org.ovirt.engine.ui.userportal.widget.action.UserPortalImageButtonDefinition < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > createButtonDefinition ( final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel data ) { return new org.ovirt.engine.ui.userportal.widget.action.UserPortalImageButtonDefinition < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > ( ( data.getIsPool ( ) ? constants.returnVmLabel ( ) : constants.shutdownVmLabel ( ) ) , applicationResources.stopIcon ( ) , applicationResources.stopDisabledIcon ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return data.getIsPool ( ) ? data.getReturnVmCommand ( ) : data.getShutdownCommand ( ) ; } } ; }

Target:
protected org.ovirt.engine.ui.userportal.widget.action.UserPortalImageButtonDefinition < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > createButtonDefinition ( final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel data ) { return new org.ovirt.engine.ui.userportal.widget.action.UserPortalImageButtonDefinition < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > ( ( data.getIsPool ( ) ? constants.returnVmLabel ( ) : constants.shutDownVm ( ) ) , applicationResources.stopIcon ( ) , applicationResources.stopDisabledIcon ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return data.getIsPool ( ) ? data.getReturnVmCommand ( ) : data.getShutdownCommand ( ) ; } } ; }