auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void refreshGeoRepDataForVolume ( final org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { if ( volume == null ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.GlusterVolumeGeoRepSyncFailed , "No volume information" ) ; } org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getClusterDao ( ) . get ( volume.getClusterId ( ) ) ; discoverGeoRepDataInCluster ( cluster , volume ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > geoRepSessions = getGeoRepDao ( ) . getGeoRepSessions ( volume.getId ( ) ) ; refreshGeoRepSessionStatusForSessions ( cluster , geoRepSessions ) ; }

Target:
public void refreshGeoRepDataForVolume ( final org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { if ( volume == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.GlusterVolumeGeoRepSyncFailed , "No volume information" ) ; } org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getClusterDao ( ) . get ( volume.getClusterId ( ) ) ; discoverGeoRepDataInCluster ( cluster , volume ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > geoRepSessions = getGeoRepDao ( ) . getGeoRepSessions ( volume.getId ( ) ) ; refreshGeoRepSessionStatusForSessions ( cluster , geoRepSessions ) ; }
Source:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getSize ( ) : ( ( long ) ( ( ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) * ( java.lang.Math.pow ( 1024 , 3 ) ) ) ) ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( object ) ) . getSize ( ) : ( ( long ) ( ( ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) * ( java.lang.Math.pow ( 1024 , 3 ) ) ) ) ; }
Source:
public void testValidateFailReadOnlyOnInterface ( ) { org.mockito.Mockito.when ( diskValidator.isReadOnlyPropertyCompatibleWithInterface ( ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ; org.mockito.Mockito.verify ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; }

Target:
public void testValidateFailReadOnlyOnInterface ( ) { org.mockito.Mockito.when ( diskValidator.isReadOnlyPropertyCompatibleWithInterface ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ; org.mockito.Mockito.verify ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement.class ) ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.UnlabelNic , org.ovirt.engine.core.common.action.LabelNicParameters.class , new java.lang.String [ ] { "NicId" , "Label" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.NIC_ID , org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.LABELS [ 0 ] } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.UnlabelNic , org.ovirt.engine.core.common.action.LabelNicParameters.class , new java.lang.String [ ] { "NicId" , "Label" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.NIC_ID , org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.LABELS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void verifyIpv6Properties ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicA , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicB ) { org.junit.Assert.assertEquals ( nicA.getIpv6BootProtocol ( ) , nicB.getIpv6BootProtocol ( ) ) ; org.junit.Assert.assertEquals ( nicA.getIpv6Address ( ) , nicB.getIpv6Address ( ) ) ; org.junit.Assert.assertEquals ( nicA.getIpv6Prefix ( ) , nicB.getIpv6Prefix ( ) ) ; org.junit.Assert.assertEquals ( nicA.getIpv6Gateway ( ) , nicB.getIpv6Gateway ( ) ) ; }

Target:
private void verifyIpv6Properties ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicA , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicB ) { org.junit.jupiter.api.Assertions.assertEquals ( nicA.getIpv6BootProtocol ( ) , nicB.getIpv6BootProtocol ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( nicA.getIpv6Address ( ) , nicB.getIpv6Address ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( nicA.getIpv6Prefix ( ) , nicB.getIpv6Prefix ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( nicA.getIpv6Gateway ( ) , nicB.getIpv6Gateway ( ) ) ; }
Source:
private boolean canFindVmOrTemplate ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getVmTemplate ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST ) ; } } return true ; }

Target:
private boolean validateVmSnapshotStatus ( ) { org.ovirt.engine.core.bll.snapshots.SnapshotsValidator snapshotsValidator = getSnapshotsValidator ( ) ; for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.common.businessentities.VmDevice > pair : getVmsWithVmDeviceInfoForDiskId ( ) ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = pair.getSecond ( ) ; if ( ( vmDevice.getSnapshotId ( ) ) == null ) { org.ovirt.engine.core.common.businessentities.VM vm = pair.getFirst ( ) ; if ( ! ( validate ( snapshotsValidator.vmNotInPreview ( vm.getId ( ) ) ) ) ) { return false ; } } } return true ; }
Source:
public void testDnsResolverConfigurationNonDefaultRouteNetworkIsIgnored ( ) { network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; testedNetworkAttachment.setDnsResolverConfiguration ( sampleDnsResolverConfiguration2 ) ; org.junit.Assert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testDnsResolverConfigurationNonDefaultRouteNetwork ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; testedNetworkAttachment.setDnsResolverConfiguration ( sampleDnsResolverConfiguration2 ) ; org.junit.Assert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
protected void auditInvalidInterfaces ( java.util.List < java.lang.String > invalidNetworkNames , java.util.List < java.lang.String > invalidIfaceNames ) { if ( ( invalidNetworkNames.size ( ) ) > 0 ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.AddCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.AddCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , getAuditLogTypeForInvalidInterfaces ( ) ) ; } }

Target:
protected void auditInvalidInterfaces ( java.util.List < java.lang.String > invalidNetworkNames , java.util.List < java.lang.String > invalidIfaceNames ) { if ( ( invalidNetworkNames.size ( ) ) > 0 ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , getAuditLogTypeForInvalidInterfaces ( ) ) ; } }
Source:
public void testUpdate ( ) { existing_bookmark.setbookmark_name ( existing_bookmark.getbookmark_name ( ) . toUpperCase ( ) ) ; dao.update ( existing_bookmark ) ; org.ovirt.engine.core.common.businessentities.bookmarks result = dao.get ( existing_bookmark.getbookmark_id ( ) ) ; assertNotNull ( result ) ; assertEquals ( existing_bookmark.getbookmark_name ( ) , result.getbookmark_name ( ) ) ; }

Target:
public void testUpdate ( ) { existing_bookmark.setbookmark_name ( existing_bookmark.getbookmark_name ( ) . toUpperCase ( ) ) ; dao.update ( existing_bookmark ) ; org.ovirt.engine.core.common.businessentities.Bookmark result = dao.get ( existing_bookmark.getbookmark_id ( ) ) ; assertNotNull ( result ) ; assertEquals ( existing_bookmark.getbookmark_name ( ) , result.getbookmark_name ( ) ) ; }
Source:
private static void auditLogPluginError ( java.lang.String pluginName , java.lang.String errorMessage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; loggable.addCustomValue ( "PluginName" , pluginName ) ; loggable.addCustomValue ( "ErrorMessage" , errorMessage ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerObjectBuilder.auditLogDirector.log ( loggable , AuditLogType.EXTERNAL_SCHEDULER_PLUGIN_ERROR ) ; }

Target:
private static void auditLogPluginError ( java.lang.String pluginName , java.lang.String errorMessage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; loggable.addCustomValue ( "PluginName" , pluginName ) ; loggable.addCustomValue ( "ErrorMessage" , errorMessage ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerBrokerObjectBuilder.auditLogDirector.log ( loggable , AuditLogType.EXTERNAL_SCHEDULER_PLUGIN_ERROR ) ; }
Source:
public void testHostsRuleStructure ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( true ) ; rule.setPositive ( false ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; assertEquals ( EntityAffinityRule.NEGATIVE , entity.getVdsAffinityRule ( ) ) ; assertEquals ( true , entity.isVdsEnforcing ( ) ) ; }

Target:
public void testHostsRuleStructure ( ) throws java.lang.Exception { org.ovirt.engine.api.model.AffinityGroup model = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.model.AffinityRule rule = new org.ovirt.engine.api.model.AffinityRule ( ) ; rule.setEnabled ( true ) ; rule.setEnforcing ( true ) ; rule.setPositive ( false ) ; model.setHostsRule ( rule ) ; org.ovirt.engine.api.model.AffinityGroup entity = new org.ovirt.engine.api.model.AffinityGroup ( ) ; org.ovirt.engine.api.restapi.types.AffinityGroupMapper.map ( model , entity ) ; org.junit.Assert.assertEquals ( EntityAffinityRule.NEGATIVE , entity.getVdsAffinityRule ( ) ) ; org.junit.Assert.assertEquals ( true , entity.isVdsEnforcing ( ) ) ; }
Source:
public boolean pollVds ( ) { try { org.ovirt.engine.core.common.interfaces.FutureVDSCall < org.ovirt.engine.core.common.vdscommands.VDSReturnValue > task = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . runFutureVdsCommand ( FutureVDSCommandType.Poll , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( host.getId ( ) ) ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = task.get ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.SetupNetworksPollingTimeout ) , java.util.concurrent.TimeUnit.SECONDS ) ; if ( returnValue.getSucceeded ( ) ) { return true ; } } catch ( java.lang.Exception e ) { } return false ; }

Target:
private java.lang.String resolveHostManagementNetworkAddress ( java.lang.String managementNetworkName ) { if ( managementNetworkName == null ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( host.getInterfaces ( ) , new org.ovirt.engine.core.utils.network.predicate.InterfaceByNetworkNamePredicate ( managementNetworkName ) ) ; return iface != null ? iface.getAddress ( ) : null ; }
Source:
private boolean vmDeviceChanged ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType deviceType , java.lang.String device , boolean deviceEnabled ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = org.ovirt.engine.core.bll.UpdateVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmId ( ) , deviceType , device ) ; return deviceEnabled == ( vmDevices.isEmpty ( ) ) ; }

Target:
private boolean isRunningConfigurationNeeded ( ) { return ( ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValidForVmDevices ( getVmId ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) ) ) ) ; }
Source:
public void testGetLunsThatBreakDiscardAfterDeleteSupportDiscardAfterDeleteBreaks ( ) { storageDomain.setDiscardAfterDelete ( true ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lunThatBreaksDiscardSupport = createLunWithDiscardFunctionality ( 0L , true ) ; assertGetLunsThatBreakDiscardAfterDeleteSupportContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , true ) , lunThatBreaksDiscardSupport ) , java.util.Collections.singletonList ( lunThatBreaksDiscardSupport ) ) ; }

Target:
public void testGetLunsThatBreakPassDiscardFunctionalityPassDiscardBreaks ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( false , true ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lunThatBreaksDiscardSupport = createLunWithDiscardSupport ( 0L ) ; assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , lunThatBreaksDiscardSupport ) , java.util.Collections.singletonList ( lunThatBreaksDiscardSupport ) ) ; }
Source:
private java.lang.String clustersListIntoTokenizedString ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > attachedClustersList = getVdsGroupDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) ; java.util.List < java.lang.String > clusterNamesList = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup : attachedClustersList ) clusterNamesList.add ( vdsGroup.getName ( ) ) ; return org.apache.commons.lang.StringUtils.join ( clusterNamesList , ',' ) ; }

Target:
private java.lang.String clustersListIntoTokenizedString ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > attachedClustersList = getClusterDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) ; java.util.List < java.lang.String > clusterNamesList = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster cluster : attachedClustersList ) { clusterNamesList.add ( cluster.getName ( ) ) ; } return org.apache.commons.lang.StringUtils.join ( clusterNamesList , ',' ) ; }
Source:
private void refreshVmStats ( ) { for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > pair : monitoredVms ) { if ( tryLockVmForUpdate ( pair ) ) { org.ovirt.engine.core.vdsbroker.VmAnalyzer vmAnalyzer = new org.ovirt.engine.core.vdsbroker.VmAnalyzer ( pair.getFirst ( ) , pair.getSecond ( ) , this , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirectorDelegator.getInstance ( ) ) ; vmAnalyzers.add ( vmAnalyzer ) ; vmAnalyzer.analyze ( ) ; } else { org.ovirt.engine.core.vdsbroker.VmsMonitoring.log.debug ( ( "skipping VM '{}' from this monitoring cycle" + " - the VM is locked by its VmManager " ) , getVmId ( pair ) ) ; } } }

