auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void createSnapshotsForDisks ( org.ovirt.engine.core.compat.Guid vmSnapshotId ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getDisksList ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateSnapshot , buildCreateSnapshotParameters ( image , vmSnapshotId ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getExecutionContext ( ) ) ) ; if ( vdcReturnValue.getSucceeded ( ) ) { org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; } else { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcReturnValue.getFault ( ) . getError ( ) , "CreateAllSnapshotsFromVmCommand::executeVmCommand: Failed to create snapshot!" ) ; } } }

Target:
private void createSnapshotsForDisks ( org.ovirt.engine.core.compat.Guid vmSnapshotId ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : getDisksList ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = executeChildCommand ( image.getImageId ( ) ) ; if ( vdcReturnValue.getSucceeded ( ) ) { getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; } else { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( vdcReturnValue.getFault ( ) . getError ( ) , "Failed to create snapshot!" ) ; } } }
Source:
private void assertGeneratesCorrect ( int maxNameLengt , int poolNameLength , int expectedMaxNumOfVms ) { org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation validation = new org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation ( "" , 0 , org.ovirt.engine.core.common.osinfo.OsRepository.DEFAULT_X86_OS ) ; int res = validation.doGenerateMaxLength ( maxNameLengt , poolNameLength ) ; org.junit.Assert.assertThat ( res , org.hamcrest.core.Is.is ( org.hamcrest.core.IsEqual.equalTo ( expectedMaxNumOfVms ) ) ) ; }

Target:
private void assertGeneratesCorrect ( int maxNameLength , int poolNameLength , int expectedMaxNumOfVms ) { org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation validation = new org.ovirt.engine.ui.uicommonweb.validation.ExistingPoolNameLengthValidation ( "" , 0 , org.ovirt.engine.core.common.osinfo.OsRepository.DEFAULT_X86_OS ) ; int res = validation.doGenerateMaxNumOfVms ( maxNameLength , poolNameLength ) ; org.junit.Assert.assertThat ( res , org.hamcrest.core.Is.is ( org.hamcrest.core.IsEqual.equalTo ( expectedMaxNumOfVms ) ) ) ; }
Source:
public synchronized void UpdateTaskWithActionParameters ( org.ovirt.engine.core.compat.Guid taskID , org.ovirt.engine.core.common.action.VdcActionParametersBase actionParameters ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks currentDbAsyncTask = _tasks.get ( taskID ) . getParameters ( ) . getDbAsyncTask ( ) ; currentDbAsyncTask.setaction_parameters ( actionParameters ) ; org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.updateAsyncTaskInDB ( _tasks.get ( taskID ) ) ; } }

Target:
public synchronized void UpdateTaskWithActionParameters ( org.ovirt.engine.core.compat.Guid taskID , org.ovirt.engine.core.common.action.VdcActionParametersBase actionParameters ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks currentDbAsyncTask = _tasks.get ( taskID ) . getParameters ( ) . getDbAsyncTask ( ) ; currentDbAsyncTask.setActionParameters ( actionParameters ) ; org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.updateAsyncTaskInDB ( _tasks.get ( taskID ) ) ; } }
Source:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public static java.lang.String createCorrelationId ( java.lang.String actionDescription ) { actionDescription = actionDescription.replace ( ' ' , '_' ) ; java.util.Random rand = new java.util.Random ( ) ; java.lang.String hashStr = ( ( rand.nextInt ( 9000000 ) ) + 9999999 ) + "" ; java.lang.String correlationId = ( ( ( org.ovirt.engine.ui.uicommonweb.models.events.TaskListModel._WEBADMIN_ ) + hashStr ) + "_" ) + actionDescription ; return correlationId ; }

Target:
public static java.lang.String createCorrelationId ( java.lang.String actionDescription ) { actionDescription = actionDescription.replace ( ' ' , '_' ) ; java.util.Random rand = new java.util.Random ( ) ; java.lang.String hashStr = ( ( rand.nextInt ( 9000000 ) ) + 9999999 ) + "" ; java.lang.String correlationId = ( ( ( org.ovirt.engine.ui.uicommonweb.models.events.TaskListModel.WEBADMIN ) + hashStr ) + "_" ) + actionDescription ; return correlationId ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createLowerVersionStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createBasicPool ( ) ; pool.setIsLocal ( true ) ; pool.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; return pool ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setName ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }
Source:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageById ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }

Target:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network mockExistingNetwork ( java.lang.String networkName ) { java.util.List < org.ovirt.engine.core.common.businessentities.network > existingNets = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ( ) ; org.ovirt.engine.core.common.businessentities.network network = new org.ovirt.engine.core.common.businessentities.network ( "" , "" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , networkName , "" , "" , 0 , 100 , false , 0 , true ) ; existingNets.add ( network ) ; org.mockito.Mockito.when ( networkDAO.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( existingNets ) ; return network ; }

Target:
private org.ovirt.engine.core.common.businessentities.network mockExistingNetwork ( java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network network = new org.ovirt.engine.core.common.businessentities.network ( "" , "" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , networkName , "" , "" , 0 , 100 , false , 0 , true ) ; org.mockito.Mockito.when ( networkDAO.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( network ) ) ; return network ; }
Source:
private int getOccupiedVmSlots ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.String > parameters ) { int occupiedSlots = vds.getVmActive ( ) ; final int SPMVMCountGrace = org.apache.commons.lang.math.NumberUtils.toInt ( parameters.get ( "SpmVmGrace" ) , spmVmGrace ) ; if ( vds.isSpm ( ) ) occupiedSlots += SPMVMCountGrace ; return occupiedSlots ; }

Target:
private int getOccupiedVmSlots ( org.ovirt.engine.core.common.businessentities.VDS vds , java.util.Map < java.lang.String , java.lang.String > parameters ) { int occupiedSlots = vds.getVmActive ( ) ; final int SPMVMCountGrace = org.apache.commons.lang.math.NumberUtils.toInt ( parameters.get ( PolicyUnitParameter.SPM_VM_GRACE.getDbName ( ) ) , spmVmGrace ) ; if ( vds.isSpm ( ) ) { occupiedSlots += SPMVMCountGrace ; } return occupiedSlots ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc movePV ( java.lang.String jobId , java.lang.String sdUUID , java.lang.String device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.movePV" ) . withParameter ( "jobID" , jobId ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "guid" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn moveDomainDevice ( java.lang.String jobId , java.util.Map < java.lang.String , java.lang.Object > moveParams ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.move_domain_device" ) . withParameter ( "job_id" , jobId ) . withParameter ( "move_params" , moveParams ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
private void verifyDataCenterNetworks ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > result ) { org.ovirt.engine.core.dao.network.NetworkDaoTest.assertGetAllForClusterResult ( result ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : result ) { org.junit.Assert.assertEquals ( datacenter , net.getDataCenterId ( ) ) ; } }

Target:
private void verifyDataCenterNetworks ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : result ) { org.junit.Assert.assertEquals ( datacenter , net.getDataCenterId ( ) ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( ( ( ipConfiguration != null ) && ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) && ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) && ( unsetAddress ( ipConfiguration ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult notExternalNetwork ( ) { org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.EXTERNAL_NETWORK_HAVING_NAME_CANNOT_BE_PROVISIONED ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , getNetwork ( ) . getName ( ) ) ) . when ( getNetwork ( ) . isExternal ( ) ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , org.ovirt.engine.api.model.Disk entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetAllDisksByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID } , entity ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , org.ovirt.engine.api.model.Disk entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , entity ) ; } }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.ActionGroup > > aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public void vdsNonOperational ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , boolean logCommand , org.ovirt.engine.core.compat.Guid domainId ) { vdsNonOperational ( vdsId , reason , logCommand , domainId , null ) ; }

Target:
public void vdsNonOperational ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , boolean logCommand , org.ovirt.engine.core.compat.Guid domainId ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( domainId ) ; java.util.Map < java.lang.String , java.lang.String > customLogValues = null ; if ( storageDomain != null ) { customLogValues = java.util.Collections.singletonMap ( "StorageDomainNames" , storageDomain.getName ( ) ) ; } vdsNonOperational ( vdsId , reason , logCommand , domainId , customLogValues ) ; }
Source:
public org.ovirt.engine.api.model.Groups list ( ) { return mapDomainGroupsCollection ( getGroupsFromDomain ( ) ) ; }

Target:
private java.lang.String getSearchPattern ( ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , org.ovirt.engine.core.common.businessentities.LdapGroup.class , false ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( org.ovirt.engine.api.restapi.resource.BackendDomainGroupsResource.SEARCH_TEMPLATE , parent.getDirectory ( ) . getName ( ) ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=*" : constraint ) ) ; return sb.toString ( ) ; }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void alertPowerManagementStatusFailed ( java.lang.String reason ) { }

Target:
private void setupCommand ( org.ovirt.engine.core.common.vdscommands.FenceVdsVDSCommandParameters params ) { command = new org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand < org.ovirt.engine.core.common.vdscommands.FenceVdsVDSCommandParameters > ( params ) { @ java.lang.Override protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { return broker ; } @ java.lang.Override protected org.ovirt.engine.core.common.businessentities.VdsStatic getAndSetVdsStatic ( ) { return targetVdsStatic ; } @ java.lang.Override protected void alertActionSkippedAlreadyInStatus ( ) { } } ; }
Source:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }

Target:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.coloredText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.TEXT_COLOR ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( generatePreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Preallocated ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Preallocated ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; image.setContentType ( DiskContentType.MEMORY_METADATA_VOLUME ) ; return image ; }
Source:
public static void GetVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void GetVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void logAgentFailure ( final org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result ) { if ( ! ( wasSkippedDueToPolicy ( result ) ) ) { log.error ( "Failed to host using fence agent (if other agents are running, may still succeed)." , getAction ( ) . name ( ) . toLowerCase ( ) , ( ( result.getFenceAgentUsed ( ) . getId ( ) ) == null ? "New Agent (no ID)" : result.getFenceAgentUsed ( ) . getId ( ) ) , getAction ( ) . name ( ) . toLowerCase ( ) ) ; } }

Target:
private void handleResult ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result ) { switch ( result.getStatus ( ) ) { case SKIPPED_DUE_TO_POLICY : org.ovirt.engine.core.bll.FenceVdsBaseCommand.setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( false ) ; break ; case SUCCESS : handleSpecificCommandActions ( ) ; org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( true ) ; break ; default : org.ovirt.engine.core.bll.FenceVdsBaseCommand.setSucceeded ( false ) ; } setActionReturnValue ( result ) ; }
Source:
protected void onEntityContentChanged ( ) { super . onEntityContentChanged ( ) ; if ( ( ( getEntity ( ) ) != null ) && ( ! ( ( getEntity ( ) ) instanceof org.ovirt.engine.core.common.businessentities.vm_pools ) ) ) { getSearchCommand ( ) . Execute ( ) ; } else { setItems ( null ) ; } }

Target:
protected void onEntityContentChanged ( ) { super . onEntityContentChanged ( ) ; if ( ( ( getEntity ( ) ) != null ) && ( ! ( ( getEntity ( ) ) instanceof org.ovirt.engine.core.common.businessentities.VmPool ) ) ) { getSearchCommand ( ) . Execute ( ) ; } else { setItems ( null ) ; } }
Source:
public void setOpenStackAgentProperties ( org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties properties ) { _openStackAgentProperties = properties ; if ( ( _openStackAgentProperties ) != null ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_SETUP ) ; if ( _openStackAgentProperties.isLinuxBridge ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_LINUX_BRIDGE_SETUP ) ; } else if ( _openStackAgentProperties.isOpenVSwitch ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_OPEN_VSWITCH_SETUP ) ; } } }

Target:
public void setOpenStackAgentProperties ( org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties properties ) { _openStackAgentProperties = properties ; if ( ( _openStackAgentProperties ) != null ) { _messagingConfiguration = _openStackAgentProperties.getAgentConfiguration ( ) . getMessagingConfiguration ( ) ; _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_SETUP ) ; if ( _openStackAgentProperties.isLinuxBridge ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_LINUX_BRIDGE_SETUP ) ; } else if ( _openStackAgentProperties.isOpenVSwitch ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_OPEN_VSWITCH_SETUP ) ; } } }
Source:
protected org.ovirt.engine.core.common.businessentities.Erratum getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.Erratum erratum = control.createMock ( org.ovirt.engine.core.common.businessentities.Erratum.class ) ; org.easymock.EasyMock.expect ( erratum.getId ( ) ) . andReturn ( NAMES [ index ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( erratum.getDescription ( ) ) . andReturn ( DESCRIPTIONS [ index ] ) . anyTimes ( ) ; return erratum ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Erratum getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.Erratum erratum = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Erratum.class ) ; org.mockito.Mockito.when ( erratum.getId ( ) ) . thenReturn ( NAMES [ index ] ) ; org.mockito.Mockito.when ( erratum.getDescription ( ) ) . thenReturn ( DESCRIPTIONS [ index ] ) ; return erratum ; }
Source:
public void testResolveKnownVariable ( ) { final java.lang.String message = "This is my ${Variable}" ; final java.lang.String expectedResolved = "This is my value" ; java.util.Map < java.lang.String , java.lang.String > values = java.util.Collections.singletonMap ( "variable" , "value" ) ; java.lang.String resolvedMessage = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resolveMessage ( message , values ) ; org.junit.Assert.assertEquals ( expectedResolved , resolvedMessage ) ; }

Target:
public void testResolveKnownVariable ( ) { final java.lang.String message = "This is my ${Variable}" ; final java.lang.String expectedResolved = "This is my value" ; java.util.Map < java.lang.String , java.lang.String > values = java.util.Collections.singletonMap ( "variable" , "value" ) ; java.lang.String resolvedMessage = auditLogDirector.resolveMessage ( message , values ) ; org.junit.Assert.assertEquals ( expectedResolved , resolvedMessage ) ; }
Source:
protected void executeVmCommand ( ) { org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) , org.ovirt.engine.core.bll.UpdateVmDiskCommand.getVm ( ) ) ; if ( shouldResizeDiskImage ( ) ) { extendDiskImageSize ( ) ; } else { try { performDiskUpdate ( false ) ; } finally { org.ovirt.engine.core.bll.UpdateVmDiskCommand.freeLock ( ) ; } } }

Target:
protected void executeVmCommand ( ) { org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) , org.ovirt.engine.core.bll.UpdateVmDiskCommand.getVm ( ) ) ; if ( resizeDiskImageRequested ( ) ) { extendDiskImageSize ( ) ; } else { try { performDiskUpdate ( false ) ; } finally { org.ovirt.engine.core.bll.UpdateVmDiskCommand.freeLock ( ) ; } } }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( ( getProfile ( ) . getSelectedItem ( ) ) != null ) { namespacesMap = ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( result ) ) ; populateNamespaces ( ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { namespacesMap = ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( result ) ) ; populateProfiles ( getProfileEntries ( ) ) ; }
Source:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }

Target:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = prepareSetupNetworksParameters ( ) ; if ( ! ( parameters.isEmpty ( ) ) ) { runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }
Source:
public void getClusterList ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getClusterList ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { validateUpdate ( incoming , model ) ; performAction ( update , updateProvider.getParameters ( incoming , entity ) ) ; return addLinks ( populate ( map ( getEntity ( entityResolver , false ) ) , entity ) ) ; }

Target:
protected < T > Q doUpdate ( R incoming , Q entity , org.ovirt.engine.api.restapi.resource.EntityIdResolver < T > entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { performAction ( update , updateProvider.getParameters ( incoming , entity ) ) ; entity = getEntity ( entityResolver , false ) ; return entity ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { return createHostSetupNetworksValidator ( networks , new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addRemovedNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( nullParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getRemovedNetworkAttachments ( ) ) == null ) { parameters.setRemovedNetworkAttachments ( new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment : networkAttachments ) { parameters.getRemovedNetworkAttachments ( ) . add ( networkAttachment.getId ( ) ) ; } return this ; }
Source:
public java.lang.Boolean getValue ( ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getNetworksTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel clusterNetworkManageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel ) ( model ) ) ; if ( canEditAssign ( clusterNetworkManageModel ) ) { if ( ! ( clusterNetworkManageModel.isAttached ( ) ) ) { return false ; } } } return true ; }

Target:
public java.lang.Boolean getValue ( ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getNetworksTableItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkManageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel ) ( model ) ) ; if ( canEditAssign ( clusterNetworkManageModel ) ) { if ( ! ( clusterNetworkManageModel.isAttached ( ) ) ) { return false ; } } } return true ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > fetchVolumes ( org.ovirt.engine.core.common.businessentities.VDS upServer , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > existingServers ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > fetchedVolumes = null ; while ( ( fetchedVolumes == null ) && ( ( existingServers.size ( ) ) > 0 ) ) { fetchedVolumes = fetchVolumes ( upServer ) ; if ( fetchedVolumes == null ) { logServerMessage ( upServer , AuditLogType.GLUSTER_VOLUME_INFO_FAILED ) ; setNonOperational ( upServer ) ; existingServers.remove ( upServer ) ; upServer = getNewUpServer ( existingServers , upServer ) ; } } return fetchedVolumes ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > fetchVolumes ( org.ovirt.engine.core.common.businessentities.VDS upServer , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > existingServers ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > fetchedVolumes = null ; while ( ( fetchedVolumes == null ) && ( ( existingServers.size ( ) ) > 0 ) ) { fetchedVolumes = fetchVolumes ( upServer ) ; if ( fetchedVolumes == null ) { logUtil.logServerMessage ( upServer , AuditLogType.GLUSTER_VOLUME_INFO_FAILED ) ; setNonOperational ( upServer ) ; existingServers.remove ( upServer ) ; upServer = getNewUpServer ( existingServers , upServer ) ; } } return fetchedVolumes ; }
Source:
private void collectVmPrestartFailureReasons ( java.util.Map < java.lang.String , java.lang.Integer > failureReasons , java.util.List < java.lang.String > messages ) { if ( org.ovirt.engine.core.bll.VmPoolMonitor.log.isInfoEnabled ( ) ) { java.lang.String reason = messages.stream ( ) . filter ( ErrorMessageUtils :: isMessage ) . collect ( java.util.stream.Collectors.joining ( ", " ) ) ; java.lang.Integer count = failureReasons.get ( reason ) ; failureReasons.put ( reason , ( count == null ? 1 : count + 1 ) ) ; } }

Target:
private void collectVmPrestartFailureReasons ( java.util.Map < java.lang.String , java.lang.Integer > failureReasons , java.util.List < java.lang.String > messages ) { if ( org.ovirt.engine.core.bll.VmPoolMonitor.log.isInfoEnabled ( ) ) { java.lang.String reason = messages.stream ( ) . filter ( EngineMessage :: contains ) . collect ( java.util.stream.Collectors.joining ( ", " ) ) ; java.lang.Integer count = failureReasons.get ( reason ) ; failureReasons.put ( reason , ( count == null ? 1 : count + 1 ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { testServlet = new org.ovirt.engine.core.WelcomeServlet ( ) ; testServlet.setBackend ( mockBackend ) ; mockBackendQuery ( VdcQueryType.GetConfigurationValue , "oVirtVersion" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { testServlet = new org.ovirt.engine.core.WelcomeServlet ( ) ; testServlet.setBackend ( mockBackend ) ; testServlet.init ( mockBrandingManager ) ; mockBackendQuery ( VdcQueryType.GetConfigurationValue , "oVirtVersion" ) ; org.mockito.Mockito.when ( mockBrandingManager.getBrandingThemes ( ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.utils.branding.BrandingTheme > ( ) ) ; org.mockito.Mockito.when ( mockBrandingManager.getWelcomeSections ( org.mockito.Matchers.any ( java.util.Locale.class ) ) ) . thenReturn ( "Welcome Section HTML" ) ; }
Source:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }

Target:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }
Source:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( providerId , filterOutExistingHosts , searchFilter ) , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.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.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private void addStyles ( ) { migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; }

Target:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.gluster.CreateBrickModel object ) { deviceTable.asEditor ( ) . edit ( object.getStorageDevices ( ) ) ; driver.edit ( object ) ; deviceSelectionInfo.setText ( null ) ; setDeviceInfoVisibility ( false ) ; }

Target:
private void localize ( ) { lvNameEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.logicalVolume ( ) ) ; mountPointEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.mountPoint ( ) ) ; sizeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.lvSize ( ) ) ; raidParamsLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.raidParameters ( ) ) ; raidTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.raidType ( ) ) ; noOfPhysicalDisksEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.noOfPhysicalDisksInRaidVolume ( ) ) ; stripeSizeLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.stripeSize ( ) ) ; deviceHeader.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.CreateBrickPopupView.constants.storageDevices ( ) ) ; }