auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( ) ) ) . thenReturn ( diskInterfaces ) ; }

Target:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( diskInterfaces ) ; }
Source:
public void validateEnoughSpace ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void moveShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setShareable ( true ) ; initializeCommand ( disk , VmEntityType.VM ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLunsFromDeviceList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = setUpLuns ( false ) ; for ( int i = 0 ; i < ( luns.size ( ) ) ; i ++ ) { java.util.HashMap < java.lang.String , java.lang.Boolean > pathsDictionary = new java.util.HashMap < java.lang.String , java.lang.Boolean > ( ) ; pathsDictionary.put ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.PHYSICAL_DEVICE_FIELD , true ) ; luns.get ( i ) . setPathsDictionary ( pathsDictionary ) ; } return luns ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLunsFromDeviceList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = setUpLuns ( false ) ; for ( int i = 0 ; i < ( luns.size ( ) ) ; i ++ ) { java.util.HashMap < java.lang.String , java.lang.Boolean > pathsDictionary = new java.util.HashMap < java.lang.String , java.lang.Boolean > ( ) ; pathsDictionary.put ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.PHYSICAL_DEVICE_FIELD , true ) ; luns.get ( i ) . setPathsDictionary ( pathsDictionary ) ; } return luns ; }
Source:
private java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > getDiskImagesByIdMap ( java.util.Collection < org.ovirt.engine.api.model.Disk > values ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > result = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; for ( org.ovirt.engine.api.model.Disk diskImage : values ) { result.put ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskImage ) ) . getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskImage ) ) ) ; } return result ; }

Target:
private java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskImagesByIdMap ( java.util.Collection < org.ovirt.engine.api.model.Disk > values ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > result = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; for ( org.ovirt.engine.api.model.Disk diskImage : values ) { result.put ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( diskImage ) ) . getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( diskImage ) ) ) ; } return result ; }
Source:
private void addDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsGroupDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }

Target:
private void addDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsGroupDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }
Source:
public void attemptToFenceJob ( ) { org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = ( ( org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getParameters ( ) . getVolInfo ( ) ) ) ; org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters parameters = new org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters ( info ) ; parameters.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getActionType ( ) ) ; parameters.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getParameters ( ) ) ; parameters.setStoragePoolId ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getParameters ( ) . getStoragePoolId ( ) ) ; parameters.setEndProcedure ( VdcActionParametersBase.EndProcedure.COMMAND_MANAGED ) ; runInternalActionWithTasksContext ( VdcActionType.FenceVolumeJob , parameters ) ; }

Target:
public void attemptToFenceJob ( ) { org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = ( ( org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getParameters ( ) . getVolInfo ( ) ) ) ; org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters parameters = new org.ovirt.engine.core.common.action.FenceVolumeJobCommandParameters ( info ) ; parameters.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getActionType ( ) ) ; parameters.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getParameters ( ) ) ; parameters.setStoragePoolId ( org.ovirt.engine.core.bll.storage.disk.image.AmendVolumeCommand.getParameters ( ) . getStoragePoolId ( ) ) ; parameters.setEndProcedure ( ActionParametersBase.EndProcedure.COMMAND_MANAGED ) ; runInternalActionWithTasksContext ( ActionType.FenceVolumeJob , parameters ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbUser entity = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setFirstName ( NAMES [ index ] ) ; entity.setGroupNames ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbUser entity = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setFirstName ( NAMES [ index ] ) ; entity.setGroupNames ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS.split ( "," ) ) ) ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }
Source:
protected org.ovirt.engine.core.bll.CommandBase < ? > constructCommand ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , boolean runAsInternal , org.ovirt.engine.core.bll.context.CommandContext context ) { org.ovirt.engine.core.bll.job.ExecutionHandler.evaluateCorrelationId ( parameters ) ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.CreateCommand ( actionType , parameters ) ; command.setInternalExecution ( runAsInternal ) ; command.setContext ( context ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.prepareCommandForMonitoring ( command , actionType , runAsInternal ) ; return command ; }

Target:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap ) { return createTask ( taskId , asyncTaskCreationInfo , parentCommand , null , entitiesMap ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setGetGuestAgentQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getNic ( false ) ) ; assertNotNull ( nic ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 ) ; setAllContentHeaderExpectation ( ) ; setGetVmQueryExpectations ( 2 ) ; setGetNetworksQueryExpectations ( 2 ) ; setGetGuestAgentQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } , true , true ) ) ; org.ovirt.engine.api.model.NIC nic = resource.update ( getNic ( false ) ) ; assertNotNull ( nic ) ; }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( isMigrate && ( ( ( getVm ( ) . getRunOnVds ( ) ) != null ) && ( getVm ( ) . getRunOnVds ( ) . equals ( vds.getId ( ) ) ) ) ) { sb.append ( "is the same host the VM is currently running on" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_TO_SAME_HOST ; } return null ; }

Target:
public org.ovirt.engine.core.common.errors.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( isMigrate && ( ( ( getVm ( ) . getRunOnVds ( ) ) != null ) && ( getVm ( ) . getRunOnVds ( ) . equals ( vds.getId ( ) ) ) ) ) { sb.append ( "is the same host the VM is currently running on" ) ; return org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_TO_SAME_HOST ; } return null ; }
Source:
public void testValidBondWhenSufficientNumberOfSlaves ( ) throws java.lang.Exception { assertCorrectSlaveCountInValidBonds ( 2 , "bonded interface with two or more slaves should be valid bond" , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
private void assertCorrectSlaveCountInValidBondsWhenInsufficientBonds ( int numberOfSlaves ) { java.lang.String bondName = "bondName" ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST , bondName ) ) ; assertCorrectSlaveCountInValidBonds ( numberOfSlaves , java.lang.String.format ( "bonded interface with only %1$d slaves is not valid bond" , numberOfSlaves ) , matcher , bondName ) ; }
Source:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( command.getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( command ) , p ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTasks createAsyncTask ( org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.createAsyncTask ( command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
private boolean isLiveMerge ( ) { return ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . isLiveMerge ( ) ) || ( ( ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getVm ( ) ) != null ) && ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getVm ( ) . isQualifiedForLiveSnapshotMerge ( ) ) ) ; }

Target:
private boolean isLiveMerge ( ) { return ( ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . isLiveMerge ( ) ) || ( ( ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getVm ( ) ) != null ) && ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getVm ( ) . isQualifiedForLiveSnapshotMerge ( ) ) ) ) && ( ! ( org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getImages ( ) , false , false , false ) . isEmpty ( ) ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.compat.RpmVersion rpmV1 , org.ovirt.engine.core.compat.RpmVersion rpmV2 ) { return org.ovirt.engine.core.common.utils.RpmVersionUtils.compareRpmParts ( rpmV2.getRpmName ( ) , rpmV1.getRpmName ( ) ) ; }

Target:
public void upgrade ( ) { final org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.models.Model model = org.ovirt.engine.ui.uicommonweb.models.hosts.HostGeneralModel.createUpgradeModel ( host ) ; setWindow ( model ) ; model.initialize ( ) ; model.getCommands ( ) . add ( org.ovirt.engine.ui.uicommonweb.UICommand.createCancelUiCommand ( "Cancel" , this ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( ( ( ipConfiguration != null ) && ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) && ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) && ( unsetAddress ( ipConfiguration ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkAttachedToCluster ( ) { org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_OF_GIVEN_NAME_NOT_EXISTS_IN_CLUSTER ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , this . attachment.getNetworkName ( ) ) ) . when ( ( ( getNetworkCluster ( ) ) == null ) ) ; }
Source:
public void removeAll ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces = getVmNicDao ( ) . getAllForVm ( vmId ) ; if ( interfaces != null ) { removeFromExternalNetworks ( interfaces ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : interfaces ) { getMacPoolManager ( ) . freeMac ( iface.getMacAddress ( ) ) ; getVmNicDao ( ) . remove ( iface.getId ( ) ) ; getVmNetworkStatisticsDao ( ) . remove ( iface.getId ( ) ) ; } } }

Target:
public void removeAll ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces = getVmNicDao ( ) . getAllForVm ( vmId ) ; if ( interfaces != null ) { removeFromExternalNetworks ( interfaces ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : interfaces ) { macPool.freeMac ( iface.getMacAddress ( ) ) ; getVmNicDao ( ) . remove ( iface.getId ( ) ) ; getVmNetworkStatisticsDao ( ) . remove ( iface.getId ( ) ) ; } } }
Source:
public org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > getStorageConnectionCredentialsForhost ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > credentials ; org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connExt = getConnectionExtensionDao ( ) . getByHostIdAndTarget ( hostId , connection.getIqn ( ) ) ; if ( connExt == null ) { credentials = new org.ovirt.engine.core.common.utils.Pair ( connection.getUserName ( ) , connection.getPassword ( ) ) ; } else { credentials = new org.ovirt.engine.core.common.utils.Pair ( connExt.getUserName ( ) , connExt.getPassword ( ) ) ; } return credentials ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > getStorageConnectionCredentialsForhost ( org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > credentials ; org.ovirt.engine.core.common.businessentities.storage.StorageServerConnectionExtension connExt = storageServerConnectionExtensionDao.getByHostIdAndTarget ( hostId , connection.getIqn ( ) ) ; if ( connExt == null ) { credentials = new org.ovirt.engine.core.common.utils.Pair ( connection.getUserName ( ) , connection.getPassword ( ) ) ; } else { credentials = new org.ovirt.engine.core.common.utils.Pair ( connExt.getUserName ( ) , connExt.getPassword ( ) ) ; } return credentials ; }
Source:
public 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 getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.ServerCpu > > aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
private void setCookie ( final javax.servlet.http.HttpServletResponse response , final java.util.Locale userLocale ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( LocaleFilter.LOCALE , userLocale.toString ( ) ) ; cookie.setMaxAge ( java.lang.Integer.MAX_VALUE ) ; response.addCookie ( cookie ) ; }

Target:
private void setCookie ( final javax.servlet.http.HttpServletResponse response , final java.util.Locale userLocale ) { javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie ( LocaleFilter.LOCALE , userLocale.toString ( ) ) ; cookie.setPath ( ( "/" + ( getServletContext ( ) . getContextPath ( ) ) ) ) ; cookie.setMaxAge ( java.lang.Integer.MAX_VALUE ) ; response.addCookie ( cookie ) ; }
Source:
protected void onLogin ( final org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . init ( ) ; org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . getReportsInitEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { performLogin ( loginModel ) ; } } ) ; }

Target:
protected void onLogin ( final org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . init ( ) ; org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . getReportsInitEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { performLogin ( loginModel ) ; } } ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; providers.add ( 0 , null ) ; networkModel.getExternalProviders ( ) . setItems ( providers ) ; networkModel.getExternalProviders ( ) . setSelectedItem ( null ) ; networkModel.stopProgress ( ) ; }

Target:
public void importNetworks ( ) { if ( ( getWindow ( ) ) != null ) { return ; } setWindow ( new org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel ( this ) ) ; }
Source:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) ) { searchString = value ; SearchStringChanged ( ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }

Target:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) ) { searchString = value ; SearchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { updateVms ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = queryReturnValue.getReturnValue ( ) ; updateVms ( java.util.Collections.singletonList ( vm ) ) ; } else { setError ( messages.failedToLoadOva ( getOvaPath ( ) . getEntity ( ) ) ) ; } stopProgress ( ) ; }
Source:
public java.lang.String getDiskAlias ( ) { return org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getDiskInfo ( ) . getDiskAlias ( ) ; }

Target:
protected java.util.Map < org.ovirt.engine.core.compat.Guid , java.lang.String > getSharedLocks ( ) { if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) != null ) && ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) , LockingGroup.VM.name ( ) ) ; } return null ; }
Source:
public static org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse buildFailedResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request ) { java.lang.String networkConnectivityIssueMessage = ( ( "{\"jsonrpc\": \"2.0\", \"id\": \"" + ( request.getPlainId ( ) ) ) + "\", \"error\": {\"message\":" ) + " \"Message timeout which can be caused by communication issues\'\", \"code\": 5022}}" ; org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse response = null ; try { response = org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse.fromJsonNode ( org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.mapper.readTree ( networkConnectivityIssueMessage ) ) ; } catch ( java.io.IOException e ) { org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.log.debug ( "Exception thrown during marshalling json" , e ) ; } return response ; }

Target:
public static java.util.Map < java.lang.String , java.lang.Object > mapValues ( org.codehaus.jackson.JsonNode node ) { java.util.Map < java.lang.String , java.lang.Object > map = null ; try { map = org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.mapper.readValue ( node , new org.codehaus.jackson.type.TypeReference < java.util.HashMap < java.lang.String , java.lang.Object > > ( ) { } ) ; } catch ( java.io.IOException e ) { org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.log.debug ( "Exception thrown during marshalling json" , e ) ; } return map ; }
Source:
public < T extends java.lang.Object > T instanceOf ( java.lang.Class < T > clazz ) { javax.enterprise.inject.spi.Bean bean = org.ovirt.engine.core.common.utils.Injector.injector.manager.getBeans ( clazz ) . iterator ( ) . next ( ) ; return ( ( T ) ( org.ovirt.engine.core.common.utils.Injector.injector.manager.getReference ( bean , clazz , org.ovirt.engine.core.common.utils.Injector.injector.manager.createCreationalContext ( bean ) ) ) ) ; }

Target:
public < T extends java.lang.Object > T instanceOf ( java.lang.Class < T > clazz ) { javax.enterprise.inject.spi.Bean bean = org.ovirt.engine.core.bll.utils.Injector.injector.manager.getBeans ( clazz ) . iterator ( ) . next ( ) ; return ( ( T ) ( org.ovirt.engine.core.bll.utils.Injector.injector.manager.getReference ( bean , clazz , org.ovirt.engine.core.bll.utils.Injector.injector.manager.createCreationalContext ( bean ) ) ) ) ; }
Source:
public void testGetIdsForOvfDeletionOneToDelete ( ) { vmDao.remove ( FixturesTool.VM_RHEL5_POOL_50 ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guidsToDelete = dao.getIdsForOvfDeletion ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.Assert.assertEquals ( "there should be 1 ovf for deletion" , 1 , guidsToDelete.size ( ) ) ; org.junit.Assert.assertTrue ( "the list of guids for deletion doesn't contain the expected guid" , guidsToDelete.contains ( FixturesTool.VM_RHEL5_POOL_50 ) ) ; }

Target:
public void testGetIdsForOvfDeletionOneToDelete ( ) { vmDao.remove ( FixturesTool.VM_RHEL5_POOL_50 ) ; java.util.List < org.ovirt.engine.core.compat.Guid > guidsToDelete = dao.getIdsForOvfDeletion ( FixturesTool.STORAGE_POOL_RHEL6_ISCSI_OTHER ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , guidsToDelete.size ( ) , "there should be 1 ovf for deletion" ) ; org.junit.jupiter.api.Assertions.assertTrue ( guidsToDelete.contains ( FixturesTool.VM_RHEL5_POOL_50 ) , "the list of guids for deletion doesn't contain the expected guid" ) ; }
Source:
public boolean isPowerManagementEnabledAndLegal ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < java.lang.String > messages ) { if ( ! ( ( vds.isPmEnabled ( ) ) && ( isPowerManagementLegal ( vds.getFenceAgents ( ) , cluster , messages ) ) ) ) { messages.add ( EngineMessage.VDS_FENCE_DISABLED.name ( ) ) ; return false ; } else { return true ; } }

Target:
public boolean isPowerManagementEnabledAndLegal ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < java.lang.String > messages ) { if ( ! ( ( vds.isPmEnabled ( ) ) && ( isPowerManagementLegal ( getDbFacade ( ) . getFenceAgentDao ( ) . getFenceAgentsForHost ( vds.getId ( ) ) , cluster , messages ) ) ) ) { messages.add ( EngineMessage.VDS_FENCE_DISABLED.name ( ) ) ; return false ; } else { return true ; } }
Source:
private void doTestBadAddNic ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.AddVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicsResourceTest.VM_ID } , valid , success ) ) ; org.ovirt.engine.api.model.Nic model = org.ovirt.engine.api.restapi.resource.BackendVmNicsResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddNic ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.AddVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicsResourceTest.VM_ID } , valid , success ) ) ; org.ovirt.engine.api.model.Nic model = org.ovirt.engine.api.restapi.resource.BackendVmNicsResourceTest.getModel ( 0 ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , detail ) ; }
Source:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public void testIsUpdateable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; org.junit.Assert.assertFalse ( "Should be false by default" , oic.IsFieldUpdatable ( "name" ) ) ; oic.AddPermittedFields ( "name" ) ; org.junit.Assert.assertTrue ( "Should be true now" , oic.IsFieldUpdatable ( "name" ) ) ; }

Target:
public void testIsUpdateable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; org.junit.Assert.assertFalse ( "Should be false by default" , oic.isFieldUpdatable ( "name" ) ) ; oic.addPermittedFields ( "name" ) ; org.junit.Assert.assertTrue ( "Should be true now" , oic.isFieldUpdatable ( "name" ) ) ; }
Source:
private void vnicProfileNotUsedByTemplatesTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { org.ovirt.engine.core.dao.VmTemplateDAO templateDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmTemplateDAO.class ) ; org.mockito.Mockito.when ( templateDao.getAllForVnicProfile ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( templates ) ; org.mockito.Mockito.when ( dbFacade.getVmTemplateDao ( ) ) . thenReturn ( templateDao ) ; org.junit.Assert.assertThat ( validator.vnicProfileNotUsedByTemplates ( ) , matcher ) ; }

Target:
private void vnicProfileNotUsedByTemplatesTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { org.ovirt.engine.core.dao.VmTemplateDao templateDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmTemplateDao.class ) ; org.mockito.Mockito.when ( templateDao.getAllForVnicProfile ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( templates ) ; org.mockito.Mockito.when ( dbFacade.getVmTemplateDao ( ) ) . thenReturn ( templateDao ) ; org.junit.Assert.assertThat ( validator.vnicProfileNotUsedByTemplates ( ) , matcher ) ; }
Source:
public void testBootProtocolSetForDisplayNetworkWhenBootProtocolIsNone ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL ) , network , attachment ) ; }

Target:
public void testBootProtocolSetForDisplayNetworkWhenBootProtocolIsNone ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL ) , network , attachment ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( null , getMacPool ( ) ) ; return ( validate ( validator.defaultPoolFlagIsNotSet ( ) ) ) && ( validate ( validator.hasUniqueName ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( getMacPoolEntity ( ) ) ; return ( validate ( validator.defaultPoolFlagIsNotSet ( ) ) ) && ( validate ( validator.hasUniqueName ( ) ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj.getClass ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.VdcOption other = ( ( org.ovirt.engine.core.common.businessentities.VdcOption ) ( obj ) ) ; return ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( name , other.name ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( value , other.value ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj.getClass ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.VdcOption other = ( ( org.ovirt.engine.core.common.businessentities.VdcOption ) ( obj ) ) ; return ( java.util.Objects.equals ( name , other.name ) ) && ( java.util.Objects.equals ( value , other.value ) ) ; }
Source:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( 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.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByStoragePoolAndDomainId ( org.ovirt.engine.core.compat.Guid isoStoragePoolId , org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( ( ( isoStorageDomainId != null ) && ( isoStoragePoolId != null ) ) && ( ( org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . findActiveISODomain ( isoStoragePoolId ) ) != null ) ) { fileListMD = repoStorageDom.getRepoListForStorageDomainAndStoragePool ( isoStoragePoolId , isoStorageDomainId , imageType ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByStoragePoolAndDomainId ( org.ovirt.engine.core.compat.Guid isoStoragePoolId , org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( ( ( isoStorageDomainId != null ) && ( isoStoragePoolId != null ) ) && ( ( org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . findActiveISODomain ( isoStoragePoolId ) ) != null ) ) { fileListMD = repoStorageDom.getRepoListForStorageDomainAndStoragePool ( isoStoragePoolId , isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
public void acquireSession ( java.lang.String engineAuthToken ) { sendRequest ( createRequest ( engineAuthToken ) , new org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.RestApiRequestCallback ( ) { @ java.lang.Override protected void processResponse ( com.google.gwt.http.client.Response response ) { java.lang.String sessionIdFromHeader = org.ovirt.engine.ui.common.utils.HttpUtils.getHeader ( response , org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.SESSION_ID_HEADER ) ; if ( sessionIdFromHeader != null ) { setSessionId ( sessionIdFromHeader , true ) ; } reuseSession ( ) ; } } ) ; }

Target:
public void acquireSession ( java.lang.String engineAuthToken ) { sendRequest ( createRequest ( engineAuthToken ) , new org.ovirt.engine.ui.common.restapi.RestApiSessionManager.RestApiRequestCallback ( ) { @ java.lang.Override protected void processResponse ( com.google.gwt.http.client.Response response ) { java.lang.String sessionIdFromHeader = org.ovirt.engine.ui.common.utils.HttpUtils.getHeader ( response , org.ovirt.engine.ui.common.restapi.RestApiSessionManager.SESSION_ID_HEADER ) ; if ( sessionIdFromHeader != null ) { setSessionId ( sessionIdFromHeader , true ) ; } reuseSession ( ) ; } } ) ; }
Source:
public static void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
private java.lang.String getMemoryVolumeFromActiveSnapshotInExportDomain ( ) { org.ovirt.engine.core.common.businessentities.Snapshot activeSnapshot = getActiveSnapshot ( ) ; if ( activeSnapshot != null ) { return activeSnapshot.getMemoryVolume ( ) ; } return org.apache.commons.lang.StringUtils.EMPTY ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot addActiveSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId ) { org.ovirt.engine.core.common.businessentities.Snapshot activeSnapshot = getActiveSnapshot ( ) ; java.lang.String memoryVolume = ( ( activeSnapshot != null ) && ( ! ( org.ovirt.engine.core.bll.ImportVmCommand.getParameters ( ) . isImportAsNewEntity ( ) ) ) ) ? activeSnapshot.getMemoryVolume ( ) : org.apache.commons.lang.StringUtils.EMPTY ; return snapshotsManager.addActiveSnapshot ( snapshotId , getVm ( ) , memoryVolume , org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) ) ; }
Source:
public void testUpdateHostExternalStatus ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; before.setExternalStatus ( ExternalStatus.Error ) ; dao.updateExternalStatus ( before.getId ( ) , before.getExternalStatus ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; org.junit.Assert.assertEquals ( before.getExternalStatus ( ) , after.getExternalStatus ( ) ) ; }

Target:
public void testUpdateHostExternalStatus ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; before.setExternalStatus ( ExternalStatus.Error ) ; dao.updateExternalStatus ( before.getId ( ) , before.getExternalStatus ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; org.junit.jupiter.api.Assertions.assertEquals ( before.getExternalStatus ( ) , after.getExternalStatus ( ) ) ; }
Source:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }