auphong2707/dl4se-code-review-dataset huggingface dataset:
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 getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void printEventInDebug ( java.util.Map < java.lang.String , java.lang.Object > map ) { if ( ! ( org.ovirt.engine.core.vdsbroker.monitoring.EventVmStatsRefresher.log.isDebugEnabled ( ) ) ) { return ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; org.ovirt.engine.core.vdsbroker.ObjectDescriptor.toStringBuilder ( map , sb ) ; org.ovirt.engine.core.vdsbroker.monitoring.EventVmStatsRefresher.log.debug ( "processing event for host data:\n{}" , vdsManager.getVdsName ( ) , sb ) ; }

Target:
private void printEventInDebug ( java.util.Map < java.lang.String , java.lang.Object > map ) { if ( ! ( org.ovirt.engine.core.vdsbroker.monitoring.EventVmStatsRefresher.log.isDebugEnabled ( ) ) ) { return ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; org.ovirt.engine.core.utils.ObjectDescriptor.toStringBuilder ( map , sb ) ; org.ovirt.engine.core.vdsbroker.monitoring.EventVmStatsRefresher.log.debug ( "processing event for host data:\n{}" , vdsManager.getVdsName ( ) , sb ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; return networkClusterModel ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ) ) ; return networkClusterModel ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.ActionGroup > getActionGroupsByRoleId ( org.ovirt.engine.core.compat.Guid roleId ) { java.util.List < org.ovirt.engine.core.common.businessentities.ActionGroup > allGroups = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > allGroupsMaps = org.ovirt.engine.core.bll.RolesCommandBase.getRoleGroupMapDao ( ) . getAllForRole ( roleId ) ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : allGroupsMaps ) { allGroups.add ( map.getActionGroup ( ) ) ; } return allGroups ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.ActionGroup > getActionGroupsByRoleId ( org.ovirt.engine.core.compat.Guid roleId ) { java.util.List < org.ovirt.engine.core.common.businessentities.ActionGroup > allGroups = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > allGroupsMaps = roleGroupMapDao.getAllForRole ( roleId ) ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : allGroupsMaps ) { allGroups.add ( map.getActionGroup ( ) ) ; } return allGroups ; }
Source:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

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:
public static void GetDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getEntitiesWithPermittedActionParameters , aQuery ) ; }

Target:
public static void GetStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public java.util.List < T > getSelectedObjects ( ) { if ( isSingleSelectionOnly ( ) ) { return java.util.Collections.singletonList ( singleSelectionModel.getSelectedObject ( ) ) ; } else { return multiSelectionModel.getSelectedList ( ) ; } }

Target:
public java.util.List < T > getSelectedObjects ( ) { if ( isSingleSelectionOnly ( ) ) { T selectedItem = singleSelectionModel.getSelectedObject ( ) ; if ( selectedItem == null ) { return java.util.Collections.EMPTY_LIST ; } else { return java.util.Collections.singletonList ( selectedItem ) ; } } else { return multiSelectionModel.getSelectedList ( ) ; } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > result = dao.getAll ( existingLUNStorageMap.getId ( ) . lunId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap mapping : result ) { org.junit.Assert.assertEquals ( existingLUNStorageMap.getId ( ) . lunId , mapping.getId ( ) . lunId ) ; } }

