auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , 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 , org.ovirt.engine.core.common.businessentities.StorageType storageType , 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public org.ovirt.engine.sdk.entities.Response delete ( java.lang.Boolean async ) 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 ) . add ( "async" , async , UrlParameterType.MATRIX ) . build ( ) ; return getProxy ( ) . delete ( url , org.ovirt.engine.sdk.entities.Response.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.entities.Response delete ( java.lang.Boolean async ) 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 ( ) ; 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 ) ; if ( async != null ) { urlBuilder.add ( "async" , async , UrlParameterType.MATRIX ) ; } url = urlBuilder.build ( ) ; return getProxy ( ) . delete ( url , org.ovirt.engine.sdk.entities.Response.class , headers ) ; }
Source:
public void hostNNotUsed ( ) { org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void hostNNotUsed ( ) { org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void InitVdsBroker ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "vdsBroker({0},{1})" , _vds.gethost_name ( ) , _vds.getport ( ) ) ; int clientTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.vdsTimeout ) ) * 1000 ; org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector , org.apache.commons.httpclient.HttpClient > returnValue = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.getConnection ( _vds.gethost_name ( ) , _vds.getport ( ) , clientTimeOut , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector.class , org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.UseSecureConnectionWithServers ) ) ; _vdsProxy = new org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ( returnValue.getFirst ( ) , returnValue.getSecond ( ) ) ; }

Target:
private void InitVdsBroker ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Initialize vdsBroker ({0},{1})" , _vds.getHostName ( ) , _vds.getPort ( ) ) ; int clientTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.vdsTimeout ) ) * 1000 ; org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector , org.apache.commons.httpclient.HttpClient > returnValue = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.getConnection ( _vds.getHostName ( ) , _vds.getPort ( ) , clientTimeOut , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector.class , org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.UseSecureConnectionWithServers ) ) ; _vdsProxy = new org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ( returnValue.getFirst ( ) , returnValue.getSecond ( ) ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVds , org.ovirt.engine.core.common.action.VdsActionParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVds , org.ovirt.engine.core.common.action.RemoveVdsParameters.class , new java.lang.String [ ] { "VdsId" , "ForceAction" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) , new org.ovirt.engine.api.model.Action ( ) { { } } ) ) ; }
Source:
protected boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.bll.validator.StorageDomainValidator sdValidator = createStorageDomainValidator ( ) ; return ( ( validate ( sdValidator.isDomainExistAndActive ( ) ) ) && ( validate ( sdValidator.isDomainWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.hasSpaceForClonedDisk ( diskImage ) ) ) ; }

Target:
protected boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator sdValidator = createStorageDomainValidator ( ) ; return ( ( validate ( sdValidator.isDomainExistAndActive ( ) ) ) && ( validate ( sdValidator.isDomainWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.hasSpaceForClonedDisk ( diskImage ) ) ) ; }
Source:
private void assertValidationWorks ( int nameLength , int numOfVms , boolean expected ) { org.ovirt.engine.ui.uicommonweb.validation.PoolNameLengthValidation validation = new org.ovirt.engine.ui.uicommonweb.validation.PoolNameLengthValidation ( nameOfLength ( nameLength ) , numOfVms , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2003 ) ; org.junit.Assert.assertThat ( validation.validate ( null ) . getSuccess ( ) , org.hamcrest.core.Is.is ( org.hamcrest.core.IsEqual.equalTo ( expected ) ) ) ; }

