auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.NetworkQosValidator validator = new org.ovirt.engine.core.bll.validator.NetworkQosValidator ( getNetworkQoS ( ) ) ; return ( ( ( validateParameters ( ) ) && ( validate ( validator.nameNotTakenInDc ( ) ) ) ) && ( validate ( validator.allValuesPresent ( ) ) ) ) && ( validate ( validator.peakConsistentWithAverage ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { return ( super . canDoAction ( ) ) && ( validate ( getQosValidator ( getQos ( ) ) . peakConsistentWithAverage ( ) ) ) ; }
Source:
protected boolean validateImagesAndVMStates ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , hasImages ( ) , hasImages ( ) , hasImages ( ) , hasImages ( ) , true , true , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ) ; }

Target:
protected boolean validateImages ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , true , true , true , true , true , true , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ) ; }
Source:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
protected void closeChannel ( ) { try { if ( ( this . channel ) != null ) { this . channel.close ( ) ; } } catch ( java.io.IOException e ) { } finally { this . channel = null ; } }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { if ( lock.tryLock ( ) ) { try { if ( ( channel ) != null ) { channel.close ( ) ; } } catch ( java.io.IOException e ) { } finally { channel = null ; lock.unlock ( ) ; } } else { scheduleTask ( this ) ; } return null ; }
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.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : - 1 ; }

Target:
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.storage.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }
Source:
private org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase getLoggableQuotaStorageParams ( java.lang.String quotaName , java.lang.Double storageUsagePercentage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "QuotaName" , quotaName ) ; logable.AddCustomValue ( "storageUsage" , storageUsagePercentage.toString ( ) ) ; return logable ; }

Target:
private org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase getLoggableQuotaStorageParams ( java.lang.String quotaName , double storageUsagePercentage , double storageRequestedPercentage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "QuotaName" , quotaName ) ; logable.AddCustomValue ( "CurrentStorage" , org.ovirt.engine.core.bll.quota.QuotaManager.percentageFormatter.format ( storageUsagePercentage ) ) ; logable.AddCustomValue ( "Requested" , org.ovirt.engine.core.bll.quota.QuotaManager.percentageFormatter.format ( storageRequestedPercentage ) ) ; return logable ; }
Source:
public void testCreatingImageIfNotSupplied ( ) { transferImageCommand.executeCommand ( ) ; org.mockito.Mockito.verify ( transferImageCommand , org.mockito.Mockito.times ( 1 ) ) . createImage ( ) ; org.mockito.Mockito.verify ( transferImageCommand , org.mockito.Mockito.never ( ) ) . handleImageIsReadyForTransfer ( org.mockito.Matchers.any ( ) ) ; }

Target:
public void testCreatingImageIfNotSupplied ( ) { transferImageCommand.executeCommand ( ) ; org.mockito.Mockito.verify ( transferImageCommand , org.mockito.Mockito.times ( 1 ) ) . createImage ( ) ; org.mockito.Mockito.verify ( transferImageCommand , org.mockito.Mockito.never ( ) ) . handleImageIsReadyForTransfer ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) { getGlusterHostAddress ( ) . setIsChangeable ( true ) ; getGlusterHostPassword ( ) . setIsChangeable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangeable ( false ) ; getGlusterHostPassword ( ) . setIsChangeable ( false ) ; } }

Target:
public void onSuccess ( java.lang.String fingerprint ) { if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( fingerprint ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }
Source:
public void executeCommand ( ) { setUpMocksForRemove ( ) ; mockBackend ( true , null ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.times ( 1 ) ) . remove ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_REMOVED , cmd.getAuditLogTypeValue ( ) ) ; }

