auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void addTab ( com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.RequestTabsHandler > requestTabsEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.proxy.RevealContentHandler < ? > > revealContentEventType , java.lang.String label , java.lang.String historyToken , boolean isMainTab , java.lang.String contentUrl ) { dynamicUrlContentTabProxyFactory.create ( requestTabsEventType , revealContentEventType , label , historyToken , isMainTab , contentUrl ) ; org.ovirt.engine.ui.common.presenter.RedrawDynamicTabContainerEvent.fire ( this , requestTabsEventType ) ; }

Target:
void addTab ( com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.RequestTabsHandler > requestTabsEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.proxy.RevealContentHandler < ? > > revealContentEventType , java.lang.String label , java.lang.String historyToken , boolean isMainTab , java.lang.String contentUrl , org.ovirt.engine.ui.webadmin.plugin.api.TabOptions options ) { dynamicUrlContentTabProxyFactory.create ( requestTabsEventType , revealContentEventType , label , historyToken , isMainTab , contentUrl , ( options.getAlignRight ( ) ? org.ovirt.engine.ui.common.widget.Align.RIGHT : org.ovirt.engine.ui.common.widget.Align.LEFT ) ) ; org.ovirt.engine.ui.common.presenter.RedrawDynamicTabContainerEvent.fire ( this , requestTabsEventType ) ; }
Source:
public static void GetRpmVersionViaPublic ( 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.ProductRPMVersion , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public void processResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { org.codehaus.jackson.JsonNode id = response.getId ( ) ; if ( org.codehaus.jackson.node.NullNode.class . isInstance ( id ) ) { this . tracker.processIssue ( response ) ; } org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call = this . tracker.removeCall ( response.getId ( ) ) ; if ( call == null ) { this . log.error ( "No able to update response for {}" , response.getId ( ) ) ; return ; } call.addResponse ( response ) ; }

Target:
public void processResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response ) { org.codehaus.jackson.JsonNode id = response.getId ( ) ; if ( org.codehaus.jackson.node.NullNode.class . isInstance ( id ) ) { this . tracker.processIssue ( response ) ; } org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call = this . tracker.removeCall ( response.getId ( ) ) ; if ( call == null ) { this . log.error ( "Not able to update response for {}" , response.getId ( ) ) ; return ; } call.addResponse ( response ) ; }
Source:
public void testPermissionSubjectOnProvidedImage ( ) { initializeSuppliedImage ( ) ; org.junit.Assert.assertEquals ( getCommand ( ) . getPermissionCheckSubjects ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.utils.PermissionSubject ( getCommand ( ) . getParameters ( ) . getImageId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.EDIT_DISK_PROPERTIES ) ) ; }

Target:
public void testPermissionSubjectOnProvidedImage ( ) { initializeSuppliedImage ( ) ; org.junit.Assert.assertEquals ( getCommand ( ) . getPermissionCheckSubjects ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.utils.PermissionSubject ( getCommand ( ) . getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.EDIT_DISK_PROPERTIES ) ) ; }
Source:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setcompatibility_version ( Version.v3_2 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }

Target:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setCompatibilityVersion ( Version.v3_2 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }
Source:
private boolean isVmNumaPinned ( java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > nodes ) { if ( ( nodes == null ) || ( nodes.isEmpty ( ) ) ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VmNumaNode vmNumaNode : nodes ) { for ( org.ovirt.engine.core.common.businessentities.NumaNodeVmVds item : vmNumaNode.getNumaNodeVdsList ( ) ) { if ( item.isPinned ( ) ) { return true ; } } } return false ; }

