auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer newEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServer ( ) ; newEntity.setId ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; newEntity.setGlusterServerUuid ( FixturesTool.GLUSTER_SERVER_UUID2 ) ; newEntity.setPeerStatus ( PeerStatus.CONNECTED ) ; dao.save ( newEntity ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServer entity = dao.getByServerId ( newEntity.getId ( ) ) ; org.junit.Assert.assertEquals ( newEntity , entity ) ; }

Target:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer newEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServer ( ) ; newEntity.setId ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; newEntity.setGlusterServerUuid ( FixturesTool.GLUSTER_SERVER_UUID2 ) ; newEntity.setPeerStatus ( PeerStatus.CONNECTED ) ; dao.save ( newEntity ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServer entity = dao.getByServerId ( newEntity.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( newEntity , entity ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { if ( value != null ) { final com.google.gwt.safehtml.shared.SafeHtml renderedImage = getRenderedImage ( value ) ; sb.append ( template.imageContainerWithStyleClass ( id , style , styleClass , renderedImage ) ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , T value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { if ( value != null ) { final com.google.gwt.safehtml.shared.SafeHtml renderedImage = getRenderedImage ( value ) ; sb.append ( template.imageContainerWithStyleClass ( id , com.google.gwt.safecss.shared.SafeStylesUtils.fromTrustedString ( style ) , styleClass , renderedImage ) ) ; } }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public boolean qosParametersEqual ( ) { if ( ( ifaceQos ) == ( hostNetworkQos ) ) { return true ; } boolean ifaceQosUnset = qosUnset ( ifaceQos ) ; boolean hostNetworkQosUnset = qosUnset ( hostNetworkQos ) ; if ( ifaceQosUnset && hostNetworkQosUnset ) { return true ; } if ( ifaceQosUnset != hostNetworkQosUnset ) { return false ; } return ( ( isOutAverageLinkShareInSync ( ) ) && ( isOutAverageUpperLimitInSync ( ) ) ) && ( isOutAverageRealTimeInSync ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IpV6Address getIpv6PrimaryAddress ( ) { return networkDataCenterIpConfigurationDefinition.getIpv6PrimaryAddress ( ) ; }
Source:
private org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue , org.ovirt.engine.core.compat.Guid storageDomainId ) { java.lang.String message = org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( StepEnum.MERGE_SNAPSHOTS , getJobMessageProperties ( ) ) ; return super . createTask ( taskId , vdsReturnValue.getCreationInfo ( ) , VdcActionType.RemoveSnapshot , message , VdcObjectType.Storage , storageDomainId ) ; }

Target:
private org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue , org.ovirt.engine.core.compat.Guid storageDomainId ) { java.lang.String message = org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveStepMessage ( StepEnum.MERGE_SNAPSHOTS , getJobMessageProperties ( ) ) ; return super . createTask ( taskId , vdsReturnValue.getCreationInfo ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getParameters ( ) . getParentCommand ( ) , message , VdcObjectType.Storage , storageDomainId ) ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Vm model = new org.ovirt.engine.api.model.Vm ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "add" , "cluster.id|name" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Vm model = createModel ( null ) ; model.setTemplate ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "add" , "template.id|name" ) ; } }
Source:
public void testGetLunsToUpdateInDbDiffLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.saveNewLuns ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }

Target:
public void testGetLunsToUpdateInDbDiffLunIdDiffPvId ( ) { org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.saveLunsHandler ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }
Source:
private org.ovirt.engine.api.model.Network lookupAtachedNetwork ( java.lang.String networkName ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( networkName ) ) ) { for ( org.ovirt.engine.api.model.Network nwk : parent.getClusterNetworks ( ) ) { if ( nwk.getName ( ) . equals ( networkName ) ) return nwk ; } } return null ; }

Target:
private org.ovirt.engine.api.model.Network lookupAtachedNetwork ( java.lang.String networkName ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( networkName ) ) ) { for ( org.ovirt.engine.api.model.Network nwk : parent.getClusterNetworks ( ) ) { if ( nwk.getName ( ) . equals ( networkName ) ) return nwk ; } } return null ; }
Source:
private java.util.List < org.ovirt.engine.api.model.Network > getEntities ( boolean isDisplay , boolean isMigration , boolean isRequired ) { java.util.List < org.ovirt.engine.api.model.Network > entities = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { if ( isDisplay ) { entities.add ( getEntity ( i , isDisplay , isMigration , isRequired ) ) ; } else { entities.add ( getEntity ( i ) ) ; } } return entities ; }

