auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void cancel ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qosItems = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( getQos ( ) . getItems ( ) ) ) ) ; qosItems.add ( 1 , networkQoS ) ; getQos ( ) . setItems ( qosItems ) ; getQos ( ) . setSelectedItem ( networkQoS ) ; sourceListModel.setConfirmWindow ( null ) ; }

Target:
protected void postSaveAction ( boolean succeeded ) { if ( succeeded ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qosItems = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( getQos ( ) . getItems ( ) ) ) ) ; qosItems.add ( 1 , networkQoS ) ; getQos ( ) . setItems ( qosItems ) ; getQos ( ) . setSelectedItem ( networkQoS ) ; } super . postSaveAction ( succeeded ) ; }
Source:
public static boolean isOsTypeSupportedForVirtioScsi ( int osId , org.ovirt.engine.core.compat.Version clusterVersion , java.util.List < java.lang.String > reasons ) { boolean result = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( osId , clusterVersion , DiskInterface.VirtIO_SCSI ) ; if ( ! result ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI.name ( ) ) ; } return result ; }

Target:
public static boolean isOsTypeSupportedForVirtioScsi ( int osId , org.ovirt.engine.core.compat.Version clusterVersion , java.util.List < java.lang.String > reasons ) { boolean result = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( osId , clusterVersion , DiskInterface.VirtIO_SCSI ) ; if ( ! result ) { reasons.add ( EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI.name ( ) ) ; } return result ; }
Source:
private org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > updateVdsNetworksInTx ( final T bckndCmdParams ) { return new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( bckndCmdParams.getVdsId ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; } } ; }

Target:
private org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > updateVdsNetworksInTx ( ) { return new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( getVds ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; } } ; }
Source:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData selectedObject = ( ( com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData > ) ( event.getSource ( ) ) ) . getSelectedObject ( ) ; customSelectionCellFormatType.setEnabledWithToolTip ( selectedObject.getCollapseSnapshots ( ) . getEntity ( ) , constants.importAllocationModifiedCollapse ( ) ) ; }

