Skip to content

Commit

Permalink
Fix compilation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
albertogoffi committed Feb 28, 2018
1 parent 23b4bd9 commit a5dd735
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import org.toradocu.translator.*;

/**
* Created by arianna on 29/05/17.
*
* <p>Main component. Contains all the methods to compute the {@code SemantichMatch}es for a given
* Main component. Contains all the methods to compute the {@code SemantichMatch}es for a given
* class. This implements the "basic" semantic semantic, i.e. the one that uses plain vector sums.
* Other kinds of matcher will extend this class.
*/
Expand All @@ -28,7 +26,7 @@ public class SemanticMatcher {
* List of words to be ignored in the comment and code element name when performing semantic
* matching.
*/
private final ArrayList stopwords;
private final ArrayList<String> stopwords;

/**
* Threshold up to which a similarity distance is considered acceptable. Zero is perfect
Expand Down Expand Up @@ -115,9 +113,7 @@ private boolean areComplementary(MethodCodeElement candidate, DocumentedExecutab
String candidateName = candidate.getJavaCodeElement().getName();
if (candidateName.matches("(.*)get[A-Z](.*)")) {
String property = candidateName.split("get")[1];
if (method.getName().equals("set" + property)) {
return true;
}
return method.getName().equals("set" + property);
}

return false;
Expand Down

0 comments on commit a5dd735

Please sign in to comment.