Target:
private java.util.List < org.ovirt.engine.api.model.Network > getEntities ( boolean isDisplay , boolean isMigration , boolean isRequired , boolean isDefaultRoute ) { java.util.List < org.ovirt.engine.api.model.Network > entities = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { if ( isDisplay ) { entities.add ( getEntity ( i , isDisplay , isMigration , isRequired , isDefaultRoute ) ) ; } else { entities.add ( getEntity ( i ) ) ; } } return entities ; }
Source:
private void updateMigrationOptions ( ) { org.ovirt.engine.core.compat.Version version = getVersion ( ) . getSelectedItem ( ) ; if ( version == null ) { return ; } autoConverge.updateChangeability ( ConfigurationValues.AutoConvergenceSupported , version ) ; migrateCompressed.updateChangeability ( ConfigurationValues.MigrationCompressionSupported , version ) ; }

Target:
private void migrationPoliciesChanged ( ) { boolean hasMigrationPolicy = ( ( getMigrationPolicies ( ) . getSelectedItem ( ) ) != null ) && ( ! ( NoMigrationPolicy.ID.equals ( getMigrationPolicies ( ) . getSelectedItem ( ) . getId ( ) ) ) ) ; org.ovirt.engine.ui.uicompat.UIConstants constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; getAutoConverge ( ) . setIsChangeable ( ( ! hasMigrationPolicy ) , constants.availableOnlyWithNoMigrationPolicy ( ) ) ; getMigrateCompressed ( ) . setIsChangeable ( ( ! hasMigrationPolicy ) , constants.availableOnlyWithNoMigrationPolicy ( ) ) ; }
Source:
public void setup ( ) { try { org.quartz.SchedulerFactory sf = new org.quartz.impl.StdSchedulerFactory ( ) ; sched = sf.getScheduler ( ) ; sched.start ( ) ; sched.getListenerManager ( ) . addJobListener ( new org.ovirt.engine.core.utils.timer.FixedDelayJobListener ( this ) , org.quartz.impl.matchers.GroupMatcher.jobGroupEquals ( Scheduler.DEFAULT_GROUP ) ) ; } catch ( org.quartz.SchedulerException se ) { log.error ( "there is a problem with the underlying Scheduler." , se ) ; } }

Target:
public void setup ( ) { try { org.quartz.SchedulerFactory sf = new org.quartz.impl.StdSchedulerFactory ( ) ; sched = sf.getScheduler ( ) ; sched.start ( ) ; sched.getListenerManager ( ) . addJobListener ( new org.ovirt.engine.core.utils.timer.FixedDelayJobListener ( this ) , org.quartz.impl.matchers.GroupMatcher.jobGroupEquals ( Scheduler.DEFAULT_GROUP ) ) ; } catch ( org.quartz.SchedulerException se ) { log.error ( "there is a problem with the underlying Scheduler: {}" , se.getMessage ( ) ) ; log.debug ( "Exception" , se ) ; } }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public java.lang.String [ ] [ ] runJob ( java.lang.String [ ] args ) { int exitCode = runJobInTOS ( args ) ; java.lang.String [ ] [ ] bufferValue = new java.lang.String [ ] [ ] { new java.lang.String [ ] { java.lang.Integer.toString ( exitCode ) } } ; return bufferValue ; }

