Update of /cvsroot/mocklib/gwtmocklib/tools/findbugs/bin
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23230/tools/findbugs/bin
Added Files:
findbugs mineBugHistory printAppVersion setBugDatabaseInfo
findbugs.bat xpathFind filterBugs fbwrap defectDensity
unionBugs convertXmlToText computeBugHistory addMessages
listBugDatabaseInfo
Log Message:
first commit of gwtmocklib module.
--- NEW FILE: computeBugHistory ---
#! /bin/sh
# Merge a historical bug collection and a bug collection, producing an updated
# historical bug collection
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.Update
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: unionBugs ---
#! /bin/sh
# Deprecated
# Create the union of two results files, preserving
# annotations in both files in the result.
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: setBugDatabaseInfo ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.SetBugDatabaseInfo
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: xpathFind ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.xml.XPathFind
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: defectDensity ---
#! /bin/sh
# Generate a defect density table from a bug collection
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.DefectDensity
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: listBugDatabaseInfo ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.ListBugDatabaseInfo
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: mineBugHistory ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.MineBugHistory
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
--- NEW FILE: findbugs.bat ---
@echo off
:: Launch FindBugs on a Windows system.
:: Adapted from scripts found at http://www.ericphelps.com/batch/
:: This will only work on Windows NT or later!
:: Don't affect environment outside of this invocation
setlocal
:: ----------------------------------------------------------------------
:: Set up default values
:: ----------------------------------------------------------------------
set appjar=findbugsGUI.jar
set javahome=
set launcher=javaw.exe
set start=start "FindBugs"
set jvmargs=
set debugArg=
set conserveSpaceArg=
set workHardArg=
set args=
set javaProps=
set maxheap=256
:: Try finding the default FINDBUGS_HOME directory
:: from the directory path of this script
set default_findbugs_home=%~dp0..
:: Honor JAVA_HOME environment variable if it is set
if "%JAVA_HOME%"=="" goto nojavahome
if not exist "%JAVA_HOME%\bin\javaw.exe" goto nojavahome
set javahome=%JAVA_HOME%\bin\
:nojavahome
goto loop
:: ----------------------------------------------------------------------
:: Process command-line arguments
:: ----------------------------------------------------------------------
:shift2
shift
:shift1
shift
:loop
:: Remove surrounding quotes from %1 and %2
set firstArg=%~1
set secondArg=%~2
if not "%firstArg%"=="-gui" goto notGui
set appjar=findbugsGUI.jar
set launcher=javaw.exe
goto shift1
:notGui
if not "%firstArg%"=="-textui" goto notTextui
set appjar=findbugs.jar
set launcher=java.exe
set start=
goto shift1
:notTextui
if not "%firstArg%"=="-debug" goto notDebug
set launcher=java.exe
set start=
set debugArg=-Dfindbugs.debug=true
goto shift1
:notDebug
if "%firstArg%"=="-home" set FINDBUGS_HOME=%secondArg%
if "%firstArg%"=="-home" goto shift2
if "%firstArg%"=="-jvmArgs" set jvmargs=%secondArg%
if "%firstArg%"=="-jvmArgs" goto shift2
if "%firstArg%"=="-maxHeap" set maxheap=%secondArg%
if "%firstArg%"=="-maxHeap" goto shift2
if "%firstArg%"=="-conserveSpace" set conserveSpaceArg=-Dfindbugs.conserveSpace=true
if "%firstArg%"=="-conserveSpace" goto shift1
if "%firstArg%"=="-workHard" set workHardArg=-Dfindbugs.workHard=true
if "%firstArg%"=="-workHard" goto shift1
if "%firstArg%"=="-javahome" set javahome=%secondArg%\bin\
if "%firstArg%"=="-javahome" goto shift2
if "%firstArg%"=="-property" set javaProps=-D%secondArg% %javaProps%
if "%firstArg%"=="-property" goto shift2
if "%firstArg%"=="-help" goto help
if "%firstArg%"=="" goto launch
set args=%args% "%firstArg%"
goto shift1
:: ----------------------------------------------------------------------
:: Launch FindBugs
:: ----------------------------------------------------------------------
:launch
:: Make sure FINDBUGS_HOME is set.
:: If it isn't, try using the default value based on the
:: directory path of the invoked script.
:: Note that this will fail miserably if the value of FINDBUGS_HOME
:: has quote characters in it.
if not "%FINDBUGS_HOME%"=="" goto checkHomeValid
set FINDBUGS_HOME=%default_findbugs_home%
:checkHomeValid
if not exist "%FINDBUGS_HOME%\lib\%appjar%" goto homeNotSet
:found_home
:: Launch FindBugs!
%start% "%javahome%%launcher%" %debugArg% %conserveSpaceArg% %workHardArg% %javaProps% "-Dfindbugs.home=%FINDBUGS_HOME%" -Xmx%maxheap%m %jvmargs% -jar "%FINDBUGS_HOME%\lib\%appjar%" %args%
goto end
:: ----------------------------------------------------------------------
:: Display usage information
:: ----------------------------------------------------------------------
:help
echo Usage: findbugs [options]
echo -home dir Use dir as FINDBUGS_HOME
echo -gui Use the Graphical UI (default behavior)
echo -textui Use the Text UI
echo -jvmArgs args Pass args to JVM
echo -maxHeap size Set maximum Java heap size in megabytes (default %maxheap%)
echo -javahome dir Specify location of JRE
echo -help Display this message
echo -debug Enable debug tracing in FindBugs
echo -conserveSpace Conserve memory at the expense of precision
echo All other options are passed to the FindBugs application
goto end
:: ----------------------------------------------------------------------
:: Report that FINDBUGS_HOME is not set (and was not specified)
:: ----------------------------------------------------------------------
:homeNotSet
echo Could not find FindBugs home directory. There may be a problem
echo with the FindBugs installation. Try setting FINDBUGS_HOME, or
echo re-installing.
goto end
:end
--- NEW FILE: filterBugs ---
#! /bin/sh
# General purpose utility for filtering/transforming
# bug collection and/or historical bug collections
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.Filter
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: addMessages ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.AddMessages
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
--- NEW FILE: convertXmlToText ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.PrintingBugReporter
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
--- NEW FILE: printAppVersion ---
#! /bin/sh
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
fb_mainclass=edu.umd.cs.findbugs.workflow.PrintAppVersion
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: findbugs ---
#! /bin/sh
# Launch FindBugs from the command line.
escape_arg() {
echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g"
}
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
maxheap=768
ShowHelpAndExit() {
fb_appjar="$findbugs_home/lib/findbugsGUI.jar"
fb_mainclass="edu.umd.cs.findbugs.ShowHelp"
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
exit 0
}
# Set defaults
fb_appjar="$findbugs_home/lib/findbugsGUI.jar"
fb_mainclass="edu.umd.cs.findbugs.gui.FindBugsFrame"
user_jvmargs=''
debug_arg=''
conservespace_arg=''
workhard_arg=''
user_props=''
# Handle command line arguments.
while [ $# -gt 0 ]; do
case $1 in
-gui)
fb_appjar="$findbugs_home/lib/findbugsGUI.jar"
fb_mainclass="edu.umd.cs.findbugs.gui.FindBugsFrame"
;;
-textui)
fb_appjar="$findbugs_home/lib/findbugs.jar"
fb_mainclass="edu.umd.cs.findbugs.FindBugs"
;;
-jvmArgs)
shift
user_jvmargs="$1"
;;
-maxHeap)
shift
maxheap="$1"
;;
-javahome)
shift
fb_javacmd="$1/bin/java"
;;
-debug)
debug_arg="-Dfindbugs.debug=true"
;;
-conserveSpace)
conservespace_arg="-Dfindbugs.conserveSpace=true"
;;
-property)
shift
user_props="-D$1 $user_props"
;;
-D*=*)
user_props="$1 $user_props"
;;
-version)
fb_mainclass=edu.umd.cs.findbugs.Version
fb_appargs="-release"
while [ $# -gt 0 ]; do
shift
done
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
exit 0
;;
-help)
ShowHelpAndExit
;;
# All unrecognized arguments will be accumulated and
# passed to the application.
*)
fb_appargs="$fb_appargs `escape_arg "$1"`"
;;
esac
shift
done
fb_jvmargs="$user_jvmargs $debug_arg $conservespace_arg $workhard_arg $user_props"
fb_maxheap="-Xmx${maxheap}m"
# Extra JVM args for MacOSX.
if [ $fb_osname = "Darwin" ]; then
fb_jvmargs="$fb_jvmargs \
-Xdock:name=FindBugs -Xdock:icon=${findbugs_home}/lib/buggy.icns \
-Dapple.laf.useScreenMenuBar=true"
fi
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
--- NEW FILE: fbwrap ---
#! /bin/sh
# A convenient way to call the main() method of a class
# in findbugs.jar.
program="$0"
# Follow symlinks until we get to the actual file.
while [ -h "$program" ]; do
link=`ls -ld "$program"`
link=`expr "$link" : '.*-> \(.*\)'`
if [ "`expr "$link" : '/.*'`" = 0 ]; then
# Relative
dir=`dirname "$program"`
program="$dir/$link"
else
# Absolute
program="$link"
fi
done
# Assume findbugs home directory is the parent
# of the directory containing the script (which should
# normally be "$findbugs_home/bin").
dir=`dirname $program`
findbugs_home="$dir/.."
# Handle FHS-compliant installations (e.g., Fink)
if [ -d "$findbugs_home/share/findbugs" ]; then
findbugs_home="$findbugs_home/share/findbugs"
fi
# Make absolute
findbugs_home=`cd $findbugs_home && /bin/pwd`
fb_pathsep=':'
# Handle cygwin, courtesy of Peter D. Stout
fb_osname=`uname`
if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
findbugs_home=`cygpath --mixed "$findbugs_home"`
fb_pathsep=';'
fi
if [ ! -d "$findbugs_home" ]; then
echo "The path $findbugs_home,"
echo "which is where I think FindBugs is located,"
echo "does not seem to be a directory."
exit 1
fi
# Choose default java binary
fb_javacmd=java
if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
fb_javacmd=$JAVA_HOME/bin/java
fi
if [ $# -eq 0 ]; then
echo "Usage: fbwrap <main class name> <args...>"
exit 1
fi
fb_mainclass="$1"
shift
fb_javacmd=${fb_javacmd:-"java"}
fb_maxheap=${fb_maxheap:-"-Xmx256m"}
fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}
set -f
#echo command: \
exec $fb_javacmd \
-classpath $fb_appjar$fb_pathsep$CLASSPATH \
-Dfindbugs.home="$findbugs_home"\
$fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs
# vim:ts=3
|