Target:
public void executeCommand ( ) { setUpMocksForRemove ( ) ; mockBackend ( true , null ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.times ( 1 ) ) . remove ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_REMOVED , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( id , compatVersion , compatibilityVersion , cpuName , description , maxVdsMemoryOverCommit , countThreadsAsCores , migrateOnError , name , storagePoolId , storagePoolName , requiredSwitchTypeForCluster , transparentHugepages , virtService , glusterService , glusterCliBasedSchedulingOn , tunnelMigration , emulatedMachine , trustedService , haReservation , clusterPolicyName , clusterPolicyProperties , additionalRngSources , enableKsm , enableBallooning , optimizationType , serialNumberPolicy , customSerialNumber , clusterHostsAndVms , fencingPolicy , autoConverge , migrateCompressed , glusterTunedProfile , addtionalFeaturesSupported , maintenanceReasonRequired , ksmMergeAcrossNumaNodes , customMigrationNetworkBandwidth , migrationBandwidthLimitType , migrationPolicyId , macPoolId ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , compatVersion , compatibilityVersion , cpuName , description , maxVdsMemoryOverCommit , countThreadsAsCores , migrateOnError , name , storagePoolId , storagePoolName , requiredSwitchTypeForCluster , transparentHugepages , virtService , glusterService , glusterCliBasedSchedulingOn , tunnelMigration , emulatedMachine , trustedService , haReservation , clusterPolicyName , clusterPolicyProperties , additionalRngSources , enableKsm , enableBallooning , optimizationType , serialNumberPolicy , customSerialNumber , clusterHostsAndVms , fencingPolicy , autoConverge , migrateCompressed , glusterTunedProfile , addtionalFeaturesSupported , maintenanceReasonRequired , ksmMergeAcrossNumaNodes , customMigrationNetworkBandwidth , migrationBandwidthLimitType , migrationPolicyId , macPoolId , firewallType ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.AsyncTasks getAsyncTaskFromDb ( org.ovirt.engine.core.compat.Guid asyncTaskId ) { org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( asyncTask != null ) { copyFromCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ; } return asyncTask ; }

Target:
public void removeAllCommandsInHierarchy ( final org.ovirt.engine.core.compat.Guid commandId ) { for ( org.ovirt.engine.core.compat.Guid childCmdId : getChildCommandIds ( commandId ) ) { removeAllCommandsInHierarchy ( childCmdId ) ; } removeCommand ( commandId ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { if ( returnValue != null ) { java.util.Set < java.lang.String > emulatedSet = new java.util.TreeSet < java.lang.String > ( ( ( java.util.HashSet < java.lang.String > ) ( returnValue ) ) ) ; emulatedSet.add ( "" ) ; java.lang.String oldVal = getModel ( ) . getEmulatedMachine ( ) . getSelectedItem ( ) ; getModel ( ) . getEmulatedMachine ( ) . setItems ( emulatedSet ) ; getModel ( ) . getEmulatedMachine ( ) . setSelectedItem ( oldVal ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { 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.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterVolumeSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCreateSnapshotCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditSnapshotScheduleCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksDummiesForStorageAllocations ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > originalDisks ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskDummies = new java.util.ArrayList ( originalDisks.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : originalDisks ) { org.ovirt.engine.core.common.businessentities.DiskImage clone = org.ovirt.engine.core.common.businessentities.DiskImage.copyOf ( diskImage ) ; clone.setVolumeType ( VolumeType.Sparse ) ; clone.setvolumeFormat ( VolumeFormat.COW ) ; diskDummies.add ( clone ) ; } return diskDummies ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksDummiesForStorageAllocations ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > originalDisks ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskDummies = new java.util.ArrayList ( originalDisks.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : originalDisks ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage clone = org.ovirt.engine.core.common.businessentities.storage.DiskImage.copyOf ( diskImage ) ; clone.setVolumeType ( VolumeType.Sparse ) ; clone.setvolumeFormat ( VolumeFormat.COW ) ; diskDummies.add ( clone ) ; } return diskDummies ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getLunVendorIdColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( object ) ) . getLun ( ) . getVendorId ( ) : null ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getLunVendorIdColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ? ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( object ) ) . getLun ( ) . getVendorId ( ) : null ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
public static void cancelRecoveryJob ( org.ovirt.engine.core.compat.Guid vdsId ) { java.lang.String jobId = org.ovirt.engine.core.vdsbroker.VdsManager.recoveringJobIdMap.remove ( vdsId ) ; if ( jobId != null ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Cancelling the recovery from crash timer for VDS {0} because vds started initializing" , vdsId ) ; try { org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( jobId ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.warnFormat ( "Failed deleting job {0} at cancelRecoveryJob" , jobId ) ; } } }

Target:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( vmsMonitoringJobId ) ; vdsProxy.close ( ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getDbFacade ( ) . getVmDao ( ) . getAllForUserWithGroupsAndUserRoles ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getUserID ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { updateVmGuestAgentVersion ( vm ) ; if ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getIncludeDiskData ( ) ) { updateDisksFromDB ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.ImagesComparerByName ( ) ) ; fillImagesBySnapshots ( vm ) ; } } setReturnValue ( vmList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getDbFacade ( ) . getVmDao ( ) . getAllForUserWithGroupsAndUserRoles ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getUserID ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { updateVmGuestAgentVersion ( vm ) ; if ( org.ovirt.engine.core.bll.GetUserVmsByUserIdAndGroupsQuery.getParameters ( ) . getIncludeDiskData ( ) ) { updateDisksFromDB ( vm ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.comparators.ImagesComparerByName ( ) ) ; fillImagesBySnapshots ( vm ) ; } } setReturnValue ( vmList ) ; }
Source:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap widgetConfiguration = super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( templateVersionNameEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; updateOrAddToWidgetConfiguration ( widgetConfiguration , detachableWidgets ( ) , UpdateToDetachable.INSTANCE ) ; updateOrAddToWidgetConfiguration ( widgetConfiguration , adminOnlyWidgets ( ) , UpdateToAdminOnly.INSTANCE ) ; return widgetConfiguration ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap widgetConfiguration = super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( baseTemplateEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( templateVersionNameEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( instanceImagesEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField ( ) ) ; updateOrAddToWidgetConfiguration ( widgetConfiguration , detachableWidgets ( ) , UpdateToDetachable.INSTANCE ) ; updateOrAddToWidgetConfiguration ( widgetConfiguration , adminOnlyWidgets ( ) , UpdateToAdminOnly.INSTANCE ) ; return widgetConfiguration ; }
Source:
private void runOnce ( ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel selectedItem = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( getSelectedItem ( ) ) ) ; if ( ( selectedItem == null ) || ( ( selectedItem.getEntity ( ) ) == null ) ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( selectedItem.getEntity ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalRunOnceModel ( vm , getCustomPropertiesKeysList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( model ) ; model.init ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , getCustomPropertiesKeysList ( ) . get ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) . getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; }
Source:
public static boolean isDomainsReportedAsProblematic ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.List < org.ovirt.engine.core.common.businessentities.VDSDomainsData > vdsDomainsData ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData proxy = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( storagePoolId ) ; if ( proxy != null ) { return proxy.isDomainsReportedAsProblematic ( vdsDomainsData ) ; } return false ; }

Target:
public static java.util.List < org.ovirt.engine.core.compat.Guid > fetchDomainsReportedAsProblematic ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.List < org.ovirt.engine.core.common.businessentities.VDSDomainsData > vdsDomainsData ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData proxy = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( storagePoolId ) ; if ( proxy != null ) { return proxy.checkIfDomainsReportedAsProblematic ( vdsDomainsData ) ; } return java.util.Collections.emptyList ( ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { boolean detachOnly = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendDiskAttachmentResource.DETACH_ONLY , true , true ) ; if ( detachOnly ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( guid , vmId ) ) ) ; } else { return performAction ( VdcActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guid ) ) ; } }

Target:
public javax.ws.rs.core.Response remove ( ) { boolean detachOnly = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendDiskAttachmentResource.DETACH_ONLY , true , true ) ; if ( detachOnly ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( guid , vmId ) ) ) ; } else { return performAction ( VdcActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guid ) ) ; } }
Source:
protected void MarkImageAsIllegal ( ) { org.ovirt.engine.core.bll.BaseImagesCommand.SetImageStatus ( ( org.ovirt.engine.core.bll.BaseImagesCommand.getParameters ( ) . isImportEntity ( ) ? getDestinationDiskImage ( ) : getDiskImage ( ) ) , ImageStatus.ILLEGAL ) ; }

Target:
protected void setImageStatus ( org.ovirt.engine.core.common.businessentities.ImageStatus imageStatus ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( org.ovirt.engine.core.bll.BaseImagesCommand.getParameters ( ) . isImportEntity ( ) ) ? getDestinationDiskImage ( ) : getDiskImage ( ) ; diskImage.setimageStatus ( imageStatus ) ; getImageDao ( ) . update ( diskImage.getImage ( ) ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskDummiesForMemSize = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) , org.ovirt.engine.core.bll.HibernateVmCommand.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , diskDummiesForMemSize ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskDummiesForMemSize = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , diskDummiesForMemSize ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { java.util.ArrayList < java.lang.String > networkList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : importModel.getNetworks ( ) ) { networkList.add ( network.getName ( ) ) ; } ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( networkList ) ; return networkList.isEmpty ( ) ? "" : networkList.get ( 0 ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { java.util.ArrayList < java.lang.String > networkList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView network : importModel.getNetworkProfiles ( ) ) { networkList.add ( network.getName ( ) ) ; } ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( networkList ) ; return networkList.isEmpty ( ) ? "" : networkList.get ( 0 ) ; }
Source:
public void ValidateSpaceNotWithinThreshold ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > command = setupCanAddVmTests ( 0 , 0 ) ; storageDomainValidator = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.class ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN ) ) . when ( storageDomainValidator ) . isDomainWithinThresholds ( ) ; org.mockito.Mockito.doReturn ( storageDomainValidator ) . when ( command ) . createStorageDomainValidator ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ; junit.framework.Assert.assertFalse ( command.validateSpaceRequirements ( ) ) ; }

