auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void adjustDisplayData ( org.ovirt.engine.api.restapi.resource.BackendResource res , org.ovirt.engine.api.model.Vm vm , java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > > vmsGraphicsDevices ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayDataInternal ( res , vm , vmsGraphicsDevices ) ; }

Target:
public static void adjustDisplayData ( org.ovirt.engine.api.restapi.resource.BackendResource res , org.ovirt.engine.api.model.Vm vm , boolean nextRun ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( res , vm , null , nextRun ) ; }
Source:
public org.ovirt.engine.api.model.GlusterBricks list ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = getBackendCollection ( VdcQueryType.GetGlusterVolumeBricks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( getVolumeId ( ) ) ) ) ; org.ovirt.engine.api.model.GlusterBricks bricksModel = mapCollection ( bricks ) ; return addActions ( bricksModel ) ; }

Target:
public org.ovirt.engine.api.model.GlusterBricks list ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = getBackendCollection ( QueryType.GetGlusterVolumeBricks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( getVolumeId ( ) ) ) ) ; org.ovirt.engine.api.model.GlusterBricks bricksModel = mapCollection ( bricks ) ; return addActions ( bricksModel ) ; }
Source:
public void testISplitRpm ( ) { org.junit.Assert.assertArrayEquals ( new java.lang.String [ ] { "ovirt-iso-node" , "2.6.0" , "20130820.fc18.x86_64" } , org.ovirt.engine.core.common.utils.RpmVersionUtils.splitRpmToParts ( "ovirt-iso-node-2.6.0-20130820.fc18.x86_64" ) ) ; }

Target:
public void testISplitRpm ( ) { org.junit.jupiter.api.Assertions.assertArrayEquals ( new java.lang.String [ ] { "ovirt-iso-node" , "2.6.0" , "20130820.fc18.x86_64" } , org.ovirt.engine.core.common.utils.RpmVersionUtils.splitRpmToParts ( "ovirt-iso-node-2.6.0-20130820.fc18.x86_64" ) ) ; }
Source:
public void testGetAllRunningForVds ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllRunningByVds ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllRunningForVds ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllRunningByVds ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; }
Source:
protected void AsyncSearch ( ) { super . AsyncSearch ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterSearch ( getSearchString ( ) , SearchType.Network , getSearchPageSize ( ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }

Target:
protected void asyncSearch ( ) { super . asyncSearch ( ) ; setAsyncResult ( org.ovirt.engine.ui.frontend.Frontend.RegisterSearch ( getSearchString ( ) , SearchType.Network , getSearchPageSize ( ) ) ) ; setItems ( getAsyncResult ( ) . getData ( ) ) ; }
Source:
private void setXmlOvfData ( ) throws java.io.IOException { xmlOvfData = new java.lang.String ( java.nio.file.Files.readAllBytes ( java.nio.file.Paths.get ( org.ovirt.engine.core.bll.ImportVMFromConfigurationCommandTest.VM_OVF_XML_DATA ) ) , java.nio.charset.Charset.forName ( "UTF-8" ) ) ; }

Target:
private void setXmlOvfData ( ) throws java.io.IOException { xmlOvfData = new java.lang.String ( java.nio.file.Files.readAllBytes ( java.nio.file.Paths.get ( org.ovirt.engine.core.bll.ImportVMFromConfigurationCommandTest.VM_OVF_XML_DATA ) ) , java.nio.charset.StandardCharsets.UTF_8 ) ; }
Source:
public void onRollback ( ) { releaseMacs ( ) ; }

Target:
public void onRollback ( ) { log.debug ( "Rollback occurred, releasing macs {}." , super . macs ) ; releaseMacs ( ) ; }
Source:
protected abstract java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > getDiskImagesFromConfiguration ( ) ;

Target:
protected abstract java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > getAdjustedDiskImagesFromConfiguration ( ) ;
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return externalNetworkPredicate.eval ( network ) ; }

Target:
public boolean test ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return externalNetworkPredicate.test ( network ) ; }
Source:
public void runningSucceded ( ) { try { org.ovirt.engine.core.bll.MigrateVmCommand.getVmDynamicDao ( ) . clearMigratingToVds ( org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) ) ; } finally { super . runningSucceded ( ) ; } }

Target:
public void runningSucceded ( ) { try { org.ovirt.engine.core.bll.MigrateVmCommand.getVmDynamicDao ( ) . clearMigratingToVds ( org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) ) ; updateVmAfterMigrationToDifferentCluster ( ) ; } finally { super . runningSucceded ( ) ; } }
Source:
protected java.lang.String composeMessage ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . newNameWithSuffixCannotContainBlankOrSpecialChars ( UnitVmModel.VM_TEMPLATE_NAME_MAX_LIMIT ) ; }

Target:
protected java.lang.String getSuffixCauseToClonedNameCollisionMessage ( java.lang.String existingName ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . suffixCauseToClonedTemplateNameCollision ( existingName ) ; }
Source:
private void setDefaultConsoleMode ( ) { setspice ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ISpice ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.models.vms.ISpiceNative.class ) ) ) ) ; }

Target:
private void setDefaultConsoleMode ( ) { setSpiceImpl ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleClient ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.models.vms.ISpiceNative.class ) ) ) ) ; }
Source:
public void testIsMatch ( ) { assertTrue ( "A number should match" , org.ovirt.engine.core.compat.Regex.IsMatch ( "1" , "[0-9]" ) ) ; assertFalse ( "A letter should not match" , org.ovirt.engine.core.compat.Regex.IsMatch ( "a" , "[0-9]" ) ) ; }

Target:
public void testIsMatch ( ) { org.junit.Assert.assertTrue ( "A number should match" , org.ovirt.engine.core.compat.Regex.IsMatch ( "1" , "[0-9]" ) ) ; org.junit.Assert.assertFalse ( "A letter should not match" , org.ovirt.engine.core.compat.Regex.IsMatch ( "a" , "[0-9]" ) ) ; }
Source:
public void getIpv6AddressOfNetwork ( ) { setIpv6Details ( nic ) ; org.junit.Assert.assertThat ( underTest.getIpv6AddressOfNetwork ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NETWORK_NAME1 ) , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.IPV6_ADDRESS ) ) ; }

Target:
public void getIpv6AddressOfNetwork ( ) { setIpv6Details ( nic ) ; org.hamcrest.MatcherAssert.assertThat ( underTest.getIpv6AddressOfNetwork ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NETWORK_NAME1 ) , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.IPV6_ADDRESS ) ) ; }
Source:
protected org.ovirt.engine.api.model.Host populate ( org.ovirt.engine.api.model.Host model , org.ovirt.engine.core.common.businessentities.VDS entity ) { org.ovirt.engine.api.model.Host host = parent.addStatistics ( model , entity , uriInfo , httpHeaders ) ; parent.addCertificateInfo ( host ) ; return host ; }

Target:
protected org.ovirt.engine.api.model.Host deprecatedPopulate ( org.ovirt.engine.api.model.Host model , org.ovirt.engine.core.common.businessentities.VDS entity ) { org.ovirt.engine.api.model.Host host = parent.addStatistics ( model , entity , uriInfo , httpHeaders ) ; parent.addCertificateInfo ( host ) ; return host ; }
Source:
private void removeListeners ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { if ( ( viewUpdatingListener ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice = model.getVmConsoles ( ) . getConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel.class ) . getspice ( ) ; if ( spice == null ) { return ; } }

Target:
private void removeListeners ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { if ( ( viewUpdatingListener ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleClient spice = model.getVmConsoles ( ) . getConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel.class ) . getSpiceImpl ( ) ; if ( spice == null ) { return ; } }
Source:
public void testStoragePoolDoesntExist ( ) { final int domainSizeGB = 20 ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddVmTests ( domainSizeGB ) ; org.mockito.Mockito.doReturn ( null ) . when ( cmd ) . getStoragePool ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; }

Target:
public void testStoragePoolDoesntExist ( ) { final int domainSizeGB = 20 ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddVmTests ( domainSizeGB ) ; org.mockito.Mockito.doReturn ( null ) . when ( cmd ) . getStoragePool ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... parameters ) { Test ( ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { test ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; prepareMocks ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; org.mockito.Mockito.doReturn ( getExistingStorageDomains ( ) ) . when ( storageDomainDao ) . getAll ( ) ; }
Source:
public javax.ws.rs.core.Response end ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.EndExternalStepParameters parameters = new org.ovirt.engine.core.common.action.EndExternalStepParameters ( guid , ( action.isSetSucceeded ( ) ? action.isSucceeded ( ) : true ) ) ; return doAction ( VdcActionType.EndExternalStep , parameters , action ) ; }

Target:
public javax.ws.rs.core.Response end ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.EndExternalStepParameters parameters = new org.ovirt.engine.core.common.action.EndExternalStepParameters ( guid , ( action.isSetSucceeded ( ) ? action.isSucceeded ( ) : true ) ) ; return doAction ( ActionType.EndExternalStep , parameters , action ) ; }
Source:
protected void populateDomains ( java.util.List < java.lang.String > domains ) { getDomain ( ) . setItems ( domains ) ; getDomain ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( domains ) ) ; }

Target:
protected void populateDomains ( java.util.List < java.lang.String > domains ) { getDomain ( ) . setItems ( domains ) ; getDomain ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( domains ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAllIds ( ) { return getCallsHandler ( ) . executeReadList ( "GetAllVmJobIds" , createGuidMapper ( ) , getCustomMapSqlParameterSource ( ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmJob > getAll ( ) { return getCallsHandler ( ) . executeReadList ( "GetAllVmJobs" , org.ovirt.engine.core.dao.VmJobDaoImpl.VmJobRowMapper.instance , getCustomMapSqlParameterSource ( ) ) ; }
Source:
public void discover ( ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object execute = client.execute ( "discover" , new java.lang.Object [ ] { } ) ; java.lang.System.out.println ( execute ) ; }

Target:
public java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > discover ( ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object execute = client.execute ( "discover" , new java.lang.Object [ ] { } ) ; return parseDiscover ( execute ) ; }
Source:
protected void acquireLock ( org.ovirt.engine.core.compat.Guid clusterId ) { getLockManager ( ) . acquireLockWait ( getEngineLock ( clusterId ) ) ; }

Target:
protected void releaseLock ( org.ovirt.engine.core.compat.Guid clusterId ) { lockManager.releaseLock ( getEngineLock ( clusterId ) ) ; }
Source:
void setSessionId ( java.lang.String sessionId ) { clientStorage.setLocalItem ( org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.SESSION_ID_KEY , sessionId ) ; }

Target:
private void processSessionId ( java.lang.String sessionId ) { org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionAcquiredEvent.fire ( eventBus , sessionId ) ; scheduleKeepAliveHeartbeat ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.AsyncTask createAsyncTask ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.createAsyncTask ( command , asyncTaskCreationInfo , parentCommand ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTask getAsyncTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.ActionType parentCommand ) { return coCoAsyncTaskHelper.getAsyncTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
public int getPort ( ) { return this . port ; }

Target:
public int getPort ( ) { return _port ; }
Source:
private void removeVdsFromUnseenDomainsReport ( java.util.List < org.ovirt.engine.core.compat.Guid > nonOpVdss ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.infoFormat ( "Removing host(s) {0} from hosts unseen domain report cache" , nonOpVdss ) ; for ( org.ovirt.engine.core.compat.Guid id : nonOpVdss ) { clearVdsReportInfoOnUnseenDomain ( id ) ; } }

Target:
private void removeVdsFromUnseenDomainsReport ( java.util.List < org.ovirt.engine.core.compat.Guid > nonOpVdss ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "Removing host(s) '{}' from hosts unseen domain report cache" , nonOpVdss ) ; for ( org.ovirt.engine.core.compat.Guid id : nonOpVdss ) { clearVdsReportInfoOnUnseenDomain ( id ) ; } }
Source:
public void sethigh_utilization ( int value ) { this . high_utilization = value ; }

Target:
public void setComment ( java.lang.String value ) { comment = value ; }
Source:
public java.util.Map < java.lang.String , java.lang.Object > glusterVolumeGeoRepStatus ( ) ;

Target:
public java.util.Map < java.lang.String , java.lang.Object > glusterVolumeGeoRepSessionList ( ) ;
Source:
java.lang.String getItemText ( java.lang.Object item ) { return "- " + ( java.lang.String.valueOf ( item ) ) ; }

Target:
java.lang.String getItemTextFormatted ( java.lang.String itemText ) { return "- " + itemText ; }
Source:
public void testAction ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = mockUri ( "vms" , "00000001-0001-0001-0001-000000000011" , "freezefilesystems" ) ; javax.ws.rs.core.Request request = mockRequest ( "POST" ) ; org.ovirt.engine.api.model.Fault fault = usageFinder.getUsageMessage ( uriInfo , request ) ; assertEquals ( "For correct usage, see: http://localhost:8080/ovirt-engine/apidoc#services/vm/methods/freeze_filesystems" , fault.getDetail ( ) ) ; }

Target:
public void testAction ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = mockUri ( "vms" , "00000001-0001-0001-0001-000000000011" , "freezefilesystems" ) ; javax.ws.rs.core.Request request = mockRequest ( "POST" ) ; org.ovirt.engine.api.model.Fault fault = usageFinder.getUsageMessage ( uriInfo , request ) ; org.junit.Assert.assertEquals ( "For correct usage, see: http://localhost:8080/ovirt-engine/apidoc#services/vm/methods/freeze_filesystems" , fault.getDetail ( ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcActionType getEndActionType ( ) { org.ovirt.engine.core.common.action.VdcActionType commandType = getTaskParameters ( ) . getCommandType ( ) ; if ( ! ( VdcActionType.Unknown.equals ( commandType ) ) ) { return commandType ; } return getaction_type ( ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcActionType getEndActionType ( ) { org.ovirt.engine.core.common.action.VdcActionType commandType = getTaskParameters ( ) . getCommandType ( ) ; if ( ! ( VdcActionType.Unknown.equals ( commandType ) ) ) { return commandType ; } return getActionType ( ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; return performAction ( VdcActionType.RemoveVmTemplateInterface , new org.ovirt.engine.core.common.action.RemoveVmTemplateInterfaceParameters ( templateId , guid ) ) ; }

Target:
public org.ovirt.engine.api.model.Nic get ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic = lookupNic ( guid ) ; if ( nic != null ) { return addLinks ( populate ( map ( nic ) , nic ) ) ; } return notFound ( ) ; }
Source:
public void testImportVMFromConfigurationWhenVMDoesNotExists ( ) { initCommand ( null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_UNSUPPORTED_OVF ) ; }

Target:
public void testImportVMFromConfigurationWhenVMDoesNotExists ( ) { initCommand ( null ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_UNSUPPORTED_OVF ) ; }
Source:
protected static org.ovirt.engine.api.restapi.resource.BackendVmDisksResource getCollection ( ) { return new org.ovirt.engine.api.restapi.resource.BackendVmDisksResource ( org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID , org.ovirt.engine.core.common.queries.VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID ) ) ; }

Target:
protected static org.ovirt.engine.api.restapi.resource.BackendVmDisksResource getCollection ( ) { return new org.ovirt.engine.api.restapi.resource.BackendVmDisksResource ( org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID ) ; }
Source:
public boolean isCifsEnabled ( ) { java.lang.String cifsEnabled = getOptionValue ( GlusterConstants.OPTION_CIFS_DISABLE ) ; return ( cifsEnabled == null ) || ( cifsEnabled.equalsIgnoreCase ( GlusterConstants.OFF ) ) ; }

Target:
public boolean isCifsEnabled ( ) { java.lang.String cifsEnabled = getOptionValue ( GlusterConstants.OPTION_USER_CIFS ) ; return ( cifsEnabled == null ) || ( cifsEnabled.equalsIgnoreCase ( GlusterConstants.ON ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( org.ovirt.engine.core.compat.Guid storagePoolId , long sizeRequested ) { return org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( storagePoolId , sizeRequested , java.util.Collections.< org.ovirt.engine.core.common.businessentities.StorageDomain , java.lang.Integer > emptyMap ( ) ) ; }

Target:
public static void updateVmLock ( final org.ovirt.engine.core.common.businessentities.VM vm ) { vm.setLockInfo ( org.ovirt.engine.core.bll.VmHandler.getLockManager ( ) . getLockInfo ( java.lang.String.format ( "%s%s" , vm.getId ( ) , LockingGroup.VM.name ( ) ) ) ) ; }
Source:
public void testOnlyLoginNameWhenNoDirectorySet ( ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setLoginName ( "Legolas" ) ; user.setDomain ( "" ) ; command.setCurrentUser ( user ) ; org.junit.Assert.assertEquals ( command.getConsoleUserName ( ) , "Legolas" ) ; }

Target:
public void testOnlyLoginNameWhenNoDirectorySet ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; user.setLoginName ( "Legolas" ) ; user.setDomain ( "" ) ; command.setCurrentUser ( user ) ; org.junit.Assert.assertEquals ( command.getConsoleUserName ( ) , "Legolas" ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { mVmReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.getBroker ( ) . pause ( mVmId.toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.ProceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMDynamicData ( mVmReturn.mVm ) . getStatus ( ) ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { mVmReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.getBroker ( ) . pause ( mVmId.toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMDynamicData ( mVmReturn.mVm ) . getStatus ( ) ) ; }
Source:
public void checkNullAddress ( ) { org.junit.Assert.assertFalse ( underTest.test ( generateVdsNetworkInterface ( null ) ) ) ; }

Target:
public void checkNullAddress ( ) { org.junit.jupiter.api.Assertions.assertFalse ( underTest.test ( generateVdsNetworkInterface ( null ) ) ) ; }
Source:
private void BootProtocolChanged ( ) { UpdateCanSpecify ( ) ; getAddress ( ) . setIsValid ( true ) ; getSubnet ( ) . setIsValid ( true ) ; getGateway ( ) . setIsValid ( true ) ; }

Target:
private void bootProtocolChanged ( ) { updateCanSpecify ( ) ; getAddress ( ) . setIsValid ( true ) ; getSubnet ( ) . setIsValid ( true ) ; getGateway ( ) . setIsValid ( true ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase runInternalAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters ) { return runActionImpl ( actionType , parameters , true , null ) ; }

Target:
public org.ovirt.engine.core.common.action.ActionReturnValue runInternalAction ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.ActionParametersBase parameters ) { return runActionImpl ( actionType , parameters , true , null ) ; }
Source:
public java.lang.String getNoun ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 ) { assert ! ( isUnary ( ) ) : ( "The Unary Operation " + ( name ( ) ) ) + " has no Noun" ; return op2.getName ( ) ; }

Target:
public java.lang.String getNoun ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 ) { assert ! ( isUnary ( ) ) : ( "The Unary Operation " + ( name ( ) ) ) + " has no Noun" ; if ( op2 == null ) { return "Unassigned Logical Networks panel" ; } return op2.getName ( ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBookmarkDao ( ) . getByName ( org.ovirt.engine.core.bll.AddBookmarkCommand.getBookmark ( ) . getbookmark_name ( ) ) ) != null ) { AddErrorMessages ( VdcBllMessages.VAR__ACTION__ADD , VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBookmarkDao ( ) . getByName ( org.ovirt.engine.core.bll.AddBookmarkCommand.getBookmark ( ) . getbookmark_name ( ) ) ) != null ) { addErrorMessages ( VdcBllMessages.VAR__ACTION__ADD , VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ; return false ; } return true ; }
Source:
org.ovirt.engine.core.vdsbroker.vdsbroker.TaskInfoReturnForXmlRpc getTaskInfo ( java.lang.String taskUUID ) ;

Target:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) ;
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.storage.pool.GetStoragePoolsByStorageDomainIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAllForStorageDomain ( org.ovirt.engine.core.bll.storage.pool.GetStoragePoolsByStorageDomainIdQuery.getParameters ( ) . getId ( ) ) ) ; }

Target:
protected java.lang.Object queryDataCenter ( ) { return storagePoolDao.getAllForStorageDomain ( org.ovirt.engine.core.bll.storage.pool.GetStoragePoolsByStorageDomainIdQuery.getParameters ( ) . getId ( ) ) ; }
Source:
public void testExecuteQueryUserConfigFiltered ( ) { assertQueryExecution ( ConfigValues.MaxVmsInPool , true , true ) ; }

Target:
public void testExecuteQueryUserConfigFiltered ( ) { assertQueryExecution ( ConfigValues.PredefinedVMProperties , true , true ) ; }
Source:
public void testIsNetworkInSyncWhenGatewayDifferent ( ) { initIpConfigurationBootProtocolGateway ( Ipv4BootProtocol.STATIC_IP , false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4GatewayDifferent ( ) { initIpv4ConfigurationBootProtocolGateway ( Ipv4BootProtocol.STATIC_IP , false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public org.ovirt.engine.core.dao.VmPoolDAO getVmPoolDAO ( ) { return getDAO ( org.ovirt.engine.core.dao.VmPoolDAO.class ) ; }

Target:
public org.ovirt.engine.core.dao.VmPoolDAO getVmPoolDao ( ) { return getDao ( org.ovirt.engine.core.dao.VmPoolDAO.class ) ; }
Source:
public void validateSucceedsOnVolumeWithRemoveBricksTaskCompleted ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.StopRemoveGlusterVolumeBricksCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters ( volumeWithRemoveBricksTaskCompleted , getBricks ( volumeWithRemoveBricksTaskCompleted ) ) , null ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateFailsOnNull ( ) { cmd.getParameters ( ) . setBricks ( getBricks ( volumeWithRemoveBricksTaskCompleted ) ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public org.ovirt.engine.api.resource.ActionResource getActionSubresource ( java.lang.String action , java.lang.String oid ) { return null ; }

Target:
public org.ovirt.engine.api.resource.ActionResource getActionResource ( java.lang.String action , java.lang.String oid ) { return null ; }
Source:
private void prepareHostWithDifferentStatus ( ) { dbFacade.getVdsDynamicDao ( ) . updateStatus ( existingVds.getId ( ) , VDSStatus.Maintenance ) ; existingVds.setStatus ( VDSStatus.Maintenance ) ; org.junit.Assert.assertNotEquals ( existingVds.getStatus ( ) , existingVds2.getStatus ( ) ) ; }

Target:
private void prepareHostWithDifferentStatus ( ) { vdsDynamicDao.updateStatus ( existingVds.getId ( ) , VDSStatus.Maintenance ) ; existingVds.setStatus ( VDSStatus.Maintenance ) ; org.junit.Assert.assertNotEquals ( existingVds.getStatus ( ) , existingVds2.getStatus ( ) ) ; }
Source:
public void networkExists ( ) { simulateVdsGroupExists ( ) ; assertCanDoActionSucceeds ( ) ; }

Target:
public void networkExists ( ) { simulateVdsGroupExists ( ) ; org.mockito.Mockito.when ( networkDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( getNetwork ( ) ) ; assertCanDoActionSucceeds ( ) ; }
Source:
protected boolean showTransportProperties ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( VDSStatus.Maintenance.equals ( vds.getStatus ( ) ) ) { return true ; } return false ; }

Target:
protected boolean editTransportProperties ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( VDSStatus.Maintenance.equals ( vds.getStatus ( ) ) ) { return true ; } return false ; }
Source:
public void testIsDomainExistAndActiveDomainNotUp ( ) { domain.setStatus ( StorageDomainStatus.Inactive ) ; org.junit.Assert.assertEquals ( "Wrong failure for inactive domain" , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 , validator.isDomainExistAndActive ( ) . getMessage ( ) ) ; }

Target:
public void testIsDomainExistAndActiveDomainNotUp ( ) { domain.setStatus ( StorageDomainStatus.Inactive ) ; org.junit.Assert.assertThat ( "Wrong failure for inactive domain" , validator.isDomainExistAndActive ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 ) ) ; }
Source:
private org.ovirt.engine.core.common.queries.VdcQueryReturnValue getCACertificate ( ) { return backend.runInternalQuery ( QueryType.GetCACertificate , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; }

Target:
private org.ovirt.engine.core.common.queries.VdcQueryReturnValue getCACertificate ( ) { return backend.runInternalQuery ( QueryType.GetCACertificate , new org.ovirt.engine.core.common.queries.QueryParametersBase ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.InstanceType getInstanceType ( ) { if ( ( ( instanceType ) == null ) && ( ( getInstanceTypeId ( ) ) != null ) ) { instanceType = org.ovirt.engine.core.bll.VmManagementCommandBase.getVmTemplateDao ( ) . getInstanceType ( getInstanceTypeId ( ) ) ; } return instanceType ; }

Target:
protected org.ovirt.engine.core.common.businessentities.InstanceType getInstanceType ( ) { if ( ( ( instanceType ) == null ) && ( ( getInstanceTypeId ( ) ) != null ) ) { instanceType = vmTemplateDao.getInstanceType ( getInstanceTypeId ( ) ) ; } return instanceType ; }
Source:
public void fatal ( java.lang.Object arg0 , java.lang.Throwable arg1 ) { log.fatal ( addPrefixToLogMessage ( arg0 ) , arg1 ) ; }

Target:
public void info ( java.lang.Object msg , java.lang.Throwable t ) { log.info ( addPrefixToLogMessage ( msg ) , t ) ; }
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.VmTemplate > ( ) ; } return source ; }

Target:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > > asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }
Source:
void auditLog ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable , org.ovirt.engine.core.common.AuditLogType logType ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , logType ) ; }

Target:
void auditLog ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable , org.ovirt.engine.core.common.AuditLogType logType ) { new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , logType ) ; }
Source:
public void testCanDoActionImageIsLocked ( ) { disk.setImageStatus ( ImageStatus.LOCKED ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED ) ; }

Target:
public void testCanDoActionImageIsLocked ( ) { disk.setImageStatus ( ImageStatus.LOCKED ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISKS_LOCKED ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( ginjector.getApplicationConstants ( ) . clusterMainTabLabel ( ) , 1 , ginjector.getMainTabClusterModelProvider ( ) ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.ApplicationConstants applicationConstants , org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( applicationConstants.clusterMainTabLabel ( ) , 1 , modelProvider ) ; }
Source:
public void testValidModifiedBondsFailsWhenInsufficientNumberOfSlaves ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , bond.getName ( ) ) ) , ValidationResult.VALID ) ; }

Target:
public void testValidModifiedBondsFailsWhenInsufficientNumberOfSlaves ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = createNewCreateOrUpdateBondWithNameAndId ( ) ; doTestValidModifiedBonds ( createOrUpdateBond , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , createOrUpdateBond.getName ( ) ) ) , ValidationResult.VALID ) ; }
Source:
public void update ( int index , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel , java.lang.Boolean value ) { networks.asEditor ( ) . flush ( ) . setMigrationNetwork ( clusterNetworkModel , value ) ; refreshNetworksTable ( ) ; }

Target:
public void update ( int index , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel clusterNetworkModel , java.lang.Boolean value ) { updateMigrationNetwork ( clusterNetworkModel , value ) ; refreshNetworksTable ( ) ; }
Source:
public void macAddressEmptyForCreate ( ) throws java.lang.Exception { assertMacAddressFormatValidation ( "" , org.ovirt.engine.core.common.validation.group.CreateEntity.class , false ) ; }

Target:
public void macAddressEmptyForCreate ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterfaceValidationTest.assertMacAddressFormatValidation ( "" , org.ovirt.engine.core.common.validation.group.CreateEntity.class , false ) ; }
Source:
public void securityKeysExists ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . haveSecurityKey ( ) ; org.junit.Assert.assertThat ( validator.securityKeysExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void securityKeysExists ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . haveSecurityKey ( ) ; org.hamcrest.MatcherAssert.assertThat ( validator.securityKeysExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static java.lang.String getOsName ( int osId ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames.get ( osId ) ; }

Target:
public static java.lang.String getOsName ( java.lang.Integer osId ) { if ( osId == null ) { return "" ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames.get ( osId ) ; }
Source:
private static void cpuExists ( ) { org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CheckIfCpusExist ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( true ) ; }

Target:
private void cpuExists ( ) { org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . checkIfCpusExist ( ) ; }
Source:
public java.lang.String getvmt_name ( ) { return this . vmt_nameField ; }

Target:
public void setUsageCpuPercent ( java.lang.Integer value ) { this . vmStatistics.setusage_cpu_percent ( value ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.host.InterfaceEditor.Driver.driver.edit ( nic ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic ) { driver.edit ( nic ) ; }
Source:
public void setDeviceInfoText ( java.lang.String raidType ) { deviceSelectionInfo.setText ( ( ( ( "(" + ( constants.getStorageDeviceSelectionInfo ( ) ) ) + raidType ) + ")" ) ) ; }

Target:
private void initInfoIcon ( ) { raidParamsInfoIcon = new org.ovirt.engine.ui.common.widget.dialog.InfoIcon ( templates.italicText ( constants.raidConfigurationWarning ( ) ) , resources ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterHookLevel getRawValue ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity object ) { return object.getLevel ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStage getRawValue ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity object ) { return object.getStage ( ) ; }
Source:
private java.lang.Object getMemberId ( org.ovirt.engine.core.common.businessentities.IVdcQueryable member ) { if ( member != null ) { return member.getQueryableId ( ) ; } return null ; }

Target:
private java.lang.Object getMemberId ( org.ovirt.engine.core.common.businessentities.Queryable member ) { if ( member != null ) { return member.getQueryableId ( ) ; } return null ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }

Target:
public org.ovirt.engine.core.common.businessentities.ArchitectureType convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; }
Source:
public void setApiVersion ( java.lang.String apiVersion ) { this . apiVersion = apiVersion ; }

Target:
public void setVersion ( java.lang.String version ) { this . version = version ; }
Source:
private void verifyMethodPassedToHost ( ) { org.mockito.Mockito.verify ( server ) . setupNetworks ( networksCaptor.capture ( ) , bondingCaptor.capture ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct.class ) ) ; }

Target:
private void verifyMethodPassedToHost ( ) { org.mockito.Mockito.verify ( server ) . setupNetworks ( networksCaptor.capture ( ) , bondingCaptor.capture ( ) , org.mockito.Matchers.any ( java.util.HashMap.class ) ) ; }
Source:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( getSearchString ( ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( getSearchString ( ) , org.ovirt.engine.core.common.interfaces.SearchType.VM , isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }
Source:
public void updateInterface ( org.ovirt.engine.core.compat.Version clusterVersion ) { super . updateInterface ( clusterVersion ) ; getDiskInterface ( ) . setSelectedItem ( DiskInterface.VirtIO ) ; }

Target:
public void setDefaultInterface ( ) { getDiskInterface ( ) . setSelectedItem ( DiskInterface.VirtIO ) ; }
Source:
public static boolean canReadFile ( final java.io.File file ) { return ( ( file != null ) && ( file.exists ( ) ) ) && ( file.canRead ( ) ) ; }

Target:
public static boolean canReadFile ( final java.io.File file ) { return ( ( ( file != null ) && ( file.exists ( ) ) ) && ( file.canRead ( ) ) ) && ( ! ( file.isDirectory ( ) ) ) ; }
Source:
protected java.util.Set < org.ovirt.engine.core.compat.Version > getSupportedClusterLevels ( ) { return new java.util.HashSet < org.ovirt.engine.core.compat.Version > ( java.util.Arrays.asList ( Version.v3_2 , Version.v3_3 ) ) ; }

Target:
private org.ovirt.engine.core.bll.IsoDomainListSyncronizer mockIsoDomainListSyncronizer ( ) { org.ovirt.engine.core.bll.IsoDomainListSyncronizer isoDomainListSyncronizer = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.RunVmValidatorTest.MockIsoDomainListSyncronizer.class ) ; org.mockito.Mockito.doReturn ( isoDomainListSyncronizer ) . when ( runVmValidator ) . getIsoDomainListSyncronizer ( ) ; return isoDomainListSyncronizer ; }
Source:
public void testNetworkCanBeAttachedNetworkAttachmentCannotBeAddedOnBondSlave ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setBondName ( "bondName" ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN ) ) ; }

Target:
public void testNetworkCanBeAttachedNetworkAttachmentCannotBeAddedOnBondSlave ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setBondName ( "bondName" ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN ) ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { xsrfRequestBuilder.setXsrfToken ( null ) ; callback.onFailure ( caught ) ; }

Target:
public void logout ( final org.ovirt.engine.ui.frontend.communication.UserCallback callback ) { xsrfRequestBuilder.setXsrfToken ( null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; retVal.setSucceeded ( true ) ; callback.onSuccess ( retVal ) ; }
Source:
public final java.lang.String TranslateErrorTextSingle ( java.lang.String errorMsg , boolean changeIfNotFound ) { return translate ( errorMsg , changeIfNotFound , java.util.Locale.getDefault ( ) ) ; }

Target:
public final java.lang.String translateErrorTextSingle ( java.lang.String errorMsg , boolean changeIfNotFound ) { return translate ( errorMsg , changeIfNotFound , java.util.Locale.getDefault ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { setItems ( ( ( java.util.Collection ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
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 ( ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetPolicyNotSetUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_NATIVE ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy ) , currentPolicy ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotNullUsb ( ) { org.ovirt.engine.api.model.Usb usb = null ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.DISABLED ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy ) , currentPolicy ) ; }
Source:
public void getUsbPolicyUsbTypeNative ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( UsbType.NATIVE ) ; assertEquals ( UsbPolicy.ENABLED_NATIVE , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb ) ) ; }

Target:
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 ) ) ; }
Source:
public void bufferReset_headLowerBound ( ) { tested.reset ( ( - 1 ) , 2 ) ; }

Target:
public void bufferReset_headLowerBound ( ) { org.junit.jupiter.api.Assertions.assertThrows ( java.lang.IllegalArgumentException.class , ( ) -> tested.reset ( ( - 1 ) , 2 ) ) ; }
Source:
public void vmNotDuringSnapshotReturnsInvalidResultWhenInSnapshot ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid vmId = new org.ovirt.engine.core.compat.Guid ( ) ; org.mockito.Mockito.when ( snapshotDao.exists ( vmId , SnapshotStatus.LOCKED ) ) . thenReturn ( true ) ; org.ovirt.engine.core.bll.snapshots.SnapshotsValidatorTest.validateInvalidResult ( validator.vmNotDuringSnapshot ( vmId ) , VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ; }

Target:
public void snapshotExistsByGuidReturnsInvalidResultWhenNoSnapshot ( ) throws java.lang.Exception { org.mockito.Mockito.when ( snapshotDao.exists ( vmId , snapshotId ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.snapshots.SnapshotsValidatorTest.validateInvalidResult ( validator.snapshotExists ( vmId , snapshotId ) , VdcBllMessages.ACTION_TYPE_FAILED_VM_SNAPSHOT_DOES_NOT_EXIST ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.VDSGroup group ) { getCallsHandler ( ) . executeModification ( "UpdateVdsGroup" , getVdsGroupParamSource ( group ) ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.Cluster group ) { getCallsHandler ( ) . executeModification ( "UpdateCluster" , getClusterParamSource ( group ) ) ; }
Source:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.Tags result = dao.get ( existingTag.getTagId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingTag , result ) ; }

Target:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.Tags result = dao.get ( existingTag.getTagId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( existingTag , result ) ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateQuotaByCluster ( null , null ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateQuotaByCluster ( null , null ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateVirtioScsiAvailability ( ) ; updateOSValues ( ) ; }
Source:
java.lang.String numberValidationNumberBetweenInvalidReason ( java.lang.String prefixMsg , java.lang.String min , java.lang.String max ) ;

Target:
java.lang.String integerValidationNumberBetweenInvalidReason ( java.lang.String prefixMsg , int min , int max ) ;