Target:
private boolean isVmNumaPinned ( java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > nodes ) { if ( ( nodes == null ) || ( nodes.isEmpty ( ) ) ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VmNumaNode vmNumaNode : nodes ) { for ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > > pair : vmNumaNode.getVdsNumaNodeList ( ) ) { if ( ( ( pair.getSecond ( ) ) != null ) && ( pair.getSecond ( ) . getFirst ( ) ) ) { return true ; } } } return false ; }
Source:
public void testFilterNicsWithUnmanagedNetworks ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicManaged = createNicWithNetworkImplementationDetails ( "eth0" , true ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicUnmanaged = createNicWithNetworkImplementationDetails ( "eth1" , false ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces = java.util.Arrays.asList ( nicManaged , nicUnmanaged ) ; java.util.Set < java.lang.String > unmanagedNicsSet = validator.filterNicsWithUnmanagedNetworks ( existingInterfaces , java.util.Collections.emptySet ( ) ) ; org.junit.Assert.assertEquals ( 1 , unmanagedNicsSet.size ( ) ) ; org.junit.Assert.assertTrue ( unmanagedNicsSet.contains ( "eth1" ) ) ; }

Target:
public void testFilterNicsWithUnmanagedNetworks ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicManaged = createNicWithNetworkImplementationDetails ( "eth0" , true ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nicUnmanaged = createNicWithNetworkImplementationDetails ( "eth1" , false ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfaces = java.util.Arrays.asList ( nicManaged , nicUnmanaged ) ; java.util.Set < java.lang.String > unmanagedNicsSet = validator.filterNicsWithUnmanagedNetworks ( existingInterfaces , java.util.Collections.emptySet ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , unmanagedNicsSet.size ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( unmanagedNicsSet.contains ( "eth1" ) ) ; }
Source:
private void removeVmStatelessImages ( ) { if ( getSnapshotDAO ( ) . exists ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.bll.ProcessDownVmCommand.log.infoFormat ( "Deleting snapshot for stateless vm {0}" , org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; runInternalAction ( VdcActionType.RestoreStatelessVm , new org.ovirt.engine.core.common.action.VmOperationParameterBase ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.ProcessDownVmCommand.getLock ( ) ) ) ; } }

Target:
private void removeVmStatelessImages ( ) { if ( getSnapshotDAO ( ) . exists ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.bll.ProcessDownVmCommand.log.infoFormat ( "Deleting snapshot for stateless vm {0}" , org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; runInternalAction ( VdcActionType.RestoreStatelessVm , new org.ovirt.engine.core.common.action.VmOperationParameterBase ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getContext ( ) , org.ovirt.engine.core.bll.ProcessDownVmCommand.getLock ( ) ) ) ; } }
Source:
private void setupQuerySpy ( ) { org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVdsDao ( ) ) . thenReturn ( vdsDaoMocked ) ; org.mockito.Mockito.doReturn ( interfaceDaoMocked ) . when ( getQuery ( ) ) . getInterfaceDao ( ) ; org.mockito.Mockito.doReturn ( networkDaoMocked ) . when ( getQuery ( ) ) . getNetworkDao ( ) ; org.mockito.Mockito.doReturn ( networkImplementationDetailsUtils ) . when ( getQuery ( ) ) . getNetworkImplementationDetailsUtils ( ) ; org.mockito.Mockito.doReturn ( networkAttachmentDao ) . when ( getQuery ( ) ) . getNetworkAttachmentDao ( ) ; }

Target:
public void testExecuteQueryCommand ( ) { org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( networkId ) ; setupVdsDao ( ) ; setupVdsNetworkInterfaceDao ( ) ; setupNetworkDao ( ) ; setupHostNetworkQosDao ( ) ; org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > vdsInterfaceVdsPair = new org.ovirt.engine.core.common.utils.PairQueryable ( vdsNetworkInterface , vds ) ; java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > expected = java.util.Collections.singletonList ( vdsInterfaceVdsPair ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( "Wrong result returned" , expected , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
private void mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_POOLD_ID ) ; org.mockito.Mockito.doReturn ( vm ) . when ( cmd ) . getVm ( ) ; }

Target:
private void mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_POOLD_ID ) ; vm.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.doReturn ( vm ) . when ( cmd ) . getVm ( ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingIfaces , java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > existingAttachments , java.util.Collection < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . setExistingInterfaces ( existingIfaces ) . setExistingAttachments ( existingAttachments ) . addNetworks ( networks ) . build ( ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator build ( ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator ( host , params , existingInterfaces , existingAttachments , new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) , managementNetworkUtil , networkClusterDaoMock , networkDaoMock , vdsDaoMock , new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorHelper ( ) , vmDao , mockNetworkExclusivenessValidatorResolver ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; return getClusterByServiceList ( list , supportsVirtService , supportsGlusterService ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; return getClusterByServiceList ( list , supportsVirtService , supportsGlusterService ) ; }
Source:
private void IsAutoAssign_EntityChanged ( java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getIsAutoAssign ( ) . getEntity ( ) ) ) == true ) { getRunVMOnSpecificHost ( ) . setEntity ( false ) ; getRunVMOnSpecificHost ( ) . setIsChangable ( false ) ; } else { getRunVMOnSpecificHost ( ) . setIsChangable ( true ) ; } }

Target:
private void IsAutoAssign_EntityChanged ( java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getIsAutoAssign ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getRunVMOnSpecificHost ( ) ) ; clearAndDisable ( getHostCpu ( ) ) ; } else { getRunVMOnSpecificHost ( ) . setIsChangable ( true ) ; } behavior.updateCpuPinningVisibility ( ) ; }
Source:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksToCheck = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disksToCheck ) ; return validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ; }

