Program: 24561
Project: 24561
Buggy source:
/** 
 * Update Aggregator
 * @param oldAggregatorId
 * @param name
 * @param nameCode
 * @param homepageUrl
 * @throws IOException
 * @return MessageType
 * @throws ObjectNotFoundException 
 * @throws InvalidArgumentsException 
 */
public Aggregator updateAggregator(String oldAggregatorId,String name,String nameCode,String homepageUrl) throws ObjectNotFoundException, InvalidArgumentsException, IOException {
  Aggregator aggregator=((DefaultDataManager)ConfigSingleton.getRepoxContextUtil().getRepoxManager().getDataManager()).getAggregator(oldAggregatorId);
  if (aggregator != null) {
    if (name != null)     aggregator.setName(name);
    if (nameCode != null)     aggregator.setNameCode(nameCode);
    if (homepageUrl != null && !homepageUrl.equals("String_Node_Str")) {
      try {
        if (!homepageUrl.startsWith("String_Node_Str") && !homepageUrl.startsWith("String_Node_Str")) {
          homepageUrl="String_Node_Str" + homepageUrl;
        }
        if (!FileUtilSecond.checkUrl(homepageUrl)) {
          throw new Exception();
        }
        aggregator.setHomePage(homepageUrl);
      }
 catch (      Exception e) {
        throw new InvalidArgumentsException(homepageUrl);
      }
    }
    for (    Aggregator actualAggregator : aggregators) {
      if (actualAggregator.getId().equals(oldAggregatorId)) {
        aggregators.remove(actualAggregator);
        break;
      }
    }
    aggregators.add(aggregator);
    saveData();
    return aggregator;
  }
 else {
    throw new ObjectNotFoundException(oldAggregatorId);
  }
}

Fixed version (ground truth):
/** 
 * Update Aggregator
 * @param oldAggregatorId
 * @param name
 * @param nameCode
 * @param homepageUrl
 * @throws IOException
 * @return MessageType
 * @throws ObjectNotFoundException 
 * @throws InvalidArgumentsException 
 */
public Aggregator updateAggregator(String oldAggregatorId,String name,String nameCode,String homepageUrl) throws ObjectNotFoundException, InvalidArgumentsException, IOException {
  Aggregator aggregator=((DefaultDataManager)ConfigSingleton.getRepoxContextUtil().getRepoxManager().getDataManager()).getAggregator(oldAggregatorId);
  if (aggregator != null) {
    if (name != null)     aggregator.setName(name);
    if (nameCode != null)     aggregator.setNameCode(nameCode);
    if (homepageUrl != null && !homepageUrl.equals("String_Node_Str")) {
      try {
        if (!homepageUrl.startsWith("String_Node_Str") && !homepageUrl.startsWith("String_Node_Str")) {
          homepageUrl="String_Node_Str" + homepageUrl;
        }
        if (!FileUtilSecond.checkUrl(homepageUrl)) {
          throw new Exception();
        }
        aggregator.setHomePage(homepageUrl);
      }
 catch (      Exception e) {
        throw new InvalidArgumentsException(homepageUrl);
      }
    }
 else     if (homepageUrl != null && homepageUrl.equals("String_Node_Str")) {
      aggregator.setHomePage(homepageUrl);
    }
    for (    Aggregator actualAggregator : aggregators) {
      if (actualAggregator.getId().equals(oldAggregatorId)) {
        aggregators.remove(actualAggregator);
        break;
      }
    }
    aggregators.add(aggregator);
    saveData();
    return aggregator;
  }
 else {
    throw new ObjectNotFoundException(oldAggregatorId);
  }
}