Target:
public void validateSpaceNotWithinThreshold ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > command = setupCanAddVmTests ( 0 , 0 ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN ) ) . when ( storageDomainValidator ) . isDomainWithinThresholds ( ) ; org.mockito.Mockito.doReturn ( storageDomainValidator ) . when ( command ) . createStorageDomainValidator ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ; junit.framework.Assert.assertFalse ( command.validateSpaceRequirements ( ) ) ; }
Source:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { initTemplate ( ) ; super . initialize ( systemTreeSelectedItem ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( pool.getVmPoolSpiceProxy ( ) ) ) ) { getModel ( ) . getSpiceProxyEnabled ( ) . setEntity ( true ) ; getModel ( ) . getSpiceProxy ( ) . setEntity ( pool.getVmPoolSpiceProxy ( ) ) ; getModel ( ) . getSpiceProxy ( ) . setIsChangable ( true ) ; } }

Target:
public void initialize ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel systemTreeSelectedItem ) { initTemplate ( ) ; super . initialize ( systemTreeSelectedItem ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( pool.getVmPoolSpiceProxy ( ) ) ) ) { getModel ( ) . getSpiceProxyEnabled ( ) . setEntity ( true ) ; getModel ( ) . getSpiceProxy ( ) . setEntity ( pool.getVmPoolSpiceProxy ( ) ) ; getModel ( ) . getSpiceProxy ( ) . setIsChangable ( true ) ; } instanceTypeManager = new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.ExistingPoolInstanceTypeManager ( getModel ( ) , pool ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . StopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; } }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateParametersBase.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
public void testGetWithConsoleNotSet ( ) throws java.lang.Exception { testGetConsoleAware ( false ) ; }
Source:
public void postDisplayTypeItemChanged ( org.ovirt.engine.core.common.businessentities.DisplayType oldDisplayProtocolOption ) { java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > displayProtocolOptions = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DisplayType > ( ) ; if ( ( getModel ( ) . getDisplayProtocol ( ) . getItems ( ) ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.DisplayType > item : getModel ( ) . getDisplayProtocol ( ) . getItems ( ) ) { displayProtocolOptions.add ( item.getEntity ( ) ) ; } } if ( ( oldDisplayProtocolOption != null ) && ( displayProtocolOptions.contains ( oldDisplayProtocolOption ) ) ) { selectDisplayProtocol ( oldDisplayProtocolOption ) ; } }

Target:
protected void initPriority ( int priority ) { priorityUtil.initPriority ( priority ) ; }
Source:
public void testNotRemovingLabeledNetworksLabelRemovedFromNicValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithLabel = createNic ( "nicWithLabel" ) ; nicWithLabel.setLabels ( java.util.Collections.singleton ( "lbl1" ) ) ; org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithNameAndLabel ( "net" , "lbl1" ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment = createNetworkAttachment ( network , nicWithLabel ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.getRemovedLabels ( ) . add ( "lbl1" ) ; assertTestNotRemovingLabeledNetworksValid ( nicWithLabel , removedAttachment , params , network ) ; }

Target:
public void testNotRemovingLabeledNetworksLabelRemovedFromNicValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicWithLabel = createNic ( "nicWithLabel" ) ; final java.lang.String labelName = "lbl1" ; nicWithLabel.setLabels ( java.util.Collections.singleton ( labelName ) ) ; org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithNameAndLabel ( "net" , labelName ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment = createNetworkAttachment ( network , nicWithLabel ) ; assertTestNotRemovingLabeledNetworksValid ( nicWithLabel , removedAttachment , new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addRemovedLabels ( labelName ) . build ( ) , network ) ; }
Source:
private boolean isNewerVersion ( org.ovirt.engine.core.compat.Version isoClusterVersion ) { org.ovirt.engine.core.common.businessentities.VDS vds = getVdsByVdsId ( org.ovirt.engine.core.bll.GetoVirtISOsQuery.getParameters ( ) . getVdsId ( ) ) ; org.ovirt.engine.core.compat.Version vdsClusterVersion = vds.getVdsGroupCompatibilityVersion ( ) ; return ( ( vdsClusterVersion.getMajor ( ) ) == ( isoClusterVersion.getMajor ( ) ) ) && ( ( vdsClusterVersion.getMinor ( ) ) <= ( isoClusterVersion.getMinor ( ) ) ) ; }

Target:
private boolean isNewerVersion ( org.ovirt.engine.core.compat.Version isoClusterVersion ) { org.ovirt.engine.core.common.businessentities.VDS vds = getVdsByVdsId ( org.ovirt.engine.core.bll.GetoVirtISOsQuery.getParameters ( ) . getVdsId ( ) ) ; org.ovirt.engine.core.compat.Version vdsClusterVersion = vds.getVdsGroupCompatibilityVersion ( ) ; log.debugFormat ( "vdsClusterVersion {0} isoClusterVersion {1}" , vdsClusterVersion , isoClusterVersion ) ; return ( ( vdsClusterVersion.getMajor ( ) ) == ( isoClusterVersion.getMajor ( ) ) ) && ( ( vdsClusterVersion.getMinor ( ) ) <= ( isoClusterVersion.getMinor ( ) ) ) ; }
Source:
public void init ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostNicModel model ) { super . init ( model ) ; if ( ( model.getVfsConfigModel ( ) ) != null ) { if ( ( model.getInterface ( ) . getBondName ( ) ) == null ) { getView ( ) . showTabs ( ) ; } else { getView ( ) . showOnlyVfsConfig ( ) ; } } else { getView ( ) . showOnlyPf ( ) ; } }

