auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void updatePriority ( ) { if ( ( cachedMaxPriority ) == null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxVmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( model , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { cachedMaxPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; postUpdatePriority ( ) ; } } ) ) ; } else { postUpdatePriority ( ) ; } }

Target:
private void updatePriority ( final org.ovirt.engine.ui.uicommonweb.models.vms.PriorityUtil.PriorityUpdatingCallbacks callbacks ) { if ( ( cachedMaxPriority ) == null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxVmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( model , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { cachedMaxPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; postUpdatePriority ( callbacks ) ; } } ) ) ; } else { postUpdatePriority ( callbacks ) ; } }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > getStorageDomainsDisjoint ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains ) { java.util.ArrayList < java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > > storageDomainslists = new java.util.ArrayList < java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel : disks ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > list = org.ovirt.engine.ui.uicommonweb.Linq.getStorageDomainsByIds ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskModel.getDisk ( ) ) ) . getstorage_ids ( ) , storageDomains ) ; storageDomainslists.add ( list ) ; } return org.ovirt.engine.ui.uicommonweb.Linq.Intersection ( storageDomainslists ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomainsDisjoint ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.ArrayList < java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > > storageDomainslists = new java.util.ArrayList < java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel : disks ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > list = org.ovirt.engine.ui.uicommonweb.Linq.getStorageDomainsByIds ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskModel.getDisk ( ) ) ) . getStorageIds ( ) , storageDomains ) ; storageDomainslists.add ( list ) ; } return org.ovirt.engine.ui.uicommonweb.Linq.Intersection ( storageDomainslists ) ; }
Source:
void initListBoxEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.compat.RpmVersion > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.compat.RpmVersion > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.compat.RpmVersion version ) { return version.getRpmName ( ) ; } } ) ; rbPassword = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; rbPublicKey = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; publicKeyEditor = new org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor ( ) ; }

Target:
void initEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.compat.RpmVersion > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.compat.RpmVersion > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.compat.RpmVersion version ) { return version.getRpmName ( ) ; } } ) ; rbPassword = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; rbPublicKey = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; publicKeyEditor = new org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor ( ) ; activateHostAfterInstallEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; overrideIpTablesEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }
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 ) ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > > aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SortListByNameConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void ResetInternal ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel root ) { root.setSelection ( false ) ; for ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel item : root.getChildren ( ) ) { ResetInternal ( item ) ; } }

Target:
private void reset ( ) { setSelectedItems ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ) ; if ( ( getItems ( ) ) != null ) { for ( java.lang.Object item : getItems ( ) ) { resetInternal ( ( ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel ) ( item ) ) ) ; } } getResetRequestedEvent ( ) . raise ( this , EventArgs.Empty ) ; }
Source:
private static org.ovirt.engine.core.compat.Guid getNonPrestartedVmToAttach ( org.ovirt.engine.core.compat.NGuid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Down ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachNonPrestartedVmToUser ( map.getvm_guid ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
private org.ovirt.engine.core.compat.Guid getNonPrestartedVmToAttach ( org.ovirt.engine.core.compat.NGuid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDAO ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Down ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachNonPrestartedVmToUser ( map.getvm_guid ( ) ) ) { return map.getvm_guid ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
private org.ovirt.engine.api.model.Labels mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > networkLabels ) { org.ovirt.engine.api.model.Labels labels = new org.ovirt.engine.api.model.Labels ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel networkLabel : networkLabels ) { org.ovirt.engine.api.model.Label label = new org.ovirt.engine.api.model.Label ( ) ; label.setId ( networkLabel.getId ( ) ) ; labels.getLabels ( ) . add ( label ) ; addLinks ( label , org.ovirt.engine.api.model.HostNic.class ) ; } return labels ; }

Target:
private org.ovirt.engine.api.model.NetworkLabels mapCollection ( java.util.List < org.ovirt.engine.api.model.NetworkLabel > networkLabels ) { org.ovirt.engine.api.model.NetworkLabels labels = new org.ovirt.engine.api.model.NetworkLabels ( ) ; for ( org.ovirt.engine.api.model.NetworkLabel networkLabel : networkLabels ) { org.ovirt.engine.api.model.NetworkLabel label = new org.ovirt.engine.api.model.NetworkLabel ( ) ; label.setId ( networkLabel.getId ( ) ) ; labels.getNetworkLabels ( ) . add ( label ) ; addLinks ( label , org.ovirt.engine.api.model.HostNic.class ) ; } return labels ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.Network net ) { return createVdsInterface ( ( ( ( iface.getName ( ) ) + "." ) + ( net.getVlanId ( ) ) ) , false , null , null , NetworkBootProtocol.None , net.getName ( ) , net.getVlanId ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.Network net ) { return createVdsInterface ( ( ( ( iface.getName ( ) ) + "." ) + ( net.getVlanId ( ) ) ) , false , null , null , NetworkBootProtocol.NONE , net.getName ( ) , net.getVlanId ( ) ) ; }
Source:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
private void generateStorageToDisksMap ( org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > command ) { command.storageToDisksMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; command.storageToDisksMap.put ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 , generateDisksList ( org.ovirt.engine.core.bll.AddVmCommandTest.NUM_OF_DISKS_1 ) ) ; command.storageToDisksMap.put ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_2 , generateDisksList ( org.ovirt.engine.core.bll.AddVmCommandTest.NUM_OF_DISKS_2 ) ) ; }