Target:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData selectedObject = ( ( com.google.gwt.view.client.SingleSelectionModel < org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData > ) ( event.getSource ( ) ) ) . getSelectedObject ( ) ; customSelectionCellFormatType.setEnabledWithToolTip ( selectedObject.getCollapseSnapshots ( ) . getEntity ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.importAllocationModifiedCollapse ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc glusterSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( vdsServer.glusterSnapshotCreate ( volumeName , snapshotName , description , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc ( vdsServer.glusterVolumeSnapshotCreate ( volumeName , snapshotName , description , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( this ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) ) . perform ( ) ; } }

Target:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( this ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , auditLogDirector ) . perform ( ) ; } }
Source:
public void testDefaultRouteWhenOutOfSync ( ) { iface.setIpv4DefaultRoute ( false ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; org.junit.Assert.assertThat ( createTestedInstance ( true , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testDnsResolverConfigurationInSyncWithHostWhenDhcpIsUsed ( ) { iface.setIpv4DefaultRoute ( false ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration2 ) ; testedNetworkAttachment.setDnsResolverConfiguration ( null ) ; iface.setIpv4BootProtocol ( Ipv4BootProtocol.DHCP ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; address.setBootProtocol ( Ipv4BootProtocol.DHCP ) ; testedNetworkAttachment.getIpConfiguration ( ) . setIPv4Addresses ( java.util.Collections.singletonList ( address ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( true , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
private void Preset_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.DiskImageBase preset = ( ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) != null ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) : ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.DiskImageBase > FirstOrDefault ( getPreset ( ) . getItems ( ) ) ) ) ; setVolumeFormat ( preset.getvolume_format ( ) ) ; getVolumeType ( ) . setSelectedItem ( preset.getvolume_type ( ) ) ; }

Target:
private void Preset_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.DiskImageBase preset = ( ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) != null ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) : ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.DiskImageBase > FirstOrDefault ( getPreset ( ) . getItems ( ) ) ) ) ; setVolumeFormat ( preset.getVolumeFormat ( ) ) ; getVolumeType ( ) . setSelectedItem ( preset.getVolumeType ( ) ) ; }
Source:
public void getClusterFeaturesByClusterId ( 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 ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.job.Job getJob ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.action.VdcActionType actionType ) { org.ovirt.engine.core.common.action.VdcActionParametersBase params = command.getParameters ( ) ; org.ovirt.engine.core.common.job.Job job ; if ( ( params.getJobId ( ) ) != null ) { job = jobDao.get ( params.getJobId ( ) ) ; } else { job = org.ovirt.engine.core.bll.job.ExecutionHandler.createJob ( actionType , command ) ; jobRepository.saveJob ( job ) ; } return job ; }

Target:
private org.ovirt.engine.core.common.job.Job getJob ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.action.ActionType actionType ) { org.ovirt.engine.core.common.action.VdcActionParametersBase params = command.getParameters ( ) ; org.ovirt.engine.core.common.job.Job job ; if ( ( params.getJobId ( ) ) != null ) { job = jobDao.get ( params.getJobId ( ) ) ; } else { job = org.ovirt.engine.core.bll.job.ExecutionHandler.createJob ( actionType , command ) ; jobRepository.saveJob ( job ) ; } return job ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.common.vdscommands.VdsAndVmIDVDSParametersBase ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.getVm ( ) . getRunOnVds ( ) , org.ovirt.engine.core.bll.CancelMigrateVmCommand.getParameters ( ) . getVmId ( ) ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.getVm ( ) . getRunOnVds ( ) , org.ovirt.engine.core.bll.CancelMigrateVmCommand.getParameters ( ) . getVmId ( ) , false ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; networkAttachment.setHostNetworkQos ( hostNetworkQos ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; return networkAttachment ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.network.HostNetworkQos hostNetworkQos ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; networkAttachment.setHostNetworkQos ( org.ovirt.engine.core.common.businessentities.network.AnonymousHostNetworkQos.fromHostNetworkQos ( hostNetworkQos ) ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; return networkAttachment ; }
Source:
public static void getDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public void qosNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( null ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNic ( "eth0" , null , null , network.getName ( ) ) ; org.mockito.Mockito.when ( qosDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( createQos ( ) ) ; qos ( network , iface , null , false ) ; }

Target:
private void qos ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.NetworkQoS expectedQos ) { qos ( network , iface , expectedQos , false ) ; }
Source:
private void addStatistics ( org.ovirt.engine.api.model.HostNIC model , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
private void addStatistics ( org.ovirt.engine.api.model.HostNic model , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }
Source:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getStorageGuidSet ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > destImageDomains = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : diskInfoDestinationMap.values ( ) ) { destImageDomains.add ( diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return destImageDomains ; }

Target:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getStorageGuidSet ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > destImageDomains = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : diskInfoDestinationMap.values ( ) ) { destImageDomains.add ( diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return destImageDomains ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult passwordNotEmpty ( boolean addPending , org.ovirt.engine.core.common.action.VdsOperationActionParameters.AuthenticationMethod authMethod , java.lang.String password ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_CANNOT_INSTALL_EMPTY_PASSWORD ) . when ( ( ( ( ! addPending ) && ( authMethod == ( org.ovirt.engine.core.common.action.VdsOperationActionParameters.AuthenticationMethod.Password ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( password ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult passwordNotEmpty ( boolean addPending , org.ovirt.engine.core.common.action.VdsOperationActionParameters.AuthenticationMethod authMethod , java.lang.String password ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_CANNOT_INSTALL_EMPTY_PASSWORD ) . when ( ( ( ( ! addPending ) && ( authMethod == ( org.ovirt.engine.core.common.action.VdsOperationActionParameters.AuthenticationMethod.Password ) ) ) && ( org.apache.commons.lang.StringUtils.isEmpty ( password ) ) ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricksToRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( GUIDS [ 0 ] ) ; brick.setVolumeId ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.volumeId ) ; bricks.add ( brick ) ; return bricks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricksToRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( ) ; brick.setId ( GUIDS [ 0 ] ) ; brick.setVolumeId ( org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId ) ; bricks.add ( brick ) ; return bricks ; }
Source:
private boolean networkExists ( ) { return org.ovirt.engine.core.common.businessentities.Entities.entitiesByName ( getNetworkDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ) . containsKey ( getNetworkName ( ) ) ; }

Target:
private boolean networkExists ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network_cluster > networks = org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getNetworkClusterDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.getVdsGroupId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network_cluster network_cluster : networks ) { if ( network_cluster.getnetwork_id ( ) . equals ( getNetwork ( ) . getId ( ) ) ) { return true ; } } return false ; }
Source:
public boolean validate ( ) { if ( ! ( getIsAvailable ( ) ) ) { return true ; } getCpuLimit ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation ( 0 , ( ( java.lang.Integer ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.MaxCpuLimitQosValue ) ) ) ) } ) ; setIsValid ( getCpuLimit ( ) . getIsValid ( ) ) ; return getIsValid ( ) ; }

Target:
public boolean validate ( ) { if ( ! ( getIsAvailable ( ) ) ) { return true ; } getCpuLimit ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation ( 0 , ( ( java.lang.Integer ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigValues.MaxCpuLimitQosValue ) ) ) ) } ) ; setIsValid ( getCpuLimit ( ) . getIsValid ( ) ) ; return getIsValid ( ) ; }
Source:
private java.lang.String getJsession ( ) { if ( ( ( this . pool.getCookies ( ) ) != null ) && ( ! ( this . pool.getCookies ( ) . isEmpty ( ) ) ) ) { for ( org.apache.http.cookie.Cookie cookie : this . pool.getCookies ( ) ) { if ( cookie.getName ( ) . equals ( org.ovirt.engine.sdk.web.HttpProxy.JSESSIONID ) ) { return cookie.getValue ( ) ; } } } return null ; }

Target:
public void setSessionid ( java.lang.String sessionid ) { this . sessionid = sessionid ; }
Source:
public void testRefreshStatusNoSessions ( ) { org.mockito.Mockito.doReturn ( getSessionDetailsVDSReturnVal ( false ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepSessionStatus ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.refreshGeoRepSessionStatus ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 0 ) ) . saveOrUpdateDetailsInBatch ( org.mockito.ArgumentMatchers.any ( java.util.List.class ) ) ; }

Target:
public void testRefreshStatusNoSessions ( ) { org.mockito.Mockito.doReturn ( getSessionDetailsVDSReturnVal ( false ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepSessionStatus ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.refreshGeoRepSessionStatus ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 0 ) ) . saveOrUpdateDetailsInBatch ( org.mockito.ArgumentMatchers.anyList ( ) ) ; }
Source:
public static void IsMTUOverrideSupported ( 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 tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
private static void GetVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParanet , new org.ovirt.engine.core.common.queries.GetAllChildVlanInterfacesQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
public void removeRepoDomainFileList ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.ImageFileType fileType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , id ) ; if ( ( fileType == null ) || ( fileType == ( org.ovirt.engine.core.common.businessentities.ImageFileType.All ) ) ) { parameterSource.addValue ( "file_type" , null ) ; } else { parameterSource.addValue ( "file_type" , fileType.getValue ( ) ) ; } getCallsHandler ( ) . executeModification ( "DeleteRepo_domain_file_list" , parameterSource ) ; }

Target:
public void removeRepoDomainFileList ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.storage.ImageFileType fileType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , id ) ; if ( ( fileType == null ) || ( fileType == ( org.ovirt.engine.core.common.businessentities.storage.ImageFileType.All ) ) ) { parameterSource.addValue ( "file_type" , null ) ; } else { parameterSource.addValue ( "file_type" , fileType.getValue ( ) ) ; } getCallsHandler ( ) . executeModification ( "DeleteRepo_domain_file_list" , parameterSource ) ; }
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.action.hostdeploy.UpdateVdsActionParameters createParameters ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters parameters = new org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters ( ) ; parameters.setvds ( host ) ; parameters.setVdsId ( host.getId ( ) ) ; parameters.setAuthMethod ( AuthenticationMethod.PublicKey ) ; parameters.setPassword ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.PASSWORD ) ; parameters.setHostedEngineDeployConfiguration ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOSTED_ENGINE_DEPLOY_CONFIGURATION ) ; return parameters ; }
Source:
protected java.lang.String getSearchPattern ( java.lang.String username , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , org.ovirt.engine.core.common.businessentities.DbUser.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceBase.AD_SEARCH_TEMPLATE , ( ( parent ) != null ? parent.getDirectory ( ) . getName ( ) : domain ) ) ) ; sb.append ( ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( constraint ) ? "allnames=" + username : constraint ) ) ; return sb.toString ( ) ; }

Target:
protected java.lang.String getSearchPattern ( java.lang.String username , java.lang.String domain ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , org.ovirt.engine.core.common.businessentities.DbUser.class , false ) ; final java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceBase.AD_SEARCH_TEMPLATE , ( ( parent ) != null ? parent.getDirectory ( ) . getName ( ) : domain ) ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=" + username : constraint ) ) ; return sb.toString ( ) ; }
Source:
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 ( ) ; }

Target:
private void setFinalStatic ( java.lang.reflect.Field field , java.lang.Object newValue ) throws java.lang.Exception { field.setAccessible ( true ) ; java.lang.reflect.Field modifiersField = java.lang.reflect.Field.class . getDeclaredField ( "modifiers" ) ; modifiersField.setAccessible ( true ) ; modifiersField.setInt ( field , ( ( field.getModifiers ( ) ) & ( ~ ( java.lang.reflect.Modifier.FINAL ) ) ) ) ; field.set ( null , newValue ) ; }
Source:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { runQueryByIdParameter ( VdcQueryType.IsClusterEmpty , aQuery , clusterId ) ; }
Source:
public void oneDiskImagesDoesntExist ( ) { org.mockito.Mockito.doReturn ( false ) . when ( baseDiskDao ) . exists ( disk1 ) ; org.mockito.Mockito.doReturn ( true ) . when ( baseDiskDao ) . exists ( disk2 ) ; org.junit.Assert.assertThat ( diskExistenceValidator.diskImagesNotExist ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST , ( "$diskIds " + ( disk1.toString ( ) ) ) ) ) ; }

Target:
public void oneDiskImagesDoesntExist ( ) { org.mockito.Mockito.doReturn ( false ) . when ( baseDiskDao ) . exists ( disk1 ) ; org.mockito.Mockito.doReturn ( true ) . when ( baseDiskDao ) . exists ( disk2 ) ; org.junit.Assert.assertThat ( diskExistenceValidator.disksNotExist ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST , ( "$diskIds " + ( disk1.toString ( ) ) ) ) ) ; }
Source:
public static org.ovirt.engine.api.model.StorageDomainType map ( org.ovirt.engine.api.model.StorageDomainType storageDomainType , org.ovirt.engine.api.model.StorageDomainType template ) { switch ( storageDomainType ) { case DATA : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case ISO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case EXPORT : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case IMAGE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.StorageDomainType map ( org.ovirt.engine.api.model.StorageDomainType storageDomainType , org.ovirt.engine.api.model.StorageDomainType template ) { switch ( storageDomainType ) { case DATA : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case ISO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case EXPORT : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case IMAGE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; case VOLUME : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageDomainType ; default : return null ; } }
Source:
private void setVmWatchdogToParams ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParams ) { org.ovirt.engine.core.common.businessentities.VmWatchdogType wdModel = model.getWatchdogModel ( ) . getSelectedItem ( ) ; updateVmParams.setUpdateWatchdog ( true ) ; if ( wdModel != null ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = new org.ovirt.engine.core.common.businessentities.VmWatchdog ( ) ; vmWatchdog.setAction ( model.getWatchdogAction ( ) . getSelectedItem ( ) ) ; vmWatchdog.setModel ( wdModel ) ; updateVmParams.setWatchdog ( vmWatchdog ) ; } }

Target:
protected void executeDiskModifications ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getcurrentVm ( ) . setId ( vmId ) ; model.getInstanceImages ( ) . executeDiskModifications ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getcurrentVm ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > uniteAgents ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > vdsMap = getVdsMap ( vdsList ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > results = new java.util.ArrayList < > ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > entry : vdsMap.entrySet ( ) ) { results.add ( uniteAgentsSingleVds ( entry.getValue ( ) ) ) ; } return results ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForStoragePoolAndStatus ( org.ovirt.engine.core.compat.Guid storagePool , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return getAllForStoragePoolAndStatuses ( storagePool , ( status != null ? java.util.EnumSet.of ( status ) : null ) ) ; }
Source:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ) ; }