Target:
public void init ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostNicModel model ) { if ( ( model.getVfsConfigModel ( ) ) != ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostNicModel.EMPTY_VFS_CONFIG_MODEL ) ) { if ( ( model.getInterface ( ) . getBondName ( ) ) == null ) { getView ( ) . showTabs ( ) ; } else { getView ( ) . showOnlyVfsConfig ( ) ; } } else { getView ( ) . showOnlyPf ( ) ; } super . init ( model ) ; }
Source:
public void testRemove ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetVmHostDevicesExpectations ( ) ; setUpActionExpectations ( VdcActionType.RemoveVmHostDevices , org.ovirt.engine.core.common.action.VmHostDevicesParameters.class , new java.lang.String [ ] { "VmId" , "DeviceNames" } , new java.lang.Object [ ] { VM_ID , java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.DEVICE_NAME ) } , true , true ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetVmHostDevicesExpectations ( ) ; setUpActionExpectations ( VdcActionType.RemoveVmHostDevices , org.ovirt.engine.core.common.action.VmHostDevicesParameters.class , new java.lang.String [ ] { "VmId" , "DeviceNames" } , new java.lang.Object [ ] { VM_ID , java.util.Collections.singletonList ( org.ovirt.engine.api.restapi.resource.DEVICE_NAME ) } , true , true ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public void getDefaultSpmPriority ( 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.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc glusterVolumeSnapshotConfigGet ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue ; if ( volumeName == null ) { xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet ( "" ) ; } else { xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet ( volumeName ) ; } org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc glusterSnapshotConfigList ( org.ovirt.engine.core.compat.Guid clusterId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue ; xmlRpcReturnValue = vdsServer.glusterSnapshotConfigList ( ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotConfigReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : allIfaces ) { if ( ( ( i.getVlanId ( ) ) != null ) && ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( i.getName ( ) , iface.getName ( ) ) ) ) { return true ; } } return false ; }

Target:
public static boolean interfaceHasVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allIfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : allIfaces ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( i ) ) && ( org.ovirt.engine.core.utils.NetworkUtils.interfaceBasedOn ( i.getName ( ) , iface.getName ( ) ) ) ) { return true ; } } return false ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean isAutoAssign = object.getIsAutoAssign ( ) . getEntity ( ) ; defaultHostEditor.setEnabled ( ( ! isAutoAssign ) ) ; specificHost.setValue ( ( ! isAutoAssign ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { boolean isAutoAssign = object.getIsAutoAssign ( ) . getEntity ( ) ; defaultHostEditor.setEnabled ( ( ! isAutoAssign ) ) ; specificHost.setValue ( ( ! isAutoAssign ) ) ; }
Source:
private void updateUserAuthFields ( ) { getUserName ( ) . setIsValid ( true ) ; getUserName ( ) . setIsChangable ( getUseUserAuth ( ) . getEntity ( ) ) ; getPassword ( ) . setIsValid ( true ) ; getPassword ( ) . setIsChangable ( getUseUserAuth ( ) . getEntity ( ) ) ; }

Target:
private void updateUserAuthFields ( ) { getUserName ( ) . setIsValid ( true ) ; getUserName ( ) . setIsChangeable ( getUseUserAuth ( ) . getEntity ( ) ) ; getPassword ( ) . setIsValid ( true ) ; getPassword ( ) . setIsChangeable ( getUseUserAuth ( ) . getEntity ( ) ) ; }