auphong2707/dl4se-code-review-dataset huggingface dataset:
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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; params.setRefresh ( false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , params , aQuery ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public void writeData ( java.io.ObjectOutputStream dos ) { try { dos.writeLong ( this . history_id ) ; writeDate ( this . history_datetime , dos ) ; dos.writeObject ( this . storage_domain_id ) ; dos.writeShort ( this . storage_domain_status ) ; dos.writeDouble ( this . minutes_in_status ) ; writeInteger ( this . available_disk_size_gb , dos ) ; writeInteger ( this . used_disk_size_gb , dos ) ; writeInteger ( this . storage_configuration_version , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void writeData ( java.io.ObjectOutputStream dos ) { try { dos.writeLong ( this . history_id ) ; writeDate ( this . history_datetime , dos ) ; dos.writeObject ( this . storage_domain_id ) ; dos.writeShort ( this . storage_domain_status ) ; dos.writeInt ( this . seconds_in_status ) ; writeInteger ( this . available_disk_size_gb , dos ) ; writeInteger ( this . used_disk_size_gb , dos ) ; writeInteger ( this . storage_configuration_version , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void canDoActionEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void canDoActionNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public static org.ovirt.engine.api.model.SupportedVersions map ( java.util.List < org.ovirt.engine.api.model.Version > entity , org.ovirt.engine.api.model.SupportedVersions template ) { org.ovirt.engine.api.model.SupportedVersions model = ( template != null ) ? template : new org.ovirt.engine.api.model.SupportedVersions ( ) ; for ( org.ovirt.engine.api.model.Version version : entity ) { org.ovirt.engine.api.model.Version v = new org.ovirt.engine.api.model.Version ( ) ; v.setMajor ( version.getMajor ( ) ) ; v.setMinor ( version.getMinor ( ) ) ; model.getVersions ( ) . add ( v ) ; } return model ; }

Target:
public static org.ovirt.engine.api.model.Versions map ( java.util.List < org.ovirt.engine.api.model.Version > entity , org.ovirt.engine.api.model.Versions template ) { org.ovirt.engine.api.model.Versions model = ( template != null ) ? template : new org.ovirt.engine.api.model.Versions ( ) ; for ( org.ovirt.engine.api.model.Version version : entity ) { org.ovirt.engine.api.model.Version v = new org.ovirt.engine.api.model.Version ( ) ; v.setMajor ( version.getMajor ( ) ) ; v.setMinor ( version.getMinor ( ) ) ; model.getVersions ( ) . add ( v ) ; } return model ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getMigrableVmsRunningOnVds ( org.ovirt.engine.core.compat.Guid hostId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsFromDB = getVmDao ( ) . getAllRunningForVds ( hostId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( vmsFromDB , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.VM v ) { return ( v.getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ; } } ) ; return vms ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getPrimarySources ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { final int highUtilization = tryParseWithDefault ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.EvenDistributionBalancePolicyUnit.HIGH_UTILIZATION ) , getHighUtilizationDefaultValue ( ) ) ; final int cpuOverCommitDurationMinutes = tryParseWithDefault ( parameters.get ( "CpuOverCommitDurationMinutes" ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.CpuOverCommitDurationMinutes ) ) ; return getOverUtilizedCPUHosts ( candidateHosts , highUtilization , cpuOverCommitDurationMinutes ) ; }
Source:
public void testUpdate ( ) { existingGroup.setName ( existingGroup.getName ( ) . toUpperCase ( ) ) ; existingGroup.setDomain ( existingGroup.getDomain ( ) . toUpperCase ( ) ) ; existingGroup.setActive ( false ) ; dao.update ( existingGroup ) ; org.ovirt.engine.core.common.businessentities.DbGroup result = dao.get ( existingGroup.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingGroup , result ) ; }

Target:
public void testUpdate ( ) { existingGroup.setName ( existingGroup.getName ( ) . toUpperCase ( ) ) ; existingGroup.setDomain ( existingGroup.getDomain ( ) . toUpperCase ( ) ) ; existingGroup.setActive ( false ) ; dao.update ( existingGroup ) ; org.ovirt.engine.core.common.businessentities.aaa.DbGroup result = dao.get ( existingGroup.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingGroup , result ) ; }
Source:
public java.lang.Void runInTransaction ( ) { buildChildCommandInfos ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > > entry : childCommandInfoMap.entrySet ( ) ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getBackendCommandObjectsHandler ( ) . createAction ( entry.getValue ( ) . getFirst ( ) , entry.getValue ( ) . getSecond ( ) ) ; command.insertAsyncTaskPlaceHolders ( ) ; childCommandsMap.put ( entry.getKey ( ) , command ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { buildChildCommandInfos ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > > entry : childCommandInfoMap.entrySet ( ) ) { org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( log ) . createAction ( entry.getValue ( ) . getFirst ( ) , entry.getValue ( ) . getSecond ( ) ) ; command.insertAsyncTaskPlaceHolders ( ) ; childCommandsMap.put ( entry.getKey ( ) , command ) ; } return null ; }
Source:
public void canDoActionFailsOnCompat ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.gluster.StartRemoveGlusterVolumeBricksCommandTest.UNSUPPORTED_VERSION ) . when ( vdsGroup ) . getCompatibilityVersion ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.GLUSTER_TASKS_NOT_SUPPORTED_FOR_CLUSTER_LEVEL.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnCompat ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.gluster.StartRemoveGlusterVolumeBricksCommandTest.UNSUPPORTED_VERSION ) . when ( vdsGroup ) . getCompatibilityVersion ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.GLUSTER_TASKS_NOT_SUPPORTED_FOR_CLUSTER_LEVEL.toString ( ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc diskReplicateFinish ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.diskReplicateFinish" ) . withParameter ( "vmID" , vmUUID ) . withParameter ( "srcDisk" , srcDisk ) . withParameter ( "dstDisk" , dstDisk ) . 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.vdsbroker.StatusOnlyReturn diskReplicateFinish ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.diskReplicateFinish" ) . withParameter ( "vmID" , vmUUID ) . withParameter ( "srcDisk" , srcDisk ) . withParameter ( "dstDisk" , dstDisk ) . 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.StatusOnlyReturn ( response ) ; }
Source:
public void activated ( ) { if ( ( ( getBehavior ( ) . getInstanceTypeManager ( ) ) != null ) && ( ! ( getBehavior ( ) . basedOnCustomInstanceType ( ) ) ) ) { getBehavior ( ) . getInstanceTypeManager ( ) . updateFildsAfterOsChanged ( ) ; } }

Target:
public void onSuccess ( java.util.List < java.lang.Integer > numOfMonitors ) { java.lang.Integer oldNumOfMonitors = null ; if ( ( getNumOfMonitors ( ) . getSelectedItem ( ) ) != null ) { oldNumOfMonitors = getNumOfMonitors ( ) . getSelectedItem ( ) ; } getNumOfMonitors ( ) . setItems ( numOfMonitors ) ; if ( oldNumOfMonitors != null ) { getNumOfMonitors ( ) . setSelectedItem ( oldNumOfMonitors ) ; } }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetNicsExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplateInterface , org.ovirt.engine.core.common.action.RemoveVmTemplateInterfaceParameters.class , new java.lang.String [ ] { "VmTemplateId" , "InterfaceId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendInstanceTypeNicResourceTest.INSTANCE_TYPE_ID , org.ovirt.engine.api.restapi.resource.BackendInstanceTypeNicResourceTest.NIC_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetNicsExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmTemplateInterface , org.ovirt.engine.core.common.action.RemoveVmTemplateInterfaceParameters.class , new java.lang.String [ ] { "VmTemplateId" , "InterfaceId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendInstanceTypeNicResourceTest.INSTANCE_TYPE_ID , org.ovirt.engine.api.restapi.resource.BackendInstanceTypeNicResourceTest.NIC_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( getParameters ( ) . getVm ( ) . getName ( ) ) ) ) { return java.util.Collections.singletonMap ( getParameters ( ) . getVm ( ) . getName ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM_NAME , VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot getActiveSnapshot ( ) { for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( ( snapshot.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.ACTIVE ) ) return snapshot ; } org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "VM '{}' doesn't have active snapshot in export domain" , getVmId ( ) ) ; return null ; }
Source:
public static int mapOsType ( java.lang.String type ) { if ( OsType.UNASSIGNED.name ( ) . equalsIgnoreCase ( type ) ) { type = OsType.OTHER.name ( ) ; } return org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getOsIdByUniqueName ( type ) ; }

Target:
public static int mapOsType ( java.lang.String type ) { if ( OsType.UNASSIGNED.name ( ) . equalsIgnoreCase ( type ) ) { type = OsType.OTHER.name ( ) ; } return org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getOsIdByUniqueName ( type ) ; }
Source:
public void shouldFailWhenGraphicsTypeNull ( ) { org.ovirt.engine.core.common.console.ConsoleOptions options = new org.ovirt.engine.core.common.console.ConsoleOptions ( ) ; options.setVmId ( Guid.Empty ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getOptions ( ) ) . thenReturn ( options ) ; org.junit.Assert.assertFalse ( getQuery ( ) . validateInputs ( ) ) ; }

Target:
public void shouldFailWhenGraphicsTypeNull ( ) { org.ovirt.engine.core.common.console.ConsoleOptions options = new org.ovirt.engine.core.common.console.ConsoleOptions ( ) ; options.setVmId ( Guid.Empty ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getOptions ( ) ) . thenReturn ( options ) ; org.junit.jupiter.api.Assertions.assertFalse ( getQuery ( ) . validateInputs ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.ExternalStatus map ( org.ovirt.engine.api.model.EntityExternalStatus entityStatus , org.ovirt.engine.core.common.businessentities.ExternalStatus template ) { switch ( entityStatus ) { case OK : return org.ovirt.engine.core.common.businessentities.ExternalStatus.Ok ; case INFO : return org.ovirt.engine.core.common.businessentities.ExternalStatus.Info ; case WARNING : return org.ovirt.engine.core.common.businessentities.ExternalStatus.Warning ; case ERROR : return org.ovirt.engine.core.common.businessentities.ExternalStatus.Error ; case FAILURE : return org.ovirt.engine.core.common.businessentities.ExternalStatus.Failure ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.ExternalStatus map ( org.ovirt.engine.api.model.ExternalStatus status ) { switch ( status ) { case OK : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.ExternalStatus ; case INFO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.ExternalStatus ; case WARNING : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.ExternalStatus ; case ERROR : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.ExternalStatus ; case FAILURE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.ExternalStatus ; default : return null ; } }
Source:
public void updateInterface ( org.ovirt.engine.core.common.businessentities.storage_pool datacenter ) { if ( datacenter == null ) { return ; } getInterface ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.DataProvider.GetDiskInterfaceList ( VmOsType.Unassigned , datacenter.getcompatibility_version ( ) ) ) ; getInterface ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.DataProvider.GetDefaultDiskInterface ( VmOsType.Unassigned , null ) ) ; }

Target:
public void updateInterface ( org.ovirt.engine.core.common.businessentities.storage_pool datacenter ) { if ( datacenter == null ) { return ; } getInterface ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDiskInterfaceList ( VmOsType.Unassigned , datacenter.getcompatibility_version ( ) ) ) ; getInterface ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDefaultDiskInterface ( VmOsType.Unassigned , null ) ) ; }
Source:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( emptyParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getNetworkAttachments ( ) ) == null ) { parameters.setNetworkAttachments ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ( ) ) ; } parameters.getNetworkAttachments ( ) . addAll ( java.util.Arrays.asList ( networkAttachments ) ) ; return this ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addLabels ( org.ovirt.engine.core.common.businessentities.network.NicLabel ... nicLabels ) { if ( nullParameters ( nicLabels ) ) { return this ; } if ( ( parameters.getLabels ( ) ) == null ) { parameters.setLabels ( new java.util.HashSet < > ( ) ) ; } parameters.getLabels ( ) . addAll ( java.util.Arrays.asList ( nicLabels ) ) ; return this ; }
Source:
private java.util.Map < java.lang.String , java.lang.Object > getSharedConnections4REST ( ) { java.util.Map < java.lang.String , java.lang.Object > connections = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; return connections ; }

Target:
private java.util.Map < java.lang.String , java.lang.Object > getSharedConnections4REST ( ) { java.util.Map < java.lang.String , java.lang.Object > connections = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; connections.put ( "conn_tJDBCConnection_3" , globalMap.get ( "conn_tJDBCConnection_3" ) ) ; connections.put ( "conn_tJDBCConnection_2" , globalMap.get ( "conn_tJDBCConnection_2" ) ) ; connections.put ( "conn_tJDBCConnection_1" , globalMap.get ( "conn_tJDBCConnection_1" ) ) ; return connections ; }
Source:
private org.ovirt.engine.core.bll.RemoveQuotaCommand createCommand ( org.ovirt.engine.core.compat.Guid guid ) { org.ovirt.engine.core.common.action.IdParameters param = new org.ovirt.engine.core.common.action.IdParameters ( guid ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveQuotaCommand ( param , null ) ) ; org.mockito.Mockito.doReturn ( quotaDao ) . when ( command ) . getQuotaDao ( ) ; org.mockito.Mockito.doReturn ( quotaManager ) . when ( command ) . getQuotaManager ( ) ; return command ; }

Target:
private org.ovirt.engine.core.bll.RemoveQuotaCommand createCommand ( ) { org.ovirt.engine.core.common.action.IdParameters param = new org.ovirt.engine.core.common.action.IdParameters ( quotaGuid ) ; return new org.ovirt.engine.core.bll.RemoveQuotaCommand ( param , null ) ; }
Source:
private < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < org.ovirt.engine.core.compat.Guid > & org.ovirt.engine.core.common.businessentities.Nameable > org.ovirt.engine.core.bll.ValidationResult validateCoherentIdentification ( java.lang.String violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName , org.ovirt.engine.core.common.errors.EngineMessage message , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < T > map ) { boolean bothIdentificationSet = ( referringId != null ) && ( referringName != null ) ; java.lang.String [ ] replacements = createIncoherentIdentificationErrorReplacements ( violatingEntityId , referringId , referringName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNameAndIdIncoherent ( referringId , referringName , map ) ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return hostSetupNetworksValidatorHelper.validateCoherentIdentification ( java.lang.String.valueOf ( attachment.getId ( ) ) , attachment.getNicId ( ) , attachment.getNicName ( ) , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NICS_INCOHERENTLY , existingInterfacesMap ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { if ( ( isInstanceType ( ) ) || ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.isBlankTemplate ( ) ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getUserId ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { if ( ( isInstanceType ( ) ) || ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.isBlankTemplate ( ) ) ) { return true ; } return validate ( cpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getUserId ( ) ) ) ; }
Source:
public void testExpireToken ( ) { java.lang.String result1 = tokenProvider.getToken ( ) ; org.mockito.Mockito.verify ( mockAuthenticate , org.mockito.Mockito.times ( 1 ) ) . execute ( ) ; tokenProvider.expireToken ( ) ; java.lang.String result2 = tokenProvider.getToken ( ) ; org.mockito.Mockito.verify ( mockAuthenticate , org.mockito.Mockito.times ( 2 ) ) . execute ( ) ; org.junit.Assert.assertThat ( result1 , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.provider.network.openstack.ExternalNetworkTokenProviderTest.TOKEN_ID ) ) ; org.junit.Assert.assertThat ( result2 , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.provider.network.openstack.ExternalNetworkTokenProviderTest.TOKEN_ID ) ) ; }

Target:
public void testExpireToken ( ) { java.lang.String result1 = tokenProvider.getToken ( ) ; org.mockito.Mockito.verify ( mockAuthenticate , org.mockito.Mockito.times ( 1 ) ) . execute ( ) ; tokenProvider.expireToken ( ) ; java.lang.String result2 = tokenProvider.getToken ( ) ; org.mockito.Mockito.verify ( mockAuthenticate , org.mockito.Mockito.times ( 2 ) ) . execute ( ) ; org.hamcrest.MatcherAssert.assertThat ( result1 , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.provider.network.openstack.ExternalNetworkTokenProviderTest.TOKEN_ID ) ) ; org.hamcrest.MatcherAssert.assertThat ( result2 , org.hamcrest.Matchers.is ( org.ovirt.engine.core.bll.provider.network.openstack.ExternalNetworkTokenProviderTest.TOKEN_ID ) ) ; }
Source:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
private void updateDiskVmSnapshotId ( ) { org.ovirt.engine.core.compat.Guid snapshotId = org.ovirt.engine.core.bll.AttachDiskToVmCommand.getSnapshotDao ( ) . getId ( org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) , SnapshotType.ACTIVE ) ; if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; org.ovirt.engine.core.bll.AttachDiskToVmCommand.getImageDao ( ) . updateImageVmSnapshotId ( diskImage.getImageId ( ) , snapshotId ) ; } else { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.StorageException , "update of snapshot id was initiated for unsupported disk type" ) ; } }

Target:
private void updateDiskVmSnapshotId ( ) { org.ovirt.engine.core.compat.Guid snapshotId = org.ovirt.engine.core.bll.AttachDiskToVmCommand.getSnapshotDao ( ) . getId ( org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) , SnapshotType.ACTIVE ) ; if ( disk.getDiskStorageType ( ) . isSupportsSnapshots ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; org.ovirt.engine.core.bll.AttachDiskToVmCommand.getImageDao ( ) . updateImageVmSnapshotId ( diskImage.getImageId ( ) , snapshotId ) ; } else { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.StorageException , "update of snapshot id was initiated for unsupported disk type" ) ; } }
Source:
public void getVmById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getMaxNumOfVmCpus ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 1 ) ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmCpus ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Nic model = new org.ovirt.engine.api.model.Nic ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Nic" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Nic model = new org.ovirt.engine.api.model.Nic ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Nic" , "add" , "name" ) ; } }
Source:
protected void initWidget ( com.google.gwt.user.client.ui.Widget wrapperWidget ) { super . initWidget ( wrapperWidget ) ; contentWidgetContainer.setWidget ( contentWidget ) ; contentWidget.asWidget ( ) . setWidth ( "100%" ) ; com.google.gwt.dom.client.Element contentWidgetElement = getContentWidgetElement ( ) ; if ( ( ( contentWidgetElement.getId ( ) ) == null ) || ( contentWidgetElement.getId ( ) . isEmpty ( ) ) ) { contentWidgetElement.setId ( com.google.gwt.user.client.DOM.createUniqueId ( ) ) ; } updateLabelElementId ( getContentWidgetElement ( ) . getId ( ) ) ; }

Target:
protected org.gwtbootstrap3.client.ui.FormLabel getFormLabel ( ) { return label ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.VmDiskListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return diskPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.VmDiskListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getNewCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return diskPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getAttachCommand ( ) ) ) { return attachPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
protected void endSuccessfully ( ) { endSuccessfullyImpl ( ) ; setCommandShouldBeLogged ( ( ! ( org.ovirt.engine.core.bll.HibernateVmCommand.getSucceeded ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.HibernateVmCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.HibernateVmCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_SUSPEND_VM ; case END_SUCCESS : if ( org.ovirt.engine.core.bll.HibernateVmCommand.getSucceeded ( ) ) { return org.ovirt.engine.core.common.AuditLogType.UNASSIGNED ; } case END_FAILURE : default : return isHibernateVdsProblematic ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_FINISH_FAILURE_WILL_TRY_AGAIN : org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_FINISH_FAILURE ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . unless ( validBootProtocolForRoleNetwork ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkCluster networkCluster = getNetworkCluster ( ) ; org.ovirt.engine.core.bll.validator.IsRoleNetworkIpConfigurationValid isRoleNetworkIpConfigurationValid = new org.ovirt.engine.core.bll.validator.IsRoleNetworkIpConfigurationValid ( networkCluster ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . unless ( isRoleNetworkIpConfigurationValid.validate ( attachment ) ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; try { resource.update ( getNic ( false ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; try { resource.update ( getNic ( false ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isReadOnlyPropertyCompatibleWithInterface ( ) { if ( ( java.lang.Boolean.TRUE.equals ( disk.getReadOnly ( ) ) ) && ( ( disk.getDiskInterface ( ) ) == ( org.ovirt.engine.core.common.businessentities.DiskInterface.IDE ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_IDE_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isReadOnlyPropertyCompatibleWithInterface ( ) { if ( java.lang.Boolean.TRUE.equals ( disk.getReadOnly ( ) ) ) { org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = disk.getDiskInterface ( ) ; if ( ( diskInterface == ( org.ovirt.engine.core.common.businessentities.DiskInterface.IDE ) ) || ( ( diskInterface == ( org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO_SCSI ) ) && ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR , java.lang.String.format ( "$interface %1$s" , diskInterface ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getStorageDomainIdForVmMemory ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList ) { if ( ( cachedStorageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . getStoragePoolId ( ) , memoryDisksList ) ; if ( storageDomain != null ) { cachedStorageDomainId = storageDomain.getId ( ) ; } } return cachedStorageDomainId ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainIdForVmMemory ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList ) { if ( ( cachedStorageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . getStoragePoolId ( ) , memoryDisksList ) ; if ( storageDomain != null ) { cachedStorageDomainId = storageDomain.getId ( ) ; } } return cachedStorageDomainId ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command.equals ( getAddLine ( ) ) ) { modifyLines.addLine ( this ) ; } else if ( command.equals ( getRemoveLine ( ) ) ) { modifyLines.removeLine ( this ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command.equals ( getAddLine ( ) ) ) { modifyLines.addLine ( this ) ; } else if ( command.equals ( getRemoveLine ( ) ) ) { modifyLines.removeLine ( this ) ; } }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , sb ) ; sb.append ( templates.inlineImageWithTitle ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( resources.dialogIconHelp ( ) ) . getHTML ( ) ) , constants.networkPublicUseLabel ( ) ) ) ; }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , sb ) ; sb.append ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.templates.tableHeaderInlineImage ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.resources.dialogIconHelp ( ) ) . getHTML ( ) ) ) ) ; }
Source:
protected void fillMacAddressIfMissing ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { if ( ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getMacAddress ( ) ) ) && ( ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . getAvailableMacsCount ( ) ) >= 1 ) ) { iface.setMacAddress ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . allocateNewMac ( ) ) ; } }

Target:
protected void fillMacAddressIfMissing ( org.ovirt.engine.core.common.businessentities.network.VmNic iface ) { if ( ( org.apache.commons.lang.StringUtils.isEmpty ( iface.getMacAddress ( ) ) ) && ( ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getMacPool ( ) . getAvailableMacsCount ( ) ) >= 1 ) ) { iface.setMacAddress ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getMacPool ( ) . allocateNewMac ( ) ) ; } }
Source:
private void logMessage ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , final java.lang.String action , final java.lang.String status , org.ovirt.engine.core.common.AuditLogType logType ) { java.util.Map < java.lang.String , java.lang.String > customValues = new java.util.HashMap < > ( ) ; customValues.put ( "action" , action ) ; customValues.put ( "status" , status ) ; org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.logUtil.logAuditMessage ( clusterId , volume , null , logType , customValues ) ; }

Target:
private void logMessage ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , final java.lang.String action , final java.lang.String status , org.ovirt.engine.core.common.AuditLogType logType ) { java.util.Map < java.lang.String , java.lang.String > customValues = new java.util.HashMap < > ( ) ; customValues.put ( "action" , action ) ; customValues.put ( "status" , status ) ; logUtil.logAuditMessage ( clusterId , volume , null , logType , customValues ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.createDefaultConcreteException ( "Cancel migration has failed. Please try again in a few moments and track the VM's event list for details" ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( org.ovirt.engine.core.common.errors.VdcBllErrors.MIGRATION_CANCEL_ERROR_NO_VM , org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) . mMessage ) ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.createDefaultConcreteException ( "Cancel migration has failed. Please try again in a few moments and track the VM's event list for details" ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( org.ovirt.engine.core.common.errors.EngineError.MIGRATION_CANCEL_ERROR_NO_VM , org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) . mMessage ) ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; } }
Source:
private void UpdateActionAvailability ( ) { if ( ( ( getEntity ( ) ) == null ) || ( ( getEntity ( ) . getIsGroup ( ) ) == true ) ) { getManageEventsCommand ( ) . setIsExecutionAllowed ( false ) ; } else { getManageEventsCommand ( ) . setIsExecutionAllowed ( true ) ; } }

Target:
private void updateActionAvailability ( ) { if ( ( ( getEntity ( ) ) == null ) || ( ( getEntity ( ) . getIsGroup ( ) ) == true ) ) { getManageEventsCommand ( ) . setIsExecutionAllowed ( false ) ; } else { getManageEventsCommand ( ) . setIsExecutionAllowed ( true ) ; } }
Source:
public static < E extends org.ovirt.engine.core.common.businessentities.Nameable > java.util.Set < java.lang.String > objectNames ( java.util.List < E > entityList ) { if ( ( entityList != null ) && ( ! ( entityList.isEmpty ( ) ) ) ) { java.util.Set < java.lang.String > names = new java.util.HashSet < java.lang.String > ( ) ; for ( E e : entityList ) { names.add ( e.getName ( ) ) ; } return names ; } else { return java.util.Collections.emptySet ( ) ; } }

Target:
public static < E extends org.ovirt.engine.core.common.businessentities.Nameable > java.util.Set < java.lang.String > objectNames ( java.util.Collection < E > entities ) { if ( ( entities != null ) && ( ! ( entities.isEmpty ( ) ) ) ) { java.util.Set < java.lang.String > names = new java.util.HashSet < java.lang.String > ( ) ; for ( E e : entities ) { names.add ( e.getName ( ) ) ; } return names ; } else { return java.util.Collections.emptySet ( ) ; } }