Target:
private void refreshVmStats ( ) { for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > monitoredVm : monitoredVms ) { if ( tryLockVmForUpdate ( monitoredVm ) ) { org.ovirt.engine.core.vdsbroker.VmAnalyzer vmAnalyzer = getVmAnalyzer ( monitoredVm ) ; vmAnalyzers.add ( vmAnalyzer ) ; vmAnalyzer.analyze ( ) ; if ( vmAnalyzer.isExternalVm ( ) ) { externalVms.add ( new org.ovirt.engine.core.common.utils.Pair ( vmAnalyzer.getDbVm ( ) , vmAnalyzer.getVdsmVm ( ) ) ) ; } } } processExternallyManagedVms ( ) ; processVmsWithDevicesChange ( ) ; saveVmsToDb ( ) ; }
Source:
public void testGetByIdOrNameWhenItemIsNotIdentified ( ) { org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "name" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > testItems = java.util.Collections.singletonList ( testItem ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( testItems ) ; org.junit.Assert.assertThat ( map.get ( null , "different name" ) , org.hamcrest.CoreMatchers.nullValue ( ) ) ; }

Target:
public void testGetByIdOrNameWhenItemIsNotIdentified ( ) { org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , "name" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > testItems = java.util.Collections.singletonList ( testItem ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( testItems ) ; org.hamcrest.MatcherAssert.assertThat ( map.get ( null , "different name" ) , org.hamcrest.CoreMatchers.nullValue ( ) ) ; }
Source:
protected void alertPowerManagementStatusFailed ( java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getTargetVdsID ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; auditLogDirector.log ( alert , AuditLogType.VDS_ALERT_FENCE_TEST_FAILED ) ; }

Target:
protected void alertPowerManagementStatusFailed ( java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; alert.setVdsId ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getTargetVdsID ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; auditLogDirector.log ( alert , AuditLogType.VDS_ALERT_FENCE_TEST_FAILED ) ; }
Source:
public static boolean isMemorySizeLegal ( org.ovirt.engine.core.common.businessentities.VmOsType osType , int memSizeInMB , java.util.List < java.lang.String > reasons , java.lang.String clsuter_version ) { boolean result = org.ovirt.engine.core.common.utils.VmValidationUtils.isMemorySizeLegal ( osType , memSizeInMB , clsuter_version ) ; if ( ! result ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_MEMORY_SIZE.toString ( ) ) ; reasons.add ( java.lang.String.format ( "$minMemorySize %s" , org.ovirt.engine.core.common.utils.VmValidationUtils.getMinMemorySizeInMb ( ) ) ) ; reasons.add ( java.lang.String.format ( "$maxMemorySize %s" , org.ovirt.engine.core.common.utils.VmValidationUtils.getMaxMemorySizeInMb ( osType , clsuter_version ) ) ) ; } return result ; }

Target:
public static boolean isMemorySizeLegal ( org.ovirt.engine.core.common.businessentities.VmOsType osType , int memSizeInMB , java.util.List < java.lang.String > reasons , java.lang.String clusterVersion ) { boolean result = org.ovirt.engine.core.common.utils.VmValidationUtils.isMemorySizeLegal ( osType , memSizeInMB , clusterVersion ) ; if ( ! result ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_MEMORY_SIZE.toString ( ) ) ; reasons.add ( java.lang.String.format ( "$minMemorySize %s" , org.ovirt.engine.core.common.utils.VmValidationUtils.getMinMemorySizeInMb ( ) ) ) ; reasons.add ( java.lang.String.format ( "$maxMemorySize %s" , org.ovirt.engine.core.common.utils.VmValidationUtils.getMaxMemorySizeInMb ( osType , clusterVersion ) ) ) ; } return result ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > findAllInterfaceBondNameIsEmpty ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : items ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getBondName ( ) ) ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > findAllInterfaceBondNameIsEmpty ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { return org.ovirt.engine.ui.uicommonweb.Linq.where ( items , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i ) { return org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getBondName ( ) ) ; } } ) ; }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void modifyPool ( org.ovirt.engine.core.common.businessentities.MacPool macPool ) { try ( org.ovirt.engine.core.utils.lock.AutoCloseableLock lock = writeLockResource ( ) ) { if ( ! ( macPools.containsKey ( macPool.getId ( ) ) ) ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDc.INEXISTENT_POOL_EXCEPTION_MESSAGE ) ; } removeWithoutLocking ( macPool.getId ( ) ) ; initializeMacPool ( macPool ) ; } }

