nus-yam/ex-repair huggingface dataset:
Program: 186020
Project: 186020
Buggy source:
protected void handleRemove(){
  List<Object> selections=getSelections();
  for (  Object obj : selections) {
    if (obj instanceof GroovySuggestionDeclaringType) {
      InferencingSuggestionsManager.getInstance().getSuggestions(getSelectedProject()).removeDeclaringType((GroovySuggestionDeclaringType)obj);
    }
 else     if (obj instanceof IGroovySuggestion) {
      IGroovySuggestion suggestion=(IGroovySuggestion)obj;
      GroovySuggestionDeclaringType containingType=suggestion.getDeclaringType();
      containingType.removeSuggestion(suggestion);
      if (containingType.getSuggestions().isEmpty()) {
        InferencingSuggestionsManager.getInstance().getSuggestions(getSelectedProject()).removeDeclaringType(containingType);
      }
    }
  }
  refresh();
}

Fixed version (ground truth):
protected void handleRemove(){
  List<Object> selections=getSelections();
  for (  Object obj : selections) {
    if (obj instanceof GroovySuggestionDeclaringType) {
      InferencingSuggestionsManager.getInstance().getSuggestions(getSelectedProject()).removeDeclaringType((GroovySuggestionDeclaringType)obj);
    }
 else     if (obj instanceof IGroovySuggestion) {
      IGroovySuggestion suggestion=(IGroovySuggestion)obj;
      GroovySuggestionDeclaringType declaringType=suggestion.getDeclaringType();
      declaringType.removeSuggestion(suggestion);
      if (declaringType.getSuggestions().isEmpty()) {
        InferencingSuggestionsManager.getInstance().getSuggestions(getSelectedProject()).removeDeclaringType(declaringType);
      }
    }
  }
  refresh();
}
Program: 186021
Project: 186021
Buggy source:
public void handleSelection(ControlSelectionEvent event){
  handleRequiredValue(event);
  notifyValidValueSet(event.getControlDescriptor(),event.getSelectionData());
}

Fixed version (ground truth):
public void handleSelection(ControlSelectionEvent event){
  handleValidatedValue(event);
  notifyValidValueSet(event.getControlDescriptor(),event.getSelectionData());
}
Program: 186023
Project: 186023
Buggy source:
protected void setSuggestion(IGroovySuggestion suggestion){
  this.currentSuggestion=suggestion;
  if (currentSuggestion != null) {
    editDeclaringType=false;
    isStatic=currentSuggestion.isStatic();
    suggestionName=currentSuggestion.getName();
    declaringTypeName=currentSuggestion.getDeclaringType().getName();
    javaDoc=currentSuggestion.getJavaDoc();
    suggestionType=currentSuggestion.getType();
    isActive=currentSuggestion.isActive();
    if (currentSuggestion instanceof GroovyMethodSuggestion) {
      GroovyMethodSuggestion method=(GroovyMethodSuggestion)currentSuggestion;
      initialParameters=method.getParameters();
      useNamedArguments=method.useNamedArguments();
      isMethod=true;
    }
  }
}

Fixed version (ground truth):
protected void setSuggestion(IGroovySuggestion suggestion){
  this.currentSuggestion=suggestion;
  if (currentSuggestion != null) {
    isStatic=currentSuggestion.isStatic();
    suggestionName=currentSuggestion.getName();
    declaringTypeName=currentSuggestion.getDeclaringType().getName();
    javaDoc=currentSuggestion.getJavaDoc();
    suggestionType=currentSuggestion.getType();
    isActive=currentSuggestion.isActive();
    if (currentSuggestion instanceof GroovyMethodSuggestion) {
      GroovyMethodSuggestion method=(GroovyMethodSuggestion)currentSuggestion;
      initialParameters=method.getParameters();
      useNamedArguments=method.useNamedArguments();
      isMethod=true;
    }
  }
}
Program: 186024
Project: 186024
Buggy source:
protected InferencingContributionDialogue(Shell parentShell,IProject project,IGroovySuggestion currentSuggestion,GroovySuggestionDeclaringType declaringType,boolean editDeclaringType,boolean isActive){
  super(parentShell,DIALOGUE_DESCRIPTOR);
  this.project=project;
  this.currentSuggestion=currentSuggestion;
  this.declaringTypeName=declaringType != null ? declaringType.getName() : null;
  this.editDeclaringType=editDeclaringType;
  this.isActive=isActive;
}

Fixed version (ground truth):
protected InferencingContributionDialogue(Shell parentShell,IProject project,IGroovySuggestion currentSuggestion,GroovySuggestionDeclaringType declaringType,boolean isActive){
  super(parentShell,DIALOGUE_DESCRIPTOR);
  this.project=project;
  this.currentSuggestion=currentSuggestion;
  this.declaringTypeName=declaringType != null ? declaringType.getName() : null;
  this.isActive=isActive;
}
Program: 186025
Project: 186025
Buggy source:
protected void editElement(){
  MethodParameter selected=getSelectedElement();
  if (selected != null) {
    MethodArgumentDialogue dialogue=new MethodArgumentDialogue(getShell(),project,selected,parameters);
    if (dialogue.open() == Window.OK) {
      MethodParameter editedParameter=dialogue.getMethodParameter();
      if (editedParameter != null) {
        int selectionIndex=viewer.getTable().getSelectionIndex();
        parameters.remove(selected);
        if (selectionIndex >= 0) {
          parameters.add(selectionIndex,editedParameter);
        }
 else {
          parameters.add(editedParameter);
        }
      }
      refreshTable();
    }
  }
}

Fixed version (ground truth):
protected void editElement(){
  MethodParameter selected=getSelectedElement();
  if (selected != null) {
    MethodParameterDialogue dialogue=new MethodParameterDialogue(getShell(),project,selected,parameters);
    if (dialogue.open() == Window.OK) {
      MethodParameter editedParameter=dialogue.getMethodParameter();
      if (editedParameter != null) {
        int selectionIndex=viewer.getTable().getSelectionIndex();
        parameters.remove(selected);
        if (selectionIndex >= 0) {
          parameters.add(selectionIndex,editedParameter);
        }
 else {
          parameters.add(editedParameter);
        }
      }
      refreshTable();
    }
  }
}
Program: 186026
Project: 186026
Buggy source:
protected void addElement(){
  MethodArgumentDialogue dialogue=new MethodArgumentDialogue(getShell(),project,null,parameters);
  if (dialogue.open() == Window.OK) {
    MethodParameter parameter=dialogue.getMethodParameter();
    if (parameter != null) {
      int selectionIndex=viewer.getTable().getSelectionIndex();
      if (selectionIndex >= 0) {
        parameters.add(selectionIndex,parameter);
      }
 else {
        parameters.add(parameter);
      }
    }
    refreshTable();
  }
}

