auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.event_subscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , org.ovirt.engine.core.common.EventNotificationMethod eventNotificationMethod ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getsubscriber_id ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getevent_up_name ( ) , eventName ) ) ) && ( ( eventSubscriber.getevent_notification_method ( ) ) == eventNotificationMethod ) ) { retval = true ; break ; } } return retval ; }

Target:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.EventSubscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , org.ovirt.engine.core.common.EventNotificationMethod eventNotificationMethod ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.EventSubscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getSubscriberId ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getEventUpName ( ) , eventName ) ) ) && ( ( eventSubscriber.getEventNotificationMethod ( ) ) == eventNotificationMethod ) ) { retval = true ; break ; } } return retval ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc moveMultipleImages ( java.lang.String spUUID , java.lang.String srcDomUUID , java.lang.String dstDomUUID , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct imgDict , java.lang.String vmGUID ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = irsServer.moveMultipleImages ( spUUID , srcDomUUID , dstDomUUID , imgDict.getInnerMap ( ) , vmGUID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc upgradeStoragePool ( java.lang.String storagePoolId , java.lang.String targetVersion ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = irsServer.upgradeStoragePool ( storagePoolId , targetVersion ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; }
Source:
public static < IN , OUT > java.util.List < OUT > foreach ( java.util.Collection < IN > collection , org.ovirt.engine.core.utils.linq.Function < IN , OUT > f ) { java.util.LinkedList < OUT > list = new java.util.LinkedList < OUT > ( ) ; for ( IN in : collection ) { list.add ( f.eval ( in ) ) ; } return list ; }

Target:
public static < IN , OUT > java.util.List < OUT > transformToList ( final java.util.Collection < IN > collection , final org.ovirt.engine.core.utils.linq.Function < IN , OUT > f ) { java.util.LinkedList < OUT > list = new java.util.LinkedList < OUT > ( ) ; for ( IN in : collection ) { list.add ( f.eval ( in ) ) ; } return list ; }
Source:
public void testUpdate ( ) { java.lang.String oldName = existingCluster.getName ( ) ; existingCluster.setName ( "This is the new name" ) ; existingCluster.setVirtService ( false ) ; existingCluster.setGlusterService ( true ) ; dao.update ( existingCluster ) ; org.ovirt.engine.core.common.businessentities.Cluster result = dao.get ( existingCluster.getId ( ) ) ; assertCorrectCluster ( result ) ; result = dao.getByName ( oldName ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testUpdate ( ) { java.lang.String oldName = existingCluster.getName ( ) ; existingCluster.setName ( "This is the new name" ) ; existingCluster.setVirtService ( false ) ; existingCluster.setGlusterService ( true ) ; existingCluster.setMigrationBandwidthLimitType ( MigrationBandwidthLimitType.CUSTOM ) ; existingCluster.setCustomMigrationNetworkBandwidth ( 20 ) ; dao.update ( existingCluster ) ; org.ovirt.engine.core.common.businessentities.Cluster result = dao.get ( existingCluster.getId ( ) ) ; assertCorrectCluster ( result ) ; result = dao.getByName ( oldName ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warn ( "Could not perform live snapshot due to error, VM will still be configured to the new created snapshot: {}" , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; updateCallStackFromThrowable ( e ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }

Target:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warn ( ( "Could not perform live snapshot due to error, VM will still be configured to the new created" + " snapshot: {}" ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; updateCallStackFromThrowable ( e ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getStoragePoolIdFromSourceImageContainer ( ) { return org.ovirt.engine.core.bll.AddVmCommand.getVmTemplate ( ) . getstorage_pool_id ( ) . getValue ( ) ; }

Target:
protected boolean checkSingleQxlDisplay ( ) { if ( ! ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getSingleQxlPci ( ) ) ) { return true ; } return org.ovirt.engine.core.bll.VmHandler.isSingleQxlDeviceLegal ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; }
Source:
private boolean validateDestStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain destDomain ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator validator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( destDomain ) ; return ( validate ( validator.isDomainExistAndActive ( ) ) ) && ( validate ( validator.domainIsValidDestination ( ) ) ) ; }

Target:
private boolean validateDestStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain destDomain ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator validator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( destDomain ) ; return ( ( validate ( validator.isDomainExistAndActive ( ) ) ) && ( validate ( validator.domainIsValidDestination ( ) ) ) ) && ( validate ( validator.isNotBackupDomain ( ) ) ) ; }
Source:
public void StartPollingTask ( ) { org.ovirt.engine.core.bll.tasks.AsyncTaskState state = getState ( ) ; if ( ( ( state != ( AsyncTaskState.AttemptingEndAction ) ) && ( state != ( AsyncTaskState.Cleared ) ) ) && ( state != ( AsyncTaskState.ClearFailed ) ) ) { org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.infoFormat ( "BaseAsyncTask::startPollingTask: Starting to poll task '{0}'." , getVdsmTaskId ( ) ) ; ConcreteStartPollingTask ( ) ; } }

Target:
public void startPollingTask ( ) { org.ovirt.engine.core.bll.tasks.AsyncTaskState state = getState ( ) ; if ( ( ( state != ( AsyncTaskState.AttemptingEndAction ) ) && ( state != ( AsyncTaskState.Cleared ) ) ) && ( state != ( AsyncTaskState.ClearFailed ) ) ) { org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.infoFormat ( "BaseAsyncTask::startPollingTask: Starting to poll task '{0}'." , getVdsmTaskId ( ) ) ; concreteStartPollingTask ( ) ; } }
Source:
public static void IsUSBEnabledByDefault ( 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.EnableUSBAsDefault , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , 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.storage_server_connections ) ( 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 void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void isClusterEmpty ( 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.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VmTemplate > nameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { return object.getName ( ) ; } } ; nameColumn.makeSortable ( ) ; getTable ( ) . addColumn ( nameColumn , constants.nameTemplate ( ) , "300px" ) ; }

Target:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VmTemplate > nameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { return object.getName ( ) ; } } ; nameColumn.makeSortable ( ) ; getTable ( ) . addColumn ( nameColumn , org.ovirt.engine.ui.webadmin.section.main.view.tab.profile.SubTabVnicProfileTemplateView.constants.nameTemplate ( ) , "300px" ) ; }
Source:
private void addModelListeners ( final org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider modelProvider ) { modelProvider.getModel ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel lastSelectedItem = modelProvider.getSelectionModel ( ) . getSelectedObject ( ) ; modelProvider.getSelectionModel ( ) . setSelected ( lastSelectedItem , false ) ; expandTree ( getDataDisplayWidget ( ) . getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; } } ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { expandPath ( modelProvider.getSelectionModel ( ) . getSelectedObject ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > extractServers ( java.lang.String serversXml ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( serversXml ) ) { return getServerFingerprints ( org.ovirt.engine.core.utils.XmlUtils.loadXmlDoc ( serversXml ) . getElementsByTagName ( org.ovirt.engine.core.bll.gluster.GetGlusterServersQuery.PEER ) ) ; } else { throw new java.lang.RuntimeException ( ( "Could not get the peer list form the host: " + ( org.ovirt.engine.core.bll.gluster.GetGlusterServersQuery.getParameters ( ) . getServerName ( ) ) ) ) ; } }

Target:
protected java.util.Map < java.lang.String , java.lang.String > extractServers ( java.lang.String serversXml ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( serversXml ) ) { return getServerFingerprints ( org.ovirt.engine.core.utils.XmlUtils.loadXmlDoc ( serversXml ) . getElementsByTagName ( org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQuery.PEER ) ) ; } else { throw new java.lang.RuntimeException ( ( "Could not get the peer list form the host: " + ( org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQuery.getParameters ( ) . getServerName ( ) ) ) ) ; } }
Source:
public void endWithFailure ( ) { for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } endCreateAllSnapshots ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , false ) ; enclosingCommand.setExecutionContext ( null ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void endWithFailure ( ) { for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } endCreateAllSnapshots ( ) ; unlockAllDiskSnapshots ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , false ) ; enclosingCommand.setExecutionContext ( null ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc getVGList ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getLVMVolumeGroups" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vglist" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.get_image_transfer_session_stats" ) . withParameter ( "ticketUUID" , ticketId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "statsMap" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( response ) ; }
Source:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void 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.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static 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:
public void testGetUserID ( ) { org.ovirt.engine.core.common.businessentities.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.DbUser.class ) ; org.mockito.Mockito.when ( user.getId ( ) ) . thenReturn ( Guid.EVERYONE ) ; java.lang.String session = org.jgroups.util.UUID.randomUUID ( ) . toString ( ) ; org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . setUser ( session , user ) ; org.ovirt.engine.core.common.queries.VdcQueryParametersBase params = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( session ) ; params.setRefresh ( false ) ; org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery query = new org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery ( params ) ; org.junit.Assert.assertEquals ( "wrong guid" , Guid.EVERYONE , query.getUserID ( ) ) ; }

Target:
public void testGetUserID ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; org.mockito.Mockito.when ( user.getId ( ) ) . thenReturn ( Guid.EVERYONE ) ; java.lang.String session = org.jgroups.util.UUID.randomUUID ( ) . toString ( ) ; org.ovirt.engine.core.bll.aaa.SessionDataContainer.getInstance ( ) . setUser ( session , user ) ; org.ovirt.engine.core.common.queries.VdcQueryParametersBase params = new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( session ) ; params.setRefresh ( false ) ; org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery query = new org.ovirt.engine.core.bll.QueriesCommandBaseTest.ThereIsNoSuchQuery ( params ) ; org.junit.Assert.assertEquals ( "wrong guid" , Guid.EVERYONE , query.getUserID ( ) ) ; }
Source:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( diskInterfaces ) ; }

Target:
protected org.ovirt.engine.core.common.action.VmDiskOperationParameterBase createParameters ( ) { return new org.ovirt.engine.core.common.action.VmDiskOperationParameterBase ( diskVmElement ) ; }
Source:
public void testExistingPassDiscardFunctionalityIsNotPreservedSdDiscardSupportBreaks ( ) { setSdDiscardSupport ( true , false ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( false , true ) ; org.junit.Assert.assertFalse ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 0L , true ) , createLunWithDiscardFunctionality ( 2048L , false ) ) , storageDomain ) ) ; }

