auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean isDiskLocked ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { return ( ( disk != null ) && ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) ) && ( ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.LOCKED ) ) ; }

Target:
private boolean isDiskLocked ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { return ( ( disk != null ) && ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) ) && ( ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ) ) ; }
Source:
private org.ovirt.engine.api.model.Networks mapCollection ( java.util.List < org.ovirt.engine.api.model.Network > entities ) { org.ovirt.engine.api.model.Networks collection = new org.ovirt.engine.api.model.Networks ( ) ; for ( org.ovirt.engine.api.model.Network entity : entities ) { collection.getNetworks ( ) . add ( addLinks ( map ( entity ) ) ) ; } return collection ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getAddParameters ( network , entity ) ; return performCreate ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }
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 org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse buildFailedResponse ( org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request ) { return org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.buildErrorResponse ( request.getId ( ) , 5022 , "Message timeout which can be caused by communication issues" ) ; }
Source:
public static void detachAllNetworks ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic , org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel dataFromHostSetupNetworksModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > attachedNetworks = nic.getItems ( ) ; if ( ( attachedNetworks.size ( ) ) > 0 ) { for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel : new java.util.ArrayList ( attachedNetworks ) ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.DETACH_NETWORK.getCommand ( networkModel , null , dataFromHostSetupNetworksModel ) . execute ( ) ; } } }

Target:
public static void detachAllNetworks ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic , org.ovirt.engine.ui.uicommonweb.models.hosts.network.DataFromHostSetupNetworksModel dataFromHostSetupNetworksModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > attachedNetworks = nic.getItems ( ) ; if ( ( attachedNetworks.size ( ) ) > 0 ) { for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel : attachedNetworks ) { boolean managedNetwork = ( networkModel.getNetworkAttachment ( ) ) != null ; if ( managedNetwork ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.DETACH_NETWORK.getCommand ( networkModel , null , dataFromHostSetupNetworksModel ) . execute ( ) ; } else { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.REMOVE_UNMANAGED_NETWORK.getCommand ( networkModel , null , dataFromHostSetupNetworksModel ) . execute ( ) ; } } } }
Source:
protected java.util.Collection < org.ovirt.engine.core.common.businessentities.VmTemplate > getEntitiesFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenterId ( storageDomainId ) , storageDomainId ) ; java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ret = getEntity ( java.util.HashMap.class , VdcQueryType.GetTemplatesFromExportDomain , params , ( "Templates under storage domain id : " + ( storageDomainId.toString ( ) ) ) ) ; return ret.keySet ( ) ; }

Target:
protected java.util.Collection < org.ovirt.engine.core.common.businessentities.VmTemplate > getEntitiesFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenterId ( storageDomainId ) , storageDomainId ) ; java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ret = getEntity ( java.util.HashMap.class , QueryType.GetTemplatesFromExportDomain , params , ( "Templates under storage domain id : " + ( storageDomainId.toString ( ) ) ) ) ; return ret.keySet ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.startSpice ( vdsIp , port , ticket ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionCreate ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionCreate ( volumeName , remoteHost , remoteVolumeName , userName , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > > aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public void testPatternBasedNameFails ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = createCommand ( initializeMock ( 1 , 1 ) ) ; cmd.getParameters ( ) . getVm ( ) . setName ( "aa-??bb" ) ; org.junit.Assert.assertFalse ( "Pattern-based name should not be supported for VM" , cmd.validateInputs ( ) ) ; }

Target:
public void refuseSoundDeviceOnPPC ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setSoundDeviceEnabled ( true ) ; org.mockito.Mockito.when ( osRepository.isSoundDeviceEnabled ( cmd.getParameters ( ) . getVm ( ) . getVmOsId ( ) , cmd.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }
Source:
private static java.lang.String chopStart ( java.lang.String str , java.lang.String chop ) { if ( str.startsWith ( chop ) ) { return str.substring ( chop.length ( ) ) ; } else { return str ; } }

Target:
private static java.lang.String getPath ( java.lang.Class < ? > clz ) { for ( java.lang.reflect.Method method : org.ovirt.engine.api.resource.SystemResource.class . getMethods ( ) ) { if ( ( method.getReturnType ( ) ) == clz ) { javax.ws.rs.Path annotation = method.getAnnotation ( javax.ws.rs.Path.class ) ; if ( annotation != null ) { return annotation.value ( ) ; } } } org.ovirt.engine.api.utils.LinkHelper.log.error ( ( ( "Can\'t find relative path for class \"" + ( clz.getName ( ) ) ) + "\", will return null" ) ) ; return null ; }
Source:
private java.lang.String generateConditionStatment ( org.ovirt.engine.core.searchbackend.SyntaxObject obj , java.util.ListIterator < org.ovirt.engine.core.searchbackend.SyntaxObject > objIter , final java.lang.String searchObjStr , final boolean caseSensitive , final boolean issafe ) { final java.lang.String safeValue = ( issafe ) ? obj.getBody ( ) : org.ovirt.engine.core.searchbackend.SqlInjectionChecker.enforceEscapeCharacters ( obj.getBody ( ) ) ; return generateSafeConditionStatement ( obj , objIter , searchObjStr , caseSensitive , safeValue ) ; }

Target:
private java.lang.String generateConditionStatment ( org.ovirt.engine.core.searchbackend.SyntaxObject obj , java.util.ListIterator < org.ovirt.engine.core.searchbackend.SyntaxObject > objIter , final java.lang.String searchObjStr , final boolean caseSensitive , final boolean issafe , final boolean useTags ) { final java.lang.String safeValue = ( issafe ) ? obj.getBody ( ) : org.ovirt.engine.core.searchbackend.SqlInjectionChecker.enforceEscapeCharacters ( obj.getBody ( ) ) ; return generateSafeConditionStatement ( obj , objIter , searchObjStr , caseSensitive , safeValue , useTags ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface FindInterfaceByIsBond ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : items ) { if ( ( ( i.getBonded ( ) ) != null ) && ( i.getBonded ( ) ) ) { return i ; } } return null ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface findInterfaceByIsBond ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : items ) { if ( ( ( i.getBonded ( ) ) != null ) && ( i.getBonded ( ) ) ) { return i ; } } return null ; }
Source:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
protected void auditLogMacInUse ( final org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "MACAddr" , iface.getMacAddress ( ) ) ; logable.addCustomValue ( "VmName" , iface.getVmName ( ) ) ; log ( logable , AuditLogType.MAC_ADDRESS_IS_IN_USE ) ; return null ; } } ) ; }

Target:
public void auditLogMacInUse ( final org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = createAuditLog ( iface ) ; log ( logable , AuditLogType.MAC_ADDRESS_IS_IN_USE ) ; log.warnFormat ( ( "Network Interface {0} has MAC address {1} which is in use, " + "therefore the action for VM {2} failed." ) , iface.getName ( ) , iface.getMacAddress ( ) , iface.getVmId ( ) ) ; return null ; } } ) ; }
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 getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackend ( cmd , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_DISABLE ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackendStatusChange ( cmd , false ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertFalse ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_DISABLE_FAILED ) ; }
Source:
public void removeNetworkFromParameters ( org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.Network net ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( net ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlan = getVlanDevice ( params.getInterfaces ( ) , nic , net ) ; if ( vlan == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.NETWORK_LABEL_CONFLICT ) ; } else { params.getInterfaces ( ) . remove ( vlan ) ; } } else if ( org.apache.commons.lang.StringUtils.equals ( net.getName ( ) , nic.getNetworkName ( ) ) ) { nic.setNetworkName ( null ) ; } }