Fixed version (ground truth):
protected void addElement(){
  MethodParameterDialogue dialogue=new MethodParameterDialogue(getShell(),project,null,parameters);
  if (dialogue.open() == Window.OK) {
    MethodParameter parameter=dialogue.getMethodParameter();
    if (parameter != null) {
      int selectionIndex=viewer.getTable().getSelectionIndex();
      if (selectionIndex >= 0) {
        parameters.add(selectionIndex,parameter);
      }
 else {
        parameters.add(parameter);
      }
    }
    refreshTable();
  }
}
Program: 186027
Project: 186027
Buggy source:
protected Type getASTType(String typeToCheck,StringBuffer sourceBuffer){
  sourceBuffer.append("String_Node_Str");
  int valueOffset=sourceBuffer.length();
  sourceBuffer.append(typeToCheck).append("String_Node_Str");
  sourceBuffer.append("String_Node_Str");
  ASTParser parser=ASTParser.newParser(AST.JLS3);
  parser.setSource(sourceBuffer.toString().toCharArray());
  Map<?,?> options=new HashMap<Object,Object>();
  JavaModelUtil.set50ComplianceOptions(options);
  parser.setCompilerOptions(options);
  CompilationUnit cu=(CompilationUnit)parser.createAST(null);
  ASTNode selected=NodeFinder.perform(cu,valueOffset,typeToCheck.length());
  if (selected instanceof Name) {
    selected=selected.getParent();
  }
  if (selected instanceof Type) {
    return (Type)selected;
  }
  return null;
}

Fixed version (ground truth):
protected Type getASTType(String typeToCheck,StringBuffer sourceBuffer){
  sourceBuffer.append("String_Node_Str");
  int valueOffset=sourceBuffer.length();
  sourceBuffer.append(typeToCheck).append("String_Node_Str");
  sourceBuffer.append("String_Node_Str");
  ASTParser parser=ASTParser.newParser(AST.JLS3);
  parser.setSource(sourceBuffer.toString().toCharArray());
  Map<String,String> options=new HashMap<String,String>();
  JavaModelUtil.set50ComplianceOptions(options);
  parser.setCompilerOptions(options);
  CompilationUnit cu=(CompilationUnit)parser.createAST(null);
  ASTNode selected=NodeFinder.perform(cu,valueOffset,typeToCheck.length());
  if (selected instanceof Name) {
    selected=selected.getParent();
  }
  if (selected instanceof Type) {
    return (Type)selected;
  }
  return null;
}
Program: 186028
Project: 186028
Buggy source:
public JavaValidParameterizedTypeRule(IJavaProject project){
  this.project=project;
}

Fixed version (ground truth):
public JavaValidParameterizedTypeRule(IJavaProject project){
  super(project);
}
Program: 186029
Project: 186029
Buggy source:
public ValueStatus checkValidity(Object value){
  if (!(value instanceof String)) {
    return ValueStatus.getErrorStatus(value);
  }
  String typeToCheck=(String)value;
  if (!typeToCheck.trim().equals(typeToCheck)) {
    return ValueStatus.getErrorStatus(typeToCheck,INVALID_JAVA);
  }
  StringBuffer source=new StringBuffer();
  Type astType=getASTType(typeToCheck,source);
  if (astType != null) {
    try {
      boolean isValid=isParameterisedTypeValid(astType,source);
      if (isValid) {
        return ValueStatus.getValidStatus(value);
      }
    }
 catch (    JavaModelException e) {
      Activator.logError(e);
      return ValueStatus.getErrorStatus(value,e.getLocalizedMessage());
    }
  }
  return ValueStatus.getErrorStatus(value,INVALID_JAVA);
}

Fixed version (ground truth):
public ValueStatus checkValidity(Object value){
  if (!(value instanceof String)) {
    return ValueStatus.getErrorStatus(value);
  }
  String typeToCheck=(String)value;
  StringBuffer source=new StringBuffer();
  Type astType=getASTType(typeToCheck,source);
  List<String> allNonExistantTypes=new ArrayList<String>();
  if (astType != null) {
    try {
      boolean isValid=allTypesExist(astType,source,allNonExistantTypes);
      if (!isValid) {
        String message=composeErrorMessage(allNonExistantTypes);
        return ValueStatus.getErrorStatus(value,message);
      }
 else {
        return ValueStatus.getValidStatus(value);
      }
    }
 catch (    JavaModelException e) {
      Activator.logError(e);
      return ValueStatus.getErrorStatus(value,e.getLocalizedMessage());
    }
  }
  return ValueStatus.getErrorStatus(value,INVALID_JAVA);
}
Program: 186031
Project: 186031
Buggy source:
/** 
 * Creates a new instance of the suggestion in the specified declaring type.
 * @param type
 * @param isActive whether the suggestion should be active in the declaringtype
 * @return
 */
public IGroovySuggestion createSuggestion(SuggestionDescriptor descriptor){
  IGroovySuggestion suggestion=new SuggestionFactory(descriptor).createSuggestion(this);
  suggestions.add(suggestion);
  return suggestion;
}

Fixed version (ground truth):
/** 
 * Creates a new instance of the suggestion in the specified declaring type. If a suggestion already exists that matches the descriptor, null is returned
 * @param type
 * @param isActive whether the suggestion should be active in the declaringtype
 * @return new created suggestion, or null if the suggestion already exists
 */
public IGroovySuggestion createSuggestion(SuggestionDescriptor descriptor){
  IGroovySuggestion suggestion=new SuggestionFactory(descriptor).createSuggestion(this);
  if (suggestions.contains(suggestion)) {
    return null;
  }
  suggestions.add(suggestion);
  return suggestion;
}
Program: 186032
Project: 186032
Buggy source:
/** 
 * Creates a declaring type or returns an existing one.
 * @param declaringTypeName
 * @return
 */