Target:
public void testGetLunsThatBreakPassDiscardFunctionalityDiscardFunctionalityDoesntBreak ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( false , true ) ; assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , createLunWithDiscardSupport ( 2048L ) ) , java.util.Collections.emptyList ( ) ) ; }
Source:
public void scoreLdapServer ( java.net.URI ldapURI , org.ovirt.engine.core.bll.adbroker.Score score ) { org.ovirt.engine.core.bll.adbroker.ScorableLDAPServer server = ldapServers.get ( ldapURI ) ; if ( server != null ) { server.setScore ( score.getValue ( ) ) ; if ( org.ovirt.engine.core.bll.adbroker.Domain.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.adbroker.Domain.log.debug ( ( ( ( "LDAP server " + ( ldapURI.toString ( ) ) ) + " has been scored " ) + score ) ) ; } } }

Target:
public void addLDAPServer ( java.net.URI uri ) { ldapServers.add ( uri ) ; }
Source:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageFileType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.RepoImageToImageFileNameAsyncConverter ( ) ; org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters parameters = new org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters ( storagePoolId , imageFileType ) ; parameters.setForceRefresh ( forceRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetImagesListByStoragePoolId , parameters , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { 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.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > ( ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > ) ( source ) ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo cifsOption = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo ( ) ; cifsOption.setKey ( "user.cifs" ) ; list.add ( cifsOption ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionInfo > ( ) ; }

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

Target:
public void countAllTemplates ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void onExportDomainChosen ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = dataCenters.getSelectedItem ( ) ; startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenter.getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetStorageDomainsByStoragePoolIdCallback ( dataCenter ) ) ) ; }

Target:
private void initImportSources ( ) { importSources.setItems ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportSource.values ( ) ) ) ; importSources.setSelectedItem ( ImportSource.EXPORT_DOMAIN ) ; importSources.getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { clearVms ( ) ; } } ) ; }
Source:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.Disk result = dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( getExistingEntityId ( ) . toString ( ) , result.getId ( ) . toString ( ) ) ; }

Target:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk result = dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( getExistingEntityId ( ) . toString ( ) , result.getId ( ) . toString ( ) ) ; }
Source:
public void testEnoughSpaceToMergeSnapshotsWithMultipleDiskAndDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesDisks = org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.mockMultipleSourceImagesForDomain ( 4 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ; imagesDisks.addAll ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.mockMultipleSourceImagesForDomain ( 4 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID2 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ) ; org.mockito.Mockito.doReturn ( imagesDisks ) . when ( cmd ) . getSourceImages ( ) ; mockStorageDomainDAOGetForStoragePool ( 22 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; mockStorageDomainDAOGetForStoragePool ( 22 , org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID2 ) ; org.junit.Assert.assertTrue ( "Validation should succeed. Free space minus threshold should be bigger then summarize all disks size for each domain" , cmd.validateStorageDomains ( ) ) ; }

Target:
public void testCanDoActionNotEnoughSpace ( ) { prepareForVmValidatorTests ( ) ; spySdValidator ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesDisks = mockDisksList ( 4 ) ; org.mockito.Mockito.when ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( imagesDisks ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithOlderVersion ( boolean supportsVirtService , boolean supportsGlusterService ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createNewVdsGroup ( ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_0 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DC_ID1 ) ; group.setVirtService ( supportsVirtService ) ; group.setGlusterService ( supportsGlusterService ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.Cluster createClusterWithOlderVersion ( boolean supportsVirtService , boolean supportsGlusterService ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.ovirt.engine.core.bll.UpdateClusterCommandTest.createNewCluster ( ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_0 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setVirtService ( supportsVirtService ) ; group.setGlusterService ( supportsGlusterService ) ; return group ; }
Source:
public void mapAction ( ) { for ( org.ovirt.engine.api.restapi.types.WatchdogAction action : org.ovirt.engine.api.restapi.types.WatchdogAction.values ( ) ) { org.ovirt.engine.core.common.businessentities.VmWatchdogAction backendAction = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( action , null ) ; org.junit.Assert.assertNotNull ( backendAction ) ; org.junit.Assert.assertEquals ( backendAction.name ( ) . toLowerCase ( ) , action.name ( ) . toLowerCase ( ) ) ; } }

Target:
public void mapAction ( ) { for ( org.ovirt.engine.api.model.WatchdogAction action : org.ovirt.engine.api.model.WatchdogAction.values ( ) ) { org.ovirt.engine.core.common.businessentities.VmWatchdogAction backendAction = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( action , null ) ; org.junit.Assert.assertNotNull ( backendAction ) ; org.junit.Assert.assertEquals ( backendAction.name ( ) . toLowerCase ( ) , action.name ( ) . toLowerCase ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.network.VnicProfileView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VnicProfileView entity = super . mapRow ( rs , rowNum ) ; entity.setNetworkName ( rs.getString ( "network_name" ) ) ; entity.setNetworkQosName ( rs.getString ( "network_qos_name" ) ) ; entity.setDataCenterName ( rs.getString ( "data_center_name" ) ) ; entity.setCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VnicProfileView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VnicProfileView entity = super . mapRow ( rs , rowNum ) ; entity.setNetworkName ( rs.getString ( "network_name" ) ) ; entity.setNetworkQosName ( rs.getString ( "network_qos_name" ) ) ; entity.setDataCenterName ( rs.getString ( "data_center_name" ) ) ; entity.setCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; entity.setNetworkFilterName ( rs.getString ( "network_filter_name" ) ) ; return entity ; }
Source:
public void setText ( com.google.gwt.safehtml.shared.SafeHtml text ) { setTooltipText ( text.asString ( ) ) ; tooltip.reconfigure ( ) ; }

Target:
private com.google.gwt.safehtml.shared.SafeHtml wrapItalic ( com.google.gwt.safehtml.shared.SafeHtml text ) { if ( text.asString ( ) . startsWith ( "<i>" ) ) { return text ; } return new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) . appendHtmlConstant ( "<i>" ) . append ( text ) . appendHtmlConstant ( "</i>" ) . toSafeHtml ( ) ; }
Source:
public static void GetClusterServerMemoryOverCommit ( 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.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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_pool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface lookupEntity ( org.ovirt.engine.core.compat.Guid guid ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return parent.lookupInterface ( id ) ; } } ; org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostNicStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.HostNIC , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( entityType , guid , query ) ) ; }

Target:
public javax.ws.rs.core.Response updateVirtualFunctionsConfig ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "virtualFunctionsConfiguration.numberOfVirtualFunctions|allNetworksAllowed" ) ; final org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig = parent.findVfsConfig ( guid ) ; if ( vfsConfig == null ) { return notAllowed ( localize ( Messages.INVALID_OPERATION_ON_NON_SRIOV_NIC ) , guid.toString ( ) ) ; } org.ovirt.engine.core.common.action.UpdateHostNicVfsConfigParameters params = prepareUpdateHostNicVfsConfigParameters ( action , vfsConfig ) ; return doAction ( VdcActionType.UpdateHostNicVfsConfig , params , action ) ; }
Source:
public void testWindowsTimeZonesKeys ( ) { final java.util.Set < java.lang.String > windowsTimeZoneKeys = org.ovirt.engine.core.compat.WindowsJavaTimezoneMapping.getKeys ( ) ; for ( java.lang.String timeZoneKey : TimeZoneType.WINDOWS_TIMEZONE.getTimeZoneList ( ) . keySet ( ) ) { org.junit.Assert.assertThat ( windowsTimeZoneKeys , org.hamcrest.core.IsCollectionContaining.hasItem ( timeZoneKey ) ) ; } }

Target:
public void testWindowsTimeZonesKeys ( ) { final java.util.Set < java.lang.String > windowsTimeZoneKeys = org.ovirt.engine.core.compat.WindowsJavaTimezoneMapping.getKeys ( ) ; for ( java.lang.String timeZoneKey : TimeZoneType.WINDOWS_TIMEZONE.getTimeZoneList ( ) . keySet ( ) ) { org.hamcrest.MatcherAssert.assertThat ( windowsTimeZoneKeys , org.hamcrest.core.IsCollectionContaining.hasItem ( timeZoneKey ) ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VM getVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = super . getVm ( ) ; if ( vm == null ) { vm = org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getVmDao ( ) . getVmsListForDisk ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getImageGroupId ( ) , false ) . get ( 0 ) ; setVm ( vm ) ; setVmId ( vm.getId ( ) ) ; } return vm ; }

Target:
public org.ovirt.engine.core.common.businessentities.VM getVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = super . getVm ( ) ; if ( vm == null ) { vm = vmDao.getVmsListForDisk ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDiskCommand.getImageGroupId ( ) , false ) . get ( 0 ) ; setVm ( vm ) ; setVmId ( vm.getId ( ) ) ; } return vm ; }
Source:
protected java.lang.String getMethods ( ) { java.lang.String methods = "" ; for ( java.lang.String key : this . methods.keySet ( ) ) { methods += this . methods.get ( key ) ; } return methods ; }

Target:
protected java.lang.String getMethods ( ) { java.util.List < java.lang.String > keys = new java.util.ArrayList < > ( methods.keySet ( ) ) ; java.util.Collections.sort ( keys ) ; java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; for ( java.lang.String key : keys ) { buffer.append ( methods.get ( key ) ) ; } return buffer.toString ( ) ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { 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.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { 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.VnicProfile > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setStatus ( ( volumeId.equals ( startedVolumeId ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeStatus.DOWN ) ) ; volumeEntity.setClusterId ( CLUSTER_ID ) ; return volumeEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid volumeId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setStatus ( ( volumeId.equals ( startedVolumeId ) ? org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP : org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.DOWN ) ) ; volumeEntity.setClusterId ( CLUSTER_ID ) ; return volumeEntity ; }
Source:
public void getMaxNumOfThreadsPerCpu ( 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.Integer ) ( source ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfThreadsPerCpu ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getMaxVmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 100 ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VmPriorityMaxValue , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
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 ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc changeDisk ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.Object > driveSpec ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.changeCD" ) . withParameter ( "vmID" , vmId ) . withParameter ( "driveSpec" , driveSpec ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn changeDisk ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.Object > driveSpec ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.changeCD" ) . withParameter ( "vmID" , vmId ) . withParameter ( "driveSpec" , driveSpec ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn ( response ) ; }