auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static org.ovirt.engine.core.common.businessentities.Cluster createDefaultCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; group.setCpuName ( "Intel Conroe" ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; group.setClusterPolicyId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.Cluster createDefaultCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DEFAULT_CLUSTER_ID ) ; group.setCpuName ( "Intel Conroe" ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.DC_ID1 ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; group.setClusterPolicyId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; group.setMaxVdsMemoryOverCommit ( 100 ) ; return group ; }
Source:
public void init ( org.ovirt.engine.core.common.osinfo.MapBackedPreferences preferences ) { org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE.preferences = preferences ; emptyNode = preferences.node ( "emptyNode" ) ; buildIdToUnameLookup ( ) ; buildBackCompatMapping ( ) ; validateTree ( ) ; if ( org.ovirt.engine.core.utils.OsRepositoryImpl.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.utils.OsRepositoryImpl.log.debugFormat ( "Osinfo Repository:\n {0}" , toString ( ) ) ; } }

Target:
public void init ( org.ovirt.engine.core.common.osinfo.MapBackedPreferences preferences ) { org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE.preferences = preferences ; emptyNode = preferences.node ( "emptyNode" ) ; buildIdToUnameLookup ( ) ; buildBackCompatMapping ( ) ; validateTree ( ) ; if ( org.ovirt.engine.core.utils.OsRepositoryImpl.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.utils.OsRepositoryImpl.log.debug ( "Osinfo Repository:\n{}" , this ) ; } }
Source:
public void getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public 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:
public void mockVdsDao ( ) { org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search = new org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter ( ) ; org.mockito.Mockito.when ( vdsDao.getAllWithQuery ( org.mockito.Matchers.matches ( org.ovirt.engine.core.bll.SearchQueryTest.getVdsRegexString ( search ) ) ) ) . thenReturn ( vdsResultList ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setCpuFlags ( "flag" ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; vdsResultList.add ( vds ) ; }

Target:
public void mockVdsDao ( ) { org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search = new org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter ( ) ; org.mockito.Mockito.when ( vdsDao.getAllWithQuery ( org.mockito.ArgumentMatchers.matches ( org.ovirt.engine.core.bll.SearchQueryTest.getVdsRegexString ( search ) ) ) ) . thenReturn ( vdsResultList ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setCpuFlags ( "flag" ) ; vds.setClusterCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; vdsResultList.add ( vds ) ; }
Source:
public org.ovirt.engine.sdk.entities.Response delete ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . delete ( url , org.ovirt.engine.sdk.entities.Response.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.entities.Action disable ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/disable" ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String pk = ( ( java.lang.String ) ( result ) ) ; if ( ( pk != null ) && ( ( pk.length ( ) ) > 0 ) ) { getPublicKey ( ) . setEntity ( result ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { onExternalProviderChanged ( ) ; }
Source:
private void initOsRepository ( ) { OsInfoPreferencesLoader.INSTANCE.init ( java.nio.file.FileSystems.getDefault ( ) . getPath ( org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getEtcDir ( ) . getAbsolutePath ( ) , org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.OsRepositoryConfDir ) ) ) ; OsRepositoryImpl.INSTANCE.init ( OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) ) ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.osinfo.OsRepositoryImpl.INSTANCE ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; }

Target:
private void initOsRepository ( ) { OsInfoPreferencesLoader.INSTANCE.init ( java.nio.file.FileSystems.getDefault ( ) . getPath ( org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getEtcDir ( ) . getAbsolutePath ( ) , org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.OsRepositoryConfDir ) ) ) ; OsRepositoryImpl.INSTANCE.init ( OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) ) ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.osinfo.OsRepositoryImpl.INSTANCE ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . populateDwhOsInfo ( osRepository.getOsNames ( ) ) ; }
Source:
private static void validateResult ( org.ovirt.engine.core.bll.ValidationResult validationResult , boolean isValid , org.ovirt.engine.core.common.errors.EngineMessage message ) { org.junit.Assert.assertEquals ( isValid , validationResult.isValid ( ) ) ; if ( ! isValid ) { org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( message ) ) ; } }

