Skip to content

Commit

Permalink
Fix javadoc: replace <tt> with {@code ...}
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Jan 19, 2020
1 parent 17b5a3e commit 47d20a9
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* The number of edges to generate.
*
* If provided, a GNM model is used for generation,
* and the <tt>p</tt> value is ignored.
* and the {@code p} value is ignored.
*
* @return a value greater than or equal to zero.
* @see <a href="https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FErd%C5%91s%E2%80%93R%C3%A9nyi_model">
Expand All @@ -71,7 +71,7 @@
* The probability of generating an edge
* between a pair of nodes.
*
* This value is ignored if <tt>edges</tt> is provided.
* This value is ignored if {@code edges} is provided.
*
* If this value is considered, a GNP model is used
* for generation.
Expand All @@ -86,7 +86,7 @@
/**
* Whether to generate random weights for the graph's edges.
*
* If <tt>false</tt>, all edges will have a default edge-weight
* If {@code false}, all edges will have a default edge-weight
* of 1.0.
*
* @return whether random edge weights should be generated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

/**
* Quick-check generator for JGraphT graphs using the
* <tt>@GraphModel</tt> annotation.
* {@code @GraphModel} annotation.
*
* @author Rohan Padhye
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

/**
* Quick-check generator for JGraphT graphs using the
* <tt>@GraphModel</tt> annotation.
* {@code @GraphModel} annotation.
*
* @author Rohan Padhye
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void finalize() {
*
* @return a stream of bytes to be used by the input generator(s)
* @throws IllegalStateException if the last {@link #hasInput()}
* returned <tt>false</tt>
* returned {@code false}
* @throws GuidanceException if there was an I/O error when opening the file
*/
@Override
Expand All @@ -197,7 +197,7 @@ public InputStream getInput() throws IllegalStateException, GuidanceException {
/**
* Waits for the AFL proxy to send a ready signal.
*
* @return Returns <tt>true</tt> in the absence of I/O errors
* @return Returns {@code true} in the absence of I/O errors
*/
@Override
public boolean hasInput() {
Expand Down Expand Up @@ -237,7 +237,7 @@ public boolean hasInput() {
* keep in its queue.
*
* @param result the result of the fuzzing trial
* @param error the exception thrown by the test, or <tt>null</tt>
* @param error the exception thrown by the test, or {@code null}
*/
@Override
public void handleResult(Result result, Throwable error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* or allocation sizes.</p>
*
* <p>The type of performance metric used is configured by a system
* property: <tt>jqf.afl.perfFeedbackType</tt>, which must have
* property: {@code jqf.afl.perfFeedbackType}, which must have
* one of the values specified in the enum {@link PerfFeedbackType}.
* This guidance must be used in accordance with the right run
* scripts that configure the instrumentation to emit trace events
Expand Down
32 changes: 16 additions & 16 deletions fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/guidance/Guidance.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ public interface Guidance {
*
* <p>This method is guaranteed to be invoked by JQF at most
* once after each invocation of {@link #hasInput()} that
* has returned <tt>true</tt>.
* has returned {@code true}.
*
* <p>If {@link #hasInput()} returns <tt>false</tt> or has not
* <p>If {@link #hasInput()} returns {@code false} or has not
* been invoked since the last call to {@link #getInput()},
* then invoking this method may throw an IllegalStateException.
*
* @return a stream of bytes to be used by the input generator(s)
* @throws IllegalStateException if the last {@link #hasInput()}
* returned <tt>false</tt>
* returned {@code false}
* @throws GuidanceException if there was an I/O or other error
* in generating the input stream
*/
Expand All @@ -101,7 +101,7 @@ public interface Guidance {
*
* <p>This method may block until a new
* input stream is made ready. If this method returns
* <tt>false</tt>, then JQF stops fuzzing and this
* {@code false}, then JQF stops fuzzing and this
* guidance will not be used further.
*
* @return whether a new trial should be executed
Expand Down Expand Up @@ -138,28 +138,28 @@ default void observeGeneratedArgs(Object[] args) {
* in a call to {@link #getInput()} and only close them
* inside this method.
*
* <p>If <tt>result</tt> is <tt>SUCCESS</tt>, then
* <tt>error</tt> is either <tt>null</tt> or it is
* <p>If {@code result} is {@code SUCCESS}, then
* {@code error} is either {@code null} or it is
* an instance of a throwable that is declared by the
* test method in its <tt>throws</tt> clause.
* test method in its {@code throws} clause.
*
* <p>If <tt>result</tt> is <tt>INVALID</tt>,
* then <tt>error</tt> is either an
* <tt>AssumptionViolatedException</tt>, if the argument
* of an <tt>assume()</tt> statement was <tt>false</tt>,
* or it is a <tt>GuidanceException</tt>, indicating that
* <p>If {@code result} is {@code INVALID},
* then {@code error} is either an
* {@code AssumptionViolatedException}, if the argument
* of an {@code assume()} statement was {@code false},
* or it is a {@code GuidanceException}, indicating that
* fuzzing was interrupted during the execution of this
* trial (and will not continue further).
*
* <p>If <tt>result</tt> is <tt>FAILURE</tt>, then
* <tt>error</tt> is some other throwable that was thrown by
* the test execution but was not listed in its <tt>throws</tt>
* <p>If {@code result} is {@code FAILURE}, then
* {@code error} is some other throwable that was thrown by
* the test execution but was not listed in its {@code throws}
* clause. This is the only way to detect test errors. Assertion
* errors will typically fall into this category. So will other
* unlisted RuntimeExceptions such as NPE.
*
* @param result the result of the fuzzing trial
* @param error the error thrown during the trial, or <tt>null</tt>
* @param error the error thrown during the trial, or {@code null}
* @throws GuidanceException if there was an I/O or other error
* in handling the result
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* "random" values, which themselves are read from a static file.
*
* The file-backed random number generator can be used for tuning the
* "random" choices made by various <tt>junit-quickcheck</tt>
* "random" choices made by various {@code junit-quickcheck}
* generators using a mutation-based genetic algorithm, in order to
* maximize some objective function that can be measured from the
* execution of each trial, such as code coverage.
Expand Down Expand Up @@ -100,7 +100,7 @@ public StreamBackedRandom(InputStream source, int leadinBytesToIgnore) {
* an {@link IllegalStateException} is thrown.</p>
*
* @param bits the number of random bits to retain (1 to 32 inclusive)
* @return the integer value whose lower <tt>bits</tt> bits contain the
* @return the integer value whose lower {@code bits} bits contain the
* next random data available in the backing source
* @throws IllegalStateException if EOF has already been reached
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ private static void unsetGuidance() {
* Runs the guided fuzzing loop, using the system class loader to load
* test-application classes.
*
* <p>The test class must be annotated with <tt>@RunWith(JQF.class)</tt>
* and the test method must be annotated with <tt>@Fuzz</tt>.</p>
* <p>The test class must be annotated with {@code @RunWith(JQF.class)}
* and the test method must be annotated with {@code @Fuzz}.</p>
*
* <p>Once this method is invoked, the guided fuzzing loop runs continuously
* until the guidance instance decides to stop by returning <tt>false</tt>
* until the guidance instance decides to stop by returning {@code false}
* for {@link Guidance#hasInput()}. Until the fuzzing stops, this method
* cannot be invoked again (i.e. at most one guided fuzzing can be running
* at any time in a single JVM instance).</p>
Expand All @@ -100,11 +100,11 @@ public synchronized static Result run(String testClassName, String testMethod,
* Runs the guided fuzzing loop, using a provided classloader to load
* test-application classes.
*
* <p>The test class must be annotated with <tt>@RunWith(JQF.class)</tt>
* and the test method must be annotated with <tt>@Fuzz</tt>.</p>
* <p>The test class must be annotated with {@code @RunWith(JQF.class)}
* and the test method must be annotated with {@code @Fuzz}.</p>
*
* <p>Once this method is invoked, the guided fuzzing loop runs continuously
* until the guidance instance decides to stop by returning <tt>false</tt>
* until the guidance instance decides to stop by returning {@code false}
* for {@link Guidance#hasInput()}. Until the fuzzing stops, this method
* cannot be invoked again (i.e. at most one guided fuzzing can be running
* at any time in a single JVM instance).</p>
Expand All @@ -130,11 +130,11 @@ public synchronized static Result run(String testClassName, String testMethod,
/**
* Runs the guided fuzzing loop for a resolved class.
*
* <p>The test class must be annotated with <tt>@RunWith(JQF.class)</tt>
* and the test method must be annotated with <tt>@Fuzz</tt>.</p>
* <p>The test class must be annotated with {@code @RunWith(JQF.class)}
* and the test method must be annotated with {@code @Fuzz}.</p>
*
* <p>Once this method is invoked, the guided fuzzing loop runs continuously
* until the guidance instance decides to stop by returning <tt>false</tt>
* until the guidance instance decides to stop by returning {@code false}
* for {@link Guidance#hasInput()}. Until the fuzzing stops, this method
* cannot be invoked again (i.e. at most one guided fuzzing can be running
* at any time in a single JVM instance).</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ public void evaluate() throws Throwable {
* Returns whether an exception is expected to be thrown by a trial method
*
* @param e the class of an exception that is thrown
* @return <tt>true</tt> if e is a subclass of any exception specified
* in the <tt>throws</tt> clause of the trial method.
* @return {@code true} if e is a subclass of any exception specified
* in the {@code throws} clause of the trial method.
*/
private boolean isExceptionExpected(Class<? extends Throwable> e) {
for (Class<?> expectedException : expectedExceptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public InputStream getInput() {
}

/**
* Returns <tt>true</tt> as long as <tt>maxTrials</tt> has not been reached.
* @return <tt>true</tt> as long as <tt>maxTrials</tt> has not been reached
* Returns {@code true} as long as {@code maxTrials} has not been reached.
* @return {@code true} as long as {@code maxTrials} has not been reached
*/
@Override
public boolean hasInput() {
Expand All @@ -96,7 +96,7 @@ public boolean hasInput() {
* Handles the result of a fuzz run.
*
* @param result the result of the fuzzing trial
* @param error the error thrown during the trial, or <tt>null</tt>
* @param error the error thrown during the trial, or {@code null}
*/
@Override
public void handleResult(Result result, Throwable error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public InputStream getInput() {
}

/**
* Returns <tt>true</tt> if there are more input files to replay.
* @return <tt>true</tt> if there are more input files to replay
* Returns {@code true} if there are more input files to replay.
* @return {@code true} if there are more input files to replay
*/
@Override
public boolean hasInput() {
Expand Down Expand Up @@ -170,7 +170,7 @@ private File getCurrentInputFile() {
* Logs the end of run in the log files, if any.
*
* @param result the result of the fuzzing trial
* @param error the error thrown during the trial, or <tt>null</tt>
* @param error the error thrown during the trial, or {@code null}
*/
@Override
public void handleResult(Result result, Throwable error) {
Expand Down Expand Up @@ -227,12 +227,12 @@ public void handleResult(Result result, Throwable error) {
/**
* Returns a callback that can log trace events or code coverage info.
*
* <p>If the system property <tt>jqf.repro.logUniqueBranches</tt> was
* set to <tt>true</tt>, then the callback collects coverage info into
* <p>If the system property {@code jqf.repro.logUniqueBranches} was
* set to {@code true}, then the callback collects coverage info into
* the set {@link #branchesCoveredInCurrentRun}, which can be accessed using
* {@link #getBranchesCovered()}.</p>
*
* <p>Otherwise, if the <tt>traceDir</tt> was non-null during the construction of
* <p>Otherwise, if the {@code traceDir} was non-null during the construction of
* this Guidance instance, then one log file per thread of
* execution is created in this directory. The callbacks generated
* by this method write trace event descriptions in sequence to
Expand Down Expand Up @@ -305,8 +305,8 @@ public Coverage getCoverage() {
* Retyrns the set of branches covered by this repro.
*
* <p>This set will only be non-empty if the system
* property <tt>jqf.repro.logUniqueBranches</tt> was
* set to <tt>true</tt> before the guidance instance
* property {@code jqf.repro.logUniqueBranches} was
* set to {@code true} before the guidance instance
* was constructed.</p>
*
* <p>The format of each element in this set is a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ private static int hob(int num) {
*
* @param that the run coverage whose bits to OR
*
* @return <tt>true</tt> iff <tt>that</tt> is not a subset
* of <tt>this</tt>, causing <tt>this</tt> to change.
* @return {@code true} iff {@code that} is not a subset
* of {@code this}, causing {@code this} to change.
*/
public boolean updateBits(Coverage that) {
boolean changed = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public static void setCallbackGenerator(Function<Thread, Consumer<TraceEvent>> c


/** Start snooping for this thread, with the top-level call being
* the <tt>entryPoint</tt>.
* the {@code entryPoint}.
*
* @param entryPoint the top-level method, formatted as
* <tt>CLASS#METHOD</tt> (e.g.
* <tt>FooBar#main</tt>).
* {@code CLASS#METHOD} (e.g.
* {@code FooBar#main}).
*/
public static void startSnooping(String entryPoint) {
// Mark entry point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* consumer never change and are distinct threads.
*
* This allows reading and writing from the queue without using system
* locks. The only synchronization is via <tt>volatile</tt> pointers for the producer
* locks. The only synchronization is via {@code volatile} pointers for the producer
* and consumer in a fixed-size circular buffer.
*
* Reading from an empty queue and writing to a full queue results in a spinning wait,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public class FuzzGoal extends AbstractMojo {
* Comma-separated list of FQN prefixes to exclude from
* coverage instrumentation.
*
* <p>Example: <tt>org/mozilla/javascript/gen,org/slf4j/logger</tt>,
* <p>Example: {@code org/mozilla/javascript/gen,org/slf4j/logger},
* will exclude classes auto-generated by Mozilla Rhino's CodeGen and
* logging classes.</p>
*/
Expand Down Expand Up @@ -133,7 +133,7 @@ public class FuzzGoal extends AbstractMojo {
* account coverage feedback. Blind input generation is equivalent
* to running QuickCheck.
*
* <p>If this property is set to <tt>true</tt>, then the fuzzing
* <p>If this property is set to {@code true}, then the fuzzing
* algorithm does not maintain a queue. Every input is randomly
* generated from scratch. The program under test is still instrumented
* in order to provide coverage statistics. This mode is mainly useful
Expand Down Expand Up @@ -182,11 +182,11 @@ public class FuzzGoal extends AbstractMojo {
*/
@Parameter(property="quiet")
private boolean quiet;

/**
* Whether to stop fuzzing once a crash is found.
*
* <p>If this property is set to <tt>true</tt>, then the fuzzing
* <p>If this property is set to {@code true}, then the fuzzing
* will exit on first crash. Useful for continuous fuzzing when you dont wont to consume resource
* once a crash is found. Also fuzzing will be more effective once the crash is fixed.</p>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class ReproGoal extends AbstractMojo {
*
* <p>This property is only useful if {@link #logCoverage} is
* set. The semantics are similar to the similarly named
* property in the goal <tt>jqf:fuzz</tt>.</p>
* property in the goal {@code jqf:fuzz}.</p>
*/
@Parameter(property="excludes")
private String excludes;
Expand All @@ -133,7 +133,7 @@ public class ReproGoal extends AbstractMojo {
*
* <p>This property is only useful if {@link #logCoverage} is
* set. The semantics are similar to the similarly named
* property in the goal <tt>jqf:fuzz</tt>.</p>
* property in the goal {@code jqf:fuzz}.</p>
*/
@Parameter(property="includes")
private String includes;
Expand Down

0 comments on commit 47d20a9

Please sign in to comment.