Target:
protected void generateStorageToDisksMap ( org.ovirt.engine.core.bll.AddVmCommand < ? extends org.ovirt.engine.core.common.action.VmManagementParametersBase > command ) { command.storageToDisksMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; command.storageToDisksMap.put ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 , org.ovirt.engine.core.bll.AddVmCommandTest.generateDisksList ( org.ovirt.engine.core.bll.AddVmCommandTest.NUM_DISKS_STORAGE_DOMAIN_1 ) ) ; command.storageToDisksMap.put ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_2 , org.ovirt.engine.core.bll.AddVmCommandTest.generateDisksList ( org.ovirt.engine.core.bll.AddVmCommandTest.NUM_DISKS_STORAGE_DOMAIN_2 ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeBrickAdd ( volumeName , bricks , replicaCount , stripeCount ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc getVolumeInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmpRpcReturnValue = vdsServer.getVolumeInfo ( sdUUID , spUUID , imgUUID , volUUID ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc ( xmpRpcReturnValue ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected void addStyles ( ) { volumeTypeEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; replicaCountEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; stripeCountEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; }

Target:
protected void addStyles ( ) { volumeTypeEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; replicaCountEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; stripeCountEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; forceEditor.addContentWidgetStyleName ( style.forceEditorWidget ( ) ) ; }
Source:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.Storage ) ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain storage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.StoragePredicate ( storage.getId ( ) ) ) ) ; } }

Target:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.Storage ) ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain storage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StorageDomain > cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.StoragePredicate ( storage.getId ( ) ) ) ) ; } }
Source:
protected void moveOrCopyAllImageGroups ( org.ovirt.engine.core.compat.Guid containerID , java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalActionWithTasksContext ( VdcActionType.CopyImageGroup , buildMoveOrCopyImageGroupParametersForDisk ( disk , containerID ) ) ; if ( ! ( vdcRetValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcRetValue.getFault ( ) . getError ( ) , "ImportVmCommand::MoveOrCopyAllImageGroups: Failed to copy disk!" ) ; } getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } }

Target:
protected void moveOrCopyAllImageGroups ( org.ovirt.engine.core.compat.Guid containerID , java.lang.Iterable < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disks ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalActionWithTasksContext ( VdcActionType.CopyImageGroup , buildMoveOrCopyImageGroupParametersForDisk ( disk , containerID ) ) ; if ( ! ( vdcRetValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcRetValue.getFault ( ) . getError ( ) , "ImportVmCommand::MoveOrCopyAllImageGroups: Failed to copy disk!" ) ; } getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } }
Source:
public void vdsGroupWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }

Target:
public void vdsGroupWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }
Source:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private static void convertAAAProfilesResult ( 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 ) { java.util.List < java.lang.String > results = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.aaa.ProfileEntry profileEntry : ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) ) { results.add ( profileEntry.getProfile ( ) ) ; } return results ; } } ; }
Source:
public void multiQueryWithOddParams ( ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList ( java.util.Arrays.asList ( VdcQueryType.Search ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > queryParamsList = new java.util.ArrayList ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) ; underTest.runMultipleQueries ( queryTypeList , queryParamsList ) ; org.mockito.Mockito.verifyZeroInteractions ( backendLocal ) ; }

Target:
public void multiQueryWithOddParams ( ) { java.util.ArrayList < org.ovirt.engine.core.common.queries.QueryType > queryTypeList = new java.util.ArrayList ( java.util.Arrays.asList ( QueryType.Search ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > queryParamsList = new java.util.ArrayList ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) ; underTest.runMultipleQueries ( queryTypeList , queryParamsList ) ; org.mockito.Mockito.verifyZeroInteractions ( backendLocal ) ; }
Source:
private void InitCdImage ( ) { getModel ( ) . getCdImage ( ) . setSelectedItem ( template.getIsoPath ( ) ) ; boolean hasCd = ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( template.getIsoPath ( ) ) ) ; getModel ( ) . getCdImage ( ) . setIsChangable ( hasCd ) ; getModel ( ) . getCdAttached ( ) . setEntity ( hasCd ) ; UpdateCdImage ( ) ; }

Target:
private void initCdImage ( ) { getModel ( ) . getCdImage ( ) . setSelectedItem ( template.getIsoPath ( ) ) ; boolean hasCd = ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( template.getIsoPath ( ) ) ) ; getModel ( ) . getCdImage ( ) . setIsChangable ( hasCd ) ; getModel ( ) . getCdAttached ( ) . setEntity ( hasCd ) ; updateCdImage ( ) ; }
Source:
public void canDoActionPreallocatedSpaceCheckFailsSize ( ) { final int availableSize = 3 ; final int usedSize = 7 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }

Target:
public void testCanDoSuccessOnAddFloatingDiskWithPlugUnset ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( false ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
private void setSearchStringPage ( int newSearchPageNumber ) { if ( org.ovirt.engine.core.compat.Regex.IsMatch ( getSearchString ( ) , org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.PAGE_STRING_REGEX , RegexOptions.IgnoreCase ) ) { setSearchString ( org.ovirt.engine.core.compat.Regex.replace ( getSearchString ( ) , org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.PAGE_STRING_REGEX , ( " page " + newSearchPageNumber ) ) ) ; } else { setSearchString ( ( ( ( getSearchString ( ) ) + " page " ) + newSearchPageNumber ) ) ; } }

Target:
private void setSearchStringPage ( int newSearchPageNumber ) { this . pagingSearchString = " page " + newSearchPageNumber ; }
Source:
public void showItem ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > item , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkItemPanel panel ) { contents.clear ( ) ; if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) { showNetwork ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) ) ; } else if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) { showNic ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) ( item ) ) ) ; } showRelativeTo ( panel ) ; }

Target:
public void showItem ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > item , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkItemPanel panel ) { if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) { showNetwork ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( item ) ) ) ; } else if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) { showNic ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) ( item ) ) ) ; } else if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel ) { return ; } showRelativeTo ( panel ) ; }
Source:
public void setSupportBridgesReportByVDSM ( boolean isSupportBridgesReportByVDSM ) { this . isSupportBridgesReportByVDSM = isSupportBridgesReportByVDSM ; if ( ! isSupportBridgesReportByVDSM ) { getIsVmNetwork ( ) . setEntity ( true ) ; getIsVmNetwork ( ) . setIsChangable ( false ) ; } else { getIsVmNetwork ( ) . setIsChangable ( true ) ; } }

