Program: 186003
Project: 186003
Buggy source:
protected boolean containsSuggestion(IGroovySuggestion suggestion){
  boolean isContained=false;
  if (suggestion instanceof GroovyPropertySuggestion) {
    String name=suggestion.getName();
    for (    IGroovySuggestion existingSugg : suggestions) {
      if (existingSugg instanceof GroovyPropertySuggestion && existingSugg.getName().equals(name)) {
        isContained=true;
        break;
      }
    }
  }
 else   if (suggestion instanceof GroovyMethodSuggestion) {
    String name=suggestion.getName();
    for (    IGroovySuggestion existingSugg : suggestions) {
      if (existingSugg instanceof GroovyMethodSuggestion && existingSugg.getName().equals(name)) {
        List<MethodParameter> existingParameters=((GroovyMethodSuggestion)existingSugg).getParameters();
        List<MethodParameter> parameters=((GroovyMethodSuggestion)suggestion).getParameters();
        if (existingParameters != null) {
          if (existingParameters.equals(parameters)) {
            isContained=true;
            break;
          }
        }
 else         if (parameters != null) {
          if (parameters.equals(existingParameters)) {
            isContained=true;
            break;
          }
        }
 else {
          isContained=true;
          break;
        }
      }
    }
  }
  return isContained;
}

Fixed version (ground truth):
protected boolean containsSuggestion(IGroovySuggestion suggestion){
  boolean isContained=false;
  if (suggestion instanceof GroovyPropertySuggestion) {
    String name=suggestion.getName();
    for (    IGroovySuggestion existingSugg : suggestions) {
      if (existingSugg instanceof GroovyPropertySuggestion && existingSugg.getName().equals(name)) {
        isContained=true;
        break;
      }
    }
  }
 else   if (suggestion instanceof GroovyMethodSuggestion) {
    String name=suggestion.getName();
    GroovyMethodSuggestion methodSuggestion=(GroovyMethodSuggestion)suggestion;
    for (    IGroovySuggestion existingSugg : suggestions) {
      if (existingSugg instanceof GroovyMethodSuggestion && existingSugg.getName().equals(name)) {
        GroovyMethodSuggestion existingMethodSuggestion=(GroovyMethodSuggestion)existingSugg;
        List<MethodParameter> existingParameters=existingMethodSuggestion.getParameters();
        List<MethodParameter> parameters=methodSuggestion.getParameters();
        if (existingParameters != null) {
          if (parameters != null && parameters.size() == existingParameters.size()) {
            boolean same=true;
            for (int i=0; i < parameters.size(); i++) {
              String existingType=existingParameters.get(i).getType();
              String type=parameters.get(i).getType();
              if (type != null) {
                if (!type.equals(existingType)) {
                  same=false;
                  break;
                }
              }
 else               if (existingType != null) {
                same=false;
                break;
              }
            }
            if (same) {
              isContained=true;
              break;
            }
          }
        }
 else         if (parameters == null) {
          isContained=true;
          break;
        }
      }
    }
  }
  return isContained;
}