auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean canDoAction ( ) { java.util.List < java.lang.String > canDoActionMessages = getReturnValue ( ) . getCanDoActionMessages ( ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage_domains > domainsMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; if ( ! ( canDoActionBeforeCloneVm ( canDoActionMessages , domainsMap ) ) ) { return failCanDoActionWithType ( ) ; } if ( getParameters ( ) . isImportAsNewEntity ( ) ) { initImportClonedVm ( ) ; } if ( ! ( canDoActionAfterCloneVm ( canDoActionMessages , domainsMap ) ) ) { return failCanDoActionWithType ( ) ; } return true ; }

Target:
protected boolean validateNoDuplicateVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic duplicateVm = getVmStaticDAO ( ) . get ( getVm ( ) . getId ( ) ) ; if ( duplicateVm != null ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_EXISTS ) ; addCanDoActionMessage ( java.lang.String.format ( "$VmName %1$s" , duplicateVm.getvm_name ( ) ) ) ; return false ; } return true ; }
Source:
public void testVmOvfCreation ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.utils.ovf.OvfManagerTest.createVM ( ) ; java.lang.String xml = manager.ExportVm ( vm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) ; org.junit.Assert.assertNotNull ( xml ) ; final org.ovirt.engine.core.common.businessentities.VM newVm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; manager.ImportVm ( xml , newVm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; org.ovirt.engine.core.utils.ovf.OvfManagerTest.assertVm ( vm , newVm , vm.getDbGeneration ( ) ) ; }

Target:
public void testVmOvfCreation ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.utils.ovf.OvfManagerTest.createVM ( ) ; java.lang.String xml = manager.ExportVm ( vm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) , Version.v3_1 ) ; org.junit.Assert.assertNotNull ( xml ) ; final org.ovirt.engine.core.common.businessentities.VM newVm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; manager.ImportVm ( xml , newVm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; org.ovirt.engine.core.utils.ovf.OvfManagerTest.assertVm ( vm , newVm , vm.getDbGeneration ( ) ) ; }
Source:
public void testNonExistingSnapshotQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.GetVmConfigurationBySnapshotQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = setupQueryBySnapshotId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.mockito.Mockito.when ( snapshotDaoMock.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = query.getQueryReturnValue ( ) ; org.ovirt.engine.core.common.businessentities.VM returnedVm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( returnValue.getReturnValue ( ) ) ) ; org.junit.Assert.assertNull ( "Return value from non existent query should be null" , returnedVm ) ; }

Target:
public void testNonExistingSnapshotQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.GetVmConfigurationBySnapshotQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = setupQueryBySnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( snapshotDaoMock.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = query.getQueryReturnValue ( ) ; org.ovirt.engine.core.common.businessentities.VM returnedVm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( returnValue.getReturnValue ( ) ) ) ; org.junit.Assert.assertNull ( "Return value from non existent query should be null" , returnedVm ) ; }
Source:
public java.util.Set < java.lang.String > getPeers ( java.lang.String server , java.lang.String username , java.lang.String password ) throws javax.naming.AuthenticationException { org.ovirt.engine.core.utils.ssh.SSHClient client = null ; try { client = connect ( server ) ; authenticate ( client , username , password ) ; java.lang.String serversXml = executePeerStatusCommand ( client ) ; return extractServers ( serversXml ) ; } finally { if ( client != null ) { client.disconnect ( ) ; } } }

Target:
public java.util.Set < java.lang.String > getPeers ( java.lang.String server , java.lang.String username , java.lang.String password ) throws java.io.IOException , javax.naming.AuthenticationException { try ( final org.ovirt.engine.core.utils.ssh.SSHClient client = getSSHClient ( ) ) { connect ( client , server ) ; authenticate ( client , username , password ) ; java.lang.String serversXml = executePeerStatusCommand ( client ) ; return extractServers ( serversXml ) ; } }
Source:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( 0 ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters_2" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( 0 ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }
Source:
private java.util.Map.Entry < java.lang.String , java.lang.String > getTimezoneEntryByKey ( java.lang.String key , java.lang.Iterable < java.util.Map.Entry < java.lang.String , java.lang.String > > timeZones ) { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : timeZones ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( key , entry.getKey ( ) ) ) { return entry ; } } return null ; }

Target:
public org.ovirt.engine.core.common.TimeZoneType getTimeZoneType ( ) { org.ovirt.engine.core.common.businessentities.VmOsType vmOsType = ( ( org.ovirt.engine.core.common.businessentities.VmOsType ) ( getModel ( ) . getOSType ( ) . getSelectedItem ( ) ) ) ; return org.ovirt.engine.core.common.TimeZoneType.getTimeZoneByOs ( vmOsType ) ; }
Source:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.vds_spm_id_map > vds_spm_id_mapList = org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVdsSpmIdMapDao ( ) . getAll ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVds ( ) . getStoragePoolId ( ) ) ; if ( ( vds_spm_id_mapList.size ( ) ) >= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumberOfHostsInStoragePool ) ) ) { buildFaultResult ( ) ; return ; } insertSpmIdToDb ( vds_spm_id_mapList ) ; org.ovirt.engine.core.bll.AddVdsSpmIdCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsSpmIdMap > vdsSpmIdMapList = org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVdsSpmIdMapDao ( ) . getAll ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVds ( ) . getStoragePoolId ( ) ) ; if ( ( vdsSpmIdMapList.size ( ) ) >= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxNumberOfHostsInStoragePool ) ) ) { buildFaultResult ( ) ; return ; } insertSpmIdToDb ( vdsSpmIdMapList ) ; org.ovirt.engine.core.bll.AddVdsSpmIdCommand.setSucceeded ( true ) ; }
Source:
public void renderEditable ( com.google.gwt.cell.client.Cell.Context context , java.lang.Boolean value , boolean canEdit , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! canEdit ) { sb.append ( ( value ? org.ovirt.engine.ui.webadmin.widget.table.column.EntityModelCheckboxColumn.INPUT_CHECKED_DISABLED : org.ovirt.engine.ui.webadmin.widget.table.column.EntityModelCheckboxColumn.INPUT_UNCHECKED_DISABLED ) ) ; } else { super . render ( context , value , sb ) ; } }

Target:
public void renderEditable ( com.google.gwt.cell.client.Cell.Context context , java.lang.Boolean value , boolean canEdit , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! canEdit ) { sb.append ( ( value ? org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.INPUT_CHECKED_DISABLED : org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.INPUT_UNCHECKED_DISABLED ) ) ; } else { super . render ( context , value , sb ) ; } }
Source:
public java.lang.String connectToConsole ( org.ovirt.engine.ui.userportal.widget.basic.ConsoleProtocol selectedProtocol , org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel model ) { if ( ! ( consoleUtils.canShowConsole ( selectedProtocol , model ) ) ) { return null ; } if ( selectedProtocol == ( org.ovirt.engine.ui.userportal.widget.basic.ConsoleProtocol.SPICE ) ) { return showSpiceConsole ( model ) ; } else if ( selectedProtocol == ( org.ovirt.engine.ui.userportal.widget.basic.ConsoleProtocol.RDP ) ) { return showRpdConsole ( model ) ; } else if ( selectedProtocol == ( org.ovirt.engine.ui.userportal.widget.basic.ConsoleProtocol.VNC ) ) { return showVncConsole ( model ) ; } return null ; }

Target:
public java.lang.String connectToConsole ( org.ovirt.engine.ui.uicommonweb.models.userportal.ConsoleProtocol selectedProtocol , org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel model ) { if ( ! ( consoleUtils.canShowConsole ( selectedProtocol , model ) ) ) { return null ; } if ( selectedProtocol == ( org.ovirt.engine.ui.uicommonweb.models.userportal.ConsoleProtocol.SPICE ) ) { return showSpiceConsole ( model ) ; } else if ( selectedProtocol == ( org.ovirt.engine.ui.uicommonweb.models.userportal.ConsoleProtocol.RDP ) ) { return showRpdConsole ( model ) ; } else if ( selectedProtocol == ( org.ovirt.engine.ui.uicommonweb.models.userportal.ConsoleProtocol.VNC ) ) { return showVncConsole ( model ) ; } return null ; }
Source:
public javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId = getStorageDomainId ( action ) ; org.ovirt.engine.core.compat.Guid imageId = asGuid ( get ( ) . getImageId ( ) ) ; org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( imageId , org.ovirt.engine.core.compat.Guid.Empty , storageDomainId , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ; return doAction ( VdcActionType.MoveOrCopyDisk , params , action ) ; }

Target:
public javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId = getStorageDomainId ( action ) ; org.ovirt.engine.api.model.Disk disk = get ( ) ; org.ovirt.engine.core.compat.Guid imageId = asGuid ( disk.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid sourceStorageDomainId = getSourceStorageDomainId ( disk ) ; org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( imageId , sourceStorageDomainId , storageDomainId , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ; return doAction ( VdcActionType.MoveOrCopyDisk , params , action ) ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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 ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static boolean isSpiceFileTransferToggleSupported ( java.lang.String version ) { return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SpiceFileTransferToggleSupported , version ) ) ) ; }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.Map < org.ovirt.engine.core.common.businessentities.network.Network , java.util.Set < org.ovirt.engine.core.compat.Guid > > > aQuery , org.ovirt.engine.core.compat.Guid providerId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.MapConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
public void testWarnOnActiveVmPositive ( ) { testWarnOnActiveVmInner ( true ) ; org.mockito.Mockito.verify ( mockAuditLogDirector ) . log ( auditLogableBaseCaptor.capture ( ) , org.mockito.Matchers.same ( AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM ) ) ; final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase actualLoggable = auditLogableBaseCaptor.getValue ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_CLUSTER_ID , actualLoggable.getClusterId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_NETWORK_NAME , actualLoggable.getCustomValue ( "networkname" ) ) ; }

Target:
public void testWarnOnActiveVmPositive ( ) { testWarnOnActiveVmInner ( true ) ; org.mockito.Mockito.verify ( mockAuditLogDirector ) . log ( auditLogableBaseCaptor.capture ( ) , org.mockito.ArgumentMatchers.same ( AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM ) ) ; final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase actualLoggable = auditLogableBaseCaptor.getValue ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_CLUSTER_ID , actualLoggable.getClusterId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_NETWORK_NAME , actualLoggable.getCustomValue ( "networkname" ) ) ; }
Source:
private void localize ( ) { lvNameEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.logicalVolume ( ) ) ; mountPointEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.mountPoint ( ) ) ; sizeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.lvSize ( ) ) ; raidTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.raidType ( ) ) ; noOfPhysicalDisksEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.noOfPhysicalDisksInRaidVolume ( ) ) ; stripeSizeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.stripeSize ( ) ) ; deviceHeader.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.storageDevices ( ) ) ; deviceSelectionInfo.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.getStorageDeviceSelectionInfo ( ) ) ; }

Target:
private void localize ( ) { lvNameEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.logicalVolume ( ) ) ; mountPointEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.mountPoint ( ) ) ; sizeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.lvSize ( ) ) ; raidParamsLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.raidParameters ( ) ) ; raidTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.raidType ( ) ) ; noOfPhysicalDisksEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.noOfPhysicalDisksInRaidVolume ( ) ) ; stripeSizeLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.stripeSize ( ) ) ; deviceHeader.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.storageDevices ( ) ) ; }
Source:
public static java.lang.String getCpuNameByCpuId ( java.lang.String name , org.ovirt.engine.core.compat.Version ver ) { final org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CpuFlagsManager cpuFlagsManager = org.ovirt.engine.core.bll.CpuFlagsManagerHandler._managersDictionary.get ( ver ) ; if ( cpuFlagsManager != null ) { return cpuFlagsManager.getCpuNameByCpuId ( name ) ; } return null ; }

Target:
public static java.lang.String getCpuNameByCpuId ( java.lang.String name , org.ovirt.engine.core.compat.Version ver ) { final org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CpuFlagsManager cpuFlagsManager = org.ovirt.engine.core.bll.CpuFlagsManagerHandler._managersDictionary.get ( ver ) ; java.lang.String cpuName = ( cpuFlagsManager != null ) ? cpuFlagsManager.getCpuNameByCpuId ( name ) : null ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( cpuName ) ) { return cpuName ; } if ( name.endsWith ( "-IBRS" ) ) { return cpuFlagsManager != null ? cpuFlagsManager.getCpuNameByCpuId ( name.replace ( "-IBRS" , ",+spec-ctrl" ) ) : null ; } return null ; }
Source:
protected void onBrowserEvent2 ( com.google.gwt.user.client.Event event ) { mousePosition [ 0 ] = event.getClientX ( ) ; mousePosition [ 1 ] = event.getClientY ( ) ; if ( ( "click" . equals ( event.getType ( ) ) ) && ( ! ( multiSelectionDisabled ) ) ) { selectionModel.setMultiSelectEnabled ( event.getCtrlKey ( ) ) ; selectionModel.setMultiRangeSelectEnabled ( event.getShiftKey ( ) ) ; } super . onBrowserEvent2 ( event ) ; }

Target:
protected void onBrowserEvent2 ( com.google.gwt.user.client.Event event ) { mousePosition [ 0 ] = event.getClientX ( ) ; mousePosition [ 1 ] = event.getClientY ( ) ; if ( ( org.ovirt.engine.ui.common.widget.table.AbstractActionTable.CLICK.equals ( event.getType ( ) ) ) && ( ! ( multiSelectionDisabled ) ) ) { selectionModel.setMultiSelectEnabled ( event.getCtrlKey ( ) ) ; selectionModel.setMultiRangeSelectEnabled ( event.getShiftKey ( ) ) ; } super . onBrowserEvent2 ( event ) ; }
Source:
public void validateFailedUpdateReadOnly ( ) { org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( true ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( VMStatus.Up ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }

Target:
public void validateFailedUpdateReadOnly ( ) { org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.VmDiskOperationParameterBase parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( true ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( VMStatus.Up ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }
Source:
private void setGlobalHaMaintenance ( boolean enabled ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; if ( vm == null ) { return ; } if ( ! ( vm.isHostedEngine ( ) ) ) { return ; } org.ovirt.engine.core.common.action.SetHaMaintenanceParameters params = new org.ovirt.engine.core.common.action.SetHaMaintenanceParameters ( vm.getRunOnVds ( ) , org.ovirt.engine.core.common.businessentities.HaMaintenanceMode.GLOBAL , enabled ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetHaMaintenance , params ) ; }

Target:
private void setGlobalHaMaintenance ( boolean enabled ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; if ( vm == null ) { return ; } if ( ! ( vm.isHostedEngine ( ) ) ) { return ; } org.ovirt.engine.core.common.action.SetHaMaintenanceParameters params = new org.ovirt.engine.core.common.action.SetHaMaintenanceParameters ( vm.getRunOnVds ( ) , org.ovirt.engine.core.common.businessentities.HaMaintenanceMode.GLOBAL , enabled ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetHaMaintenance , params ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepStatus ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepSessionList ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
public void testRemoveById ( ) { dao.remove ( new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMapId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap > entries = dao.getAllByStorageDomainId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) ; for ( org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap entry : entries ) { org.junit.Assert.assertFalse ( entry.getstorage_domain_id ( ) . equals ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID ) ) ; } org.junit.Assert.assertNotNull ( entries ) ; org.junit.Assert.assertTrue ( entries.isEmpty ( ) ) ; }

Target:
public void testRemoveById ( ) { dao.remove ( new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMapId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap > entries = dao.getAllByStorageDomainId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) ; for ( org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap entry : entries ) { org.junit.Assert.assertFalse ( entry.getStorageDomainId ( ) . equals ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID ) ) ; } org.junit.Assert.assertNotNull ( entries ) ; org.junit.Assert.assertTrue ( entries.isEmpty ( ) ) ; }
Source:
private void addVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( getVmId ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getVmStatisticsDAO ( ) . save ( stats ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . snapshotNewEntity ( stats ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . stateChanged ( ) ; }

Target:
protected void removeVmNetworkInterfaces ( ) { new org.ovirt.engine.core.bll.network.VmInterfaceManager ( org.ovirt.engine.core.bll.ImportVmCommand.getMacPool ( ) ) . removeAll ( getVmId ( ) ) ; }
Source:
org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm createVmInternalData ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setId ( id ) ; vmDynamic.setRunOnVds ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs.SRC_HOST_ID ) ; return new org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm ( ( - 1.0 ) ) . setVmDynamic ( vmDynamic ) . setVmStatistics ( new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ) . setInterfaceStatistics ( new java.util.ArrayList < > ( ) ) . setLunsMap ( new java.util.HashMap < > ( ) ) ; }

Target:
org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm createVmInternalData ( org.ovirt.engine.core.common.businessentities.VMStatus status ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setId ( id ) ; vmDynamic.setRunOnVds ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs.SRC_HOST_ID ) ; if ( status != null ) { vmDynamic.setStatus ( status ) ; } return new org.ovirt.engine.core.vdsbroker.monitoring.VdsmVm ( ( - 1.0 ) ) . setVmDynamic ( vmDynamic ) . setVmStatistics ( new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ) . setInterfaceStatistics ( new java.util.ArrayList < > ( ) ) . setLunsMap ( new java.util.HashMap < > ( ) ) ; }
Source:
public void failedFenceWithDifferentProxyRetry ( ) { mockProxyHost ( true ) ; mockFenceFailure ( false ) ; org.ovirt.engine.core.common.businessentities.FenceAgent agent = createAgent ( ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.fence ( FenceActionType.Start , agent ) ; org.junit.Assert.assertFalse ( result.getSucceeded ( ) ) ; org.mockito.Mockito.verify ( proxyLocator ) . findProxyHost ( true , org.ovirt.engine.core.bll.FenceExecutorTest.PROXY_HOST_ID ) ; }

Target:
public void failedFenceWithDifferentProxyRetry ( ) { mockProxyHost ( true ) ; mockFenceFailure ( false ) ; org.ovirt.engine.core.common.businessentities.FenceAgent agent = createAgent ( ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.fence ( FenceActionType.START , agent ) ; org.junit.Assert.assertFalse ( result.getSucceeded ( ) ) ; org.mockito.Mockito.verify ( proxyLocator ) . findProxyHost ( true , org.ovirt.engine.core.bll.FenceExecutorTest.PROXY_HOST_ID ) ; }
Source:
private java.lang.Object getBackendParameter ( final org.ovirt.engine.core.common.config.ConfigValues key ) throws javax.servlet.ServletException { final org.ovirt.engine.core.common.queries.GetConfigurationValueParameters parameters = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ) ; parameters.setConfigValue ( key ) ; parameters.setVersion ( ConfigCommon.defaultConfigurationVersion ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue value = backend.runPublicQuery ( VdcQueryType.GetConfigurationValue , parameters ) ; if ( ! ( value.getSucceeded ( ) ) ) { throw new javax.servlet.ServletException ( ( ( "Can\'t get value of backend parameter \"" + key ) + "\"." ) ) ; } return value.getReturnValue ( ) ; }

Target:
private java.lang.Object getBackendParameter ( final org.ovirt.engine.core.common.config.ConfigValues key ) throws javax.servlet.ServletException { final org.ovirt.engine.core.common.queries.GetConfigurationValueParameters parameters = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ) ; parameters.setConfigValue ( key ) ; parameters.setVersion ( ConfigCommon.defaultConfigurationVersion ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue value = backend.runPublicQuery ( QueryType.GetConfigurationValue , parameters ) ; if ( ! ( value.getSucceeded ( ) ) ) { throw new javax.servlet.ServletException ( ( ( "Can\'t get value of backend parameter \"" + key ) + "\"." ) ) ; } return value.getReturnValue ( ) ; }
Source:
public static void getMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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 ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getParameters ( ) . getSourceSnapshotId ( ) . toString ( ) , getClass ( ) . getName ( ) ) ; }

Target:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { if ( ( getSourceVmFromDb ( ) ) == null ) { return null ; } return java.util.Collections.singletonMap ( getSourceVmFromDb ( ) . getId ( ) . toString ( ) , LockingGroup.VM.name ( ) ) ; }
Source:
public static void IsLiveStorageMigrationEnabled ( 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.LiveStorageMigrationEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
private static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > getClusterByServiceList ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list , boolean supportsVirtService , boolean supportsGlusterService ) { final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : list ) { if ( ( supportsVirtService && ( cluster.supportsVirtService ( ) ) ) || ( supportsGlusterService && ( cluster.supportsGlusterService ( ) ) ) ) { filteredList.add ( cluster ) ; } } java.util.Collections.sort ( filteredList , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return filteredList ; }
Source:
public static void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }

Target:
public void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.lang.String jobId , java.util.Map src , java.util.Map dst ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.copy_data" ) . withParameter ( "source" , src ) . withParameter ( "destination" , dst ) . withParameter ( "job_id" , jobId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.util.Map src , java.util.Map dst , boolean collapse ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.copyData" ) . withParameter ( "srcImage" , src ) . withParameter ( "dstImage" , dst ) . withParameter ( "collapse" , collapse ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public void testFileLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.File file = new org.ovirt.engine.api.model.File ( ) ; file.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.FILE_ID ) ; file.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; file.getStorageDomain ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.common.util.LinkHelper.addLinks ( setUpUriExpectations ( ) , file ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.FILE_HREF , file.getHref ( ) ) ; }

Target:
public void testFileLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.File file = new org.ovirt.engine.api.model.File ( ) ; file.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.FILE_ID ) ; file.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; file.getStorageDomain ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , file ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.FILE_HREF , file.getHref ( ) ) ; }
Source:
private void addServerHook ( org.ovirt.engine.core.compat.Guid serverId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook newServerHook = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook ( ) ; newServerHook.setHookId ( entity.getId ( ) ) ; newServerHook.setStatus ( getNewStatus ( ) ) ; newServerHook.setServerId ( serverId ) ; addServerHookInDb ( newServerHook ) ; }

Target:
private void addServerHook ( org.ovirt.engine.core.compat.Guid serverId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook newServerHook = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook ( ) ; newServerHook.setHookId ( getGlusterHook ( ) . getId ( ) ) ; newServerHook.setStatus ( getNewStatus ( ) ) ; newServerHook.setServerId ( serverId ) ; addServerHookInDb ( newServerHook ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > getAllForStorageDomain ( org.ovirt.engine.core.compat.Guid storageDomainId ) { return getCallsHandler ( ) . executeReadList ( "GetDiskProfilesByStorageDomainId" , createEntityRowMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , storageDomainId ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > getAllForStorageDomain ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid userId , boolean isFiltered ) { return getCallsHandler ( ) . executeReadList ( "GetDiskProfilesByStorageDomainId" , createEntityRowMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , storageDomainId ) . addValue ( "user_id" , userId ) . addValue ( "is_filtered" , isFiltered ) ) ; }
Source:
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 ) { if ( "Entity" . equals ( args.propertyName ) ) { nameEditor.asEditor ( ) . getSubEditor ( ) . setValue ( object.getNetwork ( ) . getName ( ) ) ; } }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.hosts.NetworkAttachmentModel model ) { super . edit ( model ) ; }
Source:
protected void setUpLogExpectations ( boolean debug ) { org.powermock.api.easymock.PowerMock.mockStatic ( org.ovirt.engine.core.utils.log.LogFactory.class ) ; org.ovirt.engine.core.utils.log.Log log = org.powermock.api.easymock.PowerMock.createMock ( org.ovirt.engine.core.utils.log.Log.class ) ; org.easymock.classextension.EasyMock.expect ( org.ovirt.engine.core.utils.log.LogFactory.getLog ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.class ) ) . andReturn ( log ) ; org.easymock.classextension.EasyMock.expect ( log.isDebugEnabled ( ) ) . andReturn ( debug ) . anyTimes ( ) ; org.powermock.api.easymock.PowerMock.replayAll ( ) ; }

