Skip to content

Commit

Permalink
Initial check-in of code from the 1.08 version of the benchmarks obta…
Browse files Browse the repository at this point in the history
  • Loading branch information
convoluted-code committed Dec 1, 2014
1 parent 601cfce commit 02c4af6
Show file tree
Hide file tree
Showing 278 changed files with 23,431 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry sourcepath="d:/eclipse/jdk-1_5_0-src-jrl.zip" kind="lib" path="lib/j2ee.jar"/>
<classpathentry kind="lib" path="lib/cos.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Binary file added .db
Binary file not shown.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>micro-securibench</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
59 changes: 59 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#Wed Apr 19 19:14:30 PDT 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.3
3 changes: 3 additions & 0 deletions .settings/org.eclipse.jdt.ui.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Fri Apr 14 20:19:14 PDT 2006
eclipse.preferences.version=1
internal.default.compliance=default
3 changes: 3 additions & 0 deletions .settings/org.eclipse.ltk.core.refactoring.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Fri Nov 25 17:00:19 PST 2005
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
14 changes: 14 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This is where tomcat lives
#tomcat.home = c:\\program Files\\Apache Software Foundation\\Tomcat 5.5
tomcat.home = deployment
# This is the Tomcat context used by Securibench Micro
web.context = securibench-micro
# This is the place for deploying generated HTML versions of Java source files
webdav.context = webdav
# This directory is used to output colorized Java files in HTML
colorized.dir = src.html
# Current benchmark version
version = 1.08
# Path to xdoclet
#xdoclet = d:\xdoclet-1.2.3
xdoclet = xdoclet-1.2.3
108 changes: 108 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!-- $Id: build.xml,v 1.10 2006/01/04 06:27:18 livshits Exp $ -->
<project name="Securibench Micro" default="cleandist" basedir=".">
<property environment="currentenv" />
<property file="build.properties" />
<property name="rootdir" value="." />

<path id="class.path">
<pathelement path="${currentenv.classpath}" />
<fileset dir="./lib">
<include name="**/*.jar" />
</fileset>
</path>

<!-- xdoclet paths -->
<property name="xdoclet.jar" value="${xdoclet}/xdoclet-1.2.3.jar" />
<property name="webdoclet.jar" value="${xdoclet}/xdoclet-web-module-1.2.3.jar" />
<property name="xjavadoc.jar" value="${xdoclet}/xjavadoc-1.1.jar" />
<property name="log4j.jar" value="${xdoclet}/log4j.jar" />
<property name="commons.collections.jar" value="${xdoclet}/commons-collections-2.0.jar" />
<property name="commons.logging.jar" value="${xdoclet}/commons-logging.jar" />
<property name="j2ee.jar" value="${rootdir}/lib/j2ee.jar" />
<property name="src.dir" value="${rootdir}/src" />
<property name="appDeployDir" value="${tomcat.home}/webapps/${web.context}"/>
<property name="webdav" value="${tomcat.home}/webapps/${webdav.context}"/>

<path id="webdoclet.classpath">
<pathelement path="${xdoclet.jar}" />
<pathelement path="${webdoclet.jar}" />
<pathelement path="${xjavadoc.jar}" />
<pathelement path="${commons.collections.jar}" />
<pathelement path="${commons.logging.jar}" />
<pathelement path="${log4j.jar}" />
<pathelement path="${j2ee.jar}" />
</path>

<!-- additional tasks -->
<taskdef name="xdoclet" classname="xdoclet.modules.web.WebDocletTask" classpathref="webdoclet.classpath" />
<taskdef name="java2html" classname="de.java2html.anttasks.Java2HtmlTask" classpath="${rootdir}/lib/java2html.jar" />

<!-- CLEAN -->
<target name="clean">
<echo message="Removing old directory structure..." />
<delete dir="${appDeployDir}/classes" />
<delete dir="${webdav}${web.context}" />
<delete dir="${rootdir}/${colorized.dir}" />
<delete file="${rootdir}/securibench-micro-${version}.zip" />
</target>

<!-- MK DEPLOY DIR -->
<target name="mkDeployDir">
<mkdir dir="${appDeployDir}/WEB-INF/classes" />
</target>

<!-- DEPLOY -->
<target name="deploy">
<echo message="Deploying classes, generating web.xml and index.html, colorizing sources... " />

<copy todir="${appDeployDir}/WEB-INF/lib">
<fileset dir="${rootdir}/lib" />
</copy>
<!--
<copy todir="${appDeployDir}/WEB-INF/classes">
<fileset dir="${rootdir}/classes" />
</copy>
-->
<java2html outputformat="html" srcdir="${src.dir}" destdir="${webdav}" includes="**/*.java"
style="eclipse" showLineNumbers="true" showFileName="true"
showTableBorder="false" includeDocumentHeader="true" />

<xdoclet destdir="${appDeployDir}" verbose="true" force="${xdoclet.force}" mergedir="metadata/web">
<fileset dir="${rootdir}/src">
<include name="**/*.java" />
</fileset>
<template templatefile="${rootdir}/web-xml-gen.xdt" destinationfile="WEB-INF/web.xml" />
<template templatefile="${rootdir}/index-html-gen.xdt" destinationfile="index.html" />
</xdoclet>
<!-- make a local copy of index.html -->
<copy file="${appDeployDir}/index.html" tofile="${rootdir}/index.html"/>
</target>

<!-- a separate task to produce colorized sources -->
<target name="colorize">
<echo message="Colorizing Java code and saving it in ${rootdir}/${colorized.dir}" />
<delete dir="${rootdir}/${colorized.dir}" />
<java2html outputformat="html" srcdir="${src.dir}" destdir="${rootdir}/${colorized.dir}"
includes="**/*.java" style="eclipse" showLineNumbers="true"
showFileName="true" showTableBorder="false" includeDocumentHeader="true" />
<zip destfile="${rootdir}/${colorized.dir}-${version}.zip"
basedir="${rootdir}/${colorized.dir}" />
<delete dir="${rootdir}/${colorized.dir}" />
</target>

<target name="compile">
<echo message="Compiling Securibench Micro..." />
<javac verbose="false" classpathref="class.path" srcdir="${src.dir}" destdir="${appDeployDir}/WEB-INF/classes" />
</target>

<!-- CLEANDIST -->
<target name="cleandist" depends="clean, mkDeployDir, compile, deploy"/>

<!-- This target makes a zip file for distribution -->
<target name="zip" depends="cleandist,colorize">
<echo message="Creating a distribution of Securibench Micro..." />
<zip destfile="${rootdir}/securibench-micro-${version}.zip"
basedir="${rootdir}"
excludes="${rootdir}/securibench-micro-*.zip,**/*.class"/>
</target>
</project>
33 changes: 33 additions & 0 deletions classes/stats.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/perl
# Script for collecting simple stats
# $Id: stats.pl,v 1.1 2005/11/28 05:16:55 livshits Exp $

$prefix = "securibench/micro";
$LINE = ('-' x 60) . "\n";

opendir D, $prefix or die;
@_ = grep {!/^\./ && !/CVS/ && -d "$prefix/$_"} readdir D;
print $LINE;
foreach(@_){
&process_dir($prefix, $_);
}
closedir D;


print $LINE;
printf "%40s\t%3d \n", 'Total', $COUNT;
print $LINE;

sub process_dir(){
my $prefix = shift; $dir = shift;
my $count = 0;
print "Processing $dir \n" if $VERBOSE;

while(<$prefix/$dir/*.java>){
++$count;
}

printf "%40s\t%3d \n", $dir, $count;

$COUNT += $count;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 02c4af6

Please sign in to comment.