auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc validateStorageDomain ( java.lang.String sdUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.validateStorageDomain ( sdUUID ) ; 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 glusterHookAdd ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum , java.lang.Boolean enabled ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookAdd ( glusterCommand , stage , hookName , content , checksum , enabled ) ; 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 ) ; } }
Source:
public void getMaxNumOfVmSockets ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }

Target:
public void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }
Source:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getConnections ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connection1.setiqn ( connectionIqn1 ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection2 = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connection2.setiqn ( connectionIqn2 ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( connection1 , connection2 ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > getConnections ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connection1.setIqn ( connectionIqn1 ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection2 = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connection2.setIqn ( connectionIqn2 ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( connection1 , connection2 ) ) ; }
Source:
public boolean handle ( java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryResults ) { boolean result = true ; for ( org.ovirt.engine.api.extensions.ExtMap queryResult : queryResults ) { if ( ( principalRecords.size ( ) ) < ( org.ovirt.engine.core.aaa.AuthzUtils.QUERIES_RESULTS_LIMIT ) ) { principalRecords.add ( queryResult ) ; } else { result = false ; break ; } } return result ; }

Target:
public boolean handle ( java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > queryResults ) { boolean result = true ; for ( org.ovirt.engine.api.extensions.ExtMap queryResult : queryResults ) { if ( ( groups.size ( ) ) < ( org.ovirt.engine.core.aaa.AuthzUtils.QUERIES_RESULTS_LIMIT ) ) { groups.add ( queryResult ) ; } else { result = false ; } } return result ; }
Source:
private void assertCallToParametersCreationForVdsA ( ) { org.mockito.ArgumentCaptor < java.util.List > captor = org.mockito.ArgumentCaptor.forClass ( java.util.List.class ) ; org.mockito.Mockito.verify ( persistentHostSetupNetworksParametersFactory ) . create ( org.mockito.Matchers.eq ( vdsA.getId ( ) ) , captor.capture ( ) ) ; assertCollectionContainingOnlyThese ( captor.getValue ( ) , networkA , networkB ) ; }

Target:
private void assertCallToParametersCreationForVdsA ( ) { org.mockito.ArgumentCaptor < java.util.List > captor = org.mockito.ArgumentCaptor.forClass ( java.util.List.class ) ; org.mockito.Mockito.verify ( persistentHostSetupNetworksParametersFactory ) . create ( org.mockito.ArgumentMatchers.eq ( vdsA.getId ( ) ) , captor.capture ( ) ) ; assertCollectionContainingOnlyThese ( captor.getValue ( ) , networkA , networkB ) ; }
Source:
public void canDoActionFailsOnNullCluster ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookStatusChangeParameters ( null , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( null ) ) ) ; setupMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
void updateHelpCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.getView ( ) . setHelpCommand ( command ) ; }

Target:
protected void updateHelpTag ( T model ) { org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag = model.getHelpTag ( ) ; org.ovirt.engine.ui.uicommonweb.UICommand command = model.getOpenDocumentationCommand ( ) ; if ( ( ( command != null ) && ( helpTag != null ) ) && ( ( org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.getPath ( helpTag.name ( ) ) ) != null ) ) { command.setIsAvailable ( true ) ; org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.getView ( ) . setHelpCommand ( command ) ; } }
Source:
public void moveShareableDiskToGlusterDomain ( ) { initializeCommand ( ImageOperation.Move ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; initVmDiskImage ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS.toString ( ) ) ) ; }

Target:
public void moveShareableDiskToGlusterDomain ( ) { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; initVmDiskImage ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS.toString ( ) ) ) ; }
Source:
private void queryLabels ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkLabelsByDataCenterId ( getEntity ( ) . getStoragePoolId ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { dcLabels = ( ( java.util.SortedSet < java.lang.String > ) ( returnValue ) ) ; initNicModels ( ) ; stopProgress ( ) ; } } ) ) ; }

Target:
private void queryLabels ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkLabelsByDataCenterId ( getEntity ( ) . getStoragePoolId ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { dcLabels = ( ( java.util.SortedSet < java.lang.String > ) ( returnValue ) ) ; initLabelModels ( ) ; queryNetworks ( ) ; } } ) ) ; }
Source:
public static void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
private void newEntity ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateInterfaceModel.createInstance ( getEntityStronglyTyped ( ) , getEntityStronglyTyped ( ) . getStoragePoolId ( ) , cluster.getcompatibility_version ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }

Target:
private void newEntity ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateInterfaceModel.createInstance ( getEntityStronglyTyped ( ) , getEntityStronglyTyped ( ) . getStoragePoolId ( ) , cluster.getCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }
Source:
org.ovirt.engine.core.bll.ValidationResult validateNotRemovingUsedNetworkByVms ( ) { java.util.Collection < java.lang.String > removedNetworks = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment : removedNetworkAttachments ) { removedNetworks.add ( existingNetworkRelatedToAttachment ( removedAttachment ) . getName ( ) ) ; } java.util.List < java.lang.String > vmNames = getVmInterfaceManager ( ) . findActiveVmsUsingNetworks ( host.getId ( ) , removedNetworks ) ; if ( vmNames.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS , commaSeparated ( vmNames ) ) ; } }

Target:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( org.ovirt.engine.core.compat.Guid violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }
Source:
private void resetIrs ( ) { if ( ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getspm_vds_id ( ) ) != null ) { org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getspm_vds_id ( ) ) ; tempVar.setIgnoreStopFailed ( true ) ; runVdsCommand ( VDSCommandType.ResetIrs , tempVar ) ; } }

Target:
private void resetIrs ( ) { if ( ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getspm_vds_id ( ) ) != null ) { org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getspm_vds_id ( ) ) ; tempVar.setVdsAlreadyRebooted ( true ) ; runVdsCommand ( VDSCommandType.ResetIrs , tempVar ) ; } }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveAdGroup , org.ovirt.engine.core.common.action.AdElementParametersBase.class , new java.lang.String [ ] { "AdElementId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
public void testListCrash ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.QUERY , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }
Source:
private static javax.net.ssl.TrustManager [ ] createTrustManagers ( javax.net.ssl.TrustManager [ ] trustmanagers ) throws java.security.GeneralSecurityException { org.ovirt.engine.core.utils.ssl.AuthSSLProtocolSocketFactory.LOG.debug ( "Initializing trust manager" ) ; for ( int i = 0 ; i < ( trustmanagers.length ) ; i ++ ) { if ( ( trustmanagers [ i ] ) instanceof javax.net.ssl.X509TrustManager ) { trustmanagers [ i ] = new org.ovirt.engine.core.utils.ssl.AuthSSLX509TrustManager ( ( ( javax.net.ssl.X509TrustManager ) ( trustmanagers [ i ] ) ) ) ; } } return trustmanagers ; }

Target:
private static javax.net.ssl.TrustManager [ ] createTrustManagers ( javax.net.ssl.TrustManager [ ] trustmanagers ) throws java.security.GeneralSecurityException { org.ovirt.engine.core.utils.ssl.AuthSSLProtocolSocketFactory.log.debug ( "Initializing trust manager" ) ; for ( int i = 0 ; i < ( trustmanagers.length ) ; i ++ ) { if ( ( trustmanagers [ i ] ) instanceof javax.net.ssl.X509TrustManager ) { trustmanagers [ i ] = new org.ovirt.engine.core.utils.ssl.AuthSSLX509TrustManager ( ( ( javax.net.ssl.X509TrustManager ) ( trustmanagers [ i ] ) ) ) ; } } return trustmanagers ; }
Source:
public void validateIsoPrefixNameForKernelAndNullForInitrd ( ) throws java.lang.Exception { java.lang.String kernel = "kernel" ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( null , ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) + kernel ) ) ; org.junit.Assert.assertEquals ( vm.getinitrd_url ( ) , null ) ; org.junit.Assert.assertEquals ( vm.getkernel_url ( ) , ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ACTIVE_ISO_PREFIX ) + "/" ) + kernel ) ) ; }

Target:
public void validateIsoPrefixNameForKernelAndNullForInitrd ( ) throws java.lang.Exception { java.lang.String kernel = "kernel" ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( null , ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) + kernel ) ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , null ) ; org.junit.Assert.assertEquals ( vm.getKernelUrl ( ) , ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ACTIVE_ISO_PREFIX ) + "/" ) + kernel ) ) ; }
Source:
public static void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
private void networkNotUsedByTemplatesTest ( org.ovirt.engine.core.bll.ValidationResult expected , java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { org.ovirt.engine.core.dao.VmTemplateDAO templateDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmTemplateDAO.class ) ; org.mockito.Mockito.when ( templateDao.getAllForNetwork ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( templates ) ; org.mockito.Mockito.when ( dbFacade.getVmTemplateDao ( ) ) . thenReturn ( templateDao ) ; org.junit.Assert.assertEquals ( expected.getMessage ( ) , validator.networkNotUsedByTemplates ( ) . getMessage ( ) ) ; }

Target:
private void networkNotUsedByTemplatesTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { org.ovirt.engine.core.dao.VmTemplateDAO templateDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmTemplateDAO.class ) ; org.mockito.Mockito.when ( templateDao.getAllForNetwork ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( templates ) ; org.mockito.Mockito.when ( dbFacade.getVmTemplateDao ( ) ) . thenReturn ( templateDao ) ; org.junit.Assert.assertThat ( validator.networkNotUsedByTemplates ( ) , matcher ) ; }
Source:
public void testGetFilteredWithoutPermissionsNoFilter ( ) { org.ovirt.engine.core.common.businessentities.Disk result = dao.get ( getExistingEntityId ( ) , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , false ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( getExistingEntityId ( ) . toString ( ) , result.getId ( ) . toString ( ) ) ; }

Target:
public void testGetFilteredWithoutPermissionsNoFilter ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk result = dao.get ( getExistingEntityId ( ) , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_ID , false ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( getExistingEntityId ( ) . toString ( ) , result.getId ( ) . toString ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getStepMessageMap ( ) { java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; values.put ( GlusterConstants.CLUSTER , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getVdsGroupName ( ) ) ; values.put ( GlusterConstants.VOLUME , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getGlusterVolumeName ( ) ) ; values.put ( "status" , JobExecutionStatus.STARTED.toString ( ) ) ; values.put ( "info" , " " ) ; return values ; }

Target:
protected java.util.Map < java.lang.String , java.lang.String > getStepMessageMap ( org.ovirt.engine.core.common.job.JobExecutionStatus status ) { java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; values.put ( GlusterConstants.CLUSTER , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getVdsGroupName ( ) ) ; values.put ( GlusterConstants.VOLUME , org.ovirt.engine.core.bll.gluster.GlusterAsyncCommandBase.getGlusterVolumeName ( ) ) ; values.put ( "status" , status.toString ( ) ) ; values.put ( "info" , " " ) ; return values ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult masterDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , boolean isReconstructToInactiveDomains , boolean canReconstructToCurrentMaster ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = new org.ovirt.engine.core.common.action.ReconstructMasterParameters ( storagePoolId , storageDomainId , true , isReconstructToInactiveDomains , canReconstructToCurrentMaster ) ; boolean isSucceeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ReconstructMasterDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult masterDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , boolean isReconstructToInactiveDomains , boolean canReconstructToCurrentMaster ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = new org.ovirt.engine.core.common.action.ReconstructMasterParameters ( storagePoolId , storageDomainId , true , isReconstructToInactiveDomains , canReconstructToCurrentMaster ) ; boolean isSucceeded = backend.runInternalAction ( VdcActionType.ReconstructMasterDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "IsAvailable" . equals ( args.propertyName ) ) { vCenter.setIsAvailable ( getIsAvailable ( ) ) ; esx.setIsAvailable ( getIsAvailable ( ) ) ; vmwareDatacenter.setIsAvailable ( getIsAvailable ( ) ) ; verifySSL.setIsAvailable ( getIsAvailable ( ) ) ; proxyHost.setIsAvailable ( getIsAvailable ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "IsAvailable" . equals ( args.propertyName ) ) { vCenter.setIsAvailable ( getIsAvailable ( ) ) ; esx.setIsAvailable ( getIsAvailable ( ) ) ; vmwareDatacenter.setIsAvailable ( getIsAvailable ( ) ) ; vmwareCluster.setIsAvailable ( getIsAvailable ( ) ) ; verifySSL.setIsAvailable ( getIsAvailable ( ) ) ; proxyHost.setIsAvailable ( getIsAvailable ( ) ) ; } }
Source:
public void loadVmsFromXen ( ) { clearProblem ( ) ; if ( ! ( validateXenConfiguration ( ) ) ) { return ; } loadVMsFromExternalProvider ( OriginType.XEN , getXenUri ( ) . getEntity ( ) , "" , "" ) ; }

Target:
public void loadVmsFromXen ( ) { clearProblem ( ) ; if ( ! ( validateXenConfiguration ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid proxyId = ( ( getXenProxyHosts ( ) . getSelectedItem ( ) ) != null ) ? getXenProxyHosts ( ) . getSelectedItem ( ) . getId ( ) : null ; loadVMsFromExternalProvider ( OriginType.XEN , getXenUri ( ) . getEntity ( ) , "" , "" , proxyId ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM basicVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setMinAllocatedMem ( 8800 ) ; vm.setVmMemSizeMb ( 8800 ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM basicVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setMinAllocatedMem ( 8800 ) ; vm.setVmMemSizeMb ( 8800 ) ; vm.setClusterArch ( ArchitectureType.x86_64 ) ; vm.setGuestOsType ( OsType.Linux ) ; vm.setVmOs ( 24 ) ; return vm ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkListModel networkListModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkListModel ) ( result1.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } networkListModel1.PostNetworkAction ( ( succeeded ? ( ( org.ovirt.engine.core.compat.Guid ) ( retVal.getActionReturnValue ( ) ) ) : null ) , succeeded ) ; }

Target:
public void apply ( ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.EditNetworkModel ) ( getWindow ( ) ) ) ; model.apply ( ) ; }
Source:
public org.ovirt.engine.sdk.decorators.VMHostDevice add ( org.ovirt.engine.sdk.decorators.HostDevice hostdevice ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , hostdevice , org.ovirt.engine.sdk.entities.HostDevice.class , org.ovirt.engine.sdk.decorators.VMHostDevice.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.TemplateNic add ( org.ovirt.engine.sdk.decorators.Nic nic ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , nic , org.ovirt.engine.sdk.entities.Nic.class , org.ovirt.engine.sdk.decorators.TemplateNic.class , headers ) ; }
Source:
private void doTestBadAddTag ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.AddTag , org.ovirt.engine.core.common.action.TagsOperationParameters.class , new java.lang.String [ ] { "Tag.TagName" , "Tag.ParentId" } , new java.lang.Object [ ] { NAMES [ 0 ] , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.PARENT_GUID } , valid , success ) ) ; try { collection.add ( org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddTag ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.AddTag , org.ovirt.engine.core.common.action.TagsOperationParameters.class , new java.lang.String [ ] { "Tag.TagName" , "Tag.ParentId" } , new java.lang.Object [ ] { NAMES [ 0 ] , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.PARENT_GUID } , valid , success ) ) ; try { collection.add ( org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( masterDomain.getStorageStaticData ( ) ) ; masterDomain.setstorage_domain_type ( StorageDomainType.Data ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . update ( masterDomain.getStorageStaticData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( getStoragePool ( ) ) ; handleDestroyStoragePoolCommand ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.VmPool selectedItem ) { org.ovirt.engine.ui.webadmin.section.main.view.tab.pool.SubTabPoolGeneralView.Driver.driver.edit ( getDetailModel ( ) ) ; monitorCount.setText ( java.lang.String.valueOf ( getDetailModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getDetailModel ( ) . getIsStateless ( ) ) ) ; formBuilder.showForm ( getDetailModel ( ) ) ; }

Target:
public void setMainTabSelectedItem ( org.ovirt.engine.core.common.businessentities.VmPool selectedItem ) { driver.edit ( getDetailModel ( ) ) ; monitorCount.setText ( java.lang.String.valueOf ( getDetailModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getDetailModel ( ) . getIsStateless ( ) ) ) ; formBuilder.update ( getDetailModel ( ) ) ; }
Source:
public java.lang.String getUrl ( ) { return org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmsModel.getVmwareUrl ( null , getvCenter ( ) . getEntity ( ) , getVmwareDatacenter ( ) . getEntity ( ) , getEsx ( ) . getEntity ( ) , getVerifySSL ( ) . getEntity ( ) ) ; }

Target:
public java.lang.String getUrl ( ) { return org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmsModel.getVmwareUrl ( null , getvCenter ( ) . getEntity ( ) , getVmwareDatacenter ( ) . getEntity ( ) , getVmwareCluster ( ) . getEntity ( ) , getEsx ( ) . getEntity ( ) , getVerifySSL ( ) . getEntity ( ) ) ; }
Source:
public void migrationSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void migrationSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void updateVmDevicesNull ( ) { updater.updateVmDevices ( java.util.Collections.singletonList ( "" ) ) ; junit.framework.Assert.assertEquals ( "wrong number of new devices" , 0 , updater.getNewVmDevices ( ) . size ( ) ) ; junit.framework.Assert.assertEquals ( "wrong number of removed devices" , 0 , updater.getRemovedVmDevices ( ) . size ( ) ) ; }

Target:
private void initConditions ( ) { org.mockito.Mockito.when ( dbFacade.getVdsGroupDao ( ) ) . thenReturn ( groupDAO ) ; org.mockito.Mockito.when ( dbFacade.getAuditLogDao ( ) ) . thenReturn ( mockAuditLogDao ) ; org.mockito.Mockito.when ( groupDAO.get ( ( ( org.ovirt.engine.core.compat.Guid ) ( org.mockito.Matchers.any ( ) ) ) ) ) . thenReturn ( cluster ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult callHasUniqueName ( org.ovirt.engine.core.compat.Guid macPool1Id , org.ovirt.engine.core.compat.Guid macPool2Id , java.lang.String macPool1Name , java.lang.String macPool2Name ) { org.mockito.Mockito.when ( macPoolDaoMock.getAll ( ) ) . thenReturn ( java.util.Arrays.asList ( createMacPool ( macPool1Id , macPool1Name ) ) ) ; return new org.ovirt.engine.core.bll.MacPoolValidator ( createMacPool ( macPool2Id , macPool2Name ) ) . hasUniqueName ( ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult callHasUniqueName ( org.ovirt.engine.core.compat.Guid macPool1Id , org.ovirt.engine.core.compat.Guid macPool2Id , java.lang.String macPool1Name , java.lang.String macPool2Name ) { final org.ovirt.engine.core.common.businessentities.MacPool existingMacPool = new org.ovirt.engine.core.common.businessentities.MacPool ( ) ; existingMacPool.setId ( macPool1Id ) ; existingMacPool.setName ( macPool1Name ) ; org.mockito.Mockito.when ( macPoolDaoMock.getAll ( ) ) . thenReturn ( java.util.Arrays.asList ( existingMacPool ) ) ; macPool.setId ( macPool2Id ) ; macPool.setName ( macPool2Name ) ; return macPoolValidator.hasUniqueName ( ) ; }
Source:
public void init ( final T model ) { super . init ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propertyName ) ) { getView ( ) . setMessageLabel ( model.getMessage ( ) ) ; } } } ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . toggleProfilesVisibility ( ( ( java.lang.Boolean ) ( model.getIsVmNetwork ( ) . getEntity ( ) ) ) ) ; }
Source:
public void getUserIdVdcUserId ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.users.VdcUser u = new org.ovirt.engine.core.common.users.VdcUser ( ) ; u.setUserId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setCurrentUser ( u ) ; final org.ovirt.engine.core.compat.Guid g = b.getUserId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }

Target:
public void getUserIdVdcUserId ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.DbUser u = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; u.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setCurrentUser ( u ) ; final org.ovirt.engine.core.compat.Guid g = b.getUserId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }
Source:
java.lang.String resolveMessage ( java.lang.String message , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ) { java.lang.String returnValue = message ; if ( logable != null ) { java.util.Map < java.lang.String , java.lang.String > map = getAvailableValues ( message , logable ) ; returnValue = resolveMessage ( message , map ) ; } return returnValue ; }

Target:
static java.lang.String resolveMessage ( java.lang.String message , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ) { java.lang.String returnValue = message ; if ( logable != null ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getAvailableValues ( message , logable ) ; returnValue = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resolveMessage ( message , map ) ; } return returnValue ; }
Source:
public void testWarnOnActiveVmPositive ( ) { testWarnOnActiveVmInner ( true ) ; org.mockito.Mockito.verify ( mockAuditLogDirector ) . log ( auditLogableCaptor.capture ( ) , org.mockito.ArgumentMatchers.same ( AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM ) ) ; final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable actualLoggable = auditLogableCaptor.getValue ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_CLUSTER_NAME , actualLoggable.getClusterName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_NETWORK_NAME , actualLoggable.getCustomValues ( ) . get ( "networkname" ) ) ; }

Target:
public void testWarnOnActiveVmPositive ( ) { testWarnOnActiveVmInner ( true ) ; org.mockito.Mockito.verify ( mockAuditLogDirector ) . log ( auditLogableCaptor.capture ( ) , org.mockito.ArgumentMatchers.same ( AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM ) ) ; final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable actualLoggable = auditLogableCaptor.getValue ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_CLUSTER_NAME , actualLoggable.getClusterName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_NETWORK_NAME , actualLoggable.getCustomValues ( ) . get ( "networkname" ) ) ; }
Source:
private static org.ovirt.engine.core.common.action.AddDiskParameters createParameters ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setDiskInterface ( DiskInterface.IDE ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = new org.ovirt.engine.core.common.action.AddDiskParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , image ) ; return parameters ; }

Target:
private static org.ovirt.engine.core.common.action.AddDiskParameters createParameters ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setDiskInterface ( DiskInterface.IDE ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = new org.ovirt.engine.core.common.action.AddDiskParameters ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( null , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , image ) ; return parameters ; }
Source:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableHaReservationEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }

Target:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableHaReservationEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableOptionalReasonEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }
Source:
public void autoLogin ( org.ovirt.engine.core.common.users.VdcUser user ) { loggingInAutomatically = true ; getUserName ( ) . setEntity ( user.getUserName ( ) ) ; getDomain ( ) . setSelectedItem ( user.getDomainControler ( ) ) ; disableLoginScreen ( ) ; setLoggedUser ( user ) ; raiseLoggedInEvent ( ) ; }

Target:
public void autoLogin ( org.ovirt.engine.core.common.businessentities.DbUser user ) { loggingInAutomatically = true ; getUserName ( ) . setEntity ( user.getLoginName ( ) ) ; getDomain ( ) . setSelectedItem ( user.getDomain ( ) ) ; disableLoginScreen ( ) ; setLoggedUser ( user ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . setLoggedInUser ( user ) ; raiseLoggedInEvent ( ) ; }