auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( vmDao.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.bll.storage.disk.AddDiskCommandTest.vmId ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( vmDao.get ( command.getParameters ( ) . getVmId ( ) ) ) . thenReturn ( vm ) ; return vm ; }
Source:
public static void getDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public boolean isLink ( java.lang.Object object ) { if ( object instanceof org.ovirt.engine.sdk4.types.Identified ) { return ( ( ( org.ovirt.engine.sdk4.types.Identified ) ( object ) ) . href ( ) ) != null ; } return false ; }

Target:
private java.lang.String getHref ( java.lang.Object object ) { if ( object instanceof org.ovirt.engine.sdk4.types.Identified ) { return ( ( org.ovirt.engine.sdk4.types.Identified ) ( object ) ) . href ( ) ; } else if ( object instanceof org.ovirt.api.metamodel.runtime.util.ListWithHref ) { return ( ( org.ovirt.api.metamodel.runtime.util.ListWithHref ) ( object ) ) . href ( ) ; } return null ; }
Source:
protected void updateSgIoUnfilteredChangeability ( ) { if ( ! ( getIsScsiPassthrough ( ) . getEntity ( ) ) ) { getIsSgIoUnfiltered ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.cannotEnableSgioWhenScsiPassthroughDisabled ( ) ) ; getIsSgIoUnfiltered ( ) . setIsChangable ( false ) ; getIsSgIoUnfiltered ( ) . setEntity ( false ) ; return ; } getIsSgIoUnfiltered ( ) . setIsChangable ( isEditEnabled ( ) ) ; }

Target:
private void DiskInterface_SelectedItemChanged ( ) { boolean isLunDisk = ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ; org.ovirt.engine.core.common.businessentities.storage.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; getIsScsiPassthrough ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateScsiPassthroguhChangeability ( ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbGroup lookupEntity ( org.ovirt.engine.core.compat.Guid id ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return lookupGroupById ( this . id ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.LdapGroup findDirectoryGroup ( java.lang.String directoryName , org.ovirt.engine.api.model.Group groupModel ) { if ( groupModel.isSetId ( ) ) { java.lang.String groupId = groupModel.getId ( ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.LdapGroup.class , VdcQueryType.GetDirectoryGroupById , new org.ovirt.engine.core.common.queries.DirectoryIdQueryParameters ( directoryName , org.ovirt.engine.core.common.utils.ExternalId.fromHex ( groupId ) ) , groupId , true ) ; } if ( groupModel.isSetName ( ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.LdapGroup.class , SearchType.AdGroup , getDirectoryGroupSearchPattern ( groupModel.getName ( ) , directoryName ) ) ; } return null ; }
Source:
private static void removeUsbSlots ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > list = org.ovirt.engine.core.bll.utils.VmDeviceUtils.getUsbRedirectDevices ( vm ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : list ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( vmDevice.getId ( ) ) ; } }

Target:
public static void setVmDevices ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmId ( vmBase.getId ( ) ) ; vmBase.setUnmanagedDeviceList ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getUnmanagedDevicesByVmId ( vmBase.getId ( ) ) ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > vmManagedDeviceMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( device.getIsManaged ( ) ) { vmManagedDeviceMap.put ( device.getDeviceId ( ) , device ) ; } } vmBase.setManagedDeviceMap ( vmManagedDeviceMap ) ; }
Source:
public org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( org.ovirt.engine.core.bll.CommandBase command ) { if ( command.hasTaskHandlers ( ) ) { if ( ( command.getParameters ( ) . getExecutionReason ( ) ) == ( VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return command.getCurrentTaskHandler ( ) . getTaskType ( ) ; } return command.getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return command.getAsyncTaskType ( ) ; }

Target:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.concreteCreateTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
public static void getAllVnicProfiles ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }
Source:
static org.ovirt.engine.api.model.CpuTune stringToCpuTune ( java.lang.String cpuPinning ) { if ( ( cpuPinning == null ) || ( cpuPinning.equals ( "" ) ) ) { return null ; } final org.ovirt.engine.api.model.CpuTune cpuTune = new org.ovirt.engine.api.model.CpuTune ( ) ; for ( java.lang.String strCpu : cpuPinning.split ( "_" ) ) { org.ovirt.engine.api.model.VcpuPin pin = org.ovirt.engine.api.restapi.types.VmMapper.stringToVCpupin ( strCpu ) ; cpuTune.getVcpuPin ( ) . add ( pin ) ; } return cpuTune ; }

Target:
static org.ovirt.engine.api.model.CpuTune stringToCpuTune ( java.lang.String cpuPinning ) { if ( ( cpuPinning == null ) || ( cpuPinning.equals ( "" ) ) ) { return null ; } final org.ovirt.engine.api.model.CpuTune cpuTune = new org.ovirt.engine.api.model.CpuTune ( ) ; org.ovirt.engine.api.model.VcpuPins pins = new org.ovirt.engine.api.model.VcpuPins ( ) ; for ( java.lang.String strCpu : cpuPinning.split ( "_" ) ) { org.ovirt.engine.api.model.VcpuPin pin = org.ovirt.engine.api.restapi.types.VmMapper.stringToVCpupin ( strCpu ) ; pins.getVcpuPins ( ) . add ( pin ) ; } cpuTune.setVcpuPins ( pins ) ; return cpuTune ; }
Source:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( FixturesTool.HOST_NIC_VFS_CONFIG_ALL_NETWORKS_ALLOWED ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( result.getId ( ) ) ; result = dao.get ( FixturesTool.HOST_NIC_VFS_CONFIG_ALL_NETWORKS_ALLOWED ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
private void commonRemove ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( id ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( result.getId ( ) ) ; result = dao.get ( id ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
protected boolean validateInputs ( ) { java.util.List < java.lang.String > messages = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( getValidationGroups ( ) , getParameters ( ) ) ; if ( ! ( messages.isEmpty ( ) ) ) { getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; } return true ; }

Target:
protected < T > boolean validate ( T value ) { java.util.List < java.lang.String > messages = org.ovirt.engine.core.common.utils.ValidationUtils.validateInputs ( getValidationGroups ( ) , value ) ; if ( ! ( messages.isEmpty ( ) ) ) { getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; } return true ; }
Source:
public java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.Role object ) { return object.getname ( ) ; }

Target:
private void initListBoxEditors ( ) { profileSelection = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.aaa.ProfileEntry > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.aaa.ProfileEntry > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.aaa.ProfileEntry object ) { return object.toString ( ) ; } } ) ; roleSelection = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.Role > ( ) ) ; namespaceSelection = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.String > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.String > ( ) { @ java.lang.Override protected java.lang.String renderNullSafe ( java.lang.String object ) { return object ; } } ) ; }
Source:
public void setItems ( java.lang.Iterable < T > value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.lang.Iterable < T > value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
public void update ( int index , java.lang.Object model , java.lang.Boolean value ) { ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( model ) ) . getCollapseSnapshots ( ) . setEntity ( value ) ; customSelectionCellFormatType.setEnabledWithToolTip ( value , constants.importAllocationModifiedCollapse ( ) ) ; diskTable.edit ( importModel.getImportDiskListModel ( ) ) ; }

