auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.sdk.decorators.VMDisk update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Disk.class , org.ovirt.engine.sdk.decorators.VMDisk.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.VMDisk update ( java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; if ( correlationId != null ) { headersBuilder.add ( "Correlation-Id" , correlationId ) ; } java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Disk.class , org.ovirt.engine.sdk.decorators.VMDisk.class , headers ) ; }
Source:
private static void reportInvalidInterfacesForNetwork ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces , org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( interfaces.size ( ) ) != 1 ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVdsId ( vds.getId ( ) ) ; logable.AddCustomValue ( "NetworkName" , network.getName ( ) ) ; logable.AddCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( org.ovirt.engine.core.common.businessentities.Entities.objectNames ( interfaces ) , "," ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.BRIDGED_NETWORK_OVER_MULTIPLE_INTERFACES ) ; } }

Target:
private static void reportInvalidInterfacesForNetwork ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces , org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( interfaces.size ( ) ) != 1 ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVdsId ( vds.getId ( ) ) ; logable.addCustomValue ( "NetworkName" , network.getName ( ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( org.ovirt.engine.core.common.businessentities.Entities.objectNames ( interfaces ) , "," ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.BRIDGED_NETWORK_OVER_MULTIPLE_INTERFACES ) ; } }
Source:
public void testUpdateReadOnly ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpDiskVmElementExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.VmDiskOperationParameterBase.class , new java.lang.String [ ] { "VmId" , "DiskVmElement.ReadOnly" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , java.lang.Boolean.TRUE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; assertNotNull ( disk ) ; }

Target:
public void testUpdateReadOnly ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpDiskVmElementExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.VmDiskOperationParameterBase.class , new java.lang.String [ ] { "VmId" , "DiskVmElement.ReadOnly" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , java.lang.Boolean.TRUE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; org.junit.Assert.assertNotNull ( disk ) ; }
Source:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this ) . begin ( ) ; } }

