nus-yam/ex-repair huggingface dataset:
Program: 153819
Project: 153819
Buggy source:
@Override public Set<ActionSpec> getModuleActions(){
  Set<ActionSpec> actions=new HashSet<ActionSpec>();
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  return actions;
}

Fixed version (ground truth):
@Override public Set<ActionSpec> getModuleActions(){
  Set<ActionSpec> actions=new HashSet<ActionSpec>();
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  return actions;
}
Program: 153820
Project: 153820
Buggy source:
/** 
 * Process the edit domain form
 */
public void postEditDomain(){
  if (getDomainValidator().isValid()) {
    this.configurationManager.updateDomainConfiguration(this.in("String_Node_Str"),this.in("String_Node_Str"),this.in("String_Node_Str"),this.in("String_Node_Str"));
    this.redirect(ROOT_URL);
  }
 else {
    this.echo();
    this.invalid(EDIT_DOMAIN_TPL);
  }
}

Fixed version (ground truth):
/** 
 * Process the edit domain form
 */
public void postEditDomain(){
  if (getDomainValidator().isValid()) {
    this.configurationManager.updateDomainConfiguration(this.in("String_Node_Str"),this.in("String_Node_Str"),this.in("String_Node_Str"),this.in("String_Node_Str",new SafeStringConverter()));
    this.redirect(ROOT_URL);
  }
 else {
    this.echo();
    this.invalid(EDIT_DOMAIN_TPL);
  }
}
Program: 153821
Project: 153821
Buggy source:
/** 
 * Process new user form
 */
@AuthenticationRequired(authenticationLevel=AuthenticationLevel.AUTHENTICATE) public void postCreateUser(){
  Validator validator=getUserValidator();
  if (validator.isValid()) {
    this.userManager.createUser(this.currentUser(),in("String_Node_Str"),in("String_Node_Str"),in("String_Node_Str"));
    redirect(getProperty(APPLICATION_BASE_URL));
  }
 else {
    out("String_Node_Str",this.currentUser());
    echo();
    invalid(NEW_USER_TPL);
  }
}

Fixed version (ground truth):
/** 
 * Process new user form
 */
@AuthenticationRequired(authenticationLevel=AuthenticationLevel.AUTHENTICATE) public void postCreateUser(){
  Validator validator=getUserValidator();
  if (validator.isValid()) {
    this.userManager.createUser(this.currentUser(),this.in("String_Node_Str",safeString()),this.in("String_Node_Str",safeString()),this.in("String_Node_Str",new SafeStringConverter()));
    redirect(getProperty(APPLICATION_BASE_URL));
  }
 else {
    out("String_Node_Str",this.currentUser());
    echo();
    invalid(NEW_USER_TPL);
  }
}
Program: 153822
Project: 153822
Buggy source:
@AuthenticationRequired @NamespaceRequired @OnlyForNamespace public void getDomainIndex(){
  try {
    out("String_Node_Str",this.configurationManager.getDomainConfiguration());
    namespaceManager.changeToGlobalNamespace();
    boolean hasPermission=this.authorizationManager.getActiveUserDomains(this.currentUser()).contains(this.subDomain());
    if (hasPermission) {
      success(DOMAIN_INDEX_TPL);
    }
 else {
      success(DOMAIN_PUBLIC_INDEX_TPL);
    }
  }
  finally {
    namespaceManager.changeToPreviousNamespace();
  }
}

Fixed version (ground truth):
@AuthenticationRequired @NamespaceRequired @OnlyForNamespace public void getDomainIndex(){
  try {
    out("String_Node_Str",this.configurationManager.getDomainConfiguration());
    namespaceManager.changeToGlobalNamespace();
    boolean hasPermission=this.authorizationManager.getActiveUserDomains(this.currentUser()).contains(this.subDomain());
    if (hasPermission) {
      success(DOMAIN_INDEX_TPL);
    }
 else {
      success(DOMAIN_PUBLIC_INDEX_TPL);
    }
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
 finally {
    namespaceManager.changeToPreviousNamespace();
  }
}
Program: 153823
Project: 153823
Buggy source:
/** 
 * @param description
 */
public void setDescription(String description){
  this.description=description;
}

Fixed version (ground truth):
/** 
 * @param description
 */
public void setDescription(String description){
  this.description=new Text(description);
}
Program: 153824
Project: 153824
Buggy source:
/** 
 * @return description of domain
 */
public String getDescription(){
  return this.description;
}

Fixed version (ground truth):
/** 
 * @return description of domain
 */
public String getDescription(){
  return this.description.getValue();
}
Program: 153825
Project: 153825
Buggy source:
/** 
 * @return description of domain
 */
public String getDescription(){
  return this.description.getValue();
}

Fixed version (ground truth):
/** 
 * @return description of domain
 */
public String getDescription(){
  if (this.description != null) {
    return this.description.getValue();
  }
  return "String_Node_Str";
}
Program: 153826
Project: 153826
Buggy source:
/** 
 * Posts a transfer between users
 */
public void postTransferBank(){
  Validator input=BankValidators.getTransferValidator();
  Validator amountValidator=BankValidators.getAmountValidator();
  try {
    if (input.isValid() && amountValidator.isValid()) {
      this.accountManager.transact(this.currentUser(),this.in("String_Node_Str"),new BigDecimal(this.in("String_Node_Str")),this.in("String_Node_Str"),TransactionType.valueOf(this.in("String_Node_Str")));
      this.redirect(BASE_URL);
    }
 else {
      this.out("String_Node_Str",this.accountManager.getBalance(this.currentUser()));
      this.echo();
      this.invalid(TRANSFER_TPL);
    }
  }
 catch (  DisabledBankAccountException ex) {
    this.handleDisabledAccount(ex.getMessage(),TRANSFER_TPL);
  }
catch (  InsufficientBalanceException e) {
    this.out(INVALID,"String_Node_Str");
    this.echo();
    this.invalid(TRANSFER_TPL);
  }
}

Fixed version (ground truth):
/** 
 * Posts a transfer between users
 * @throws DisabledBankAccountException 
 */
public void postTransferBank() throws DisabledBankAccountException {
  Validator input=BankValidators.getTransferValidator();
  Validator amountValidator=BankValidators.getAmountValidator();
  try {
    if (input.isValid() && amountValidator.isValid()) {
      this.accountManager.transact(this.currentUser(),this.in("String_Node_Str"),new BigDecimal(this.in("String_Node_Str")),this.in("String_Node_Str"),TransactionType.valueOf(this.in("String_Node_Str")));
      this.redirect(BASE_URL);
    }
 else {
      this.out("String_Node_Str",this.accountManager.getBalance(this.currentUser()));
      this.echo();
      this.invalid(TRANSFER_TPL);
    }
  }
 catch (  DisabledBankAccountException ex) {
    this.handleDisabledAccount(ex.getMessage(),TRANSFER_TPL);
  }
catch (  InsufficientBalanceException e) {
    this.out("String_Node_Str",this.accountManager.getBalance(this.currentUser()));
    this.out("String_Node_Str","String_Node_Str");
    this.echo();
    this.invalid(TRANSFER_TPL);
  }
}
Program: 153827
Project: 153827
Buggy source:
/** 
 * Creates the domain at Rout53
 * @throws Route53Exception if some error occurs when accessing route53 API
 */
public void createDomain(String domainName,String adminID,boolean createDNS){
  if (this.hasApplicationConfiguration()) {
    if (createDNS) {
      ApplicationConfiguration appConf=this.applicationConfigurationDAO.get(APPLICATION_NAME);
      Route53Util.createDomain(domainName,appConf.getRoute53AccessKeyID(),appConf.getRoute53AccessKeySecret(),appConf.getRoute53ZoneID());
    }
    eventBus.publish(new DomainCreatedEvent(domainName,adminID));
  }
 else {
    throw new DataDoesNotExistsException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Creates the domain at Rout53
 * @throws Route53Exception if some error occurs when accessing route53 API
 */
public void createDomain(String domainName,String adminID,boolean createDNS){
  if (this.hasApplicationConfiguration()) {
    if (createDNS) {
      String fullDomain=domainName + "String_Node_Str" + getProperty("String_Node_Str");
      ApplicationConfiguration appConf=this.applicationConfigurationDAO.get(APPLICATION_NAME);
      Route53Util.createDomain(fullDomain,appConf.getRoute53AccessKeyID(),appConf.getRoute53AccessKeySecret(),appConf.getRoute53ZoneID());
    }
    eventBus.publish(new DomainCreatedEvent(domainName,adminID));
  }
 else {
    throw new DataDoesNotExistsException("String_Node_Str");
  }
}
Program: 153828
Project: 153828
Buggy source:
/** 
 * Gets some important information about the bank
 * @throws DisabledBankAccountException If the bank account is disabled - This kind of account can't be disabled, if this occurs, indicates an DEFECT
 */
public void getStatsBank() throws DisabledBankAccountException {
  BigDecimal balance=this.accountManager.getBalance(this.domainBankAccount());
  BigDecimal ballast=this.accountManager.getBallast();
  this.out("String_Node_Str",balance);
  this.out("String_Node_Str",ballast);
  this.out("String_Node_Str",ballast.subtract(balance));
  this.out("String_Node_Str",this.accountManager.getCurrentAmountTransactions());
  this.out("String_Node_Str",this.accountManager.getCurrentAmountCredit());
  this.success(STATS_TPL);
}

Fixed version (ground truth):
/** 
 * Gets some important information about the bank
 * @throws DisabledBankAccountException If the bank account is disabled - This kind of account can't be disabled, if this occurs, indicates an DEFECT
 */
public void getStatsBank() throws DisabledBankAccountException {
  BigDecimal balance=this.accountManager.getBalance(this.domainBankAccount());
  BigDecimal ballast=this.accountManager.getBallast();
  this.out("String_Node_Str",balance);
  this.out("String_Node_Str",ballast);
  this.out("String_Node_Str",this.accountManager.getCurrentAmountTransactions());
  this.out("String_Node_Str",this.accountManager.getCurrentCreditAmount(this.domainBankAccount()));
  this.success(STATS_TPL);
}
Program: 153829
Project: 153829
Buggy source:
/** 
 * Posts parameters to get bank's static information
 */
public void postStatsBank(){
  Validator dateValidator=BankValidators.getDateValidator();
  if (dateValidator.isValid()) {
    Date startDate=this.in("String_Node_Str",date(SHORT));
    Date endDate=this.in("String_Node_Str",date(SHORT));
    this.out("String_Node_Str",this.accountManager.getAmountTransactions(startDate,endDate));
    this.out("String_Node_Str",this.accountManager.getAmountCredit(startDate,endDate));
    jsonSuccess();
  }
 else {
    jsonInvalid();
  }
}

Fixed version (ground truth):
/** 
 * Posts parameters to get bank's static information
 */
public void postStatsBank(){
  Validator dateValidator=BankValidators.getDateValidator();
  if (dateValidator.isValid()) {
    Date startDate=this.in("String_Node_Str",date(SHORT));
    Date endDate=this.in("String_Node_Str",date(SHORT));
    this.out("String_Node_Str",this.accountManager.getAmountTransactions(startDate,endDate));
    this.out("String_Node_Str",this.accountManager.getCreditAmount(this.domainBankAccount(),startDate,endDate));
    jsonSuccess();
  }
 else {
    jsonInvalid();
  }
}
Program: 153830
Project: 153830
Buggy source:
/** 
 * Returns the bank amount credit specified by a date range
 * @param accountId accountId of the account
 * @param startDate startDate of the range
 * @param endDate endDate of the range
 * @return an amount representing the sum of all credit transactions of an account
 */
public BigDecimal getAmountCreditByDateRange(String accountId,Date startDate,Date endDate){
  Collection<BankTransaction> transactions=this.getCreditTransactionsByDateRange(accountId,startDate,endDate);
  BigDecimal sum=BigDecimal.ZERO;
  for (  BankTransaction transaction : transactions) {
    sum=sum.add(transaction.getAmount());
  }
  return sum;
}

Fixed version (ground truth):
/** 
 * Returns an account credit amount specified by a date range
 * @param accountId accountId of the account
 * @param startDate startDate of the range
 * @param endDate endDate of the range
 * @return an amount representing the sum of all credit transactions of an account
 */
public BigDecimal getAmountCreditByDateRange(String accountId,Date startDate,Date endDate){
  Collection<BankTransaction> transactions=this.getCreditTransactionsByDateRange(accountId,startDate,endDate);
  BigDecimal sum=BigDecimal.ZERO;
  for (  BankTransaction transaction : transactions) {
    if (!transaction.getAccountOrig().equals(SystemAccount.ID)) {
      sum=sum.add(transaction.getAmount());
    }
  }
  return sum;
}
Program: 153831
Project: 153831
Buggy source:
/** 
 * Returns the current amount of transactions of the current month.
 * @return an amount representing the sum of all transactions made on the current month
 */
public BigDecimal getCurrentAmountTransactions(){
  return this.transactionDAO.getAmountByDateRange(getFirstDateOfCurrentMonth(),DateUtil.getDate());
}

Fixed version (ground truth):
/** 
 * Returns the current amount of transactions of the current month.
 * @return an amount representing the sum of all transactions made on the current month
 */
public BigDecimal getCurrentAmountTransactions(){
  return this.transactionDAO.getAllAmountByDateRange(getFirstDateOfCurrentMonth(),DateUtil.getDate());
}
Program: 153832
Project: 153832
Buggy source:
/** 
 * Returns the amount of transactions specified by a date range
 * @param startDate startDate of the range
 * @param endDate endDate of the range
 * @return an amount representing the sum of all transactions made on the date range
 */
public BigDecimal getAmountTransactions(Date startDate,Date endDate){
  return this.transactionDAO.getAmountByDateRange(startDate,endDate);
}

Fixed version (ground truth):
/** 
 * Returns the amount of transactions specified by a date range
 * @param startDate startDate of the range
 * @param endDate endDate of the range
 * @return an amount representing the sum of all transactions made on the date range
 */
public BigDecimal getAmountTransactions(Date startDate,Date endDate){
  return this.transactionDAO.getAllAmountByDateRange(startDate,endDate);
}
Program: 153833
Project: 153833
Buggy source:
/** 
 * Process the edit contract form. Receives the <code>id</code>, <code>status</code>.
 */
public void postEditContract(){
  Validator existentContractStatusValidator=ServiceValidators.getExistentContractStatusValidator();
  if (existentContractStatusValidator.isValid()) {
    try {
      this.servicesManager.updateContractStatus(this.in("String_Node_Str"),ServiceContractStatus.valueOf(this.in("String_Node_Str")),this.currentUser());
      this.redirect(SHOW_CONTRACTS_URL);
    }
 catch (    NotServiceProviderException e) {
      this.echo();
      this.out("String_Node_Str",i18n.get(this.locales(),e.getMessage()));
      this.invalid(EDIT_CONTRACT_TPL);
    }
catch (    ServiceContractNotFoundException e) {
      this.notFound();
    }
  }
 else {
    this.jsonInvalid();
  }
}

Fixed version (ground truth):
/** 
 * Process the edit contract form. Receives the <code>id</code>, <code>status</code>.
 */
public void postEditContract(){
  Validator existentContractStatusValidator=ServiceValidators.getExistentContractStatusValidator();
  if (existentContractStatusValidator.isValid()) {
    try {
      this.servicesManager.updateContractStatus(this.in("String_Node_Str"),ServiceContractStatus.valueOf(this.in("String_Node_Str")),this.currentUser());
      this.redirect(SHOW_CONTRACTS_URL);
    }
 catch (    NotServiceProviderException e) {
      this.echo();
      this.out("String_Node_Str",i18n.get(this.locales(),e.getMessage()));
      this.invalid(EDIT_CONTRACT_TPL);
    }
catch (    DataDoesNotExistsException e) {
      this.notFound();
    }
  }
 else {
    this.jsonInvalid();
  }
}
Program: 153834
Project: 153834
Buggy source:
/** 
 * Show the form to edit an service Receives the service id as <code>id</code>
 */
@AuthorizationRequired public void getEditService(){
  try {
    Service service=this.servicesManager.getService(this.in("String_Node_Str"));
    this.out("String_Node_Str",service.getId());
    this.out("String_Node_Str",service.getName());
    this.out("String_Node_Str",service.getAmount());
    this.out("String_Node_Str",service.getCategory());
    this.out("String_Node_Str",service.getDescription());
    this.success(EDIT_SERVICE_TPL);
  }
 catch (  ServiceNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * Show the form to edit an service Receives the service id as <code>id</code>
 */
@AuthorizationRequired public void getEditService(){
  try {
    Service service=this.servicesManager.getService(this.in("String_Node_Str"));
    this.out("String_Node_Str",service.getId());
    this.out("String_Node_Str",service.getName());
    this.out("String_Node_Str",service.getAmount());
    this.out("String_Node_Str",service.getCategory());
    this.out("String_Node_Str",service.getDescription());
    this.success(EDIT_SERVICE_TPL);
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153835
Project: 153835
Buggy source:
/** 
 * Process the service edit form Receives <code>name</code>, <code>amount</code>, <code>category</code> and <code>description</code>
 */
@AuthorizationRequired public void postEditService(){
  Validator validator=ServiceValidators.getServiceValidator();
  if (validator.isValid()) {
    try {
      this.servicesManager.updateService(this.in("String_Node_Str"),this.in("String_Node_Str",safeString()),this.in("String_Node_Str",bigDecimalNumber()),this.in("String_Node_Str",safeString()),this.in("String_Node_Str",safeString()));
      this.redirect(BASE_URL);
    }
 catch (    ServiceNotFoundException e) {
      this.notFound();
    }
  }
 else {
    this.echo();
    this.invalid(EDIT_SERVICE_TPL);
  }
}

Fixed version (ground truth):
/** 
 * Process the service edit form Receives <code>name</code>, <code>amount</code>, <code>category</code> and <code>description</code>
 */
@AuthorizationRequired public void postEditService(){
  Validator validator=ServiceValidators.getServiceValidator();
  if (validator.isValid()) {
    try {
      this.servicesManager.updateService(this.in("String_Node_Str"),this.in("String_Node_Str",safeString()),this.in("String_Node_Str",bigDecimalNumber()),this.in("String_Node_Str",safeString()),this.in("String_Node_Str",safeString()));
      this.redirect(BASE_URL);
    }
 catch (    DataDoesNotExistsException e) {
      this.notFound();
    }
  }
 else {
    this.echo();
    this.invalid(EDIT_SERVICE_TPL);
  }
}
Program: 153836
Project: 153836
Buggy source:
/** 
 * Posts the payment for a contract Receives the contract id as <code>id</code>
 */
public void postPayContract(){
  try {
    this.servicesManager.makePayment(this.in("String_Node_Str"),this.currentUser());
    this.redirect(SHOW_CONTRACTS_URL);
  }
 catch (  ServiceContractNotFoundException e) {
    this.notFound();
  }
catch (  FiggoException e) {
    this.out("String_Node_Str",i18n.get(this.locales(),e.getMessage()));
    this.out("String_Node_Str",this.servicesManager.getProvidedContracts(this.currentUser()));
    this.out("String_Node_Str",this.servicesManager.getHiredContracts(this.currentUser()));
    this.invalid(LIST_CONTRACTS_TPL);
  }
}

Fixed version (ground truth):
/** 
 * Posts the payment for a contract Receives the contract id as <code>id</code>
 */
public void postPayContract(){
  try {
    this.servicesManager.makePayment(this.in("String_Node_Str"),this.currentUser());
    this.redirect(SHOW_CONTRACTS_URL);
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
catch (  FiggoException e) {
    this.out("String_Node_Str",i18n.get(this.locales(),e.getMessage()));
    this.out("String_Node_Str",this.servicesManager.getProvidedContracts(this.currentUser()));
    this.out("String_Node_Str",this.servicesManager.getHiredContracts(this.currentUser()));
    this.invalid(LIST_CONTRACTS_TPL);
  }
}
Program: 153837
Project: 153837
Buggy source:
/** 
 * JSON method Adds a new provider to a service. Receives the service id as <code>id</code> and gets the current user to add as provider.
 */
@AuthorizationRequired public void postAddProvider(){
  try {
    Service service=this.servicesManager.getService(this.in("String_Node_Str"));
    service.addProvider(this.currentUser());
    this.out("String_Node_Str",this.currentUser());
    this.out("String_Node_Str",this.in("String_Node_Str"));
    this.jsonSuccess();
  }
 catch (  ServiceNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * JSON method Adds a new provider to a service. Receives the service id as <code>id</code> and gets the current user to add as provider.
 */
@AuthorizationRequired public void postAddProvider(){
  try {
    this.servicesManager.addProvider(this.in("String_Node_Str"),this.currentUser());
    this.out("String_Node_Str",this.currentUser());
    this.out("String_Node_Str",this.in("String_Node_Str"));
    this.jsonSuccess();
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153838
Project: 153838
Buggy source:
/** 
 * JSON method Requests a service from a provides. Receives the service id as <code>id</code> and the service provider as <code>provider</code>
 */
public void postRequestContract(){
  try {
    Validator contractValidator=ServiceValidators.getContractValidator();
    if (contractValidator.isValid()) {
      this.servicesManager.requestContract(this.in("String_Node_Str"),this.currentUser(),this.in("String_Node_Str"));
      this.jsonSuccess();
    }
 else {
      this.jsonInvalid();
    }
  }
 catch (  InexistentServiceProviderException e) {
    this.out("String_Node_Str",i18n.get(this.locales(),e.getMessage()));
    this.jsonInvalid();
  }
catch (  ServiceNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * JSON method Requests a service from a provides. Receives the service id as <code>id</code> and the service provider as <code>provider</code>
 */
public void postRequestContract(){
  try {
    Validator contractValidator=ServiceValidators.getContractValidator();
    if (contractValidator.isValid()) {
      this.servicesManager.requestContract(this.in("String_Node_Str"),this.currentUser(),this.in("String_Node_Str"));
      this.jsonSuccess();
    }
 else {
      this.jsonInvalid();
    }
  }
 catch (  NotServiceProviderException e) {
    this.out("String_Node_Str",i18n.get(this.locales(),e.getMessage()));
    this.jsonInvalid();
  }
catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153839
Project: 153839
Buggy source:
/** 
 * Removes a Service Receives the service id as <code>id</code>
 */
@AuthorizationRequired public void postRemoveService(){
  try {
    this.servicesManager.removeService(this.in("String_Node_Str"));
    this.redirect(BASE_URL);
  }
 catch (  ServiceNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * Removes a Service Receives the service id as <code>id</code>
 */
@AuthorizationRequired public void postRemoveService(){
  try {
    this.servicesManager.removeService(this.in("String_Node_Str"));
    this.redirect(BASE_URL);
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153840
Project: 153840
Buggy source:
/** 
 * JSON method Removes a provider. Receives the service id as <code>id</code> and gets the current user to remove as provider.
 */
@AuthorizationRequired public void postRemoveProvider(){
  try {
    this.out("String_Node_Str",this.servicesManager.removeProvider(this.in("String_Node_Str"),this.currentUser()));
    this.jsonSuccess();
  }
 catch (  ServiceNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * JSON method Removes a provider. Receives the service id as <code>id</code> and gets the current user to remove as provider.
 */
@AuthorizationRequired public void postRemoveProvider(){
  try {
    this.out("String_Node_Str",this.servicesManager.removeProvider(this.in("String_Node_Str"),this.currentUser()));
    this.jsonSuccess();
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153841
Project: 153841
Buggy source:
/** 
 * Shows the form tho edit a contract Receives the contract id as <code>id</code>
 */
public void getEditContract(){
  try {
    ServiceContract serviceContract=this.servicesManager.getServiceContract(this.in("String_Node_Str"));
    this.out("String_Node_Str",serviceContract);
    this.out("String_Node_Str",serviceContract.getStatus());
    this.success(EDIT_CONTRACT_TPL);
  }
 catch (  ServiceContractNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * Shows the form tho edit a contract Receives the contract id as <code>id</code>
 */
public void getEditContract(){
  try {
    ServiceContract serviceContract=this.servicesManager.getServiceContract(this.in("String_Node_Str"));
    this.out("String_Node_Str",serviceContract);
    this.out("String_Node_Str",serviceContract.getStatus());
    this.success(EDIT_CONTRACT_TPL);
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153842
Project: 153842
Buggy source:
/** 
 * Shows service details Receives the service id as <code>id</code>
 */
@AuthorizationRequired public void getShowService(){
  try {
    Service service=this.servicesManager.getService(this.in("String_Node_Str"));
    this.out("String_Node_Str",service);
    this.success(SHOW_SERVICE_TPL);
  }
 catch (  ServiceNotFoundException e) {
    this.notFound();
  }
}

Fixed version (ground truth):
/** 
 * Shows service details Receives the service id as <code>id</code>
 */
@AuthorizationRequired public void getShowService(){
  try {
    Service service=this.servicesManager.getService(this.in("String_Node_Str"));
    this.out("String_Node_Str",service);
    this.success(SHOW_SERVICE_TPL);
  }
 catch (  DataDoesNotExistsException e) {
    this.notFound();
  }
}
Program: 153843
Project: 153843
Buggy source:
@Override public void eventPublished(Event event){
  BankPaymentNotPerformedEvent bankEvt=(BankPaymentNotPerformedEvent)event;
  try {
    this.serviceManager.rollbackPayment(bankEvt.getContractId());
  }
 catch (  ServiceContractNotFoundException e) {
    logger.error(e,"String_Node_Str",bankEvt.getContractId());
  }
  PersistenceManagerPool.forceClose();
}

Fixed version (ground truth):
@Override public void eventPublished(Event event){
  BankPaymentNotPerformedEvent bankEvt=(BankPaymentNotPerformedEvent)event;
  try {
    this.serviceManager.rollbackPayment(bankEvt.getContractId());
  }
 catch (  DataDoesNotExistsException e) {
    logger.error(e,"String_Node_Str",bankEvt.getContractId());
  }
  PersistenceManagerPool.forceClose();
}
Program: 153844
Project: 153844
Buggy source:
/** 
 * Remove an activity from a role <b>AjaxMethod</b>
 */
public void postRemoveRoleActivity(){
  this.authorizationManager.removeActivitiesToRole(this.in("String_Node_Str"),this.in("String_Node_Str"));
  this.jsonSuccess();
}

Fixed version (ground truth):
/** 
 * Remove an activity from a role <b>AjaxMethod</b>
 */
public void postRemoveRoleActivity(){
  this.authorizationManager.removeActivitiesToRole(this.in("String_Node_Str",safeStringConverter),this.in("String_Node_Str"));
  this.jsonSuccess();
}
Program: 153845
Project: 153845
Buggy source:
/** 
 * Removes a role from an user <b>AjaxMethod</b>
 */
public void postRemoveUserRole(){
  this.authorizationManager.removeUserFromRole(this.in("String_Node_Str"),this.in("String_Node_Str"),this.subDomain());
  this.jsonSuccess();
}

Fixed version (ground truth):
/** 
 * Removes a role from an user <b>AjaxMethod</b>
 */
public void postRemoveUserRole(){
  this.authorizationManager.removeUserFromRole(this.in("String_Node_Str",safeStringConverter),this.in("String_Node_Str"),this.subDomain());
  this.jsonSuccess();
}
Program: 153846
Project: 153846
Buggy source:
/** 
 * Removes an role
 */
public void postRemoveRole(){
  this.authorizationManager.removeRole(this.in("String_Node_Str"));
  this.redirect(BASE_ROLES_URL);
}

Fixed version (ground truth):
/** 
 * Removes an role
 */
public void postRemoveRole(){
  this.authorizationManager.removeRole(this.in("String_Node_Str",safeStringConverter));
  this.redirect(BASE_ROLES_URL);
}
Program: 153847
Project: 153847
Buggy source:
/** 
 * Adds an user to a role <b>AjaxMethod</b>
 */
public void postAddUserRole(){
  this.authorizationManager.addUsersToRole(this.in("String_Node_Str"),this.in("String_Node_Str"));
  this.jsonSuccess();
}

Fixed version (ground truth):
/** 
 * Adds an user to a role <b>AjaxMethod</b>
 */
public void postAddUserRole(){
  this.authorizationManager.addUsersToRole(this.in("String_Node_Str",safeStringConverter),this.in("String_Node_Str"));
  this.jsonSuccess();
}
Program: 153848
Project: 153848
Buggy source:
/** 
 * Add activity to a role. <b>AjaxMethod</b>
 */
public void postAddRoleActivity(){
  this.authorizationManager.addActivitiesToRole(this.in("String_Node_Str"),this.in("String_Node_Str"));
  this.jsonSuccess();
}

Fixed version (ground truth):
/** 
 * Add activity to a role. <b>AjaxMethod</b>
 */
public void postAddRoleActivity(){
  this.authorizationManager.addActivitiesToRole(this.in("String_Node_Str",safeStringConverter),this.in("String_Node_Str"));
  this.jsonSuccess();
}
Program: 153849
Project: 153849
Buggy source:
public ModuleConfiguration(String moduleName){
  this.moduleName=moduleName;
  this.timestamp=new Date();
}

Fixed version (ground truth):
public ModuleConfiguration(String moduleName){
  this.moduleName=moduleName;
  this.timestamp=getTime();
}
Program: 153850
Project: 153850
Buggy source:
/** 
 * TODO
 * @param module
 * @param properties
 */
public void setModuleProperties(Module module,Map<String,String> properties){
  DomainConfiguration domainConf=this.getDomainConfiguration();
  if (domainConf.isModuleEnabled(module.name())) {
    ModuleConfiguration moduleConf=this.moduleDAO.get(module.name());
    for (    String propertyKey : properties.keySet()) {
      this.setModuleProperty(moduleConf,propertyKey,properties.get(propertyKey));
    }
    moduleConf.setTimestamp(new Date());
    this.moduleDAO.save(moduleConf);
  }
 else {
    throw new DataDoesNotExistsException("String_Node_Str" + module.name() + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * TODO
 * @param module
 * @param properties
 */
public void setModuleProperties(Module module,Map<String,String> properties){
  DomainConfiguration domainConf=this.getDomainConfiguration();
  if (domainConf.isModuleEnabled(module.name())) {
    ModuleConfiguration moduleConf=this.moduleDAO.get(module.name());
    for (    String propertyKey : properties.keySet()) {
      this.setModuleProperty(moduleConf,propertyKey,properties.get(propertyKey));
    }
    moduleConf.setTimestamp(getTime());
    this.moduleDAO.save(moduleConf);
  }
 else {
    throw new DataDoesNotExistsException("String_Node_Str" + module.name() + "String_Node_Str");
  }
}
Program: 153851
Project: 153851
Buggy source:
/** 
 * Return the last transactions for an account, with id greater with the given last used transaction id. This method ensures that the list's last element will be the one with the greater id. However, there is no order guarantee for elements.
 * @param accountId the account id
 * @param lastUsedTransactionId the last  {@link BankTransaction}. All   {@link BankTransaction} returned will haveid greater than this id. If you want to get all transactions for an account, lastUsedTransactionId should be <code>null</code>;
 * @return A list that contains all transactions for the given user, starting from the given{@link BankTransaction} id.
 */
public Collection<BankTransaction> getLastTransactions(String accountId,Long lastUsedTransactioId);

Fixed version (ground truth):
/** 
 * Return the last transactions for an account, starting at the given date (inclusive).
 * @param accountId the account id
 * @param startDate the last  {@link BankTransaction} timestamp (as long). All results timestamp willbe equals or greater than the given start date. If you want to get all transactions for an account, lastUsedTransactionId should be <code>null</code>;
 * @return A list that contains all transactions for the given user, starting from the given{@link BankTransaction} startDate (inclusive).
 */
public Collection<BankTransaction> getLastTransactions(String accountId,Long startDate);
Program: 153852
Project: 153852
Buggy source:
/** 
 * @return the balance's value
 */
public BigDecimal getBalance(){
  if (this.transactionInfoService == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  Collection<BankTransaction> transactions=this.transactionInfoService.getLastTransactions(this.ownerId,this.lastTransactionId);
  if (!transactions.isEmpty()) {
    BigDecimal transactionsBalance=new BigDecimal(0);
    for (    BankTransaction bankTransaction : transactions) {
      if (bankTransaction.isOrigin(this.ownerId)) {
        transactionsBalance=transactionsBalance.subtract(bankTransaction.getAmount());
      }
 else {
        transactionsBalance=transactionsBalance.add(bankTransaction.getAmount());
      }
    }
    this.value=this.value.add(transactionsBalance);
    Object[] tArray=transactions.toArray();
    this.lastTransactionId=((BankTransaction)tArray[tArray.length - 1]).getId();
  }
  return this.value;
}

Fixed version (ground truth):
/** 
 * @return the balance's value
 */
public BigDecimal getBalance(){
  if (this.transactionInfoService == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  Collection<BankTransaction> transactions=this.transactionInfoService.getLastTransactions(this.ownerId,this.lastTimestamp);
  if (!transactions.isEmpty()) {
    BigDecimal transactionsBalance=new BigDecimal(0);
    for (    BankTransaction bankTransaction : transactions) {
      if (!this.lastTransactionId.contains(bankTransaction.getId())) {
        if (bankTransaction.isOrigin(this.ownerId)) {
          transactionsBalance=transactionsBalance.subtract(bankTransaction.getAmount());
        }
 else {
          transactionsBalance=transactionsBalance.add(bankTransaction.getAmount());
        }
        this.updateLastTransactionData(bankTransaction);
      }
    }
    this.value=this.value.add(transactionsBalance);
    if (value.compareTo(BigDecimal.ZERO) < 0) {
      logger.error("String_Node_Str",this.ownerId,this.value);
    }
  }
  return this.value;
}
Program: 153853
Project: 153853
Buggy source:
public BankAccount(String ownerId){
  this.ownerId=ownerId;
  this.value=new BigDecimal(0);
  this.lastTransactionId=null;
  this.enabled=true;
}

Fixed version (ground truth):
public BankAccount(String ownerId){
  this.ownerId=ownerId;
  this.value=new BigDecimal(0);
  this.lastTimestamp=null;
  this.enabled=true;
}
Program: 153854
Project: 153854
Buggy source:
/** 
 * Created only for tests purposes
 * @param accountOrig
 * @param accountDest
 * @param value
 * @param type
 * @param comment
 */
public BankTransaction(String accountOrig,String accountDest,BigDecimal value,TransactionType type,String comment,Long transactionId){
  this(accountOrig,accountDest,value,type,comment);
  this.id=transactionId;
}

Fixed version (ground truth):
/** 
 * To be used by tests
 */
protected BankTransaction(String accountOrig,String accountDest,BigDecimal value,TransactionType type,String comment,Date date){
  this.accountOrig=accountOrig;
  this.accountDest=accountDest;
  this.amount=value;
  this.type=type;
  this.comment=comment;
  this.timestamp=date.getTime();
}
Program: 153855
Project: 153855
Buggy source:
/** 
 * @return the id
 */
public Long getId(){
  return this.id;
}

Fixed version (ground truth):
/** 
 * @return the id
 */
public Long getId(){
  if (this.id == null && Boolean.parseBoolean(System.getProperty("String_Node_Str"))) {
    return Long.parseLong(this.comment);
  }
  return this.id;
}
Program: 153856
Project: 153856
Buggy source:
/** 
 * @return the date
 */
public Date getDate(){
  return this.date;
}

Fixed version (ground truth):
/** 
 * @return the date
 */
public Date getDate(){
  return new Date(this.timestamp);
}
Program: 153857
Project: 153857
Buggy source:
@SuppressWarnings("String_Node_Str") protected Collection<BankTransaction> getDebitTransactionsByDateRange(String accountId,Date startDate,Date endDate){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  return (List<BankTransaction>)query.execute(accountId,startDate,endDate);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected Collection<BankTransaction> getDebitTransactionsByDateRange(String accountId,Date startDate,Date endDate){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  return (List<BankTransaction>)query.execute(accountId,startDate.getTime(),endDate.getTime());
}
Program: 153858
Project: 153858
Buggy source:
/** 
 * Returns the amount of transactions specified by a date range
 * @param startDate startDate of the range
 * @param endDate endDate of the range
 * @return an amount representing the sum of all transactions made on the date range
 */
@SuppressWarnings("String_Node_Str") public BigDecimal getAmountByDateRange(Date startDate,Date endDate){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  List<BankTransaction> transactions=(List<BankTransaction>)query.execute(startDate,endDate);
  BigDecimal sum=BigDecimal.ZERO;
  for (  BankTransaction transaction : transactions) {
    sum=sum.add(transaction.getAmount());
  }
  return sum;
}

Fixed version (ground truth):
/** 
 * Returns the amount of transactions specified by a date range
 * @param startDate startDate of the range
 * @param endDate endDate of the range
 * @return an amount representing the sum of all transactions made on the date range
 */
@SuppressWarnings("String_Node_Str") public BigDecimal getAmountByDateRange(Date startDate,Date endDate){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  List<BankTransaction> transactions=(List<BankTransaction>)query.execute(startDate.getTime(),endDate.getTime());
  BigDecimal sum=BigDecimal.ZERO;
  for (  BankTransaction transaction : transactions) {
    sum=sum.add(transaction.getAmount());
  }
  return sum;
}
Program: 153859
Project: 153859
Buggy source:
/** 
 * Get last transactions with id greater than the given lastUsedTransactionId
 */
@SuppressWarnings("String_Node_Str") private Collection<BankTransaction> getLastTransactionsFrom(String accountId,Long lastUsedTransactionId){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  query.setOrdering("String_Node_Str");
  List<BankTransaction> transactions1=(List<BankTransaction>)query.execute(lastUsedTransactionId,accountId);
  query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  query.setOrdering("String_Node_Str");
  List<BankTransaction> transactions2=(List<BankTransaction>)query.execute(lastUsedTransactionId,accountId);
  return this.mergeTransactions(transactions1,transactions2,Long.MIN_VALUE);
}

Fixed version (ground truth):
/** 
 * Get last transactions older than the given lastUsedTransaction
 */
@SuppressWarnings("String_Node_Str") private Collection<BankTransaction> getLastTransactionsFrom(String accountId,Long lastUsedTransaction){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  query.setOrdering("String_Node_Str");
  List<BankTransaction> transactions1=(List<BankTransaction>)query.execute(lastUsedTransaction,accountId);
  query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  query.setOrdering("String_Node_Str");
  List<BankTransaction> transactions2=(List<BankTransaction>)query.execute(lastUsedTransaction,accountId);
  return this.mergeTransactions(transactions1,transactions2,Long.MIN_VALUE);
}
Program: 153860
Project: 153860
Buggy source:
@Override public Collection<BankTransaction> getLastTransactions(String accountId,Long lastUsedTransactionId){
  if (lastUsedTransactionId == null) {
    return this.getAllTransactions(accountId,Long.MIN_VALUE);
  }
 else {
    return this.getLastTransactionsFrom(accountId,lastUsedTransactionId);
  }
}

Fixed version (ground truth):
@Override public Collection<BankTransaction> getLastTransactions(String accountId,Long startDate){
  if (startDate == null) {
    return this.getAllTransactions(accountId,Long.MIN_VALUE);
  }
 else {
    return this.getLastTransactionsFrom(accountId,startDate);
  }
}
Program: 153861
Project: 153861
Buggy source:
@SuppressWarnings("String_Node_Str") protected Collection<BankTransaction> getCreditTransactionsByDateRange(String accountId,Date startDate,Date endDate){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  return (List<BankTransaction>)query.execute(accountId,startDate,endDate);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected Collection<BankTransaction> getCreditTransactionsByDateRange(String accountId,Date startDate,Date endDate){
  Query query=this.datastoreFacade.createQueryForClass(BankTransaction.class);
  query.setFilter("String_Node_Str");
  return (List<BankTransaction>)query.execute(accountId,startDate.getTime(),endDate.getTime());
}
Program: 153862
Project: 153862
Buggy source:
/** 
 * Gets the   {@link BankAccount} ID for the current subdomain. It will only works properly whenthe controller is in a subdomain.
 * @return The {@link BankAccount} ID for the current subdomain account.
 */
protected String domainBankAccount(){
  return generateDomainBankAccountID(this.subDomain());
}

Fixed version (ground truth):
/** 
 * Gets the   {@link BankAccount} ID for the current subdomain. It will only works properly whenthe controller is in a subdomain.
 * @return The {@link BankAccount} ID for the current subdomain account.
 */
protected String domainBankAccount(){
  return generateDomainUserID(this.subDomain());
}
Program: 153863
Project: 153863
Buggy source:
@Override public Set<Class<? extends Subscriber>> getSubscribers(){
  Set<Class<? extends Subscriber>> subscribers=new TreeSet<Class<? extends Subscriber>>();
  subscribers.add(UsersUploadSubscriber.class);
  return subscribers;
}

Fixed version (ground truth):
@Override public Set<Class<? extends Subscriber>> getSubscribers(){
  Set<Class<? extends Subscriber>> subscribers=new TreeSet<Class<? extends Subscriber>>();
  subscribers.add(UsersUploadSubscriber.class);
  subscribers.add(DomainUserSubscriber.class);
  return subscribers;
}
Program: 153864
Project: 153864
Buggy source:
public Set<ActionSpec> getModuleActions(){
  Set<ActionSpec> actions=new HashSet<ActionSpec>();
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str"));
  return actions;
}

Fixed version (ground truth):
public Set<ActionSpec> getModuleActions(){
  Set<ActionSpec> actions=new HashSet<ActionSpec>();
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str"));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str",true));
  actions.add(new ActionSpec("String_Node_Str"));
  return actions;
}
Program: 153865
Project: 153865
Buggy source:
/** 
 * @param namespaceManager the namespaceManager to set
 */
public void setNamespaceManager(NamespaceManager namespaceManager){
  this.namespaceManager=namespaceManager;
  this.domain=namespaceManager.currentNamespace();
}

Fixed version (ground truth):
/** 
 * @param namespaceManager the namespaceManager to set
 */
public void setNamespaceManager(NamespaceManager namespaceManager){
  this.namespaceManager=namespaceManager;
}
Program: 153866
Project: 153866
Buggy source:
public AuthorizationHelper(String userId){
  this.userId=userId;
}

Fixed version (ground truth):
public AuthorizationHelper(String userId,String domain){
  this.userId=userId;
  this.domain=domain;
}
Program: 153867
Project: 153867
Buggy source:
@Override public void preRender(TemplateResponse response){
  response.addOutput("String_Node_Str",new AuthorizationHelper(this.currentUser()));
}

Fixed version (ground truth):
@Override public void preRender(TemplateResponse response){
  response.addOutput("String_Node_Str",new AuthorizationHelper(this.currentUser(),this.subDomain()));
}
Program: 153868
Project: 153868
Buggy source:
/** 
 * POST /user/request/reject
 */
@AuthenticationRequired public void postRejectRequestUser(){
  this.authorizationManager.removeDomainUser(this.subDomain(),this.in("String_Node_Str"));
  this.redirect(BASE_USERS_URL);
}

Fixed version (ground truth):
/** 
 * POST /user/request/reject
 */
@AuthorizationRequired public void postRejectRequestUser(){
  this.authorizationManager.removeDomainUser(this.subDomain(),this.in("String_Node_Str"));
  this.redirect(BASE_USERS_URL);
}
Program: 153869
Project: 153869
Buggy source:
/** 
 * POST /user/request/accept
 */
@AuthenticationRequired public void postAcceptRequestUser(){
  this.authorizationManager.activateDomainUser(this.subDomain(),this.in("String_Node_Str"));
  this.redirect(BASE_USERS_URL);
}

Fixed version (ground truth):
/** 
 * POST /user/request/accept
 */
@AuthorizationRequired public void postAcceptRequestUser(){
  this.authorizationManager.activateDomainUser(this.subDomain(),this.in("String_Node_Str"));
  this.redirect(BASE_USERS_URL);
}
Program: 153870
Project: 153870
Buggy source:
/** 
 * GET /users
 */
@AuthenticationRequired public void getListUsers(){
  this.out("String_Node_Str",this.authorizationManager.getActiveUsers(this.subDomain()));
  this.out("String_Node_Str",this.authorizationManager.getNonActiveUsers(this.subDomain()));
  this.success(LIST_USER_TPL);
}

Fixed version (ground truth):
/** 
 * GET /users
 */
public void getListUsers(){
  this.out("String_Node_Str",this.authorizationManager.getActiveUsers(this.subDomain()));
  this.out("String_Node_Str",this.authorizationManager.getNonActiveUsers(this.subDomain()));
  this.success(LIST_USER_TPL);
}
Program: 153871
Project: 153871
Buggy source:
/** 
 * Checks if username belongs to a specific role of a specific domain.
 * @return <code>true</code> if the given user is authorized to perform the given activity,<code>false</code> otherwise.
 */
public boolean isAuthorized(String username,String activityName){
  return this.googleAuthorizer.isApplicationAdmin() || this.roleDAO.existsRoleFor(username,activityName);
}

Fixed version (ground truth):
/** 
 * Checks if username belongs to a specific role of a specific domain.
 * @return <code>true</code> if the given user is authorized to perform the given activity,<code>false</code> otherwise.
 */
public boolean isAuthorized(String username,String activityName){
  boolean authorized=this.googleAuthorizer.isApplicationAdmin() || this.roleDAO.existsRoleFor(username,activityName);
  logger.debug("String_Node_Str",username,activityName,authorized);
  return authorized;
}