Target:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) ; if ( ( selectedStorage != null ) && ( getIsNew ( ) ) ) { setDefaultVolumeType ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.CommandBase < ? > retrieveCommand ( org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.bll.CommandBase < ? > command = null ; org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = commandsCache.get ( commandId ) ; if ( cmdEntity != null ) { command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( cmdEntity.getCommandType ( ) , cmdEntity.getActionParameters ( ) ) ; } return command ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.CommandEntity > getCommandsWithCallBackEnabled ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.CommandEntity > cmdEntities = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ; for ( org.ovirt.engine.core.compat.Guid cmdId : commandsCache.keySet ( ) ) { cmdEntity = commandsCache.get ( cmdId ) ; if ( commandsCache.get ( cmdId ) . isCallBackEnabled ( ) ) { cmdEntities.add ( cmdEntity ) ; } } return cmdEntities ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = resourcesWithLookup.getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) { resource = resourcesWithLookup.otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.AbstractMaskedVmImageColumn.resourcesWithLookup.getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.AbstractMaskedVmImageColumn.resourcesWithLookup.otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }
Source:
protected void executeVmCommand ( ) { if ( diskShouldBeUnPlugged ( ) ) { performPlugCommnad ( VDSCommandType.HotUnPlugDisk , disk , vmDevice ) ; } org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVmDeviceDao ( ) . remove ( vmDevice.getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDeviceAndStoreToDB ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.bll.DetachDiskFromVmCommand.setSucceeded ( true ) ; }

Target:
protected void executeVmCommand ( ) { if ( diskShouldBeUnPlugged ( ) ) { performPlugCommand ( VDSCommandType.HotUnPlugDisk , disk , vmDevice ) ; } org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVmDeviceDao ( ) . remove ( vmDevice.getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDeviceAndStoreToDB ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.bll.DetachDiskFromVmCommand.setSucceeded ( true ) ; }
Source:
protected org.ovirt.engine.api.model.Storage lookupStorage ( java.lang.String id ) { for ( org.ovirt.engine.core.common.businessentities.LUNs lun : getLogicalUnits ( ) ) { if ( lun.getLUN_id ( ) . equals ( id ) ) { return addLinks ( map ( lun ) ) ; } } for ( org.ovirt.engine.core.common.businessentities.storage_domains vg : getVolumeGroups ( ) ) { if ( vg.getstorage ( ) . equals ( id ) ) { return addLinks ( map ( vg ) ) ; } } return notFound ( ) ; }

Target:
protected org.ovirt.engine.api.model.Storage lookupStorage ( java.lang.String id ) { for ( org.ovirt.engine.core.common.businessentities.LUNs lun : getLogicalUnits ( ) ) { if ( lun.getLUN_id ( ) . equals ( id ) ) { return addLinks ( map ( lun ) ) ; } } for ( org.ovirt.engine.api.restapi.resource.StorageDomain vg : getVolumeGroups ( ) ) { if ( vg.getstorage ( ) . equals ( id ) ) { return addLinks ( map ( vg ) ) ; } } return notFound ( ) ; }
Source:
private void verifyCPU ( org.ovirt.engine.api.model.CPU cpu , java.lang.String name , java.lang.Integer level ) { assertNotNull ( cpu ) ; assertEquals ( name , cpu.getId ( ) ) ; assertEquals ( level , cpu.getLevel ( ) ) ; }

Target:
private void verifyPowerManagement ( org.ovirt.engine.api.model.Agent agent ) { assertNotNull ( agent ) ; assertEquals ( "foo" , agent.getType ( ) ) ; assertEquals ( 2 , agent.getOptions ( ) . getOptions ( ) . size ( ) ) ; verifyOption ( agent.getOptions ( ) . getOptions ( ) . get ( 0 ) , "one" , "int" ) ; verifyOption ( agent.getOptions ( ) . getOptions ( ) . get ( 1 ) , "two" , "bool" ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < java.lang.String > pmTypes = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; updatePmTypeList ( pmTypes , getPmType ( ) ) ; updatePmTypeList ( pmTypes , getPmSecondaryType ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmSecondaryPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSecondarySlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecondarySecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }
Source:
private void initStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( storageDomainId ) ; storageDomain.setStoragePoolId ( storagePoolId ) ; org.mockito.Mockito.when ( storageDomainDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.getForStoragePool ( storageDomainId , storagePoolId ) ) . thenReturn ( storageDomain ) ; }

Target:
private void initStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( storageDomainId ) ; storageDomain.setStoragePoolId ( storagePoolId ) ; org.mockito.Mockito.when ( storageDomainDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( storageDomain ) ; org.mockito.Mockito.when ( storageDomainDao.getForStoragePool ( storageDomainId , storagePoolId ) ) . thenReturn ( storageDomain ) ; }
Source:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation tempVar = new org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation ( ) ; tempVar.setMinimum ( 1 ) ; tempVar.setMaximum ( 100 ) ; getOverCommitTime ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar } ) ; return getOverCommitTime ( ) . getIsValid ( ) ; }

Target:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation tempVar = new org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation ( ) ; tempVar.setMinimum ( 1 ) ; tempVar.setMaximum ( 100 ) ; getOverCommitTime ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar } ) ; return getOverCommitTime ( ) . getIsValid ( ) ; }