Target:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( this ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) ) . perform ( ) ; } }
Source:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = diskImageDao.getAllSnapshotsForImageGroup ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.getParameters ( ) . getImageGroupID ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.sortImageList ( images ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.getParameters ( ) . setImageIds ( org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getDiskImageIds ( images ) ) ; persistCommand ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.getParameters ( ) . getParentCommand ( ) , ( ( getCallback ( ) ) != null ) ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = diskImageDao.getAllSnapshotsForImageGroup ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.getParameters ( ) . getImageGroupID ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.sortImageList ( images ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.getParameters ( ) . setImageIds ( org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getDiskImageIds ( images ) ) ; prepareWeights ( images ) ; persistCommand ( org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.getParameters ( ) . getParentCommand ( ) , ( ( getCallback ( ) ) != null ) ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyImageGroupVolumesDataCommand.setSucceeded ( true ) ; }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static 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 void testGetAllNetworkFilters ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkFilter > allNetworkFilter = dao.getAllNetworkFilters ( ) ; org.junit.Assert.assertNotNull ( allNetworkFilter ) ; org.junit.Assert.assertEquals ( 2 , allNetworkFilter.size ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkFilter networkFilter = expectedNetworkFilter ( ) ; org.junit.Assert.assertEquals ( networkFilter , allNetworkFilter.get ( 0 ) ) ; }

Target:
public void testGetAllNetworkFilters ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkFilter > allNetworkFilter = dao.getAllNetworkFilters ( ) ; org.junit.Assert.assertNotNull ( allNetworkFilter ) ; org.junit.Assert.assertEquals ( 3 , allNetworkFilter.size ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkFilter networkFilter = expectedNetworkFilter ( ) ; org.junit.Assert.assertEquals ( networkFilter , allNetworkFilter.get ( 0 ) ) ; }
Source:
public java.lang.String getLabelFromHref ( java.lang.String href ) { java.lang.String result = hrefToGroupLabelMap.get ( href ) ; return result == null ? "" : result ; }

Target:
public java.lang.String getLabelFromHref ( java.lang.String href ) { org.gwtbootstrap3.client.ui.ListGroupItem group = hrefToGroupLabelMap.get ( href ) ; java.lang.String result = "" ; if ( group != null ) { result = ( ( org.gwtbootstrap3.client.ui.Anchor ) ( group.getWidget ( 1 ) ) ) . getElement ( ) . getInnerText ( ) . trim ( ) ; } return result ; }
Source:
private static void testFingerprintString ( final java.lang.String keyEncoding , final java.lang.String goodFingerprintString , java.lang.String algo ) throws java.lang.Exception { final java.security.PublicKey key = org.ovirt.engine.core.uutils.ssh.OpenSSHUtilsTest.decodeKey ( keyEncoding ) ; final java.lang.String fingerprintString = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprint ( key , algo ) ; org.junit.Assert.assertEquals ( goodFingerprintString , fingerprintString ) ; org.junit.Assert.assertEquals ( algo , org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprintHash ( fingerprintString ) ) ; }

Target:
private static void testFingerprintString ( final java.lang.String keyEncoding , final java.lang.String goodFingerprintString , java.lang.String algo ) throws java.lang.Exception { final java.security.PublicKey key = org.ovirt.engine.core.uutils.ssh.OpenSSHUtilsTest.decodeKey ( keyEncoding ) ; final java.lang.String fingerprintString = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprint ( key , algo ) ; org.junit.Assert.assertEquals ( goodFingerprintString , fingerprintString ) ; java.lang.StringBuilder actual = new java.lang.StringBuilder ( ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.checkKeyFingerprint ( goodFingerprintString , key , actual ) ) ; org.junit.Assert.assertEquals ( goodFingerprintString , actual.toString ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean isEngineUser = ( ( java.lang.Boolean ) ( loginModel.getIsENGINEUser ( ) . getEntity ( ) ) ) ; if ( isEngineUser != null ) { userRole.setEngineUser ( isEngineUser ) ; performLogin ( loginModel ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.Boolean isEngineUser = loginModel.getIsENGINEUser ( ) . getEntity ( ) ; if ( isEngineUser != null ) { userRole.setEngineUser ( isEngineUser ) ; performLogin ( loginModel ) ; } }
Source:
public java.lang.String getButtonToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return constants.diskHotPlugNotSupported ( ) ; } else { return this . getTitle ( ) ; } }

Target:
public java.lang.String getButtonToolTip ( ) { if ( ( ( ! ( getModel ( ) . isVmDown ( ) ) ) && ( getModel ( ) . isHotPlugAvailable ( ) ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { return org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ; } else { return this . getText ( ) ; } }
Source:
public void onFailureRetryWaitForStatus ( ) { mockVdsSingleAgent ( ) ; mockExecutor ( agent1 , true ) ; org.mockito.Mockito.when ( executor.checkStatus ( ) ) . thenReturn ( createStatus ( "off" ) ) . thenReturn ( createStatus ( "on" ) ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getSucceeded ( ) ) ; }

Target:
public void onFailureRetryWaitForStatus ( ) { mockVdsSingleAgent ( ) ; mockExecutor ( agent1 , true ) ; org.mockito.Mockito.when ( executor.checkHostStatus ( ) ) . thenReturn ( createStatus ( "off" ) ) . thenReturn ( createStatus ( "on" ) ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getSucceeded ( ) ) ; }
Source:
public static org.ovirt.engine.api.model.StorageType map ( org.ovirt.engine.api.model.StorageType storageType , org.ovirt.engine.api.model.StorageType template ) { switch ( storageType ) { case ISCSI : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case FCP : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case NFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case LOCALFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case POSIXFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case GLUSTERFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case GLANCE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.StorageType map ( org.ovirt.engine.api.model.StorageType storageType , org.ovirt.engine.api.model.StorageType template ) { switch ( storageType ) { case ISCSI : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case FCP : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case NFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case LOCALFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case POSIXFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case GLUSTERFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case GLANCE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; case CINDER : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.storage.StorageType ; default : return null ; } }
Source:
public static org.ovirt.engine.api.model.NumaTuneMode map ( org.ovirt.engine.api.model.NumaTuneMode mode , org.ovirt.engine.api.model.NumaTuneMode incoming ) { switch ( mode ) { case STRICT : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NumaTuneMode ; case INTERLEAVE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NumaTuneMode ; case PREFERRED : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NumaTuneMode ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.NumaTuneMode map ( org.ovirt.engine.api.model.NumaTuneMode mode , org.ovirt.engine.api.model.NumaTuneMode incoming ) { if ( mode == null ) { return null ; } switch ( mode ) { case STRICT : return org.ovirt.engine.api.model.NumaTuneMode.STRICT ; case INTERLEAVE : return org.ovirt.engine.api.model.NumaTuneMode.INTERLEAVE ; case PREFERRED : return org.ovirt.engine.api.model.NumaTuneMode.PREFERRED ; default : return null ; } }
Source:
public static void GetHighUtilizationForEvenDistribution ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HighUtilizationForEvenlyDistribute ) , aQuery ) ; }

Target:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.OpenStackSubnet model , int index ) { assertEquals ( org.ovirt.engine.api.restapi.utils.HexUtils.string2hex ( NAMES [ index ] ) , model.getId ( ) ) ; assertEquals ( NAMES [ index ] , model.getName ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.OpenStackSubnet model , int index ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.utils.HexUtils.string2hex ( NAMES [ index ] ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( NAMES [ index ] , model.getName ( ) ) ; verifyLinks ( model ) ; }
Source:
private boolean restoreInitialState ( ) { org.ovirt.engine.core.compat.Guid statelessVmSnapshotId = getVmSnapshotIdForType ( SnapshotType.STATELESS ) ; if ( statelessVmSnapshotId == null ) { return true ; } java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > statelessDiskSnapshots = getDiskSnapshotsForVmSnapshot ( statelessVmSnapshotId ) ; if ( ! ( detachDisksNotPartOfStatelessSnapshot ( statelessDiskSnapshots ) ) ) { return false ; } return runInternalActionWithTasksContext ( VdcActionType.RestoreAllSnapshots , buildRestoreAllSnapshotsParameters ( statelessDiskSnapshots ) , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getLock ( ) ) . getSucceeded ( ) ; }

Target:
private boolean restoreInitialState ( ) { org.ovirt.engine.core.compat.Guid statelessVmSnapshotId = getVmSnapshotIdForType ( SnapshotType.STATELESS ) ; if ( statelessVmSnapshotId == null ) { return true ; } java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > statelessDiskSnapshots = getDiskSnapshotsForVmSnapshot ( statelessVmSnapshotId ) ; if ( ! ( detachDisksNotPartOfStatelessSnapshot ( statelessDiskSnapshots ) ) ) { return false ; } return runInternalActionWithTasksContext ( ActionType.RestoreAllSnapshots , buildRestoreAllSnapshotsParameters ( statelessDiskSnapshots ) , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getLock ( ) ) . getSucceeded ( ) ; }
Source:
protected java.lang.String renderNullSafe ( java.lang.Object object ) { org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel > pair = ( ( org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel > ) ( object ) ) ; java.lang.String key = pair.getKey ( ) ; if ( "custom" . equals ( key ) ) { return ( constants.customHostPopup ( ) ) + ":" ; } org.ovirt.engine.ui.uicommonweb.models.EntityModel value = pair.getValue ( ) ; return ( ( java.lang.String ) ( value.getEntity ( ) ) ) ; }

Target:
protected java.lang.String renderNullSafe ( java.lang.Object object ) { org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel > pair = ( ( org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel > ) ( object ) ) ; java.lang.String key = pair.getKey ( ) ; java.lang.String value = ( ( java.lang.String ) ( pair.getValue ( ) . getEntity ( ) ) ) ; if ( "custom" . equals ( key ) ) { return ( ( constants.customHostPopup ( ) ) + ": " ) + value ; } return value ; }
Source:
public void testSave ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.NetworkCluster > clustersFromDB = dbFacade.getNetworkClusterDao ( ) . getAllForCluster ( cluster ) ; org.ovirt.engine.core.common.businessentities.NetworkCluster clusterFromDB = clustersFromDB.get ( 0 ) ; org.junit.Assert.assertNotNull ( clusterFromDB ) ; new_net.setCluster ( clusterFromDB ) ; new_net.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; dao.save ( new_net ) ; org.ovirt.engine.core.common.businessentities.Network result = dao.getByName ( new_net.getname ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( new_net , result ) ; }

Target:
public void testSave ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkCluster > clustersFromDB = dbFacade.getNetworkClusterDao ( ) . getAllForCluster ( cluster ) ; org.ovirt.engine.core.common.businessentities.network.NetworkCluster clusterFromDB = clustersFromDB.get ( 0 ) ; org.junit.Assert.assertNotNull ( clusterFromDB ) ; new_net.setCluster ( clusterFromDB ) ; new_net.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; dao.save ( new_net ) ; org.ovirt.engine.core.common.businessentities.network.Network result = dao.getByName ( new_net.getname ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( new_net , result ) ; }
Source:
public void afterReadResponse ( ) throws java.lang.Exception { if ( ( ( connection.getResponseCode ( ) ) != ( java.net.HttpURLConnection.HTTP_OK ) ) && ( ( connection.getResponseCode ( ) ) != ( java.net.HttpURLConnection.HTTP_MOVED_TEMP ) ) ) { org.ovirt.engine.core.bll.host.provider.foreman.ForemanErrorWrapper ferr = objectMapper.readValue ( response , org.ovirt.engine.core.bll.host.provider.foreman.ForemanErrorWrapper.class ) ; java.lang.String err = org.apache.commons.lang.StringUtils.join ( ferr.getForemanError ( ) . getFull_messages ( ) , ", " ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , err ) ; } }

Target:
protected void afterReadResponse ( java.net.HttpURLConnection connection , byte [ ] response ) throws java.lang.Exception { if ( ( ( connection.getResponseCode ( ) ) != ( java.net.HttpURLConnection.HTTP_OK ) ) && ( ( connection.getResponseCode ( ) ) != ( java.net.HttpURLConnection.HTTP_MOVED_TEMP ) ) ) { org.ovirt.engine.core.bll.host.provider.foreman.ForemanErrorWrapper ferr = objectMapper.readValue ( response , org.ovirt.engine.core.bll.host.provider.foreman.ForemanErrorWrapper.class ) ; java.lang.String err = org.apache.commons.lang.StringUtils.join ( ferr.getForemanError ( ) . getFull_messages ( ) , ", " ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , err ) ; } }
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.HostSetupNetworksValidatorTest.ParametersBuilder addLabels ( org.ovirt.engine.core.common.businessentities.network.NicLabel ... nicLabels ) { if ( nullParameters ( nicLabels ) ) { return this ; } if ( ( parameters.getLabels ( ) ) == null ) { parameters.setLabels ( new java.util.HashSet < org.ovirt.engine.core.common.businessentities.network.NicLabel > ( ) ) ; } parameters.getLabels ( ) . addAll ( java.util.Arrays.asList ( nicLabels ) ) ; return this ; }
Source:
private static org.ovirt.engine.core.common.businessentities.OvfEntityData createOvfEntityData ( org.ovirt.engine.core.compat.Guid storageDomainId , java.lang.String ovfData , org.ovirt.engine.core.common.businessentities.VmEntityType vmEntityType , java.lang.String entityName , org.ovirt.engine.core.compat.Guid entityId ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntityData = new org.ovirt.engine.core.common.businessentities.OvfEntityData ( ) ; ovfEntityData.setOvfData ( ovfData ) ; ovfEntityData.setEntityType ( vmEntityType ) ; ovfEntityData.setEntityName ( entityName ) ; ovfEntityData.setStorageDomainId ( storageDomainId ) ; ovfEntityData.setEntityId ( entityId ) ; return ovfEntityData ; }

Target:
private static org.ovirt.engine.core.common.businessentities.OvfEntityData createOvfEntityData ( org.ovirt.engine.core.compat.Guid storageDomainId , java.lang.String ovfData , org.ovirt.engine.core.common.businessentities.VmEntityType vmEntityType , java.lang.String entityName , org.ovirt.engine.core.common.businessentities.ArchitectureType archType , org.ovirt.engine.core.compat.Guid entityId ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntityData = new org.ovirt.engine.core.common.businessentities.OvfEntityData ( ) ; ovfEntityData.setOvfData ( ovfData ) ; ovfEntityData.setEntityType ( vmEntityType ) ; ovfEntityData.setEntityName ( entityName ) ; ovfEntityData.setStorageDomainId ( storageDomainId ) ; ovfEntityData.setArchitecture ( archType ) ; ovfEntityData.setEntityId ( entityId ) ; return ovfEntityData ; }
Source:
private void closeClone ( ) { setConfirmWindow ( null ) ; clearCachedAssignedVmNames ( ) ; }

Target:
public void onRestore ( ) { importModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmFromExportDomainModel ) ( getWindow ( ) ) ) ; if ( ( importModel.getProgress ( ) ) != null ) { return ; } if ( ! ( importModel.validate ( ) ) ) { return ; } executeImport ( ) ; }
Source:
public java.lang.Void runInTransaction ( ) { addVmStatic ( ) ; addVmDynamic ( ) ; addVmNetwork ( ) ; addVmStatistics ( ) ; addActiveSnapshot ( ) ; addVmPermission ( ) ; addVmInit ( ) ; addVmRngDevice ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { addVmStatic ( ) ; addVmDynamic ( ) ; addVmNetwork ( ) ; addVmNumaNodes ( ) ; addVmStatistics ( ) ; addActiveSnapshot ( ) ; addVmPermission ( ) ; addVmInit ( ) ; addVmRngDevice ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public static void GetDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public static void IsDirectLunDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }
Source:
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 ) ; }

Target:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
private static void putMajorVersion ( java.util.Map < java.lang.String , java.util.Set < java.lang.Integer > > majorVersions , org.ovirt.engine.core.bll.scheduling.OS hostOs ) { if ( ! ( majorVersions.containsKey ( hostOs.getName ( ) ) ) ) { majorVersions.put ( hostOs.getName ( ) , new java.util.HashSet < java.lang.Integer > ( ) ) ; } majorVersions.get ( hostOs.getName ( ) ) . add ( hostOs.getVersion ( ) . getMajor ( ) ) ; }

Target:
private static void putMajorVersion ( java.util.Map < java.lang.String , java.util.Set < java.lang.Integer > > majorVersions , org.ovirt.engine.core.bll.scheduling.OS hostOs ) { if ( ! ( majorVersions.containsKey ( hostOs.getOsFamily ( ) ) ) ) { majorVersions.put ( hostOs.getOsFamily ( ) , new java.util.HashSet < java.lang.Integer > ( ) ) ; } majorVersions.get ( hostOs.getOsFamily ( ) ) . add ( hostOs.getVersion ( ) . getMajor ( ) ) ; }
Source:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node ) { if ( node == null ) { return ; } if ( ( node.getChildCount ( ) ) > 0 ) { for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { expandTree ( node.setChildOpen ( i , true ) ) ; } } }

Target:
public < T > org.ovirt.engine.ui.webadmin.uicommon.model.NodeInfo < ? > getNodeInfo ( T parent ) { if ( parent != null ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel parentModel = ( ( org.ovirt.engine.ui.uicommonweb.models.tags.TagModel ) ( parent ) ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > children = parentModel.getChildren ( ) ; return new org.ovirt.engine.ui.webadmin.uicommon.model.DefaultNodeInfo < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( new com.google.gwt.view.client.ListDataProvider < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( children ) , cell , selectionModel , selectionManager , null ) ; } else { return new org.ovirt.engine.ui.webadmin.uicommon.model.DefaultNodeInfo < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( getDataProvider ( ) , cell , selectionModel , selectionManager , null ) ; } }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.historyetl_3_2.HistoryETL.row2Struct.commonByteArrayLock ) { try { int length = 0 ; this . time = readDate ( dis ) ; this . message = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.historyetl_3_2.HistoryETL.row2Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_HistoryETL ) { try { int length = 0 ; this . time = readDate ( dis ) ; this . message = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
public void before ( ) { org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.injectorRule.bind ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class , org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class ) ) ; org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.injectorRule.bind ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.class , org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.class ) ) ; glusterManager = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.gluster.GlusterSyncJob.getInstance ( ) ) ; }

Target:
public void before ( ) { injectorRule.bind ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class , org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class ) ) ; injectorRule.bind ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.class , org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.class ) ) ; glusterManager = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.gluster.GlusterSyncJob.getInstance ( ) ) ; }
Source:
public static void pauseUploads ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { org.ovirt.engine.core.common.businessentities.storage.ImageTransferUpdates updates = new org.ovirt.engine.core.common.businessentities.storage.ImageTransferUpdates ( ) ; updates.setPhase ( ImageTransferPhase.PAUSED_USER ) ; org.ovirt.engine.core.common.action.UploadImageStatusParameters parameters = new org.ovirt.engine.core.common.action.UploadImageStatusParameters ( ) ; parameters.setUpdates ( updates ) ; parameters.setDiskId ( image.getId ( ) ) ; list.add ( parameters ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UploadImageStatus , list ) ; }

Target:
public static void pauseUploads ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { org.ovirt.engine.core.common.businessentities.storage.ImageTransfer updates = new org.ovirt.engine.core.common.businessentities.storage.ImageTransfer ( ) ; updates.setPhase ( ImageTransferPhase.PAUSED_USER ) ; org.ovirt.engine.core.common.action.UploadImageStatusParameters parameters = new org.ovirt.engine.core.common.action.UploadImageStatusParameters ( ) ; parameters.setUpdates ( updates ) ; parameters.setDiskId ( image.getId ( ) ) ; list.add ( parameters ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UploadImageStatus , list ) ; }
Source:
public void onFailureAlertShown ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; org.junit.Assert.fail ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException ex ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 3 ) ) . log ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; } }

Target:
public void onFailureAlertShown ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; org.junit.jupiter.api.Assertions.fail ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException ex ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 3 ) ) . log ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { return org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . masterDomainNotOperational ( masterDomainId , getParameters ( ) . getStoragePoolId ( ) , true ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult call ( ) { return org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . masterDomainNotOperational ( masterDomainId , getParameters ( ) . getStoragePoolId ( ) , true , ( ( ( getVDSReturnValue ( ) . getVdsError ( ) ) != null ) && ( ( getVDSReturnValue ( ) . getVdsError ( ) . getCode ( ) ) == ( org.ovirt.engine.core.common.errors.VdcBllErrors.StoragePoolWrongMaster ) ) ) ) ; }
Source:
protected void initVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDAO ( ) ; org.mockito.Mockito.when ( vmDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vm ) ; mockGetVmsListForDisk ( ) ; }

Target:
protected void initVmForFail ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDAO ( ) ; org.mockito.Mockito.when ( vmDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vm ) ; mockGetVmsListForDisk ( ) ; }
Source:
private void applyNetworkChangesToHosts ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand < T > . SyncNetworkParametersBuilder builder = new SyncNetworkParametersBuilder ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.NetworkParametersBuilder.updateParametersSequencing ( parameters ) ; org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getBackend ( ) . runInternalMultipleActions ( VdcActionType.PersistentSetupNetworks , parameters ) ; } }

Target:
private void applyNetworkChangesToHosts ( ) { org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand < T > . SyncNetworkParametersBuilder builder = new SyncNetworkParametersBuilder ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getContext ( ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = builder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.NetworkParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentSetupNetworks , parameters ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getPermissionDao ( ) . getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getAdGroupDao ( ) . remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getAdGroupDao ( ) . remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }
Source:
public void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
static org.ovirt.engine.api.model.Event getModel ( int index ) { org.ovirt.engine.api.restapi.resource.Event model = new org.ovirt.engine.api.restapi.resource.Event ( ) ; model.setId ( java.lang.String.valueOf ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.LOG_IDS [ index ] ) ) ; model.setSeverity ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.SEVERITIES [ index ] . name ( ) ) ; model.setDescription ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.MESSAGES [ index ] ) ; model.setOrigin ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.ORIGIN_NAMES [ index ] ) ; model.setCustomId ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.CUSTOMER_EVENT_IDS [ index ] ) ; return model ; }

Target:
static org.ovirt.engine.api.model.Event getModel ( int index ) { org.ovirt.engine.api.model.Event model = new org.ovirt.engine.api.model.Event ( ) ; model.setId ( java.lang.String.valueOf ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.LOG_IDS [ index ] ) ) ; model.setSeverity ( LogSeverity.ALERT.value ( ) ) ; model.setDescription ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.MESSAGES [ index ] ) ; model.setOrigin ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.ORIGIN_NAMES [ index ] ) ; model.setCustomId ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.CUSTOMER_EVENT_IDS [ index ] ) ; model.setFloodRate ( 30 ) ; return model ; }
Source:
public static java.util.List < org.ovirt.engine.api.model.PowerManagement > parse ( java.lang.String str , java.lang.String typeStr , boolean ignoreValues ) { java.util.List < org.ovirt.engine.api.model.PowerManagement > ret = new java.util.ArrayList < org.ovirt.engine.api.model.PowerManagement > ( ) ; java.util.Map < java.lang.String , java.lang.String > types = org.ovirt.engine.api.restapi.util.FencingOptionsParser.parseTypes ( typeStr ) ; for ( java.lang.String agent : str.split ( ";" , ( - 1 ) ) ) { if ( ! ( agent.isEmpty ( ) ) ) { ret.add ( org.ovirt.engine.api.restapi.util.FencingOptionsParser.parseAgent ( agent , types , ignoreValues ) ) ; } } return ret ; }

Target:
public static java.util.List < org.ovirt.engine.api.model.PowerManagement > parse ( java.lang.String str , java.lang.String typeStr , boolean ignoreValues ) { java.util.List < org.ovirt.engine.api.model.PowerManagement > ret = new java.util.ArrayList < org.ovirt.engine.api.model.PowerManagement > ( ) ; java.util.Map < java.lang.String , java.lang.String > types = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parseTypes ( typeStr ) ; for ( java.lang.String agent : str.split ( ";" , ( - 1 ) ) ) { if ( ! ( agent.isEmpty ( ) ) ) { ret.add ( org.ovirt.engine.api.restapi.util.FenceOptionsParser.parseAgent ( agent , types , ignoreValues ) ) ; } } return ret ; }