test_class.file: services/src/test/java/com/greensopinion/finance/services/domain/CategoryTest.java
test_class.identifier: CategoryTest
test_case.body: @Test
  	public void matches() {
  		MatchRule rule = MatchRule.withPattern("abc");
  		MatchRule rule2 = MatchRule.withPattern("def");
  		Category category = new Category("a name", ImmutableList.of(rule, rule2));
  		assertTrue(category.matches(MockTransaction.create("2015-01-01", "aaabc", 123)));
  		assertTrue(category.matches(MockTransaction.create("2015-01-01", "def", 123)));
  		assertFalse(category.matches(MockTransaction.create("2015-01-01", "ghi", 123)));
  		assertFalse(new Category("nope").matches(MockTransaction.create("2015-01-01", "def", 123)));
  	}
test_case.class_method_signature: CategoryTest.matches()
test_case.full_signature: @Test public void matches()
test_case.identifier: matches
test_case.invocations: withPattern withPattern of assertTrue matches create assertTrue matches create assertFalse matches create assertFalse matches create
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void matches()
focal_class.declarator: name
focal_class.modifier: private final
focal_class.original_string: private final String name;
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: matchRules
focal_class.modifier: private final
focal_class.original_string: private final List<MatchRule> matchRules;
focal_class.type: List<MatchRule>
focal_class.var_name: matchRules
focal_class.file: services/src/main/java/com/greensopinion/finance/services/domain/Category.java
focal_class.identifier: Category
focal_class.class_method_signature: Category.Category(String name)
focal_class.full_signature: public  Category(String name)
focal_class.identifier: Category
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.signature:  Category(String name)
focal_class.class_method_signature: Category.Category(String name, List<MatchRule> matchRules)
focal_class.full_signature: public  Category(String name, List<MatchRule> matchRules)
focal_class.identifier: Category
focal_class.modifiers: public
focal_class.parameters: (String name, List<MatchRule> matchRules)
focal_class.signature:  Category(String name, List<MatchRule> matchRules)
focal_class.class_method_signature: Category.getName()
focal_class.full_signature: public String getName()
focal_class.identifier: getName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: Category.getMatchRules()
focal_class.full_signature: public List<MatchRule> getMatchRules()
focal_class.identifier: getMatchRules
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<MatchRule>
focal_class.signature: List<MatchRule> getMatchRules()
focal_class.class_method_signature: Category.matches(Transaction transaction)
focal_class.full_signature: public boolean matches(Transaction transaction)
focal_class.identifier: matches
focal_class.modifiers: public
focal_class.parameters: (Transaction transaction)
focal_class.return: boolean
focal_class.signature: boolean matches(Transaction transaction)
focal_class.class_method_signature: Category.withMatchRule(MatchRule rule)
focal_class.full_signature: public Category withMatchRule(MatchRule rule)
focal_class.identifier: withMatchRule
focal_class.modifiers: public
focal_class.parameters: (MatchRule rule)
focal_class.return: Category
focal_class.signature: Category withMatchRule(MatchRule rule)
focal_class.class_method_signature: Category.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public boolean matches(Transaction transaction) {
  		checkNotNull(transaction);
  		if (!Strings.isNullOrEmpty(transaction.getCategoryName())) {
  			return getName().equals(transaction.getCategoryName());
  		}
  		for (MatchRule matchRule : getMatchRules()) {
  			if (matchRule.matches(transaction)) {
  				return true;
  			}
  		}
  		return false;
  	}
focal_method.class_method_signature: Category.matches(Transaction transaction)
focal_method.full_signature: public boolean matches(Transaction transaction)
focal_method.identifier: matches
focal_method.invocations: checkNotNull isNullOrEmpty getCategoryName equals getName getCategoryName getMatchRules matches
focal_method.modifiers: public
focal_method.parameters: (Transaction transaction)
focal_method.return: boolean
focal_method.signature: boolean matches(Transaction transaction)