Target:
public void update ( int index , java.lang.Object model , java.lang.Boolean value ) { ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( model ) ) . getCollapseSnapshots ( ) . setEntity ( value ) ; customSelectionCellFormatType.setEnabledWithToolTip ( value , constants.importAllocationModifiedCollapse ( ) ) ; diskTable.asEditor ( ) . edit ( importModel.getImportDiskListModel ( ) ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public int compare ( T object1 , T object2 ) { return getRawValue ( object1 ) . compareTo ( getRawValue ( object2 ) ) ; }

Target:
public int compare ( T object1 , T object2 ) { java.lang.Long val1 = getRawValue ( object1 ) ; java.lang.Long val2 = getRawValue ( object2 ) ; if ( val1 == null ) { return val2 == null ? 0 : - 1 ; } else if ( val2 == null ) { return 1 ; } return val1.compareTo ( val2 ) ; }
Source:
protected org.ovirt.engine.api.model.VM deprecatedPopulate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; model = addInlineDetails ( details , model ) ; if ( details.contains ( "statistics" ) ) { addInlineStatistics ( model ) ; } return model ; }

Target:
protected org.ovirt.engine.api.model.Vm deprecatedPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.api.restapi.resource.VM entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; model = addInlineDetails ( details , model ) ; if ( details.contains ( "statistics" ) ) { addInlineStatistics ( model ) ; } return model ; }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; if ( ( getItems ( ) ) == ( glusterVolumeEntity.getBricks ( ) ) ) { getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; } else { setItems ( glusterVolumeEntity.getBricks ( ) ) ; } } else { setItems ( null ) ; } }
Source:
private static org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters createParameters ( ) { org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters parameters = new org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters ( ) ; org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.VDS newVdsData = org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.makeTestVds ( vdsId ) ; org.ovirt.engine.core.common.businessentities.VDS oldVdsData = newVdsData.clone ( ) ; oldVdsData.setVdsName ( "FOO" ) ; oldVdsData.setClusterCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; parameters.setvds ( newVdsData ) ; return parameters ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS createTestHost ( org.ovirt.engine.core.compat.Guid hostId ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setHostName ( "BUZZ" ) ; host.setVdsName ( "BAR" ) ; host.setClusterCompatibilityVersion ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.CLUSTER_VERSION ) ; host.setClusterId ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.CLUSTER_ID ) ; host.setId ( hostId ) ; return host ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.NewVmModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; model.SetClusters ( model , clusters , null ) ; behavior.InitTemplate ( ) ; behavior.InitCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initTemplate ( ) ; initCdImage ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.HashMap < java.lang.Integer , java.lang.String > result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; java.lang.String defaultValue = result.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = new org.ovirt.engine.ui.uicommonweb.MapWithDefaults < java.lang.Integer , java.lang.String > ( result , defaultValue ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.displayTypes = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; }
Source:
protected void writeOS ( ) { _writer.writeStartElement ( "OperatingSystemSection" ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "id" , vmBase.getId ( ) . toString ( ) ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "required" , "false" ) ; _writer.writeElement ( "Info" , "Guest Operating System" ) ; _writer.writeElement ( "Description" , osRepository.getUniqueOsNames ( ) . get ( vmBase.getOsId ( ) ) ) ; _writer.writeEndElement ( ) ; }

Target:
protected void writeOS ( ) { _writer.writeStartElement ( "OperatingSystemSection" ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "id" , java.lang.Integer.toString ( mapOsId ( vmBase.getOsId ( ) ) ) ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "required" , "false" ) ; _writer.writeElement ( "Info" , "Guest Operating System" ) ; _writer.writeElement ( "Description" , osRepository.getOsName ( vmBase.getOsId ( ) ) ) ; _writer.writeEndElement ( ) ; }
Source:
public void testGet ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface result = dao.get ( newVdsInterface.getId ( ) ) ; org.junit.Assert.assertEquals ( newVdsInterface , result ) ; }

Target:
public void testGet ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface result = dao.get ( newVdsInterface.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( newVdsInterface , result ) ; }
Source:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.api.model.InstanceType model = getRestModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }

Target:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.api.model.InstanceType model = getRestModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryDirectoryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > directoryGroups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) { directoryGroups.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecord ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , group ) ) ; } return directoryGroups ; }

Target:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryDirectoryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > directoryGroups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : org.ovirt.engine.core.aaa.AuthzUtils.queryGroupRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) { directoryGroups.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecordToDirectoryGroup ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , group ) ) ; } return directoryGroups ; }
Source:
protected void UpdateDetailsAvailability ( ) { super . UpdateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getSelectedItem ( ) ) ) ; getClusterServiceModel ( ) . setIsAvailable ( ( ( ( vdsGroup != null ) && ( vdsGroup.supportsGlusterService ( ) ) ) && ( ( Version.v3_2.compareTo ( vdsGroup.getcompatibility_version ( ) ) ) <= 0 ) ) ) ; }

Target:
protected void UpdateDetailsAvailability ( ) { super . UpdateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getSelectedItem ( ) ) ) ; getClusterVmListModel ( ) . setIsAvailable ( ( ( vdsGroup != null ) && ( vdsGroup.supportsVirtService ( ) ) ) ) ; getClusterServiceModel ( ) . setIsAvailable ( ( ( ( vdsGroup != null ) && ( vdsGroup.supportsGlusterService ( ) ) ) && ( ( Version.v3_2.compareTo ( vdsGroup.getcompatibility_version ( ) ) ) <= 0 ) ) ) ; }
Source:
protected void executeCommand ( ) { super . executeCommand ( ) ; vmPoolMonitor.triggerPoolMonitoringJob ( ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue currentVmsInPoolQuery = runInternalQuery ( VdcQueryType.GetAllPoolVms , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > poolVmsBeforeAdd = ( currentVmsInPoolQuery.getSucceeded ( ) ) ? currentVmsInPoolQuery.< java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) : null ; super . executeCommand ( ) ; if ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getSucceeded ( ) ) { updatePoolVms ( poolVmsBeforeAdd ) ; } vmPoolMonitor.triggerPoolMonitoringJob ( ) ; }
Source:
public void setSupportBridgesReportByVDSM ( boolean isSupportBridgesReportByVDSM ) { this . isSupportBridgesReportByVDSM = isSupportBridgesReportByVDSM ; }