Target:
private boolean isNetworkLabelExistInTargetHost ( java.lang.String networkName , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > targetNetworksByName ) { org.ovirt.engine.core.common.businessentities.network.Network targetNetwork = targetNetworksByName.get ( networkName ) ; return ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( targetNetwork ) ) && ( isHostContainLabel ( targetNetwork.getLabel ( ) ) ) ; }
Source:
public void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > getNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( osType ) ) { if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < java.lang.String > nics = ( ( java.util.ArrayList < java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > interfaceTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( ) ; for ( java.lang.String nic : nics ) { try { interfaceTypes.add ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.valueOf ( nic ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } } chainedCallback.onSuccess ( model , interfaceTypes ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( returnValue ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; initSoundCard ( vm.getId ( ) ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( S object ) { org.ovirt.engine.core.common.businessentities.VDS host = getValue ( object ) ; if ( ( host != null ) && ( host.isUpdateAvailable ( ) ) ) { java.lang.String tooltip = org.ovirt.engine.ui.webadmin.widget.table.column.HostAdditionalStatusColumn.constants.updateAvailable ( ) ; return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( tooltip ) ; } return null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getEntityTooltip ( org.ovirt.engine.core.common.businessentities.VDS object ) { java.util.Map < com.google.gwt.safehtml.shared.SafeHtml , java.lang.String > imagesToText = getSafeHtmlStringMap ( object ) ; if ( ! ( imagesToText.isEmpty ( ) ) ) { return org.ovirt.engine.ui.webadmin.widget.table.column.MultiImageColumnHelper.getTooltip ( imagesToText ) ; } return null ; }
Source:
public 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
private void optimizationForDesktopFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationForDesktop ( ) ) != null ) && ( ( object.getOptimizationForDesktop ( ) . getEntity ( ) ) != null ) ) { optimizationForDesktopEditor.asRadioButton ( ) . setHTML ( templates.radioButtonLabel ( messages.clusterPopupMemoryOptimizationForDesktopLabel ( object.getOptimizationForDesktop ( ) . getEntity ( ) . toString ( ) ) ) ) ; } }

Target:
private void optimizationForDesktopFormatter ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel object ) { if ( ( ( object.getOptimizationForDesktop ( ) ) != null ) && ( ( object.getOptimizationForDesktop ( ) . getEntity ( ) ) != null ) ) { optimizationForDesktopEditor.setLabel ( messages.clusterPopupMemoryOptimizationForDesktopLabel ( object.getOptimizationForDesktop ( ) . getEntity ( ) . toString ( ) ) ) ; } }
Source:
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 ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
private java.lang.String getToolTip ( org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus status ) { switch ( status ) { case DOWN : return constants.down ( ) ; case UP : return constants.up ( ) ; case SOME_BRICKS_DOWN : return constants.volumeBricksDown ( ) ; case ALL_BRICKS_DOWN : return constants.volumeAllBricksDown ( ) ; default : return constants.down ( ) ; } }

Target:
private java.lang.String getToolTip ( org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus status ) { switch ( status ) { case DOWN : return org.ovirt.engine.ui.webadmin.widget.table.cell.VolumeStatusCell.constants.down ( ) ; case UP : return org.ovirt.engine.ui.webadmin.widget.table.cell.VolumeStatusCell.constants.up ( ) ; case SOME_BRICKS_DOWN : return org.ovirt.engine.ui.webadmin.widget.table.cell.VolumeStatusCell.constants.volumeBricksDown ( ) ; case ALL_BRICKS_DOWN : return org.ovirt.engine.ui.webadmin.widget.table.cell.VolumeStatusCell.constants.volumeAllBricksDown ( ) ; default : return org.ovirt.engine.ui.webadmin.widget.table.cell.VolumeStatusCell.constants.down ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.network lookupNetwork ( org.ovirt.engine.core.compat.Guid id , java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.network entity : getBackendCollection ( queryType , getQueryParameters ( ) ) ) { if ( ( ( id != null ) && ( id.equals ( entity.getId ( ) ) ) ) || ( ( name != null ) && ( name.equals ( entity.getname ( ) ) ) ) ) { return entity ; } } return null ; }

Target:
public org.ovirt.engine.api.model.Network lookupNetwork ( org.ovirt.engine.core.compat.Guid id , java.lang.String name ) { for ( org.ovirt.engine.api.model.Network entity : getBackendCollection ( queryType , getQueryParameters ( ) ) ) { if ( ( ( id != null ) && ( id.equals ( entity.getId ( ) ) ) ) || ( ( name != null ) && ( name.equals ( entity.getname ( ) ) ) ) ) { return entity ; } } return null ; }
Source:
public 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 ) ; }

Target:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getStoragePoolId ( org.ovirt.engine.api.model.Action action ) { if ( action.getStorageDomain ( ) . isSetId ( ) ) { return getDataCenterId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( action.getStorageDomain ( ) . getId ( ) ) ) ; } else { return getDataCenterId ( lookupStorageDomainIdByName ( action.getStorageDomain ( ) . getName ( ) ) ) ; } }

Target:
public org.ovirt.engine.core.compat.Guid getStoragePoolId ( org.ovirt.engine.api.model.Action action ) { if ( action.getStorageDomain ( ) . isSetId ( ) ) { return getDataCenterId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( action.getStorageDomain ( ) . getId ( ) ) ) ; } else { return getDataCenterId ( lookupStorageDomainIdByName ( action.getStorageDomain ( ) . getName ( ) ) ) ; } }
Source:
public void validateFailedGuestOsIsNotSupported ( ) { mockInterfaceList ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = mockVmStatusUp ( ) ; vm.setVmOs ( 15 ) ; createVirtIODisk ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getOsName ( 15 ) ) . thenReturn ( "RHEL3x64" ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getDiskHotpluggableInterfaces ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.emptySet ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; }

Target:
public void validateFailedGuestOsIsNotSupported ( ) { mockInterfaceList ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = mockVmStatusUp ( ) ; vm.setVmOs ( 15 ) ; createVirtIODisk ( ) ; org.mockito.Mockito.when ( osRepository.getOsName ( 15 ) ) . thenReturn ( "RHEL3x64" ) ; org.mockito.Mockito.when ( osRepository.getDiskHotpluggableInterfaces ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.emptySet ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ; }
Source:
protected void mockFenceActionResults ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult [ ] results ) { org.mockito.stubbing.OngoingStubbing < org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult > fenceMethodResult = org.mockito.Mockito.when ( fenceAgentExecutor.fence ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.FenceAgent.class ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result : results ) { fenceMethodResult = fenceMethodResult.thenReturn ( result ) ; } }

Target:
protected void mockFenceActionResults ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult [ ] results ) { org.mockito.stubbing.OngoingStubbing < org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult > fenceMethodResult = org.mockito.Mockito.when ( fenceAgentExecutor.fence ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent.class ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result : results ) { fenceMethodResult = fenceMethodResult.thenReturn ( result ) ; } }
Source:
protected void executeCommand ( ) { java.sql.Time originalExecutionTime = getSchedule ( ) . getExecutionTime ( ) ; java.lang.String jobId = scheduleJob ( ) ; if ( jobId != null ) { setSucceeded ( true ) ; getSchedule ( ) . setJobId ( jobId ) ; getSchedule ( ) . setExecutionTime ( originalExecutionTime ) ; getGlusterVolumeSnapshotScheduleDao ( ) . save ( getSchedule ( ) ) ; } else { setSucceeded ( false ) ; } }

Target:
protected void executeCommand ( ) { java.sql.Time originalExecutionTime = getSchedule ( ) . getExecutionTime ( ) ; try { java.lang.String jobId = scheduleJob ( ) ; setSucceeded ( true ) ; getSchedule ( ) . setJobId ( jobId ) ; getSchedule ( ) . setExecutionTime ( originalExecutionTime ) ; getGlusterVolumeSnapshotScheduleDao ( ) . save ( getSchedule ( ) ) ; } catch ( java.lang.Exception ex ) { setSucceeded ( false ) ; handleVdsError ( AuditLogType.GLUSTER_VOLUME_SNAPSHOT_SCHEDULE_FAILED , ex.getMessage ( ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = super . getPermissionCheckSubjects ( ) ; if ( needPermissionForConnectingToConsole ( ) ) { permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.SetVmTicketCommand.getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.common.businessentities.ActionGroup.RECONNECT_TO_VM , org.ovirt.engine.core.common.errors.VdcBllMessages.USER_CANNOT_FORCE_RECONNECT_TO_VM ) ) ; neededPermissions = true ; } return permissions ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissions = super . getPermissionCheckSubjects ( ) ; if ( needPermissionForConnectingToConsole ( ) ) { permissions.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.SetVmTicketCommand.getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.common.businessentities.ActionGroup.RECONNECT_TO_VM , org.ovirt.engine.core.common.errors.EngineMessage.USER_CANNOT_FORCE_RECONNECT_TO_VM ) ) ; neededPermissions = true ; } return permissions ; }
Source:
private void IsAutoAssign_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getIsAutoAssign ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getRunVMOnSpecificHost ( ) ) ; clearAndDisable ( getHostCpu ( ) ) ; } else { getRunVMOnSpecificHost ( ) . setIsChangable ( true ) ; } behavior.updateCpuPinningVisibility ( ) ; }

Target:
public void setMigrationMode ( org.ovirt.engine.core.common.businessentities.MigrationSupport value ) { getMigrationMode ( ) . setSelectedItem ( value ) ; }
Source:
public void setHasAnyAlert ( ) { setHasAnyAlert ( ( ( ( ( ( ( ( getHasNICsAlert ( ) ) || ( getHasUpgradeAlert ( ) ) ) || ( getHasManualFenceAlert ( ) ) ) || ( getHasNoPowerManagementAlert ( ) ) ) || ( getHasReinstallAlertNonResponsive ( ) ) ) || ( getHasReinstallAlertInstallFailed ( ) ) ) || ( getHasReinstallAlertMaintenance ( ) ) ) ) ; }

Target:
public void setHasAnyAlert ( ) { setHasAnyAlert ( ( ( ( ( ( ( ( ( getHasNICsAlert ( ) ) || ( getHasUpgradeAlert ( ) ) ) || ( getHasManualFenceAlert ( ) ) ) || ( getHasNoPowerManagementAlert ( ) ) ) || ( getHasReinstallAlertNonResponsive ( ) ) ) || ( getHasReinstallAlertInstallFailed ( ) ) ) || ( getHasReinstallAlertMaintenance ( ) ) ) || ( getHasGlusterDisconnectedAlert ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( getSucceeded ( ) ) { return org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_SNAPSHOT_RESCHEDULED ; } else { return ( errorType ) == null ? org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_SNAPSHOT_RESCHEDULE_FAILED : errorType ; } }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( getSucceeded ( ) ) { if ( getSchedule ( ) . getRecurrence ( ) . equals ( GlusterVolumeSnapshotScheduleRecurrence.UNKNOWN ) ) { return org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_SNAPSHOT_SCHEDULE_DELETED ; } else { return org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_SNAPSHOT_RESCHEDULED ; } } else { return ( errorType ) == null ? org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_SNAPSHOT_RESCHEDULE_FAILED : errorType ; } }
Source:
private void validateQuota ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getQuotaId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Quota quota = getQuotaDao ( ) . getById ( vm.getQuotaId ( ) ) ; if ( quota == null ) { vm.setQuotaId ( null ) ; } } }

Target:
private void validateQuota ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getQuotaId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Quota quota = quotaDao.getById ( vm.getQuotaId ( ) ) ; if ( quota == null ) { vm.setQuotaId ( null ) ; } } }
Source:
public static org.ovirt.engine.api.model.PermitType map ( org.ovirt.engine.core.common.businessentities.ActionGroup entity , org.ovirt.engine.api.model.PermitType template ) { try { return org.ovirt.engine.api.model.PermitType.valueOf ( entity ) ; } catch ( java.lang.IllegalArgumentException e ) { org.ovirt.engine.api.restapi.types.PermitMapper.log.error ( new org.ovirt.engine.api.restapi.utils.MappingException ( ( ( ( "Missing mapping " + entity ) + " --> " ) + ( org.ovirt.engine.api.model.PermitType.class . getName ( ) ) ) , e ) ) ; return null ; } }

Target:
public static org.ovirt.engine.api.model.PermitType map ( org.ovirt.engine.core.common.businessentities.ActionGroup entity , org.ovirt.engine.api.model.PermitType template ) { try { return org.ovirt.engine.api.model.PermitType.valueOf ( entity ) ; } catch ( java.lang.IllegalArgumentException e ) { org.ovirt.engine.api.restapi.types.PermitMapper.log.error ( "Missing mapping '{}' --> '{}': {}" , entity , org.ovirt.engine.api.model.PermitType.class . getName ( ) , e.getMessage ( ) ) ; org.ovirt.engine.api.restapi.types.PermitMapper.log.error ( "Exception" , e ) ; return null ; } }
Source:
private void PrepareSanStorageForEdit ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model ) { org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( getSelectedItem ( ) ) ) ; model.setStorageDomain ( storage ) ; }

Target:
private void PrepareSanStorageForEdit ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model ) { org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetLunsByVgId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( model , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.ApplyData ( lunList , true ) ; } } ) , storage.getstorage ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePool dataCenter : dataCenters ) { reportModel.addDataCenterID ( dataCenter.getId ( ) . toString ( ) ) ; } if ( reportModel == null ) { return ; } setWidgetModel ( reportModel ) ; }

Target:
private void handleDomainAlreadyExists ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storages ) { java.lang.String storageName = storages.get ( 0 ) . getStorageName ( ) ; onFinish ( context , false , storageModel , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . createFailedDomainAlreadyExistStorageMsg ( storageName ) ) ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
protected void createNumOfDesktopEditors ( ) { numOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor ( ) ; incraseNumOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxOnlyEditor ( new org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer < java.lang.Integer > ( ) , new com.google.gwt.text.shared.Parser < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer parse ( java.lang.CharSequence text ) throws java.text.ParseException { return numOfVmsEditor.asEditor ( ) . getValue ( ) ; } } ) ; }

Target:
protected void createNumOfDesktopEditors ( ) { numOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor ( ) ; increaseNumOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxEditor ( new org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer < java.lang.Integer > ( ) , new com.google.gwt.text.shared.Parser < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer parse ( java.lang.CharSequence text ) throws java.text.ParseException { return numOfVmsEditor.asEditor ( ) . getValue ( ) ; } } ) ; }
Source:
void pluginFailed ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin ) { com.google.gwt.dom.client.Document.get ( ) . getBody ( ) . removeChild ( plugin.getIFrameElement ( ) ) ; plugin.markAsFailed ( ) ; org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.warning ( ( ( "Plugin [" + ( plugin.getMetaData ( ) . getName ( ) ) ) + "] removed from service due to failure" ) ) ; }

Target:
void registerPluginEventHandlerObject ( java.lang.String pluginName , com.google.gwt.core.client.JavaScriptObject pluginEventHandlerObject ) { org.ovirt.engine.ui.webadmin.plugin.Plugin plugin = getPlugin ( pluginName ) ; if ( ( plugin == null ) || ( pluginEventHandlerObject == null ) ) { return ; } if ( ( plugin.getEventHandlerObject ( ) ) == null ) { plugin.setEventHandlerObject ( pluginEventHandlerObject ) ; org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.info ( ( ( "Plugin [" + pluginName ) + "] has registered the event handler object" ) ) ; } else { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.warning ( ( ( "Plugin [" + pluginName ) + "] has already registered the event handler object" ) ) ; } }