Target:
protected boolean validateCreateAllSnapshotsFromVmCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.tasks.CommandHelper.canDoAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) . clone ( ) . getExecutionContext ( ) , false ) ; if ( ! ( returnValue.isValid ( ) ) ) { org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getReturnValue ( ) . setValidationMessages ( returnValue.getValidationMessages ( ) ) ; return false ; } return true ; }
Source:
public void testGetUserID ( ) { org.ovirt.engine.core.common.interfaces.IVdcUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.interfaces.IVdcUser.class ) ; org.mockito.Mockito.when ( user.getUserId ( ) ) . thenReturn ( Guid.EVERYONE ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setVdcUser ( user ) ; org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery query = new org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; junit.framework.Assert.assertEquals ( "wrong guid" , Guid.EVERYONE , query.getUserID ( ) ) ; }

Target:
public void testGetUserID ( ) { org.ovirt.engine.core.common.users.VdcUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.users.VdcUser.class ) ; org.mockito.Mockito.when ( user.getUserId ( ) ) . thenReturn ( Guid.EVERYONE ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setVdcUser ( user ) ; org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery query = new org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ; junit.framework.Assert.assertEquals ( "wrong guid" , Guid.EVERYONE , query.getUserID ( ) ) ; }
Source:
protected static org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain currDomain : domainsInPool ) { org.ovirt.engine.core.bll.VmHandler.updateDisksStorage ( currDomain , disksList ) ; if ( ( ( currDomain.getStorageDomainType ( ) . isDataDomain ( ) ) && ( ( currDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ) && ( org.ovirt.engine.core.bll.VmHandler.validateSpaceRequirements ( currDomain , disksList ) ) ) { return currDomain ; } } return null ; }

Target:
public static org.ovirt.engine.core.common.businessentities.Snapshot getActiveSnapshot ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : vm.getSnapshots ( ) ) { if ( ( snapshot.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType.ACTIVE ) ) { return snapshot ; } } return null ; }
Source:
public void testPK ( ) throws java.lang.Exception { try ( final java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.uutils.ssh.ConstraintByteArrayOutputStream ( 500 ) ) { client.setKeyPair ( TestCommon.keyPair ) ; client.connect ( ) ; client.authenticate ( ) ; client.executeCommand ( org.ovirt.engine.core.uutils.ssh.BasicTest.hello_command , null , out , null ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.uutils.ssh.BasicTest.hello_result , new java.lang.String ( out.toByteArray ( ) , "UTF-8" ) ) ; } }