public IGroovySuggestion addSuggestion(SuggestionDescriptor descriptor){
  String declaringTypeName=descriptor.getDeclaringTypeName();
  GroovySuggestionDeclaringType declaringType=suggestions.get(declaringTypeName);
  if (declaringType == null) {
    declaringType=new GroovySuggestionDeclaringType(declaringTypeName);
    suggestions.put(declaringTypeName,declaringType);
  }
  return declaringType.createSuggestion(descriptor);
}

Fixed version (ground truth):
/** 
 * Creates a declaring type or returns an existing one.
 * @param declaringTypeName
 * @return
 */
public IGroovySuggestion addSuggestion(SuggestionDescriptor descriptor){
  String declaringTypeName=descriptor.getDeclaringTypeName();
  GroovySuggestionDeclaringType declaringType=suggestions.get(declaringTypeName);
  if (declaringType == null) {
    declaringType=new GroovySuggestionDeclaringType(declaringTypeName);
  }
  IGroovySuggestion createdSuggestion=declaringType.createSuggestion(descriptor);
  if (createdSuggestion != null && !suggestions.containsKey(declaringType.getName())) {
    suggestions.put(declaringTypeName,declaringType);
  }
  return createdSuggestion;
}
Program: 186033
Project: 186033
Buggy source:
protected void addSuggestion(){
  if (getSelections().size() > 1) {
    return;
  }
 else {
    InferencingContributionDialogue dialogue=null;
    if (getSelections().size() == 1) {
      Object selectedObj=getSelections().get(0);
      if (selectedObj instanceof GroovySuggestionDeclaringType) {
        dialogue=new InferencingContributionDialogue(getShell(),(GroovySuggestionDeclaringType)selectedObj,getSelectedProject());
      }
 else       if (selectedObj instanceof IGroovySuggestion) {
        dialogue=new InferencingContributionDialogue(getShell(),(IGroovySuggestion)selectedObj,getSelectedProject());
      }
    }
 else {
      dialogue=new InferencingContributionDialogue(getShell(),getSelectedProject());
    }
    if (dialogue != null && dialogue.open() == Window.OK) {
      SuggestionDescriptor descriptor=dialogue.getSuggestionChange();
      IProject project=getSelectedProject();
      if (project != null) {
        IGroovySuggestion suggestion=InferencingSuggestionsManager.getInstance().getSuggestions(project).addSuggestion(descriptor);
        if (suggestion != null) {
          refresh();
          setCheckState(suggestion);
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void addSuggestion(){
  if (getSelections().size() > 1) {
    return;
  }
 else {
    InferencingContributionDialogue dialogue=null;
    if (getSelections().size() == 1) {
      Object selectedObj=getSelections().get(0);
      if (selectedObj instanceof GroovySuggestionDeclaringType) {
        dialogue=new InferencingContributionDialogue(getShell(),(GroovySuggestionDeclaringType)selectedObj,getSelectedProject());
      }
 else       if (selectedObj instanceof IGroovySuggestion) {
        dialogue=new InferencingContributionDialogue(getShell(),((IGroovySuggestion)selectedObj).getDeclaringType(),getSelectedProject());
      }
    }
 else {
      dialogue=new InferencingContributionDialogue(getShell(),getSelectedProject());
    }
    if (dialogue != null && dialogue.open() == Window.OK) {
      SuggestionDescriptor descriptor=dialogue.getSuggestionChange();
      IProject project=getSelectedProject();
      if (project != null) {
        IGroovySuggestion suggestion=InferencingSuggestionsManager.getInstance().getSuggestions(project).addSuggestion(descriptor);
        if (suggestion != null) {
          refresh();
          setCheckState(suggestion);
        }
      }
    }
  }
}
Program: 186034
Project: 186034
Buggy source:
protected void createCommandArea(Composite parent){
  JavaTextControl nameControl=new JavaTextControl(ControlTypes.NAME,getOffsetLabelLocation(),name){
    protected ValueStatus isControlValueValid(    Control control){
      ValueStatus status=super.isControlValueValid(control);
      if (!status.isError()) {
        status=new DuplicateParameterRule(existingParameters).checkValidity(status.getValue());
      }
      return status;
    }
  }
;
  nameControl.createControlArea(parent);
  nameControl.addSelectionListener(new ValidatedValueSelectionListener(ControlTypes.NAME,name){
    protected void handleValidatedValue(    ControlSelectionEvent event){
      Object selection=event.getSelectionData();
      if (selection instanceof String) {
        name=(String)selection;
      }
    }
  }
);
  JavaTypeBrowsingControl declaringTypeControl=new JavaTypeBrowsingControl(ControlTypes.TYPE,getOffsetLabelLocation(),type,javaProject){
    protected ValueStatus isControlValueValid(    String value){
      if (value == null || value.length() == 0) {
        return ValueStatus.getValidStatus(value);
      }
      return super.isControlValueValid(value);
    }
  }
;
  declaringTypeControl.createControlArea(parent);
  declaringTypeControl.addSelectionListener(new ValidatedValueSelectionListener(ControlTypes.TYPE,type){
    protected void handleValidatedValue(    ControlSelectionEvent event){
      Object selection=event.getSelectionData();
      if (selection instanceof String) {
        type=(String)selection;
      }
    }
  }
);
}

Fixed version (ground truth):
protected void createCommandArea(Composite parent){
  JavaTextControl nameControl=new JavaTextControl(ControlTypes.NAME,getOffsetLabelLocation(),name){
    protected ValueStatus isControlValueValid(    Control control){
      ValueStatus status=super.isControlValueValid(control);
      if (!status.isError()) {
        status=new DuplicateParameterRule(existingParameters).checkValidity(status.getValue());
      }
      return status;
    }
  }
;
  nameControl.createControlArea(parent);
  nameControl.addSelectionListener(new ValidatedValueSelectionListener(ControlTypes.NAME,name){
    protected void handleValidatedValue(    ControlSelectionEvent event){
      Object selection=event.getSelectionData();
      if (selection instanceof String) {
        name=(String)selection;
      }
    }
  }
);
  JavaTypeBrowsingControl declaringTypeControl=new JavaTypeBrowsingControl(ControlTypes.TYPE,getOffsetLabelLocation(),type,javaProject){
    protected ValueStatus isControlValueValid(    String value){
      if (value == null || value.length() == 0) {
        return ValueStatus.getValidStatus(value);
      }
      return super.isControlValueValid(value);
    }
  }
;
  declaringTypeControl.createControlArea(parent);
  declaringTypeControl.addSelectionListener(new ValidatedValueSelectionListener(){
    protected void handleValidatedValue(    ControlSelectionEvent event){
      Object selection=event.getSelectionData();
      if (selection instanceof String) {
        type=(String)selection;
      }
    }
  }
);
}
Program: 186035
Project: 186035
Buggy source:
protected GroovyPropertySuggestion(GroovySuggestionDeclaringType declaringType,String name,String type,boolean isStatic,String javaDoc,boolean isActive){
  this.name=name;
  this.type=type;
  this.isStatic=isStatic;
  this.javaDoc=javaDoc;
  this.declaringType=declaringType;
  this.isActive=isActive;
}

Fixed version (ground truth):
public GroovyPropertySuggestion(GroovySuggestionDeclaringType declaringType,String name,String type,boolean isStatic,String javaDoc,boolean isActive){
  super(declaringType,name,type,isStatic,javaDoc,isActive);
}
Program: 186036
Project: 186036
Buggy source:
@Override protected String constructName(){
  if (property == null) {
    return null;
  }
  StringBuffer buffer=new StringBuffer();
  String name=property.getName();
  buffer.append(name);
  buffer.append(EMPTY_SPACE);
  buffer.append(COLON);
  buffer.append(EMPTY_SPACE);
  String type=property.getType();
  buffer.append(type);
  return buffer.toString();
}

Fixed version (ground truth):
protected String constructName(){
  if (property == null) {
    return null;
  }
  StringBuffer buffer=new StringBuffer();
  String name=property.getName();
  buffer.append(name);
  buffer.append(EMPTY_SPACE);
  buffer.append(COLON);
  buffer.append(EMPTY_SPACE);
  String type=property.getType();
  buffer.append(type);
  return buffer.toString();
}
Program: 186037
Project: 186037
Buggy source:
public Set<IGroovySuggestion> getSuggestions(){
  return new HashSet<IGroovySuggestion>(suggestions);
}

Fixed version (ground truth):
public Set<IGroovySuggestion> getSuggestions(){
  return suggestions;
}
Program: 186038
Project: 186038
Buggy source:
public void removeDeclaringType(GroovySuggestionDeclaringType declaringType){
  suggestions.remove(declaringType);
}

Fixed version (ground truth):
public void removeDeclaringType(GroovySuggestionDeclaringType declaringType){
  suggestions.remove(declaringType.getName());
}
Program: 186039
Project: 186039
Buggy source:
/** 
 * @return
 */
public List<GroovySuggestionDeclaringType> getDeclaringTypes(){
  return new ArrayList<GroovySuggestionDeclaringType>(suggestions.values());
}

Fixed version (ground truth):
/** 
 * @return
 */
public Collection<GroovySuggestionDeclaringType> getDeclaringTypes(){
  return suggestions.values();
}
Program: 186040
Project: 186040
Buggy source:
/** 
 * Creates a descriptor with the values of the given suggestion, but with the specified state.
 */
public SuggestionDescriptor(IGroovySuggestion suggestion,boolean isActive){
  this.isStatic=suggestion.isStatic();
  this.name=suggestion.getName();
  this.javaDoc=suggestion.getJavaDoc();
  this.suggestionType=suggestion.getType();
  if (suggestion instanceof GroovyMethodSuggestion) {
    GroovyMethodSuggestion methodSuggestion=(GroovyMethodSuggestion)suggestion;
    this.useArgumentNames=methodSuggestion.useNamedArguments();
    this.parameters=methodSuggestion.getMethodArguments();
    this.isMethod=true;
  }
}

Fixed version (ground truth):
/** 
 * Creates a descriptor with the values of the given suggestion, but with the specified state.
 */
public SuggestionDescriptor(IGroovySuggestion suggestion,boolean isActive){
  this.isStatic=suggestion.isStatic();
  this.isActive=isActive;
  this.name=suggestion.getName();
  this.javaDoc=suggestion.getJavaDoc();
  this.suggestionType=suggestion.getType();
  this.declaringTypeName=suggestion.getDeclaringType().getName();
  if (suggestion instanceof GroovyMethodSuggestion) {
    GroovyMethodSuggestion methodSuggestion=(GroovyMethodSuggestion)suggestion;
    this.useArgumentNames=methodSuggestion.useNamedArguments();
    this.parameters=methodSuggestion.getMethodArguments();
    this.isMethod=true;
  }
}
Program: 186041
Project: 186041
Buggy source:
@Override public GroovySuggestionDeclaringType getDeclaringType(){
  return declaringType;
}

Fixed version (ground truth):
public GroovySuggestionDeclaringType getDeclaringType(){
  return declaringType;
}
Program: 186042
Project: 186042
Buggy source:
protected void createTableViewer(Composite parent){
  viewer=new SuggestionsViewer(getColumns(),ColumnTypes.SUGGESTIONS);
  viewer.createControls(parent);
  final CheckboxTreeViewer treeViewer=viewer.getTreeViewer();
  treeViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      Object obj=event.getElement();
      boolean checkState=event.getChecked();
      handleCheckStateChange(obj,checkState);
    }
  }
);
  treeViewer.addTreeListener(new ITreeViewerListener(){
    @Override public void treeExpanded(    TreeExpansionEvent event){
      setCheckState(event.getElement());
    }
    @Override public void treeCollapsed(    TreeExpansionEvent event){
    }
  }
);
  treeViewer.setLabelProvider(new ViewerLabelProvider());
  treeViewer.setContentProvider(new ViewerContentProvider());
  treeViewer.setComparator(new SuggestionViewerSorter());
  setViewerListeners(treeViewer);
  refreshViewerInput(getSelectedProject());
  expandAll();
}

Fixed version (ground truth):
protected void createTableViewer(Composite parent){
  viewer=new SuggestionsViewer(getColumns(),ColumnTypes.SUGGESTIONS);
  viewer.createControls(parent);
  final CheckboxTreeViewer treeViewer=viewer.getTreeViewer();
  treeViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      Object obj=event.getElement();
      boolean checkState=event.getChecked();
      handleCheckStateChange(obj,checkState);
    }
  }
);
  treeViewer.addTreeListener(new ITreeViewerListener(){
    public void treeExpanded(    TreeExpansionEvent event){
      setCheckState(event.getElement());
    }
    public void treeCollapsed(    TreeExpansionEvent event){
    }
  }
);
  treeViewer.setLabelProvider(new ViewerLabelProvider());
  treeViewer.setContentProvider(new ViewerContentProvider());
  treeViewer.setComparator(new SuggestionViewerSorter());
  setViewerListeners(treeViewer);
  refreshViewerInput(getSelectedProject());
  expandAll();
}
Program: 186043
Project: 186043
Buggy source:
@Override public void treeExpanded(TreeExpansionEvent event){
  setCheckState(event.getElement());
}

