auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void GetGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
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.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public java.lang.Void runInTransaction ( ) { runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getrun_on_vds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( getVm ( ) . getId ( ) ) , false , true ) ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > pluggedDisks = org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . getPluggedDisks ( getVm ( ) ) ; runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getrun_on_vds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( pluggedDisks , false , true ) ) ) ; return null ; }
Source:
public void networkMappingsProvidedByProvider ( ) { mockProviderAdditionalProperties ( ) ; org.mockito.Mockito.when ( getProviderAgentConfiguration ( ) . getNetworkMappings ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.junit.Assert.assertThat ( validator.networkMappingsProvided ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void networkMappingsProvidedByProvider ( ) { mockProviderAdditionalProperties ( ) ; org.mockito.Mockito.when ( getProviderAgentConfiguration ( ) . getNetworkMappings ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.networkMappingsProvided ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void isConnWithSameDetailsExistBlockDomains ( ) { 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 < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; connections.add ( connection1 ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistBlockDomains ( ) { 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 < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "3260" , "user1" , "mypassword123" ) ; connections.add ( connection1 ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }
Source:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.VmTemplate > nameColumn = new org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < 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.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.VmTemplate > nameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < 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" ) ; }
Source:
public static void getVmTemplatesWithPermittedAction ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesWithPermittedAction , getEntitiesWithPermittedActionParameters , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void clusterNotChanged ( ) { org.ovirt.engine.core.compat.Guid clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( oldHost.getVdsGroupId ( ) ) . thenReturn ( clusterId ) ; org.mockito.Mockito.when ( host.getVdsGroupId ( ) ) . thenReturn ( clusterId ) ; org.junit.Assert.assertThat ( validator.clusterNotChanged ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void clusterNotChanged ( ) { org.ovirt.engine.core.compat.Guid clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( oldHost.getClusterId ( ) ) . thenReturn ( clusterId ) ; org.mockito.Mockito.when ( host.getClusterId ( ) ) . thenReturn ( clusterId ) ; org.junit.Assert.assertThat ( validator.clusterNotChanged ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public void getManagementNetworkName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DefaultManagementNetwork , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testAddIscsiLunDisk_IncompleteParameters_ConnectionPort ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . get ( 0 ) . setPort ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "validateDiskForCreation" , "port" ) ; } }

Target:
public void testAddIscsiLunDisk_IncompleteParameters_ConnectionPort ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . get ( 0 ) . setPort ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddIscsiLunDisk_IncompleteParameters_ConnectionPort" , "port" ) ; } }
Source:
public javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( asGuid ( get ( ) . getImageId ( ) ) , org.ovirt.engine.core.compat.Guid.Empty , getStorageDomainId ( action ) , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ; return doAction ( VdcActionType.MoveOrCopyDisk , params , action ) ; }

Target:
public javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "storageDomain.id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId = getStorageDomainId ( action ) ; org.ovirt.engine.core.compat.Guid imageId = asGuid ( getDisk ( ) . getImageId ( ) ) ; org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( imageId , org.ovirt.engine.core.compat.Guid.Empty , storageDomainId , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ; return doAction ( VdcActionType.MoveOrCopyDisk , params , action ) ; }
Source:
public void testUpdateStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics before = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; before.setusage_mem_percent ( 17 ) ; before.setDisksUsage ( "java.util.map { [ ] }" ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.VmStatistics after = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testUpdateStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics before = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; before.setUsageMemPercent ( 17 ) ; before.setDisksUsage ( "java.util.map { [ ] }" ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.VmStatistics after = dao.get ( org.ovirt.engine.core.dao.VmStatisticsDaoTest.EXISTING_VM_ID ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.heartBeat ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( 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.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory , boolean frozen ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory , frozen ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testReadStringListEndElement ( ) { org.ovirt.api.metamodel.runtime.xml.XmlReader reader = openReader ( "<action><value>1</value><value>2</value></action>" ) ; reader.next ( ) ; reader.readStrings ( ) ; org.junit.Assert.assertEquals ( javax.xml.stream.XMLStreamConstants.END_ELEMENT , reader.getEventType ( ) ) ; org.junit.Assert.assertEquals ( "action" , reader.getLocalName ( ) ) ; }

Target:
public void testReadStringListEndElement ( ) { org.ovirt.api.metamodel.runtime.xml.XmlReader reader = openReader ( "<action><values><value>1</value><value>2</value></values></action>" ) ; reader.next ( ) ; reader.readStrings ( ) ; org.junit.Assert.assertEquals ( javax.xml.stream.XMLStreamConstants.END_ELEMENT , reader.getEventType ( ) ) ; org.junit.Assert.assertEquals ( "action" , reader.getLocalName ( ) ) ; }
Source:
void addReportedDevices ( org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { java.util.List < org.ovirt.engine.api.model.ReportedDevice > devices = getDevices ( entity.getVmId ( ) , entity.getMacAddress ( ) ) ; if ( ! ( devices.isEmpty ( ) ) ) { org.ovirt.engine.api.model.ReportedDevices reportedDevices = new org.ovirt.engine.api.model.ReportedDevices ( ) ; reportedDevices.getReportedDevices ( ) . addAll ( devices ) ; model.setReportedDevices ( reportedDevices ) ; } }

Target:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > entities = getBackendCollection ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity : entities ) { org.ovirt.engine.api.model.Nic nic = populate ( map ( entity ) , entity ) ; nics.getNics ( ) . add ( addLinks ( nic ) ) ; } return nics ; }
Source:
public void setUp ( ) { initializeOsRepository ( 1 , DiskInterface.VirtIO ) ; disk = org.ovirt.engine.core.bll.validator.DiskValidatorTest.createDisk ( ) ; disk.setDiskAlias ( "disk1" ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.DiskValidator ( disk ) ) ; org.mockito.Mockito.doReturn ( vmDAO ) . when ( validator ) . getVmDAO ( ) ; }

Target:
public void setUp ( ) { initializeOsRepository ( 1 , DiskInterface.VirtIO ) ; disk = org.ovirt.engine.core.bll.validator.DiskValidatorTest.createDiskImage ( ) ; disk.setDiskAlias ( "disk1" ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.DiskValidator ( disk ) ) ; org.mockito.Mockito.doReturn ( vmDAO ) . when ( validator ) . getVmDAO ( ) ; }
Source:
public void testRemoveStoragePoolIsoMap ( ) { dao.remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_id ( ) . toString ( ) ) , existingStoragePoolIsoMap.getstorage_pool_id ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( existingStoragePoolIsoMap.getstorage_id ( ) , new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_pool_id ( ) . toString ( ) ) ) ) ; assertNull ( result ) ; }

Target:
public void testRemoveStoragePoolIsoMap ( ) { dao.remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_id ( ) . toString ( ) ) , existingStoragePoolIsoMap.getstorage_pool_id ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( existingStoragePoolIsoMap.getstorage_id ( ) , new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_pool_id ( ) . toString ( ) ) ) ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
public void testDedicatedHostNotExistOrNotSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isDedicatedVdsExistOnSameCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmBase.class ) , org.mockito.Matchers.any ( java.util.ArrayList.class ) ) ; vmStatic.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; }

Target:
public void testNameNotChanged ( ) { prepareVmToPassValidate ( ) ; vm.setName ( "vm1" ) ; mockSameNameQuery ( true ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.junit.Assert.assertTrue ( "validate should have passed." , command.validate ( ) ) ; }
Source:
public static < T extends org.ovirt.engine.core.common.vdscommands.StorageDomainIdParametersBase & org.ovirt.engine.core.common.vdscommands.PostZero > T fixParametersWithPostZero ( T parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( parameters.getStorageDomainId ( ) ) ; return org.ovirt.engine.core.bll.storage.domain.PostZeroHandler.fixParametersWithPostZero ( parameters , storageDomainStatic.getStorageType ( ) . isFileDomain ( ) ) ; }

Target:
public static < T extends org.ovirt.engine.core.common.vdscommands.StorageDomainIdParametersBase & org.ovirt.engine.core.common.vdscommands.PostDeleteAction > T fixParameters ( T parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( parameters.getStorageDomainId ( ) ) ; return org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandler.fixParameters ( parameters , storageDomainStatic.getStorageType ( ) . isFileDomain ( ) ) ; }
Source:
public java.net.Socket createSocket ( java.lang.String host , int port ) throws java.io.IOException , java.net.UnknownHostException { javax.net.ssl.SSLSocket socket = ( ( javax.net.ssl.SSLSocket ) ( sslcontext.getSocketFactory ( ) . createSocket ( host , port ) ) ) ; socket.setEnabledProtocols ( new java.lang.String [ ] { "SSLv3" } ) ; return socket ; }

Target:
public java.net.Socket createSocket ( java.lang.String host , int port ) throws java.io.IOException , java.net.UnknownHostException { javax.net.ssl.SSLSocket socket = ( ( javax.net.ssl.SSLSocket ) ( sslcontext.getSocketFactory ( ) . createSocket ( host , port ) ) ) ; socket.setEnabledProtocols ( new java.lang.String [ ] { this . protocol } ) ; return socket ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel , org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterVmListModel > getStorageRegisterVmListProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel , org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterVmListModel > ( eventBus , defaultConfirmPopupProvider , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel.class , org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterVmListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterVmListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getImportCommand ( ) ) ) { return registerEntityPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( 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 ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getQuotaId ( ) { if ( ( ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) ) != null ) && ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) == ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskStorageType ( ) ) ) ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ) . getQuotaId ( ) ; } return null ; }

Target:
private org.ovirt.engine.core.compat.Guid getQuotaId ( ) { if ( ( ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) ) != null ) && ( isQuotaValidationNeeded ( ) ) ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getParameters ( ) . getDiskInfo ( ) ) ) . getQuotaId ( ) ; } return null ; }
Source:
public void testQueryForInvalidVolumeId ( ) { org.mockito.Mockito.doReturn ( Guid.Empty ) . when ( getQueryParameters ( ) ) . getVolumeId ( ) ; getQuery ( ) . executeQueryCommand ( ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( getQuery ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( EngineMessage.GLUSTER_VOLUME_ID_INVALID.toString ( ) , returnValue.getExceptionString ( ) ) ; }

Target:
public void testQueryForInvalidVolumeId ( ) { org.mockito.Mockito.doReturn ( Guid.Empty ) . when ( getQueryParameters ( ) ) . getVolumeId ( ) ; getQuery ( ) . executeQueryCommand ( ) ; org.ovirt.engine.core.common.queries.QueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.QueryReturnValue ) ( getQuery ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( EngineMessage.GLUSTER_VOLUME_ID_INVALID.toString ( ) , returnValue.getExceptionString ( ) ) ; }
Source:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setcreation_date ( fromIRS.getcreation_date ( ) ) ; getDestinationDiskImage ( ) . setlast_modified_date ( fromIRS.getlast_modified_date ( ) ) ; getDestinationDiskImage ( ) . setlastModified ( getDestinationDiskImage ( ) . getlast_modified_date ( ) ) ; org.ovirt.engine.core.common.businessentities.DiskImageDynamic destinationDiskDynamic = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getactual_size ( ) ) ; org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }

Target:
protected void completeImageData ( org.ovirt.engine.core.common.businessentities.DiskImage fromIRS ) { getDestinationDiskImage ( ) . setCreationDate ( fromIRS.getCreationDate ( ) ) ; getDestinationDiskImage ( ) . setLastModifiedDate ( fromIRS.getLastModifiedDate ( ) ) ; getDestinationDiskImage ( ) . setLastModified ( getDestinationDiskImage ( ) . getLastModifiedDate ( ) ) ; org.ovirt.engine.core.common.businessentities.DiskImageDynamic destinationDiskDynamic = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . get ( getDestinationDiskImage ( ) . getImageId ( ) ) ; if ( destinationDiskDynamic != null ) { destinationDiskDynamic.setactual_size ( fromIRS.getActualSizeFromDiskImage ( ) ) ; org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDynamicDAO ( ) . update ( destinationDiskDynamic ) ; } }
Source:
public static void EnableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "PerformLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VdsLoadBalancingeIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VdsLoadBalancingeIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "PerformLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VdsLoadBalancingeIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VdsLoadBalancingeIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }
Source:
protected org.ovirt.engine.api.model.Disk populate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { org.ovirt.engine.api.model.Disk populatedDisk = super . populate ( model , entity ) ; populatedDisk.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; populatedDisk.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { org.ovirt.engine.api.model.Disk populatedDisk = super . doPopulate ( model , entity ) ; populatedDisk.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; populatedDisk.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return model ; }
Source:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; boolean vmHasDirectPassthroughDevices = releaseUsedHostDevices ( ) ; org.ovirt.engine.core.compat.Guid hostId = cleanupVfs ( ) ; refreshHostIfNeeded ( ( hostId == null ? vmHasDirectPassthroughDevices ? org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getDedicatedVmForVds ( ) : null : hostId ) ) ; applyNextRunConfiguration ( ) ; }

Target:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.ProcessDownVmCommand.getQuotaManager ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; boolean vmHasDirectPassthroughDevices = releaseUsedHostDevices ( ) ; org.ovirt.engine.core.compat.Guid hostId = cleanupVfs ( ) ; refreshHostIfNeeded ( ( hostId == null ? vmHasDirectPassthroughDevices ? org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getDedicatedVmForVds ( ) : null : hostId ) ) ; applyNextRunConfiguration ( ) ; }
Source:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public static void fillImagesMapBasedOnTemplate ( org.ovirt.engine.core.common.businessentities.VmTemplate template , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskInfoDestinationMap , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > destStorages ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStoragePool ( template.getStoragePoolId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.fillImagesMapBasedOnTemplate ( template , domains , diskInfoDestinationMap , destStorages ) ; }

Target:
public void fillImagesMapBasedOnTemplate ( org.ovirt.engine.core.common.businessentities.VmTemplate template , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskInfoDestinationMap , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > destStorages ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = storageDomainDao.getAllForStoragePool ( template.getStoragePoolId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.fillImagesMapBasedOnTemplate ( template , domains , diskInfoDestinationMap , destStorages ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getImages ( ) { return java.util.Collections.emptyList ( ) ; }

Target:
public void setUp ( ) throws java.io.IOException { storagePoolId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; clusterId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.doReturn ( cluster ) . when ( cmd ) . getCluster ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( cmd ) . getImages ( ) ; mockCluster ( ) ; setXmlOvfData ( ) ; }
Source:
public void onSetupNetworks ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkConnectivityCheckTimeoutInSeconds ( new org.ovirt.engine.ui.frontend.AsyncQuery ( sourceListModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { getConnectivityTimeout ( ) . setEntity ( ( ( java.lang.Integer ) ( returnValue ) ) ) ; postOnSetupNetworks ( ) ; } } ) ) ; }

Target:
public void onSetupNetworks ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getNetworkConnectivityCheckTimeoutInSeconds ( new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.lang.Integer > ( ) { @ java.lang.Override public void onSuccess ( java.lang.Integer returnValue ) { getConnectivityTimeout ( ) . setEntity ( returnValue ) ; postOnSetupNetworks ( ) ; } } ) ) ; }
Source:
public void testClusterNetworkLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.NETWORK_ID ) ; network.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; network.getCluster ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( network ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_NETWORK_HREF , network.getHref ( ) ) ; }

Target:
public void testClusterNetworkLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network network = new org.ovirt.engine.api.model.Network ( ) ; network.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.NETWORK_ID ) ; network.setCluster ( new org.ovirt.engine.api.model.Cluster ( ) ) ; network.getCluster ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( network ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_NETWORK_HREF , network.getHref ( ) ) ; }
Source:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageById ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }

Target:
private boolean isDiskNotShareable ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( imageId ) ; if ( diskImage.isShareable ( ) ) { addCanDoActionMessage ( java.lang.String.format ( "$%1$s %2$s" , "diskAliases" , diskImage.getDiskAlias ( ) ) ) ; return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED ) ; } return true ; }
Source:
protected void executeVdsBrokerCommand ( ) { int storageType = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) ; _result = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getBroker ( ) . getDeviceList ( storageType ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLUNList ( _result.lunList ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { int storageType = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) ; java.util.List < java.lang.String > lunsIdList = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getParameters ( ) . getLunIds ( ) ; java.lang.String [ ] lunsIdArray = ( lunsIdList != null ) ? lunsIdList.toArray ( new java.lang.String [ lunsIdList.size ( ) ] ) : null ; _result = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.getBroker ( ) . getDeviceList ( storageType , lunsIdArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLUNList ( _result.lunList ) ) ; }
Source:
protected void auditInvalidInterfaces ( java.util.List < java.lang.String > invalidNetworkNames , java.util.List < java.lang.String > invalidIfaceNames ) { if ( ( invalidNetworkNames.size ( ) ) > 0 ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "Networks" , org.apache.commons.lang.StringUtils.join ( invalidNetworkNames , ',' ) ) ; logable.addCustomValue ( "Interfaces" , org.apache.commons.lang.StringUtils.join ( invalidIfaceNames , ',' ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , getAuditLogTypeForInvalidInterfaces ( ) ) ; } }

Target:
protected void generateNewDiskId ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImagesList , org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.core.compat.Guid generatedGuid = generateNewDiskId ( disk ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : diskImagesList ) { diskImage.setId ( generatedGuid ) ; } }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { _setCliEnvironmentIfNecessary ( ( ( org.ovirt.ovirt_host_deploy.constants.OpenStackEnv.NEUTRON_CONFIG_PREFIX ) + "DEFAULT/qpid_password" ) , _openStackAgentProperties.getAgentConfiguration ( ) . getMessagingConfiguration ( ) . getPassword ( ) ) ; return null ; }

Target:
public void setOpenStackAgentProperties ( org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties properties ) { _openStackAgentProperties = properties ; if ( ( _openStackAgentProperties ) != null ) { _messagingConfiguration = _openStackAgentProperties.getAgentConfiguration ( ) . getMessagingConfiguration ( ) ; _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_SETUP ) ; if ( _openStackAgentProperties.isLinuxBridge ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_LINUX_BRIDGE_SETUP ) ; } else if ( _openStackAgentProperties.isOpenVSwitch ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_OPEN_VSWITCH_SETUP ) ; } } }
Source:
public void shouldDetectSufficientMemory ( ) { vm.setNumaTuneMode ( NumaTuneMode.STRICT ) ; vmNumaNodes.get ( 0 ) . setMemTotal ( 1000 ) ; vdsNumaNodes.get ( 0 ) . setMemTotal ( 2000 ) ; assertTrue ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }

Target:
public void shouldDetectHostWihtoutNumaSupport ( ) { vdsNumaNodes = new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ; assertValidationFailure ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.validateNumaCompatibility ( vm , vm.getvNumaNodeList ( ) , vdsNumaNodes ) , EngineMessage.HOST_NUMA_NOT_SUPPORTED ) ; }
Source:
private void doLoad ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { context = input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) ; context.< java.util.Collection < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Internal Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , ( ( Authn.Capabilities.AUTHENTICATE_CREDENTIALS ) | ( Authn.Capabilities.AUTHENTICATE_PASSWORD ) ) ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; java.util.Properties config = context.< java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) ; adminUser = config.getProperty ( "config.authn.user.name" ) ; adminPassword = config.getProperty ( "config.authn.user.password" ) ; }

Target:
private void doLoad ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { context = input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) ; context.< java.util.Collection < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Internal Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , ( ( Authn.Capabilities.AUTHENTICATE_CREDENTIALS ) | ( Authn.Capabilities.AUTHENTICATE_PASSWORD ) ) ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; java.util.Properties config = context.< java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) ; adminUser = config.getProperty ( "config.authn.user.name" , "admin" ) ; adminPassword = config.getProperty ( "config.authn.user.password" ) ; }
Source:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public void 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 ) ; }