auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetAllForUsersAndGroupsInvalidUserAndGroups ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > result = dao.getAnyAdminRoleForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) , ApplicationMode.AllModes.getValue ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllForUsersAndGroupsInvalidUserAndGroups ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > result = dao.getAnyAdminRoleForUserAndGroups ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) , ApplicationMode.AllModes.getValue ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertTrue ( result.isEmpty ( ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveDisk , org.ovirt.engine.core.common.action.RemoveDiskParameters.class , new java.lang.String [ ] { "DiskId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testDetach ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setDetach ( true ) ; verifyRemove ( resource.remove ( action ) ) ; }
Source:
public java.lang.String getSearchString ( ) { if ( ( searchString ) == null ) { return null ; } return ( searchString ) + ( ( pagingSearchString ) == null ? "" : pagingSearchString ) ; }

Target:
protected java.lang.String applySortOptions ( java.lang.String searchString ) { java.lang.String result = searchString ; if ( ( sortBy ) != null ) { result += ( ( ( ( " " + ( org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTBY ) ) + " " ) + ( sortBy ) ) + " " ) + ( sortAscending ? org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTDIR_ASC : org.ovirt.engine.core.searchbackend.SyntaxChecker.SORTDIR_DESC ) ; } if ( ( result != null ) && ( ( pagingSearchString ) != null ) ) { result += " " + ( pagingSearchString ) ; } return result ; }
Source:
public org.ovirt.engine.sdk.entities.Action move ( org.ovirt.engine.sdk.entities.Action action , java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/move" ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.entities.Action move ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/move" ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VM createVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic dynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; org.ovirt.engine.core.common.businessentities.VmStatic stat = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; stat.setVmtGuid ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; stat.setName ( "testVm" ) ; stat.setPriority ( 1 ) ; vm.setStaticData ( stat ) ; vm.setDynamicData ( dynamic ) ; return vm ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VM createVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic dynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; org.ovirt.engine.core.common.businessentities.VmStatic stat = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; stat.setVmtGuid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; stat.setName ( "testVm" ) ; stat.setPriority ( 1 ) ; vm.setStaticData ( stat ) ; vm.setDynamicData ( dynamic ) ; return vm ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { java.lang.Object [ ] args = invocation.getArguments ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage arg = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( args [ 0 ] ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > list = createDiskSnapshot ( arg.getId ( ) , 3 ) ; return list ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmTemplate getVmTemplate ( ) { return createVmTemplate ( ) ; }
Source:
public static void getMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; params.setRefresh ( false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , params , aQuery ) ; }
Source:
public void testRemoveNonExistant ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , false ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , false ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
private void attachDisk ( org.ovirt.engine.core.common.businessentities.Disk disk ) { org.ovirt.engine.core.bll.CloneVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AttachDiskToVm , new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) , disk.getId ( ) , disk.getPlugged ( ) , disk.getReadOnly ( ) ) ) ; }

Target:
private void attachDisk ( org.ovirt.engine.core.common.businessentities.Disk disk ) { org.ovirt.engine.core.bll.CloneVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.AttachDiskToVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) , disk.getId ( ) , disk.getPlugged ( ) , disk.getReadOnly ( ) ) ) ; }
Source:
public void mapPropertiesSyntaxNullValue ( ) { org.ovirt.engine.core.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.utils.customprop.CustomPropertiesUtils ( ) ; java.util.Map < java.lang.String , java.lang.String > propMap = new java.util.LinkedHashMap < > ( ) ; propMap.put ( "speed" , "1024" ) ; propMap.put ( "duplex" , null ) ; org.junit.Assert.assertTrue ( utils.syntaxErrorInProperties ( propMap ) ) ; }

Target:
public void mapPropertiesSyntaxNullValue ( ) { org.ovirt.engine.core.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.utils.customprop.CustomPropertiesUtils ( ) ; java.util.Map < java.lang.String , java.lang.String > propMap = new java.util.LinkedHashMap < > ( ) ; propMap.put ( "speed" , "1024" ) ; propMap.put ( "duplex" , null ) ; propMap.put ( "debug" , "" ) ; org.junit.Assert.assertFalse ( utils.syntaxErrorInProperties ( propMap ) ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageDomainAccessError : org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( VdcBllErrors.StorageDomainAccessError ) ; tempVar.setMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) . mMessage ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setVdsError ( tempVar ) ; break ; default : super . proceedProxyReturnValue ( ) ; initializeVdsError ( returnStatus ) ; break ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageDomainAccessError : org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( VdcBllErrors.StorageDomainAccessError ) ; tempVar.setMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) . mMessage ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setVdsError ( tempVar ) ; break ; default : super . proceedProxyReturnValue ( ) ; initializeVdsError ( returnStatus ) ; break ; } }
Source:
protected boolean performImagesChecks ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , true , true , false , false , true , true , getImagesList ( ) ) ; }

Target:
protected boolean performImagesChecks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImagesToCheck = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getImagesList ( ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( diskImagesToCheck ) ; return validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ; }
Source:
public void addISCSINonEmptyIqn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void addISCSIEmptyPort ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( newISCSIConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.VALIDATION_STORAGE_CONNECTION_INVALID_PORT ) ; }
Source:
private void initSorting ( ) { hostStatus.makeSortable ( ) ; nameColumn.makeSortable ( ) ; clusterColumn.makeSortable ( ) ; dcColumn.makeSortable ( ) ; nicStatusColumn.makeSortable ( new org.ovirt.engine.ui.common.widget.table.column.SimpleStatusColumnComparator < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > ( nicStatusColumn ) ) ; speedColumn.makeSortable ( ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > o1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > o2 ) { java.lang.String name1 = ( ( o1.getFirst ( ) ) == null ) ? null : o1.getFirst ( ) . getName ( ) ; java.lang.String name2 = ( ( o2.getFirst ( ) ) == null ) ? null : o2.getFirst ( ) . getName ( ) ; return lexoNumeric.compare ( name1 , name2 ) ; }
Source:
public boolean validateCustomProperties ( java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDbFacade ( ) . getStoragePoolDao ( ) . get ( getNetwork ( ) . getDataCenterId ( ) ) ; java.util.List < org.ovirt.engine.core.common.utils.customprop.ValidationError > errors = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . validateProperties ( dataCenter.getcompatibility_version ( ) , VmDeviceGeneralType.INTERFACE , vnicProfile.getCustomProperties ( ) ) ; if ( ! ( errors.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . handleCustomPropertiesError ( errors , messages ) ; return false ; } return true ; }

Target:
public boolean validateCustomProperties ( java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDbFacade ( ) . getStoragePoolDao ( ) . get ( getNetwork ( ) . getDataCenterId ( ) ) ; java.util.List < org.ovirt.engine.core.common.utils.customprop.ValidationError > errors = org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . validateProperties ( dataCenter.getCompatibilityVersion ( ) , VmDeviceGeneralType.INTERFACE , vnicProfile.getCustomProperties ( ) ) ; if ( ! ( errors.isEmpty ( ) ) ) { org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.getInstance ( ) . handleCustomPropertiesError ( errors , messages ) ; return false ; } return true ; }
Source:
protected void updateInputTitle ( java.util.ArrayList < java.lang.String > grayOutReasons , com.google.gwt.dom.client.Element input ) { java.lang.StringBuilder title = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.empty ( ) ) ; for ( java.lang.String reason : grayOutReasons ) { title.append ( reason ) . append ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.space ( ) ) ; } org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( title.toString ( ) ) , input , Placement.LEFT ) ; }

Target:
protected void updateInputTitle ( java.util.ArrayList < java.lang.String > grayOutReasons , com.google.gwt.dom.client.Element input ) { java.lang.StringBuilder title = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.empty ( ) ) ; for ( java.lang.String reason : grayOutReasons ) { title.append ( reason ) . append ( org.ovirt.engine.ui.common.widget.uicommon.storage.AbstractSanStorageList.constants.space ( ) ) ; } org.ovirt.engine.ui.common.widget.tooltip.ElementTooltipUtils.setTooltipOnElement ( title.toString ( ) , input ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddDiskCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK_TO_VM ; case END_SUCCESS : return org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; } }