Target:
public void setSupportBridgesReportByVDSM ( boolean isSupportBridgesReportByVDSM ) { this . isSupportBridgesReportByVDSM = isSupportBridgesReportByVDSM ; if ( ! isSupportBridgesReportByVDSM ) { getIsVmNetwork ( ) . setEntity ( true ) ; getIsVmNetwork ( ) . getChangeProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . bridlessNetworkNotSupported ( getSelectedDc ( ) . getcompatibility_version ( ) . toString ( ) ) ) ; getIsVmNetwork ( ) . setIsChangable ( false ) ; } else { getIsVmNetwork ( ) . setIsChangable ( true ) ; } }
Source:
protected void addStoragePermissionByQuotaMode ( java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permsList , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid StorageDomainId ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = null ; if ( storagePoolId != null ) { storagePool = org.ovirt.engine.core.bll.CommandBase.getStoragePoolDAO ( ) . get ( storagePoolId ) ; if ( storagePool != null ) { if ( ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) || ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.SOFT_ENFORCEMENT ) ) ) { permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( StorageDomainId , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; } } } }

Target:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , java.lang.String description , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { return createTaskImpl ( asyncTaskCreationInfo , parentCommand , description , entityType , entityIds ) ; } catch ( java.lang.RuntimeException ex ) { log.errorFormat ( "Error during CreateTask for command: {0}. Exception {1}" , getClass ( ) . getName ( ) , ex ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
private void setUpGetBallooningExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , true ) ; } }

Target:
private void setUpGetBallooningExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( QueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , true ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageServerConnectionDao ( ) ) ; existingConnection = dao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; existingNfsAutoConnection = dao.get ( FixturesTool.EXISTING_STORAGE_CONNECTION_NFS_AUTO_ID.toString ( ) ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.storage_server_connections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionDAOTest.EXISTING_DOMAIN_STORAGE_NAME ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageServerConnectionDao ( ) ) ; existingConnection = dao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; existingNfsAutoConnection = dao.get ( FixturesTool.EXISTING_STORAGE_CONNECTION_NFS_AUTO_ID.toString ( ) ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionDAOTest.EXISTING_DOMAIN_STORAGE_NAME ) ; }
Source:
public void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void updateConnectionNoDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.mockito.Mockito.doReturn ( domains ) . when ( command ) . getStorageDomainsByConnId ( newNFSConnection.getid ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST ) ; }

Target:
public void updateConnectionNoDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.mockito.Mockito.doReturn ( domains ) . when ( command ) . getStorageDomainsByConnId ( newNFSConnection.getid ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public org.ovirt.engine.api.model.Users list ( ) { if ( isFiltered ( ) ) { return mapDbUserCollection ( getBackendCollection ( VdcQueryType.GetAllDbUsers , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) ; } else { return mapDbUserCollection ( getBackendCollection ( SearchType.DBUser , getSearchPattern ( ) ) ) ; } }

Target:
private java.lang.String getDirectoryUserSearchPattern ( 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.BackendUsersResource.DIRECTORY_USER_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 setImageStatus ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus imageStatus , org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { if ( ( diskImage != null ) && ( ( diskImage.getImageStatus ( ) ) != imageStatus ) ) { diskImage.setImageStatus ( imageStatus ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateImageStatus ( diskImage.getImage ( ) . getId ( ) , imageStatus ) ; } }

Target:
protected void setImageStatus ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus imageStatus , org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { if ( ( diskImage != null ) && ( ( diskImage.getImageStatus ( ) ) != imageStatus ) ) { diskImage.setImageStatus ( imageStatus ) ; imagesHandler.updateImageStatus ( diskImage.getImage ( ) . getId ( ) , imageStatus ) ; } }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; mockBackend ( false , VdcBllErrors.GlusterVolumeRemoveBricksStartFailed ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; mockBackend ( false , EngineError.GlusterVolumeRemoveBricksStartFailed ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED ) ; }
Source:
private void updateWanColorDepthOptions ( final org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetWANColorDepth ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { spice.setWANColorDepth ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth ) ( returnValue ) ) ) ; } } ) ) ; }

Target:
private void updateWanColorDepthOptions ( final org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getWANColorDepth ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { spice.setWANColorDepth ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth ) ( returnValue ) ) ) ; } } ) ) ; }
Source:
public void isVmNameUnique ( 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 ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.StorageConnection model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionsResourceTest.STORAGE_TYPES_MAPPED [ index ] . toString ( ) . toLowerCase ( ) , model.getType ( ) . value ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.StorageConnection model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionsResourceTest.STORAGE_TYPES_MAPPED [ index ] . toString ( ) . toLowerCase ( ) , model.getType ( ) . value ( ) ) ; verifyLinks ( model ) ; }
Source:
public void testValidUpdateOfHostedEngineEditableFieldOnRunningVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic src = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; src.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; src.setDescription ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.ovirt.engine.core.common.businessentities.VmStatic dest = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; dest.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; dest.setDescription ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; boolean updateIsValid = vmHandler.isUpdateValid ( src , dest , VMStatus.Up , false ) ; org.junit.Assert.assertTrue ( "Update should be valid for different descriptions on a running, hosted engine VM" , updateIsValid ) ; }

Target:
public void testValidUpdateOfHostedEngineEditableFieldOnRunningVm ( ) { org.ovirt.engine.core.common.businessentities.VmStatic src = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; src.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; src.setDescription ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.ovirt.engine.core.common.businessentities.VmStatic dest = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; dest.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; dest.setDescription ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; boolean updateIsValid = vmHandler.isUpdateValid ( src , dest , VMStatus.Up , false ) ; org.junit.jupiter.api.Assertions.assertTrue ( updateIsValid , "Update should be valid for different descriptions on a running, hosted engine VM" ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.Tags createTag ( java.lang.String name , java.lang.String desc ) { org.ovirt.engine.core.common.businessentities.Tags tag = new org.ovirt.engine.core.common.businessentities.Tags ( ) ; tag.setChildren ( new java.util.ArrayList < > ( ) ) ; tag.setdescription ( desc ) ; tag.settag_name ( name ) ; tag.setIsReadonly ( true ) ; tag.setparent_id ( Guid.Empty ) ; tag.settype ( TagsType.GeneralTag ) ; return tag ; }

Target:
private org.ovirt.engine.core.common.businessentities.Tags createTag ( java.lang.String name , java.lang.String desc ) { org.ovirt.engine.core.common.businessentities.Tags tag = new org.ovirt.engine.core.common.businessentities.Tags ( ) ; tag.setChildren ( new java.util.ArrayList < > ( ) ) ; tag.setDescription ( desc ) ; tag.setTagName ( name ) ; tag.setIsReadonly ( true ) ; tag.setParentId ( Guid.Empty ) ; tag.setType ( TagsType.GeneralTag ) ; return tag ; }
Source:
private void onBondEditUpdateParams ( org.ovirt.engine.core.common.businessentities.network.Bond bond ) { for ( java.util.Iterator < org.ovirt.engine.core.common.businessentities.network.Bond > iter = hostSetupNetworksParametersData.newOrModifiedBonds.iterator ( ) ; iter.hasNext ( ) ; ) { org.ovirt.engine.core.common.businessentities.network.Bond oldModifiedBond = iter.next ( ) ; if ( oldModifiedBond.getName ( ) . equals ( bond.getName ( ) ) ) { iter.remove ( ) ; break ; } } hostSetupNetworksParametersData.newOrModifiedBonds.add ( bond ) ; }

Target:
private boolean isPhysicalNic ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.util.Set < java.lang.String > bondNames , java.util.Set < java.lang.String > slaveNames ) { boolean isBond = bondNames.contains ( nic.getName ( ) ) ; boolean isRemovedBond = hostSetupNetworksParametersData.getRemovedBonds ( ) . contains ( nic.getId ( ) ) ; boolean isSlave = slaveNames.contains ( nic.getName ( ) ) ; boolean isVlanDevice = org.ovirt.engine.core.common.utils.NetworkCommonUtils.isVlan ( nic ) ; return ! ( ( ( isBond || isRemovedBond ) || isSlave ) || isVlanDevice ) ; }