Target:
public void testPK ( ) throws java.lang.Exception { try ( final java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.uutils.ssh.ConstraintByteArrayOutputStream ( 500 ) ) { client.setKeyPair ( TestCommon.keyPair ) ; client.connect ( ) ; client.authenticate ( ) ; client.executeCommand ( org.ovirt.engine.core.uutils.ssh.BasicTest.helloCommand , null , out , null ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.uutils.ssh.BasicTest.helloResult , new java.lang.String ( out.toByteArray ( ) , "UTF-8" ) ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getLunDao ( ) ; existingLUN = dao.get ( "1IET_00180001" ) ; newLUN = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; newLUN.setLUN_id ( "oicu812" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getLunDao ( ) ; existingLUN = dao.get ( "1IET_00180001" ) ; newLUN = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; newLUN.setLUN_id ( "oicu812" ) ; newLUN.setvolume_group_id ( "" ) ; }
Source:
public void updateStorageTypesByDomainType ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainType storageDomainType = getAvailableStorageDomainTypeItems ( ) . getSelectedItem ( ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.storage.StorageType > filteredStorageTypes = new java.util.LinkedHashSet < > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel currModel : getStorageModels ( ) ) { if ( ( currModel.getRole ( ) ) == storageDomainType ) { filteredStorageTypes.add ( currModel.getType ( ) ) ; } } getAvailableStorageTypeItems ( ) . setItems ( filteredStorageTypes ) ; }

Target:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getStorageModelsByRole ( org.ovirt.engine.core.common.businessentities.StorageDomainType role ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > filteredModels = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model : getStorageModels ( ) ) { if ( ( model.getRole ( ) ) == role ) { filteredModels.add ( model ) ; } } return filteredModels ; }
Source:
protected void rerunInternal ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailueForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setVdsDestinationId ( null ) ; super . rerunInternal ( ) ; } else { DecreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; } }

Target:
protected void rerunInternal ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailueForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setVdsDestinationId ( null ) ; super . rerunInternal ( ) ; } else { decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; } }
Source:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateWatchdog , org.ovirt.engine.core.common.action.WatchdogParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateWatchdogResourceTest.TEMPLATE_ID } , true , true ) ) ; org.ovirt.engine.api.model.Watchdog wd = resource.update ( getUpdate ( ) ) ; assertTrue ( wd.isSetAction ( ) ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateWatchdog , org.ovirt.engine.core.common.action.WatchdogParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateWatchdogResourceTest.TEMPLATE_ID } , true , true ) ) ; org.ovirt.engine.api.model.Watchdog wd = resource.update ( getUpdate ( ) ) ; assertTrue ( wd.isSetAction ( ) ) ; }
Source:
protected void extractBondIfModified ( java.util.Set < java.lang.String > bonds , org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String name ) { if ( org.apache.commons.lang.StringUtils.isBlank ( iface.getNetworkName ( ) ) ) { violations.add ( VdcBllMessages.NETWROK_NOT_EXISTS ) ; } else { if ( bonds.contains ( name ) ) { violations.add ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { bonds.add ( name ) ; if ( interfaceWasModified ( iface ) ) { modifiedBonds.put ( name , iface ) ; } } } }

Target:
private void extractBondSlave ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > slaves = bonds.get ( iface.getBondName ( ) ) ; if ( slaves == null ) { slaves = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ( ) ; bonds.put ( iface.getBondName ( ) , slaves ) ; } slaves.add ( iface ) ; }
Source:
protected java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.profiles.CpuProfile object ) { return object.getName ( ) ; }