Target:
protected void setUpLogExpectations ( boolean debug ) { org.powermock.api.easymock.PowerMock.mockStatic ( org.slf4j.LoggerFactory.class ) ; org.slf4j.Logger log = org.powermock.api.easymock.PowerMock.createMock ( org.slf4j.Logger.class ) ; org.easymock.classextension.EasyMock.expect ( org.slf4j.LoggerFactory.getLogger ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.class ) ) . andReturn ( log ) ; org.easymock.classextension.EasyMock.expect ( log.isDebugEnabled ( ) ) . andReturn ( debug ) . anyTimes ( ) ; org.powermock.api.easymock.PowerMock.replayAll ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( java.lang.String query ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryGroups ( java.lang.String query ) { org.ovirt.engine.core.bll.adbroker.LdapQueryData queryData = new org.ovirt.engine.core.bll.adbroker.LdapQueryDataImpl ( ) ; queryData.setLdapQueryType ( LdapQueryType.searchGroups ) ; queryData.setDomain ( getProfileName ( ) ) ; queryData.setFilterParameters ( new java.lang.Object [ ] { query } ) ; org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.SearchGroupsByQuery , new org.ovirt.engine.core.bll.adbroker.LdapSearchByQueryParameters ( null , getName ( ) , queryData ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.LdapGroup > ldapGroups = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapGroup > ) ( ldapResult.getReturnValue ( ) ) ) ; return mapGroups ( ldapGroups ) ; }
Source:
public static void getTemplateListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.Assert.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }