Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small issues reported by Codacy #186

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package lucida.handler;

// Java packages
import java.util.List;
import java.util.ArrayList;

import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;

Expand Down
7 changes: 0 additions & 7 deletions lucida/asyncthrift/fake/fakeqa/src/lucida/main/QADaemon.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
package lucida.main;

import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.ArrayList;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import org.apache.thrift.TProcessor;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.server.TNonblockingServer;
import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TThreadedSelectorServer;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TNonblockingServerSocket;
import org.apache.thrift.transport.TNonblockingServerTransport;
import org.apache.thrift.transport.TTransportException;
import org.apache.thrift.async.AsyncMethodCallback;

import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 9 additions & 18 deletions lucida/asyncthrift/fake/fakeqa/src/lucida/thrift/QueryInput.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 9 additions & 18 deletions lucida/asyncthrift/fake/fakeqa/src/lucida/thrift/QuerySpec.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions lucida/calendar/CalendarClient/CalendarClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.ArrayList;
import java.util.Properties;

//Thrift java libraries
//Thrift java libraries
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
Expand All @@ -16,9 +16,9 @@
//Generated code
import thrift.*;

/**
* A Calendar Client that get the upcoming events from Calendar Server and prints the results.
*/
/**
* A Calendar Client that get the upcoming events from Calendar Server and prints the results.
*/
public class CalendarClient {
public static void main(String [] args)
throws IOException {
Expand All @@ -44,7 +44,7 @@ public static void main(String [] args)
QuerySpec query_spec = new QuerySpec();
query_spec.content = new ArrayList<QueryInput>();
query_spec.content.add(query_input);

// Initialize thrift objects.
// TTransport transport = new TSocket("clarity08.eecs.umich.edu", port);
TTransport transport = new TSocket("localhost", port);
Expand All @@ -62,7 +62,5 @@ public static void main(String [] args)
} catch (TException e) {
e.printStackTrace();
}

return;
}
}
4 changes: 0 additions & 4 deletions lucida/calendar/src/main/java/calendar/CAServiceHandler.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package calendar;

import java.util.List;
import java.io.File;
import java.util.ArrayList;

import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;

Expand Down
11 changes: 0 additions & 11 deletions lucida/calendar/src/main/java/calendar/CalendarDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,17 @@
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.ArrayList;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.Properties;
import org.apache.thrift.TProcessor;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.server.TNonblockingServer;
import org.apache.thrift.server.TServer;
import org.apache.thrift.server.TThreadedSelectorServer;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TNonblockingServerSocket;
import org.apache.thrift.transport.TNonblockingServerTransport;
import org.apache.thrift.transport.TTransportException;
import org.apache.thrift.async.AsyncMethodCallback;

import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;

import thrift.*;

Expand Down
1 change: 0 additions & 1 deletion lucida/calendar/src/main/java/calendar/TextProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.util.Calendar;
import java.text.SimpleDateFormat;

import calendar.CAServiceHandler;
import edu.stanford.nlp.ling.CoreAnnotations;
import edu.stanford.nlp.pipeline.*;
import edu.stanford.nlp.time.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import info.ephyra.answerselection.filters.ScoreSorterFilter;
import info.ephyra.answerselection.filters.StopwordFilter;
import info.ephyra.answerselection.filters.TruncationFilter;
import info.ephyra.answerselection.filters.WebDocumentFetcherFilter;
import info.ephyra.io.Logger;
import info.ephyra.io.MsgPrinter;
import info.ephyra.nlp.LingPipe;
Expand Down Expand Up @@ -41,7 +40,6 @@
import info.ephyra.questionanalysis.QuestionNormalizer;
import info.ephyra.search.Result;
import info.ephyra.search.Search;
import info.ephyra.search.searchers.BingKM;
import info.ephyra.search.searchers.IndriKM;

import java.util.ArrayList;
Expand Down Expand Up @@ -274,9 +272,6 @@ protected void initFactoid() {
// search
// - knowledge miners for unstructured knowledge sources
Search.clearKnowledgeMiners();
// Search.addKnowledgeMiner(new BingKM());
// Search.addKnowledgeMiner(new GoogleKM());
// Search.addKnowledgeMiner(new YahooKM());
for (String[] indriIndices : IndriKM.getIndriIndices())
Search.addKnowledgeMiner(new IndriKM(indriIndices, false));
// for (String[] indriServers : IndriKM.getIndriServers())
Expand All @@ -290,7 +285,6 @@ protected void initFactoid() {
// - answer extraction filters
AnswerSelection.addFilter(new AnswerTypeFilter());
AnswerSelection.addFilter(new AnswerPatternFilter());
//AnswerSelection.addFilter(new WebDocumentFetcherFilter());
AnswerSelection.addFilter(new PredicateExtractionFilter());
AnswerSelection.addFilter(new FactoidsFromPredicatesFilter());
AnswerSelection.addFilter(new TruncationFilter());
Expand Down
Loading