Target:
private static void validateResult ( org.ovirt.engine.core.bll.ValidationResult validationResult , boolean isValid , org.ovirt.engine.core.common.errors.EngineMessage message ) { org.junit.jupiter.api.Assertions.assertEquals ( isValid , validationResult.isValid ( ) ) ; if ( ! isValid ) { org.hamcrest.MatcherAssert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( message ) ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , org.ovirt.engine.core.common.utils.VmDeviceType device , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean plugged , java.lang.Boolean readOnly , java.lang.String address , java.util.Map < java.lang.String , java.lang.String > customProp ) { org.ovirt.engine.core.common.businessentities.VmDevice managedDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , type , device , specParams , plugged , readOnly , customProp , false ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( address ) ) { managedDevice.setAddress ( address ) ; } return managedDevice ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addManagedDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType generalType , org.ovirt.engine.core.common.utils.VmDeviceType type , java.util.Map < java.lang.String , java.lang.Object > specParams , boolean isPlugged , java.lang.Boolean isReadOnly ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , generalType , type , specParams , isPlugged , isReadOnly , "" , null , false ) ; }
Source:
public void postUpdateNumOfSockets2 ( ) { java.lang.String version = getClusterCompatibilityVersion ( ) . toString ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxNumOfCPUsPerSocket ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , 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.vms.VmModelBehaviorBase behavior = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.this ; behavior.maxCpusPerSocket = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.totalCpuCoresChanged ( ) ; } } ) , version ) ; }

Target:
public void postUpdateNumOfSockets2 ( ) { java.lang.String version = getCompatibilityVersion ( ) . toString ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxNumOfCPUsPerSocket ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , 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.vms.VmModelBehaviorBase behavior = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.this ; behavior.maxCpusPerSocket = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.postUpdateNumOfSockets3 ( ) ; } } ) , version ) ; }
Source:
public boolean serverExists ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getVdsGroupDao ( ) . get ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) ) ; if ( org.ovirt.engine.core.common.gluster.GlusterFeatureSupported.glusterHostUuidSupported ( cluster.getCompatibilityVersion ( ) ) ) { return getDbUtils ( ) . serverExists ( glusterServer.getUuid ( ) ) ; } else { return getDbUtils ( ) . serverExists ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) , glusterServer.getHostnameOrIp ( ) ) ; } }

Target:
public boolean serverExists ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = getClusterDao ( ) . get ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) ) ; if ( org.ovirt.engine.core.common.gluster.GlusterFeatureSupported.glusterHostUuidSupported ( cluster.getCompatibilityVersion ( ) ) ) { return getDbUtils ( ) . serverExists ( glusterServer.getUuid ( ) ) ; } else { return getDbUtils ( ) . serverExists ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) , glusterServer.getHostnameOrIp ( ) ) ; } }
Source:
protected java.lang.String getColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( getColumnIndex ( column ) ) ; } return null ; }

Target:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( determineOriginalIndex ( getColumnIndex ( column ) ) ) ; } return null ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( windowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , windowPopup , false , propName ) ; } else if ( confirmWindowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , confirmWindowPopup , true , propName ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( windowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , windowPopup , false , propName ) ; } else if ( confirmWindowPropertyNames.contains ( propName ) ) { handleWindowModelChange ( source , confirmWindowPopup , true , propName ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getGlusterHook ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = new org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity ( ) ; hook.setId ( FixturesTool.HOOK_ID ) ; hook.setClusterId ( FixturesTool.CLUSTER_ID ) ; hook.setGlusterCommand ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.GLUSTER_COMMAND ) ; hook.setStage ( GlusterHookStage.POST ) ; hook.setName ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.HOOK_NAME ) ; hook.setChecksum ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.CHECKSUM ) ; hook.setStatus ( GlusterHookStatus.DISABLED ) ; hook.setContentType ( GlusterHookContentType.TEXT ) ; hook.setConflictValue ( false , false , false ) ; return hook ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getGlusterHook ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = new org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity ( ) ; hook.setId ( FixturesTool.HOOK_ID ) ; hook.setClusterId ( FixturesTool.GLUSTER_CLUSTER_ID ) ; hook.setGlusterCommand ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.GLUSTER_COMMAND ) ; hook.setStage ( GlusterHookStage.POST ) ; hook.setName ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.HOOK_NAME ) ; hook.setChecksum ( org.ovirt.engine.core.dao.gluster.GlusterHooksDaoTest.CHECKSUM ) ; hook.setStatus ( GlusterHookStatus.DISABLED ) ; hook.setContentType ( GlusterHookContentType.TEXT ) ; hook.setConflictValue ( false , false , false ) ; return hook ; }
Source:
public static java.lang.String combine ( java.lang.String head , org.ovirt.engine.api.model.ParametersSet params ) { java.lang.String combined_params = "" ; if ( params != null ) { for ( org.ovirt.engine.api.model.Parameter entry : params.getParameters ( ) ) { combined_params += java.lang.String.format ( org.ovirt.engine.api.common.util.LinkHelper.MATRIX_PARAMETER_TEMPLATE , entry.getName ( ) , entry.getValue ( ) ) ; } } return head + combined_params ; }