Fixed version (ground truth):
public void treeExpanded(TreeExpansionEvent event){
  setCheckState(event.getElement());
}
Program: 186044
Project: 186044
Buggy source:
@Override public void treeCollapsed(TreeExpansionEvent event){
}

Fixed version (ground truth):
public void treeCollapsed(TreeExpansionEvent event){
}
Program: 186045
Project: 186045
Buggy source:
private ICompletionProposal[][] guessParameters(char[][] parameterNames) throws JavaModelException {
  int count=parameterNames.length;
  fPositions=new Position[count];
  fChoices=new ICompletionProposal[count][];
  String[] parameterTypes=getParameterTypes();
  ParameterGuesser guesser=new ParameterGuesser(getEnclosingElement());
  IJavaElement[][] assignableElements=getAssignableElements();
  for (int i=count - 1; i >= 0; i--) {
    String paramName=new String(parameterNames[i]);
    Position position=new Position(0,0);
    ICompletionProposal[] argumentProposals=guesser.parameterProposals(parameterTypes[i],paramName,position,assignableElements[i],fFillBestGuess);
    if (argumentProposals.length == 0)     argumentProposals=new ICompletionProposal[]{new JavaCompletionProposal(paramName,0,paramName.length(),null,paramName,0)};
    fPositions[i]=position;
    fChoices[i]=argumentProposals;
  }
  return fChoices;
}

Fixed version (ground truth):
private ICompletionProposal[][] guessParameters(char[][] parameterNames) throws JavaModelException {
  int count=parameterNames.length;
  fPositions=new Position[count];
  fChoices=new ICompletionProposal[count][];
  String[] parameterTypes=getParameterTypes();
  ParameterGuesser guesser=new ParameterGuesser(getEnclosingElement());
  IJavaElement[][] assignableElements=getAssignableElements();
  for (int i=count - 1; i >= 0; i--) {
    String paramName=new String(parameterNames[i]);
    Position position=new Position(0,0);
    ICompletionProposal[] argumentProposals=parameterProposals(guesser,parameterTypes[i],paramName,position,assignableElements[i]);
    if (argumentProposals.length == 0)     argumentProposals=new ICompletionProposal[]{new JavaCompletionProposal(paramName,0,paramName.length(),null,paramName,0)};
    fPositions[i]=position;
    fChoices[i]=argumentProposals;
  }
  return fChoices;
}
Program: 186046
Project: 186046
Buggy source:
/** 
 * Creates an expanded search scope for the given search pattern if required
 * @param scope the initial scope
 * @param pattern the target pattern
 * @param requestor TODO
 * @return an expanded scope if required, or the initial scope if there is no change
 */
IJavaSearchScope expandSearchScope(IJavaSearchScope scope,SearchPattern pattern,SearchRequestor requestor);

Fixed version (ground truth):
/** 
 * Creates an expanded search scope for the given search pattern if required
 * @param scope the initial scope
 * @param pattern the target pattern
 * @param requestor the {@link SearchRequestor} for the given search
 * @return an expanded scope if required, or the initial scope if there is no change
 */
IJavaSearchScope expandSearchScope(IJavaSearchScope scope,SearchPattern pattern,SearchRequestor requestor);
Program: 186048
Project: 186048
Buggy source:
/** 
 * Parse the output from the compiler into a list of CompilerError objects
 * @param exitCode The exit code of javac.
 * @param input The output of the compiler
 * @return List of CompilerError objects
 * @throws IOException
 */
static List parseModernStream(int exitCode,BufferedReader input) throws IOException {
  List errors=new ArrayList();
  String line;
  StringBuffer buffer;
  while (true) {
    buffer=new StringBuffer();
    do {
      line=input.readLine();
      if (line == null) {
        return errors;
      }
      if ((buffer.length() == 0) && line.startsWith("String_Node_Str")) {
        errors.add(new CompilerError(line,true));
      }
 else       if ((buffer.length() == 0) && isNote(line)) {
      }
 else {
        buffer.append(line);
        buffer.append(EOL);
      }
    }
 while (!line.endsWith("String_Node_Str"));
    errors.add(parseModernError(exitCode,buffer.toString()));
  }
}

Fixed version (ground truth):
/** 
 * Parse the output from the compiler into a list of CompilerError objects
 * @param exitCode The exit code of javac.
 * @param input The output of the compiler
 * @return List of CompilerError objects
 * @throws IOException
 */
List<CompilerError> parseModernStream(int exitCode,BufferedReader input) throws IOException {
  List<CompilerError> errors=new ArrayList<CompilerError>();
  String line;
  StringBuffer buffer;
  while (true) {
    buffer=new StringBuffer();
    do {
      line=input.readLine();
      if (line == null) {
        return errors;
      }
      if ((buffer.length() == 0) && line.startsWith("String_Node_Str")) {
        errors.add(new CompilerError(line,true));
      }
 else       if ((buffer.length() == 0) && isNote(line)) {
      }
 else {
        buffer.append(line);
        buffer.append(EOL);
      }
    }
 while (!line.endsWith("String_Node_Str"));
    errors.add(parseModernError(exitCode,buffer.toString()));
  }
}
Program: 186049
Project: 186049
Buggy source:
public List compile(CompilerConfiguration config) throws CompilerException {
  String[] args=createCommandLine(config);
  if (args.length == 0) {
    getLogger().info("String_Node_Str");
    return Collections.emptyList();
  }
  List<CompilerError> messages;
  if (config.isFork()) {
    String executable=config.getExecutable();
    if (StringUtils.isEmpty(executable)) {
      try {
        executable=getJavacExecutable();
      }
 catch (      IOException e) {
        getLogger().warn("String_Node_Str");
        executable="String_Node_Str";
      }
    }
    String groovyEclipseLocation=getGroovyEclipseBatchLocation();
    messages=compileOutOfProcess(config,executable,groovyEclipseLocation,args);
  }
 else {
    Progress progress=new Progress();
    Main main=new Main(new PrintWriter(System.out),new PrintWriter(System.err),false,null,progress);
    boolean result=main.compile(args);
    messages=formatResult(main,result);
  }
  return messages;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public List compile(CompilerConfiguration config) throws CompilerException {
  String[] args=createCommandLine(config);
  if (args.length == 0) {
    getLogger().info("String_Node_Str");
    return Collections.emptyList();
  }
  List<CompilerError> messages;
  if (config.isFork()) {
    String executable=config.getExecutable();
    if (StringUtils.isEmpty(executable)) {
      try {
        executable=getJavaExecutable();
      }
 catch (      IOException e) {
        getLogger().warn("String_Node_Str");
        executable="String_Node_Str";
      }
    }
    String groovyEclipseLocation=getGroovyEclipseBatchLocation();
    messages=compileOutOfProcess(config,executable,groovyEclipseLocation,args);
  }
 else {
    Progress progress=new Progress();
    Main main=new Main(new PrintWriter(System.out),new PrintWriter(System.err),false,null,progress);
    boolean result=main.compile(args);
    messages=formatResult(main,result);
  }
  return messages;
}
Program: 186050
Project: 186050
Buggy source:
private static String getGroovyEclipseBatchLocation() throws CompilerException {
  Class<Main> cls=Main.class;
  ProtectionDomain pDomain=cls.getProtectionDomain();
  CodeSource cSource=pDomain.getCodeSource();
  if (cSource != null) {
    URL loc=cSource.getLocation();
    File file=new File(loc.getPath());
    return file.getPath();
  }
 else {
    throw new CompilerException("String_Node_Str");
  }
}

Fixed version (ground truth):
private String getGroovyEclipseBatchLocation() throws CompilerException {
  Class<Main> cls=Main.class;
  ProtectionDomain pDomain=cls.getProtectionDomain();
  CodeSource cSource=pDomain.getCodeSource();
  if (cSource != null) {
    URL loc=cSource.getLocation();
    File file;
    try {
      file=new File(URLDecoder.decode(loc.getPath(),"String_Node_Str"));
    }
 catch (    UnsupportedEncodingException e) {
      getLogger().warn("String_Node_Str" + loc,e);
      file=new File(loc.getPath());
    }
    return file.getPath();
  }
 else {
    throw new CompilerException("String_Node_Str");
  }
}
Program: 186051
Project: 186051
Buggy source:
public FindAllReferencesRequestor(AnnotatedNode declaration){
  this.declaration=declaration;
  this.references=new ArrayList<ASTNode>(10);
}

Fixed version (ground truth):
public FindAllReferencesRequestor(AnnotatedNode declaration){
  this.declaration=declaration;
  this.references=new TreeSet<ASTNode>(new Comparator<ASTNode>(){
    public int compare(    ASTNode o1,    ASTNode o2){
      return o1.getStart() - o2.getStart();
    }
  }
);
}
Program: 186052
Project: 186052
Buggy source:
public VisitStatus acceptASTNode(ASTNode node,TypeLookupResult result,IJavaElement enclosingElement){
  if (node.getLength() == 0) {
    return VisitStatus.CONTINUE;
  }
  if (node instanceof AnnotatedNode) {
    ASTNode maybeDeclaration=result.declaration;
    if (maybeDeclaration == null) {
      return VisitStatus.CONTINUE;
    }
    if (maybeDeclaration instanceof ClassNode) {
      if (!(node instanceof ClassExpression || node instanceof ClassNode)) {
        return VisitStatus.CONTINUE;
      }
      maybeDeclaration=((ClassNode)maybeDeclaration).redirect();
    }
    if (isEquivalent(maybeDeclaration)) {
      references.add(node);
    }
  }
  return VisitStatus.CONTINUE;
}

Fixed version (ground truth):
public VisitStatus acceptASTNode(ASTNode node,TypeLookupResult result,IJavaElement enclosingElement){
  if (node.getLength() == 0) {
    return VisitStatus.CONTINUE;
  }
  if (node instanceof AnnotatedNode) {
    ASTNode maybeDeclaration=result.declaration;
    if (maybeDeclaration == null) {
      return VisitStatus.CONTINUE;
    }
    if (maybeDeclaration instanceof ClassNode) {
      if (!(node instanceof ClassExpression || node instanceof ClassNode)) {
        return VisitStatus.CONTINUE;
      }
      maybeDeclaration=((ClassNode)maybeDeclaration).redirect();
    }
    if (maybeDeclaration instanceof PropertyNode && ((PropertyNode)maybeDeclaration).getField() != null) {
      maybeDeclaration=((PropertyNode)maybeDeclaration).getField();
    }
    if (isEquivalent(maybeDeclaration)) {
      references.add(node);
    }
  }
  return VisitStatus.CONTINUE;
}
Program: 186053
Project: 186053
Buggy source:
private ICompletionProposal createProposal(String fieldName,ContentAssistContext context,IType enclosingType){
  int relevance=Relevance.VERY_HIGH.getRelavance();
  return new NewGroovyFieldCompletionProposal(fieldName,context.completionLocation,context.completionExpression.length(),relevance);
}

Fixed version (ground truth):
private ICompletionProposal createProposal(String fieldName,ContentAssistContext context,IType enclosingType){
  int relevance=Relevance.VERY_HIGH.getRelavance();
  return new NewGroovyFieldCompletionProposal(fieldName,context.completionLocation - context.completionExpression.length(),context.completionExpression.length(),relevance);
}
Program: 186054
Project: 186054
Buggy source:
protected Image getImageFor(ASTNode node){
  if (node instanceof FieldNode) {
    int mods=((FieldNode)node).getModifiers();
    if (test(mods,Opcodes.ACC_PUBLIC)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC);
    }
 else     if (test(mods,Opcodes.ACC_PROTECTED)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PROTECTED);
    }
 else     if (test(mods,Opcodes.ACC_PRIVATE)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PRIVATE);
    }
    return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_DEFAULT);
  }
 else   if (node instanceof PropertyNode) {
    int mods=((PropertyNode)node).getModifiers();
    if (test(mods,Opcodes.ACC_PUBLIC)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC);
    }
 else     if (test(mods,Opcodes.ACC_PROTECTED)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PROTECTED);
    }
 else     if (test(mods,Opcodes.ACC_PRIVATE)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PRIVATE);
    }
    return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_DEFAULT);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Use   {@link ProposalUtils#getImage(CompletionProposal)} instead
 * @param node
 * @return
 */
@Deprecated protected Image getImageFor(ASTNode node){
  if (node instanceof FieldNode) {
    int mods=((FieldNode)node).getModifiers();
    if (test(mods,Opcodes.ACC_PUBLIC)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC);
    }
 else     if (test(mods,Opcodes.ACC_PROTECTED)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PROTECTED);
    }
 else     if (test(mods,Opcodes.ACC_PRIVATE)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PRIVATE);
    }
    return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_DEFAULT);
  }
 else   if (node instanceof PropertyNode) {
    int mods=((PropertyNode)node).getModifiers();
    if (test(mods,Opcodes.ACC_PUBLIC)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC);
    }
 else     if (test(mods,Opcodes.ACC_PROTECTED)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PROTECTED);
    }
 else     if (test(mods,Opcodes.ACC_PRIVATE)) {
      return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PRIVATE);
    }
    return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_DEFAULT);
  }
  return null;
}
Program: 186055
Project: 186055
Buggy source:
public IJavaCompletionProposal createJavaProposal(ContentAssistContext context,JavaContentAssistInvocationContext javaContext){
  return new GroovyJavaFieldCompletionProposal(createProposal(context),getImageFor(field),createDisplayString(field));
}

Fixed version (ground truth):
public IJavaCompletionProposal createJavaProposal(ContentAssistContext context,JavaContentAssistInvocationContext javaContext){
  CompletionProposal proposal=createProposal(context);
  return new GroovyJavaFieldCompletionProposal(proposal,ProposalUtils.getImage(proposal),createDisplayString(field));
}
Program: 186056
Project: 186056
Buggy source:
public IJavaCompletionProposal createJavaProposal(ContentAssistContext context,JavaContentAssistInvocationContext javaContext){
  return new GroovyJavaFieldCompletionProposal(createProposal(context),getImageFor(property),createDisplayString(property));
}

Fixed version (ground truth):
public IJavaCompletionProposal createJavaProposal(ContentAssistContext context,JavaContentAssistInvocationContext javaContext){
  CompletionProposal proposal=createProposal(context);
  return new GroovyJavaFieldCompletionProposal(proposal,ProposalUtils.getImage(proposal),createDisplayString(property));
}
Program: 186058
Project: 186058
Buggy source:
public VisitStatus acceptASTNode(ASTNode node,TypeLookupResult result,IJavaElement enclosingElement){
  if (node instanceof ClassNode) {
    ClassNode orig=(ClassNode)node;
    ClassNode redirect=orig.redirect();
    if (orig == redirect) {
      if (orig.getNameWithoutPackage().equalsIgnoreCase(simpleName)) {
        boolean matchFound;
switch (typeSuffix) {
case CLASS_SUFFIX:
          matchFound=isClass(orig);
        break;
case CLASS_AND_INTERFACE_SUFFIX:
      matchFound=orig.isInterface() || isClass(orig);
    break;
case CLASS_AND_ENUM_SUFFIX:
  matchFound=orig.isInterface() || orig.isEnum();
break;
case INTERFACE_SUFFIX:
matchFound=orig.isInterface();
break;
case INTERFACE_AND_ANNOTATION_SUFFIX:
matchFound=orig.isInterface() || orig.isAnnotationDefinition();
break;
case ENUM_SUFFIX:
matchFound=orig.isEnum();
break;
case ANNOTATION_TYPE_SUFFIX:
matchFound=orig.isAnnotationDefinition();
break;
default :
matchFound=true;
break;
}
if (matchFound) {
try {
requestor.acceptSearchMatch(new SearchMatch(enclosingElement,SearchMatch.A_ACCURATE,orig.getNameStart(),orig.getNameEnd() - orig.getNameStart(),participant,enclosingElement.getResource()));
}
 catch (CoreException e) {
Util.log(e,"String_Node_Str");
}
}
}
}
}
return VisitStatus.CONTINUE;
}

Fixed version (ground truth):
public VisitStatus acceptASTNode(ASTNode node,TypeLookupResult result,IJavaElement enclosingElement){
  if (node instanceof ClassNode) {
    ClassNode orig=(ClassNode)node;
    ClassNode redirect=orig.redirect();
    if (orig == redirect) {
      if (orig.getNameWithoutPackage().equalsIgnoreCase(simpleName)) {
        boolean matchFound;
switch (typeSuffix) {
case CLASS_SUFFIX:
          matchFound=isClass(orig);
        break;
case CLASS_AND_INTERFACE_SUFFIX:
      matchFound=orig.isInterface() || isClass(orig);
    break;
case CLASS_AND_ENUM_SUFFIX:
  matchFound=orig.isInterface() || orig.isEnum();
break;
case INTERFACE_SUFFIX:
matchFound=orig.isInterface();
break;
case INTERFACE_AND_ANNOTATION_SUFFIX:
matchFound=orig.isInterface() || orig.isAnnotationDefinition();
break;
case ENUM_SUFFIX:
matchFound=orig.isEnum();
break;
case ANNOTATION_TYPE_SUFFIX:
matchFound=orig.isAnnotationDefinition();
break;
default :
matchFound=true;
break;
}
if (matchFound) {
try {
requestor.acceptSearchMatch(new SearchMatch(enclosingElement,SearchMatch.A_ACCURATE,orig.getNameStart(),orig.getNameEnd() - orig.getNameStart() + 1,participant,enclosingElement.getResource()));
}
 catch (CoreException e) {
Util.log(e,"String_Node_Str");
}
}
}
}
}
return VisitStatus.CONTINUE;
}
Program: 186059
Project: 186059
Buggy source:
private FieldNode findFieldNode(IField field){
  ClassNode clazz=findClassWithName(createName(field.getDeclaringType()));
  return clazz.getField(field.getElementName());
}

Fixed version (ground truth):
private FieldNode findFieldNode(IField field){
  ClassNode clazz=findClassWithName(createName(field.getDeclaringType()));
  FieldNode fieldNode=clazz.getField(field.getElementName());
  if (fieldNode == null) {
    fieldNode=clazz.getField("String_Node_Str" + field.getElementName());
  }
  return fieldNode;
}
Program: 186060
Project: 186060
Buggy source:
public void visitJDT(IMethod method,ITypeRequestor requestor){
  IJavaElement oldEnclosing=enclosingElement;
  ASTNode oldEnclosingNode=enclosingDeclarationNode;
  enclosingElement=method;
  MethodNode methodNode=findMethodNode(method);
  enclosingDeclarationNode=methodNode;
  this.requestor=requestor;
  scopes.push(new VariableScope(scopes.peek(),methodNode));
  try {
    visitConstructorOrMethod(methodNode,method.isConstructor());
  }
 catch (  VisitCompleted vc) {
    if (rethrowVisitComplete) {
      throw vc;
    }
  }
catch (  JavaModelException e) {
    Util.log(e,"String_Node_Str" + method.getElementName() + "String_Node_Str"+ method.getParent().getElementName());
  }
 finally {
    enclosingElement=oldEnclosing;
    enclosingDeclarationNode=oldEnclosingNode;
    scopes.pop();
  }
}

Fixed version (ground truth):
public void visitJDT(IMethod method,ITypeRequestor requestor){
  IJavaElement oldEnclosing=enclosingElement;
  ASTNode oldEnclosingNode=enclosingDeclarationNode;
  enclosingElement=method;
  MethodNode methodNode=findMethodNode(method);
  if (methodNode == null) {
    return;
  }
  enclosingDeclarationNode=methodNode;
  this.requestor=requestor;
  scopes.push(new VariableScope(scopes.peek(),methodNode));
  try {
    visitConstructorOrMethod(methodNode,method.isConstructor());
  }
 catch (  VisitCompleted vc) {
    if (rethrowVisitComplete) {
      throw vc;
    }
  }
catch (  JavaModelException e) {
    Util.log(e,"String_Node_Str" + method.getElementName() + "String_Node_Str"+ method.getParent().getElementName());
  }
 finally {
    enclosingElement=oldEnclosing;
    enclosingDeclarationNode=oldEnclosingNode;
    scopes.pop();
  }
}
Program: 186063
Project: 186063
Buggy source:
public RenameDispatcherMock(IGroovyDocumentProvider docProvider,UserSelection selection,IGroovyFileProvider fileProvider){
  super(docProvider,selection);
  this.fileProvider=fileProvider;
}

Fixed version (ground truth):
public RenameDispatcherMock(IGroovyDocumentProvider docProvider,UserSelection selection,IGroovyFileProvider fileProvider){
  super(docProvider,selection);
}
Program: 186064
Project: 186064
Buggy source:
/** 
 * FIXADE RC1 I am concerned that this takes a long time since we are doing a lookup for each method any way to cache? FIXADE RC1 cannot find parameters with type parameters.
 * @throws JavaModelException 
 */
protected char[][] getParameterNames(ICompilationUnit unit,MethodNode method){
  try {
    IType type=unit.getJavaProject().findType(method.getDeclaringClass().getName(),new NullProgressMonitor());
    if (type != null && type.exists()) {
      Parameter[] params=method.getParameters();
      String[] parameterTypeSignatures=new String[params == null ? 0 : params.length];
      boolean doResolved=type.isBinary();
      for (int i=0; i < parameterTypeSignatures.length; i++) {
        if (doResolved) {
          parameterTypeSignatures[i]=ProposalUtils.createTypeSignatureStr(params[i].getType());
        }
 else {
          parameterTypeSignatures[i]=ProposalUtils.createUnresolvedTypeSignatureStr(params[i].getType());
        }
      }
      IMethod jdtMethod=type.getMethod(method.getName(),parameterTypeSignatures);
      if (jdtMethod != null && jdtMethod.exists()) {
        String[] paramNames=jdtMethod.getParameterNames();
        char[][] paramNamesChar=new char[paramNames.length][];
        for (int i=0; i < paramNames.length; i++) {
          paramNamesChar[i]=paramNames[i].toCharArray();
        }
        return paramNamesChar;
      }
    }
  }
 catch (  JavaModelException e) {
    GroovyCore.logException("String_Node_Str" + method.getName(),e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * FIXADE RC1 I am concerned that this takes a long time since we are doing a lookup for each method any way to cache? FIXADE RC1 cannot find parameters names with type parameters.
 * @throws JavaModelException 
 */
protected char[][] getParameterNames(ICompilationUnit unit,MethodNode method){
  try {
    IType type=unit.getJavaProject().findType(method.getDeclaringClass().getName(),new NullProgressMonitor());
    if (type != null && type.exists()) {
      Parameter[] params=method.getParameters();
      String[] parameterTypeSignatures=new String[params == null ? 0 : params.length];
      boolean doResolved=type.isBinary();
      for (int i=0; i < parameterTypeSignatures.length; i++) {
        if (doResolved) {
          parameterTypeSignatures[i]=ProposalUtils.createTypeSignatureStr(params[i].getType());
        }
 else {
          parameterTypeSignatures[i]=ProposalUtils.createUnresolvedTypeSignatureStr(params[i].getType());
        }
      }
      IMethod jdtMethod=type.getMethod(method.getName(),parameterTypeSignatures);
      if (jdtMethod != null && jdtMethod.exists()) {
        String[] paramNames=jdtMethod.getParameterNames();
        char[][] paramNamesChar=new char[paramNames.length][];
        for (int i=0; i < paramNames.length; i++) {
          paramNamesChar[i]=paramNames[i].toCharArray();
        }
        return paramNamesChar;
      }
    }
  }
 catch (  JavaModelException e) {
    GroovyCore.logException("String_Node_Str" + method.getName(),e);
  }
  return null;
}