Target:
private void assertValidationWorks ( int nameLength , int numOfVms , boolean expected ) { org.ovirt.engine.ui.uicommonweb.validation.PoolNameLengthValidation object = new org.ovirt.engine.ui.uicommonweb.validation.PoolNameLengthValidation ( nameOfLength ( nameLength ) , numOfVms , 3 ) ; org.ovirt.engine.ui.uicommonweb.validation.PoolNameLengthValidation spy = org.mockito.Mockito.spy ( object ) ; org.mockito.Mockito.doReturn ( true ) . when ( spy ) . isWindows ( ) ; org.junit.Assert.assertThat ( spy.validate ( null ) . getSuccess ( ) , org.hamcrest.core.Is.is ( org.hamcrest.core.IsEqual.equalTo ( expected ) ) ) ; }
Source:
public static void removeDiskImage ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage , org.ovirt.engine.core.compat.Guid vmId ) { try { org.ovirt.engine.core.bll.ImagesHandler.removeDiskFromVm ( vmId , diskImage.getId ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.removeImage ( diskImage ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }

Target:
public static void removeDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.core.compat.Guid vmId ) { try { org.ovirt.engine.core.bll.ImagesHandler.removeDiskFromVm ( vmId , diskImage.getId ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.removeImage ( diskImage ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }
Source:
protected boolean validateStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList = getSnapshotsDummiesForStorageAllocations ( ) ; org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator storageDomainsValidator = getStorageDomainsValidator ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getStoragePoolId ( ) , getStorageDomainsIds ( ) ) ; return ( ( validate ( storageDomainsValidator.allDomainsExistAndActive ( ) ) ) && ( validate ( storageDomainsValidator.allDomainsWithinThresholds ( ) ) ) ) && ( validate ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( disksList ) ) ) ; }

Target:
protected boolean validateStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList = getDisksListForStorageAllocations ( ) ; org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator storageDomainsValidator = getStorageDomainsValidator ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getStoragePoolId ( ) , getStorageDomainsIds ( ) ) ; return ( ( validate ( storageDomainsValidator.allDomainsExistAndActive ( ) ) ) && ( validate ( storageDomainsValidator.allDomainsWithinThresholds ( ) ) ) ) && ( validate ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( disksList ) ) ) ; }
Source:
public void isConnWithSameDetailsExistCheckSameConn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; connections.add ( newISCSIConnection ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistCheckSameConn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; connections.add ( newISCSIConnection ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }
Source:
public java.lang.String getAdUserName ( ) { if ( ( adUserName ) == null ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.bll.VmPoolUserCommandBase.getDbUserDao ( ) . get ( getAdUserId ( ) ) ; if ( user != null ) { adUserName = user.getLoginName ( ) ; } } return adUserName ; }

Target:
public java.lang.String getAdUserName ( ) { if ( ( adUserName ) == null ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = dbUserDao.get ( getAdUserId ( ) ) ; if ( user != null ) { adUserName = user.getLoginName ( ) ; } } return adUserName ; }
Source:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.Cluster > aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByAdElementIdParameters ( userId ) , aQuery ) ; }
Source:
private void generateReader ( org.ovirt.api.metamodel.concepts.StructType type ) { javaBuffer = new org.ovirt.api.metamodel.tool.JavaClassBuffer ( ) ; org.ovirt.api.metamodel.tool.JavaClassName readerName = javaTypes.getJsonReaderName ( type ) ; javaBuffer.setClassName ( readerName ) ; generateReaderSource ( type ) ; try { javaBuffer.write ( outDir ) ; } catch ( java.io.IOException exception ) { throw new java.lang.RuntimeException ( ( ( "Can\'t write file for JSON reader \"" + readerName ) + "\"" ) , exception ) ; } }

Target:
private void generateEnumSupportClasses ( org.ovirt.api.metamodel.concepts.EnumType type ) { generateEnumReader ( type ) ; generateEnumWriter ( type ) ; }
Source:
public void rerun ( ) { 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 . rerun ( ) ; } else { decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; } }

Target:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailureForAuditLog ( ) ; 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 . rerun ( ) ; } 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 GetClusterNetworkList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getRoleList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "IsAvailable" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; if ( entity.getIsAvailable ( ) ) { latch.setVisible ( true ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "IsAvailable" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; if ( entity.getIsAvailable ( ) ) { latch.setVisible ( true ) ; } } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getStorageConnectionsList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc glusterVolumeEmptyCheck ( java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeEmptyCheck ( volumeName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.BooleanReturnForXmlRpc ( xmlRpcReturnValue , "volumeEmptyCheck" ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public boolean isStartupTimeoutPassed ( java.util.List < java.lang.String > messages ) { java.util.Date waitTo = getBackend ( ) . getStartedAt ( ) . addSeconds ( ( ( java.lang.Integer ) ( org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DisableFenceAtStartupInSec ) ) ) ) ; java.util.Date now = new java.util.Date ( ) ; if ( ! ( ( waitTo.before ( now ) ) || ( waitTo.equals ( now ) ) ) ) { messages.add ( VdcBllMessages.VDS_FENCE_DISABLED_AT_SYSTEM_STARTUP_INTERVAL.name ( ) ) ; return false ; } else { return true ; } }

Target:
public boolean isStartupTimeoutPassed ( java.util.List < java.lang.String > messages ) { java.util.Date waitTo = getBackend ( ) . getStartedAt ( ) . addSeconds ( ( ( java.lang.Integer ) ( org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DisableFenceAtStartupInSec ) ) ) ) ; java.util.Date now = new java.util.Date ( ) ; if ( ! ( ( waitTo.before ( now ) ) || ( waitTo.equals ( now ) ) ) ) { messages.add ( EngineMessage.VDS_FENCE_DISABLED_AT_SYSTEM_STARTUP_INTERVAL.name ( ) ) ; return false ; } else { return true ; } }
Source:
public void execute ( ) { if ( getEnclosingCommand ( ) . getParameters ( ) . getTaskGroupSuccess ( ) ) { getReturnValue ( ) . setSucceeded ( false ) ; beforeTask ( ) ; org.ovirt.engine.core.compat.Guid taskId = getEnclosingCommand ( ) . persistAsyncTaskPlaceHolder ( ) ; addTask ( taskId , org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( getVDSCommandType ( ) , getVDSParameters ( ) ) , false ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( getEnclosingCommand ( ) . getExecutionContext ( ) , true ) ; getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void execute ( ) { if ( getEnclosingCommand ( ) . getParameters ( ) . getTaskGroupSuccess ( ) ) { getReturnValue ( ) . setSucceeded ( false ) ; beforeTask ( ) ; org.ovirt.engine.core.compat.Guid taskId = getEnclosingCommand ( ) . persistAsyncTaskPlaceHolder ( ) ; addTask ( taskId , runVdsCommand ( getVDSCommandType ( ) , getVDSParameters ( ) ) , false ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( getEnclosingCommand ( ) . getExecutionContext ( ) , true ) ; getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public void validateFails ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.StartGlusterVolumeCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters ( startedVolumeId , false ) , null ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void prepareMocks ( ) { org.mockito.Mockito.doReturn ( volumeDao ) . when ( cmd ) . getGlusterVolumeDao ( ) ; org.mockito.Mockito.doReturn ( getVds ( VDSStatus.Up ) ) . when ( cmd ) . getUpServer ( ) ; org.mockito.Mockito.doReturn ( getGlusterVolume ( stoppedVolumeId ) ) . when ( volumeDao ) . getById ( stoppedVolumeId ) ; org.mockito.Mockito.doReturn ( getGlusterVolume ( startedVolumeId ) ) . when ( volumeDao ) . getById ( startedVolumeId ) ; }
Source:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; isRefreshed = refreshIsoDomain ( repoImage.getRepoDomainId ( ) , problematicRepoFileList , repoImage.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.infoFormat ( "Finished automatic refresh process for {0} file type with {1}, for storage domain id {2}." , repoImage.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoImage.getRepoDomainId ( ) ) ; } }

Target:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; isRefreshed = refreshIsoDomain ( repoImage.getRepoDomainId ( ) , problematicRepoFileList , repoImage.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.info ( "Finished automatic refresh process for '{}' file type with {}, for storage domain id '{}'." , repoImage.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoImage.getRepoDomainId ( ) ) ; } }
Source:
protected boolean canDoAction ( ) { return org.ovirt.engine.core.bll.RemoveVmPoolCommand.canRemoveVmPool ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getParameters ( ) . getVmPoolId ( ) , org.ovirt.engine.core.bll.RemoveVmPoolCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM_POOL , getVmPoolIsBeingRemovedMessage ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : getCachedVmsInPool ( ) ) { addVmLocks ( vm , locks ) ; } return locks ; }
Source:
public void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
public void testSetStatusForNonRequiredNetworkUpdated ( ) { networkCluster.setRequired ( false ) ; networkCluster.setStatus ( NetworkStatus.NON_OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.hamcrest.MatcherAssert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
Source:
protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getsize ( ) : ( ( long ) ( ( ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( object ) ) . getLun ( ) . getDeviceSize ( ) ) * ( java.lang.Math.pow ( 1024 , 3 ) ) ) ) ; }

Target:
public void initTable ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { this . constants = constants ; initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; org.ovirt.engine.ui.common.widget.uicommon.vm.BaseVmDiskListModelTable.getModel ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { disksViewRadioGroup.setDiskStorageType ( ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType ) ( getModel ( ) . getDiskViewType ( ) . getEntity ( ) ) ) ) ; } } ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.dataCenterPopupNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.dataCenterPopupDescriptionLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.dataCenterPopupStorageTypeLabel ( ) ) ; versionEditor.setLabel ( constants.dataCenterPopupVersionLabel ( ) ) ; quotaEnforceTypeEditor.setLabel ( constants.dataCenterPopupQuotaEnforceTypeLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.dataCenterPopupStorageTypeLabel ( ) ) ; versionEditor.setLabel ( constants.dataCenterPopupVersionLabel ( ) ) ; quotaEnforceTypeEditor.setLabel ( constants.dataCenterPopupQuotaEnforceTypeLabel ( ) ) ; }
Source:
private void addMigratedVmsNotUpYet ( ) { for ( org.ovirt.engine.core.common.businessentities.VM incomingVm : org.ovirt.engine.core.bll.VdsNotRespondingTreatmentCommand.getVmDAO ( ) . getAllMigratingToHost ( org.ovirt.engine.core.bll.VdsNotRespondingTreatmentCommand.getVdsId ( ) ) ) { if ( ( incomingVm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) { org.ovirt.engine.core.bll.VdsNotRespondingTreatmentCommand.getVmList ( ) . add ( incomingVm ) ; } } }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS a ) { return ( ( a.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Connecting ) ) || ( ( a.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ; }
Source:
protected boolean validateImagesAndVMStates ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , hasImages ( ) , hasImages ( ) , hasImages ( ) , hasImages ( ) , true , true , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ) ; }

Target:
protected boolean validateImages ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , false , true , true , true , true , true , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ) ; }
Source:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource createQuotaMetaDataParameterMapper ( org.ovirt.engine.core.common.businessentities.Quota quota ) { return createQuotaIdParameterMapper ( quota.getId ( ) ) . addValue ( "storage_pool_id" , quota.getStoragePoolId ( ) ) . addValue ( "quota_name" , quota.getQuotaName ( ) ) . addValue ( "description" , quota.getDescription ( ) ) . addValue ( "threshold_vds_group_percentage" , quota.getThresholdVdsGroupPercentage ( ) ) . addValue ( "threshold_storage_percentage" , quota.getThresholdStoragePercentage ( ) ) . addValue ( "grace_vds_group_percentage" , quota.getGraceVdsGroupPercentage ( ) ) . addValue ( "grace_storage_percentage" , quota.getGraceStoragePercentage ( ) ) ; }

Target:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource createQuotaMetaDataParameterMapper ( org.ovirt.engine.core.common.businessentities.Quota quota ) { return createQuotaIdParameterMapper ( quota.getId ( ) ) . addValue ( "storage_pool_id" , quota.getStoragePoolId ( ) ) . addValue ( "quota_name" , quota.getQuotaName ( ) ) . addValue ( "description" , quota.getDescription ( ) ) . addValue ( "threshold_cluster_percentage" , quota.getThresholdClusterPercentage ( ) ) . addValue ( "threshold_storage_percentage" , quota.getThresholdStoragePercentage ( ) ) . addValue ( "grace_cluster_percentage" , quota.getGraceClusterPercentage ( ) ) . addValue ( "grace_storage_percentage" , quota.getGraceStoragePercentage ( ) ) ; }
Source:
protected void ExecuteVmCommand ( ) { if ( ! ( CanRemoveVm ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ) { return ; } if ( ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) || ( ! ( org.ovirt.engine.core.bll.RemoveVmCommand.getParameters ( ) . getForce ( ) ) ) ) { org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , org.ovirt.engine.core.bll.RemoveVmCommand.getCompensationContext ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( removeVm ( ) ) ; }

Target:
protected void ExecuteVmCommand ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.LockVm ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDynamicData ( ) , org.ovirt.engine.core.bll.RemoveVmCommand.getCompensationContext ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( removeVm ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > setUpPermissionsWithAdElementId ( org.ovirt.engine.core.compat.Guid adElementId ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.Permissions entity = getEntity ( i ) ; entity.setAdElementId ( adElementId ) ; perms.add ( entity ) ; } return perms ; }

Target:
protected java.util.List < org.ovirt.engine.api.model.Permission > setUpPermissionsWithAdElementId ( org.ovirt.engine.core.compat.Guid adElementId ) { java.util.List < org.ovirt.engine.api.model.Permission > perms = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.api.model.Permission entity = getEntity ( i ) ; entity.setAdElementId ( adElementId ) ; perms.add ( entity ) ; } return perms ; }
Source:
public java.lang.String getNickName ( ) { return getNic ( ) . getName ( ) ; }

Target:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.PersistentSetupNetworks , new org.ovirt.engine.core.bll.network.RemoveNetworksByLabelParametersBuilder ( org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.getContext ( ) ) . buildParameters ( getNic ( ) , getLabel ( ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.getVds ( ) . getVdsGroupId ( ) ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
private static boolean noValidOperationForFirstOperand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 ) { if ( op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel network = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( op1 ) ) ; if ( ( network.getEntity ( ) . isExternal ( ) ) || ( network.isAttachedViaLabel ( ) ) ) { return true ; } } if ( op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel ) { return true ; } return false ; }

Target:
private static boolean noValidOperationForFirstOperand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 ) { if ( op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel network = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( op1 ) ) ; if ( ( network.getNetwork ( ) . isExternal ( ) ) || ( network.isAttachedViaLabel ( ) ) ) { return true ; } } return false ; }
Source:
public void getEligibleVolumes ( ) { this . startProgress ( constants.fetchingDataMessage ( ) ) ; org.ovirt.engine.ui.frontend.AsyncQuery aQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { showAvailableVolumes ( returnValue ) ; } } ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterGeoReplicationEligibleVolumes , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolume.getId ( ) ) , aQuery ) ; }

Target:
public void getEligibleVolumes ( ) { this . startProgress ( constants.fetchingDataMessage ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.gluster.AsyncQuery aQuery = new org.ovirt.engine.ui.uicommonweb.models.gluster.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object returnValue ) { showAvailableVolumes ( returnValue ) ; } } ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterGeoReplicationEligibleVolumes , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolume.getId ( ) ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; cancelConfirm ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( cluster != null ) { maintenance ( ( ( cluster.supportsGlusterService ( ) ) && ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterFeaturesUtil.isStopGlusterProcessesSupported ( cluster.getcompatibility_version ( ) ) ) ) ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.Network net ) { return createVdsInterface ( ( ( ( iface.getName ( ) ) + "." ) + ( net.getVlanId ( ) ) ) , false , null , null , NetworkBootProtocol.NONE , net.getName ( ) , iface.getName ( ) , net.getVlanId ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; networkAttachment.setNicId ( iface.getId ( ) ) ; networkAttachment.setNicName ( iface.getName ( ) ) ; networkAttachment.setHostNetworkQos ( qos ) ; return networkAttachment ; }
Source:
protected void initHosts ( ) { startProgress ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostListByClusterId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getPinnedHost ( ) . setItems ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VDS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; stopProgress ( ) ; selectCurrentPinnedHost ( ) ; } } ) , vm.getClusterId ( ) ) ; }

Target:
protected void initHosts ( ) { startProgress ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostListByClusterId ( new org.ovirt.engine.ui.uicommonweb.models.vms.hostdev.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > ( ) { @ java.lang.Override public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { getPinnedHost ( ) . setItems ( hosts ) ; stopProgress ( ) ; selectCurrentPinnedHost ( ) ; } } ) , vm.getClusterId ( ) ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > queryDirectoryGroups ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > directoryGroups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipalRecords ( extension , namespace , filter , groupsResolving , groupsResolvingRecursive ) ) { directoryGroups.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecord ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , group ) ) ; } return directoryGroups ; }

Target:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > mapGroupRecordsToDirectoryGroups ( final java.lang.String authzName , final java.util.List < org.ovirt.engine.api.extensions.ExtMap > groups ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : groups ) { results.add ( org.ovirt.engine.core.aaa.DirectoryUtils.mapGroupRecordToDirectoryGroup ( authzName , group ) ) ; } return results ; }
Source:
public static void GetProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getDataCenterByClusterServiceList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , boolean supportsVirtService , boolean supportsGlusterService ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SortListByNameConverter < > ( ) ; final org.ovirt.engine.core.common.queries.GetStoragePoolsByClusterServiceParameters parameters = new org.ovirt.engine.core.common.queries.GetStoragePoolsByClusterServiceParameters ( ) ; parameters.setSupportsVirtService ( supportsVirtService ) ; parameters.setSupportsGlusterService ( supportsGlusterService ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByClusterService , parameters , aQuery ) ; }
Source:
public static void GetAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }