auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addNetworkInterfaceDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , boolean plugged ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , VmDeviceType.INTERFACE , VmDeviceType.BRIDGE , java.util.Collections.< java.lang.String , java.lang.Object > emptyMap ( ) , plugged , false ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addNetworkInterfaceDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , boolean plugged , java.util.Map < java.lang.String , java.lang.String > customProp ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , VmDeviceGeneralType.INTERFACE , VmDeviceType.BRIDGE , java.util.Collections.< java.lang.String , java.lang.Object > emptyMap ( ) , plugged , false , customProp ) ; }
Source:
private java.io.File createTempPng ( ) throws java.io.IOException { java.io.File file = java.io.File.createTempFile ( "favicon" , ".png" ) ; file.deleteOnExit ( ) ; java.awt.image.BufferedImage img = new java.awt.image.BufferedImage ( 256 , 256 , java.awt.image.BufferedImage.TYPE_INT_RGB ) ; if ( ! ( javax.imageio.ImageIO.write ( img , "PNG" , file ) ) ) { org.junit.jupiter.api.Assertions.fail ( "Unable to write temporary image file" ) ; } return file ; }

Target:
private java.io.File createTempPng ( ) throws java.io.IOException { java.io.File file = java.io.File.createTempFile ( "favicon" , ".png" ) ; file.deleteOnExit ( ) ; java.awt.image.BufferedImage img = new java.awt.image.BufferedImage ( 256 , 256 , java.awt.image.BufferedImage.TYPE_INT_RGB ) ; org.junit.jupiter.api.Assertions.assertTrue ( javax.imageio.ImageIO.write ( img , "PNG" , file ) , "Unable to write temporary image file" ) ; return file ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( group.getId ( ) ) . thenReturn ( id ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( group.getId ( ) ) . thenReturn ( id ) ; org.mockito.Mockito.when ( group.getStoragePoolId ( ) ) . thenReturn ( GUIDS [ 2 ] ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }
Source:
protected boolean validateImagesAndVMStates ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , hasImages ( ) , hasImages ( ) , hasImages ( ) , hasImages ( ) , true , true , null ) ; }

Target:
protected boolean validateImagesAndVMStates ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , hasImages ( ) , hasImages ( ) , hasImages ( ) , hasImages ( ) , true , true , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ) ; }
Source:
private javax.ws.rs.core.Response addSAN ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.core.common.businessentities.storage_domain_static entity , org.ovirt.engine.core.compat.Guid hostId ) { boolean overrideLuns = ( model.getStorage ( ) . isSetOverrideLuns ( ) ) ? model.getStorage ( ) . isOverrideLuns ( ) : false ; return performCreation ( VdcActionType.AddSANStorageDomain , getSanAddParams ( entity , hostId , getLunIds ( model.getStorage ( ) , storageType , hostId ) , overrideLuns ) , ID_RESOLVER ) ; }

Target:
private javax.ws.rs.core.Response addSAN ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.core.common.businessentities.StorageDomainStatic entity , org.ovirt.engine.core.compat.Guid hostId ) { boolean overrideLuns = ( model.getStorage ( ) . isSetOverrideLuns ( ) ) ? model.getStorage ( ) . isOverrideLuns ( ) : false ; return performCreation ( VdcActionType.AddSANStorageDomain , getSanAddParams ( entity , hostId , getLunIds ( model.getStorage ( ) , storageType , hostId ) , overrideLuns ) , ID_RESOLVER ) ; }
Source:
public void testRemove ( ) { for ( boolean shouldFormat : new boolean [ ] { true , false } ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomainType sdType : new org.ovirt.engine.core.common.businessentities.StorageDomainType [ ] { org.ovirt.engine.core.common.businessentities.StorageDomainType.Data , org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO , org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport } ) { for ( org.ovirt.engine.core.common.businessentities.StorageType sType : org.ovirt.engine.core.common.businessentities.StorageType.values ( ) ) { if ( sType.isConcreteStorageType ( ) ) { doTestRemove ( sdType , sType , shouldFormat , false ) ; } } } } }

Target:
public void testRemove ( ) { for ( boolean shouldFormat : new boolean [ ] { true , false } ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomainType sdType : new org.ovirt.engine.core.common.businessentities.StorageDomainType [ ] { org.ovirt.engine.core.common.businessentities.StorageDomainType.Data , org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO , org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport } ) { for ( org.ovirt.engine.core.common.businessentities.storage.StorageType sType : org.ovirt.engine.core.common.businessentities.storage.StorageType.values ( ) ) { if ( sType.isConcreteStorageType ( ) ) { doTestRemove ( sdType , sType , shouldFormat , false ) ; } } } } }
Source:
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 ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
protected void failedToRunVm ( ) { org.ovirt.engine.core.bll.RunVmCommandBase.log ( ) ; processVmPoolOnStopVm ( ) ; endJobOrStepAsFailed ( ) ; }

Target:
protected void runningFailed ( ) { try { decreasePendingVms ( ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RemoveAsyncRunningCommand ( org.ovirt.engine.core.bll.RunVmCommandBase.getVmId ( ) ) ; _isRerun = false ; org.ovirt.engine.core.bll.RunVmCommandBase.setSucceeded ( false ) ; org.ovirt.engine.core.bll.RunVmCommandBase.log ( ) ; processVmPoolOnStopVm ( ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; } finally { org.ovirt.engine.core.bll.RunVmCommandBase.freeLock ( ) ; } }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { if ( ( object.getLastAlignmentScan ( ) ) != null ) { java.lang.String lastScanDate = com.google.gwt.i18n.client.DateTimeFormat.getFormat ( "yyyy-MM-dd, HH:mm" ) . format ( object.getLastAlignmentScan ( ) ) ; setTitle ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.messages.lastDiskAlignment ( lastScanDate ) ) ; } else { setTitle ( null ) ; } return object.getAlignment ( ) . toString ( ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { setEnumTitle ( object.getVmEntityType ( ) ) ; if ( ( object.getVmEntityType ( ) ) == null ) { return null ; } return object.getVmEntityType ( ) . isVmType ( ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.vmsImage ( ) : object.getVmEntityType ( ) . isTemplateType ( ) ? org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.resources.templatesImage ( ) : null ; }
Source:
protected void saveDiskImageDynamic ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic diskDynamic = new org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic ( ) ; diskDynamic.setId ( disk.getImageId ( ) ) ; diskDynamic.setactual_size ( disk.getActualSizeInBytes ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getDiskImageDynamicDao ( ) . save ( diskDynamic ) ; }

Target:
protected void saveDiskImageDynamic ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic diskDynamic = new org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic ( ) ; diskDynamic.setId ( disk.getImageId ( ) ) ; diskDynamic.setActualSize ( disk.getActualSizeInBytes ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getDiskImageDynamicDao ( ) . save ( diskDynamic ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getGlusterVolume ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.TransportType > transportType = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.TransportType > ( ) ; java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.AccessProtocol > accessProtocol = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.gluster.AccessProtocol > ( ) ; accessProtocol.add ( AccessProtocol.GLUSTER ) ; transportType.add ( TransportType.TCP ) ; volumeEntity.setId ( id ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.setAccessProtocols ( accessProtocol ) ; volumeEntity.setTransportTypes ( transportType ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; return volumeEntity ; }

Target:
public void canDoActionSucceeds ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DeleteGlusterVolumeCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters ( stoppedVolumeId , false ) ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }
Source:
public void testUpdate ( ) { setUpGetEntityExpectations ( 2 ) ; setUpDiskVmElementExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.VmDiskOperationParameterBase.class , new java.lang.String [ ] { "VmId" , "DiskInfo.WipeAfterDelete" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , java.lang.Boolean.FALSE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; org.junit.Assert.assertNotNull ( disk ) ; }

Target:
public void testUpdate ( ) { setUpGetEntityExpectations ( 2 ) ; setUpDiskVmElementExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.VmDiskOperationParameterBase.class , new java.lang.String [ ] { "VmId" , "DiskInfo.WipeAfterDelete" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , java.lang.Boolean.FALSE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( disk ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc list ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMList" ) . withOptionalParameterAsList ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { } ) ) ) . withParameter ( "onlyUUID" , false ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturn list ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMList" ) . withOptionalParameterAsList ( "vmList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { } ) ) ) . withParameter ( "onlyUUID" , false ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturn ( response ) ; }
Source:
public void testGetLocalesKeysWithInvalid ( ) { org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelperTest.unvalidatedUnsupportedLocales.add ( "ko_KR" ) ; org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelperTest.unvalidatedUnsupportedLocales.add ( "abcdds" ) ; java.util.List < java.lang.String > locales = org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelper.getLocalesKeys ( ConfigValues.UnsupportedLocalesFilterOverrides ) ; org.junit.Assert.assertNotNull ( "Result should not be null" , locales ) ; org.junit.Assert.assertEquals ( "There should be 1 locales" , 1 , locales.size ( ) ) ; org.junit.Assert.assertEquals ( "Locale should be ko_KR" , "ko_KR" , locales.get ( 0 ) ) ; }

Target:
public void testGetLocalesKeysWithInvalid ( ) { org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelperTest.unvalidatedUnsupportedLocales.add ( "ko_KR" ) ; org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelperTest.unvalidatedUnsupportedLocales.add ( "abcdds" ) ; java.util.List < java.lang.String > locales = org.ovirt.engine.core.utils.servlet.UnsupportedLocaleHelper.getLocalesKeys ( ConfigValues.UnsupportedLocalesFilterOverrides ) ; org.junit.jupiter.api.Assertions.assertNotNull ( locales , "Result should not be null" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , locales.size ( ) , "There should be 1 locales" ) ; org.junit.jupiter.api.Assertions.assertEquals ( "ko_KR" , locales.get ( 0 ) , "Locale should be ko_KR" ) ; }
Source:
public boolean isColumnVisible ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( ! ( isColumnPresent ( column ) ) ) { return false ; } boolean visible = true ; if ( columnVisibleMap.containsKey ( column ) ) { visible = columnVisibleMap.get ( column ) ; } if ( visible && ( columnVisibleMapOverride.containsKey ( column ) ) ) { visible = columnVisibleMapOverride.get ( column ) ; } visible = visible && ( ( getHiddenPersistedColumnWidth ( column ) ) == null ) ; return visible ; }

Target:
public void setColumnVisible ( com.google.gwt.user.cellview.client.Column < T , ? > column , boolean visible ) { if ( isColumnPresent ( column ) ) { columnVisibleMapOverride.put ( column , visible ) ; ensureColumnVisible ( column , null , visible , columnWidthMap.get ( column ) , false ) ; } }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { ItemsChanging ( value , items ) ; items = value ; ItemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { if ( ( items ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel itemModel : ( ( java.lang.Iterable < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > ) ( items ) ) ) { itemModel.clearReferences ( ) ; } } ItemsChanging ( value , items ) ; items = value ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
private boolean vdsGroupExists ( ) { if ( ! ( vdsGroupInDb ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID ) ; return false ; } return true ; }

Target:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( EngineMessage.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }
Source:
public org.ovirt.engine.core.utils.ovf.xml.XmlNode SelectSingleNode ( java.lang.String string , org.ovirt.engine.core.utils.ovf.xml.XmlNamespaceManager _xmlns ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; xPath.setNamespaceContext ( _xmlns ) ; java.lang.Object o = xPath.evaluate ( string , node , javax.xml.xpath.XPathConstants.NODE ) ; if ( o != null ) { return new org.ovirt.engine.core.utils.ovf.xml.XmlNode ( ( ( org.w3c.dom.Node ) ( o ) ) ) ; } return null ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }

Target:
public org.ovirt.engine.core.utils.ovf.xml.XmlNode selectSingleNode ( java.lang.String string , org.ovirt.engine.core.utils.ovf.xml.XmlNamespaceManager _xmlns ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; xPath.setNamespaceContext ( _xmlns ) ; java.lang.Object o = xPath.evaluate ( string , node , javax.xml.xpath.XPathConstants.NODE ) ; if ( o != null ) { return new org.ovirt.engine.core.utils.ovf.xml.XmlNode ( ( ( org.w3c.dom.Node ) ( o ) ) ) ; } return null ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }
Source:
private void assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.LUNs > expectedLunsThatBreakPassDiscardFunctionality ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsThatBreakPassDiscardFunctionality = discardHelper.getLunsThatBreakPassDiscardSupport ( luns , storageDomain.getId ( ) ) ; org.junit.Assert.assertTrue ( org.apache.commons.collections.CollectionUtils.isEqualCollection ( lunsThatBreakPassDiscardFunctionality , expectedLunsThatBreakPassDiscardFunctionality ) ) ; }

Target:
private void assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.LUNs > expectedLunsThatBreakPassDiscardFunctionality ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsThatBreakPassDiscardFunctionality = discardHelper.getLunsThatBreakPassDiscardSupport ( luns , storageDomain.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( org.apache.commons.collections.CollectionUtils.isEqualCollection ( lunsThatBreakPassDiscardFunctionality , expectedLunsThatBreakPassDiscardFunctionality ) ) ; }
Source:
private void setupParameters ( ) { org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setImageGroupID ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setDestinationImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) ; }

Target:
private void setupParameters ( ) { org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setImageGroupID ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setDestinationImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; if ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getImportAsTemplate ( ) ) { org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setVmSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { updateKeyTitle ( object ) ; object.getKeys ( ) . 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 ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget.this , object ) ; updateKeyTitle ( object ) ; } } ) ; driver.edit ( object ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueLineModel object ) { super . doEdit ( object ) ; driver.edit ( object ) ; }
Source:
private java.lang.Integer getPmSecondaryPortAsIngeter ( ) { if ( ( ( getPmSecondaryPort ( ) ) != null ) && ( ( getPmSecondaryPort ( ) . getEntity ( ) ) != null ) ) { return java.lang.Integer.valueOf ( getPmSecondaryPort ( ) . getEntity ( ) ) ; } else { return null ; } }

Target:
public boolean externalProvisionEnabled ( ) { return true ; }
Source:
public void testGetVmsPinnedToHost ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = dao.getAllPinnedToHost ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.Assert.assertNotNull ( vms ) ; org.assertj.core.api.Assertions.assertThat ( vms ) . hasSize ( 2 ) . extracting ( VM :: getId ) . contains ( FixturesTool.VM_RHEL5_POOL_57 , FixturesTool.VM_RHEL5_POOL_52 ) ; }

Target:
public void testGetVmsPinnedToHost ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = dao.getAllPinnedToHost ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.junit.jupiter.api.Assertions.assertNotNull ( vms ) ; org.assertj.core.api.Assertions.assertThat ( vms ) . hasSize ( 2 ) . extracting ( VM :: getId ) . contains ( FixturesTool.VM_RHEL5_POOL_57 , FixturesTool.VM_RHEL5_POOL_52 ) ; }
Source:
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.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , 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:
protected com.google.gwt.user.client.ui.TreeItem getLeafItem ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { return getSnapshotNode ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getSnapshots ( ) ) ; } else { return null ; } }

Target:
protected com.google.gwt.user.client.ui.TreeItem getLeafItem ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { return getSnapshotNode ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getSnapshots ( ) ) ; } else { return null ; } }
Source:
private java.lang.String getConnectionDescription ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > connections , java.lang.String connectionId ) { org.ovirt.engine.core.compat.Guid connectionIdGuid = org.ovirt.engine.core.compat.Guid.createGuidFromString ( connectionId ) ; for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : connections ) { org.ovirt.engine.core.compat.Guid connectionGuid = org.ovirt.engine.core.compat.Guid.createGuidFromString ( connection.getid ( ) ) ; if ( connectionGuid.equals ( connectionIdGuid ) ) { java.lang.String desc = connection.getconnection ( ) ; if ( ( connection.getiqn ( ) ) != null ) { desc += " " + ( connection.getiqn ( ) ) ; } return desc ; } } return "" ; }

Target:
private java.lang.String getConnectionDescription ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections , java.lang.String connectionId ) { org.ovirt.engine.core.compat.Guid connectionIdGuid = org.ovirt.engine.core.compat.Guid.createGuidFromString ( connectionId ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : connections ) { org.ovirt.engine.core.compat.Guid connectionGuid = org.ovirt.engine.core.compat.Guid.createGuidFromString ( connection.getid ( ) ) ; if ( connectionGuid.equals ( connectionIdGuid ) ) { java.lang.String desc = connection.getconnection ( ) ; if ( ( connection.getiqn ( ) ) != null ) { desc += " " + ( connection.getiqn ( ) ) ; } return desc ; } } return "" ; }
Source:
public void testReapingOnGetWithGC ( ) { setUpGCExpectations ( 5 ) ; populate ( 1 , 2 , 3 ) ; map.reapable ( "one" ) ; map.reapable ( "three" ) ; assertSizes ( 1 , 2 ) ; assertExpected ( 3 ) ; assertSizes ( 1 , 1 ) ; org.junit.Assert.assertNull ( map.get ( "three" ) ) ; }

Target:
public void testReapingOnGetWithGC ( ) { setUpGCExpectations ( 5 ) ; populate ( 1 , 2 , 3 ) ; map.reapable ( "one" ) ; map.reapable ( "three" ) ; assertSizes ( 1 , 2 ) ; assertExpected ( 3 ) ; assertSizes ( 1 , 1 ) ; org.junit.jupiter.api.Assertions.assertNull ( map.get ( "three" ) ) ; }
Source:
protected void endWithFailure ( ) { if ( ( commandCoordinatorUtil.getCommandExecutionStatus ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCommandId ( ) ) ) != ( org.ovirt.engine.core.compat.backendcompat.CommandExecutionStatus.EXECUTED ) ) { changeStorageDomainStatusInTransaction ( loadStoragePoolIsoMap ( ) , StorageDomainStatus.Unknown ) ; auditLogDirector.log ( this , AuditLogType.USER_DEACTIVATE_STORAGE_DOMAIN_OVF_UPDATE_INCOMPLETE ) ; } else { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = loadStoragePoolIsoMap ( ) ; changeDomainStatusWithCompensation ( map , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCompensationContext ( ) ) ; if ( shouldPerformOvfUpdate ( ) ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalAction ( ActionType.UpdateOvfStoreForStorageDomain , createUpdateOvfStoreParams ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.cloneContext ( ) . withoutCompensationContext ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; return ; } } if ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.noAsyncOperations ( ) ) { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }
Source:
void addStyles ( ) { linuxBootOptionsPanel.setVisible ( false ) ; initialRunPanel.setVisible ( true ) ; attachFloppyEditor.addContentWidgetStyleName ( style.attachImageCheckBoxLabel ( ) ) ; attachIsoEditor.addContentWidgetStyleName ( style.attachImageCheckBoxLabel ( ) ) ; floppyImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; isoImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; floppyImageEditor.addContentWidgetStyleName ( style.attachImageSelectbox ( ) ) ; isoImageEditor.addContentWidgetStyleName ( style.attachImageSelectbox ( ) ) ; }

