auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.VDS > findAllVDSByPmEnabled ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > items ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS i : items ) { if ( i.isPmEnabled ( ) ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.Collection < org.ovirt.engine.core.common.businessentities.VDS > findAllVDSByPmEnabled ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > items ) { return org.ovirt.engine.ui.uicommonweb.Linq.where ( items , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.VDS > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.VDS i ) { return i.isPmEnabled ( ) ; } } ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean interfaceHasSiblingVlanInterfaces = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! interfaceHasSiblingVlanInterfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaceList ) { if ( java.util.Objects.equals ( i.getBondName ( ) , vlanParent.getName ( ) ) ) { ifacesOptions.add ( i ) ; } } } defaultInterfaceName.append ( vlanParent.getName ( ) ) ; asyncQuery.asyncCallback.onSuccess ( asyncQuery.model , ifacesOptions ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Quota > convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotaList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Quota > ) ( returnValue ) ) ; if ( ( quotaList != null ) && ( ! ( quotaList.isEmpty ( ) ) ) ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.Quota > comparator = ( ( topId ) == null ) ? org.ovirt.engine.ui.uicommonweb.comparators.QuotaComparator.NAME : org.ovirt.engine.ui.uicommonweb.comparators.QuotaComparator.withTopId ( topId , QuotaComparator.NAME ) ; java.util.Collections.sort ( quotaList , comparator ) ; } return quotaList ; }
Source:
private void doTestBadAddTag ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.AddTag , org.ovirt.engine.core.common.action.TagsOperationParameters.class , new java.lang.String [ ] { "Tag.TagName" , "Tag.ParentId" } , new java.lang.Object [ ] { NAMES [ 0 ] , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.PARENT_GUID } , valid , success ) ) ; try { collection.add ( org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddTag ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.AddTag , org.ovirt.engine.core.common.action.TagsOperationParameters.class , new java.lang.String [ ] { "Tag.TagName" , "Tag.ParentId" } , new java.lang.Object [ ] { NAMES [ 0 ] , org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.PARENT_GUID } , valid , success ) ) ; try { collection.add ( org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void onAsyncOperationComplete ( org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent event ) { if ( ( ( event.getTarget ( ) ) != ( getModel ( ) ) ) || ( ( asyncOperationCounter ) == 0 ) ) { return ; } ( asyncOperationCounter ) -- ; if ( ( asyncOperationCounter ) == 0 ) { getModel ( ) . stopProgress ( ) ; } }

Target:
public void onAsyncOperationComplete ( org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent event ) { if ( ( ( event.getTarget ( ) ) != ( getModel ( ) ) ) || ( ( getModel ( ) . getProgress ( ) ) != null ) ) { return ; } ( asyncOperationCounter ) -- ; if ( ( asyncOperationCounter ) == 0 ) { stopProgress ( ) ; } }
Source:
public static void getDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > getDiskImageListFromDiskMap ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > diskMap ) { return new java.util.ArrayList ( org.ovirt.engine.core.utils.linq.LinqUtils.foreach ( diskMap.values ( ) , new org.ovirt.engine.core.utils.linq.Function < org.ovirt.engine.core.common.businessentities.Disk , org.ovirt.engine.core.common.businessentities.DiskImage > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.DiskImage eval ( org.ovirt.engine.core.common.businessentities.Disk disk ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) ; } } ) ) ; }

Target:
private static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDiskImageListFromDiskMap ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.Disk > diskMap ) { return new java.util.ArrayList ( org.ovirt.engine.core.utils.linq.LinqUtils.transformToList ( diskMap.values ( ) , new org.ovirt.engine.core.utils.linq.Function < org.ovirt.engine.core.common.businessentities.storage.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.storage.DiskImage eval ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; } } ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getMigrableVmsRunningOnVds ( org.ovirt.engine.core.compat.Guid hostId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsFromDB = getVmDao ( ) . getAllRunningForVds ( hostId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( vmsFromDB , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.VM v ) { return ( v.getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ; } } ) ; return vms ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getSecondaryDestinations ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > candidateHosts , java.util.Map < java.lang.String , java.lang.String > parameters ) { long requiredMemory = ( parameters.containsKey ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) ? java.lang.Long.valueOf ( parameters.get ( org.ovirt.engine.core.bll.scheduling.policyunits.HIGH_MEMORY_LIMIT_FOR_UNDER_UTILIZED ) ) : 0L ; return getUnderUtilizedMemoryHosts ( candidateHosts , requiredMemory , 0 ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1000 ; }

Target:
public void getMaxVmsInPool ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 1000 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; getView ( ) . setDetachAllVisible ( ( ( java.lang.Boolean ) ( entity.getEntity ( ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; boolean inputFieldsEnabled = ( ( java.lang.Boolean ) ( entity.getEntity ( ) ) ) ; getView ( ) . setInputFieldsEnabled ( inputFieldsEnabled ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterSnapshotInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotList" ) . withOptionalParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterVolumeSnapshotList ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotList" ) . withOptionalParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , response ) ; }
Source:
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 ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private void updateDiskImagesToIllegal ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshotDisks = org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getDiskImageDAO ( ) . getAllSnapshotsForImageGroup ( diskImage.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskSnapshot : snapshotDisks ) { diskSnapshot.setvm_snapshot_id ( null ) ; diskSnapshot.setimageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getImageDao ( ) . update ( diskSnapshot.getImage ( ) ) ; } }

Target:
private void updateDiskImagesToIllegal ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshotDisks = org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( diskImage.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskSnapshot : snapshotDisks ) { diskSnapshot.setvm_snapshot_id ( null ) ; diskSnapshot.setimageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getImageDao ( ) . update ( diskSnapshot.getImage ( ) ) ; } }
Source:
protected java.util.Map < java.lang.String , java.lang.String > createPortAllocationRuntimeProperties ( com.woorea.openstack.quantum.model.Port port ) { java.util.Map < java.lang.String , java.lang.String > runtimeProperties = super . createPortAllocationRuntimeProperties ( port ) ; runtimeProperties.put ( "plugin_type" , provider.getAdditionalProperties ( ) . getPluginType ( ) ) ; return runtimeProperties ; }

Target:
protected java.util.Map < java.lang.String , java.lang.String > createPortAllocationRuntimeProperties ( com.woorea.openstack.quantum.model.Port port ) { java.util.Map < java.lang.String , java.lang.String > runtimeProperties = super . createPortAllocationRuntimeProperties ( port ) ; runtimeProperties.put ( "plugin_type" , getProvider ( ) . getAdditionalProperties ( ) . getPluginType ( ) ) ; return runtimeProperties ; }
Source:
public static 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 static 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 void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getClusterFeaturesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.Network nwk ) { setEnumTitle ( nwk.getCluster ( ) . getstatus ( ) ) ; switch ( nwk.getCluster ( ) . getstatus ( ) ) { case Operational : return getApplicationResources ( ) . upImage ( ) ; case NonOperational : return getApplicationResources ( ) . downImage ( ) ; default : return getApplicationResources ( ) . downImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.network_cluster net_cluster ) { setEnumTitle ( net_cluster.getstatus ( ) ) ; switch ( net_cluster.getstatus ( ) ) { case Operational : return getApplicationResources ( ) . upImage ( ) ; case NonOperational : return getApplicationResources ( ) . downImage ( ) ; default : return getApplicationResources ( ) . downImage ( ) ; } }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel > getClusterGlusterHookListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel.class , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel > getClusterGlusterHookListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector , final com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > confirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel.class , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel.class ) { @ java.lang.Override public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGlusterHookListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getDisableHookCommand ( ) ) ) { return confirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } } } ; }
Source:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
private static void runActionExecutionFailed ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.errors.VdcFault fault ) { if ( ( org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) ) != null ) { java.lang.String translatedMessage = org.ovirt.engine.ui.frontend.Frontend.vdsmErrorsTranslator.TranslateErrorTextSingle ( ( ( fault.getError ( ) ) == null ? fault.getMessage ( ) : fault.getError ( ) . toString ( ) ) ) ; fault.setMessage ( translatedMessage ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runActionExecutionFailed ( actionType , fault ) ; } }

Target:
public static org.ovirt.engine.ui.frontend.ErrorTranslator getVdsmErrorsTranslator ( ) { if ( ( org.ovirt.engine.ui.frontend.Frontend.vdsmErrorsTranslator ) == null ) { org.ovirt.engine.ui.frontend.Frontend.setVdsmErrorsTranslator ( new org.ovirt.engine.ui.frontend.ErrorTranslator ( ( ( org.ovirt.engine.ui.frontend.VdsmErrors ) ( com.google.gwt.core.client.GWT.create ( org.ovirt.engine.ui.frontend.VdsmErrors.class ) ) ) ) ) ; } return org.ovirt.engine.ui.frontend.Frontend.vdsmErrorsTranslator ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; setvmBasicDiskListModel ( new org.ovirt.engine.ui.uicommonweb.models.userportal.VmBasicDiskListModel ( ) ) ; org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( getvmBasicDiskListModel ( ) ) ; setDetailModels ( list ) ; setActiveDetailModel ( getvmBasicDiskListModel ( ) ) ; }

Target:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; setvmBasicDiskListModel ( new org.ovirt.engine.ui.uicommonweb.models.userportal.VmBasicDiskListModel ( ) ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( getvmBasicDiskListModel ( ) ) ; setDetailModels ( list ) ; setActiveDetailModel ( getvmBasicDiskListModel ( ) ) ; }
Source:
public void unmanagedNetworkAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( "net" ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_DONT_EXIST_IN_CLUSTER , nic.getNetworkName ( ) ) ; }

