auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testZeroLatency ( ) { java.lang.String doulbeValue = "0" ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = getVmDynamic ( ) ; java.util.Map < java.lang.String , java.lang.Object > diskData = setDiskData ( ) ; diskData.put ( VdsProperties.vm_disk_write_latency , doulbeValue ) ; java.util.Map < java.lang.String , java.lang.Object > xml = setMockForTesting ( diskData ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVMDynamicData ( vmDynamic , xml ) ; org.junit.Assert.assertEquals ( vmDynamic.getDisks ( ) . get ( 0 ) . getWriteLatency ( ) , new java.lang.Double ( "0" ) ) ; }

Target:
public void testZeroLatency ( ) { java.lang.String doubleValue = "0" ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = getVmDynamic ( ) ; java.util.Map < java.lang.String , java.lang.Object > diskData = setDiskData ( ) ; diskData.put ( VdsProperties.vm_disk_write_latency , doubleValue ) ; java.util.Map < java.lang.String , java.lang.Object > xml = setMockForTesting ( diskData ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVMDynamicData ( vmDynamic , xml ) ; org.junit.Assert.assertEquals ( vmDynamic.getDisks ( ) . get ( 0 ) . getWriteLatency ( ) , new java.lang.Double ( "0" ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult call ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk disk : cinderDisks ) { org.ovirt.engine.core.common.businessentities.storage.Disk diskFromDB = getDiskDao ( ) . get ( disk.getId ( ) ) ; if ( diskFromDB != null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.CINDER_DISK_ALREADY_REGISTERED , java.lang.String.format ( "$diskAlias %s" , diskFromDB.getDiskAlias ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult call ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk disk : cinderDisks ) { org.ovirt.engine.core.common.businessentities.storage.Disk diskFromDB = getDiskDao ( ) . get ( disk.getId ( ) ) ; if ( diskFromDB != null ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.CINDER_DISK_ALREADY_REGISTERED , java.lang.String.format ( "$diskAlias %s" , diskFromDB.getDiskAlias ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; boolean detach = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendVmDiskResource.DETACH_ONLY , true , false ) ; if ( detach ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( vmId , guid ) ) ; } else { return performAction ( VdcActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guid ) ) ; } }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; boolean detach = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendVmDiskResource.DETACH_ONLY , true , false ) ; if ( detach ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( vmId , guid ) ) ; } else { return performAction ( VdcActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guid ) ) ; } }
Source:
public void getUsbPolicyNullUsb ( ) { org.ovirt.engine.api.model.Usb usb = null ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup ) , UsbPolicy.DISABLED ) ; }

Target:
public void getUsbPolicyUsbTypeNull30 ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_0 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getcompatibility_version ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }
Source:
private boolean networkNameAndNetworkIdIsIncoherent ( org.ovirt.engine.core.compat.Guid nicId , java.lang.String nicName ) { org.ovirt.engine.core.common.businessentities.network.Network networkById = networkBusinessEntityMap.get ( nicId ) ; org.ovirt.engine.core.common.businessentities.network.Network networkByName = networkBusinessEntityMap.get ( nicName ) ; return ! ( java.util.Objects.equals ( networkById , networkByName ) ) ; }

Target:
org.ovirt.engine.core.bll.ValidationResult notMovingLabeledNetworkToDifferentNic ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.common.businessentities.network.Network movedNetwork = existingNetworkRelatedToAttachment ( attachment ) ; if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( movedNetwork ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment = attachmentsById.get ( attachment.getId ( ) ) ; boolean movedToDifferentNic = ! ( existingAttachment.getNicId ( ) . equals ( attachment.getNicId ( ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC_ENTITY , movedNetwork.getLabel ( ) ) ) . when ( movedToDifferentNic ) ; }
Source:
private void storagePoolAlreadyHasCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > groupList = new java.util.ArrayList < > ( ) ; groupList.add ( group ) ; org.mockito.Mockito.when ( vdsGroupDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( groupList ) ; }

Target:
private void storagePoolAlreadyHasCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > groupList = new java.util.ArrayList < > ( ) ; groupList.add ( group ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( groupList ) ; }
Source:
public void insufficientDiskSpaceWithSnapshots ( ) { final org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > command = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; org.mockito.Mockito.when ( command.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.Matchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void insufficientDiskSpaceWithSnapshots ( ) { final org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > command = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateImages ( org.mockito.Matchers.anyMap ( ) ) ; org.mockito.Mockito.when ( command.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.Matchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public void setLocalItem ( java.lang.String key , java.lang.String value ) { if ( ( org.ovirt.engine.ui.common.system.ClientStorage.localStorage ) != null ) { org.ovirt.engine.ui.common.system.ClientStorage.localStorage.setItem ( key , value ) ; } else { com.google.gwt.user.client.Cookies.setCookie ( key , value , new java.util.Date ( ( ( new java.util.Date ( ) . getTime ( ) ) + ( org.ovirt.engine.ui.common.system.ClientStorage.PERSISTENT_COOKIE_EXPIRATION ) ) ) ) ; } }

Target:
void setSessionItem ( java.lang.String key , java.lang.String value ) ;
Source:
public org.ovirt.engine.core.bll.ValidationResult validateNotHostedEngineDisk ( ) { boolean isHostedEngineDisk = ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) && ( StorageConstants.HOSTED_ENGINE_LUN_DISK_ALIAS.equals ( disk.getDiskAlias ( ) ) ) ; return isHostedEngineDisk ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DISK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateNotHostedEngineDisk ( ) { return isHostedEngineDirectLunDisk ( ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DISK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public java.lang.Void runInTransaction ( ) { addDiskImageToDb ( mNewCreatedDiskImage , getCompensationContext ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { if ( ! ( getParameters ( ) . isShouldRemainIllegalOnFailedExecution ( ) ) ) { addDiskImageToDb ( mNewCreatedDiskImage , getCompensationContext ( ) ) ; } else { addDiskImageToDb ( mNewCreatedDiskImage , null ) ; getCompensationContext ( ) . snapshotEntityStatus ( mNewCreatedDiskImage.getImage ( ) , ImageStatus.ILLEGAL ) ; } return null ; }
Source:
protected boolean validateQuota ( ) { getParameters ( ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVmTemplate ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage di : getParameters ( ) . getImages ( ) ) { di.setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVmTemplate ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; } return true ; }

Target:
protected void executeCommand ( ) { boolean success = true ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { initImportClonedTemplateDisks ( ) ; AddVmTemplateToDb ( ) ; AddVmInterfaces ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; MoveOrCopyAllImageGroups ( getVmTemplateId ( ) , getParameters ( ) . getImages ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addImportedDevices ( getVmTemplate ( ) , getParameters ( ) . isImportAsNewEntity ( ) ) ; setSucceeded ( success ) ; }
Source:
public void isConnWithSameDetailsExistSameConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = java.util.Collections.singletonList ( newNFSConnection ) ; org.mockito.Mockito.when ( storageConnDao.getAllForStorage ( newNFSConnection.getConnection ( ) ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newNFSConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistSameConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = java.util.Collections.singletonList ( newNFSConnection ) ; org.mockito.Mockito.when ( storageConnDao.getAllForStorage ( newNFSConnection.getConnection ( ) ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newNFSConnection , null ) ; org.junit.jupiter.api.Assertions.assertFalse ( isExists ) ; }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.HostStorage > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( NAMES.length , collection.size ( ) ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { verifyModel ( collection.get ( i ) , ( i % ( NAMES.length ) ) ) ; } }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.HostStorage > collection ) throws java.lang.Exception { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( NAMES.length , collection.size ( ) ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { verifyModel ( collection.get ( i ) , ( i % ( NAMES.length ) ) ) ; } }
Source:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.CLUSTER_ID ) ; existingCluster.setName ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setcompatibility_version ( version ) ; createObjects ( version ) ; }

Target:
private void createCluster ( org.ovirt.engine.core.compat.Version version ) { existingCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; existingCluster.setId ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.CLUSTER_ID ) ; existingCluster.setName ( "cluster" ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setVirtService ( false ) ; existingCluster.setCompatibilityVersion ( version ) ; createObjects ( version ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity createVolume ( java.lang.String volName , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; vol.setId ( id ) ; vol.setName ( volName ) ; vol.setClusterId ( org.ovirt.engine.core.bll.gluster.GlusterManagerTest.CLUSTER_ID ) ; return vol ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity createVolume ( java.lang.String volName , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; vol.setId ( id ) ; vol.setName ( volName ) ; vol.setClusterId ( org.ovirt.engine.core.bll.gluster.GlusterManagerTest.CLUSTER_ID ) ; vol.setStatus ( GlusterStatus.UP ) ; return vol ; }
Source:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.common.utils.VmDeviceType vmDeviceType = org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.getDisplayDevice ( vm.getOsId ( ) , org.ovirt.engine.core.bll.utils.ClusterUtils.getCompatibilityVersion ( vm ) , vm.getDefaultDisplayType ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vmDeviceType , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) , vm.getSingleQxlPci ( ) ) , true , true , null ) ; }

Target:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getDefaultVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) , vm.getSingleQxlPci ( ) ) , true , true , null ) ; }
Source:
private void initStyle ( ) { com.google.gwt.safehtml.shared.SafeHtml expandImage = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.resources.expanderImage ( ) ) . getHTML ( ) ) ; expander.getUpFace ( ) . setHTML ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.templates.imageTextButton ( expandImage , org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.constants.advancedParameters ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml collapseImage = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.resources.expanderDownImage ( ) ) . getHTML ( ) ) ; expander.getDownFace ( ) . setHTML ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.templates.imageTextButton ( collapseImage , org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.constants.advancedParameters ( ) ) ) ; }

Target:
private void initStyle ( ) { com.google.gwt.safehtml.shared.SafeHtml expandImage = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.resources.expanderImage ( ) ) . getHTML ( ) ) ; expander.getUpFace ( ) . setHTML ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.templates.imageTextButton ( expandImage , titleCollapsed ) ) ; com.google.gwt.safehtml.shared.SafeHtml collapseImage = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.resources.expanderDownImage ( ) ) . getHTML ( ) ) ; expander.getDownFace ( ) . setHTML ( org.ovirt.engine.ui.common.widget.dialog.AdvancedParametersExpander.templates.imageTextButton ( collapseImage , titleExpended ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { mVmReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.getBroker ( ) . pause ( mVmId.toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMDynamicData ( mVmReturn.mVm ) . getStatus ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { vmReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.getBroker ( ) . pause ( vmId.toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.buildVMDynamicData ( vmReturn.vm , org.ovirt.engine.core.vdsbroker.vdsbroker.PauseVDSCommand.getVds ( ) ) . getStatus ( ) ) ; }
Source:
public < P extends org.ovirt.engine.core.common.vdscommands.VDSParametersBase > org.ovirt.engine.core.common.vdscommands.VDSReturnValue runVdsCommand ( org.ovirt.engine.core.common.vdscommands.VDSCommandType commandType , P parameters ) { org.ovirt.engine.core.vdsbroker.VDSCommandBase < P > command = CreateCommand ( commandType , parameters ) ; if ( command != null ) { command.Execute ( ) ; return command.getVDSReturnValue ( ) ; } return null ; }

Target:
public < P extends org.ovirt.engine.core.common.vdscommands.VDSParametersBase > org.ovirt.engine.core.common.vdscommands.VDSReturnValue runVdsCommand ( org.ovirt.engine.core.common.vdscommands.VDSCommandType commandType , P parameters ) { org.ovirt.engine.core.vdsbroker.VDSCommandBase < P > command = CreateCommand ( commandType , parameters ) ; if ( command != null ) { command.execute ( ) ; return command.getVDSReturnValue ( ) ; } return null ; }
Source:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( object ) ) . getSize ( ) : ( ( long ) ( ( ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) * ( java.lang.Math.pow ( 1024 , 3 ) ) ) ) ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { switch ( object.getDiskStorageType ( ) ) { case LUN : return ( ( long ) ( ( ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) * ( java.lang.Math.pow ( 1024 , 3 ) ) ) ) ; default : return object.getSize ( ) ; } }
Source:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , java.lang.String description , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { return createTaskImpl ( taskId , asyncTaskCreationInfo , parentCommand , description , entityType , entityIds ) ; } catch ( java.lang.RuntimeException ex ) { log.errorFormat ( "Error during CreateTask for command: {0}. Exception {1}" , getClass ( ) . getName ( ) , ex ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
public void deleteAsyncTaskPlaceHolder ( ) { deleteAsyncTaskPlaceHolder ( org.ovirt.engine.core.bll.CommandBase.DEFAULT_TASK_KEY ) ; }
Source:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }

Target:
public void getAncestorImagesByImagesIds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.util.List < org.ovirt.engine.core.compat.Guid > imagesIds ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) { @ java.lang.Override public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.IdsQueryParameters params = new org.ovirt.engine.core.common.queries.IdsQueryParameters ( imagesIds ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAncestorImagesByImagesIds , params , aQuery ) ; }
Source:
public java.lang.Integer getMemSharedPercent ( ) { java.lang.Long shared = mVdsStatistics.getMemShared ( ) ; java.lang.Integer physical = mVdsDynamic.getphysical_mem_mb ( ) ; if ( ( ( shared == null ) || ( physical == null ) ) || ( physical == 0 ) ) { return 0 ; } return ( ( int ) ( ( shared * 100 ) / physical ) ) ; }

Target:
public java.lang.Integer getMemSharedPercent ( ) { java.lang.Long shared = mVdsStatistics.getMemShared ( ) ; java.lang.Integer physical = mVdsDynamic.getPhysicalMemMb ( ) ; if ( ( ( shared == null ) || ( physical == null ) ) || ( physical == 0 ) ) { return 0 ; } return ( ( int ) ( ( shared * 100 ) / physical ) ) ; }
Source:
public void testMoveWithStorageDomainName ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ( "Storage: name=" + ( NAMES [ 2 ] ) ) , SearchType.StorageDomain , getStorageDomain ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestMove ( storageDomain ) ; }

Target:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false , false ) ; }
Source:
private boolean isNfsPathEditable ( org.ovirt.engine.core.common.businessentities.StorageDomain storage ) { return ( ( ( storage.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) || ( ( storage.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) ) && ( ( storage.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Maintenance ) ) ; }

Target:
private boolean isPathEditable ( org.ovirt.engine.core.common.businessentities.StorageDomain storage ) { return ( ( ( storage.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) || ( ( storage.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) ) && ( ( storage.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Maintenance ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.ActionType actionType , java.util.List < org.ovirt.engine.core.common.action.ActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.action.ActionReturnValue > runMultipleActions ( org.ovirt.engine.core.common.action.ActionType actionType , java.util.List < org.ovirt.engine.core.common.action.ActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.List < org.ovirt.engine.core.common.action.ActionReturnValue > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmTemplateId ( ) ) != null ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmTemplateId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.TEMPLATE , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmTemplateId ( ) ) != null ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.UpdateVmVersionCommand.getVmTemplateId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.TEMPLATE , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return null ; }
Source:
private void sendNotification ( java.lang.String message , java.lang.String id , boolean removeClient , java.lang.String module , java.lang.String callType ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( message == null ) { org.ovirt.vdsmfake.rpc.json.JsonRpcNotification.log.warn ( "empty message has arrived, ignore empty messages" ) ; } send ( messageFormatter ( message , id , module , callType ) , id , removeClient ) ; }

Target:
private void sendNotification ( java.lang.String message , java.lang.String id , boolean removeClient , java.lang.String method ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( message == null ) { org.ovirt.vdsmfake.rpc.json.JsonRpcNotification.log.warn ( "empty message has arrived, ignore empty messages" ) ; } send ( messageFormatter ( message , id , method ) , id , removeClient ) ; }
Source:
public static boolean setDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , org.ovirt.engine.core.common.businessentities.VM vm , int count ) { if ( disk == null ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Disk object is null" ) ; return false ; } java.lang.String vmName = org.ovirt.engine.core.bll.ImagesHandler.nullSafeGetVmName ( vm ) ; disk.setDiskAlias ( org.ovirt.engine.core.bll.ImagesHandler.getSuggestedDiskAlias ( disk , vmName , count ) ) ; return true ; }

Target:
public static boolean setDiskAlias ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk , org.ovirt.engine.core.common.businessentities.VM vm , int count ) { if ( disk == null ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Disk object is null" ) ; return false ; } java.lang.String vmName = org.ovirt.engine.core.bll.ImagesHandler.nullSafeGetVmName ( vm ) ; disk.setDiskAlias ( org.ovirt.engine.core.bll.ImagesHandler.getSuggestedDiskAlias ( disk , vmName , count ) ) ; return true ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( ( "%s, vdsSpmId = %i, storagePoolId = %s, " + ( "storagePoolName = %s, masterDomainId = %s, masterVersion = %s, " + "domainsList = [%s]" ) ) , super . toString ( ) , getVdsSpmId ( ) , getStoragePoolId ( ) , getStoragePoolName ( ) , getMasterDomainId ( ) , getMasterVersion ( ) , getPrintableDomainsList ( ) ) ; }

Target:
public java.lang.String toString ( ) { return java.lang.String.format ( ( "%s, vdsSpmId = %d, storagePoolId = %s, " + ( "storagePoolName = %s, masterDomainId = %s, masterVersion = %s, " + "domainsList = [%s]" ) ) , super . toString ( ) , getVdsSpmId ( ) , getStoragePoolId ( ) , getStoragePoolName ( ) , getMasterDomainId ( ) , getMasterVersion ( ) , getPrintableDomainsList ( ) ) ; }
Source:
public void canDoActionFailsOnRemoveLastAdGroupWithSuperUserPrivileges ( ) throws java.lang.Exception { org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.isLastSuperUserGroup ( adElementId ) ) . thenReturn ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ERROR_CANNOT_REMOVE_LAST_SUPER_USER_ROLE.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnRemoveLastAdGroupWithSuperUserPrivileges ( ) throws java.lang.Exception { mockIsLastSuperUserGroup ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ERROR_CANNOT_REMOVE_LAST_SUPER_USER_ROLE.toString ( ) ) ) ; }
Source:
public java.lang.String render ( T size ) { if ( size != null ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit , java.lang.Double > sizeWithUnits = org.ovirt.engine.core.common.utils.SizeConverter.autoConvert ( size.longValue ( ) , SizeUnit.BYTES ) ; return org.ovirt.engine.ui.webadmin.widget.renderer.VolumeCapacityRenderer.messages.sizeUnitString ( formatSize ( sizeWithUnits.getSecond ( ) ) , sizeWithUnits.getFirst ( ) ) ; } else { return constants.notAvailableLabel ( ) ; } }

Target:
public java.lang.String render ( T size ) { if ( size != null ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit , java.lang.Double > sizeWithUnits = org.ovirt.engine.core.common.utils.SizeConverter.autoConvert ( size.longValue ( ) , SizeUnit.BYTES ) ; return org.ovirt.engine.ui.webadmin.widget.renderer.VolumeCapacityRenderer.messages.sizeUnitString ( formatSize ( sizeWithUnits.getSecond ( ) ) , org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) . translate ( sizeWithUnits.getFirst ( ) ) ) ; } else { return constants.notAvailableLabel ( ) ; } }
Source:
void attachAlert ( org.ovirt.engine.ui.common.widget.panel.AlertPanel alertPanel ) { com.google.gwt.user.client.ui.RootPanel.get ( ) . add ( alertPanel ) ; com.google.gwt.dom.client.Element messageDivElement = alertPanel.getMessageAt ( 0 ) . getElement ( ) ; if ( org.ovirt.engine.ui.common.utils.ElementUtils.detectOverflowUsingScrollWidth ( messageDivElement ) ) { com.google.gwt.safehtml.shared.SafeHtml tooltipContent = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( messageDivElement.getInnerText ( ) ) ; org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( tooltipContent , alertPanel.getElement ( ) , Placement.BOTTOM ) ; } }

Target:
void attachAlert ( org.ovirt.engine.ui.common.widget.panel.AlertPanel alertPanel ) { com.google.gwt.user.client.ui.RootPanel.get ( ) . add ( alertPanel ) ; com.google.gwt.dom.client.Element messageDivElement = alertPanel.getMessageAt ( 0 ) . getElement ( ) ; if ( org.ovirt.engine.ui.common.utils.ElementUtils.detectHorizontalOverflow ( messageDivElement ) ) { com.google.gwt.safehtml.shared.SafeHtml tooltipContent = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( messageDivElement.getInnerText ( ) ) ; org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( tooltipContent , alertPanel.getElement ( ) , Placement.BOTTOM ) ; } }
Source:
public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , this . getClass ( ) . getName ( ) ) ; } }

Target:
private org.ovirt.engine.core.common.businessentities.CommandEntity buildCommandEntity ( org.ovirt.engine.core.compat.Guid parentCommandId , boolean callBackEnabled ) { return org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentCommandId , ( ( getExecutionContext ( ) . getJob ( ) ) == null ? org.ovirt.engine.core.compat.Guid.Empty : getExecutionContext ( ) . getJob ( ) . getId ( ) ) , ( ( getExecutionContext ( ) . getStep ( ) ) == null ? org.ovirt.engine.core.compat.Guid.Empty : getExecutionContext ( ) . getStep ( ) . getId ( ) ) , getActionType ( ) , getParameters ( ) , commandStatus , callBackEnabled , getReturnValue ( ) ) ; }
Source:
public void testOneEmptyDiskAlias ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskInfoDestinationMap = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage disk1 = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk1.setDiskAlias ( "" ) ; diskInfoDestinationMap.put ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , disk1 ) ; cmd.diskInfoDestinationMap = diskInfoDestinationMap ; org.junit.Assert.assertFalse ( cmd.isDisksAliasNotEmpty ( ) ) ; }

Target:
public void testOneEmptyDiskAlias ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskInfoDestinationMap = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage disk1 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk1.setDiskAlias ( "" ) ; diskInfoDestinationMap.put ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , disk1 ) ; cmd.diskInfoDestinationMap = diskInfoDestinationMap ; org.junit.Assert.assertFalse ( cmd.isDisksAliasNotEmpty ( ) ) ; }
Source:
public void getVmNextRunConfiguration ( 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.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpEntityQueryExpectations ( 1 , t ) ; control.replay ( ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testSubResourceLocatorBadGuid ( ) throws java.lang.Exception { control.replay ( ) ; try { collection.getDiskResource ( "foo" ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.row11Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_value = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.row18Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
private void dontSendTicket ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.SetVmTicketCommand.getVm ( ) ; final org.ovirt.engine.core.common.interfaces.IVdcUser user = org.ovirt.engine.core.bll.SetVmTicketCommand.getCurrentUser ( ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.log.warnFormat ( "Can\'t give console of virtual machine \"{0}\" to user \"{1}\", it has probably been taken by another user." , vm.getId ( ) , user.getUserId ( ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_USE_BY_OTHER_USER ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.setSucceeded ( false ) ; }

Target:
private void dontSendTicket ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.SetVmTicketCommand.getVm ( ) ; final org.ovirt.engine.core.common.users.VdcUser user = org.ovirt.engine.core.bll.SetVmTicketCommand.getCurrentUser ( ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.log.warnFormat ( "Can\'t give console of virtual machine \"{0}\" to user \"{1}\", it has probably been taken by another user." , vm.getId ( ) , user.getUserId ( ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_USE_BY_OTHER_USER ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.setSucceeded ( false ) ; }
Source:
public void onSuccessAudit ( ) { mockExecutor ( agent1 , true ) ; mockCheckStatus ( "on" ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( auditLogDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.AuditLog.class ) ) ; }

Target:
public void onSuccessAudit ( ) { mockExecutor ( agent1 , true ) ; mockCheckStatus ( "on" ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 2 ) ) . log ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }
Source:
private boolean inGracePeriod ( long timeoutToFence ) { return ( ( mUnrespondedAttempts.get ( ) ) < ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VDSAttemptsToResetCount ) ) ) || ( ( ( lastUpdate ) + timeoutToFence ) > ( java.lang.System.currentTimeMillis ( ) ) ) ; }

Target:
public boolean isHostInGracePeriod ( boolean sshSoftFencingExecuted ) { long timeoutToFence = calcTimeoutToFence ( cachedVds.getVmCount ( ) , cachedVds.getSpmStatus ( ) ) ; int unrespondedAttemptsBarrier = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VDSAttemptsToResetCount ) ; if ( sshSoftFencingExecuted ) { timeoutToFence = timeoutToFence * 2 ; unrespondedAttemptsBarrier = unrespondedAttemptsBarrier * 2 ; } return ( ( mUnrespondedAttempts.get ( ) ) < unrespondedAttemptsBarrier ) || ( ( ( lastUpdate ) + timeoutToFence ) > ( java.lang.System.currentTimeMillis ( ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; initSoundCard ( vm.getId ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusters = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterByArchitecture ( clusters , vm.getClusterArch ( ) ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusters , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; }
Source:
public void testGetNextConfiguration ( ) throws java.lang.Exception { setUriInfo ( addMatrixParameterExpectations ( setUpBasicUriExpectations ( ) , BackendVmResource.NEXT_RUN ) ) ; setUpGetEntityNextRunExpectations ( ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetCertuficateExpectations ( ) ; control.replay ( ) ; org.ovirt.engine.api.model.VM response = resource.get ( ) ; verifyModel ( response , 0 ) ; verifyCertificate ( response ) ; }

Target:
public void testGetNextConfiguration ( ) throws java.lang.Exception { setUriInfo ( addMatrixParameterExpectations ( setUpBasicUriExpectations ( ) , BackendVmResource.NEXT_RUN ) ) ; setUpGetEntityNextRunExpectations ( ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetCertuficateExpectations ( ) ; control.replay ( ) ; org.ovirt.engine.api.model.Vm response = resource.get ( ) ; verifyModel ( response , 0 ) ; verifyCertificate ( response ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Vm vm ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = getEntity ( ) ; affinityGroup.getVmIds ( ) . add ( asGuid ( vm.getId ( ) ) ) ; return performAction ( VdcActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( affinityGroup.getId ( ) , affinityGroup ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Vm vm ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = getEntity ( ) ; affinityGroup.getVmIds ( ) . add ( asGuid ( vm.getId ( ) ) ) ; return performAction ( ActionType.EditAffinityGroup , new org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters ( affinityGroup.getId ( ) , affinityGroup ) ) ; }