Target:
void addStyles ( ) { linuxBootOptionsPanel.setVisible ( false ) ; initialRunPanel.setVisible ( true ) ; hostPanel.setVisible ( true ) ; attachFloppyEditor.addContentWidgetStyleName ( style.attachImageCheckBoxLabel ( ) ) ; attachIsoEditor.addContentWidgetStyleName ( style.attachImageCheckBoxLabel ( ) ) ; floppyImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; isoImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; floppyImageEditor.addContentWidgetStyleName ( style.attachImageSelectbox ( ) ) ; isoImageEditor.addContentWidgetStyleName ( style.attachImageSelectbox ( ) ) ; }
Source:
protected boolean canDoAction ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.VmLogonCommand.getVm ( ) ; if ( vm == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_EXIST ) ; return false ; } if ( ! ( org.ovirt.engine.core.bll.VmLogonCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.VmLogonCommand.getVm ( ) ; if ( vm == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; return false ; } if ( ! ( org.ovirt.engine.core.bll.VmLogonCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } return true ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getStorageConnectionsList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc getDeviceList ( int storageType , java.lang.String [ ] devicesList ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = null ; if ( devicesList != null ) { xmlRpcReturnValue = vdsServer.getDeviceList ( storageType , devicesList ) ; } else { xmlRpcReturnValue = vdsServer.getDeviceList ( storageType ) ; } org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void GetCustomPropertiesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void isAnyHostUpInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) && ( ( ( ( java.util.List ) ( source ) ) . size ( ) ) > 0 ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetUpHostListByCluster ( aQuery , clusterName , 1 ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getDbFacade ( ) . getStorageServerConnectionDao ( ) . getStorageConnectionsByStorageTypeAndStatus ( org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getParameters ( ) . getStorageType ( ) , java.util.EnumSet.allOf ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.class ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getQueryReturnValue ( ) . setReturnValue ( storageServerConnectionDao.getStorageConnectionsByStorageTypeAndStatus ( org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.connection.GetConnectionsByDataCenterAndStorageTypeQuery.getParameters ( ) . getStorageType ( ) , java.util.EnumSet.allOf ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.class ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.refresh" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "masterSdUUID" , msdUUID ) . withParameter ( "masterVersion" , masterVersion ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc extend_image_ticket ( java.lang.String ticketId , long timeout ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.extend_image_ticket" ) . withParameter ( "uuid" , ticketId ) . withParameter ( "timeout" , timeout ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.File model , int index ) { assertEquals ( NAMES [ index ] , model.getId ( ) ) ; assertEquals ( NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getStorageDomain ( ) ) ; assertEquals ( GUIDS [ 0 ] . toString ( ) , model.getStorageDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.File model , int index ) { org.junit.Assert.assertEquals ( NAMES [ index ] , model.getId ( ) ) ; org.junit.Assert.assertEquals ( NAMES [ index ] , model.getName ( ) ) ; org.junit.Assert.assertNotNull ( model.getStorageDomain ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ 0 ] . toString ( ) , model.getStorageDomain ( ) . getId ( ) ) ; verifyLinks ( model ) ; }
Source:
protected void setUpGetSystemStatisticsExpectations ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryResult = createMock ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue.class ) ; org.easymock.EasyMock.expect ( backend.runQuery ( org.easymock.EasyMock.eq ( VdcQueryType.GetSystemStatistics ) , queryParams ( ) ) ) . andReturn ( queryResult ) ; org.easymock.EasyMock.expect ( queryResult.getSucceeded ( ) ) . andReturn ( true ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( queryResult.getReturnValue ( ) ) . andReturn ( setUpStats ( ) ) . anyTimes ( ) ; replayAll ( ) ; }

Target:
protected void setUpGetSystemStatisticsExpectations ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryResult = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue.class ) ; org.mockito.Mockito.when ( backend.runQuery ( org.mockito.Mockito.eq ( VdcQueryType.GetSystemStatistics ) , queryParams ( ) ) ) . thenReturn ( queryResult ) ; org.mockito.Mockito.when ( queryResult.getSucceeded ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( queryResult.getReturnValue ( ) ) . thenReturn ( setUpStats ( ) ) ; }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.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 ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( 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.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void testUpdate ( ) { existing_bookmark.setbookmark_name ( existing_bookmark.getbookmark_name ( ) . toUpperCase ( ) ) ; dao.update ( existing_bookmark ) ; org.ovirt.engine.core.common.businessentities.Bookmark result = dao.get ( existing_bookmark.getbookmark_id ( ) ) ; assertNotNull ( result ) ; assertEquals ( existing_bookmark.getbookmark_name ( ) , result.getbookmark_name ( ) ) ; }

Target:
public void testUpdate ( ) { existing_bookmark.setbookmark_name ( existing_bookmark.getbookmark_name ( ) . toUpperCase ( ) ) ; dao.update ( existing_bookmark ) ; org.ovirt.engine.core.common.businessentities.Bookmark result = dao.get ( existing_bookmark.getbookmark_id ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existing_bookmark.getbookmark_name ( ) , result.getbookmark_name ( ) ) ; }
Source:
public void SaveNICsConfig ( ) { org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.CommitNetworkChanges , new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.action.VdcActionParametersBase [ ] { new org.ovirt.engine.core.common.action.VdsActionParameters ( getEntity ( ) . getId ( ) ) } ) ) , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
public void saveNICsConfig ( ) { org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.CommitNetworkChanges , new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.action.VdcActionParametersBase [ ] { new org.ovirt.engine.core.common.action.VdsActionParameters ( getEntity ( ) . getId ( ) ) } ) ) , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc vmUpdateDevice ( java.lang.String vmId , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct device ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.vmUpdateDevice ( vmId , device.getInnerMap ( ) ) ; 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.gluster.GlusterHooksListReturnForXmlRpc glusterHooksList ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHooksList ( ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterHooksListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterHooksListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private java.lang.String getClientUrl ( ) { return ( ( ( ( ( ( com.google.gwt.user.client.Window.Location.getProtocol ( ) ) + "//" ) + ( com.google.gwt.user.client.Window.Location.getHost ( ) ) ) + "/ovirt-engine-spicehtml5-main.html?host=" ) + ( config.getProxyHost ( ) ) ) + "&port=" ) + ( config.getProxyPort ( ) ) ; }

Target:
public void connect ( ) { boolean sslTarget = ( ( securePort ) == ( - 1 ) ) ? false : true ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , config , getHost ( ) , java.lang.String.valueOf ( ( sslTarget ? securePort : port ) ) , getPassword ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }