auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String encodedId ( org.ovirt.engine.core.compat.Guid id ) { byte [ ] bytes = id.toByteArray ( ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( int idx = 0 ; idx < ( bytes.length ) ; idx ++ ) { sb.append ( ( "\\" + ( java.lang.String.format ( "%02X" , bytes [ idx ] ) ) ) ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String encodedId ( org.ovirt.engine.core.compat.Guid id ) { byte [ ] bytes = new org.ovirt.engine.core.compat.Guid ( id.toByteArray ( ) , false ) . toByteArray ( ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( int idx = 0 ; idx < ( bytes.length ) ; idx ++ ) { sb.append ( ( "\\" + ( java.lang.String.format ( "%02X" , bytes [ idx ] ) ) ) ) ; } return sb.toString ( ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.quota.QuotaClusterListModel quotaClusterListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaClusterListModel ) ( model ) ) ; quotaClusterListModel.setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.quota.QuotaClusterListModel quotaClusterListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaClusterListModel ) ( model ) ) ; quotaClusterListModel.setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; }
Source:
public static void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected boolean isVmNameValidLength ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.lang.String vmName = vm.getVmName ( ) ; int maxVmNameLengthWindows = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MaxVmNameLengthWindows ) ; int maxVmNameLengthNonWindows = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MaxVmNameLengthNonWindows ) ; int maxLength = ( vm.getVmOs ( ) . isWindows ( ) ) ? maxVmNameLengthWindows : maxVmNameLengthNonWindows ; boolean nameLengthValid = ( vmName.length ( ) ) <= maxLength ; return nameLengthValid ; }

Target:
protected boolean isVmNameValidLength ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.lang.String vmName = vm.getName ( ) ; int maxVmNameLengthWindows = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MaxVmNameLengthWindows ) ; int maxVmNameLengthNonWindows = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MaxVmNameLengthNonWindows ) ; int maxLength = ( vm.getVmOs ( ) . isWindows ( ) ) ? maxVmNameLengthWindows : maxVmNameLengthNonWindows ; boolean nameLengthValid = ( vmName.length ( ) ) <= maxLength ; return nameLengthValid ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult result ) { java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > returnValueList = result.getReturnValues ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValueList.get ( 0 ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValueList.get ( 1 ) . getReturnValue ( ) ) ) ; InitClusters ( clusters ) ; InitTemplates ( templates ) ; InitCdImage ( ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult result ) { java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > returnValueList = result.getReturnValues ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValueList.get ( 0 ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValueList.get ( 1 ) . getReturnValue ( ) ) ) ; InitClusters ( clusters , true , false ) ; InitTemplates ( templates ) ; InitCdImage ( ) ; }
Source:
public void setup ( ) { innerMap = new java.util.HashMap < org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey , org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyValue > ( ) ; testedMap = new org.ovirt.engine.core.utils.collections.CopyOnAccessMap < org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey , org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyValue > ( innerMap ) ; key1 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey ( "RHEL" , 0 ) ; value1 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyValue ( org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE1_WIDTH , org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE1_LENGTH ) ; key2 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey ( "Fedora" , 0 ) ; value2 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyValue ( org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE2_WIDTH , org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE2_LENGTH ) ; }

Target:
public void setup ( ) { innerMap = new java.util.HashMap < > ( ) ; testedMap = new org.ovirt.engine.core.utils.collections.CopyOnAccessMap ( innerMap ) ; key1 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey ( "RHEL" , 0 ) ; value1 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyValue ( org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE1_WIDTH , org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE1_LENGTH ) ; key2 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey ( "Fedora" , 0 ) ; value2 = new org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyValue ( org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE2_WIDTH , org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.VALUE2_LENGTH ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.quota.QuotaTemplateListModel vmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.quota.QuotaTemplateListModel ) ( model ) ) ; vmModel.setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; vmModel.setIsEmpty ( ( ( ( ( java.util.List ) ( vmModel.getItems ( ) ) ) . size ( ) ) == 0 ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { setItems ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; setIsEmpty ( ( ( ( ( java.util.List ) ( getItems ( ) ) ) . size ( ) ) == 0 ) ) ; }
Source:
public void testGetQuotaByExistingName ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName ( "Quota General" , FixturesTool.STORAGE_POOL_NFS ) ; org.junit.Assert.assertEquals ( dao.getById ( FixturesTool.QUOTA_GENERAL ) . getQuotaName ( ) . equals ( quotaGeneralToSpecific.getQuotaName ( ) ) , true ) ; org.junit.Assert.assertEquals ( dao.getById ( FixturesTool.QUOTA_GENERAL ) . getId ( ) . equals ( quotaGeneralToSpecific.getId ( ) ) , true ) ; }

Target:
public void testGetQuotaByExistingName ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName ( "Quota General" , FixturesTool.STORAGE_POOL_NFS ) ; org.junit.Assert.assertEquals ( dao.getById ( FixturesTool.QUOTA_GENERAL ) . getQuotaName ( ) , quotaGeneralToSpecific.getQuotaName ( ) ) ; org.junit.Assert.assertEquals ( dao.getById ( FixturesTool.QUOTA_GENERAL ) . getId ( ) , quotaGeneralToSpecific.getId ( ) ) ; }
Source:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setSgio ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.ScsiGenericIO.class ) ) ; model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ) ; model.setLunStorage ( null ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setSgio ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.ScsiGenericIO.class ) ) ; model.setStatus ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ; model.setLunStorage ( null ) ; return model ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ) ) ; return networkClusterModel ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( getExport ( ) . getEntity ( ) ) ) ) ; return networkClusterModel ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getconnection ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getid ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getConnection ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; locks.put ( org.ovirt.engine.core.bll.storage.connection.RemoveStorageServerConnectionCommand.getConnection ( ) . getId ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }
Source:
public static boolean IsVmPriorityValueLegal ( int value , java.util.ArrayList < java.lang.String > reasons ) { boolean res = false ; if ( ( value >= 0 ) && ( value <= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ) { res = true ; } else { reasons.add ( VdcBllMessages.VM_OR_TEMPLATE_ILLEGAL_PRIORITY_VALUE.toString ( ) ) ; reasons.add ( java.lang.String.format ( "$MaxValue %1$s" , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ; } return res ; }

Target:
public static boolean IsVmPriorityValueLegal ( int value , java.util.List < java.lang.String > reasons ) { boolean res = false ; if ( ( value >= 0 ) && ( value <= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ) { res = true ; } else { reasons.add ( VdcBllMessages.VM_OR_TEMPLATE_ILLEGAL_PRIORITY_VALUE.toString ( ) ) ; reasons.add ( java.lang.String.format ( "$MaxValue %1$s" , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPriorityMaxValue ) ) ) ; } return res ; }
Source:
public void validateFailsForNoStorageDevice ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.gluster.StorageDevice > emptyList ( ) ) ) ) ; prepareMocks ( cmd , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForNoStorageDevice ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.< org.ovirt.engine.core.common.businessentities.gluster.StorageDevice > emptyList ( ) ) , null ) ) ; prepareMocks ( cmd , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public void testSaveServerConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections conn = dao.get ( newServerConnection.getid ( ) ) ; org.junit.Assert.assertNull ( conn ) ; dao.save ( newServerConnection ) ; conn = dao.get ( newServerConnection.getid ( ) ) ; org.junit.Assert.assertEquals ( newServerConnection , conn ) ; }

Target:
public void testSaveServerConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections conn = dao.get ( newServerConnection.getId ( ) ) ; org.junit.Assert.assertNull ( conn ) ; dao.save ( newServerConnection ) ; conn = dao.get ( newServerConnection.getId ( ) ) ; org.junit.Assert.assertEquals ( newServerConnection , conn ) ; }
Source:
public void setExceeded ( java.lang.String title ) { percentageBarA.setStyleName ( style.percentageBarExceeded ( ) ) ; percentageLabelA.setStyleName ( style.percentageLabel ( ) ) ; percentageLabelA.setText ( "Exceeded" ) ; percentageLabelA.setTitle ( title ) ; percentageBarB.setVisible ( false ) ; }

Target:
public void setExceeded ( ) { percentageBarA.setStyleName ( style.percentageBarExceeded ( ) ) ; percentageLabelA.setStyleName ( style.percentageLabel ( ) ) ; percentageLabelA.setText ( "Exceeded" ) ; percentageBarB.setVisible ( false ) ; }
Source:
protected void addJNDIBeans ( ) { addBeanJNDIName ( BeanType.BACKEND , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/Backend" ) ) ; addBeanJNDIName ( BeanType.SCHEDULER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "scheduler/Scheduler" ) ) ; addBeanJNDIName ( BeanType.USERS_DOMAINS_CACHE , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/UsersDomainsCacheManagerService" ) ) ; addBeanJNDIName ( BeanType.VDS_EVENT_LISTENER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/VdsEventListener" ) ) ; addBeanJNDIName ( BeanType.LOCK_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/LockManager" ) ) ; addBeanJNDIName ( BeanType.EVENTQUEUE_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/EventQueue" ) ) ; addBeanJNDIName ( BeanType.CACHE_CONTAINER , "java:jboss/infinispan/ovirt-engine" ) ; }

Target:
protected void addJNDIBeans ( ) { addBeanJNDIName ( BeanType.BACKEND , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/Backend" ) ) ; addBeanJNDIName ( BeanType.SCHEDULER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "scheduler/Scheduler" ) ) ; addBeanJNDIName ( BeanType.VDS_EVENT_LISTENER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/VdsEventListener" ) ) ; addBeanJNDIName ( BeanType.LOCK_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/LockManager" ) ) ; addBeanJNDIName ( BeanType.EVENTQUEUE_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/EventQueue" ) ) ; addBeanJNDIName ( BeanType.CACHE_CONTAINER , "java:jboss/infinispan/ovirt-engine" ) ; }
Source:
protected void onExportChanged ( ) { boolean externalNetwork = ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ; getExternalProviders ( ) . setIsChangable ( externalNetwork ) ; getNetworkLabel ( ) . setIsChangable ( externalNetwork ) ; getIsVmNetwork ( ) . setIsChangable ( ( ! externalNetwork ) ) ; getHasMtu ( ) . setIsChangable ( ( ! externalNetwork ) ) ; if ( externalNetwork ) { getIsVmNetwork ( ) . setEntity ( true ) ; getHasMtu ( ) . setEntity ( false ) ; } }

Target:
protected void onExportChanged ( ) { boolean externalNetwork = ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ; getExternalProviders ( ) . setIsChangable ( externalNetwork ) ; getNetworkLabel ( ) . setIsChangable ( externalNetwork ) ; getIsVmNetwork ( ) . setIsChangable ( ( ! externalNetwork ) ) ; getHasMtu ( ) . setIsChangable ( ( ! externalNetwork ) ) ; if ( externalNetwork ) { getIsVmNetwork ( ) . setEntity ( true ) ; getHasMtu ( ) . setEntity ( false ) ; } super . onExportChanged ( ) ; }
Source:
public void setItems ( java.util.Collection value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.Disk > cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; super . setItems ( disks ) ; updateActionAvailability ( ) ; }

Target:
public void setItems ( java.util.Collection value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( value != null ) ? new java.util.ArrayList < > ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; super . setItems ( disks ) ; updateActionAvailability ( ) ; }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver resolver = new org.ovirt.engine.api.restapi.resource.EntityIdResolver ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.VmNetworkInterface lookupEntity ( org.ovirt.engine.core.compat.Guid guid ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return collection.lookupEntity ( guid ) ; } } ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NIC , org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.VmNetworkInterface lookupEntity ( org.ovirt.engine.core.compat.Guid guid ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return collection.lookupEntity ( guid ) ; } } ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NIC , org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ( entityType , guid , query ) ) ; }
Source:
private void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }

Target:
private void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }
Source:
public void testBootFromNetworkNoNetwork ( ) { org.ovirt.engine.core.dao.network.VmNicDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.VmNicDao.class ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.N ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) , null ) , false , EngineMessage.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }

Target:
public void testBootFromNetworkNoNetwork ( ) { org.ovirt.engine.core.dao.network.VmNicDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.VmNicDao.class ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.N ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) ) , false , EngineMessage.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.storage_domains o1 , org.ovirt.engine.core.common.businessentities.storage_domains o2 ) { return java.lang.Long.compare ( o1.getLastTimeUsedAsMaster ( ) , o2.getLastTimeUsedAsMaster ( ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.storage_domains o1 , org.ovirt.engine.core.common.businessentities.storage_domains o2 ) { return ( o1.getLastTimeUsedAsMaster ( ) ) < ( o2.getLastTimeUsedAsMaster ( ) ) ? - 1 : ( o1.getLastTimeUsedAsMaster ( ) ) == ( o2.getLastTimeUsedAsMaster ( ) ) ? 0 : 1 ; }
Source:
public void dismissEvent ( ) { final org.ovirt.engine.core.common.businessentities.AuditLog auditLog = org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.getSelectedItem ( ) ; if ( auditLog == null ) { return ; } org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters params = new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( auditLog.getAuditLogId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RemoveAuditLogById , params , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.this . refresh ( ) ; } } ) ; }

Target:
public void dismissEvent ( org.ovirt.engine.core.common.businessentities.AuditLog auditLog ) { if ( auditLog == null ) { return ; } org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters params = new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( auditLog.getAuditLogId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RemoveAuditLogById , params , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.this . refresh ( ) ; } } ) ; }
Source:
public void testAddInvalidSDStatusMessage ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatus status = org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ; cmd.addInvalidSDStatusMessage ( status ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , status ) ) ; }

Target:
private void testAddInvalidSDStatusMessage ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { cmd.addInvalidSDStatusMessage ( status ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , status ) ) ; }
Source:
org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel createInterfacePanel ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel ) { org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel panel = new org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel ( ) ; panel.setWidth ( "100%" ) ; panel.setHeight ( "100%" ) ; panel.addInterfaces ( lineModel.getInterfaces ( ) ) ; addClickHandlerToPanel ( panel , lineModel ) ; return panel ; }

Target:
org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel createInterfacePanel ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel ) { org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel panel = new org.ovirt.engine.ui.webadmin.widget.host.InterfacePanel ( ) ; panel.setWidth ( "100%" ) ; panel.setHeight ( "100%" ) ; panel.addInterfaces ( lineModel.getInterfaces ( ) ) ; return panel ; }
Source:
public void testCompareTo ( ) { org.ovirt.engine.core.compat.NGuid guid1 = new org.ovirt.engine.core.compat.NGuid ( "5b411bc1-c220-4421-9abd-cfa484aecb6e" ) ; org.ovirt.engine.core.compat.NGuid guid2 = new org.ovirt.engine.core.compat.NGuid ( "5b411bc1-c220-4421-9abd-cfa484aecb6f" ) ; org.junit.Assert.assertTrue ( ( ( guid1.compareTo ( guid2 ) ) < 0 ) ) ; org.junit.Assert.assertTrue ( ( ( guid1.compareTo ( guid1 ) ) == 0 ) ) ; org.junit.Assert.assertTrue ( ( ( guid2.compareTo ( guid1 ) ) > 0 ) ) ; }

Target:
public void testCompareTo ( ) { org.ovirt.engine.core.compat.Guid guid1 = new org.ovirt.engine.core.compat.Guid ( "5b411bc1-c220-4421-9abd-cfa484aecb6e" ) ; org.ovirt.engine.core.compat.Guid guid2 = new org.ovirt.engine.core.compat.Guid ( "5b411bc1-c220-4421-9abd-cfa484aecb6f" ) ; org.junit.Assert.assertTrue ( ( ( guid1.compareTo ( guid2 ) ) < 0 ) ) ; org.junit.Assert.assertTrue ( ( ( guid1.compareTo ( guid1 ) ) == 0 ) ) ; org.junit.Assert.assertTrue ( ( ( guid2.compareTo ( guid1 ) ) > 0 ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VdsNetworkInterface findNetworkInterface ( java.lang.String network , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > interfaces , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > bonds ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface i : interfaces ) { if ( network.equals ( i.getNetworkName ( ) ) ) { return i ; } } for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface i : bonds ) { if ( network.equals ( i.getNetworkName ( ) ) ) { return i ; } } return null ; }

Target:
private static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface findNetworkInterface ( java.lang.String network , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > bonds ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaces ) { if ( network.equals ( i.getNetworkName ( ) ) ) { return i ; } } for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : bonds ) { if ( network.equals ( i.getNetworkName ( ) ) ) { return i ; } } return null ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void initOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsNames ) , callback ) ; }

Target:
public static void initOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsNames ) , callback ) ; }
Source:
public static boolean isHealingRequired ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick : volume.getBricks ( ) ) { if ( ( brick.getUnSyncedEntries ( ) ) > 0 ) { return true ; } } return false ; }

Target:
public static boolean isHealingRequired ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick : volume.getBricks ( ) ) { if ( ( ( brick.getUnSyncedEntries ( ) ) != null ) && ( ( brick.getUnSyncedEntries ( ) ) > 0 ) ) { return true ; } } return false ; }
Source:
private void doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( boolean displayNetwork , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( displayNetwork , matcher , network , attachment ) ; }

Target:
private void doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( boolean displayNetwork , org.ovirt.engine.core.common.businessentities.network.Network network , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( displayNetwork , matcher , network , attachment ) ; }
Source:
public void testGetSameID ( ) throws java.lang.Exception { final org.ovirt.engine.core.common.businessentities.Tags existing = dao.get ( org.ovirt.engine.core.dao.MultiThreadedDaoTest.EXISTING_TAGS_IDS [ 0 ] ) ; createAndRunThreadsForRunner ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.common.businessentities.Tags result = dao.get ( existing.getTagId ( ) ) ; org.junit.Assert.assertEquals ( existing , result ) ; } } , 100 ) ; }

Target:
public void testGetSameID ( ) throws java.lang.Exception { final org.ovirt.engine.core.common.businessentities.Tags existing = dao.get ( org.ovirt.engine.core.dao.MultiThreadedDaoTest.EXISTING_TAGS_IDS [ 0 ] ) ; createAndRunThreadsForRunner ( ( ) -> { org.ovirt.engine.core.common.businessentities.Tags result = dao.get ( existing.getTagId ( ) ) ; org.junit.Assert.assertEquals ( existing , result ) ; } , 100 ) ; }
Source:
private void fillEngineConfigMap ( ) { engineConfigMap.setVersion ( parseOptionKey ( OptionKey.OPTION_VERSION ) ) ; engineConfigMap.setAlternateConfigFile ( parseOptionKey ( OptionKey.OPTION_CONFIG ) ) ; engineConfigMap.setAlternatePropertiesFile ( parseOptionKey ( OptionKey.OPTION_PROPERTIES ) ) ; engineConfigMap.setUser ( parseOptionKey ( OptionKey.OPTION_USER ) ) ; engineConfigMap.setAdminPassFile ( parseOptionKey ( OptionKey.OPTION_ADMINPASSFILE ) ) ; engineConfigMap.setOnlyReloadable ( parseOptionKey ( OptionKey.OPTION_ONLY_RELOADABLE ) ) ; engineConfigMap.setLogFile ( parseOptionKey ( OptionKey.OPTION_LOG_FILE ) ) ; engineConfigMap.setLogLevel ( parseOptionKey ( OptionKey.OPTION_LOG_LEVEL ) ) ; engineConfigMap.setLog4jConfig ( parseOptionKey ( OptionKey.OPTION_LOG4J_CONFIG ) ) ; }

Target:
private void fillEngineConfigMap ( ) { engineConfigMap.setVersion ( parseOptionKey ( OptionKey.OPTION_VERSION ) ) ; engineConfigMap.setAlternateConfigFile ( parseOptionKey ( OptionKey.OPTION_CONFIG ) ) ; engineConfigMap.setAlternatePropertiesFile ( parseOptionKey ( OptionKey.OPTION_PROPERTIES ) ) ; engineConfigMap.setUser ( parseOptionKey ( OptionKey.OPTION_USER ) ) ; engineConfigMap.setAdminPassFile ( parseOptionKey ( OptionKey.OPTION_ADMINPASSFILE ) ) ; engineConfigMap.setOnlyReloadable ( parseOptionKey ( OptionKey.OPTION_ONLY_RELOADABLE ) ) ; engineConfigMap.setLogFile ( parseOptionKey ( OptionKey.OPTION_LOG_FILE ) ) ; engineConfigMap.setLogLevel ( parseOptionKey ( OptionKey.OPTION_LOG_LEVEL ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connectionDetails.setid ( id.toString ( ) ) ; connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }
Source:
public static void init ( final com.google.gwt.event.shared.EventBus eventBus ) { org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel = org.ovirt.engine.ui.uicommonweb.models.CommonModel.newInstance ( ) ; org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel.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 ) { org.ovirt.engine.ui.common.uicommon.model.MainModelSelectionChangeEvent.fire ( eventBus , org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel.getSelectedItem ( ) ) ; } } ) ; }

Target:
public static void init ( final com.google.gwt.event.shared.EventBus eventBus ) { org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel = org.ovirt.engine.ui.uicommonweb.models.CommonModel.newInstance ( ) ; org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel.getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.common.uicommon.model.MainModelSelectionChangeEvent.fire ( eventBus , org.ovirt.engine.ui.common.uicommon.model.CommonModelManager.commonModel.getSelectedItem ( ) ) ; } } ) ; }
Source:
public void getFreeVfOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 1 , 4 , 3 , 2 , 1 ) ; org.junit.Assert.assertEquals ( 1 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic ) ) ) ; }

Target:
public void getFreeVfOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 1 , 4 , 3 , 2 , 1 ) ; org.junit.Assert.assertEquals ( 1 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic , null ) ) ) ; }
Source:
public java.lang.String render ( T storageDomain ) { if ( storageDomain == null ) { return "" ; } return org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer.MESSAGES.storageDomainFreeSpace ( storageDomain.getStorageName ( ) , storageDomain.getAvailableDiskSize ( ) , storageDomain.getTotalDiskSize ( ) ) ; }

Target:
public java.lang.String render ( T storageDomain ) { if ( storageDomain == null ) { return "" ; } if ( ( storageDomain.getAvailableDiskSize ( ) ) == null ) { return storageDomain.getStorageName ( ) ; } return org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer.MESSAGES.storageDomainFreeSpace ( storageDomain.getStorageName ( ) , storageDomain.getAvailableDiskSize ( ) , storageDomain.getTotalDiskSize ( ) ) ; }
Source:
public void setMtu ( java.lang.Integer value ) { if ( ( privateMtu ) != value ) { privateMtu = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "Mtu" ) ) ; } }

Target:
public void setMtu ( java.lang.Integer value ) { if ( ( ( privateMtu ) == null ) && ( value == null ) ) { return ; } if ( ( ( privateMtu ) == null ) || ( ! ( privateMtu.equals ( value ) ) ) ) { privateMtu = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "Mtu" ) ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMetadataDisk ( java.lang.String diskDescription ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Preallocated ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; image.setContentType ( DiskContentType.MEMORY_METADATA_VOLUME ) ; image.setDiskDescription ( diskDescription ) ; return image ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMetadataDisk ( java.lang.String diskDescription ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.memory.MemoryUtils.METADATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Preallocated ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; image.setContentType ( DiskContentType.MEMORY_METADATA_VOLUME ) ; image.setDiskDescription ( diskDescription ) ; return image ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 0 , null , true , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isPlugUnPlug ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isReadOnly ( ) , "" , null , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . getSnapshotId ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 0 , null , true , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isPlugUnPlug ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isReadOnly ( ) , "" , null , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . getSnapshotId ( ) , null ) ; }