auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = vmDao.getAllVmsRelatedToQuotaId ( org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { vmHandler.updateDisksFromDb ( vm ) ; vmHandler.updateVmInitFromDB ( vm.getStaticData ( ) , true ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.fillImagesBySnapshots ( vm ) ; } org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vms ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = vmDao.getAllVmsRelatedToQuotaId ( org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { vmHandler.updateDisksFromDb ( vm ) ; vmHandler.updateVmInitFromDB ( vm.getStaticData ( ) , true ) ; java.util.Collections.sort ( vm.getDiskList ( ) , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; imagesHandler.fillImagesBySnapshots ( vm ) ; } org.ovirt.engine.core.bll.GetVmsRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vms ) ; }
Source:
public void testEquals ( ) { org.ovirt.engine.core.utils.Pair < java.lang.Boolean , java.lang.String > p1 = new org.ovirt.engine.core.utils.Pair < java.lang.Boolean , java.lang.String > ( true , "abc" ) ; org.ovirt.engine.core.utils.Pair < java.lang.Boolean , java.lang.String > p2 = new org.ovirt.engine.core.utils.Pair < java.lang.Boolean , java.lang.String > ( true , "abc" ) ; org.ovirt.engine.core.utils.Pair < java.lang.Boolean , java.lang.String > p3 = new org.ovirt.engine.core.utils.Pair < java.lang.Boolean , java.lang.String > ( false , "abc" ) ; junit.framework.Assert.assertTrue ( p1.equals ( p2 ) ) ; junit.framework.Assert.assertFalse ( p1.equals ( p3 ) ) ; }

Target:
public void testEquals ( ) { org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p1 = new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > ( true , "abc" ) ; org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p2 = new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > ( true , "abc" ) ; org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > p3 = new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.String > ( false , "abc" ) ; junit.framework.Assert.assertTrue ( p1.equals ( p2 ) ) ; junit.framework.Assert.assertFalse ( p1.equals ( p3 ) ) ; }
Source:
public static void GetSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetMinimalVmMemSize ( 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 ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VMMinMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetPermissionsOnBehalfByAdElementId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , setUpPermissions ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetPermissionsOnBehalfByAdElementId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , setUpPermissions ( ) , failure ) ; }
Source:
private void initRadioButtonEditors ( ) { enableOvirtServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "service" ) ; enableGlusterServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "service" ) ; optimizationNoneEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationForServerEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationForDesktopEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; optimizationCustomEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "1" ) ; migrateOnErrorOption_YESEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_HA_ONLYEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_NOEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelRadioButtonEditor ( "2" ) ; }

Target:
private void initRadioButtonEditors ( ) { enableOvirtServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "service" ) ; enableGlusterServiceOptionEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "service" ) ; optimizationNoneEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; optimizationForServerEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; optimizationForDesktopEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; optimizationCustomEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "1" ) ; migrateOnErrorOption_YESEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_HA_ONLYEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "2" ) ; migrateOnErrorOption_NOEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor ( "2" ) ; }
Source:
protected void endSuccessfully ( ) { super . endSuccessfully ( ) ; if ( isLastTaskHandler ( ) ) { org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getExecutionContext ( ) , false ) ; } }

Target:
private org.ovirt.engine.core.bll.context.CommandContext createStepsContext ( org.ovirt.engine.core.common.job.StepEnum step ) { org.ovirt.engine.core.common.job.Step addedStep = org.ovirt.engine.core.bll.job.ExecutionHandler.addSubStep ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getExecutionContext ( ) . getJob ( ) . getStep ( StepEnum.EXECUTING ) , step , org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( step , java.util.Collections.emptyMap ( ) ) ) ; org.ovirt.engine.core.bll.job.ExecutionContext ctx = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; ctx.setStep ( addedStep ) ; ctx.setMonitored ( true ) ; org.ovirt.engine.core.bll.context.CommandContext commandCtx = org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getContext ( ) , null ) . withExecutionContext ( ctx ) ; return commandCtx ; }
Source:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsmanager = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getVdsManager ( vdsId ) ; if ( vdsmanager == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.RESOURCE_MANAGER_VDS_NOT_FOUND , java.lang.String.format ( "Vds with id: %1$s was not found" , vdsId ) ) ; } setVdsAndVdsStatic ( vdsmanager.getCopyVds ( ) ) ; return vdsmanager.getVdsProxy ( ) ; }

Target:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsmanager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.vdsbroker.ResourceManager.class ) . getVdsManager ( vdsId ) ; if ( vdsmanager == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.RESOURCE_MANAGER_VDS_NOT_FOUND , java.lang.String.format ( "Vds with id: %1$s was not found" , vdsId ) ) ; } setVdsAndVdsStatic ( vdsmanager.getCopyVds ( ) ) ; return vdsmanager.getVdsProxy ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.qos.QosBase createQosEntity ( java.sql.ResultSet rs ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.qos.QosType qosType = org.ovirt.engine.core.common.businessentities.qos.QosType.forValue ( rs.getInt ( "qos_type" ) ) ; switch ( qosType ) { case STORAGE : return StorageQosDaoDbFacadeImpl.StorageDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; default : org.ovirt.engine.core.dao.qos.AllQosBaseDaoFacadeImpl.log.debugFormat ( "not handled/missing qos_type" , qosType ) ; break ; } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.qos.QosBase createQosEntity ( java.sql.ResultSet rs ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.qos.QosType qosType = org.ovirt.engine.core.common.businessentities.qos.QosType.forValue ( rs.getInt ( "qos_type" ) ) ; switch ( qosType ) { case STORAGE : return StorageQosDaoDbFacadeImpl.StorageDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; case CPU : return CpuQosDaoDbFacadeImpl.CpuDaoDbFacadaeImplMapper.MAPPER.createQosEntity ( rs ) ; default : org.ovirt.engine.core.dao.qos.AllQosBaseDaoFacadeImpl.log.debugFormat ( "not handled/missing qos_type" , qosType ) ; break ; } return null ; }
Source:
private java.util.Map.Entry < java.lang.String , java.lang.String > getTimezoneEntryByKey ( java.lang.String key , java.lang.Iterable < java.util.Map.Entry < java.lang.String , java.lang.String > > timeZones ) { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : timeZones ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( key , entry.getKey ( ) ) ) { return entry ; } } return null ; }

Target:
protected void updateSelectedCdImage ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { getModel ( ) . getCdImage ( ) . setSelectedItem ( vmBase.getIsoPath ( ) ) ; boolean hasCd = ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( vmBase.getIsoPath ( ) ) ) ; getModel ( ) . getCdImage ( ) . setIsChangable ( hasCd ) ; getModel ( ) . getCdAttached ( ) . setEntity ( hasCd ) ; }
Source:
protected org.ovirt.engine.api.model.Permissions mapCollection ( java.util.Set < org.ovirt.engine.core.common.businessentities.permissions > entities ) { org.ovirt.engine.api.model.Permissions collection = new org.ovirt.engine.api.model.Permissions ( ) ; for ( org.ovirt.engine.core.common.businessentities.permissions entity : entities ) { castEveryonePermissionsToUser ( entity ) ; org.ovirt.engine.api.model.Permission permission = map ( entity , getUserById ( entity.getad_element_id ( ) ) ) ; collection.getPermissions ( ) . add ( addLinks ( permission , ( ( permission.getUser ( ) ) != null ? suggestedParentType : org.ovirt.engine.api.model.Group.class ) ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Permissions mapCollection ( java.util.Set < org.ovirt.engine.core.common.businessentities.Permissions > entities ) { org.ovirt.engine.core.common.businessentities.Permissions collection = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions entity : entities ) { castEveryonePermissionsToUser ( entity ) ; org.ovirt.engine.api.model.Permission permission = map ( entity , getUserById ( entity.getad_element_id ( ) ) ) ; collection.getPermissions ( ) . add ( addLinks ( permission , ( ( permission.getUser ( ) ) != null ? suggestedParentType : org.ovirt.engine.api.model.Group.class ) ) ) ; } return collection ; }
Source:
public void testGetClusterByClusterPolicyId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > result = dao.getClustersByClusterPolicyId ( FixturesTool.CLUSTER_POLICY_EVEN_DISTRIBUTION ) ; java.util.List < org.ovirt.engine.core.compat.Guid > clusterIdList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster group : result ) { clusterIdList.add ( group.getId ( ) ) ; } org.junit.Assert.assertTrue ( clusterIdList.contains ( FixturesTool.CLUSTER_RHEL6_ISCSI ) ) ; org.junit.Assert.assertTrue ( clusterIdList.contains ( FixturesTool.CLUSTER_NO_RUNNING_VMS ) ) ; org.junit.Assert.assertTrue ( clusterIdList.contains ( FixturesTool.CLUSTER_RHEL6_NFS ) ) ; }

Target:
public void testGetClusterByClusterPolicyId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > result = dao.getClustersByClusterPolicyId ( FixturesTool.CLUSTER_POLICY_EVEN_DISTRIBUTION ) ; java.util.List < org.ovirt.engine.core.compat.Guid > clusterIdList = result.stream ( ) . map ( Cluster :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.Assert.assertTrue ( clusterIdList.contains ( FixturesTool.CLUSTER_RHEL6_ISCSI ) ) ; org.junit.Assert.assertTrue ( clusterIdList.contains ( FixturesTool.CLUSTER_NO_RUNNING_VMS ) ) ; org.junit.Assert.assertTrue ( clusterIdList.contains ( FixturesTool.CLUSTER_RHEL6_NFS ) ) ; }
Source:
public void testDedicatedHostNotInSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }

Target:
public void testDedicatedHostNotInSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host , boolean skipManagementNetwork , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsByName ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbIfaces = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getInterfaceDao ( ) . getAllInterfacesForVds ( host.getId ( ) ) ; persistTopology ( host.getInterfaces ( ) , dbIfaces , nicsByName ) ; return enforceNetworkCompliance ( host , skipManagementNetwork , dbIfaces ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.NonOperationalReason persistAndEnforceNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host , boolean skipManagementNetwork , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > userConfiguredNics ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbIfaces = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getInterfaceDao ( ) . getAllInterfacesForVds ( host.getId ( ) ) ; persistTopology ( host.getInterfaces ( ) , dbIfaces , userConfiguredNics ) ; return enforceNetworkCompliance ( host , skipManagementNetwork , dbIfaces ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.image_storage_domain_map saveImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( image_storage_domain_map ) ; return image_storage_domain_map ; }

Target:
public static org.ovirt.engine.core.common.businessentities.image_storage_domain_map saveImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageDao ( ) . save ( diskImage.getImage ( ) ) ; org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = new org.ovirt.engine.core.common.businessentities.image_storage_domain_map ( diskImage.getImageId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getQuotaId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getImageStorageDomainMapDao ( ) . save ( image_storage_domain_map ) ; return image_storage_domain_map ; }
Source:
private void createProfiles ( ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { for ( org.ovirt.engine.core.extensions.mgr.ExtensionManager.ExtensionEntry authnExtension : org.ovirt.engine.core.extensions.mgr.ExtensionManager.getInstance ( ) . getProvidedExtensions ( org.ovirt.engine.core.aaa.AuthenticationProfileRepository.AUTHN_SERVICE ) ) { registerProfile ( new org.ovirt.engine.core.aaa.AuthenticationProfile ( ( ( org.ovirt.engine.core.aaa.Authenticator ) ( authnExtension.getExtension ( ) ) ) , ( ( org.ovirt.engine.core.aaa.Directory ) ( org.ovirt.engine.core.extensions.mgr.ExtensionManager.getInstance ( ) . getExtensionByName ( authnExtension.getConfig ( ) . getProperty ( org.ovirt.engine.core.aaa.AuthenticationProfileRepository.AUTHN_AUTHZ_PLUGIN ) ) . getExtension ( ) ) ) ) ) ; } }

Target:
private void createProfiles ( ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { for ( org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry authnExtension : org.ovirt.engine.core.extensions.mgr.ExtensionsManager.getInstance ( ) . getProvidedExtensions ( org.ovirt.engine.core.aaa.AuthenticationProfileRepository.AUTHN_SERVICE ) ) { registerProfile ( new org.ovirt.engine.core.aaa.AuthenticationProfile ( ( ( org.ovirt.engine.core.aaa.Authenticator ) ( authnExtension.getExtension ( ) ) ) , ( ( org.ovirt.engine.core.aaa.Directory ) ( org.ovirt.engine.core.extensions.mgr.ExtensionsManager.getInstance ( ) . getExtensionByName ( authnExtension.getConfig ( ) . getProperty ( org.ovirt.engine.core.aaa.AuthenticationProfileRepository.AUTHN_AUTHZ_PLUGIN ) ) . getExtension ( ) ) ) ) ) ; } }
Source:
private java.lang.String getManagementUser ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder order ) { java.lang.String managementUser = "" ; if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Primary ) ) { managementUser = _vds.getpm_user ( ) ; } else if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Secondary ) ) { managementUser = _vds.getPmSecondaryuser ( ) ; } return managementUser ; }

Target:
private java.lang.String getManagementUser ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder order ) { java.lang.String managementUser = "" ; if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Primary ) ) { managementUser = _vds.getPmUser ( ) ; } else if ( order == ( org.ovirt.engine.core.common.businessentities.FenceAgentOrder.Secondary ) ) { managementUser = _vds.getPmSecondaryuser ( ) ; } return managementUser ; }
Source:
public static org.ovirt.engine.api.model.OpenStackImage map ( org.ovirt.engine.core.common.businessentities.RepoImage entity , org.ovirt.engine.api.model.OpenStackImage template ) { org.ovirt.engine.api.model.OpenStackImage model = ( template != null ) ? template : new org.ovirt.engine.api.model.OpenStackImage ( ) ; if ( ( entity.getRepoImageId ( ) ) != null ) { model.setId ( entity.getRepoImageId ( ) ) ; } if ( ( entity.getRepoImageName ( ) ) != null ) { model.setName ( entity.getRepoImageName ( ) ) ; } return model ; }

Target:
public static org.ovirt.engine.api.model.OpenStackImage map ( org.ovirt.engine.core.common.businessentities.storage.RepoImage entity , org.ovirt.engine.api.model.OpenStackImage template ) { org.ovirt.engine.api.model.OpenStackImage model = ( template != null ) ? template : new org.ovirt.engine.api.model.OpenStackImage ( ) ; if ( ( entity.getRepoImageId ( ) ) != null ) { model.setId ( entity.getRepoImageId ( ) ) ; } if ( ( entity.getRepoImageName ( ) ) != null ) { model.setName ( entity.getRepoImageName ( ) ) ; } return model ; }
Source:
public void testUpdate ( ) { existingUser.setname ( "changedname" ) ; existingUser.setsurname ( "changedsurname" ) ; dao.update ( existingUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.get ( existingUser.getuser_id ( ) ) ; org.junit.Assert.assertEquals ( existingUser , result ) ; }

Target:
public void testUpdate ( ) { existingUser.setFirstName ( "changedname" ) ; existingUser.setLastName ( "changedsurname" ) ; dao.update ( existingUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.get ( existingUser.getId ( ) ) ; org.junit.Assert.assertEquals ( existingUser , result ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.AttachStorageConnectionToStorageDomainCommand.getParameters ( ) . getStorageConnectionId ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.AttachStorageConnectionToStorageDomainCommand.getParameters ( ) . getStorageConnectionId ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }
Source:
protected boolean isVmRunningOnNonDefaultVds ( ) { return ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVds ( ) ) != null ) && ( ! ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getRunOnVds ( ) . equals ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVds ( ) ) ) ) ; }

Target:
protected boolean isVmRunningOnNonDefaultVds ( ) { return ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . isEmpty ( ) ) == false ) && ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVdsList ( ) . contains ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getRunOnVds ( ) ) ) == false ) ; }
Source:
protected java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > setUpTemplates ( boolean notFound ) { java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ret = new java.util.HashMap < > ( ) ; if ( notFound ) { return ret ; } for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { ret.put ( getVmTemplateEntity ( i ) , new java.util.ArrayList < > ( ) ) ; } return ret ; }

Target:
protected java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > setUpTemplates ( boolean notFound ) { if ( notFound ) { return java.util.Collections.emptyMap ( ) ; } return java.util.stream.IntStream.range ( 0 , NAMES.length ) . boxed ( ) . collect ( java.util.stream.Collectors.toMap ( this :: getVmTemplateEntity , java.util.ArrayList :: new ) ) ; }
Source:
public void testPosixDcAndNotMatchingCompatiblityVersion ( ) { storagePool.setcompatibility_version ( Version.v3_0 ) ; storagePool.setStorageType ( StorageType.POSIXFS ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isPosixDcAndMatchingCompatiblityVersion ( ) ; org.junit.Assert.assertFalse ( result.isValid ( ) ) ; org.ovirt.engine.core.bll.storage.StoragePoolValidatorTest.assertMessage ( result , VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }

Target:
public void testPosixDcAndNotMatchingCompatiblityVersion ( ) { storagePool.setcompatibility_version ( Version.v3_0 ) ; storagePool.setIsLocal ( false ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isPosixSupportedInDC ( ) ; org.junit.Assert.assertFalse ( result.isValid ( ) ) ; org.ovirt.engine.core.bll.storage.StoragePoolValidatorTest.assertMessage ( result , VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotConfigSet ( java.lang.String volumeName , java.lang.String configName , java.lang.String configValue ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotConfigSet" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "optionName" , configName ) . withParameter ( "optionValue" , configValue ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn glusterVolumeSnapshotConfigSet ( java.lang.String volumeName , java.lang.String configName , java.lang.String configValue ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotConfigSet" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "optionName" , configName ) . withParameter ( "optionValue" , configValue ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public void getAuthzGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAuthzGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public 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.getInstance ( ) . 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 ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { networkDialogModel.getQosModel ( ) . init ( ( ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; networkDialogModel.stopProgress ( ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.HostNetworkQos getOverridingHostNetworkQos ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos displayedQos ) { boolean qosAvailableAndSet = ( displayedQos != null ) && ( networkDialogModel.getQosOverridden ( ) . getEntity ( ) ) ; if ( qosAvailableAndSet ) { if ( networkDialogModel.getQosModel ( ) . getIsChangable ( ) ) { return displayedQos ; } else { return getNetworkAttachmentForNetwork ( network.getId ( ) ) . getHostNetworkQos ( ) ; } } else { return null ; } }
Source:
private void assertGetAllForVdsGroupCorrectResult ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingVds ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.Assert.assertEquals ( vds.getvds_group_id ( ) , existingVds.getvds_group_id ( ) ) ; } }

Target:
private void assertGetAllForVdsGroupCorrectResult ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingVds ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.Assert.assertEquals ( vds.getVdsGroupId ( ) , existingVds.getVdsGroupId ( ) ) ; } }
Source:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { 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.RunQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public static 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:
public static 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.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public static 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.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
public static void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
public void testUpdate ( ) { existingVmStatic.setDescription ( "updated" ) ; dao.update ( existingVmStatic ) ; org.ovirt.engine.core.common.businessentities.VmStatic result = dao.get ( org.ovirt.engine.core.dao.VmStaticDAOTest.EXISTING_VM_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingVmStatic , result ) ; }

Target:
public void testUpdate ( ) { existingVmStatic.setDescription ( "updated" ) ; existingVmStatic.setCpuProfileId ( FixturesTool.CPU_PROFILE_2 ) ; dao.update ( existingVmStatic ) ; org.ovirt.engine.core.common.businessentities.VmStatic result = dao.get ( org.ovirt.engine.core.dao.VmStaticDAOTest.EXISTING_VM_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingVmStatic , result ) ; }
Source:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM v = createVM ( ) ; v.setvm_name ( "testVm" ) ; final org.ovirt.engine.core.common.action.ImportVmParameters p = new org.ovirt.engine.core.common.action.ImportVmParameters ( v , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; return p ; }

Target:
protected org.ovirt.engine.core.common.action.ImportVmParameters createParameters ( ) { final org.ovirt.engine.core.common.businessentities.VM v = createVM ( ) ; v.setVmName ( "testVm" ) ; return new org.ovirt.engine.core.common.action.ImportVmParameters ( v , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAllIds ( org.ovirt.engine.core.compat.Guid pool , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getStoragePoolIdParameterSource ( pool ) . addValue ( "status" , status.getValue ( ) ) ; org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.compat.Guid > mapper = new org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.core.compat.Guid mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "storage_id" ) ) ; } } ; return getCallsHandler ( ) . executeReadList ( "GetStorageDomainIdsByStoragePoolIdAndStatus" , mapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAllIds ( org.ovirt.engine.core.compat.Guid pool , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getStoragePoolIdParameterSource ( pool ) . addValue ( "status" , status.getValue ( ) ) ; org.springframework.jdbc.core.RowMapper < org.ovirt.engine.core.compat.Guid > mapper = new org.springframework.jdbc.core.RowMapper < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.core.compat.Guid mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "storage_id" ) ) ; } } ; return getCallsHandler ( ) . executeReadList ( "GetStorageDomainIdsByStoragePoolIdAndStatus" , mapper , parameterSource ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > GetNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( osType ) ) { list.remove ( VmInterfaceType.e1000 ) ; if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > GetNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( osType ) ) { if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }
Source:
protected boolean canDoAction ( ) { if ( checkIsDomainLocked ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( checkIsDomainLocked ( poolDomain ) ) { return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( validate ( createStorageDomainValidator ( ) . isInProcess ( ) ) ) ) { return false ; } if ( ! ( validate ( createStoragePoolValidator ( ) . isAnyDomainInProcess ( ) ) ) ) { return false ; } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( args instanceof org.ovirt.engine.core.compat.PropertyChangedEventArgs ) { org.ovirt.engine.core.compat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) ; if ( changedArgs.PropertyName.contains ( "Alert" ) ) { updateAlerts ( getView ( ) , model ) ; } else if ( changedArgs.PropertyName.contains ( "consoleAddressPartiallyOverridden" ) ) { updateAlerts ( getView ( ) , model ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( changedArgs.PropertyName.contains ( "Alert" ) ) { updateAlerts ( getView ( ) , model ) ; } else if ( changedArgs.PropertyName.contains ( "consoleAddressPartiallyOverridden" ) ) { updateAlerts ( getView ( ) , model ) ; } } }
Source:
public void executeCommandWithRebalanceCompleteInNode ( ) { cmd.setGlusterVolumeId ( volumeWithRebalanceTask ) ; mockBackend ( true , JobExecutionStatus.FINISHED , true , null ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd ) . endStepJob ( org.mockito.ArgumentMatchers.eq ( JobExecutionStatus.FINISHED ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.eq ( true ) ) ; org.mockito.Mockito.verify ( cmd ) . releaseVolumeLock ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP , cmd.getAuditLogTypeValue ( ) ) ; }

Target:
public void executeCommandWithRebalanceCompleteInNode ( ) { cmd.setGlusterVolumeId ( volumeWithRebalanceTask ) ; mockBackend ( true , JobExecutionStatus.FINISHED , true , null ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.validate ( ) ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd ) . endStepJob ( org.mockito.ArgumentMatchers.eq ( JobExecutionStatus.FINISHED ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.eq ( true ) ) ; org.mockito.Mockito.verify ( cmd ) . releaseVolumeLock ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.GLUSTER_VOLUME_REBALANCE_STOP , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
private void updateServiceTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.ServiceType > serviceTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.ServiceType > ( ) ; serviceTypes.add ( null ) ; serviceTypes.addAll ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.values ( ) ) ) ; getServiceTypeList ( ) . setItems ( serviceTypes ) ; }

Target:
private void updateServiceTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.ServiceType > serviceTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.ServiceType > ( ) ; serviceTypes.add ( null ) ; serviceTypes.add ( ServiceType.NFS ) ; serviceTypes.add ( ServiceType.SHD ) ; getServiceTypeList ( ) . setItems ( serviceTypes ) ; }
Source:
public void testQueryWithFilter ( ) throws java.lang.Exception { java.util.List < java.lang.String > filterValue = new java.util.ArrayList < java.lang.String > ( ) ; filterValue.add ( "true" ) ; org.easymock.EasyMock.reset ( httpHeaders ) ; org.easymock.EasyMock.expect ( httpHeaders.getRequestHeader ( "filter" ) ) . andReturn ( filterValue ) ; resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( true ) ; control.replay ( ) ; resource.get ( ) ; }

Target:
public void testQueryWithoutFilter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( false , true ) ; control.replay ( ) ; resource.get ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc list ( java.lang.String isFull , java.lang.String [ ] vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( vmIds ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn reduceDomain ( java.lang.String jobId , java.util.Map < java.lang.String , java.lang.Object > reduceParams ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.reduce_domain" ) . withParameter ( "job_id" , jobId ) . withParameter ( "reduce_params" , reduceParams ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }