auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendHostResource.FORCE , true , false ) ; return performAction ( VdcActionType.RemoveVds , new org.ovirt.engine.core.common.action.RemoveVdsParameters ( guid , force ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; boolean force = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendHostResource.FORCE , true , false ) ; return performAction ( VdcActionType.RemoveVds , new org.ovirt.engine.core.common.action.RemoveVdsParameters ( guid , force ) ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getAddParameters ( org.ovirt.engine.core.common.businessentities.VM mapped , org.ovirt.engine.api.model.CdRom cdrom ) { return new org.ovirt.engine.core.common.action.VmManagementParametersBase ( getUpdatable ( mapped.getStaticData ( ) . getiso_path ( ) ) ) ; }

Target:
protected org.ovirt.engine.core.common.action.VdcActionParametersBase getAddParameters ( org.ovirt.engine.core.common.businessentities.VM mapped , org.ovirt.engine.api.model.CdRom cdrom ) { return new org.ovirt.engine.core.common.action.VmManagementParametersBase ( getUpdatable ( mapped.getStaticData ( ) . getIsoPath ( ) ) ) ; }
Source:
public void testSave ( ) { dao.save ( newVmStatistics ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics savedStatistics = dao.get ( org.ovirt.engine.core.dao.network.VmNetworkStatisticsDaoTest.NEW_INTERFACE_ID ) ; org.junit.Assert.assertNotNull ( savedStatistics ) ; org.junit.Assert.assertEquals ( newVmStatistics.getStatus ( ) , savedStatistics.getStatus ( ) ) ; }

Target:
public void testSave ( ) { dao.save ( newVmStatistics ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics savedStatistics = dao.get ( org.ovirt.engine.core.dao.network.VmNetworkStatisticsDaoTest.NEW_INTERFACE_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( savedStatistics ) ; org.junit.jupiter.api.Assertions.assertEquals ( newVmStatistics.getStatus ( ) , savedStatistics.getStatus ( ) ) ; }
Source:
public void testList ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }

Target:
public void testAddWithClonePermissionsDontClone ( ) throws java.lang.Exception { doTestAddWithClonePermissions ( createModel ( null ) , false ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > getClusters ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > list = new java.util.ArrayList < > ( ) ; list.add ( createCluster ( 0 , Version.v3_4 ) ) ; list.add ( createCluster ( 1 , Version.v3_5 ) ) ; return list ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > getClusters ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > list = new java.util.ArrayList < > ( ) ; list.add ( createCluster ( 0 , Version.v3_5 ) ) ; list.add ( createCluster ( 1 , Version.v4_0 ) ) ; return list ; }
Source:
public org.ovirt.engine.core.common.businessentities.RepoImage getImageAsRepoImage ( java.lang.String id ) { org.ovirt.engine.core.common.businessentities.RepoImage repoImage = org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.imageToRepoImage ( getGlanceClient ( ) . images ( ) . show ( id ) . execute ( ) ) ; repoImage.setLastRefreshed ( java.lang.System.currentTimeMillis ( ) ) ; return repoImage ; }

Target:
public org.ovirt.engine.core.common.businessentities.RepoImage getImageAsRepoImage ( java.lang.String id ) { org.ovirt.engine.core.common.businessentities.RepoImage repoImage = org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.imageToRepoImage ( getClient ( ) . images ( ) . show ( id ) . execute ( ) ) ; repoImage.setLastRefreshed ( java.lang.System.currentTimeMillis ( ) ) ; return repoImage ; }
Source:
public java.lang.String getAuthUrl ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) { org.ovirt.engine.core.sso.utils.InteractiveAuth.log.debug ( "Redirecting to External Auth Servlet" ) ; return ( request.getContextPath ( ) ) + ( SSOConstants.INTERACTIVE_LOGIN_NEGOTIATE_URI ) ; }

Target:
public java.lang.String getAuthUrl ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) { org.ovirt.engine.core.sso.utils.InteractiveAuth.log.debug ( "Redirecting to External Auth Servlet" ) ; return ( request.getContextPath ( ) ) + ( SsoConstants.INTERACTIVE_LOGIN_NEGOTIATE_URI ) ; }
Source:
public void setstorage ( java.lang.String value ) { this . storage = value ; }

Target:
public void setStorage ( java.lang.String storage ) { this . storage = storage ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setVolumeType ( VolumeType.Sparse ) ; }

Target:
public void setCollapseSnapshot ( org.ovirt.engine.ui.uicommonweb.models.EntityModel collapseSnapshotsModel ) { if ( ! ( ( java.lang.Boolean ) ( collapseSnapshotsModel.getEntity ( ) ) ) ) { setSelectedVolumeType ( getVolumeType ( ) ) ; } this . collapseSnapshots = collapseSnapshotsModel ; }
Source:
public static org.ovirt.engine.core.compat.Guid GetImageGrupIdFromImageFile ( java.lang.String imageFile ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( imageFile ) ) ) { return org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( imageFile.split ( "[/]" , ( - 1 ) ) [ 0 ] ) ; } return null ; }

Target:
public static org.ovirt.engine.core.compat.Guid getImageGroupIdFromImageFile ( java.lang.String imageFile ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( imageFile ) ) ) { return org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( imageFile.split ( "[/]" , ( - 1 ) ) [ 0 ] ) ; } return null ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.StopProgress ( ) ; Cancel ( ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel getSelectedHasConsoleModel ( ) { if ( ( ( selectedHasConsoleModels ) == null ) || ( ( selectedHasConsoleModels.size ( ) ) != 1 ) ) { return null ; } return selectedHasConsoleModels.get ( 0 ) ; }
Source:
protected void endSuccessfullySynchronous ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.unLockVm ( vm ) ; this . updateSnapshotOvf ( vm ) ; org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfullySynchronous ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.unLockVm ( vm ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.setVmDevices ( vm.getStaticData ( ) ) ; this . updateSnapshotOvf ( vm ) ; org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }
Source:
public void destroy ( ) { }

Target:
public void destroy ( ) { closeSqlDbConnections ( ) ; }
Source:
protected java.lang.String [ ] getRequiredUpdateFields ( ) { return new java.lang.String [ ] { "file.id" } ; }

Target:
protected java.lang.String [ ] getRequiredUpdateFields ( ) { return new java.lang.String [ ] { "file" } ; }
Source:
protected boolean canPerformRollbackUsingCommand ( org.ovirt.engine.core.common.action.VdcActionType commandType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { return ( diskImageDao.get ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getDestinationImageId ( ) ) ) != null ; }

Target:
protected boolean canPerformRollbackUsingCommand ( org.ovirt.engine.core.common.action.ActionType commandType , org.ovirt.engine.core.common.action.ActionParametersBase params ) { return ( diskImageDao.get ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupCommand.getParameters ( ) . getDestinationImageId ( ) ) ) != null ; }
Source:
public void testBadGuid ( ) throws java.lang.Exception { try { new org.ovirt.engine.api.restapi.resource.BackendRoleResource ( "foo" , null ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testBadGuid ( ) throws java.lang.Exception { try { new org.ovirt.engine.api.restapi.resource.BackendRoleResource ( "foo" , null ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.storage.RemoveStorageDomainCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }
Source:
protected abstract org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > getPredicate ( final java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) ;

Target:
protected abstract org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > getPredicate ( final java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisks ) ;
Source:
protected boolean setupNetworkSupported ( ) { return org.ovirt.engine.core.bll.utils.VersionSupport.isActionSupported ( VdcActionType.SetupNetworks , org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ; }

Target:
private boolean applyChangesToHostsRequired ( ) { return ( ! ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) . isExternal ( ) ) ) && ( org.ovirt.engine.core.bll.network.cluster.NetworkHelper.setupNetworkSupported ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ) ; }
Source:
public void setrun_on_vds ( org.ovirt.engine.core.compat.NGuid value ) { this . mVmDynamic.setrun_on_vds ( value ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "run_on_vds" ) ) ; }

Target:
public void setDisplayType ( org.ovirt.engine.core.common.businessentities.DisplayType value ) { this . vmDynamic.setdisplay_type ( value ) ; }
Source:
public void testValidateGatewayWhenRelatedNetworkIsManagementNetwork ( ) { doTestValidateGateway ( "someGateway" , true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidateGatewayIsManagementNetworkAndMultipleGatewaysSupported ( ) { doTestValidateGateway ( "someGateway" , true , true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult parentEntityExists ( ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getClusterDao ( ) . get ( getProfile ( ) . getClusterId ( ) ) ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_CLUSTER_CAN_NOT_BE_EMPTY ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult parentEntityExists ( ) { if ( ( clusterDao.get ( getProfile ( ) . getClusterId ( ) ) ) == null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_CLUSTER_CAN_NOT_BE_EMPTY ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public int getnice_level ( ) { return this . mVmStatic.getnice_level ( ) ; }

Target:
public void setFailBack ( boolean value ) { this . vmStatic.setfail_back ( value ) ; }
Source:
public void validateBeanValidations ( ) { org.junit.Assert.assertTrue ( command.validateInputs ( ) ) ; }

Target:
public void validateBeanValidations ( ) { org.junit.jupiter.api.Assertions.assertTrue ( command.validateInputs ( ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( result.getState ( ) ) ) ; localModel.StopProgress ( ) ; getCancelCommand ( ) . Execute ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; getCancelCommand ( ) . execute ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment getNetworkAttachment ( java.lang.String id ) { return getEntity ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment.class , VdcQueryType.GetNetworkAttachmentById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuidOr404 ( id ) ) , "NetworkAttachment" ) ; }

Target:
protected void verifyIfHostExistsToHandle404StatusCode ( ) { org.ovirt.engine.core.compat.Guid hostId = getHostId ( ) ; getEntity ( org.ovirt.engine.core.common.businessentities.VDS.class , VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , hostId.toString ( ) , true ) ; }
Source:
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.StoragePool > ) ( source ) ) : null ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private static org.ovirt.vdsm.jsonrpc.client.reactors.ManagerProvider getManagerProvider ( boolean isSecure ) { org.ovirt.vdsm.jsonrpc.client.reactors.ManagerProvider provider = null ; if ( isSecure ) { provider = new org.ovirt.engine.core.vdsbroker.jsonrpc.EngineManagerProvider ( ) ; } return provider ; }

Target:
private static org.ovirt.vdsm.jsonrpc.client.reactors.ManagerProvider getManagerProvider ( boolean isSecure , java.lang.String protocol ) { org.ovirt.vdsm.jsonrpc.client.reactors.ManagerProvider provider = null ; if ( isSecure ) { provider = new org.ovirt.engine.core.vdsbroker.jsonrpc.EngineManagerProvider ( protocol ) ; } return provider ; }
Source:
private void setUpGetEntityExpectations ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageServerConnectionExtensionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionExtensionResourceTest.extensionID } , getDefaultEntity ( ) ) ; }

Target:
private void setUpGetEntityExpectations ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetStorageServerConnectionExtensionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionExtensionResourceTest.extensionID } , getDefaultEntity ( ) ) ; }
Source:
public void testSetup ( ) { mockQuotaDAO ( ) ; mockVmDAO ( ) ; mockStoragePoolDAO ( ) ; mockInjections ( ) ; }

Target:
public void testSetup ( ) { mockQuotaDao ( ) ; mockVmDao ( ) ; mockStoragePoolDao ( ) ; mockInjections ( ) ; }
Source:
private void endUnlockOps ( ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmTemplateId ( ) ) ; }

Target:
private void endUnlockOps ( ) { if ( isVmInDb ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVm ( ) ) ; } org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmTemplateId ( ) ) ; }
Source:
public void setWatchdog ( org.ovirt.engine.core.common.businessentities.VmWatchdog watchdog ) { this . watchdog = watchdog ; }

Target:
public void setWatchdog ( org.ovirt.engine.core.common.businessentities.VmWatchdog watchdog ) { this . watchdog.setValue ( watchdog ) ; }
Source:
public void testNewStorageTypes ( ) { junit.framework.Assert.assertTrue ( "A storage type was added/removed. Update this test, and the isFileDomain/isBlockDomain method accordingly" , ( ( org.ovirt.engine.core.common.businessentities.StorageType.values ( ) . length ) == 9 ) ) ; }

Target:
public void testNewStorageTypes ( ) { junit.framework.Assert.assertTrue ( ( "A storage type was added/removed. Update this test, and the isFileDomain/isBlockDomain " + "method accordingly" ) , ( ( org.ovirt.engine.core.common.businessentities.StorageType.values ( ) . length ) == 8 ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { addInterfaceToDb ( getInterface ( ) ) ; addInterfaceDeviceToDb ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { bumpVmVersion ( ) ; addInterfaceToDb ( getInterface ( ) ) ; addInterfaceDeviceToDb ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void setPmSecondaryPort ( java.lang.Integer value ) { mVdsStatic.setPmSecondaryPort ( value ) ; }

Target:
public boolean isBalloonEnabled ( ) { return balloonEnabled ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbUser getDbUser ( ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( getId ( ) ) ) ; user.setDomain ( getDomain ( ) ) ; user.setLoginName ( getUserName ( ) ) ; return user ; }

Target:
public org.ovirt.engine.core.common.businessentities.aaa.DbUser getDbUser ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; user.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( getId ( ) ) ) ; user.setDomain ( getDomain ( ) ) ; user.setLoginName ( getUserName ( ) ) ; return user ; }
Source:
private void validateNetworkInternal ( org.ovirt.engine.core.common.businessentities.network.Network network ) { if ( ( network.getProvidedBy ( ) ) != null ) { addViolation ( VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_NETWORKS_CANNOT_BE_PROVISIONED , network.getName ( ) ) ; } }

Target:
private void validateNetworkInternal ( org.ovirt.engine.core.common.businessentities.network.Network network ) { if ( ( network.getProvidedBy ( ) ) != null ) { addViolation ( EngineMessage.ACTION_TYPE_FAILED_EXTERNAL_NETWORKS_CANNOT_BE_PROVISIONED , network.getName ( ) ) ; } }
Source:
private void scheduleJobs ( long regularInterval , long longInterval ) { jobId = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "refresh" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , regularInterval , longInterval , java.util.concurrent.TimeUnit.MINUTES ) ; }

Target:
private void scheduleJobs ( long regularInterval , long longInterval ) { scheduler.scheduleAFixedDelayJob ( this , "refresh" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , regularInterval , longInterval , java.util.concurrent.TimeUnit.MINUTES ) ; }
Source:
public void testGetAllNetworkQos ( ) { org.junit.Assert.assertTrue ( ( ( dao.getAll ( ) . size ( ) ) == 3 ) ) ; }

Target:
public void testGetAllNetworkQos ( ) { org.junit.Assert.assertTrue ( ( ( dao.getAll ( ) . size ( ) ) == 4 ) ) ; }
Source:
public void managementNetworkRequiredValidNotManagementRequired ( ) { testmanagementNetworkRequired ( false , true , org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.isValid ( ) ) ; }

Target:
public void managementNetworkRequiredValidNotManagementRequired ( ) { testManagementNetworkRequired ( false , true , org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.isValid ( ) ) ; }
Source:
void revealActiveMainModelPresenter ( ) { org.ovirt.engine.ui.common.uicommon.model.MainModelSelectionChangeEvent.fire ( this , org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.instance ( ) . getSelectedItem ( ) ) ; }

Target:
void revealActiveMainModelPresenter ( ) { org.ovirt.engine.ui.uicommonweb.models.MainModelSelectionChangeEvent.fire ( this , commonModelProvider.get ( ) . getSelectedItem ( ) ) ; }
Source:
public void isManagementNetwork ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { runBooleanQueryByEntityId ( VdcQueryType.IsManagementNetwork , aQuery , networkId ) ; }

Target:
public void isManagementNetwork ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { runQueryByIdParameter ( VdcQueryType.IsManagementNetwork , aQuery , networkId ) ; }
Source:
private static java.lang.Object CloneVersion ( org.ovirt.engine.core.compat.Version instance ) { return new org.ovirt.engine.core.compat.Version ( instance.toString ( ) ) ; }

Target:
private static java.lang.Object cloneVersion ( org.ovirt.engine.core.compat.Version instance ) { return new org.ovirt.engine.core.compat.Version ( instance.toString ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.CommandEntity get ( org.ovirt.engine.core.compat.Guid commandId ) { initializeCache ( ) ; return commandMap.get ( commandId ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getCommandIdsByEntityId ( org.ovirt.engine.core.compat.Guid entityId ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . getCommandIdsByEntity ( entityId ) ; }
Source:
public void testGetForStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getForStoragePool ( existingDomain.getId ( ) , org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID ) ; assertGetResult ( result ) ; }

Target:
public void testGetAllForConnection ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllForConnection ( org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_CONNECTION ) ; org.ovirt.engine.core.dao.StorageDomainDAOTest.assertGetAllForStoragePoolResult ( result , org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID ) ; }
Source:
private void ClearSearchString ( ) { setSearchString ( ( getHasSearchStringPrefix ( ) ? "" : getSelectedItem ( ) . getDefaultSearchString ( ) ) , false ) ; getSearchCommand ( ) . Execute ( ) ; }

Target:
private void clearSearchString ( ) { setSearchString ( ( getHasSearchStringPrefix ( ) ? "" : getSelectedItem ( ) . getDefaultSearchString ( ) ) , false ) ; getSearchCommand ( ) . execute ( ) ; }
Source:
private org.ovirt.engine.core.compat.Version getClusterVersion ( ) { return org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getcompatibility_version ( ) ; }

Target:
private org.ovirt.engine.core.compat.Version getClusterVersion ( ) { return org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ; }
Source:
public void testRemoveAllForVds ( ) throws java.lang.Exception { dao.removeAllForVds ( org.ovirt.engine.core.dao.AuditLogDAOTest.VDS_ID , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( 3 , result.size ( ) ) ; }

Target:
public void testRemoveAllOfTypeForVds ( ) throws java.lang.Exception { dao.removeAllOfTypeForVds ( org.ovirt.engine.core.dao.AuditLogDAOTest.VDS_ID , AuditLogType.IRS_DISK_SPACE_LOW_ERROR.getValue ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( 3 , result.size ( ) ) ; }
Source:
protected org.ovirt.engine.core.dao.JobDao prepareDao ( ) { return dbFacade.getJobDao ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getJobDao ( ) ; existingEntity = dao.get ( org.ovirt.engine.core.dao.JobDaoTest.EXISTING_JOB_ID ) ; newEntity = generateNewEntity ( ) ; }
Source:
public java.lang.Void runInTransaction ( ) { dao.updateAll ( procedureName , sortedList ) ; return null ; }

Target:
private int parseIntVdsProperty ( java.lang.Object vdsProperty ) { if ( vdsProperty instanceof java.lang.Integer ) { return ( ( java.lang.Integer ) ( vdsProperty ) ) ; } else { return java.lang.Integer.parseInt ( ( ( java.lang.String ) ( vdsProperty ) ) ) ; } }
Source:
public void endStepJob ( org.ovirt.engine.core.common.job.Step step ) { getJobRepository ( ) . updateStep ( step ) ; org.ovirt.engine.core.bll.job.ExecutionContext finalContext = org.ovirt.engine.core.bll.job.ExecutionHandler.createFinalizingContext ( step.getId ( ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endTaskJob ( finalContext , isTaskSuccess ( step.getStatus ( ) ) ) ; }

Target:
public void endStepJob ( org.ovirt.engine.core.common.job.Step step ) { getJobRepository ( ) . updateStep ( step ) ; org.ovirt.engine.core.bll.job.ExecutionContext finalContext = org.ovirt.engine.core.bll.job.ExecutionHandler.createFinalizingContext ( step.getId ( ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endTaskStepAndJob ( finalContext , isTaskSuccess ( step.getStatus ( ) ) ) ; }
Source:
public void testGetByNameWithBadName ( ) { org.ovirt.engine.core.common.businessentities.Cluster result = dao.getByName ( "farkle" ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testGetByNameWithBadName ( ) { org.ovirt.engine.core.common.businessentities.Cluster result = dao.getByName ( "farkle" ) ; org.junit.jupiter.api.Assertions.assertNull ( result ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateSysprepVisibility ( object ) ; }

Target:
public java.lang.String getDisplayStringNullSafe ( java.lang.String data ) { return typeAheadNameTemplateNullSafe ( data ) ; }
Source:
public boolean disconnectHostFromStoragePoolServersCommandCompleted ( org.ovirt.engine.core.common.action.HostStoragePoolParametersBase parameters ) { return true ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.AuditLogType > disconnectHostFromStoragePoolServersCommandCompleted ( org.ovirt.engine.core.common.action.HostStoragePoolParametersBase parameters ) { return new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.AuditLogType > ( true , null ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getDeviceList ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { return getEntity ( java.util.List.class , VdcQueryType.GetDeviceList , new org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters ( hostId , storageType , false , null ) , "GetDeviceList" , true ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getDeviceList ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { return getEntity ( java.util.List.class , QueryType.GetDeviceList , new org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters ( hostId , storageType , false , null , false ) , "GetDeviceList" , true ) ; }
Source:
public void testFromBackendToRest ( ) { testStatusMapping ( StoragePoolStatus.Contend , DataCenterStatus.CONTEND ) ; testStatusMapping ( StoragePoolStatus.Maintenance , DataCenterStatus.MAINTENANCE ) ; testStatusMapping ( StoragePoolStatus.NotOperational , DataCenterStatus.NOT_OPERATIONAL ) ; testStatusMapping ( StoragePoolStatus.Problematic , DataCenterStatus.PROBLEMATIC ) ; testStatusMapping ( StoragePoolStatus.Uninitialized , DataCenterStatus.UNINITIALIZED ) ; testStatusMapping ( StoragePoolStatus.Up , DataCenterStatus.UP ) ; }

Target:
public void testFromBackendToRest ( ) { testStatusMapping ( StoragePoolStatus.Contend , DataCenterStatus.CONTEND ) ; testStatusMapping ( StoragePoolStatus.Maintenance , DataCenterStatus.MAINTENANCE ) ; testStatusMapping ( StoragePoolStatus.NotOperational , DataCenterStatus.NOT_OPERATIONAL ) ; testStatusMapping ( StoragePoolStatus.NonResponsive , DataCenterStatus.PROBLEMATIC ) ; testStatusMapping ( StoragePoolStatus.Uninitialized , DataCenterStatus.UNINITIALIZED ) ; testStatusMapping ( StoragePoolStatus.Up , DataCenterStatus.UP ) ; }
Source:
private void initSorting ( ) { nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; ipColumn.makeSortable ( ) ; fqdnColumn.makeSortable ( ) ; vnicNameColumn.makeSortable ( ) ; descriptionColumn.makeSortable ( ) ; }

Target:
private void initSorting ( ) { vmStatusColumn.makeSortable ( ) ; nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; ipColumn.makeSortable ( ) ; fqdnColumn.makeSortable ( ) ; vnicNameColumn.makeSortable ( ) ; descriptionColumn.makeSortable ( ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; }
Source:
private void mockValidatePciAndIdeLimit ( ) { org.mockito.Mockito.doReturn ( true ) . when ( command ) . isValidPciAndIdeLimit ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; }

Target:
private void mockValidateCustomProperties ( ) { org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateCustomProperties ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
protected void onReveal ( ) { super . onReveal ( ) ; setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.HeaderPresenterWidget.TYPE_SetSearchPanel , searchPanel ) ; configureFeedbackUrl ( ) ; }

Target:
protected void onReveal ( ) { super . onReveal ( ) ; setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.HeaderPresenterWidget.TYPE_SetSearchPanel , searchPanel ) ; setInSlot ( org.ovirt.engine.ui.webadmin.section.main.presenter.HeaderPresenterWidget.TYPE_SetTabBar , tabBar ) ; configureFeedbackUrl ( ) ; setMainTabBarOffset ( org.ovirt.engine.ui.webadmin.section.main.presenter.HeaderPresenterWidget.MAIN_TABBAR_INITIAL_OFFSET ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult storageDomainExists ( ) { return new org.ovirt.engine.core.bll.validator.StorageDomainValidator ( getStorageDomain ( ) ) . isDomainExist ( ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult parentEntityExists ( ) { return new org.ovirt.engine.core.bll.validator.StorageDomainValidator ( getStorageDomain ( ) ) . isDomainExist ( ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createHigherVersionStoragePool ( ) { 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_2 ) ; return pool ; }

Target:
private void storagePoolVersion35 ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createBasicPool ( ) ; pool.setCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( pool ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet > ) ( returnValue ) ) ) ; }

Target:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; updateActionAvailability ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getSingleBrickVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( volumeId ) ; volume.setStatus ( GlusterVolumeStatus.UP ) ; volume.setBricks ( getBricks ( volumeId , 1 ) ) ; return volume ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getSingleBrickVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( volumeId ) ; volume.setStatus ( GlusterVolumeStatus.UP ) ; volume.setBricks ( getBricks ( volumeId , 1 ) ) ; volume.setClusterId ( CLUSTER_ID ) ; return volume ; }
Source:
public org.ovirt.engine.core.compat.Guid getMacPoolId ( ) { return oldMacPool.getId ( ) ; }

Target:
public java.lang.String getMacPoolName ( ) { return getOldMacPool ( ) . getName ( ) ; }
Source:
public boolean test ( org.ovirt.engine.core.compat.Guid clusterId ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = vmDao.getAllForVdsGroup ( clusterId ) ; return vms.stream ( ) . anyMatch ( org.ovirt.engine.core.bll.common.predicates.ActiveVmAttachedToClusterPredicate.RUNNING_VM_PREDICATE ) ; }

Target:
public boolean test ( org.ovirt.engine.core.compat.Guid clusterId ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = vmDao.getAllForCluster ( clusterId ) ; return vms.stream ( ) . anyMatch ( org.ovirt.engine.core.bll.common.predicates.ActiveVmAttachedToClusterPredicate.RUNNING_VM_PREDICATE ) ; }
Source:
private void onFinish ( org.ovirt.engine.core.compat.Guid cmdId ) { getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }

Target:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onSucceeded ( cmdId , childCmdIds ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }
Source:
public void getClusterId ( ) { b.setClusterId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; final org.ovirt.engine.core.compat.Guid g = b.getClusterId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }

Target:
public void getClusterId ( ) { b.setClusterId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; final org.ovirt.engine.core.compat.Guid g = b.getClusterId ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }
Source:
public void testInterfaceIsBondWhenInterfaceIsBonded ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createVdsNetworkInterfaceWithName ( ) ; iface.setBonded ( true ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( iface ) . interfaceIsBondOrNull ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testInterfaceIsBondWhenInterfaceIsBonded ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createVdsNetworkInterfaceWithName ( ) ; iface.setBonded ( true ) ; org.hamcrest.MatcherAssert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( iface ) . interfaceIsBondOrNull ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__ADD ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__HOST ) ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__ADD ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__HOST ) ; addCanDoActionMessage ( java.lang.String.format ( "$server %1$s" , org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getvds ( ) . getHostName ( ) ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; postOnSave ( ) ; } }

Target:
public void setEntity ( java.lang.Boolean enableManualMac ) { super . setEntity ( enableManualMac ) ; getMAC ( ) . setIsChangeable ( enableManualMac ) ; }
Source:
protected javax.ws.rs.core.Response performRemove ( java.lang.String id ) { org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase params = new org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase ( ) ; org.ovirt.engine.core.common.businessentities.FenceAgent agent = new org.ovirt.engine.core.common.businessentities.FenceAgent ( ) ; agent.setId ( asGuid ( id ) ) ; params.setAgent ( agent ) ; return performAction ( VdcActionType.RemoveFenceAgent , params ) ; }

Target:
protected javax.ws.rs.core.Response performRemove ( java.lang.String id ) { org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase params = new org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent = new org.ovirt.engine.core.common.businessentities.pm.FenceAgent ( ) ; agent.setId ( asGuid ( id ) ) ; params.setAgent ( agent ) ; return performAction ( VdcActionType.RemoveFenceAgent , params ) ; }
Source:
public void snapshotTypeNotSupported ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.snapshots.SnapshotsValidatorTest.validateInvalidResult ( validator.snapshotTypeSupported ( snapshot , java.util.Collections.singletonList ( Snapshot.SnapshotType.ACTIVE ) ) , VdcBllMessages.ACTION_TYPE_FAILED_VM_SNAPSHOT_TYPE_NOT_ALLOWED ) ; }

Target:
public void snapshotTypeNotSupported ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.snapshots.SnapshotsValidatorTest.validateInvalidResult ( validator.snapshotTypeSupported ( snapshot , java.util.Collections.singletonList ( Snapshot.SnapshotType.ACTIVE ) ) , EngineMessage.ACTION_TYPE_FAILED_VM_SNAPSHOT_TYPE_NOT_ALLOWED ) ; }
Source:
private void initCommand ( ) { org.mockito.Mockito.doReturn ( executor ) . when ( command ) . createHostFenceActionExecutor ( org.mockito.Matchers.any ( ) , org.mockito.Matchers.any ( ) ) ; command.setClusterId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; }

Target:
private void initCommand ( ) { org.mockito.Mockito.doReturn ( executor ) . when ( command ) . createHostFenceActionExecutor ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; command.setClusterId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.storage_domains domain ) { return ( domain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain domain ) { return ( domain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotDisabledNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( false ) ; usb.setType ( UsbType.NATIVE ) ; org.junit.Assert.assertEquals ( UsbPolicy.DISABLED , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED ) ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( UsbType.NATIVE ) ; org.junit.jupiter.api.Assertions.assertEquals ( UsbPolicy.ENABLED_NATIVE , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED ) ) ; }
Source:
public static java.lang.String getConstraint ( javax.ws.rs.core.UriInfo uriInfo , java.lang.Class < ? > clz ) { return org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( uriInfo , null , clz ) ; }

Target:
public static java.lang.String getConstraint ( javax.ws.rs.core.HttpHeaders headers , javax.ws.rs.core.UriInfo ui , java.lang.Class < ? > clz ) { return org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( headers , ui , null , clz ) ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . remove ( commandId ) ; return null ; }

Target:
public void remove ( final org.ovirt.engine.core.compat.Guid commandId ) { commandMap.remove ( commandId ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . remove ( commandId ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity updateStatusEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity status ) { setStartTime ( status ) ; updateLatestStatus ( status ) ; return updateHostDetails ( status ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity updateStatusEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity status ) { setStartAndStopTime ( status ) ; updateLatestStatus ( status ) ; return updateHostDetails ( status ) ; }
Source:
public void testGetByDataCenterId ( ) throws java.lang.Exception { final org.ovirt.engine.core.compat.Guid notExistingRecordGuid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; final org.ovirt.engine.core.common.businessentities.MacPool macPool = dao.getByDataCenterId ( notExistingRecordGuid ) ; org.junit.Assert.assertThat ( macPool , org.hamcrest.CoreMatchers.nullValue ( ) ) ; }

Target:
public void testGetByClusterId ( ) throws java.lang.Exception { final org.ovirt.engine.core.compat.Guid notExistingRecordGuid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; final org.ovirt.engine.core.common.businessentities.MacPool macPool = dao.getByClusterId ( notExistingRecordGuid ) ; org.junit.Assert.assertThat ( macPool , org.hamcrest.CoreMatchers.nullValue ( ) ) ; }
Source:
public void existStep ( ) { org.junit.Assert.assertTrue ( dao.exists ( org.ovirt.engine.core.dao.JobDaoTest.EXISTING_JOB_ID ) ) ; }

Target:
public void existStep ( ) { org.junit.jupiter.api.Assertions.assertTrue ( dao.exists ( org.ovirt.engine.core.dao.JobDaoTest.EXISTING_JOB_ID ) ) ; }
Source:
public java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > executeAsyncCommand ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { return cmdExecutor.executeAsyncCommand ( actionType , parameters ) ; }

Target:
public java.util.concurrent.Future < org.ovirt.engine.core.common.action.VdcReturnValueBase > executeAsyncCommand ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { return cmdExecutor.executeAsyncCommand ( actionType , parameters , cmdContext ) ; }
Source:
protected java.lang.String getTooltip ( com.google.gwt.safehtml.shared.SafeHtml value ) { return value.asString ( ) ; }

Target:
protected java.lang.String getTooltip ( com.google.gwt.safehtml.shared.SafeHtml value ) { return new com.google.gwt.user.client.ui.HTML ( value.asString ( ) ) . getText ( ) ; }
Source:
protected void startPollingAsyncTasks ( java.util.Collection < org.ovirt.engine.core.compat.Guid > taskIds ) { for ( org.ovirt.engine.core.compat.Guid taskID : taskIds ) { getAsyncTaskManager ( ) . StartPollingTask ( taskID ) ; } }

Target:
protected void startPollingAsyncTasks ( java.util.Collection < org.ovirt.engine.core.compat.Guid > taskIds ) { for ( org.ovirt.engine.core.compat.Guid taskID : taskIds ) { getAsyncTaskManager ( ) . startPollingTask ( taskID ) ; } }
Source:
public void shouldAllowUpgradeForVM ( ) { org.assertj.core.api.Assertions.assertThat ( validator.isVmReadyForUpgrade ( validVM ) ) . isEmpty ( ) ; }

Target:
public void shouldDetectClusterUpgradeIsDisabled ( ) { final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.validator.InClusterUpgradeValidatorTest.VERSION_1_2 ) ; org.assertj.core.api.Assertions.assertThat ( validator.checkClusterUpgradeIsEnabled ( cluster ) ) . isEqualTo ( ValidationResult.VALID ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLogicalUnits ( ) { return getBackendCollection ( VdcQueryType.GetDeviceList , new org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters ( asGuid ( hostId ) , org.ovirt.engine.core.common.businessentities.storage.StorageType.UNKNOWN , true , null ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLogicalUnits ( ) { boolean reportStatus = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendHostStorageResource.REPORT_STATUS , true , true ) ; return getBackendCollection ( VdcQueryType.GetDeviceList , new org.ovirt.engine.core.common.queries.GetDeviceListQueryParameters ( asGuid ( hostId ) , org.ovirt.engine.core.common.businessentities.storage.StorageType.UNKNOWN , reportStatus , null ) ) ; }
Source:
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.VM > ( ) ; } return source ; }

Target:
public java.util.List < T > convert ( java.lang.Object source ) { return source != null ? ( ( java.util.List < T > ) ( source ) ) : new java.util.ArrayList < T > ( ) ; }