Target:
public void unmanagedNetworkAddedToNic ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( "net" ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , EngineMessage.NETWORKS_DONT_EXIST_IN_CLUSTER , nic.getNetworkName ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.CommandEntity getCommandEntity ( org.ovirt.engine.core.bll.tasks.interfaces.CommandCoordinator coco , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( cmdId ) ; if ( cmdEntity == null ) { cmdEntity = coco.createCommandEntity ( cmdId , VdcActionType.Unknown , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ) ; } return cmdEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.CommandEntity getCommandEntity ( org.ovirt.engine.core.bll.tasks.interfaces.CommandCoordinator coco , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( cmdId ) ; if ( cmdEntity == null ) { cmdEntity = coco.createCommandEntity ( cmdId , ActionType.Unknown , new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ) ; } return cmdEntity ; }
Source:
private void runHttpMethod ( org.apache.commons.httpclient.HttpClient httpClient , org.apache.commons.httpclient.HttpMethod httpMethod ) { try { int result = httpClient.executeMethod ( httpMethod ) ; if ( result != ( java.net.HttpURLConnection.HTTP_OK ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE ) ; } } catch ( org.apache.commons.httpclient.HttpException e ) { handleException ( e ) ; } catch ( javax.net.ssl.SSLException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_SSL_FAILURE , e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { handleException ( e ) ; } }

Target:
private void runHttpMethod ( org.apache.commons.httpclient.HttpClient httpClient , org.apache.commons.httpclient.HttpMethod httpMethod ) { try { int result = httpClient.executeMethod ( httpMethod ) ; if ( ( result != ( java.net.HttpURLConnection.HTTP_OK ) ) && ( result != ( java.net.HttpURLConnection.HTTP_MOVED_TEMP ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE ) ; } } catch ( org.apache.commons.httpclient.HttpException e ) { handleException ( e ) ; } catch ( javax.net.ssl.SSLException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_SSL_FAILURE , e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { handleException ( e ) ; } }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; loginButton.setText ( constants.loginButtonLabel ( ) ) ; }

Target:
private void addStyles ( ) { userNameEditor.hideLabel ( ) ; passwordEditor.hideLabel ( ) ; domainEditor.hideLabel ( ) ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > getLUNs ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > luns = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.LUNs lun = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; lun.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; luns.add ( lun ) ; return luns ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLUNs ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; luns.add ( lun ) ; return luns ; }
Source:
public void getVmNicList ( 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.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public boolean matches ( java.lang.Object argument ) { if ( ! ( argument instanceof java.util.ArrayList ) ) { return false ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ids = ( ( java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ) ( argument ) ) ; return ( ( ids.size ( ) ) == ( removedBrickIds.size ( ) ) ) && ( removedBrickIds.containsAll ( ids ) ) ; }

Target:
public boolean matches ( java.lang.Object argument ) { if ( ! ( argument instanceof java.util.Collection ) ) { return false ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.Collection < org.ovirt.engine.core.compat.Guid > ids = ( ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ) ( argument ) ) ; return ( ( ids.size ( ) ) == ( removedBrickIds.size ( ) ) ) && ( removedBrickIds.containsAll ( ids ) ) ; }
Source:
protected void handleAutoLogin ( org.ovirt.engine.ui.common.auth.AutoLoginData autoLoginData ) { final org.ovirt.engine.core.common.businessentities.DbUser loggedUser = autoLoginData.getDbUser ( ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { lockInteractionManager.showLoadingIndicator ( ) ; getLoginModel ( ) . autoLogin ( loggedUser ) ; } } ) ; user.setAutoLogin ( true ) ; }

Target:
public void execute ( ) { restApiSessionManager.reuseSession ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkCluster getManagementNetworkCluster ( ) { if ( ( managementNetworkCluster ) == null ) { org.ovirt.engine.core.compat.Guid clusterId = networkCluster.getClusterId ( ) ; final org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil managementNetworkUtil = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil.class ) ; org.ovirt.engine.core.common.businessentities.network.Network mgmt = managementNetworkUtil.getManagementNetwork ( clusterId ) ; managementNetworkCluster = getNetworkClusterDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.network.NetworkClusterId ( clusterId , mgmt.getId ( ) ) ) ; } return managementNetworkCluster ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkCluster getManagementNetworkCluster ( ) { if ( ( managementNetworkCluster ) == null ) { org.ovirt.engine.core.compat.Guid clusterId = networkCluster.getClusterId ( ) ; final org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil managementNetworkUtil = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil.class ) ; org.ovirt.engine.core.common.businessentities.network.Network mgmt = managementNetworkUtil.getManagementNetwork ( clusterId ) ; managementNetworkCluster = org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.getNetworkClusterDao ( ) . get ( new org.ovirt.engine.core.common.businessentities.network.NetworkClusterId ( clusterId , mgmt.getId ( ) ) ) ; } return managementNetworkCluster ; }
Source:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { if ( org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debugFormat ( "LoginAdminUser: User logged to admin using role {0}" , r.getname ( ) ) ; } return true ; } } return false ; }

Target:
public static boolean isAdminUser ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { java.util.List < org.ovirt.engine.core.common.businessentities.Role > userRoles = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getRoleDAO ( ) . getAllForUserAndGroups ( user.getId ( ) , org.apache.commons.lang.StringUtils.join ( user.getGroupIds ( ) , "," ) ) ; for ( org.ovirt.engine.core.common.businessentities.Role r : userRoles ) { if ( ( r.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.log.debug ( "LoginAdminUser: User logged to admin using role '{}'" , r.getname ( ) ) ; return true ; } } return false ; }
Source:
public void getClusterListByName ( 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public void getClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void getUsbPolicyUsbTypeNull31 ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_1 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup ) , UsbPolicy.ENABLED_NATIVE ) ; }

Target:
public void getUsbPolicyUsbTypeLegacy ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "legacy" ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getcompatibility_version ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }
Source:
private java.util.Map < java.lang.String , java.lang.String > getVnicCustomProperties ( org.ovirt.engine.core.compat.Guid vnicProfileId ) { java.util.Map < java.lang.String , java.lang.String > customProperties = null ; if ( vnicProfileId != null ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile profile = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVnicProfileDao ( ) . get ( vnicProfileId ) ; customProperties = ( profile == null ) ? null : profile.getCustomProperties ( ) ; } return customProperties == null ? new java.util.HashMap < java.lang.String , java.lang.String > ( ) : customProperties ; }

Target:
public static java.util.Map < java.lang.String , java.lang.String > getVnicCustomProperties ( org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile ) { java.util.Map < java.lang.String , java.lang.String > customProperties = null ; if ( vnicProfile != null ) { customProperties = vnicProfile.getCustomProperties ( ) ; } return customProperties == null ? new java.util.HashMap < java.lang.String , java.lang.String > ( ) : customProperties ; }
Source:
public javax.ws.rs.core.Response remove ( org.ovirt.engine.api.model.Action action ) { get ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connection.setid ( id ) ; org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.compat.Guid.Empty ; if ( ( action != null ) && ( action.isSetHost ( ) ) ) { hostId = getHostId ( action.getHost ( ) ) ; } org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( connection , hostId ) ; return performAction ( VdcActionType.RemoveStorageServerConnection , parameters ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connection.setid ( id ) ; java.lang.String host = org.ovirt.engine.api.common.util.QueryHelper.getMatrixConstraint ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendStorageServerConnectionResource.HOST ) ; org.ovirt.engine.core.compat.Guid hostId = org.ovirt.engine.core.compat.Guid.Empty ; if ( host != null ) { hostId = getHostId ( host ) ; } org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( connection , hostId ) ; return performAction ( VdcActionType.RemoveStorageServerConnection , parameters ) ; }
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.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 ) ; }

Target:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( ) { if ( hasTaskHandlers ( ) ) { if ( ( getParameters ( ) . getExecutionReason ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; } return getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return getTaskType ( ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { persistCommand ( parentCommand , false ) ; }
Source:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( object ) ) ; if ( isSuffix ) { template.setname ( ( ( template.getname ( ) ) + name ) ) ; } else { template.setname ( name ) ; } }

Target:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) ; if ( isSuffix ) { template.setName ( ( ( template.getName ( ) ) + name ) ) ; } else { template.setName ( name ) ; } }
Source:
public void run ( ) { org.ovirt.engine.core.bll.RunVmCommandBase.doCompressionCheck ( vds , vmDynamic ) ; if ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.PowerClientAutoMigrateToPowerClientOnConnect ) ) || ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.PowerClientAutoMigrateFromPowerClientToVdsWhenConnectingFromRegularClient ) ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.PowerClientMigrateOnConnectCheck , new org.ovirt.engine.core.common.action.PowerClientMigrateOnConnectCheckParameters ( false , vmDynamic.getId ( ) , vmDynamic.getclient_ip ( ) , vds.getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; } }

Target:
public void processOnClientIpChange ( final org.ovirt.engine.core.common.businessentities.VDS vds , final org.ovirt.engine.core.compat.Guid vmId ) { final org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . get ( vmId ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( vmDynamic.getclient_ip ( ) ) ) { vmDynamic.setConsole_current_user_name ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vmDynamic ) ; } }