Target:
public void testGetAllByLunId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > result = dao.getAll ( existingLUNStorageMap.getId ( ) . lunId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap mapping : result ) { org.junit.Assert.assertEquals ( existingLUNStorageMap.getId ( ) . lunId , mapping.getId ( ) . lunId ) ; } }
Source:
public static void IsHotPlugAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void isAnyHostUpInCluster ( 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 ) { if ( ( source != null ) && ( ( ( ( java.util.List ) ( source ) ) . size ( ) ) > 0 ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetUpHostListByCluster ( aQuery , clusterName , 1 ) ; }
Source:
protected java.lang.Object [ ] getSelectedKeys ( ) { if ( ( getSelectedItems ( ) ) == null ) { return new java.lang.Object [ 0 ] ; } else { java.util.ArrayList < java.lang.Object > items = new java.util.ArrayList < java.lang.Object > ( ) ; for ( java.lang.Object i : getSelectedItems ( ) ) { items.add ( ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( i ) ) . getId ( ) ) ; } return items.toArray ( new java.lang.Object [ ] { } ) ; } }

Target:
public org.ovirt.engine.ui.uicommonweb.UICommand getResetEmulatedMachineCommand ( ) { return resetEmulatedMachineCommand ; }
Source:
public void testExecuteQueryCommand ( ) { dcNetworks.addAll ( java.util.Arrays.asList ( mockExternalNetwork , mockManagementNetworkCandidate ) ) ; getQuery ( ) . executeQueryCommand ( ) ; final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > actual = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertNotNull ( actual ) ; org.junit.Assert.assertThat ( actual , org.hamcrest.Matchers.hasSize ( 1 ) ) ; org.junit.Assert.assertTrue ( actual.contains ( mockManagementNetworkCandidate ) ) ; }

Target:
public void testExecuteQueryCommand ( ) { dcNetworks.addAll ( java.util.Arrays.asList ( mockExternalNetwork , mockManagementNetworkCandidate ) ) ; getQuery ( ) . executeQueryCommand ( ) ; final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > actual = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( actual ) ; org.hamcrest.MatcherAssert.assertThat ( actual , org.hamcrest.Matchers.hasSize ( 1 ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( actual.contains ( mockManagementNetworkCandidate ) ) ; }
Source:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.ArgumentMatchers.any ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.ArgumentMatchers.any ( ) ) ; return ; } org.junit.jupiter.api.Assertions.fail ( ) ; }
Source:
public void testMaintenance ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.SetHaMaintenance , org.ovirt.engine.core.common.action.SetHaMaintenanceParameters.class , new java.lang.String [ ] { "IsEnabled" } , new java.lang.Object [ ] { true } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setMaintenanceEnabled ( true ) ; verifyActionResponse ( resource.maintenance ( action ) ) ; }

Target:
public void testMaintenance ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.SetHaMaintenance , org.ovirt.engine.core.common.action.SetHaMaintenanceParameters.class , new java.lang.String [ ] { "IsEnabled" } , new java.lang.Object [ ] { true } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setMaintenanceEnabled ( true ) ; verifyActionResponse ( resource.maintenance ( action ) ) ; }
Source:
protected org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.errors.VdcFault > runConnectionStorageToDomain ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.compat.Guid vdsId , int type ) { return registerLibvirtSecrets ( storageDomain , vdsId ) ; }

Target:
protected org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.errors.VdcFault > runConnectionStorageToDomain ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.compat.Guid vdsId , int type ) { org.ovirt.engine.core.common.businessentities.Provider provider = getProviderDao ( ) . get ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( storageDomain.getStorage ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LibvirtSecret > libvirtSecrets = getLibvirtSecretDao ( ) . getAllByProviderId ( provider.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDS vds = getVdsDao ( ) . get ( vdsId ) ; return org.ovirt.engine.core.bll.storage.CINDERStorageHelper.registerLibvirtSecrets ( storageDomain , vds , libvirtSecrets ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid findImageForSameDrive ( org.ovirt.engine.core.compat.Guid snapshotId ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesFromSnapshot = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : imagesFromSnapshot ) { if ( getDiskImage ( ) . getId ( ) . equals ( diskImage.getId ( ) ) ) { return diskImage.getImageId ( ) ; } } return null ; }

Target:
protected org.ovirt.engine.core.compat.Guid findImageForSameDrive ( org.ovirt.engine.core.compat.Guid snapshotId ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesFromSnapshot = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : imagesFromSnapshot ) { if ( getDiskImage ( ) . getId ( ) . equals ( diskImage.getId ( ) ) ) { return diskImage.getImageId ( ) ; } } return null ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost getStatusForNode ( java.util.Map < java.lang.String , java.lang.Object > nodeStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost rebalanceStatusForHost = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost ( ) ; rebalanceStatusForHost.setHostName ( ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_NAME ) ) ) ) ; populateGlusterVolumeTaskStatusDetail ( rebalanceStatusForHost , nodeStatus ) ; return rebalanceStatusForHost ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost getStatusForNode ( java.util.Map < java.lang.String , java.lang.Object > nodeStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost rebalanceStatusForHost = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost ( ) ; rebalanceStatusForHost.setHostName ( ( nodeStatus.containsKey ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_NAME ) ? ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_NAME ) ) ) : null ) ) ; rebalanceStatusForHost.setHostUuid ( ( nodeStatus.containsKey ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_UUID ) ? new org.ovirt.engine.core.compat.Guid ( ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_UUID ) ) ) ) : null ) ) ; populateGlusterVolumeTaskStatusDetail ( rebalanceStatusForHost , nodeStatus ) ; return rebalanceStatusForHost ; }
Source:
public void validateSucceedsWithStopActionTypeAndClusterIdAndServerId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.getParameters ( ) . setServerId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; cmd.setVdsId ( cmd.getParameters ( ) . getServerId ( ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateFailsOnNull ( ) { cmd.getParameters ( ) . setServiceType ( ServiceType.NFS ) ; cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START ) ; prepareMocks ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
private void UpdateOptionsLocalFSData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetLocalStorageHost ( 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 ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel clusterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; clusterGuideModel.localStorageHost = localStorageHost ; clusterGuideModel.UpdateOptionsLocalFS ( ) ; } } ) , dataCenter.getname ( ) ) ; }

Target:
private void updateOptionsLocalFSData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getLocalStorageHost ( 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 ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel clusterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; clusterGuideModel.localStorageHost = localStorageHost ; clusterGuideModel.updateOptionsLocalFS ( ) ; } } ) , dataCenter.getname ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > getNonBlankBaseTemplates ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > baseTemplates = filterNotBaseTemplates ( templates ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate baseTemplate : baseTemplates ) { if ( Guid.Empty.equals ( baseTemplate.getId ( ) ) ) { baseTemplates.remove ( baseTemplate ) ; break ; } } return baseTemplates ; }

Target:
protected void baseTemplateSelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate baseTemplate = getModel ( ) . getBaseTemplate ( ) . getSelectedItem ( ) ; if ( baseTemplate != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > subVersions = baseTemplateToSubTemplates.get ( baseTemplate.getId ( ) ) ; getModel ( ) . getTemplate ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( subVersions ) ) ; getModel ( ) . getTemplate ( ) . setSelectedItem ( subVersions.get ( 1 ) ) ; } }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < java.lang.String > list = new java.util.ArrayList < > ( ) ; if ( source != null ) { java.lang.String [ ] array = ( ( java.lang.String ) ( source ) ) . split ( "[,]" , ( - 1 ) ) ; for ( java.lang.String item : array ) { list.add ( item ) ; } } return list ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < java.lang.String > list = new java.util.ArrayList < > ( ) ; if ( source != null ) { java.lang.String [ ] array = ( ( java.lang.String ) ( source ) ) . split ( "[,]" , ( - 1 ) ) ; for ( java.lang.String item : array ) { list.add ( item ) ; } } return list ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
protected java.lang.String transform ( java.util.ArrayList < java.lang.String > fileNameList , org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ISO_PREFIX ) + ( super . transform ( fileNameList , repoImage ) ) ; }
Source:
protected boolean isSourceCustomInstanceTypeOrBlankTemplate ( ) { if ( ( getSource ( ) ) instanceof org.ovirt.engine.core.common.businessentities.VmTemplate ) { org.ovirt.engine.core.common.businessentities.VmTemplate source = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getSource ( ) ) ) ; if ( ( source.getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return ( source.getId ( ) ) == null ; } return source.getId ( ) . equals ( Guid.Empty ) ; } return false ; }

Target:
protected boolean isSourceCustomInstanceType ( ) { if ( ( getSource ( ) ) instanceof org.ovirt.engine.core.common.businessentities.VmTemplate ) { org.ovirt.engine.core.common.businessentities.VmTemplate source = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getSource ( ) ) ) ; if ( ( source.getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return ( source.getId ( ) ) == null ; } return false ; } return false ; }
Source:
public void gatewayChanged ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; mockExistingNetworks ( net ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBootProtocol ( NetworkBootProtocol.StaticIp ) ; nic.setGateway ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; mockExistingIfaces ( nic ) ; nic.setGateway ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndAssertNetworkModified ( helper , net ) ; }

Target:
public void gatewayChanged ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; mockExistingNetworks ( net ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; nic.setGateway ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; mockExistingIfaces ( nic ) ; nic.setGateway ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndAssertNetworkModified ( helper , net ) ; }
Source:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , java.lang.String sessionId , javax.naming.InitialContext ctx ) { org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ; queryParams.setSessionId ( sessionId ) ; queryParams.setFiltered ( org.ovirt.engine.core.aaa.filters.SsoPostLoginFilter.FILTER_QUERIES ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( ctx ) . runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.QueryType queryType , java.lang.String sessionId , javax.naming.InitialContext ctx ) { org.ovirt.engine.core.common.queries.QueryParametersBase queryParams = new org.ovirt.engine.core.common.queries.QueryParametersBase ( ) ; queryParams.setSessionId ( sessionId ) ; queryParams.setFiltered ( org.ovirt.engine.core.aaa.filters.SsoPostLoginFilter.FILTER_QUERIES ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( ctx ) . runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec ) ; 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.StatusOnlyReturnForXmlRpc copyData ( java.util.Map src , java.util.Map dst , boolean collapse ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.copyData ( src , dst , collapse ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
public void testUpdateIDEDiskAsReadOnlyNotSupported ( ) { org.ovirt.engine.core.common.businessentities.DiskImage updatedDisk = createDiskImage ( ) ; updatedDisk.setReadOnly ( true ) ; updatedDisk.setDiskInterface ( DiskInterface.IDE ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskFromDB = createDiskImage ( ) ; diskFromDB.setReadOnly ( false ) ; diskFromDB.setDiskInterface ( DiskInterface.IDE ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( diskFromDB ) ; initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , updatedDisk ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_IDE_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ; }

Target:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
private java.lang.String getSubResourceEntityName ( java.lang.String parent , java.lang.String collectionName ) { java.lang.String publicEntityName = getPublicEntity ( org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName ) , false ) ; if ( publicEntityName == null ) { publicEntityName = getPublicEntity ( org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName.replace ( parent , "" ) ) ) ; } return publicEntityName ; }

Target:
private java.lang.String getSubResourceEntityName ( java.lang.String parent , java.lang.String collectionName , java.lang.String [ ] periods , int i ) { java.lang.String publicEntityName = getPublicEntity ( org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName ) , periods , i , false ) ; if ( publicEntityName == null ) { publicEntityName = getPublicEntity ( org.ovirt.engine.sdk.codegen.utils.StringUtils.toSingular ( collectionName.replace ( parent , "" ) ) , periods , i ) ; } return publicEntityName ; }
Source:
private void checkKdumpIntegrationStatus ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vdsSt = org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) ; if ( ( vdsSt.isPmEnabled ( ) ) && ( vdsSt.isPmKdumpDetection ( ) ) ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDyn = vdsDynamicDao.get ( vdsSt.getId ( ) ) ; if ( ( vdsDyn != null ) && ( ( vdsDyn.getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { auditLogDirector.log ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vdsSt.getId ( ) ) , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } } }

Target:
private void checkKdumpIntegrationStatus ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vdsSt = org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) ; if ( ( vdsSt.isPmEnabled ( ) ) && ( vdsSt.isPmKdumpDetection ( ) ) ) { org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDyn = vdsDynamicDao.get ( vdsSt.getId ( ) ) ; if ( ( vdsDyn != null ) && ( ( vdsDyn.getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { auditLogDirector.log ( org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vdsSt.getId ( ) ) ) , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } } }
Source:
private boolean isCompatibleAgentExists ( java.util.List < org.ovirt.engine.core.common.businessentities.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup , java.util.List < java.lang.String > messages ) { for ( org.ovirt.engine.core.common.businessentities.FenceAgent agent : fenceAgents ) { if ( isFenceAgentVersionCompatible ( agent , vdsGroup.getCompatibilityVersion ( ) . toString ( ) , messages ) ) { return true ; } } return false ; }

Target:
private boolean isCompatibleAgentExists ( java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > fenceAgents , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup , java.util.List < java.lang.String > messages ) { for ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent : fenceAgents ) { if ( isFenceAgentVersionCompatible ( agent , vdsGroup.getCompatibilityVersion ( ) . toString ( ) , messages ) ) { return true ; } } return false ; }
Source:
public void onTimer ( ) { try { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Start deleteAgedOutAuditLogs" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.AuditLogAgingThreshold ) ) * ( - 1 ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAuditLogDao ( ) . removeAllBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Finished deleteAgedOutAuditLogs" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.error ( "deleteAgedOutAuditLog failed with exception" , e ) ; } }

Target:
public void onTimer ( ) { try { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Start deleteAgedOutAuditLogs" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . addDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.AuditLogAgingThreshold ) ) * ( - 1 ) ) ) ; auditLogDao.removeAllBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Finished deleteAgedOutAuditLogs" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.error ( "deleteAgedOutAuditLog failed with exception" , e ) ; } }
Source:
public static void GetClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetAllowClusterWithVirtGlusterEnabled ( 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 ? source : java.lang.Boolean.TRUE ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.AllowClusterWithVirtGlusterEnabled , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void testSecuredEventMailSender ( ) { org.ovirt.engine.core.common.businessentities.event_audit_log_subscriber eventData = new org.ovirt.engine.core.common.businessentities.event_audit_log_subscriber ( ) ; eventData.setlog_time ( new java.util.Date ( ) ) ; eventData.setevent_type ( 0 ) ; eventData.setuser_name ( "a test user name" ) ; eventData.setvm_name ( "a fine test VM" ) ; eventData.setvds_name ( "a fine test host" ) ; eventData.setmethod_address ( "mailtest.redhat@gmail.com" ) ; eventData.setvm_template_name ( "a test template" ) ; eventData.setstorage_pool_name ( "a test storage pool name" ) ; eventData.setstorage_domain_name ( "a test storage pool domain" ) ; eventData.setseverity ( 3 ) ; org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl mailSender = new org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl ( org.ovirt.engine.core.notifier.utils.mail.MailSenderTest.getSecuredMailProperties ( ) ) ; eventData.setmessage ( "a test message to be sent via secured mode" ) ; mailSender.send ( eventData , null ) ; org.ovirt.engine.core.notifier.utils.sender.EventSenderResult sentResult = null ; try { sentResult = mailSender.send ( eventData , null ) ; } catch ( java.lang.Exception e ) { sentResult = new org.ovirt.engine.core.notifier.utils.sender.EventSenderResult ( ) ; sentResult.setSent ( false ) ; } org.junit.Assert.assertTrue ( sentResult.isSent ( ) ) ; }

Target:
public void testSecuredEventMailSender ( ) { org.ovirt.engine.core.common.businessentities.EventAuditLogSubscriber eventData = new org.ovirt.engine.core.common.businessentities.EventAuditLogSubscriber ( ) ; eventData.setlog_time ( new java.util.Date ( ) ) ; eventData.setevent_type ( 0 ) ; eventData.setuser_name ( "a test user name" ) ; eventData.setvm_name ( "a fine test VM" ) ; eventData.setvds_name ( "a fine test host" ) ; eventData.setmethod_address ( "mailtest.redhat@gmail.com" ) ; eventData.setvm_template_name ( "a test template" ) ; eventData.setstorage_pool_name ( "a test storage pool name" ) ; eventData.setstorage_domain_name ( "a test storage pool domain" ) ; eventData.setseverity ( 3 ) ; org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl mailSender = new org.ovirt.engine.core.notifier.utils.sender.mail.EventSenderMailImpl ( org.ovirt.engine.core.notifier.utils.mail.MailSenderTest.getSecuredMailProperties ( ) ) ; eventData.setmessage ( "a test message to be sent via secured mode" ) ; mailSender.send ( eventData , null ) ; org.ovirt.engine.core.notifier.utils.sender.EventSenderResult sentResult = null ; try { sentResult = mailSender.send ( eventData , null ) ; } catch ( java.lang.Exception e ) { sentResult = new org.ovirt.engine.core.notifier.utils.sender.EventSenderResult ( ) ; sentResult.setSent ( false ) ; } org.junit.Assert.assertTrue ( sentResult.isSent ( ) ) ; }
Source:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void verifyCertificate ( org.ovirt.engine.api.model.VM model ) { assertNotNull ( model.getDisplay ( ) ) ; assertNotNull ( model.getDisplay ( ) . getCertificate ( ) ) ; assertEquals ( model.getDisplay ( ) . getCertificate ( ) . getSubject ( ) , org.ovirt.engine.api.restapi.resource.BackendVmResourceTest.CERTIFICATE ) ; }

Target:
private void verifyCertificate ( org.ovirt.engine.api.model.Vm model ) { assertNotNull ( model.getDisplay ( ) ) ; assertNotNull ( model.getDisplay ( ) . getCertificate ( ) ) ; assertEquals ( model.getDisplay ( ) . getCertificate ( ) . getSubject ( ) , org.ovirt.engine.api.restapi.resource.BackendVmResourceTest.CERTIFICATE ) ; }
Source:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster ) ( getDataCenterWithClustersList ( ) . getSelectedItem ( ) ) ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMaximalVmMemSize ( ) ; }

Target:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMaximalVmMemSize ( ) ; handleQxlClusterLevel ( ) ; }
Source:
private void cluster_SelectedItemChanged ( ) { if ( ( getCluster ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostList ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; postGetHostList ( hosts ) ; } } ) ) ; } }

Target:
private void cluster_SelectedItemChanged ( ) { if ( ( getCluster ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostList ( new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > ( ) { @ java.lang.Override public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { postGetHostList ( hosts ) ; } } ) ) ; } }
Source:
public boolean qosParametersEqual ( ) { if ( ( ifaceQos ) == ( hostNetworkQos ) ) { return true ; } boolean ifaceQosUnset = qosUnset ( ifaceQos ) ; boolean hostNetworkQosUnset = qosUnset ( hostNetworkQos ) ; if ( ifaceQosUnset && hostNetworkQosUnset ) { return true ; } if ( ifaceQosUnset != hostNetworkQosUnset ) { return false ; } return ( ( isOutAverageLinkShareInSync ( ) ) && ( isOutAverageUpperLimitInSync ( ) ) ) && ( isOutAverageRealTimeInSync ( ) ) ; }

Target:
private boolean isIpv6PrefixInSync ( ) { return java.util.Objects.equals ( iface.getIpv6Prefix ( ) , getIpv6PrimaryAddress ( ) . getPrefix ( ) ) ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeBrickListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel ( ) ) ; setDetailModels ( list ) ; }

Target:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeBrickListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
public void testGetAllWithPermissionsDisabledForUnpriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , false ) ; org.ovirt.engine.core.dao.VmTemplateDAOTest.assertGetAllResult ( result ) ; }

Target:
public void testGetAllWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true , VmEntityType.TEMPLATE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDAOTest.NUMBER_OF_TEMPLATES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingTemplate ) ; }