CWE-584 Return Inside Finally
This test takes the name of a file as input. It then attempts
to get the absolute path of the file and open it for reading.
Since GetAbsolutePath.getAbsolutePath has a return in a finally
clause, any generated warnings are dropped, eventually leading to
a null pointer exception.
org.apache.lucene.demo.IndexFiles:org.apache.lucene.demo.SearchFiles:org.apache.lucene.demo.facet.SimpleFacetsExample:org.apache.lucene.demo.facet.AssociationsFacetsExample
$SS_TC_DEPS/java/lucene/*:$SS_TC_ROOT/$SS_TC_INSTALL/classes/*:$SS_TC_ROOT/$SS_TC_INSTALL/*:$SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar
UNSPECIFIED
UNSPECIFIED
java $SS_JAVA_OPTS -Djava.library.path=$SS_TC_DEPS/lib64/ -cp "$SS_JAVA_CLASSPATH"
env ANT_HOME=$SS_TC_DEPS/ant ant $SS_ANT_OPTS -Dstonesoup.database.postgres.required=no -Dstonesoup.hibernate.postgres.required=no -Dstonesoup.hibernate.mysql.required=no -Dstonesoup.database.mysql.required=no -Dstonesoup.socket.required=no -lib $SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar -Dstonesoup.socket.lib.dir="$SS_TC_DEPS/java/stonesoup/socket" -Dstonesoup.hibernate.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/mysql" -Dstonesoup.hibernate.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/postgres" -Dstonesoup.database.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/database/mysql" -Dstonesoup.database.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/database/postgres" -Dlib.dir=$SS_TC_DEPS/java/lucene -Ddist.dir="$SS_TC_ROOT/$SS_TC_INSTALL" -Dbuild.dir="$SS_TC_ROOT/$SS_TC_INSTALL" -Dstonesoup.lttng.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng" -Dstonesoup.lttng.dummy.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng-dummy" compile
index a single file
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.IndexFiles -index $SS_TC_ROOT/$SS_TC_DATA/good-01-index -docs $SS_TC_ROOT/$SS_TC_DATA/good-01/
GOOD-01 AND GOOD-02 AND GOOD-03 AND GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
if [[ -a ../testData/good-01-index/_0.cfe ]]; then exit 0; else exit 1; fi;
if [[ -a ../testData/good-01-index/_0.cfs ]]; then exit 0; else exit 1; fi;
../testData/good-01-index/segments_1
good-01/segments_1
good-01-index/segments.gen
good-01/segments.gen
DOES_NOT_RETURN
CONTROLLED_EXIT
search a single indexed file for "bubbles"
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
aFile.txt
One Fish, Two Fish, Red fish, Blue Fish.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query bubbles -index $SS_TC_ROOT/$SS_TC_DATA/good-02/index/
GOOD-02 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-02/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
index two files
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
asdfasdfasdf.txt
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.IndexFiles -index $SS_TC_ROOT/$SS_TC_DATA/good-03-index -docs $SS_TC_ROOT/$SS_TC_DATA/good-03/
GOOD-01 AND GOOD-02 AND GOOD-03 AND GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
if [[ -a ../testData/good-03-index/_0.cfe ]]; then exit 0; else exit 1; fi;
if [[ -a ../testData/good-03-index/_0.cfe ]]; then exit 0; else exit 1; fi;
../testData/good-03-index/segments_1
good-03/segments_1
../testData/good-03-index/segments.gen
good-03/segments.gen
DOES_NOT_RETURN
CONTROLLED_EXIT
search two indexed files
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query Sawyer -index $SS_TC_ROOT/$SS_TC_DATA/good-04/index/
GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-04/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search files
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
aFile.txt
One Fish, Two Fish, Red fish, Blue Fish.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query microfilm -index $SS_TC_ROOT/$SS_TC_DATA/good-05/index/
GOOD-05 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-05/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search by facets
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
asdfasdfasdf.txt
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.facet.SimpleFacetsExample
GOOD-06 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-06/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search by facet association
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.facet.AssociationsFacetsExample
GOOD-07 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-07/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
index a large number of files
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
aFile.txt
One Fish, Two Fish, Red fish, Blue Fish.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.IndexFiles -index $SS_TC_ROOT/$SS_TC_DATA/good-08-index -docs $SS_TC_ROOT/$SS_TC_DATA/good-08/
GOOD-01 AND GOOD-02 AND GOOD-03 AND GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
if [[ -a ../testData/good-08-index/_0.cfe ]]; then exit 0; else exit 1; fi;
if [[ -a ../testData/good-08-index/_0.cfe ]]; then exit 0; else exit 1; fi;
../testData/good-08-index/segments_1
good-08/segments_1
../testData/good-08-index/segments.gen
good-08/segments.gen
DOES_NOT_RETURN
CONTROLLED_EXIT
search files using regular expression
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
asdfasdfasdf.txt
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query /\d\d\d/ -index $SS_TC_ROOT/$SS_TC_DATA/good-09/index/
GOOD-09 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-09/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search files using fuzzy searching
Environment variables
NONE
$SS_TC_ROOT/testData/embryoniform_tarok.bin
i_exist_yo.txt
This is some text, it is in the file.
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query "password~ OR pengui*" -index $SS_TC_ROOT/$SS_TC_DATA/good-09/index/
GOOD-10 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-10/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variables
DOS_UNCONTROLLED_EXIT
$SS_TC_ROOT/testData/embryoniform_tarok.bin
this_file_does_not_exist_kthanksbai.txt
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query bubbles -index $SS_TC_ROOT/$SS_TC_DATA/good-02/index/
weakness_started_5tEzomIyVZzKaddk1dVy AND ((NOT PERFORMER AND (runtime_exception_error_msg47AHHSGn6D OR runtime_exception_nxwEkdLT1b) AND NOT timeout_dUviFP9I2q) or (PERFORMER AND NOT ((runtime_exception_error_msg47AHHSGn6D OR runtime_exception_nxwEkdLT1b) OR timeout_dUviFP9I2q)))
(NOT PERFORMER AND (runtime_exception_error_msg47AHHSGn6D OR runtime_exception_nxwEkdLT1b) AND NOT timeout_dUviFP9I2q) or (PERFORMER AND NOT ((runtime_exception_error_msg47AHHSGn6D OR runtime_exception_nxwEkdLT1b) OR timeout_dUviFP9I2q))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
STONESOUP: Error in verifying absolute path
logfile.txt
java.lang.NullPointerException
None
stonesoup_trace:weakness_start
Environment variables
DOS_UNCONTROLLED_EXIT
$SS_TC_ROOT/testData/embryoniform_tarok.bin
whatareyouevenlookingfor.txt
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.facet.AssociationsFacetsExample
weakness_started_psRa9Rk2Xwb7qdlYrP1j AND ((NOT PERFORMER AND (runtime_exception_error_msgF2mG4dEIMd OR runtime_exception_u8c4sw3vzu) AND NOT timeout_wLDyS55dTu) or (PERFORMER AND NOT ((runtime_exception_error_msgF2mG4dEIMd OR runtime_exception_u8c4sw3vzu) OR timeout_wLDyS55dTu)))
(NOT PERFORMER AND (runtime_exception_error_msgF2mG4dEIMd OR runtime_exception_u8c4sw3vzu) AND NOT timeout_wLDyS55dTu) or (PERFORMER AND NOT ((runtime_exception_error_msgF2mG4dEIMd OR runtime_exception_u8c4sw3vzu) OR timeout_wLDyS55dTu))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
STONESOUP: Error in verifying absolute path
logfile.txt
java.lang.NullPointerException
None
stonesoup_trace:weakness_start