Target:
public void setSupportBridgesReportByVDSM ( boolean isSupportBridgesReportByVDSM ) { this . isSupportBridgesReportByVDSM = isSupportBridgesReportByVDSM ; if ( ! isSupportBridgesReportByVDSM ) { getIsVmNetwork ( ) . setEntity ( true ) ; getIsVmNetwork ( ) . setIsChangable ( false ) ; } else { getIsVmNetwork ( ) . setIsChangable ( true ) ; } }
Source:
public static 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 static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void executeValidatedCommands ( org.ovirt.engine.core.bll.CommandBase < ? > command ) { if ( command.getReturnValue ( ) . getCanDoAction ( ) ) { if ( ( ( executionContext ) == null ) || ( executionContext.isMonitored ( ) ) ) { org.ovirt.engine.core.bll.job.ExecutionHandler.prepareCommandForMonitoring ( command , command.getActionType ( ) , command.isInternalExecution ( ) , new java.lang.Boolean ( hasCorrelationIdMap.get ( command.getCommandId ( ) ) ) ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setCorrelationId ( command.getCorrelationId ( ) ) ; command.executeAction ( ) ; } }

Target:
protected void executeValidatedCommand ( org.ovirt.engine.core.bll.CommandBase < ? > command ) { if ( ( ( executionContext ) == null ) || ( executionContext.isMonitored ( ) ) ) { org.ovirt.engine.core.bll.job.ExecutionHandler.prepareCommandForMonitoring ( command , command.getActionType ( ) , command.isInternalExecution ( ) , new java.lang.Boolean ( hasCorrelationIdMap.get ( command.getCommandId ( ) ) ) ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setCorrelationId ( command.getCorrelationId ( ) ) ; command.executeAction ( ) ; }
Source:
public void testUpdateSetAndUploadIconFailure ( ) { final org.ovirt.engine.api.model.Template model = getRestModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }

Target:
public void testUpdateSetAndUploadIconFailure ( ) { final org.ovirt.engine.api.model.Template model = getRestModel ( 0 ) ; model.setSmallIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIcon ( GUIDS [ 2 ] ) ) ; model.setLargeIcon ( org.ovirt.engine.api.restapi.resource.IconTestHelpler.createIconWithData ( ) ) ; try { verifyModel ( resource.update ( model ) , 0 ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BAD_REQUEST ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( ( lastExecutedCommand == ( getModel ( ) . getStopCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getRemoveVolumeCommand ( ) ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( ( ( lastExecutedCommand == ( getModel ( ) . getStopCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getRemoveVolumeCommand ( ) ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getStartCommand ( ) ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
private void hostName_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getExternalHostName ( ) . getSelectedItem ( ) ) ) ; if ( vds == null ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; } updateModelFromVds ( vds , null , false , null ) ; }

Target:
private void hostName_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getExternalHostName ( ) . getSelectedItem ( ) ) ) ; if ( vds != null ) { setOriginalName ( vds.getName ( ) ) ; getName ( ) . setEntity ( vds.getName ( ) ) ; getHost ( ) . setEntity ( vds.getHostName ( ) ) ; } }
Source:
private org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters createParameters ( org.ovirt.engine.core.compat.Guid storageDomainId , java.util.List < org.ovirt.engine.api.model.LogicalUnit > newLuns , boolean force ) { org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters params = new org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters ( ) ; params.setStorageDomainId ( storageDomainId ) ; java.util.ArrayList < java.lang.String > lunIds = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.model.LogicalUnit newLun : newLuns ) { lunIds.add ( newLun.getId ( ) ) ; } params.setLunIds ( lunIds ) ; params.setForce ( force ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters createParameters ( org.ovirt.engine.core.compat.Guid storageDomainId , java.util.List < org.ovirt.engine.api.model.LogicalUnit > newLuns , boolean force ) { org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters params = new org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters ( ) ; params.setStorageDomainId ( storageDomainId ) ; java.util.ArrayList < java.lang.String > lunIds = newLuns.stream ( ) . map ( LogicalUnit :: getId ) . collect ( java.util.stream.Collectors.toCollection ( java.util.ArrayList :: new ) ) ; params.setLunIds ( lunIds ) ; params.setForce ( force ) ; return params ; }
Source:
public void Activate ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > pb = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > Cast ( getSelectedItems ( ) ) ) { pb.add ( new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( a.getId ( ) , getEntity ( ) . getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.ActivateStorageDomain , pb ) ; }

Target:
public void Activate ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > pb = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getSelectedItems ( ) ) ) { pb.add ( new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( a.getId ( ) , getEntity ( ) . getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.ActivateStorageDomain , pb ) ; }
Source:
protected void service ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { if ( org.ovirt.engine.core.sso.utils.SSOUtils.isUserAuthenticated ( request ) ) { org.ovirt.engine.core.sso.servlets.InteractiveRedirectToModuleServlet.log.debug ( "User is authenticated redirecting to module" ) ; org.ovirt.engine.core.sso.utils.SSOUtils.redirectToModule ( request , response ) ; } else { org.ovirt.engine.core.sso.utils.SSOUtils.getSsoSession ( request ) . setReauthenticate ( false ) ; response.sendRedirect ( ( ( request.getContextPath ( ) ) + ( org.ovirt.engine.core.sso.utils.SSOConstants.INTERACTIVE_LOGIN_FORM_URI ) ) ) ; } }

Target:
protected void service ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { if ( org.ovirt.engine.core.sso.utils.SsoUtils.isUserAuthenticated ( request ) ) { org.ovirt.engine.core.sso.servlets.InteractiveRedirectToModuleServlet.log.debug ( "User is authenticated redirecting to module" ) ; org.ovirt.engine.core.sso.utils.SsoUtils.redirectToModule ( request , response ) ; } else { org.ovirt.engine.core.sso.utils.SsoUtils.getSsoSession ( request ) . setReauthenticate ( false ) ; response.sendRedirect ( ( ( request.getContextPath ( ) ) + ( org.ovirt.engine.core.sso.utils.SsoConstants.INTERACTIVE_LOGIN_FORM_URI ) ) ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = getVdsGroup ( ) ; if ( vdsGroup.supportsVirtService ( ) ) { setSucceeded ( initVirtResources ( ) ) ; } if ( vdsGroup.supportsGlusterService ( ) ) { setSucceeded ( initGlusterPeerProcess ( ) ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = getVdsGroup ( ) ; boolean initSucceeded = true ; if ( vdsGroup.supportsTrustedService ( ) ) { initSucceeded = initTrustedService ( ) ; } if ( initSucceeded && ( vdsGroup.supportsVirtService ( ) ) ) { initSucceeded = initVirtResources ( ) ; } if ( initSucceeded && ( vdsGroup.supportsGlusterService ( ) ) ) { initSucceeded = initGlusterHost ( ) ; } setSucceeded ( initSucceeded ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( getSourceVmFromDb ( ) . isDown ( ) ) ) { failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; return false ; } return super . canDoAction ( ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( ( ( getSourceVmFromDb ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Suspended ) ) || ( getSourceVmFromDb ( ) . isDown ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; } return super . canDoAction ( ) ; }
Source:
public 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 ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
public void testValidateModifiedBondSlaves_whenSlaveInterfaceDoesNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidateModifiedBondSlaves ( bond , null , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) , ValidationResult.VALID , false , VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }

Target:
public void testValidateModifiedBondSlavesWhenSlaveIsNotValid ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setBonds ( java.util.Collections.singletonList ( bond ) ) ; doTestValidateModifiedBondSlaves ( params , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.Network > emptyList ( ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) ) ; }
Source:
private static void flatGroups ( java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > groupIds , java.util.List < java.lang.String > accumulator ) { for ( org.ovirt.engine.api.extensions.ExtMap group : groupIds ) { if ( ! ( accumulator.contains ( group.< java.lang.String > get ( Authz.GroupRecord.ID ) ) ) ) { accumulator.add ( group.< java.lang.String > get ( Authz.GroupRecord.ID ) ) ; org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand.flatGroups ( group , Authz.GroupRecord.GROUPS , accumulator ) ; } } }

Target:
private static void flatGroups ( java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > groupIds , java.util.Map < java.lang.String , org.ovirt.engine.api.extensions.ExtMap > accumulator ) { for ( org.ovirt.engine.api.extensions.ExtMap group : groupIds ) { if ( ! ( accumulator.containsKey ( group.< java.lang.String > get ( Authz.GroupRecord.ID ) ) ) ) { accumulator.put ( group.get ( Authz.GroupRecord.ID ) , group ) ; org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand.flatGroups ( group , Authz.GroupRecord.GROUPS , accumulator ) ; } } }
Source:
public static java.util.List < org.ovirt.engine.ui.frontend.server.dashboard.HeatMapBlock > getStorage ( javax.sql.DataSource dwhDataSource ) throws java.sql.SQLException , org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { java.util.List < org.ovirt.engine.ui.frontend.server.dashboard.HeatMapBlock > nodes = new java.util.ArrayList < > ( ) ; org.ovirt.engine.ui.frontend.server.dashboard.dao.StorageDomainDwhDAO dao = new org.ovirt.engine.ui.frontend.server.dashboard.dao.StorageDomainDwhDAO ( dwhDataSource ) ; for ( org.ovirt.engine.ui.frontend.server.dashboard.models.StorageDomainAverage data : dao.getStorageAverage ( ) ) { nodes.add ( new org.ovirt.engine.ui.frontend.server.dashboard.HeatMapBlock ( data.getName ( ) , data.getValue ( ) ) ) ; } return nodes ; }

Target:
public static java.util.List < org.ovirt.engine.ui.frontend.server.dashboard.HeatMapBlock > getStorage ( javax.sql.DataSource dwhDataSource ) throws org.ovirt.engine.ui.frontend.server.dashboard.DashboardDataException { java.util.List < org.ovirt.engine.ui.frontend.server.dashboard.HeatMapBlock > nodes = new java.util.ArrayList < > ( ) ; org.ovirt.engine.ui.frontend.server.dashboard.dao.StorageDomainDwhDao dao = new org.ovirt.engine.ui.frontend.server.dashboard.dao.StorageDomainDwhDao ( dwhDataSource ) ; for ( org.ovirt.engine.ui.frontend.server.dashboard.models.StorageDomainAverage data : dao.getStorageAverage ( ) ) { nodes.add ( new org.ovirt.engine.ui.frontend.server.dashboard.HeatMapBlock ( data.getName ( ) , data.getValue ( ) ) ) ; } return nodes ; }
Source:
protected boolean validateUsbPolicy ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.updateImportedVmUsbPolicy ( vm.getStaticData ( ) ) ; return org.ovirt.engine.core.bll.VmHandler.isUsbPolicyLegal ( vm.getUsbPolicy ( ) , vm.getOs ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean validateUsbPolicy ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.updateImportedVmUsbPolicy ( vm.getStaticData ( ) ) ; return org.ovirt.engine.core.bll.VmHandler.isUsbPolicyLegal ( vm.getUsbPolicy ( ) , vm.getOs ( ) , getEffectiveCompatibilityVersion ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getReturnValue ( ) . getValidationMessages ( ) ) ; }
Source:
public void setSelectedItem ( java.lang.Object value ) { if ( ( selectedItem ) != value ) { onSelectedItemChanging ( value , selectedItem ) ; selectedItem = value ; onSelectedItemChanged ( ) ; getSelectedItemChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItem" ) ) ; } }

Target:
public void setSelectedItem ( T value ) { if ( ( selectedItem ) != value ) { onSelectedItemChanging ( value , selectedItem ) ; selectedItem = value ; onSelectedItemChanged ( ) ; getSelectedItemChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SelectedItem" ) ) ; } }
Source:
private void executeActionInTransactionScope ( ) { if ( ( org.ovirt.engine.core.utils.transaction.TransactionSupport.current ( ) ) != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.registerRollbackHandler ( this ) ; } if ( ! ( ExecuteWithoutTransaction ( ) ) ) { if ( ( org.ovirt.engine.core.utils.transaction.TransactionSupport.current ( ) ) == null ) { cancelTasks ( ) ; } org.ovirt.engine.core.utils.transaction.TransactionSupport.setRollbackOnly ( ) ; } }

Target:
private void executeActionInTransactionScope ( ) { if ( ( org.ovirt.engine.core.utils.transaction.TransactionSupport.current ( ) ) != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.registerRollbackHandler ( this ) ; } if ( ! ( executeWithoutTransaction ( ) ) ) { if ( ( org.ovirt.engine.core.utils.transaction.TransactionSupport.current ( ) ) == null ) { cancelTasks ( ) ; } org.ovirt.engine.core.utils.transaction.TransactionSupport.setRollbackOnly ( ) ; } }