test_class.declarator: normalizer = new TransactionNormalizer()
test_class.modifier: private final
test_class.original_string: private final TransactionNormalizer normalizer = new TransactionNormalizer();
test_class.type: TransactionNormalizer
test_class.var_name: normalizer
test_class.file: services/src/test/java/com/greensopinion/finance/services/transaction/TransactionNormalizerTest.java
test_class.identifier: TransactionNormalizerTest
test_case.body: @Test
  	public void normalizeTwoEqualPositives() {
  		Transaction transaction1 = mockTransaction(10234);
  		Transaction transaction2 = mockTransaction(10234);
  		assertEquals(ImmutableList.of(transaction1, transaction2),
  				normalizer.normalize(ImmutableList.of(transaction1, transaction2)));
  	}
test_case.class_method_signature: TransactionNormalizerTest.normalizeTwoEqualPositives()
test_case.full_signature: @Test public void normalizeTwoEqualPositives()
test_case.identifier: normalizeTwoEqualPositives
test_case.invocations: mockTransaction mockTransaction assertEquals of normalize of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void normalizeTwoEqualPositives()
focal_class.file: services/src/main/java/com/greensopinion/finance/services/transaction/TransactionNormalizer.java
focal_class.identifier: TransactionNormalizer
focal_class.class_method_signature: TransactionNormalizer.normalize(List<Transaction> transactions)
focal_class.full_signature: public List<Transaction> normalize(List<Transaction> transactions)
focal_class.identifier: normalize
focal_class.modifiers: public
focal_class.parameters: (List<Transaction> transactions)
focal_class.return: List<Transaction>
focal_class.signature: List<Transaction> normalize(List<Transaction> transactions)
focal_method.body: public List<Transaction> normalize(List<Transaction> transactions) {
  		List<Transaction> normalizedTransactions = new ArrayList<>(transactions);
  
  		ListMultimap<Long, Transaction> transactionByAbsoluteValue = ArrayListMultimap.create();
  		for (Transaction transaction : transactions) {
  			transactionByAbsoluteValue.put(Math.abs(transaction.getAmount()), transaction);
  		}
  		for (Long amount : transactionByAbsoluteValue.keySet()) {
  			List<Transaction> list = transactionByAbsoluteValue.get(amount);
  			Set<Transaction> canceledOut = Sets.newIdentityHashSet();
  			for (Transaction transaction : list) {
  				if (canceledOut.contains(transaction)) {
  					continue;
  				}
  				for (Transaction transaction2 : list) {
  					if (transaction.getAmount() == -transaction2.getAmount() && !canceledOut.contains(transaction2)) {
  						canceledOut.add(transaction);
  						canceledOut.add(transaction2);
  						break;
  					}
  				}
  			}
  			normalizedTransactions.removeAll(canceledOut);
  		}
  
  		return normalizedTransactions;
  	}
focal_method.class_method_signature: TransactionNormalizer.normalize(List<Transaction> transactions)
focal_method.full_signature: public List<Transaction> normalize(List<Transaction> transactions)
focal_method.identifier: normalize
focal_method.invocations: create put abs getAmount keySet get newIdentityHashSet contains getAmount getAmount contains add add removeAll
focal_method.modifiers: public
focal_method.parameters: (List<Transaction> transactions)
focal_method.return: List<Transaction>
focal_method.signature: List<Transaction> normalize(List<Transaction> transactions)