Target:
public static java.lang.String combine ( java.lang.String head , org.ovirt.engine.api.model.ParametersSet params ) { final java.lang.StringBuilder combinedParams = new java.lang.StringBuilder ( head ) ; if ( params != null ) { for ( org.ovirt.engine.api.model.Parameter entry : params.getParameters ( ) ) { combinedParams.append ( java.lang.String.format ( org.ovirt.engine.api.common.util.LinkHelper.MATRIX_PARAMETER_TEMPLATE , entry.getName ( ) , entry.getValue ( ) ) ) ; } } return combinedParams.toString ( ) ; }
Source:
public void lunsMatch ( ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUNId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; lun.setPhysicalVolumeId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsFromVgInfo = java.util.Arrays.asList ( lun , lun ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsFromDb = java.util.Arrays.asList ( lun , lun ) ; boolean isMatch = command.getLunsToUpdateInDb ( lunsFromVgInfo , lunsFromDb ) . isEmpty ( ) ; org.junit.Assert.assertTrue ( isMatch ) ; }

Target:
public void testGetLunsToUpdateInDbDiffLunIdSamePvId ( ) { org.ovirt.engine.core.compat.Guid pvID = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.compat.Guid lunFromVgLunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > newLunsToSaveInDb = getLunsToUpdateInDb ( lunFromVgLunId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , pvID , pvID ) . get ( command.saveNewLuns ) ; assertLunIdInList ( newLunsToSaveInDb , lunFromVgLunId ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageDomainStaticDAO ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getStorageDomainDynamicDAO ( ) ) ; diskImageDao = prepareDAO ( dbFacade.getDiskImageDao ( ) ) ; imageDao = prepareDAO ( dbFacade.getImageDao ( ) ) ; existingDomain = dao.get ( new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.storage_domain_static ( ) ; newStaticDomain.setstorage_name ( "NewStorageDomain" ) ; newStaticDomain.setstorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageDomainStaticDao ( ) ) ; dynamicDao = prepareDAO ( dbFacade.getStorageDomainDynamicDao ( ) ) ; diskImageDao = prepareDAO ( dbFacade.getDiskImageDao ( ) ) ; imageDao = prepareDAO ( dbFacade.getImageDao ( ) ) ; existingDomain = dao.get ( new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.storage_domain_static ( ) ; newStaticDomain.setstorage_name ( "NewStorageDomain" ) ; newStaticDomain.setstorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; }
Source:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChainText , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
private void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
private static boolean assertFields ( java.lang.Object model , java.lang.String superField , java.lang.String subFields ) { java.lang.String [ ] splitFields = subFields.split ( org.ovirt.engine.api.common.util.CompletenessAssertor.ALTERNATIVE ) ; boolean found = false ; for ( java.lang.String subField : splitFields ) { found = found || ( org.ovirt.engine.api.common.util.ReflectionHelper.isSet ( ( superField != null ? org.ovirt.engine.api.common.util.ReflectionHelper.get ( model , superField ) : model ) , org.ovirt.engine.api.common.util.ReflectionHelper.capitalize ( subField ) ) ) ; } return found ; }

Target:
private static boolean assertFields ( java.lang.Object model , java.lang.String superField , java.lang.String subFields ) { java.lang.String [ ] splitFields = subFields.split ( org.ovirt.engine.api.common.util.CompletenessAssertor.ALTERNATIVE ) ; boolean found = false ; for ( java.lang.String subField : splitFields ) { found = found || ( org.ovirt.engine.api.utils.ReflectionHelper.isSet ( ( superField != null ? org.ovirt.engine.api.utils.ReflectionHelper.get ( model , superField ) : model ) , org.ovirt.engine.api.utils.ReflectionHelper.capitalize ( subField ) ) ) ; } return found ; }
Source:
public void testGetIncludeStatistics ( ) { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setAllContentHeaderExpectation ( ) ; setUpEntityQueryExpectations ( 1 ) ; setGetGuestAgentQueryExpectations ( 1 ) ; org.ovirt.engine.api.model.Nic nic = resource.get ( ) ; org.junit.Assert.assertTrue ( nic.isSetStatistics ( ) ) ; verifyModelSpecific ( nic , 1 ) ; verifyLinks ( nic ) ; } finally { accepts.clear ( ) ; } }

Target:
public void testGetIncludeStatistics ( ) { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setAllContentHeaderExpectation ( ) ; setUpEntityQueryExpectations ( 1 ) ; setGetGuestAgentQueryExpectations ( 1 ) ; org.ovirt.engine.api.model.Nic nic = resource.get ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( nic.isSetStatistics ( ) ) ; verifyModelSpecific ( nic , 1 ) ; verifyLinks ( nic ) ; } finally { accepts.clear ( ) ; } }
Source:
private void removeImage ( ) { org.ovirt.engine.core.common.action.RemoveImageParameters removeImageParams = new org.ovirt.engine.core.common.action.RemoveImageParameters ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getParameters ( ) . getDestinationImageId ( ) ) ; removeImageParams.setStorageDomainId ( getDestinationStorageDomainId ( ) ) ; removeImageParams.setDbOperationScope ( ImageDbOperationScope.NONE ) ; removeImageParams.setShouldLockImage ( false ) ; removeImageParams.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getId ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalActionWithTasksContext ( ActionType.RemoveImage , removeImageParams ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { addAuditLogOnRemoveFailure ( ) ; } }

Target:
private void removeImage ( ) { org.ovirt.engine.core.common.action.RemoveImageParameters removeImageParams = new org.ovirt.engine.core.common.action.RemoveImageParameters ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getParameters ( ) . getDestinationImageId ( ) ) ; removeImageParams.setStorageDomainId ( getDestinationStorageDomainId ( ) ) ; removeImageParams.setDbOperationScope ( ImageDbOperationScope.NONE ) ; removeImageParams.setShouldLockImage ( false ) ; removeImageParams.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.snapshots.CreateSnapshotFromTemplateCommand.getDestinationDiskImage ( ) . getId ( ) ) ) ; org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalActionWithTasksContext ( ActionType.RemoveImage , removeImageParams ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { addAuditLogOnRemoveFailure ( ) ; } }
Source:
protected java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile object ) { return object.getName ( ) ; }

Target:
void initEditors ( ) { volumeTypeListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeType > ( ) ) ; storageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; volumeFormatListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.storage.VolumeFormat > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.storage.VolumeFormat > ( ) ) ; sourceStorageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer ( ) ) ; diskProfileListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile > ( ) ) ; quotaListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.Quota > ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { populateProfiles ( ( ( java.util.List < org.ovirt.engine.core.aaa.ProfileEntry > ) ( result ) ) ) ; getProfile ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { populateNamespaces ( ) ; } } ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { setProfileEntries ( ( ( java.util.List < org.ovirt.engine.core.aaa.ProfileEntry > ) ( result ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getAAANamespaces ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { namespacesMap = ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( result ) ) ; populateProfiles ( getProfileEntries ( ) ) ; } } ) ) ; }
Source:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { determineMigrationFailureForAuditLog ( ) ; setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { failedToMigrate ( ) ; _isRerun = true ; } }

Target:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailureForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { org.ovirt.engine.core.bll.MigrateVmCommand.runningFailed ( ) ; _isRerun = true ; } }
Source:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setChangeProhibitionReason ( ( isChangable && ( ! ( staticIpChangeAllowed ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . staticIpAddressSameAsHostname ( ) : null ) ) ; getAddress ( ) . setIsChangable ( ( isChangable && ( staticIpChangeAllowed ) ) ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; getGateway ( ) . setIsChangable ( isChangable ) ; }

Target:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setChangeProhibitionReason ( ( isChangable && ( ! ( staticIpChangeAllowed ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . staticIpAddressSameAsHostname ( ) : null ) ) ; getAddress ( ) . setIsChangable ( ( isChangable && ( staticIpChangeAllowed ) ) ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; getGateway ( ) . setIsChangable ( isChangable ) ; getCustomPropertiesModel ( ) . setIsChangable ( bootProtocolsAvailable ) ; }
Source:
protected void onReveal ( ) { super . onReveal ( ) ; org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; _asyncQuery.setModel ( this ) ; _asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String version = ( ( java.lang.String ) ( result ) ) ; getView ( ) . setVersion ( version ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetRpmVersionViaPublic ( _asyncQuery ) ; }

Target:
protected void onReveal ( ) { super . onReveal ( ) ; org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; _asyncQuery.setModel ( this ) ; _asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String version = ( ( java.lang.String ) ( result ) ) ; getView ( ) . setVersion ( version ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getRpmVersionViaPublic ( _asyncQuery ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = ( ( java.lang.String ) ( loginModel.getPassword ( ) . getEntity ( ) ) ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; beforeLogin ( loginModel ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }
Source:
private void updateNics ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > nics ) { nicList.clear ( ) ; java.util.Collections.sort ( nics ) ; java.util.List < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup > groups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic : nics ) { groups.add ( new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup ( nic , style ) ) ; } nicList.addAll ( groups , ( ! ( rendered ) ) ) ; }

Target:
private void updateNics ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > nics ) { nicList.clear ( ) ; java.util.Collections.sort ( nics ) ; java.util.List < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup > groups = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic : nics ) { groups.add ( new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup ( nic , eventBus , style ) ) ; } nicList.addAll ( groups , ( ! ( rendered ) ) ) ; }
Source:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.VdsIdParametersBase parameters = new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDevices , parameters , aQuery ) ; }

Target:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) , aQuery ) ; }
Source:
public void getRpmVersion ( 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getDefaultSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
public void doPolling ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { org.ovirt.engine.core.common.businessentities.V2VJobInfo job = getV2VJobInfo ( ) ; if ( job == null ) { getCommand ( cmdId ) . setCommandStatus ( CommandStatus.FAILED ) ; return ; } switch ( job.getStatus ( ) ) { case STARTING : case COPYING_DISK : break ; case DONE : getCommand ( cmdId ) . setCommandStatus ( CommandStatus.SUCCEEDED ) ; break ; case ERROR : case ABORTED : getCommand ( cmdId ) . setCommandStatus ( CommandStatus.FAILED ) ; break ; case UNKNOWN : case INITIALIZE : } }

Target:
protected java.lang.String getVmIsBeingImportedMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.ConvertVmCommand.getVmName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , org.ovirt.engine.core.bll.ConvertVmCommand.getVmName ( ) ) ) ; } return builder.toString ( ) ; }
Source:
private void loadFile ( java.nio.file.Path path ) { try ( java.io.BufferedReader reader = java.nio.file.Files.newBufferedReader ( path , java.nio.charset.StandardCharsets.UTF_8 ) ) { properties = new java.util.Properties ( properties ) ; properties.load ( reader ) ; } catch ( java.io.IOException e ) { log.error ( ( "Failed loading file " + path ) ) ; } }

