Program: 58791
Project: 58791
Buggy source:
public MoveLine findConsolidateMoveLine(Map<List<Object>,MoveLine> map,MoveLine moveLine,List<Object> keys){
  if (map != null && !map.isEmpty()) {
    Map<List<Object>,MoveLine> copyMap=new HashMap<List<Object>,MoveLine>(map);
    while (!copyMap.isEmpty()) {
      if (map.containsKey(keys)) {
        MoveLine moveLineIt=map.get(keys);
        int count=0;
        List<AnalyticDistributionLine> list1=moveLineIt.getAnalyticDistributionLineList();
        List<AnalyticDistributionLine> list2=moveLine.getAnalyticDistributionLineList();
        List<AnalyticDistributionLine> copyList=new ArrayList<AnalyticDistributionLine>(list1);
        if (list1.size() == list2.size()) {
          for (          AnalyticDistributionLine analyticDistributionLine : list2) {
            for (            AnalyticDistributionLine analyticDistributionLineIt : copyList) {
              if (analyticDistributionLine.getAnalyticAxis().equals(analyticDistributionLineIt.getAnalyticAxis()) && analyticDistributionLine.getAnalyticAccount().equals(analyticDistributionLineIt.getAnalyticAccount()) && analyticDistributionLine.getPercentage().equals(analyticDistributionLineIt.getPercentage())&& analyticDistributionLine.getAnalyticJournal().equals(analyticDistributionLineIt.getAnalyticJournal())) {
                copyList.remove(analyticDistributionLineIt);
                count++;
                break;
              }
            }
          }
          if (count == list1.size()) {
            return moveLineIt;
          }
        }
      }
 else {
        return null;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public MoveLine findConsolidateMoveLine(Map<List<Object>,MoveLine> map,MoveLine moveLine,List<Object> keys){
  if (map != null && !map.isEmpty()) {
    Map<List<Object>,MoveLine> copyMap=new HashMap<List<Object>,MoveLine>(map);
    while (!copyMap.isEmpty()) {
      if (map.containsKey(keys)) {
        MoveLine moveLineIt=map.get(keys);
        int count=0;
        if (moveLineIt.getAnalyticDistributionLineList() == null || moveLine.getAnalyticDistributionLineList() == null) {
          return null;
        }
        List<AnalyticDistributionLine> list1=moveLineIt.getAnalyticDistributionLineList();
        List<AnalyticDistributionLine> list2=moveLine.getAnalyticDistributionLineList();
        List<AnalyticDistributionLine> copyList=new ArrayList<AnalyticDistributionLine>(list1);
        if (list1.size() == list2.size()) {
          for (          AnalyticDistributionLine analyticDistributionLine : list2) {
            for (            AnalyticDistributionLine analyticDistributionLineIt : copyList) {
              if (analyticDistributionLine.getAnalyticAxis().equals(analyticDistributionLineIt.getAnalyticAxis()) && analyticDistributionLine.getAnalyticAccount().equals(analyticDistributionLineIt.getAnalyticAccount()) && analyticDistributionLine.getPercentage().equals(analyticDistributionLineIt.getPercentage())&& analyticDistributionLine.getAnalyticJournal().equals(analyticDistributionLineIt.getAnalyticJournal())) {
                copyList.remove(analyticDistributionLineIt);
                count++;
                break;
              }
            }
          }
          if (count == list1.size()) {
            return moveLineIt;
          }
        }
      }
 else {
        return null;
      }
    }
  }
  return null;
}