Target:
public java.lang.String [ ] [ ] runJob ( java.lang.String [ ] args ) { int exitCode = runJobInTOS ( args ) ; java.lang.String [ ] [ ] bufferValue = ( ( java.lang.String [ ] [ ] ) ( globalBuffer.toArray ( new java.lang.String [ globalBuffer.size ( ) ] [ ] ) ) ) ; return bufferValue ; }
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.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }
Source:
public void securityKeysDoesNotExist ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . haveSecurityKey ( ) ; org.junit.Assert.assertThat ( validator.securityKeysExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND ) ) ; }

Target:
public void securityKeysDoesNotExist ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . haveSecurityKey ( ) ; org.junit.Assert.assertThat ( validator.securityKeysExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND ) ) ; }
Source:
public static void GetPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByAdElementIdParameters ( userId ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.api.model.Permissions list ( ) { java.util.Set < org.ovirt.engine.api.model.Permission > permissions = new java.util.TreeSet ( new org.ovirt.engine.api.restapi.resource.BackendAssignedPermissionsResource.PermissionsComparator ( ) ) ; java.util.List < org.ovirt.engine.api.model.Permission > directPermissions = getBackendCollection ( queryType , queryParams ) ; permissions.addAll ( directPermissions ) ; if ( queryType.equals ( QueryType.GetPermissionsForObject ) ) { permissions.addAll ( getInheritedPermissions ( ) ) ; } return mapCollection ( permissions ) ; }

Target:
public org.ovirt.engine.api.model.Permissions list ( ) { java.util.Set < org.ovirt.engine.api.model.Permission > permissions = new java.util.TreeSet ( org.ovirt.engine.api.restapi.resource.BackendAssignedPermissionsResource.permissionComparator ) ; java.util.List < org.ovirt.engine.api.model.Permission > directPermissions = getBackendCollection ( queryType , queryParams ) ; permissions.addAll ( directPermissions ) ; if ( queryType.equals ( QueryType.GetPermissionsForObject ) ) { permissions.addAll ( getInheritedPermissions ( ) ) ; } return mapCollection ( permissions ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.addBrick" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( bricks ) ) ) . withParameter ( "replicaCount" , replicaCount ) . withParameter ( "stripeCount" , stripeCount ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesHealInfoReturnForXmlRpc glusterVolumeHealInfo ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.healInfo" ) . withParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesHealInfoReturnForXmlRpc ( response ) ; }
Source:
protected void executeVmCommand ( ) { if ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVm ( ) . getStatus ( ) . isUpOrPaused ( ) ) { performPlugCommand ( getPlugAction ( ) , getDisk ( ) , oldVmDevice ) ; } updateDeviceIsPluggedProperty ( ) ; if ( disk.isBoot ( ) ) { updateBootOrder ( ) ; } org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVm ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.setSucceeded ( true ) ; }

Target:
protected void executeVmCommand ( ) { if ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVm ( ) . getStatus ( ) . isUpOrPaused ( ) ) { org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.updateDisksFromDb ( ) ; performPlugCommand ( getPlugAction ( ) , getDisk ( ) , oldVmDevice ) ; } updateDeviceIsPluggedProperty ( ) ; if ( disk.isBoot ( ) ) { updateBootOrder ( ) ; } org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVm ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.setSucceeded ( true ) ; }
Source:
private static < R extends org.ovirt.engine.api.model.BaseResource > void setHref ( javax.ws.rs.core.UriInfo uriInfo , R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { javax.ws.rs.core.UriBuilder uriBuilder = org.ovirt.engine.api.restapi.util.LinkHelper.getUriBuilder ( uriInfo , model , suggestedParentType ) ; if ( uriBuilder != null ) { model.setHref ( uriBuilder.build ( ) . toString ( ) ) ; } }

Target:
private static void setHref ( org.ovirt.engine.api.model.BaseResource model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { java.lang.String path = org.ovirt.engine.api.restapi.util.LinkHelper.getPath ( model , suggestedParentType ) ; if ( path != null ) { model.setHref ( path ) ; } }
Source:
public void testInterfaceInHostWhenInSameHost ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vdsNetworkInterface.setVdsId ( vdsId ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceInHost ( vdsId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testInterfaceInHostWhenInSameHost ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vdsNetworkInterface.setVdsId ( vdsId ) ; org.hamcrest.MatcherAssert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceInHost ( vdsId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( java.util.List < java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { assignVnicProfiles ( behavior , nics , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ) ( returnValue ) ) ) ; }
Source:
public void testGetWithDiskId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk > unregisteredDisk = dao.getByDiskIdAndStorageDomainId ( FixturesTool.UNREGISTERED_DISK , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.Assert.assertTrue ( "Disk should exists in the UnregisteredDisks table" , ( ! ( unregisteredDisk.isEmpty ( ) ) ) ) ; org.junit.Assert.assertTrue ( "Vms id should be empty list in the UnregisteredDisks table" , unregisteredDisk.get ( 0 ) . getVms ( ) . isEmpty ( ) ) ; }

Target:
public void testGetWithDiskId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk > unregisteredDisk = dao.getByDiskIdAndStorageDomainId ( FixturesTool.UNREGISTERED_DISK , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( unregisteredDisk.isEmpty ( ) ) ) , "Disk should exists in the UnregisteredDisks table" ) ; org.junit.jupiter.api.Assertions.assertTrue ( unregisteredDisk.get ( 0 ) . getVms ( ) . isEmpty ( ) , "Vms id should be empty list in the UnregisteredDisks table" ) ; }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveUser , org.ovirt.engine.core.common.action.IdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveUser , org.ovirt.engine.core.common.action.IdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void getDefaultSpmPriority ( 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 ) ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.StorageServerConnections > aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.StorageServerConnections convert ( java.lang.Object source ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.FileTypeExtension fileTypeExtension ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , fileTypeExtension ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
private void onShutdown ( ) { onPowerAction ( VdcActionType.ShutdownVm , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.PowerActionParametersFactory < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase createActionParameters ( org.ovirt.engine.core.common.businessentities.VM vm ) { return new org.ovirt.engine.core.common.action.ShutdownVmParameters ( vm.getId ( ) , true ) ; } } ) ; }

Target:
private org.ovirt.engine.core.compat.Guid getClusterIdOfSelectedVms ( ) { org.ovirt.engine.core.compat.Guid clusterId = null ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; if ( clusterId == null ) { clusterId = a.getVdsGroupId ( ) ; } else if ( ! ( clusterId.equals ( a.getVdsGroupId ( ) ) ) ) { clusterId = null ; break ; } } return clusterId ; }
Source:
public void testImportSuccessfully ( ) { org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( NETWORK_ID , command.getReturnValue ( ) . getActionReturnValue ( ) ) ; org.mockito.Mockito.verify ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( ActionType.InternalImportExternalNetwork ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void testImportSuccessfully ( ) { org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; command.executeCommand ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( NETWORK_ID , command.getReturnValue ( ) . getActionReturnValue ( ) ) ; org.mockito.Mockito.verify ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( ActionType.InternalImportExternalNetwork ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } }
Source:
private void updateVmIconDefaultsTable ( ) { vmIconDefaultDao.removeAll ( ) ; for ( java.util.Map.Entry < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > entry : osIdToIconIdMap.entrySet ( ) ) { final org.ovirt.engine.core.common.businessentities.VmIconDefault osDefautlIconIds = new org.ovirt.engine.core.common.businessentities.VmIconDefault ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , entry.getKey ( ) , entry.getValue ( ) . getSmall ( ) , entry.getValue ( ) . getLarge ( ) ) ; vmIconDefaultDao.save ( osDefautlIconIds ) ; } }

Target:
private void updateVmIconDefaultsTable ( ) { vmIconDefaultDao.removeAll ( ) ; for ( java.util.Map.Entry < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > entry : osIdToIconIdMap.entrySet ( ) ) { final org.ovirt.engine.core.common.businessentities.VmIconDefault osDefaultIconIds = new org.ovirt.engine.core.common.businessentities.VmIconDefault ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , entry.getKey ( ) , entry.getValue ( ) . getSmall ( ) , entry.getValue ( ) . getLarge ( ) ) ; vmIconDefaultDao.save ( osDefaultIconIds ) ; } }
Source:
public void getSearchResultsLimit ( 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 ( ) : 100 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getSearchResultsLimit ( 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 ) ) : 100 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testSpace ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( " " ) ) ; assertTrue ( "true" , comps.contains ( "true" ) ) ; assertTrue ( "false" , comps.contains ( "false" ) ) ; assertTrue ( "False" , ( ! ( comps.contains ( "False" ) ) ) ) ; }

Target:
public void testSpace ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( " " ) ) ; org.junit.Assert.assertTrue ( "true" , comps.contains ( "true" ) ) ; org.junit.Assert.assertTrue ( "false" , comps.contains ( "false" ) ) ; org.junit.Assert.assertTrue ( "False" , ( ! ( comps.contains ( "False" ) ) ) ) ; }
Source:
private static void failureEventHandler ( java.lang.Throwable caught ) { java.lang.String errorMessage ; if ( caught instanceof com.google.gwt.user.client.rpc.StatusCodeException ) { errorMessage = ( ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . requestToServerFailedWithCode ( ) ) + ": " ) + ( ( ( com.google.gwt.user.client.rpc.StatusCodeException ) ( caught ) ) . getStatusCode ( ) ) ; } else { errorMessage = ( ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . requestToServerFailed ( ) ) + ": " ) + ( caught.getLocalizedMessage ( ) ) ; } org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( errorMessage ) ; }

Target:
static org.ovirt.engine.ui.uicompat.UIConstants getConstants ( ) { if ( ( org.ovirt.engine.ui.frontend.Frontend.constants ) == null ) { org.ovirt.engine.ui.frontend.Frontend.constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; } return org.ovirt.engine.ui.frontend.Frontend.constants ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getBroker ( ) . snapshot ( org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) , createSnapshotParameters ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc executeSnapshotVerb ( ) { java.lang.String vmId = org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getParameters ( ) . getVmId ( ) . toString ( ) ; return org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getParameters ( ) . isMemoryVolumeExists ( ) ? org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getBroker ( ) . snapshot ( vmId , createDisksMap ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getParameters ( ) . getMemoryVolume ( ) ) : org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand.getBroker ( ) . snapshot ( vmId , createDisksMap ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepStatusDetail ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepStatusDetail ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warnFormat ( "Wasn't able to live snpashot due to error: {0}. VM will still be configured to the new created snapshot" , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; AddCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; AddCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }

Target:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warnFormat ( "Wasn't able to live snpashot due to error: {0}. VM will still be configured to the new created snapshot" , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }
Source:
public void validateVmMemoryCanRunOnVdsHighMemLowOverhead ( ) { vm.setMinAllocatedMem ( 10000 ) ; vm.setVmMemSizeMb ( 10000 ) ; org.mockito.Mockito.doReturn ( ( - 1200 ) ) . when ( vmOverheadCalculator ) . getStaticOverheadInMb ( org.mockito.Matchers.any ( ) ) ; boolean vmPassedMemoryRequirement = slaValidator.hasOvercommitMemoryToRunVM ( vds , vm ) ; org.junit.Assert.assertTrue ( vmPassedMemoryRequirement ) ; }

Target:
public void validateVmMemoryCanRunOnVdsHighMemLowOverhead ( ) { vm.setMinAllocatedMem ( 10000 ) ; vm.setVmMemSizeMb ( 10000 ) ; org.mockito.Mockito.doReturn ( ( - 1200 ) ) . when ( vmOverheadCalculator ) . getStaticOverheadInMb ( org.mockito.Matchers.any ( ) ) ; boolean vmPassedMemoryRequirement = slaValidator.hasOvercommitMemoryToRunVM ( vds , vm ) ; org.junit.jupiter.api.Assertions.assertTrue ( vmPassedMemoryRequirement ) ; }
Source:
private static java.lang.String getDomainIdTuple ( org.ovirt.engine.core.compat.Guid domainId ) { org.ovirt.engine.core.common.businessentities.storage_domain_static storage_domain = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( domainId ) ; if ( storage_domain != null ) { return ( domainId + ":" ) + ( storage_domain.getstorage_name ( ) ) ; } else { return domainId.toString ( ) ; } }

Target:
private static java.lang.String getDomainIdTuple ( org.ovirt.engine.core.compat.Guid domainId ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage_domain = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( domainId ) ; if ( storage_domain != null ) { return ( domainId + ":" ) + ( storage_domain.getstorage_name ( ) ) ; } else { return domainId.toString ( ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( ( ( java.lang.String ) ( getGlusterHostAddress ( ) . getEntity ( ) ) ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( ( ( java.lang.String ) ( getGlusterHostAddress ( ) . getEntity ( ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( ( java.lang.Boolean ) ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { getGlusterHostAddress ( ) . setIsChangable ( true ) ; getGlusterHostPassword ( ) . setIsChangable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangable ( false ) ; getGlusterHostPassword ( ) . setIsChangable ( false ) ; } }
Source:
private void failureEventHandler ( final java.lang.String errorMessage ) { failureEventHandler ( null , errorMessage ) ; }

Target:
private void failureEventHandler ( final java.lang.String description , final java.util.List < java.lang.String > errorMessages ) { java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > messages = new java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > ( ) ; for ( java.lang.String errorMessage : errorMessages ) { handleNotLoggedInEvent ( errorMessage ) ; messages.add ( new org.ovirt.engine.ui.frontend.Message ( description , errorMessage ) ) ; } frontendFailureEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , new org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ( messages ) ) ; }
Source:
protected org.ovirt.engine.api.model.VM populate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < org.ovirt.engine.api.common.util.DetailHelper.Detail > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( getHttpHeaders ( ) ) ; parent.addInlineDetails ( details , model ) ; addStatistics ( model , entity , uriInfo , httpHeaders ) ; parent.setPayload ( model ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.VM populate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < org.ovirt.engine.api.common.util.DetailHelper.Detail > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( getHttpHeaders ( ) ) ; parent.addInlineDetails ( details , model ) ; addStatistics ( model , entity , uriInfo , httpHeaders ) ; parent.setPayload ( model ) ; setBallooning ( model ) ; return model ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.dom.client.Element parent , com.google.gwt.resources.client.ImageResource value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < com.google.gwt.resources.client.ImageResource > valueUpdater ) { titlePanel.setWidget ( new com.google.gwt.user.client.ui.Label ( title ) ) ; java.lang.String eventType = event.getType ( ) ; if ( BrowserEvents.MOUSEOVER.equals ( eventType ) ) { titlePanel.showRelativeTo ( parent ) ; } else if ( BrowserEvents.MOUSEOUT.equals ( eventType ) ) { titlePanel.hide ( ) ; } }

Target:
private void handleTitlePanel ( java.lang.String eventType , com.google.gwt.dom.client.Element parent ) { if ( title.isEmpty ( ) ) { return ; } titlePanel.setWidget ( new com.google.gwt.user.client.ui.Label ( title ) ) ; if ( BrowserEvents.MOUSEOVER.equals ( eventType ) ) { titlePanel.showRelativeTo ( parent ) ; } else if ( BrowserEvents.MOUSEOUT.equals ( eventType ) ) { titlePanel.hide ( ) ; } }