Skip to content

Commit

Permalink
More javadoc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Braden Simpson committed Jul 30, 2012
1 parent 730e37d commit 0495d7b
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/comm/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
import db.SocialDb;
import db.TechnicalDb;

/**
* Entry point for the Com2Pgsql project by Eggnet at UVic.
*
* For instructions on how to use this class and project, visit
* <a href='http://github.com/eggnet/com2pgsql/wiki'>The Project Wiki</a>
*
* @author braden
*
*/
public class Main
{
public static SocialDb db;
Expand Down
13 changes: 12 additions & 1 deletion src/jira/linker/JiraLinker.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public JiraLinker(SocialDb comDb, TechnicalDb linkerDb)
super(comDb, linkerDb);
}

/**
* Runs the linker process, first links from commit messages,
* then issue thread items, then directly from the text anaylsis
* on issues.
*/
@Override
public void Link()
{
Expand All @@ -47,11 +52,11 @@ public void Link()
LinkFromItems();
}

@Override
/**
* Links to the communications artifacts from the commit comments by searching for
* bug numbers using {@link ComResources.BUG_NUMBER_REGEX}.
*/
@Override
public void LinkFromCommitMessages()
{
if (!ComResources.LINK_FROM_COMMIT_MSGS)
Expand All @@ -73,6 +78,12 @@ public void LinkFromCommitMessages()
}
}

/**
* Matches all the bugs numbers as defined in {@link ComResources.BUG_NUMBER_REGEX}
* in a given commit message
* @param c
* @return Set of Bug number matches
*/
public Set<String> getBugNumbers(Commit c)
{
Set<String> bugNumbers = new HashSet<String>();
Expand Down
24 changes: 21 additions & 3 deletions src/linker/Linker.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,21 @@
import db.TechnicalDb;
import extractor.Extractor;

/**
* Abstract implementation of the Linker, Extending classes
* should override the {@link #Link()} method to define their
* own methods of linking to {@link models.Commit}
*
* @author braden
*
*/
public abstract class Linker
{
public class SnippetMatch {
/**
* The result of matching {@link models.CodeRegion}
* @see Linker#findSnippetFile(String, Timestamp, Set, Commit, boolean)
*/
private class SnippetMatch {
public float matchPercent;
public String fileName;
public SnippetMatch(float matchPercent, String fileName)
Expand All @@ -33,6 +45,12 @@ public SnippetMatch(float matchPercent, String fileName)
this.fileName = fileName;
}
}
/**
* Resultant model used in the several different linking methods
* @see Linker#GetRelevantCommitsByPatch(Patch, Timestamp)
* @see Linker#GetRelevantCommitsByCodeRegion(CodeRegion, Timestamp)
* @see Linker#GetRelevantCommitsForFiles(List, Timestamp)
*/
public class LinkedExtraction {
public float Confidence;
public Commit commit;
Expand Down Expand Up @@ -103,7 +121,7 @@ public void LinkFromItems()
waitUntilFinished();
}

public void waitUntilFinished() {
private void waitUntilFinished() {
execPool.shutdown();
try {
execPool.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
Expand All @@ -112,7 +130,7 @@ public void waitUntilFinished() {
}
}

public void runWorker(Set<Item> itemSet)
private void runWorker(Set<Item> itemSet)
{
try {
LinkerThreadWorker worker = new LinkerThreadWorker(this);
Expand Down
6 changes: 6 additions & 0 deletions src/linker/LinkerThreadWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
import models.extractor.stacktrace.StackTrace;
import db.Resources;

/**
* A single worker for the Linker, it runs on a given set of {@link models.Item}
* and inserts the links (if any) into the {@link SocialDb} queue.
* @author braden
*
*/
public class LinkerThreadWorker implements Runnable
{
Linker linker;
Expand Down

0 comments on commit 0495d7b

Please sign in to comment.