Target:
private void loadFile ( java.nio.file.Path path ) { try ( java.io.BufferedReader reader = java.nio.file.Files.newBufferedReader ( path , java.nio.charset.StandardCharsets.UTF_8 ) ) { properties = new java.util.Properties ( properties ) ; properties.load ( reader ) ; } catch ( java.io.IOException e ) { log.error ( "Failed loading file '{}': {}" , path , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } }
Source:
public void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = runVdsCommand ( VDSCommandType.DeactivateGlusterVolumeSnapshot , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeSnapshotActionVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . getSnapshotName ( ) ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; if ( ! ( getSucceeded ( ) ) ) { handleVdsError ( AuditLogType.GLUSTER_VOLUME_SNAPSHOT_DEACTIVATE_FAILED , retVal.getVdsError ( ) . getMessage ( ) ) ; } else { getGlusterVolumeSnapshotDao ( ) . updateSnapshotStatus ( getSnapshot ( ) . getId ( ) , GlusterSnapshotStatus.STOPPED ) ; } }

Target:
public void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = runVdsCommand ( VDSCommandType.DeactivateGlusterVolumeSnapshot , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeSnapshotActionVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . getSnapshotName ( ) ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; if ( ! ( getSucceeded ( ) ) ) { handleVdsError ( AuditLogType.GLUSTER_VOLUME_SNAPSHOT_DEACTIVATE_FAILED , retVal.getVdsError ( ) . getMessage ( ) ) ; } else { getGlusterVolumeSnapshotDao ( ) . updateSnapshotStatus ( getSnapshot ( ) . getId ( ) , GlusterSnapshotStatus.DEACTIVATED ) ; } }
Source:
protected void setAuditLogTypeFromPhase ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase phase ) { if ( ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getParameters ( ) . getAuditLogType ( ) ) != null ) { return ; } if ( phase == ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase.FINISHED_SUCCESS ) ) { org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getParameters ( ) . setAuditLogType ( AuditLogType.UPLOAD_IMAGE_SUCCEEDED ) ; } else if ( phase == ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase.CANCELLED ) ) { org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getParameters ( ) . setAuditLogType ( AuditLogType.UPLOAD_IMAGE_CANCELLED ) ; } else if ( phase == ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase.FINISHED_FAILURE ) ) { org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getParameters ( ) . setAuditLogType ( AuditLogType.UPLOAD_IMAGE_FAILED ) ; } }

Target:
protected void setAuditLogTypeFromPhase ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase phase ) { if ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getAuditLogType ( ) ) != null ) { return ; } if ( phase == ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase.FINISHED_SUCCESS ) ) { org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . setAuditLogType ( AuditLogType.TRANSFER_IMAGE_SUCCEEDED ) ; } else if ( phase == ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase.CANCELLED ) ) { org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . setAuditLogType ( AuditLogType.TRANSFER_IMAGE_CANCELLED ) ; } else if ( phase == ( org.ovirt.engine.core.common.businessentities.storage.ImageTransferPhase.FINISHED_FAILURE ) ) { org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . setAuditLogType ( AuditLogType.TRANSFER_IMAGE_FAILED ) ; } }
Source:
protected void syncSearch ( org.ovirt.engine.core.common.queries.VdcQueryType vdcQueryType , final java.util.Comparator < ? super T > comparator ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getEntity ( ) . getId ( ) ) ; parameters.setRefresh ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( vdcQueryType , parameters , new org.ovirt.engine.ui.uicommonweb.models.storage.SetSortedItemsAsyncQuery ( comparator ) ) ; }

Target:
protected void syncSearch ( org.ovirt.engine.core.common.queries.QueryType queryType , final java.util.Comparator < ? super T > comparator ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getEntity ( ) . getId ( ) ) ; parameters.setRefresh ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getIsQueryFirstTime ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( queryType , parameters , new org.ovirt.engine.ui.uicommonweb.models.storage.SetSortedItemsAsyncQuery ( comparator ) ) ; }
Source:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . runVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }
Source:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }

Target:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.VmDiskOperationParameterBase ( vmId , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
protected void failedToMigrate ( ) { try { determineMigrationFailureForAuditLog ( ) ; decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = false ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; failedToRunVm ( ) ; } finally { org.ovirt.engine.core.bll.MigrateVmCommand.freeLock ( ) ; } }

Target:
public void reportCompleted ( ) { try { super . reportCompleted ( ) ; } finally { decreasePendingVms ( getVdsDestinationId ( ) ) ; org.ovirt.engine.core.bll.MigrateVmCommand.freeLock ( ) ; } }
Source:
protected void initializeStorageDomain ( ) { org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }

Target:
protected void initializeStorageDomain ( ) { org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; if ( ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) . getWipeAfterDelete ( ) ) == null ) { org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) . setWipeAfterDelete ( org.ovirt.engine.core.bll.utils.WipeAfterDeleteUtils.getDefaultWipeAfterDeleteFlag ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageStaticData ( ) . getStorageType ( ) ) ) ; } }
Source:
public static void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }