public static void basic_putenv(Object name, Object value) { String name_string = SmartEiffelRuntime.NullTerminatedBytesToString(name); String value_string = SmartEiffelRuntime.NullTerminatedBytesToString(value); Properties props = System.getProperties(); props.put(name_string, value_string); System.setProperties(props); return; }
private static void checkJavaVersion() { Properties sProp = java.lang.System.getProperties(); String sVersion = sProp.getProperty("java.version"); sVersion = sVersion.substring(0, 3); Float f = Float.valueOf(sVersion); if (f.floatValue() < (float) 1.7) { System.out.println("Java version must be 1.7 or newer"); System.out.println("To get Java 7 go to https://jdk7.dev.java.net/"); System.exit(-1); } }
public static void main(String... args) { long inicio = nanoTime(); getProperties(); long fim = nanoTime(); out.println((fim - inicio)); }
@EvoSuiteClassExclude public class Unit_ESTest_scaffolding { private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); @AfterClass public static void clearEvoSuiteFramework() { Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.chiralbehaviors.CoRE.domain.Unit"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses( Unit_ESTest_scaffolding.class.getClassLoader(), "org.jooq.AttachableInternal", "org.jooq.impl.RecordOperation", "org.jooq.impl.TableRecordImpl", "org.jooq.BindingRegisterContext", "org.jooq.types.UShort", "org.jooq.Converters", "org.jooq.impl.AbstractStore", "org.jooq.WindowOverStep", "org.jooq.Condition", "org.jooq.Record20", "org.jooq.Record4", "org.jooq.Record21", "org.jooq.Record5", "org.jooq.Record22", "org.jooq.Record2", "org.jooq.Record3", "org.jooq.SelectField", "org.jooq.Record1", "org.jooq.util.cubrid.CUBRIDDataType", "org.jooq.types.UByte", "org.jooq.Scope", "org.jooq.SQLDialect", "org.jooq.Record8", "org.jooq.Record9", "org.jooq.Record6", "org.jooq.Select", "org.jooq.Record7", "org.jooq.WindowIgnoreNullsStep", "org.jooq.impl.Fields", "org.jooq.Result", "org.jooq.QueryPart", "org.jooq.impl.Tools$ThreadGuard$GuardedOperation", "org.jooq.util.hsqldb.HSQLDBDataType", "org.jooq.TableField", "org.jooq.BetweenAndStep", "org.jooq.impl.SQLDataType", "org.jooq.BindingSQLContext", "org.jooq.FieldLike", "org.jooq.util.firebird.FirebirdDataType", "org.jooq.util.derby.DerbyDataType", "org.jooq.Row17", "org.jooq.Row16", "org.jooq.Row15", "org.jooq.Row14", "org.jooq.Row19", "org.jooq.Row18", "com.chiralbehaviors.CoRE.jooq.tables.Existential", "org.jooq.Sequence", "org.jooq.Schema", "org.jooq.StoreQuery", "org.jooq.Row20", "com.chiralbehaviors.CoRE.phantasm.Phantasm", "org.jooq.Row22", "org.jooq.Row21", "org.jooq.Record", "org.jooq.QueryPartInternal", "org.jooq.Comparator", "org.jooq.impl.TableFieldImpl", "org.jooq.types.ULong", "org.jooq.tools.StringUtils", "com.chiralbehaviors.CoRE.jooq.enums.ExistentialDomain", "org.jooq.types.YearToMonth", "org.jooq.util.mariadb.MariaDBDataType", "org.jooq.impl.AbstractTable", "org.jooq.JoinType", "org.jooq.ConditionProvider", "org.jooq.QuantifiedSelect", "org.jooq.impl.AbstractRecord", "org.jooq.Row13", "org.jooq.impl.TableImpl", "org.jooq.Row12", "org.jooq.WindowFinalStep", "org.jooq.exception.InvalidResultException", "org.jooq.TableOnStep", "org.jooq.Row11", "org.jooq.util.sqlite.SQLiteDataType", "org.jooq.Row10", "org.jooq.RowN", "org.jooq.UniqueKey", "org.jooq.Row", "org.jooq.RecordMapper", "org.jooq.Table", "org.jooq.exception.DataChangedException", "org.jooq.exception.NoDataFoundException", "com.chiralbehaviors.CoRE.jooq.Ruleform", "org.jooq.SQL", "org.jooq.BetweenAndStep1", "org.jooq.BetweenAndStep3", "org.jooq.BetweenAndStep2", "org.jooq.RenderContext", "org.jooq.Clause", "org.jooq.Binding", "org.jooq.impl.RowImpl", "org.jooq.BetweenAndStep5", "org.jooq.BetweenAndStep10", "org.jooq.types.UInteger", "org.jooq.BetweenAndStep4", "org.jooq.FieldOrRow", "org.jooq.impl.DefaultDataType", "org.jooq.BetweenAndStep7", "org.jooq.BetweenAndStep6", "org.jooq.UDT", "org.jooq.ResultQuery", "org.jooq.BetweenAndStep14", "org.jooq.BetweenAndStep13", "org.jooq.DSLContext", "com.chiralbehaviors.CoRE.domain.ExistentialRuleform", "org.jooq.BetweenAndStep12", "org.jooq.types.UNumber", "org.jooq.exception.DataTypeException", "org.jooq.BetweenAndStep11", "org.jooq.BetweenAndStep18", "org.jooq.BetweenAndStep17", "org.jooq.SortOrder", "org.jooq.BetweenAndStep16", "org.jooq.BetweenAndStep15", "org.jooq.BindingSetSQLOutputContext", "org.jooq.GroupField", "org.jooq.DataType", "org.jooq.tools.JooqLogger", "org.jooq.exception.SQLDialectNotSupportedException", "org.jooq.Row1", "org.jooq.Row2", "org.jooq.Row3", "org.jooq.Name", "com.chiralbehaviors.CoRE.domain.Unit", "org.jooq.Row4", "org.jooq.Row5", "org.jooq.BetweenAndStep9", "org.jooq.Row6", "org.jooq.BetweenAndStep8", "org.jooq.TableRecord", "org.jooq.Field", "org.jooq.Row7", "org.jooq.exception.MappingException", "org.jooq.Row8", "org.jooq.impl.AbstractQueryPart", "org.jooq.Row9", "org.jooq.impl.UpdatableRecordImpl", "org.jooq.util.postgres.PostgresDataType", "org.jooq.Context", "com.chiralbehaviors.CoRE.jooq.enums.ValueType", "org.jooq.WindowOrderByStep", "org.jooq.TablePartitionByStep", "org.jooq.BindingGetSQLInputContext", "org.jooq.Query", "org.jooq.types.DayToSecond", "org.jooq.BetweenAndStepN", "org.jooq.DivideByOnStep", "org.jooq.EnumType", "org.jooq.ForeignKey", "org.jooq.BindingGetResultSetContext", "org.jooq.BindContext", "org.jooq.impl.DefaultBinding", "org.jooq.Identity", "org.jooq.TableLike", "org.jooq.util.h2.H2DataType", "org.jooq.UpdatableRecord", "org.jooq.types.Interval", "org.jooq.exception.DataAccessException", "org.jooq.WindowPartitionByStep", "org.jooq.Attachable", "org.jooq.BetweenAndStep19", "org.jooq.exception.TooManyRowsException", "org.jooq.BindingSetStatementContext", "org.jooq.DatePart", "org.jooq.Record17", "org.jooq.Record18", "org.jooq.util.mysql.MySQLDataType", "org.jooq.Record19", "org.jooq.Record13", "org.jooq.Converter", "org.jooq.impl.AbstractField", "org.jooq.Record14", "org.jooq.Record15", "org.jooq.impl.SchemaImpl", "org.jooq.Record16", "org.jooq.Configuration", "org.jooq.TableOptionalOnStep", "org.jooq.Record10", "org.jooq.Record11", "org.jooq.BindingGetStatementContext", "org.jooq.RecordType", "org.jooq.SQLDialect$ThirdParty", "org.jooq.Record12", "org.jooq.SortField", "org.jooq.BetweenAndStep21", "org.jooq.BetweenAndStep20", "org.jooq.Converters$1", "org.jooq.BetweenAndStep22", "org.jooq.Key", "com.chiralbehaviors.CoRE.jooq.tables.records.ExistentialRecord"); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance() .setClassLoader(Unit_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.jooq.impl.AbstractStore", "org.jooq.impl.AbstractRecord", "org.jooq.impl.TableRecordImpl", "org.jooq.impl.UpdatableRecordImpl", "com.chiralbehaviors.CoRE.jooq.tables.records.ExistentialRecord", "com.chiralbehaviors.CoRE.domain.Unit", "org.jooq.impl.AbstractQueryPart", "org.jooq.Clause", "org.jooq.impl.AbstractTable", "org.jooq.impl.TableImpl", "org.jooq.impl.SchemaImpl", "com.chiralbehaviors.CoRE.jooq.Ruleform", "org.jooq.impl.Fields", "org.jooq.SQLDialect", "org.jooq.impl.DefaultDataType", "org.jooq.impl.DefaultBinding", "org.jooq.Converters", "org.jooq.Converters$1", "org.jooq.util.cubrid.CUBRIDDataType", "org.jooq.util.derby.DerbyDataType", "org.jooq.util.firebird.FirebirdDataType", "org.jooq.util.h2.H2DataType", "org.jooq.util.hsqldb.HSQLDBDataType", "org.jooq.util.mariadb.MariaDBDataType", "org.jooq.util.mysql.MySQLDataType", "org.jooq.util.postgres.PostgresDataType", "org.jooq.util.sqlite.SQLiteDataType", "org.jooq.impl.SQLDataType", "org.jooq.impl.AbstractField", "org.jooq.impl.TableFieldImpl", "org.jooq.tools.StringUtils", "com.chiralbehaviors.CoRE.jooq.enums.ExistentialDomain", "com.chiralbehaviors.CoRE.jooq.enums.ValueType", "com.chiralbehaviors.CoRE.jooq.tables.Existential", "org.jooq.impl.RowImpl"); } private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper( org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @After public void doneWithTestCase() { threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } @Before public void initTestCase() { threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } public void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("java.vm.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.specification.version", "1.8"); java.lang.System.setProperty( "java.home", "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("user.home", "/Users/hhildebrand"); java.lang.System.setProperty("user.dir", "/Users/hhildebrand/git/Ultrastructure/model"); java.lang.System.setProperty( "java.io.tmpdir", "/var/folders/_r/y4_0rwd16zgblwjq7b_tbhk80000gn/T/"); java.lang.System.setProperty("awt.toolkit", "sun.lwawt.macosx.LWCToolkit"); java.lang.System.setProperty("file.encoding", "UTF-8"); java.lang.System.setProperty("file.separator", "/"); java.lang.System.setProperty("java.awt.graphicsenv", "sun.awt.CGraphicsEnvironment"); java.lang.System.setProperty("java.awt.printerjob", "sun.lwawt.macosx.CPrinterJob"); java.lang.System.setProperty( "java.class.path", "/var/folders/_r/y4_0rwd16zgblwjq7b_tbhk80000gn/T/EvoSuite_pathingJar8602748439413877740.jar"); java.lang.System.setProperty("java.class.version", "52.0"); java.lang.System.setProperty( "java.endorsed.dirs", "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/endorsed"); java.lang.System.setProperty( "java.ext.dirs", "/Users/hhildebrand/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"); java.lang.System.setProperty("java.library.path", "lib"); java.lang.System.setProperty("java.runtime.name", "Java(TM) SE Runtime Environment"); java.lang.System.setProperty("java.runtime.version", "1.8.0_45-b14"); java.lang.System.setProperty("java.specification.name", "Java Platform API Specification"); java.lang.System.setProperty("java.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor.url", "http://java.oracle.com/"); java.lang.System.setProperty("java.version", "1.8.0_45"); java.lang.System.setProperty("java.vm.info", "mixed mode"); java.lang.System.setProperty("java.vm.name", "Java HotSpot(TM) 64-Bit Server VM"); java.lang.System.setProperty( "java.vm.specification.name", "Java Virtual Machine Specification"); java.lang.System.setProperty("java.vm.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vm.specification.version", "1.8"); java.lang.System.setProperty("java.vm.version", "25.45-b02"); java.lang.System.setProperty("line.separator", "\n"); java.lang.System.setProperty("os.arch", "x86_64"); java.lang.System.setProperty("os.name", "Mac OS X"); java.lang.System.setProperty("os.version", "10.11.3"); java.lang.System.setProperty("path.separator", ":"); java.lang.System.setProperty("user.country", "US"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.name", "hhildebrand"); java.lang.System.setProperty("user.timezone", "America/Los_Angeles"); } }
@EvoSuiteClassExclude public class English_ESTest_scaffolding { private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); @AfterClass public static void clearEvoSuiteFramework() { Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.chiralbehaviors.CoRE.utils.English"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses( English_ESTest_scaffolding.class.getClassLoader(), "com.chiralbehaviors.CoRE.utils.English", "com.chiralbehaviors.CoRE.utils.English$MODE", "com.chiralbehaviors.CoRE.utils.TwoFormInflector$Rule", "com.chiralbehaviors.CoRE.utils.TwoFormInflector$RegExpRule", "com.chiralbehaviors.CoRE.utils.TwoFormInflector$CategoryRule", "com.chiralbehaviors.CoRE.utils.TwoFormInflector"); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance() .setClassLoader(English_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "com.chiralbehaviors.CoRE.utils.English$MODE", "com.chiralbehaviors.CoRE.utils.English"); } private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper( org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @After public void doneWithTestCase() { threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } @Before public void initTestCase() { threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } public void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("java.vm.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.specification.version", "1.8"); java.lang.System.setProperty( "java.home", "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre"); java.lang.System.setProperty("java.awt.headless", "true"); java.lang.System.setProperty("user.home", "/Users/hhildebrand"); java.lang.System.setProperty("user.dir", "/Users/hhildebrand/git/Ultrastructure/model"); java.lang.System.setProperty( "java.io.tmpdir", "/var/folders/_r/y4_0rwd16zgblwjq7b_tbhk80000gn/T/"); java.lang.System.setProperty("awt.toolkit", "sun.lwawt.macosx.LWCToolkit"); java.lang.System.setProperty("file.encoding", "UTF-8"); java.lang.System.setProperty("file.separator", "/"); java.lang.System.setProperty("java.awt.graphicsenv", "sun.awt.CGraphicsEnvironment"); java.lang.System.setProperty("java.awt.printerjob", "sun.lwawt.macosx.CPrinterJob"); java.lang.System.setProperty( "java.class.path", "/var/folders/_r/y4_0rwd16zgblwjq7b_tbhk80000gn/T/EvoSuite_pathingJar4741277692469645904.jar"); java.lang.System.setProperty("java.class.version", "52.0"); java.lang.System.setProperty( "java.endorsed.dirs", "/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/endorsed"); java.lang.System.setProperty( "java.ext.dirs", "/Users/hhildebrand/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java"); java.lang.System.setProperty("java.library.path", "lib"); java.lang.System.setProperty("java.runtime.name", "Java(TM) SE Runtime Environment"); java.lang.System.setProperty("java.runtime.version", "1.8.0_45-b14"); java.lang.System.setProperty("java.specification.name", "Java Platform API Specification"); java.lang.System.setProperty("java.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vendor.url", "http://java.oracle.com/"); java.lang.System.setProperty("java.version", "1.8.0_45"); java.lang.System.setProperty("java.vm.info", "mixed mode"); java.lang.System.setProperty("java.vm.name", "Java HotSpot(TM) 64-Bit Server VM"); java.lang.System.setProperty( "java.vm.specification.name", "Java Virtual Machine Specification"); java.lang.System.setProperty("java.vm.specification.vendor", "Oracle Corporation"); java.lang.System.setProperty("java.vm.specification.version", "1.8"); java.lang.System.setProperty("java.vm.version", "25.45-b02"); java.lang.System.setProperty("line.separator", "\n"); java.lang.System.setProperty("os.arch", "x86_64"); java.lang.System.setProperty("os.name", "Mac OS X"); java.lang.System.setProperty("os.version", "10.11.3"); java.lang.System.setProperty("path.separator", ":"); java.lang.System.setProperty("user.country", "US"); java.lang.System.setProperty("user.language", "en"); java.lang.System.setProperty("user.name", "hhildebrand"); java.lang.System.setProperty("user.timezone", "America/Los_Angeles"); } }