auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getDiskList ( 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.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateHostIsReadyToRun ( final org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { sb.append ( " VDS " ) . append ( vds.getvds_name ( ) ) . append ( " " ) . append ( vds.getId ( ) ) . append ( " " ) ; for ( org.ovirt.engine.core.bll.VdsSelector.HostValidator validator : this . hostValidators ) { org.ovirt.engine.core.dal.VdcBllMessages result = validator.validate ( vds , sb ) ; if ( result != null ) { return new org.ovirt.engine.core.bll.ValidationResult ( result ) ; } } return ValidationResult.VALID ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateHostIsReadyToRun ( final org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { sb.append ( " VDS " ) . append ( vds.getvds_name ( ) ) . append ( " " ) . append ( vds.getId ( ) ) . append ( " " ) ; for ( org.ovirt.engine.core.bll.VdsSelector.HostValidator validator : this . hostValidators ) { org.ovirt.engine.core.dal.VdcBllMessages result = validator.validate ( vds , sb , isMigrate ) ; if ( result != null ) { return new org.ovirt.engine.core.bll.ValidationResult ( result ) ; } } return ValidationResult.VALID ; }
Source:
public java.util.concurrent.FutureTask < java.util.Map < java.lang.String , java.lang.Object > > poll ( ) { final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.ping" ) . build ( ) ; java.util.concurrent.FutureTask < java.util.Map < java.lang.String , java.lang.Object > > future = new java.util.concurrent.FutureTask < java.util.Map < java.lang.String , java.lang.Object > > ( new java.util.concurrent.Callable < java.util.Map < java.lang.String , java.lang.Object > > ( ) { @ java.lang.Override public java.util.Map < java.lang.String , java.lang.Object > call ( ) throws java.lang.Exception { return new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; } } ) ; org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( future ) ; return future ; }

Target:
public boolean isDone ( ) { return callable.isDone ( ) ; }
Source:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
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 ) ; }

Target:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public void testRefreshHeavyWeightFor31 ( ) throws java.lang.Exception { createCluster ( Version.v3_1 ) ; setupMocks ( ) ; glusterManager.refreshHeavyWeightData ( ) ; verifyMocksForHeavyWeight ( ) ; }

Target:
public void testRefreshLightWeight ( ) throws java.lang.Exception { createCluster ( ) ; setupMocks ( ) ; org.mockito.Mockito.doReturn ( getGlusterServer ( ) ) . when ( glusterServerDao ) . getByServerId ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; glusterManager.refreshLightWeightData ( ) ; verifyMocksForLightWeight ( ) ; }
Source:
private static boolean hasSnappableDisks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ! ( vm.getImages ( ) . isEmpty ( ) ) ; }

Target:
protected boolean validateUsbPolicy ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getParameters ( ) . getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.updateImportedVmUsbPolicy ( vm.getStaticData ( ) ) ; return org.ovirt.engine.core.bll.VmHandler.isUsbPolicyLegal ( vm.getUsbPolicy ( ) , vm.getOs ( ) , getVdsGroup ( ) , getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public org.ovirt.engine.api.model.KatelloErrata list ( ) { org.ovirt.engine.core.common.businessentities.ErrataData errataData = null ; try { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runQuery ( VdcQueryType.GetErrataForEngine , new org.ovirt.engine.core.common.queries.GetErrataCountsParameters ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { backendFailure ( returnValue.getExceptionString ( ) ) ; } errataData = returnValue.getReturnValue ( ) ; } catch ( java.lang.Exception e ) { handleError ( e , false ) ; } if ( errataData == null ) { return new org.ovirt.engine.api.model.KatelloErrata ( ) ; } return mapCollection ( errataData.getErrata ( ) ) ; }

Target:
public org.ovirt.engine.api.model.KatelloErrata list ( ) { org.ovirt.engine.core.common.businessentities.ErrataData errataData = null ; try { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runQuery ( QueryType.GetErrataForEngine , new org.ovirt.engine.core.common.queries.GetErrataCountsParameters ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { backendFailure ( returnValue.getExceptionString ( ) ) ; } errataData = returnValue.getReturnValue ( ) ; } catch ( java.lang.Exception e ) { handleError ( e , false ) ; } if ( errataData == null ) { return new org.ovirt.engine.api.model.KatelloErrata ( ) ; } return mapCollection ( errataData.getErrata ( ) ) ; }
Source:
public static void getDataCenterById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void countAllTemplates ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void getoVirtISOsList ( 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 < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getTemplateNicList ( 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 < > ( ( ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void validateFailsForNoStorageDevice ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) ) , null ) ) ; prepareMocks ( cmd , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
protected void prepareMocks ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.mockito.Mockito.when ( cmd.getCluster ( ) ) . thenReturn ( cluster ) ; org.mockito.Mockito.doReturn ( vds ) . when ( cmd ) . getVds ( ) ; org.mockito.Mockito.doReturn ( status ) . when ( vds ) . getStatus ( ) ; mockIsGlusterEnabled ( true ) ; org.mockito.Mockito.doReturn ( glusterUtil ) . when ( cmd ) . getGlusterUtil ( ) ; }
Source:
public void setUp ( ) { disk1 = org.ovirt.engine.core.bll.validator.DiskSnapshotsValidatorTest.createDisk ( ) ; disk1.setDiskAlias ( "disk1" ) ; disk2 = org.ovirt.engine.core.bll.validator.DiskSnapshotsValidatorTest.createDisk ( ) ; disk2.setDiskAlias ( "disk2" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.DiskSnapshotsValidator ( java.util.Arrays.asList ( disk1 , disk2 ) ) ) ; }

Target:
public void setUp ( ) { disk1 = org.ovirt.engine.core.bll.validator.DiskSnapshotsValidatorTest.createDisk ( ) ; disk1.setDiskAlias ( "disk1" ) ; disk2 = org.ovirt.engine.core.bll.validator.DiskSnapshotsValidatorTest.createDisk ( ) ; disk2.setDiskAlias ( "disk2" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.DiskSnapshotsValidator ( java.util.Arrays.asList ( disk1 , disk2 ) ) ) ; org.mockito.Mockito.doReturn ( diskImageDao ) . when ( validator ) . getDiskImageDao ( ) ; org.mockito.Mockito.doReturn ( snapshotDao ) . when ( validator ) . getSnapshotDao ( ) ; }
Source:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.IdParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }

Target:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
public void testIsNetworkInSyncWhenIpv4BootProtocolDifferent ( ) { initIpv4ConfigurationBootProtocol ( false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4BootProtocolDifferent ( ) { initIpv4ConfigurationBootProtocol ( false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public void addNotEmptyIdConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; newPosixConnection.setid ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) . toString ( ) ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY ) ; }

Target:
public void addNotEmptyIdConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; newPosixConnection.setid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . initializeVds ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY ) ; }
Source:
protected static java.lang.String renameDiskAlias ( java.lang.String alias ) { java.util.regex.Matcher vmwareMatcher = org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.VMWARE_DISK_NAME_PATTERN.matcher ( alias ) ; if ( vmwareMatcher.matches ( ) ) { return vmwareMatcher.group ( 1 ) ; } return alias ; }

Target:
protected static java.lang.String renameDiskAlias ( org.ovirt.engine.core.common.businessentities.OriginType originType , java.lang.String alias ) { java.util.regex.Matcher matcher ; if ( originType == ( org.ovirt.engine.core.common.businessentities.OriginType.VMWARE ) ) { matcher = org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.VMWARE_DISK_NAME_PATTERN.matcher ( alias ) ; } else { matcher = org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.DISK_NAME_PATTERN.matcher ( alias ) ; } if ( matcher.matches ( ) ) { return matcher.group ( 1 ) ; } return alias ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmTemplate getTemplateByName ( org.ovirt.engine.api.model.VM vm ) { return isFiltered ( ) ? lookupTemplateByName ( vm.getTemplate ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , SearchType.VmTemplate , ( "Template: name=" + ( vm.getTemplate ( ) . getName ( ) ) ) ) ; }

Target:
protected org.ovirt.engine.api.model.VM setVmOvfConfiguration ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = runQuery ( VdcQueryType.GetVmOvfByVmId , new org.ovirt.engine.core.common.queries.GetVmOvfByVmIdParameters ( entity.getId ( ) , entity.getDbGeneration ( ) ) ) ; if ( ( queryReturnValue.getSucceeded ( ) ) && ( ( queryReturnValue.getReturnValue ( ) ) != null ) ) { java.lang.String configuration = queryReturnValue.getReturnValue ( ) ; return org.ovirt.engine.api.restapi.types.VmMapper.map ( configuration , ConfigurationType.OVF , model ) ; } return model ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( result.getState ( ) ) ) ; dataCenterGuideModel.removeConnection = true ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValueBase = result.getReturnValue ( ) ; dataCenterGuideModel.storageDomain.setstorage ( ( ( java.lang.String ) ( vdcReturnValueBase.getActionReturnValue ( ) ) ) ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( result.getState ( ) ) ) ; dataCenterGuideModel.removeConnection = true ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValueBase = result.getReturnValue ( ) ; dataCenterGuideModel.storageDomain.setStorage ( ( ( java.lang.String ) ( vdcReturnValueBase.getActionReturnValue ( ) ) ) ) ; }
Source:
public void bufferEmpty ( ) { org.junit.Assert.assertArrayEquals ( testedListToArray ( ) , new java.lang.String [ 0 ] ) ; org.junit.Assert.assertEquals ( 0 , tested.head ( ) ) ; org.junit.Assert.assertEquals ( 0 , tested.size ( ) ) ; org.junit.Assert.assertTrue ( tested.isEmpty ( ) ) ; org.junit.Assert.assertFalse ( tested.isFull ( ) ) ; }

Target:
public void bufferEmpty ( ) { org.junit.jupiter.api.Assertions.assertArrayEquals ( testedListToArray ( ) , new java.lang.String [ 0 ] ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , tested.head ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , tested.size ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( tested.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( tested.isFull ( ) ) ; }
Source:
public void onDataChange ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { getView ( ) . clear ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item : items ) { org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListItemPresenterWidget basicVmPresenterWidget = basicVmPresenterWidgetProvider.get ( ) ; basicVmPresenterWidget.setModel ( item ) ; addToSlot ( org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListPresenterWidget.TYPE_VmListContent , basicVmPresenterWidget ) ; } selectDefault ( modelProvider.getModel ( ) , items ) ; }

Target:
public void onDataChange ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { int vmIndex = 0 ; getView ( ) . clear ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item : items ) { org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListItemPresenterWidget basicVmPresenterWidget = basicVmPresenterWidgetProvider.get ( ) ; basicVmPresenterWidget.getView ( ) . setElementId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( getView ( ) . getElementId ( ) , ( "vm" + ( vmIndex ++ ) ) ) ) ; basicVmPresenterWidget.setModel ( item ) ; addToSlot ( org.ovirt.engine.ui.userportal.section.main.presenter.tab.basic.MainTabBasicListPresenterWidget.TYPE_VmListContent , basicVmPresenterWidget ) ; } selectDefault ( modelProvider.getModel ( ) , items ) ; }
Source:
protected org.ovirt.engine.core.bll.SPMAsyncTask ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , new org.ovirt.engine.core.common.businessentities.async_tasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getTaskID ( ) , getParametersForTask ( parentCommand , org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) ) , asyncTaskCreationInfo.getStepId ( ) , org.ovirt.engine.core.bll.RemoveImageCommand.getCommandId ( ) ) ) ; p.setEntityId ( org.ovirt.engine.core.bll.RemoveImageCommand.getParameters ( ) . getEntityId ( ) ) ; return org.ovirt.engine.core.bll.AsyncTaskManager.getInstance ( ) . CreateTask ( AsyncTaskType.deleteImage , p ) ; }

Target:
protected org.ovirt.engine.core.common.asynctasks.AsyncTaskType getTaskType ( ) { return org.ovirt.engine.core.common.asynctasks.AsyncTaskType.deleteImage ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "NoneBootProtocolAvailable" . equals ( propertyName ) ) { bootProtocol.setEnabled ( NetworkBootProtocol.None , model.getNoneBootProtocolAvailable ( ) ) ; } else if ( "Message" . equals ( propertyName ) ) { message.setText ( model.getMessage ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "NoneBootProtocolAvailable" . equals ( propertyName ) ) { bootProtocol.setEnabled ( NetworkBootProtocol.NONE , model.getNoneBootProtocolAvailable ( ) ) ; } else if ( "Message" . equals ( propertyName ) ) { message.setText ( model.getMessage ( ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoReturnForXmlRpc getVmsInfo ( java.lang.String storagePoolId , java.lang.String storageDomainId , java.lang.String [ ] VMIDList ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.getBackedUpVmsInfo" ) . withParameter ( "storagepoolID" , storagePoolId ) . withParameter ( "storagedomainID" , storageDomainId ) . withParameter ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( VMIDList ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmlist" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoReturn getVmsInfo ( java.lang.String storagePoolId , java.lang.String storageDomainId , java.lang.String [ ] VMIDList ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.getBackedUpVmsInfo" ) . withParameter ( "storagepoolID" , storagePoolId ) . withParameter ( "storagedomainID" , storageDomainId ) . withParameter ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( VMIDList ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmlist" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoReturn ( response ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VdsNetworkInterface lookupInterface ( java.lang.String id ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : getCollection ( ) ) { if ( iface.getId ( ) . toString ( ) . equals ( id ) ) { return iface ; } } return entityNotFound ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VdsNetworkInterface lookupInterface ( java.lang.String id ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = lookupInterfaceById ( id ) ; return iface == null ? entityNotFound ( ) : iface ; }
Source:
protected boolean areUpdatedFieldsLegal ( ) { return org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ; }

Target:
private boolean isRunningConfigurationNeeded ( ) { return ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDSGroup createCluster ( org.ovirt.engine.core.compat.Version v , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setId ( id ) ; cluster.setName ( "cluster" ) ; cluster.setGlusterService ( true ) ; cluster.setVirtService ( false ) ; cluster.setCompatibilityVersion ( v ) ; return cluster ; }

Target:
private org.ovirt.engine.core.common.businessentities.Cluster createCluster ( org.ovirt.engine.core.compat.Version v , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setId ( id ) ; cluster.setName ( "cluster" ) ; cluster.setGlusterService ( true ) ; cluster.setVirtService ( false ) ; cluster.setCompatibilityVersion ( v ) ; return cluster ; }
Source:
public void calculateNetworkImplementationDetailsNetworkQosOverridden ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQosOverridden ( true ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , new org.ovirt.engine.core.common.businessentities.network.NetworkQoS ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkQosOverridden ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQosOverridden ( true ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( S object ) { org.ovirt.engine.core.common.businessentities.VDS vds = getValue ( object ) ; if ( vds != null ) { org.ovirt.engine.core.common.businessentities.VDSStatus status = vds.getStatus ( ) ; java.lang.String tooltip = getTooltipText ( status ) ; if ( tooltip != null ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( tooltip ) ; } } return null ; }

Target:
public java.lang.String getTooltip ( S object ) { org.ovirt.engine.core.common.businessentities.VDS vds = getValue ( object ) ; if ( vds != null ) { org.ovirt.engine.core.common.businessentities.VDSStatus status = vds.getStatus ( ) ; java.lang.String tooltip = getTooltipText ( status ) ; if ( tooltip != null ) { return tooltip ; } } return "" ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return "" ; }

Target:
public static boolean isMemorySnapshotSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } boolean archMemorySnapshotSupported = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isMemorySnapshotSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ; return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) && archMemorySnapshotSupported ; }
Source:
static void verifyModelSpecific ( org.ovirt.engine.api.model.CdRom model , int index ) { assertEquals ( Guid.Empty.toString ( ) , model.getId ( ) ) ; assertTrue ( model.isSetVm ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.PARENT_ID.toString ( ) , model.getVm ( ) . getId ( ) ) ; assertTrue ( model.isSetFile ( ) ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH , model.getFile ( ) . getId ( ) ) ; }

Target:
static void verifyModelSpecific ( org.ovirt.engine.api.model.CdRom model , int index ) { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.verifyModelWithIso ( model , org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH ) ; }
Source:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.RunVmCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }

Target:
protected void endWithFailure ( ) { if ( shouldEndSnapshotCreation ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.RunVmCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }
Source:
public 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 void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public void testGetDisplayLocalesUnsupported ( ) { java.util.List < java.lang.String > displayLocales = new java.util.ArrayList < > ( ) ; java.util.List < java.lang.String > unSupportedLocales = new java.util.ArrayList < > ( ) ; unSupportedLocales.add ( "pt_BR" ) ; java.util.List < java.lang.String > locales = org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelper.getDisplayedLocales ( allLocales , displayLocales , unSupportedLocales ) ; org.junit.Assert.assertNotNull ( "Result should not be null" , locales ) ; org.junit.Assert.assertEquals ( "There should be 7 locales" , 7 , locales.size ( ) ) ; org.junit.Assert.assertFalse ( "Locales should not contain 'pt_BR'" , locales.contains ( "pt_BR" ) ) ; }

Target:
public void testGetDisplayLocalesUnsupported ( ) { java.util.List < java.lang.String > displayLocales = new java.util.ArrayList < > ( ) ; java.util.List < java.lang.String > unSupportedLocales = new java.util.ArrayList < > ( ) ; unSupportedLocales.add ( "pt_BR" ) ; java.util.List < java.lang.String > locales = org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelper.getDisplayedLocales ( allLocales , displayLocales , unSupportedLocales ) ; org.junit.jupiter.api.Assertions.assertNotNull ( locales , "Result should not be null" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 7 , locales.size ( ) , "There should be 7 locales" ) ; org.junit.jupiter.api.Assertions.assertFalse ( locales.contains ( "pt_BR" ) , "Locales should not contain 'pt_BR'" ) ; }
Source:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDAO ( ) . getAllMigratingToHost ( hostId ) ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { log.info ( "Cancelling incoming migration of '{}' id '{}'" , vm , vm.getId ( ) ) ; runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } } }

Target:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDao ( ) . getAllMigratingToHost ( hostId ) ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { log.info ( "Cancelling incoming migration of '{}' id '{}'" , vm , vm.getId ( ) ) ; runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotConfigInfo ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotConfigInfo configInfo = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotConfigInfo ) ( obj ) ) ; if ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getClusterConfigOptions ( ) , configInfo.getClusterConfigOptions ( ) ) ) ) { return false ; } if ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getVolumeConfigOptions ( ) , configInfo.getVolumeConfigOptions ( ) ) ) ) { return false ; } return true ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotConfigInfo ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotConfigInfo configInfo = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotConfigInfo ) ( obj ) ) ; if ( ! ( java.util.Objects.equals ( getClusterConfigOptions ( ) , configInfo.getClusterConfigOptions ( ) ) ) ) { return false ; } if ( ! ( java.util.Objects.equals ( getVolumeConfigOptions ( ) , configInfo.getVolumeConfigOptions ( ) ) ) ) { return false ; } return true ; }
Source:
public void vmTemplateIdRefWithVm ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; b.setVm ( v ) ; final org.ovirt.engine.core.compat.Guid g = b.getVmTemplateIdRef ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }

Target:
public void vmTemplateIdRef ( ) { b.setVmTemplateId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; final org.ovirt.engine.core.compat.Guid g = b.getVmTemplateIdRef ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }
Source:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getStorageType ( ) ) . connectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { final org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.ConnectAllHostsToLunCommandReturnValue result = getResult ( ) ; result.setFailedVds ( vds ) ; result.setFailedLun ( lun ) ; throw e ; } }

Target:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getStorageType ( ) ) . connectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { handleFailure ( vds , lun ) ; throw e ; } }
Source:
public void onRevealOverlayContent ( org.ovirt.engine.ui.webadmin.section.main.presenter.RevealOverlayContentEvent event ) { if ( ( event.getContent ( ) ) != null ) { event.getContent ( ) . setCurrentPlaceWidget ( getChild ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetContent ) ) ; } setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetOverlay , event.getContent ( ) ) ; }

Target:
public void onRevealOverlayContent ( org.ovirt.engine.ui.webadmin.section.main.presenter.RevealOverlayContentEvent event ) { if ( ( event.getContent ( ) ) != null ) { event.getContent ( ) . setCurrentPlaceWidget ( getChild ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetContent ) ) ; } else { com.gwtplatform.mvp.client.Presenter < ? , ? > child = getChild ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetContent ) ; if ( child instanceof org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainWithDetailsPresenter ) { ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.AbstractMainWithDetailsPresenter < ? , ? , ? , ? > ) ( child ) ) . refreshMainGridData ( ) ; } } setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.MainContentPresenter.TYPE_SetOverlay , event.getContent ( ) ) ; }
Source:
protected org.ovirt.engine.api.model.Label addLinks ( org.ovirt.engine.api.model.Label model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... excludeSubCollectionMembers ) { return super . addLinks ( model , org.ovirt.engine.api.model.HostNIC.class ) ; }

Target:
protected org.ovirt.engine.api.model.Label addLinks ( org.ovirt.engine.api.model.Label label , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... excludeSubCollectionMembers ) { org.ovirt.engine.api.model.Label resultLabel = super . addLinks ( label , org.ovirt.engine.api.model.HostNIC.class ) ; final org.ovirt.engine.api.restapi.resource.AbstractBaseHostNicLabelResource labelResource = createSingularResource ( resultLabel.getId ( ) ) ; labelResource.overrideHref ( resultLabel ) ; return resultLabel ; }
Source:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.bll.context.CommandContext cmdContext , boolean enableCallBack ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.persistCommand ( buildCommandEntity ( getParentParameters ( parentCommand ) . getCommandId ( ) , enableCallBack ) , cmdContext ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.bll.context.CommandContext cmdContext , boolean enableCallback ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.common.businessentities.CommandEntity commandEntity = buildCommandEntity ( getParentParameters ( parentCommand ) . getCommandId ( ) , enableCallback ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.persistCommand ( commandEntity , cmdContext ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }
Source:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsageInXmlRpc ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }

Target:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < > ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsage ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }
Source:
public void testPatternBasedNameFails ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > cmd = createCommand ( initializeMock ( 1 , 1 ) ) ; cmd.getParameters ( ) . getVm ( ) . setName ( "aa-??bb" ) ; junit.framework.Assert.assertFalse ( "Pattern-based name should not be supported for VM" , cmd.validateInputs ( ) ) ; }

Target:
public void testPatternBasedNameFails ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > cmd = createCommand ( initializeMock ( 1 , 1 ) ) ; cmd.getParameters ( ) . getVm ( ) . setName ( "aa-??bb" ) ; org.junit.Assert.assertFalse ( "Pattern-based name should not be supported for VM" , cmd.validateInputs ( ) ) ; }