Target:
private org.ovirt.engine.core.common.AuditLogType getEndSuccessAuditLogTypeValue ( boolean successful ) { boolean isVmNameExist = org.apache.commons.lang.StringUtils.isNotEmpty ( org.ovirt.engine.core.bll.AddDiskCommand.getVmName ( ) ) ; if ( successful ) { if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_SUCCESS ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_FINISHED_SUCCESS ; } } else { if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_FINISHED_FAILURE ; } } }
Source:
public void onModification ( ) { org.ovirt.engine.core.compat.Guid storageDomainId = getProviderStorageDomain ( ) . getId ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomainStatic domainStaticEntry = org.ovirt.engine.core.bll.provider.storage.AbstractOpenStackStorageProviderProxy.getDbFacade ( ) . getStorageDomainStaticDao ( ) . get ( storageDomainId ) ; domainStaticEntry.setStorageName ( provider.getName ( ) ) ; domainStaticEntry.setDescription ( provider.getDescription ( ) ) ; org.ovirt.engine.core.bll.provider.storage.AbstractOpenStackStorageProviderProxy.getDbFacade ( ) . getStorageDomainStaticDao ( ) . update ( domainStaticEntry ) ; }

Target:
public void onModification ( ) { org.ovirt.engine.core.compat.Guid storageDomainId = getProviderStorageDomain ( ) . getId ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomainStatic domainStaticEntry = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.StorageDomainStaticDao.class ) . get ( storageDomainId ) ; domainStaticEntry.setStorageName ( provider.getName ( ) ) ; domainStaticEntry.setDescription ( provider.getDescription ( ) ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.StorageDomainStaticDao.class ) . update ( domainStaticEntry ) ; }
Source:
public org.ovirt.engine.api.v3.types.V3Host get ( @ javax.ws.rs.core.Context javax.ws.rs.core.UriInfo ui ) { boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( ui , "force" , true , false ) ; if ( force ) { try { delegate.refresh ( new org.ovirt.engine.api.model.Action ( ) ) ; } catch ( javax.ws.rs.WebApplicationException exception ) { throw adaptException ( exception ) ; } } return adaptGet ( delegate :: get ) ; }

Target:
public org.ovirt.engine.api.v3.types.V3Host get ( @ javax.ws.rs.core.Context javax.ws.rs.core.UriInfo ui ) { boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( ui , "force" , true , false ) ; if ( force ) { try { getDelegate ( ) . refresh ( new org.ovirt.engine.api.model.Action ( ) ) ; } catch ( javax.ws.rs.WebApplicationException exception ) { throw adaptException ( exception ) ; } } return adaptGet ( getDelegate ( ) :: get ) ; }
Source:
public void getUpHostListByCluster ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public void getClustersHavingHosts ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void onSuccess ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > operation , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Frontend: sucessfully executed runAction, determining result!" ) ; handleActionResult ( actionType , parameters , result , ( callback != null ? callback : org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) , state , showErrorDialog ) ; org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent.fire ( this , state ) ; org.ovirt.engine.ui.frontend.communication.RefreshActiveModelEvent.fire ( this , true ) ; }

Target:
public void onSuccess ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > operation , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Frontend: sucessfully executed runAction, determining result!" ) ; handleActionResult ( actionType , parameters , result , ( callback != null ? callback : org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) , state , showErrorDialog ) ; fireAsyncOperationCompleteEvent ( state ) ; org.ovirt.engine.ui.frontend.communication.RefreshActiveModelEvent.fire ( this , true ) ; }
Source:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public java.lang.String getProperty ( java.lang.String key ) { java.lang.String value = values.get ( key ) ; if ( value == null ) { java.lang.String message = ( "The property \"" + key ) + "\" doesn\'t have a value." ; org.ovirt.engine.core.utils.LocalConfig.log.error ( message ) ; throw new java.lang.IllegalArgumentException ( message ) ; } return values.get ( key ) ; }

Target:
public java.lang.String getProperty ( java.lang.String key , boolean allowMissing ) { java.lang.String value = values.get ( key ) ; if ( ( value == null ) && ( ! allowMissing ) ) { java.lang.String message = ( "The property \"" + key ) + "\" doesn\'t have a value." ; org.ovirt.engine.core.utils.LocalConfig.log.error ( message ) ; throw new java.lang.IllegalArgumentException ( message ) ; } return value ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > createVmFromTemplateCommand ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.common.action.AddVmFromTemplateParameters param = new org.ovirt.engine.core.common.action.AddVmFromTemplateParameters ( ) ; param.setVm ( vm ) ; org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > concrete = new org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > ( param ) ; org.ovirt.engine.core.bll.AddVmFromTemplateCommand < org.ovirt.engine.core.common.action.AddVmFromTemplateParameters > result = org.powermock.api.mockito.PowerMockito.spy ( concrete ) ; org.powermock.api.mockito.PowerMockito.doReturn ( true ) . when ( result ) . checkNumberOfMonitors ( ) ; org.powermock.api.mockito.PowerMockito.doReturn ( java.util.Collections.EMPTY_LIST ) . when ( result ) . validateCustomProperties ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmStatic.class ) ) ; return result ; }

Target:
protected void initStoragePoolId ( ) { }
Source:
public static void initBalloonSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.balloonSupportMap = ( ( java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.Boolean > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetBalloonSupportMap ) , callback ) ; }

Target:
public void initDiskHotpluggableInterfacesMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { diskHotpluggableInterfacesMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDiskHotpluggableInterfacesMap ) , callback ) ; }
Source:
private void mockDaos ( ) { org.ovirt.engine.core.common.businessentities.VM vm = createVM ( VM_NAME , NETWORK_NAME ) ; org.mockito.Mockito.when ( vmDAO.getAllRunningForVds ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( vm ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDAO.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vm.getInterfaces ( ) ) ; }

Target:
private void mockDaos ( boolean pluggedInterface ) { org.ovirt.engine.core.common.businessentities.VM vm = createVM ( VM_NAME , NETWORK_NAME , pluggedInterface ) ; org.mockito.Mockito.when ( vmDAO.getAllRunningForVds ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( vm ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDAO.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vm.getInterfaces ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworkValidator ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setNetworkAttachments ( networkAttachments ) ; return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . build ( ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( nullParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getNetworkAttachments ( ) ) == null ) { parameters.setNetworkAttachments ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ( ) ) ; } parameters.getNetworkAttachments ( ) . addAll ( java.util.Arrays.asList ( networkAttachments ) ) ; return this ; }
Source:
public void testGetIscsiIfacesByHostIdAndStorageTargetId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces = dao.getIscsiIfacesByHostIdAndStorageTargetId ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.TARGET_ID ) ; org.junit.Assert.assertNotNull ( interfaces ) ; org.junit.Assert.assertFalse ( interfaces.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : interfaces ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , nic.getVdsId ( ) ) ; } }

Target:
public void testGetIscsiIfacesByHostIdAndStorageTargetId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces = dao.getIscsiIfacesByHostIdAndStorageTargetId ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.TARGET_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( interfaces ) ; org.junit.jupiter.api.Assertions.assertFalse ( interfaces.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : interfaces ) { org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , nic.getVdsId ( ) ) ; } }
Source:
public void testEvalNegative ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockVmNetworkInterface.isPlugged ( ) ) . thenReturn ( false ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.common.predicates.VmNetworkCanBeUpdatedPredicate.getInstance ( ) . eval ( mockVmNetworkInterface ) ) ; org.mockito.Mockito.verify ( mockVmNetworkInterface ) . isPlugged ( ) ; org.mockito.Mockito.verify ( mockVmNetworkInterface , org.mockito.Mockito.never ( ) ) . isLinked ( ) ; }

Target:
public void testEvalNegative ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockVmNetworkInterface.isPlugged ( ) ) . thenReturn ( false ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.common.predicates.VmNetworkCanBeUpdatedPredicate.getInstance ( ) . test ( mockVmNetworkInterface ) ) ; org.mockito.Mockito.verify ( mockVmNetworkInterface ) . isPlugged ( ) ; org.mockito.Mockito.verify ( mockVmNetworkInterface , org.mockito.Mockito.never ( ) ) . isLinked ( ) ; }
Source:
public void nameNotAvailable ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.Provider.AdditionalProperties > otherProvider = createProvider ( provider.getName ( ) ) ; org.mockito.Mockito.when ( ( ( org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.Provider.AdditionalProperties > ) ( providerDao.getByName ( provider.getName ( ) ) ) ) ) . thenReturn ( otherProvider ) ; org.junit.Assert.assertThat ( validator.nameAvailable ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; }

Target:
public void nameNotAvailable ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.Provider.AdditionalProperties > otherProvider = createProvider ( provider.getName ( ) ) ; org.mockito.Mockito.when ( ( ( org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.Provider.AdditionalProperties > ) ( providerDao.getByName ( provider.getName ( ) ) ) ) ) . thenReturn ( otherProvider ) ; org.junit.Assert.assertThat ( validator.nameAvailable ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED ) ) ; }
Source:
public void testRemoveWithHostId ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStorageDomain , org.ovirt.engine.core.common.action.RemoveStorageDomainParameters.class , new java.lang.String [ ] { "StorageDomainId" , "VdsId" , "DoFormat" } , new java.lang.Object [ ] { GUIDS [ 0 ] , GUIDS [ 1 ] , java.lang.Boolean.FALSE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendStorageDomainResource.HOST , GUIDS [ 1 ] . toString ( ) ) ; setUriInfo ( uriInfo ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemoveWithHostId ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( ActionType.RemoveStorageDomain , org.ovirt.engine.core.common.action.RemoveStorageDomainParameters.class , new java.lang.String [ ] { "StorageDomainId" , "VdsId" , "DoFormat" } , new java.lang.Object [ ] { GUIDS [ 0 ] , GUIDS [ 1 ] , java.lang.Boolean.FALSE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendStorageDomainResource.HOST , GUIDS [ 1 ] . toString ( ) ) ; setUriInfo ( uriInfo ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
private void validate ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel mgmtNetwork = networkMap.get ( HostInterfaceListModel.ENGINE_NETWORK_NAME ) ; if ( ! ( mgmtNetwork.isAttached ( ) ) ) { okCommand.getExecuteProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . mgmtNotAttachedToolTip ( ) ) ; okCommand.setIsExecutionAllowed ( false ) ; } else { okCommand.setIsExecutionAllowed ( true ) ; } }

Target:
private void validate ( ) { if ( ! ( managementNetworkModel.isAttached ( ) ) ) { okCommand.getExecuteProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . mgmtNotAttachedToolTip ( ) ) ; okCommand.setIsExecutionAllowed ( false ) ; } else { okCommand.setIsExecutionAllowed ( true ) ; } }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * ( super . hashCode ( ) ) ) + ( ( getBrickId ( ) ) == null ? 0 : getBrickId ( ) . hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , brickId ) ; }
Source:
private void updateChangeability ( ) { boolean enabled = getEnabled ( ) . getEntity ( ) ; getAverage ( ) . setIsChangable ( enabled ) ; getPeak ( ) . setIsChangable ( enabled ) ; getBurst ( ) . setIsChangable ( enabled ) ; }

Target:
private void updateChangeability ( ) { boolean enabled = ( getIsChangable ( ) ) && ( getEnabled ( ) . getEntity ( ) ) ; getAverage ( ) . setIsChangable ( enabled ) ; getPeak ( ) . setIsChangable ( enabled ) ; getBurst ( ) . setIsChangable ( enabled ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { setEnumTitle ( snapshot.getStatus ( ) ) ; switch ( snapshot.getStatus ( ) ) { case OK : return getCommonResources ( ) . snapshotImage ( ) ; case LOCKED : return getCommonResources ( ) . waitImage ( ) ; case IN_PREVIEW : return getCommonResources ( ) . snapshotImage ( ) ; default : return getCommonResources ( ) . snapshotImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { switch ( snapshot.getStatus ( ) ) { case OK : return org.ovirt.engine.ui.common.widget.table.column.SnapshotStatusColumn.resources.snapshotImage ( ) ; case LOCKED : return org.ovirt.engine.ui.common.widget.table.column.SnapshotStatusColumn.resources.waitImage ( ) ; case IN_PREVIEW : return org.ovirt.engine.ui.common.widget.table.column.SnapshotStatusColumn.resources.snapshotImage ( ) ; default : return org.ovirt.engine.ui.common.widget.table.column.SnapshotStatusColumn.resources.snapshotImage ( ) ; } }
Source:
private java.lang.String getNewMonitorSpecParams ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "vram=" ) ; sb.append ( VmDeviceCommonUtils.HIGH_VIDEO_MEM ) ; sb.append ( ",deviceId=" ) ; sb.append ( java.lang.String.valueOf ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ) ; return sb.toString ( ) ; }

Target:
private boolean isFirstMasterController ( java.lang.String model ) { return model.equalsIgnoreCase ( org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilder.FIRST_MASTER_MODEL ) ; }
Source:
public boolean Validate ( boolean isOVirt ) { getOVirtISO ( ) . setIsValid ( true ) ; getRootPassword ( ) . setIsValid ( true ) ; if ( isOVirt ) { getOVirtISO ( ) . ValidateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } else { getRootPassword ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } return ( getRootPassword ( ) . getIsValid ( ) ) && ( getOVirtISO ( ) . getIsValid ( ) ) ; }

Target:
public boolean Validate ( boolean isOVirt ) { getOVirtISO ( ) . setIsValid ( true ) ; getRootPassword ( ) . setIsValid ( true ) ; if ( isOVirt ) { getOVirtISO ( ) . ValidateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } else { getRootPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } return ( getRootPassword ( ) . getIsValid ( ) ) && ( getOVirtISO ( ) . getIsValid ( ) ) ; }
Source:
public void onTimeout ( ) { if ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler._nonOperationalPools.containsKey ( poolId ) ) { try { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( poolId ) ; if ( ( pool != null ) && ( ( pool.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPoolTreatment ( pool ) ; } } catch ( java.lang.Exception e ) { } } }

Target:
public void onTimeout ( ) { if ( org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPools.containsKey ( poolId ) ) { try { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( poolId ) ; if ( ( pool != null ) && ( ( pool.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.NotOperational ) ) ) { org.ovirt.engine.core.bll.storage.pool.StoragePoolStatusHandler.nonOperationalPoolTreatment ( pool ) ; } } catch ( java.lang.Exception e ) { } } }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase Login ( org.ovirt.engine.core.common.action.LoginUserParameters parameters ) { switch ( parameters.getActionType ( ) ) { case AutoLogin : case LoginAdminUser : { org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.CreateCommand ( parameters.getActionType ( ) , parameters ) ; return command.ExecuteAction ( ) ; } default : { return org.ovirt.engine.core.bll.Backend.NotAutorizedError ( ) ; } } }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase Login ( org.ovirt.engine.core.common.action.LoginUserParameters parameters ) { switch ( parameters.getActionType ( ) ) { case AutoLogin : case LoginUser : case LoginAdminUser : { org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.CreateCommand ( parameters.getActionType ( ) , parameters ) ; return command.ExecuteAction ( ) ; } default : { return org.ovirt.engine.core.bll.Backend.NotAutorizedError ( ) ; } } }
Source:
public org.ovirt.engine.core.bll.ValidationResult isLunDiskVisible ( final org.ovirt.engine.core.common.businessentities.storage.LUNs lun , org.ovirt.engine.core.common.businessentities.VDS vds ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = executeGetDeviceList ( vds.getId ( ) , lun.getLunType ( ) ) ; boolean lunExists = org.apache.commons.collections.CollectionUtils.exists ( luns , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.LUNs ) ( o ) ) . getId ( ) . equals ( lun.getId ( ) ) ; } } ) ; return lunExists ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_INVALID ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isLunDiskVisible ( final org.ovirt.engine.core.common.businessentities.storage.LUNs lun , org.ovirt.engine.core.common.businessentities.VDS vds ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = executeGetDeviceList ( vds.getId ( ) , lun.getLunType ( ) ) ; boolean lunExists = org.apache.commons.collections.CollectionUtils.exists ( luns , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.LUNs ) ( o ) ) . getId ( ) . equals ( lun.getId ( ) ) ; } } ) ; return lunExists ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_LUN_INVALID ) ; }