auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void initializeCommand ( org.ovirt.engine.core.compat.Guid storageId , org.ovirt.engine.core.common.businessentities.VolumeType volumeType ) { org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setStorageDomainId ( storageId ) ; if ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ) ) { parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createPreallocDiskImage ( ) ) ; } else if ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) { parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createSparseDiskImage ( ) ) ; } initializeCommand ( storageId , parameters ) ; }

Target:
private void initializeCommand ( org.ovirt.engine.core.compat.Guid storageId , org.ovirt.engine.core.common.businessentities.VolumeType volumeType ) { org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setStorageDomainId ( storageId ) ; if ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ) ) { parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskCommandTest.createPreallocDiskImage ( ) ) ; } else if ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) { parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskCommandTest.createSparseDiskImage ( ) ) ; } initializeCommand ( storageId , parameters ) ; }
Source:
public void hasLocalDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdc = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; sdc.setStorageType ( StorageType.LOCALFS ) ; org.ovirt.engine.core.common.businessentities.StoragePool existingSp = org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createStoragePool ( ) ; existingSp.setIsLocal ( true ) ; org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( existingSp ) ; org.mockito.Mockito.when ( sdDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( sdc ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ERROR_CANNOT_CHANGE_STORAGE_POOL_TYPE_WITH_LOCAL ) ; }

Target:
public void hasLocalDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdc = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; sdc.setStorageType ( StorageType.LOCALFS ) ; org.ovirt.engine.core.common.businessentities.StoragePool existingSp = org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createStoragePool ( ) ; existingSp.setIsLocal ( true ) ; org.mockito.Mockito.when ( spDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( existingSp ) ; org.mockito.Mockito.when ( sdDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( sdc ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ERROR_CANNOT_CHANGE_STORAGE_POOL_TYPE_WITH_LOCAL ) ; }
Source:
private void assertEqualsTagUserMap ( org.ovirt.engine.core.common.businessentities.tags_user_map existing , org.ovirt.engine.core.common.businessentities.tags_user_map result ) { assertEquals ( "Tag ID is not equal" , existing.gettag_id ( ) , result.gettag_id ( ) ) ; assertEquals ( "USER ID is not equal" , existing.getuser_id ( ) , result.getuser_id ( ) ) ; assertEquals ( "Object equation" , existing , result ) ; }

Target:
private void assertEqualsTagUserMap ( org.ovirt.engine.core.common.businessentities.TagsUserMap existing , org.ovirt.engine.core.common.businessentities.TagsUserMap result ) { assertEquals ( "Tag ID is not equal" , existing.gettag_id ( ) , result.gettag_id ( ) ) ; assertEquals ( "USER ID is not equal" , existing.getuser_id ( ) , result.getuser_id ( ) ) ; assertEquals ( "Object equation" , existing , result ) ; }
Source:
protected void onBind ( ) { super . onBind ( ) ; registerHandler ( getView ( ) . getConfigureLink ( ) . addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { com.gwtplatform.mvp.client.proxy.RevealRootPopupContentEvent.fire ( org.ovirt.engine.ui.webadmin.section.main.presenter.HeaderPresenterWidget.this , configurePopup ) ; } } ) ) ; registerHandler ( getView ( ) . getAboutLink ( ) . addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { com.gwtplatform.mvp.client.proxy.RevealRootPopupContentEvent.fire ( org.ovirt.engine.ui.webadmin.section.main.presenter.HeaderPresenterWidget.this , aboutPopup ) ; } } ) ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( feedbackLinkLabel , feedbackUrl ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates = vmTemplateDao.getAllTemplatesRelatedToQuotaId ( org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplates ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmTemplate ) ; } org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vmTemplates ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates = vmTemplateDao.getAllTemplatesRelatedToQuotaId ( org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getParameters ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate : vmTemplates ) { vmTemplateHandler.updateDisksFromDb ( vmTemplate ) ; } org.ovirt.engine.core.bll.GetTemplatesRelatedToQuotaIdQuery.getQueryReturnValue ( ) . setReturnValue ( vmTemplates ) ; }
Source:
private void handleChangePasswordMsg ( java.lang.String domainName , org.ovirt.engine.extensions.aaa.builtin.tools.DomainsConfigurationEntry changePaswordUrlEntry , boolean edit ) throws org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult { if ( args.contains ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_CHANGE_PASSWORD_MSG ) ) { try { java.lang.String changePasswordMsgStr = getChangePasswordMsg ( edit ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( changePasswordMsgStr ) ) { changePaswordUrlEntry.setValueForDomain ( domainName , changePasswordMsgStr ) ; } else { changePaswordUrlEntry.removeValueForDomain ( domainName ) ; } } catch ( java.io.UnsupportedEncodingException e ) { org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomains.log.error ( "Error in encoding the change password message. " , e ) ; } } }

Target:
private void handleChangePasswordMsg ( java.lang.String domainName , org.ovirt.engine.extensions.aaa.builtin.tools.DomainsConfigurationEntry changePaswordUrlEntry , boolean edit ) throws org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult { if ( args.containsKey ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_CHANGE_PASSWORD_MSG ) ) { try { java.lang.String changePasswordMsgStr = getChangePasswordMsg ( edit ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( changePasswordMsgStr ) ) { changePaswordUrlEntry.setValueForDomain ( domainName , changePasswordMsgStr ) ; } else { changePaswordUrlEntry.removeValueForDomain ( domainName ) ; } } catch ( java.io.UnsupportedEncodingException e ) { org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomains.log.error ( "Error in encoding the change password message. " , e ) ; } } }
Source:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , getStorageDomainId ( ) , getRequestDiskSpace ( ) ) ) ; } return list ; }

Target:
private boolean isDiskStorageTypeRequiresExecuteState ( ) { return ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) || ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.CINDER ) ) ; }
Source:
public void testBalance ( ) throws org.apache.xmlrpc.XmlRpcException { java.lang.String result = proxy.balance ( org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , "" ) ; org.junit.Assert.assertTrue ( result.equals ( org.ovirt.schedulerproxy.SchedulerProxyTest.BALANCE_RESULT ) ) ; }

Target:
public void testBalance ( ) throws org.apache.xmlrpc.XmlRpcException { java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > result = proxy.balance ( org.ovirt.schedulerproxy.SchedulerProxyTest.FILE_NAME , org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ARRAY , "" ) ; org.junit.Assert.assertTrue ( result.containsKey ( org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID ) ) ; org.junit.Assert.assertTrue ( result.get ( org.ovirt.schedulerproxy.SchedulerProxyTest.VM_ID ) . contains ( org.ovirt.schedulerproxy.SchedulerProxyTest.HOST_ID1 ) ) ; }
Source:
public static java.lang.String startPasswordDialog ( java.lang.String user ) throws java.io.IOException { org.ovirt.engine.core.config.EngineConfigLogic.log.debug ( "starting password dialog." ) ; if ( user == null ) { java.lang.System.out.printf ( "Please enter a password" ) ; } else { java.lang.System.out.printf ( "Please enter a password for %s: " , user ) ; } return new java.lang.String ( java.lang.System.console ( ) . readPassword ( ) ) ; }

Target:
public static java.lang.String startPasswordDialog ( java.lang.String user , java.lang.String msg ) throws java.io.IOException { org.ovirt.engine.core.config.EngineConfigLogic.log.debug ( "starting password dialog." ) ; if ( user == null ) { java.lang.System.out.printf ( msg ) ; } else { java.lang.System.out.printf ( "%s for %s: " , msg , user ) ; } return new java.lang.String ( java.lang.System.console ( ) . readPassword ( ) ) ; }
Source:
public void logAuditMessage ( final org.ovirt.engine.core.compat.Guid clusterId , final org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , final org.ovirt.engine.core.common.businessentities.VDS server , final org.ovirt.engine.core.common.AuditLogType logType , final org.ovirt.engine.core.compat.Guid brickId , final java.lang.String brickPath ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVds ( server ) ; logable.setGlusterVolume ( volume ) ; logable.setVdsGroupId ( clusterId ) ; logable.setBrickId ( brickId ) ; logable.setBrickPath ( brickPath ) ; auditLogDirector.log ( logable , logType ) ; }

Target:
public void logAuditMessage ( final org.ovirt.engine.core.compat.Guid clusterId , final org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , final org.ovirt.engine.core.common.businessentities.VDS server , final org.ovirt.engine.core.common.AuditLogType logType , final org.ovirt.engine.core.compat.Guid brickId , final java.lang.String brickPath ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVds ( server ) ; logable.setGlusterVolume ( volume ) ; logable.setClusterId ( clusterId ) ; logable.setBrickId ( brickId ) ; logable.setBrickPath ( brickPath ) ; auditLogDirector.log ( logable , logType ) ; }
Source:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassValidate ( ) ; group.setCompatibilityVersion ( Version.v3_6 ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isVirtioScsiEnabledForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.UpdateVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( "VirtIO" ) ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }

Target:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassValidate ( ) ; group.setCompatibilityVersion ( Version.v3_6 ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isVirtioScsiEnabledForVm ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.UpdateVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.ArgumentMatchers.any ( java.lang.Integer.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( "VirtIO" ) ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }
Source:
private void doTestNetworkIpAddressWasSameAsHostnameAndChangedForBootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( bootProtocol , null , null ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.networkIpAddressWasSameAsHostnameAndChanged ( null ) ; org.junit.Assert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIfaceDoesNotExist ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( Ipv4BootProtocol.STATIC_IP , null , null ) ; attachment.setNicName ( "nicName" ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.networkIpAddressWasSameAsHostnameAndChanged ( nics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "\n" ) ; builder.append ( super . toString ( ) ) ; builder.append ( "\n" ) ; org.ovirt.engine.core.vdsbroker.ObjectDescriptor.toStringBuilder ( lunList , builder ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( "\n" ) ; builder.append ( super . toString ( ) ) ; builder.append ( "\n" ) ; org.ovirt.engine.core.utils.ObjectDescriptor.toStringBuilder ( lunList , builder ) ; return builder.toString ( ) ; }
Source:
public void canRemoveIncreaseReplica ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getDistributedReplicatedVolume ( volumeId1 , 12 , 4 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricksToRemove = new java.util.ArrayList < > ( ) ; bricksToRemove.add ( volumeEntity.getBricks ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( bricksToRemove , volumeEntity , 5 , false ) ; org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT ) ) ; }

Target:
public void canRemoveIncreaseReplica ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getDistributedReplicatedVolume ( volumeId1 , 12 , 4 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricksToRemove = new java.util.ArrayList < > ( ) ; bricksToRemove.add ( volumeEntity.getBricks ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( bricksToRemove , volumeEntity , 5 , false ) ; org.hamcrest.MatcherAssert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT ) ) ; }
Source:
public void testUpdateNetConfigDirty ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; java.lang.Boolean netConfigDirty = before.getNetConfigDirty ( ) ; netConfigDirty = java.lang.Boolean.FALSE.equals ( netConfigDirty ) ; before.setNetConfigDirty ( netConfigDirty ) ; dao.updateNetConfigDirty ( before.getId ( ) , netConfigDirty ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testUpdateNetConfigDirty ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; java.lang.Boolean netConfigDirty = before.getNetConfigDirty ( ) ; netConfigDirty = java.lang.Boolean.FALSE.equals ( netConfigDirty ) ; before.setNetConfigDirty ( netConfigDirty ) ; dao.updateNetConfigDirty ( before.getId ( ) , netConfigDirty ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; org.junit.jupiter.api.Assertions.assertEquals ( before , after ) ; }
Source:
public void sendMessage ( byte [ ] message ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { waitForConnect ( ) ; send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , this . getRequestQueue ( ) ) . withContent ( message ) . build ( ) ) ; }

Target:
public void sendMessage ( byte [ ] message ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { waitForConnect ( ) ; send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , this . getRequestQueue ( ) ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_REPLY_TO , getResponseQueue ( ) ) . withContent ( message ) . build ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus pollEntityIfSupported ( org.ovirt.engine.core.bll.CommandBase < ? > cmd ) { if ( ! ( cmd instanceof org.ovirt.engine.core.bll.storage.EntityPollingCommand ) ) { log.error ( "Entity polling isn't supported for command '{}' (id: '{}'), will retry to poll the job soon" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return null ; } try { return ( ( org.ovirt.engine.core.bll.storage.EntityPollingCommand ) ( cmd ) ) . poll ( ) ; } catch ( java.lang.Exception e ) { log.error ( "Failed to poll entity for command '{}' (id: '{}'), will retry soon" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus pollEntityIfSupported ( org.ovirt.engine.core.bll.CommandBase < ? > cmd ) { if ( ! ( cmd instanceof org.ovirt.engine.core.bll.storage.EntityPollingCommand ) ) { log.error ( "Command id: '{}': entity polling isn't supported, will retry to poll the job soon" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return null ; } try { return ( ( org.ovirt.engine.core.bll.storage.EntityPollingCommand ) ( cmd ) ) . poll ( ) ; } catch ( java.lang.Exception e ) { log.error ( "Command id: '{}': failed to poll the command entity" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; } return null ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > parseTargets ( java.util.List < java.lang.String > iqnList ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( iqnList.size ( ) ) ; for ( java.lang.String iqn : iqnList ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections con = org.ovirt.engine.core.common.businessentities.StorageServerConnections.copyOf ( org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.getParameters ( ) . getConnection ( ) ) ; con.setiqn ( iqn ) ; connections.add ( con ) ; } return connections ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > parseTargets ( java.util.List < java.lang.String > iqnList ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( iqnList.size ( ) ) ; for ( java.lang.String iqn : iqnList ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections con = org.ovirt.engine.core.common.businessentities.StorageServerConnections.copyOf ( org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.getParameters ( ) . getConnection ( ) ) ; con.setIqn ( iqn ) ; connections.add ( con ) ; } return connections ; }
Source:
private boolean networkNotAttachedToCluster ( ) { if ( networkExists ( ) ) { return failCanDoAction ( VdcBllMessages.NETWORK_ALREADY_ATTACHED_TO_CLUSTER ) ; } return true ; }

Target:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( EngineMessage.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }
Source:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.getRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }

Target:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.updateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.getRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = super . getPermissionCheckSubjects ( ) ; org.ovirt.engine.core.compat.Guid networkId = ( ( getNetworkCluster ( ) ) == null ) ? null : getNetworkCluster ( ) . getnetwork_id ( ) ; permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( networkId , org.ovirt.engine.core.common.VdcObjectType.Network , org.ovirt.engine.core.common.businessentities.ActionGroup.ASSIGN_CLUSTER_NETWORK ) ) ; return permissions ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = super . getPermissionCheckSubjects ( ) ; org.ovirt.engine.core.compat.Guid networkId = ( ( getNetworkCluster ( ) ) == null ) ? null : getNetworkCluster ( ) . getNetworkId ( ) ; permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( networkId , org.ovirt.engine.core.common.VdcObjectType.Network , org.ovirt.engine.core.common.businessentities.ActionGroup.ASSIGN_CLUSTER_NETWORK ) ) ; return permissions ; }
Source:
protected void setUpCommand ( ) { org.mockito.Mockito.doNothing ( ) . when ( command ) . initTemplate ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVm ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateDiskProfiles ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateCpuProfile ( ) ; }

Target:
protected void setUpCommand ( ) { org.mockito.Mockito.doNothing ( ) . when ( command ) . initTemplate ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVm ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateDiskProfiles ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . setAndValidateCpuProfile ( ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { org.ovirt.engine.api.model.Network entity = org.ovirt.engine.api.restapi.types.NetworkMapper.map ( network , null ) ; org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = getIscsiBond ( ) ; iscsiBond.getNetworkIds ( ) . add ( entity.getId ( ) ) ; return performAction ( VdcActionType.EditIscsiBond , new org.ovirt.engine.core.common.action.EditIscsiBondParameters ( iscsiBond ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.compat.Guid networkId = entity.getId ( ) ; org.ovirt.engine.core.common.businessentities.IscsiBond bond = getBond ( ) ; bond.getNetworkIds ( ) . add ( networkId ) ; return performCreate ( VdcActionType.EditIscsiBond , new org.ovirt.engine.core.common.action.EditIscsiBondParameters ( bond ) , new org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworksResource.AddedNetworkResolver ( networkId ) ) ; }
Source:
public java.util.concurrent.Future < java.lang.Void > close ( ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . unsubscribe ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_ID , this . subscribtionId ) . build ( ) ) ; send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . disconnect ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_RECEIPT , java.util.UUID.randomUUID ( ) . toString ( ) ) . build ( ) ) ; return super . close ( ) ; }

Target:
private void setWaitForConnect ( ) { this . connected = new java.util.concurrent.CountDownLatch ( 1 ) ; this . subscribed = new java.util.concurrent.CountDownLatch ( 1 ) ; }
Source:
private void SaveSanStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . StartProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . Run ( ) ; }

Target:
private void OnSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.Validate ( ) ) ) ) { return ; } CancelConfirm ( ) ; getWindow ( ) . StartProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . Run ( ) ; }
Source:
private void assertEqualsTagsVmMap ( org.ovirt.engine.core.common.businessentities.TagsVmMap existing , org.ovirt.engine.core.common.businessentities.TagsVmMap result ) { assertEquals ( "TG is not equal" , existing.gettag_id ( ) , result.gettag_id ( ) ) ; assertEquals ( "VM id not equal " , existing.getvm_id ( ) , result.getvm_id ( ) ) ; assertEquals ( "Object equation" , existing , result ) ; }

Target:
private void assertEqualsTagsVmMap ( org.ovirt.engine.core.common.businessentities.TagsVmMap existing , org.ovirt.engine.core.common.businessentities.TagsVmMap result ) { org.junit.Assert.assertEquals ( "TG is not equal" , existing.gettag_id ( ) , result.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( "VM id not equal " , existing.getvm_id ( ) , result.getvm_id ( ) ) ; org.junit.Assert.assertEquals ( "Object equation" , existing , result ) ; }
Source:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , ipv4Address , bondName , bondOptions , bondType , bonded , ipv4BootProtocol , networkName , bridged , ipv4Gateway , mtu , ipv4Subnet , vdsId , baseInterface , vlanId , qos , labels ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , ipv4Address , ipv6Address , bondName , bondOptions , bondType , bonded , ipv4BootProtocol , ipv6BootProtocol , networkName , bridged , ipv4Gateway , ipv6Gateway , mtu , ipv4Subnet , ipv6Prefix , vdsId , baseInterface , vlanId , qos , labels ) ; }
Source:
public org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties parseProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String propertiesStr ) { java.util.HashMap < java.lang.String , java.lang.String > userDefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.HashMap < java.lang.String , java.lang.String > predefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; convertCustomPropertiesStrToMaps ( version , propertiesStr , predefinedPropertiesMap , userDefinedPropertiesMap ) ; return new org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties ( org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.vmPropertiesToString ( predefinedPropertiesMap ) , org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.vmPropertiesToString ( userDefinedPropertiesMap ) ) ; }

Target:
public org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties parseProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String propertiesStr ) { java.util.HashMap < java.lang.String , java.lang.String > userDefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.HashMap < java.lang.String , java.lang.String > predefinedPropertiesMap = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; convertCustomPropertiesStrToMaps ( version , propertiesStr , predefinedPropertiesMap , userDefinedPropertiesMap ) ; return new org.ovirt.engine.core.utils.customprop.VmPropertiesUtils.VMCustomProperties ( convertProperties ( predefinedPropertiesMap ) , convertProperties ( userDefinedPropertiesMap ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.NetworkValidator validator = new org.ovirt.engine.core.bll.validator.NetworkValidator ( org.ovirt.engine.core.bll.network.dc.RemoveNetworkCommand.getNetworkDao ( ) . get ( getNetwork ( ) . getId ( ) ) ) ; return ( ( ( ( validate ( validator.networkIsSet ( ) ) ) && ( validate ( validator.notRemovingManagementNetwork ( ) ) ) ) && ( validate ( validator.notIscsiBondNetwork ( ) ) ) ) && ( validate ( validator.networkNotUsedByVms ( ) ) ) ) && ( validate ( validator.networkNotUsedByTemplates ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.NetworkValidator validator = new org.ovirt.engine.core.bll.validator.NetworkValidator ( vmDao , org.ovirt.engine.core.bll.network.dc.RemoveNetworkCommand.getNetworkDao ( ) . get ( getNetwork ( ) . getId ( ) ) ) ; return ( ( ( ( validate ( validator.networkIsSet ( ) ) ) && ( validate ( validator.notRemovingManagementNetwork ( ) ) ) ) && ( validate ( validator.notIscsiBondNetwork ( ) ) ) ) && ( validate ( validator.networkNotUsedByVms ( ) ) ) ) && ( validate ( validator.networkNotUsedByTemplates ( ) ) ) ; }
Source:
public void runFailedAutoStartVM ( org.ovirt.engine.core.compat.Guid vmId ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_FAILED ) ; org.ovirt.engine.core.bll.VdsEventListener.log.infoFormat ( "Failed to start Highly Available VM. Attempting to restart. VM Name: {0}, VM Id:{1}" , event.getVmName ( ) , vmId ) ; final org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RunVm , new org.ovirt.engine.core.common.action.RunVmParams ( vmId ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_RESTART_FAILED ) ; } }

Target:
public void runFailedAutoStartVM ( org.ovirt.engine.core.compat.Guid vmId ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_FAILED ) ; org.ovirt.engine.core.bll.VdsEventListener.log.infoFormat ( "Highly Available VM went down. Attempting to restart. VM Name: {0}, VM Id:{1}" , event.getVmName ( ) , vmId ) ; final org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RunVm , new org.ovirt.engine.core.common.action.RunVmParams ( vmId ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( event , AuditLogType.HA_VM_RESTART_FAILED ) ; } }
Source:
private void setLangPageShown ( javax.servlet.http.HttpServletResponse response , boolean value ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.utils.servlet.DocsServlet.LANG_PAGE_SHOWN , java.lang.Boolean.toString ( value ) ) ; cookie.setPath ( ( "/" + ( getServletContext ( ) . getContextPath ( ) ) ) ) ; response.addCookie ( cookie ) ; }

Target:
private void setLangPageShown ( javax.servlet.http.HttpServletResponse response , boolean value ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( org.ovirt.engine.core.utils.servlet.DocsServlet.LANG_PAGE_SHOWN , java.lang.Boolean.toString ( value ) ) ; cookie.setPath ( getServletContext ( ) . getContextPath ( ) ) ; cookie.setHttpOnly ( true ) ; response.addCookie ( cookie ) ; }
Source:
private void register ( ) { if ( ( getWindow ( ) ) != null ) { return ; } for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( item ) ) ; org.ovirt.engine.core.common.action.RegisterDiskParameters registerDiskParams = new org.ovirt.engine.core.common.action.RegisterDiskParameters ( disk , getEntity ( ) . getId ( ) ) ; registerDiskParams.setRefreshFromStorage ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RegisterDisk , registerDiskParams ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; registerDiskModel.setQuotaEnforcementType ( dataCenter.getQuotaEnforcementType ( ) ) ; registerDiskModel.setDisks ( org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( getSelectedItems ( ) ) ) ; registerDiskModel.updateStorageDomain ( getEntity ( ) ) ; registerDiskModel.stopProgress ( ) ; }
Source:
public void testAddOperationAction ( ) { org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > testOperation = new org.ovirt.engine.ui.frontend.communication.VdcOperation ( org.ovirt.engine.core.common.action.VdcActionType.AddNetworkOnProvider , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) , null ) ; testManager.addOperation ( testOperation ) ; org.mockito.Mockito.verify ( mockOperationProcessor ) . processOperation ( testManager ) ; org.mockito.Mockito.verify ( mockEventBus ) . fireEvent ( org.mockito.Matchers.any ( org.ovirt.engine.ui.frontend.communication.EngineSessionRefreshedEvent.class ) ) ; org.junit.Assert.assertEquals ( "Operations must match" , testOperation , testManager.pollOperation ( ) ) ; }