Target:
private void initListBoxEditors ( ) { destClusterEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ) ; destClusterQuotaEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.Quota > ( ) ) ; destStorageEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; cpuProfileEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus handleUndeterminedJobStatus ( org.ovirt.engine.core.bll.CommandBase < ? > cmd , boolean jobReportedByHost ) { if ( isEntityPollingSupported ( cmd ) ) { return pollEntityIfSupported ( cmd ) ; } if ( ! jobReportedByHost ) { log.error ( ( "Command id: '{}': entity polling isn't supported and the job isn't reported by the host," + "assuming it failed so that the command execution will end." ) , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus.failed ; } log.error ( "Command id: '{}': entity polling isn't supported, will retry to poll the job soon" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus handleUndeterminedJobStatus ( org.ovirt.engine.core.bll.CommandBase < ? > cmd , boolean jobsReportedByHost ) { if ( isEntityPollingSupported ( cmd ) ) { return pollEntity ( cmd ) ; } if ( jobsReportedByHost ) { log.error ( ( "Command id: '{}': entity polling isn't supported and the job isn't reported by the host," + "assuming it failed so that the command execution will end." ) , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus.failed ; } log.error ( "Command id: '{}': entity polling isn't supported, will retry to poll the job soon" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return null ; }
Source:
private static void constructGroupsMembershipTree ( org.ovirt.engine.api.extensions.ExtMap entity , org.ovirt.engine.api.extensions.ExtKey key , java.util.Map < java.lang.String , org.ovirt.engine.api.extensions.ExtMap > groupsCache ) { java.util.List < org.ovirt.engine.api.extensions.ExtMap > groups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap memberOf : entity.get ( key , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) { org.ovirt.engine.api.extensions.ExtMap cachedGroup = groupsCache.get ( memberOf.get ( GroupRecord.ID ) ) ; org.ovirt.engine.core.aaa.AuthzUtils.constructGroupsMembershipTree ( cachedGroup , GroupRecord.GROUPS , groupsCache ) ; groups.add ( cachedGroup ) ; } entity.put ( key , groups ) ; }

Target:
private static org.ovirt.engine.api.extensions.ExtMap constructGroupsMembershipTree ( org.ovirt.engine.api.extensions.ExtMap entity , org.ovirt.engine.api.extensions.ExtKey key , java.util.Map < java.lang.String , org.ovirt.engine.api.extensions.ExtMap > groupsCache ) { java.util.List < org.ovirt.engine.api.extensions.ExtMap > groups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap memberOf : entity.get ( key , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) { groups.add ( org.ovirt.engine.core.aaa.AuthzUtils.constructGroupsMembershipTree ( groupsCache.get ( memberOf.get ( GroupRecord.ID ) ) . clone ( ) , GroupRecord.GROUPS , groupsCache ) ) ; } entity.put ( key , groups ) ; return entity ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.KatelloErratum model , int index ) { assertEquals ( NAMES [ index ] , org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( model.getId ( ) ) ) ; assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.KatelloErratum model , int index ) { org.junit.Assert.assertEquals ( NAMES [ index ] , org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( model.getId ( ) ) ) ; org.junit.Assert.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; verifyLinks ( model ) ; }
Source:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }

Target:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel object ) { super . edit ( object ) ; bondSuggestEditor.setVisible ( true ) ; bondEditor.setVisible ( false ) ; info.setVisible ( false ) ; message.setVisible ( false ) ; layoutPanel.remove ( infoPanel ) ; layoutPanel.setWidgetSize ( mainPanel , 300 ) ; asPopupPanel ( ) . setPixelSize ( 400 , 400 ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostBondInterfaceModel object ) { super . edit ( object ) ; labelsWidget.edit ( object.getLabelsModel ( ) ) ; bondSuggestEditor.setVisible ( true ) ; bondEditor.setVisible ( false ) ; labelsWidget.setVisible ( true ) ; info.setVisible ( false ) ; message.setVisible ( false ) ; layoutPanel.remove ( infoPanel ) ; layoutPanel.setWidgetSize ( mainPanel , 300 ) ; asPopupPanel ( ) . setPixelSize ( 400 , 400 ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmPayload getPayload ( org.ovirt.engine.api.model.VM vm ) { org.ovirt.engine.core.common.businessentities.VmPayload payload = null ; if ( ( vm.isSetPayloads ( ) ) && ( vm.getPayloads ( ) . isSetPayload ( ) ) ) { payload = getMapper ( org.ovirt.engine.api.model.Payload.class , org.ovirt.engine.core.common.businessentities.VmPayload.class ) . map ( vm.getPayloads ( ) . getPayload ( ) . get ( 0 ) , new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ) ; } return payload ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmPayload getPayload ( org.ovirt.engine.api.model.Vm vm ) { org.ovirt.engine.core.common.businessentities.VmPayload payload = null ; if ( ( vm.isSetPayloads ( ) ) && ( vm.getPayloads ( ) . isSetPayload ( ) ) ) { payload = getMapper ( org.ovirt.engine.api.model.Payload.class , org.ovirt.engine.core.common.businessentities.VmPayload.class ) . map ( vm.getPayloads ( ) . getPayload ( ) . get ( 0 ) , new org.ovirt.engine.core.common.businessentities.VmPayload ( ) ) ; } return payload ; }
Source:
protected void EndVmCommand ( ) { initializeObjectState ( ) ; if ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { getSnapshotDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) ) ; } else { getSnapshotDao ( ) . updateStatus ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) , SnapshotStatus.BROKEN ) ; } super . EndVmCommand ( ) ; }

Target:
protected void endVmCommand ( ) { initializeObjectState ( ) ; if ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { getSnapshotDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) ) ; } else { getSnapshotDao ( ) . updateStatus ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) , SnapshotStatus.BROKEN ) ; } super . endVmCommand ( ) ; }
Source:
public void testCheckVmHostDeviceAvailability ( ) { org.junit.Assert.assertTrue ( dao.checkVmHostDeviceAvailability ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_VM_ID , org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ) ; }

Target:
public void saveNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.HostDevice netDevice = generateNewEntity ( ) ; netDevice.setCapability ( "net" ) ; netDevice.setNetworkInterfaceName ( "eth1" ) ; dao.save ( netDevice ) ; org.ovirt.engine.core.common.businessentities.HostDevice result = dao.get ( netDevice.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( netDevice , result ) ; }
Source:
protected < T extends org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl > void testScore ( T unit , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > vms , org.ovirt.engine.core.compat.Guid destinationHost ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vms.values ( ) ) { org.ovirt.engine.core.compat.Guid hostId = selectedBestHost ( unit , vm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( hosts.values ( ) ) ) ; org.junit.Assert.assertNotNull ( hostId ) ; org.junit.Assert.assertEquals ( destinationHost , hostId ) ; } }

Target:
protected < T extends org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl > void testScore ( T unit , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > vms , org.ovirt.engine.core.compat.Guid destinationHost ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vms.values ( ) ) { org.ovirt.engine.core.compat.Guid hostId = selectedBestHost ( unit , vm , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( hosts.values ( ) ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( hostId ) ; org.junit.jupiter.api.Assertions.assertEquals ( destinationHost , hostId ) ; } }
Source:
public void testClearMigratingToVds ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; org.junit.Assert.assertNotNull ( "migrating_to_vds field should not be null before we clear it" , vmDynamic.getMigratingToVds ( ) ) ; dao.clearMigratingToVds ( FixturesTool.VM_RHEL5_POOL_51 ) ; vmDynamic = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; org.junit.Assert.assertNull ( "migrating_to_vds field should be null after we clear it" , vmDynamic.getMigratingToVds ( ) ) ; }

Target:
public void testClearMigratingToVds ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; org.junit.jupiter.api.Assertions.assertNotNull ( vmDynamic.getMigratingToVds ( ) , "migrating_to_vds field should not be null before we clear it" ) ; dao.clearMigratingToVds ( FixturesTool.VM_RHEL5_POOL_51 ) ; vmDynamic = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; org.junit.jupiter.api.Assertions.assertNull ( vmDynamic.getMigratingToVds ( ) , "migrating_to_vds field should be null after we clear it" ) ; }
Source:
public void canDoActionInvalidVmStatus ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Unknown , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN_OR_UP.toString ( ) ) ) ; }

Target:
public void canDoActionInvalidVmStatus ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Unknown , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; command.updateParameters ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN_OR_UP.toString ( ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel hasVLanTagEntity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; java.lang.Boolean hasVLanTagValue = ( ( java.lang.Boolean ) ( hasVLanTagEntity.getEntity ( ) ) ) ; getView ( ) . setVLanTagEnabled ( hasVLanTagValue ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propertyName ) ) { getView ( ) . setMessageLabel ( model.getMessage ( ) ) ; } }
Source:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.sdk.decorators.Role > list ( java.lang.Integer max ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; java.lang.String url = new org.ovirt.engine.sdk.utils.UrlBuilder ( ( ( SLASH ) + ( getName ( ) ) ) ) . add ( "max" , max , UrlParameterType.MATRIX ) . build ( ) ; return list ( url , org.ovirt.engine.sdk.entities.Roles.class , org.ovirt.engine.sdk.decorators.Role.class , headers ) ; }

Target:
public java.util.List < org.ovirt.engine.sdk.decorators.Role > list ( java.lang.Integer max ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( ( ( SLASH ) + ( getName ( ) ) ) ) ; if ( max != null ) { urlBuilder.add ( "max" , max , UrlParameterType.MATRIX ) ; } java.lang.String url = urlBuilder.build ( ) ; return list ( url , org.ovirt.engine.sdk.entities.Roles.class , org.ovirt.engine.sdk.decorators.Role.class , headers ) ; }
Source:
public void setAsDisplay ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateDisplayToVdsGroup , new org.ovirt.engine.core.common.action.DisplayNetworkToVdsGroupParameters ( getEntity ( ) , network , true ) ) ; }

Target:
public void setAsDisplay ( ) { final org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( org.ovirt.engine.ui.uicommonweb.Cloner.clone ( getSelectedItem ( ) ) ) ) ; network.getCluster ( ) . setDisplay ( true ) ; final org.ovirt.engine.core.common.action.NetworkClusterParameters networkClusterParameters = new org.ovirt.engine.core.common.action.NetworkClusterParameters ( network.getCluster ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateNetworkOnCluster , networkClusterParameters ) ; }
Source:
private void addStateUpdateHandler ( ) { ( ( com.google.gwt.user.client.ui.Widget ) ( this . getContentWidget ( ) ) ) . addHandler ( new org.ovirt.engine.ui.common.widget.editor.EditorStateUpdateEvent.EditorStateUpdateHandler ( ) { @ java.lang.Override public void onEditorStateUpdate ( org.ovirt.engine.ui.common.widget.editor.EditorStateUpdateEvent event ) { if ( event.isValid ( ) ) { editorStateValid = true ; markAsValid ( ) ; } else { handleInvalidState ( ) ; } } } , org.ovirt.engine.ui.common.widget.editor.EditorStateUpdateEvent.getType ( ) ) ; }

Target:
private void addStateUpdateHandler ( ) { ( ( org.ovirt.engine.ui.common.widget.IsWidget ) ( this . getContentWidget ( ) ) ) . asWidget ( ) . addHandler ( new org.ovirt.engine.ui.common.widget.editor.EditorStateUpdateEvent.EditorStateUpdateHandler ( ) { @ java.lang.Override public void onEditorStateUpdate ( org.ovirt.engine.ui.common.widget.editor.EditorStateUpdateEvent event ) { if ( event.isValid ( ) ) { editorStateValid = true ; markAsValid ( ) ; } else { handleInvalidState ( ) ; } } } , org.ovirt.engine.ui.common.widget.editor.EditorStateUpdateEvent.getType ( ) ) ; }
Source:
public static void GetRedirectServletReportsPage ( 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.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }