<commit_before>package com.accenture.multibank.factory;

import com.accenture.multibank.accounts.AbstractAccount;
import com.accenture.multibank.accounts.AccountModifiable;
import com.accenture.multibank.accounts.AccountType;
import com.accenture.multibank.accounts.CreditAccount;
import com.accenture.multibank.accounts.SavingAccount;
import com.accenture.multibank.generator.AccountNumberGenerator;

public class AccountFacoryImpl implements AccountFactory {

	public AccountModifiable createAccount(AccountNumberGenerator generator, AccountType accountType, int balance) {

		int accNum = generator.generateAccountNumber();

		AbstractAccount acc;
		
		switch (accountType) {
		case SAVING:
			acc = new SavingAccount(accNum, balance);
			break;
		case CREDIT:
			acc = new CreditAccount(accNum, balance);
			break;
			
		}
		

		return acc;
	}

}<commit_msg>fixe static type return value<commit_after>package com.accenture.multibank.factory;

import com.accenture.multibank.accounts.AccountModifiable;
import com.accenture.multibank.accounts.AccountType;
import com.accenture.multibank.accounts.CreditAccount;
import com.accenture.multibank.accounts.SavingAccount;
import com.accenture.multibank.generator.AccountNumberGenerator;

public class AccountFacoryImpl implements AccountFactory {

	public AccountModifiable createAccount(AccountNumberGenerator generator, AccountType accountType, int balance) {

		int accNum = generator.generateAccountNumber();

		AccountModifiable acc = null;
		
		// TODO try catch block -> throw exception if accounttype not available

		switch (accountType) {
		case SAVING:
			acc = new SavingAccount(accNum, balance);
			break;
		case CREDIT:
			acc = new CreditAccount(accNum, balance);
			break;
			
		}
		

		return acc;
	}

}
{'fraction_non_alphanumeric': 0.07923033389926429, 'fraction_numerical': 0.0, 'mean_word_length': 5.291814946619217, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4627859', 'n_tokens_mistral': 580, 'n_tokens_neox': 518, 'n_words': 113}