Target:
public void modifyPool ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool ) { try ( org.ovirt.engine.core.utils.lock.AutoCloseableLock lock = writeLockResource ( ) ) { if ( ! ( macPools.containsKey ( macPool.getId ( ) ) ) ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.INEXISTENT_POOL_EXCEPTION_MESSAGE ) ; } removeWithoutLocking ( macPool.getId ( ) ) ; initializeMacPool ( macPool ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult iscsiBondWithTheSameNameExistInDataCenter ( org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > iscsiBonds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getIscsiBondDao ( ) . getAllByStoragePoolId ( iscsiBond.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.IscsiBond bond : iscsiBonds ) { if ( ( bond.getName ( ) . equals ( iscsiBond.getName ( ) ) ) && ( ! ( bond.getId ( ) . equals ( iscsiBond.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ISCSI_BOND_WITH_SAME_NAME_EXIST_IN_DATA_CENTER ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.dal.dbbroker.DbFacade getDBFacade ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.gluster.StorageDevice , org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel , org.ovirt.engine.ui.uicommonweb.models.gluster.HostGlusterStorageDevicesListModel > getHostGlusterStorageDevicesListProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.gluster.StorageDevice , org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel , org.ovirt.engine.ui.uicommonweb.models.gluster.HostGlusterStorageDevicesListModel > ( eventBus , defaultConfirmPopupProvider , org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.class , org.ovirt.engine.ui.uicommonweb.models.gluster.HostGlusterStorageDevicesListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.HostGlusterStorageDevicesListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCreateBrickCommand ( ) ) ) { return createBrickPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public void testUpdate ( ) { setUpGetEntityExpectations ( ) ; setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStorageServerConnectionExtension , org.ovirt.engine.core.common.action.StorageServerConnectionExtensionParameters.class , new java.lang.String [ ] { "StorageServerConnectionExtension" } , new java.lang.Object [ ] { getDefaultEntity ( ) } , true , true ) ) ; org.ovirt.engine.api.model.StorageConnectionExtension extension = resource.update ( getDefaultModel ( ) ) ; org.junit.Assert.assertNotNull ( extension ) ; org.junit.Assert.assertEquals ( extension.getId ( ) , org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionExtensionResourceTest.extensionID.toString ( ) ) ; }

Target:
public void testUpdate ( ) { setUpGetEntityExpectations ( ) ; setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateStorageServerConnectionExtension , org.ovirt.engine.core.common.action.StorageServerConnectionExtensionParameters.class , new java.lang.String [ ] { "StorageServerConnectionExtension" } , new java.lang.Object [ ] { getDefaultEntity ( ) } , true , true ) ) ; org.ovirt.engine.api.model.StorageConnectionExtension extension = resource.update ( getDefaultModel ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( extension ) ; org.junit.jupiter.api.Assertions.assertEquals ( extension.getId ( ) , org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionExtensionResourceTest.extensionID.toString ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DbUser getTargetDbUser ( ) { org.ovirt.engine.core.common.businessentities.DbUser dbUser = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; dbUser.setLoginName ( getSearchString ( ) ) ; dbUser.setDomain ( ( ( org.ovirt.engine.core.aaa.ProfileEntry ) ( getProfile ( ) . getSelectedItem ( ) ) ) . getAuthz ( ) ) ; return dbUser ; }

Target:
private org.ovirt.engine.core.common.businessentities.aaa.DbUser getTargetDbUser ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser dbUser = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; dbUser.setLoginName ( getSearchString ( ) ) ; dbUser.setDomain ( ( ( org.ovirt.engine.core.aaa.ProfileEntry ) ( getProfile ( ) . getSelectedItem ( ) ) ) . getAuthz ( ) ) ; return dbUser ; }
Source:
public static void GetTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void GetHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public void addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item ) { item.setFormPanel ( this ) ; com.google.gwt.user.client.ui.Label itemLabel = new com.google.gwt.user.client.ui.Label ( item.getName ( ) ) ; itemLabel.setStyleName ( "formPanel_detailViewItemName" ) ; com.google.gwt.user.client.ui.Grid view = getDetailView ( item.getColumn ( ) ) ; view.setWidget ( item.getRow ( ) , 0 , itemLabel ) ; updateFormItem ( item ) ; }

Target:
public void addFormItem ( org.ovirt.engine.ui.common.widget.form.FormItem item ) { com.google.gwt.user.client.ui.Label itemLabel = new com.google.gwt.user.client.ui.Label ( item.getName ( ) ) ; itemLabel.setStyleName ( "formPanel_detailViewItemName" ) ; com.google.gwt.user.client.ui.Grid view = getDetailView ( item.getColumn ( ) ) ; view.setWidget ( item.getRow ( ) , 0 , itemLabel ) ; updateFormItem ( item ) ; incNextAvailableRow ( item.getColumn ( ) ) ; }
Source:
private boolean updateImageParametersRequiringVmDownRequested ( ) { if ( ( getOldDisk ( ) . getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return false ; } org.ovirt.engine.core.compat.Guid oldQuotaId = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) . getQuotaId ( ) ; return ! ( java.util.Objects.equals ( oldQuotaId , getQuotaId ( ) ) ) ; }

Target:
private boolean updateImageParametersRequiringVmDownRequested ( ) { if ( ( getOldDisk ( ) . getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { return false ; } org.ovirt.engine.core.compat.Guid oldQuotaId = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( getOldDisk ( ) ) ) . getQuotaId ( ) ; return ! ( java.util.Objects.equals ( oldQuotaId , getQuotaId ( ) ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.NetworkCluster get ( org.ovirt.engine.core.common.businessentities.NetworkClusterId id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , id.getClusterId ( ) ) . addValue ( "network_id" , id.getNetworkId ( ) ) ; return getCallsHandler ( ) . executeRead ( "Getnetwork_clusterBycluster_idAndBynetwork_id" , org.ovirt.engine.core.dao.NetworkClusterDAODbFacadeImpl.mapper , parameterSource ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.NetworkCluster get ( org.ovirt.engine.core.common.businessentities.network.NetworkClusterId id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , id.getClusterId ( ) ) . addValue ( "network_id" , id.getNetworkId ( ) ) ; return getCallsHandler ( ) . executeRead ( "Getnetwork_clusterBycluster_idAndBynetwork_id" , org.ovirt.engine.core.dao.NetworkClusterDAODbFacadeImpl.mapper , parameterSource ) ; }
Source:
public static void setGatewayIfNecessary ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.lang.String gateway ) { iface.setGateway ( gateway ) ; }

Target:
private static void setGateway ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < java.lang.String > gatewaySetter ) { if ( bootProtocol == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { java.lang.String gateway = ipInfoFetcher.fetchGateway ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( gateway ) ) { gatewaySetter.accept ( gateway ) ; } } }
Source:
public void initialize ( ) { org.ovirt.engine.core.bll.job.JobRepositoryCleanupManager.log.info ( "Start initializing {}" , getClass ( ) . getSimpleName ( ) ) ; succeededJobTime = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.SucceededJobCleanupTimeInMinutes ) ; failedJobTime = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.FailedJobCleanupTimeInMinutes ) ; java.lang.Integer cleanupFrequency = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.JobCleanupRateInMinutes ) ; executor.scheduleWithFixedDelay ( this :: cleanCompletedJob , cleanupFrequency , cleanupFrequency , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.job.JobRepositoryCleanupManager.log.info ( "Finished initializing {}" , getClass ( ) . getSimpleName ( ) ) ; }

Target:
public void initialize ( ) { org.ovirt.engine.core.bll.job.JobRepositoryCleanupManager.log.info ( "Start initializing {}" , getClass ( ) . getSimpleName ( ) ) ; succeededJobTime = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.SucceededJobCleanupTimeInMinutes ) ; failedJobTime = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.FailedJobCleanupTimeInMinutes ) ; long cleanupFrequency = org.ovirt.engine.core.common.config.Config.< java.lang.Long > getValue ( ConfigValues.JobCleanupRateInMinutes ) ; executor.scheduleWithFixedDelay ( this :: cleanCompletedJob , cleanupFrequency , cleanupFrequency , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.job.JobRepositoryCleanupManager.log.info ( "Finished initializing {}" , getClass ( ) . getSimpleName ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult interfaceIsValidSlave ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE ) . when ( ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( iface ) ) || ( iface.isBond ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult interfaceIsValidSlave ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_INTERFACE_NAME , iface.getName ( ) ) ) . when ( ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( iface ) ) || ( iface.isBond ( ) ) ) ) ; }
Source:
public void getJobWithSteps ( ) { org.ovirt.engine.core.common.job.Job jobWithSteps = jobRepository.getJobWithSteps ( job.getId ( ) ) ; org.junit.Assert.assertNotNull ( jobWithSteps ) ; org.junit.Assert.assertNotNull ( jobWithSteps.getSteps ( ) ) ; org.junit.Assert.assertTrue ( ( ! ( jobWithSteps.getSteps ( ) . isEmpty ( ) ) ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.job.JobRepositoryTest.JOB_SUBJECT_ENTITIES_MAP , jobWithSteps.getJobSubjectEntities ( ) ) ; }

Target:
public void getJobWithSteps ( ) { org.ovirt.engine.core.common.job.Job jobWithSteps = jobRepository.getJobWithSteps ( job.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( jobWithSteps ) ; org.junit.jupiter.api.Assertions.assertNotNull ( jobWithSteps.getSteps ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( jobWithSteps.getSteps ( ) . isEmpty ( ) ) ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.bll.job.JobRepositoryTest.JOB_SUBJECT_ENTITIES_MAP , jobWithSteps.getJobSubjectEntities ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.getVm ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_EXIST ) ; return false ; } if ( ! ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_CANCEL_MIGRATION_WHEN_VM_IS_NOT_MIGRATING ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.getVm ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.CancelMigrateVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_CANCEL_MIGRATION_WHEN_VM_IS_NOT_MIGRATING ) ; } return true ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isBoot ( ) ? constants.bootableDisk ( ) : null ) ) ; return disk.isBoot ( ) ? resources.bootableDiskIcon ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isBoot ( ) ? constants.bootableDisk ( ) : null ) ) ; return disk.isBoot ( ) ? org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmDiskAttachPopupWidget.resources.bootableDiskIcon ( ) : null ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = auditLogDao.get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; auditLogDao.remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; auditLog.setUserId ( Guid.Empty ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logableToClear = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( auditLog ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator eventFloodRegulator = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator ( logableToClear , auditLog.getLogType ( ) ) ; eventFloodRegulator.evict ( ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = getAuditLog ( ) ; auditLogDao.remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; auditLog.setUserId ( Guid.Empty ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logableToClear = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( auditLog ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator eventFloodRegulator = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.EventFloodRegulator ( logableToClear , auditLog.getLogType ( ) ) ; eventFloodRegulator.evict ( ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }
Source:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfile > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.IdQueryParameters ( ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public static void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public void endSuccessfully ( ) { endCreateAllSnapshots ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , true ) ; }

Target:
public void endSuccessfully ( ) { endCreateAllSnapshots ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , true ) ; enclosingCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; }
Source:
public void onResult ( java.lang.String result ) { this . resultValue = result ; this . resultType = JsFunction.RESULT_TYPE_STRING ; }

Target:
public boolean invokeAsString ( com.google.gwt.core.client.JsArray < ? > args , org.ovirt.engine.ui.webadmin.plugin.jsni.JsFunction.ErrorHandler errorHandler ) { clearResultInformation ( ) ; return function.invoke ( args , JsFunction.RESULT_TYPE_STRING , ( java.lang.String result ) -> { this . resultValue = result ; this . resultType = JsFunction.RESULT_TYPE_STRING ; } , errorHandler ) ; }