Target:
public void testAddOperationAction ( ) { org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > testOperation = new org.ovirt.engine.ui.frontend.communication.VdcOperation ( org.ovirt.engine.core.common.action.VdcActionType.AddNetworkOnProvider , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) , null ) ; testManager.addOperation ( testOperation ) ; org.mockito.Mockito.verify ( mockOperationProcessor ) . processOperation ( testManager ) ; org.mockito.Mockito.verify ( mockEventBus ) . fireEvent ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.ui.frontend.communication.EngineSessionRefreshedEvent.class ) ) ; org.junit.Assert.assertEquals ( "Operations must match" , testOperation , testManager.pollOperation ( ) ) ; }
Source:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolVmListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getDetachCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public boolean matches ( java.lang.Object argument ) { if ( ! ( argument instanceof java.util.ArrayList ) ) { return false ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.ArrayList < org.ovirt.engine.core.compat.Guid > removedVolumeIds = ( ( java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ) ( argument ) ) ; return ( ( removedVolumeIds.size ( ) ) == 1 ) && ( removedVolumeIds.get ( 0 ) . equals ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.EXISTING_VOL_DIST_ID ) ) ; }

Target:
public boolean matches ( java.lang.Object argument ) { if ( ! ( argument instanceof java.util.Collection ) ) { return false ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.Collection < org.ovirt.engine.core.compat.Guid > removedVolumeIds = ( ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ) ( argument ) ) ; return ( ( removedVolumeIds.size ( ) ) == 1 ) && ( removedVolumeIds.contains ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.EXISTING_VOL_DIST_ID ) ) ; }
Source:
public void updateModel ( java.lang.String format , int actualSize , int virtualSize , java.lang.String qcowCompat , boolean backingFile , boolean fileLoaded ) { setFormat ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.valueOf ( format ) ) ; setActualSize ( actualSize ) ; setVirtualSize ( virtualSize ) ; setQcowCompat ( org.ovirt.engine.ui.uicommonweb.models.storage.ImageInfoModel.QemuCompat.forValue ( qcowCompat ) ) ; setBackingFile ( backingFile ) ; setFileLoaded ( fileLoaded ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }

Target:
public void updateModel ( java.lang.String format , int actualSize , int virtualSize , java.lang.String qcowCompat , boolean backingFile , boolean fileLoaded , java.lang.String contentType , java.lang.String fileName ) { setFormat ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.valueOf ( format ) ) ; setActualSize ( actualSize ) ; setVirtualSize ( virtualSize ) ; setQcowCompat ( org.ovirt.engine.ui.uicommonweb.models.storage.ImageInfoModel.QemuCompat.forValue ( qcowCompat ) ) ; setBackingFile ( backingFile ) ; setFileLoaded ( fileLoaded ) ; setContentType ( org.ovirt.engine.core.common.businessentities.storage.DiskContentType.valueOf ( contentType ) ) ; setFileName ( fileName ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.CommandEntity createCommandEntity ( org.ovirt.engine.core.compat.Guid cmdId , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = new org.ovirt.engine.core.common.businessentities.CommandEntity ( ) ; cmdEntity.setId ( cmdId ) ; cmdEntity.setCommandType ( actionType ) ; cmdEntity.setCommandParameters ( params ) ; return cmdEntity ; }

Target:
public org.ovirt.engine.core.common.businessentities.CommandEntity createCommandEntity ( org.ovirt.engine.core.compat.Guid cmdId , org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = new org.ovirt.engine.core.common.businessentities.CommandEntity ( ) ; cmdEntity.setId ( cmdId ) ; cmdEntity.setCommandType ( actionType ) ; cmdEntity.setCommandParameters ( params ) ; return cmdEntity ; }
Source:
protected void addUsersToModel ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , java.util.Set < org.ovirt.engine.core.compat.Guid > excludeUsers ) { for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable item : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( returnValue.getReturnValue ( ) ) ) ) { org.ovirt.engine.core.common.businessentities.LdapUser a = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( item ) ) ; if ( ! ( excludeUsers.contains ( a.getUserId ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel tempVar2 = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; tempVar2.setEntity ( new org.ovirt.engine.core.common.businessentities.DbUser ( a ) ) ; getusers ( ) . add ( tempVar2 ) ; } } }

Target:
protected void addUsersToModel ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , java.util.Set < org.ovirt.engine.core.common.utils.ExternalId > excludeUsers ) { for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable item : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( returnValue.getReturnValue ( ) ) ) ) { org.ovirt.engine.core.authentication.DirectoryUser a = ( ( org.ovirt.engine.core.authentication.DirectoryUser ) ( item ) ) ; if ( ! ( excludeUsers.contains ( a.getId ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel tempVar2 = new org.ovirt.engine.ui.uicommonweb.models.EntityModel ( ) ; tempVar2.setEntity ( new org.ovirt.engine.core.common.businessentities.DbUser ( a ) ) ; getusers ( ) . add ( tempVar2 ) ; } } }