nus-yam/ex-repair huggingface dataset:
Program: 17811
Project: 17811
Buggy source:
public void windowOpened(final WindowEvent arg0){
  setSize(640,480);
  final Container content=getContentPane();
  content.setLayout(new BorderLayout());
  this.toolbar=new JToolBar();
  this.toolbar.setFloatable(false);
  this.toolbar.add(this.buttonRandomize=new JButton("String_Node_Str"));
  this.toolbar.add(this.buttonQuery=new JButton("String_Node_Str"));
  this.toolbar.add(this.buttonTrain=new JButton("String_Node_Str"));
  this.toolbar.add(this.buttonValidate=new JButton("String_Node_Str"));
  this.buttonRandomize.addActionListener(this);
  this.buttonQuery.addActionListener(this);
  this.buttonTrain.addActionListener(this);
  content.add(this.toolbar,BorderLayout.PAGE_START);
  this.scroll=new JScrollPane(networkDiagram=new NetworkDiagram(this));
  content.add(this.scroll,BorderLayout.CENTER);
  content.add(this.networkToolbar,BorderLayout.WEST);
  setTitle("String_Node_Str");
}

Fixed version (ground truth):
public void windowOpened(final WindowEvent arg0){
  setSize(640,480);
  final Container content=getContentPane();
  content.setLayout(new BorderLayout());
  this.toolbar=new JToolBar();
  this.toolbar.setFloatable(false);
  this.toolbar.add(this.buttonRandomize=new JButton("String_Node_Str"));
  this.toolbar.add(this.buttonQuery=new JButton("String_Node_Str"));
  this.toolbar.add(this.buttonTrain=new JButton("String_Node_Str"));
  this.toolbar.add(this.buttonValidate=new JButton("String_Node_Str"));
  this.buttonRandomize.addActionListener(this);
  this.buttonQuery.addActionListener(this);
  this.buttonTrain.addActionListener(this);
  this.buttonValidate.addActionListener(this);
  content.add(this.toolbar,BorderLayout.PAGE_START);
  this.scroll=new JScrollPane(networkDiagram=new NetworkDiagram(this));
  content.add(this.scroll,BorderLayout.CENTER);
  content.add(this.networkToolbar,BorderLayout.WEST);
  setTitle("String_Node_Str");
}
Program: 17812
Project: 17812
Buggy source:
private void performValidate(){
}

Fixed version (ground truth):
private void performValidate(){
  this.networkDiagram.fixOrphans();
  if (this.networkDiagram.getOrphanLayers().size() > 0) {
    EncogWorkBench.displayError("String_Node_Str","String_Node_Str" + "String_Node_Str");
    return;
  }
  BasicNetwork network=(BasicNetwork)this.getEncogObject();
  if (network.getInputLayer() == null) {
    EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
    return;
  }
  if (network.getOutputLayer() == null) {
    EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
    return;
  }
  EncogWorkBench.displayMessage("String_Node_Str","String_Node_Str");
}
Program: 17813
Project: 17813
Buggy source:
public NetworkFrame(final BasicNetwork data){
  setEncogObject(data);
  addWindowListener(this);
  this.networkToolbar=new NetworkToolbar(this);
  tools.add(new NetworkTool("String_Node_Str",Icons.getLayerBasic(),Type.layer,BasicLayer.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getLayerContext(),Type.layer,ContextLayer.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getLayerRBF(),Type.layer,RadialBasisFunctionLayer.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseWeight(),Type.synapse,WeightedSynapse.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseWeightless(),Type.synapse,WeightedSynapse.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseDirect(),Type.synapse,DirectSynapse.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseWeightless(),Type.synapse,OneToOneSynapse.class));
}

Fixed version (ground truth):
public NetworkFrame(final BasicNetwork data){
  setEncogObject(data);
  addWindowListener(this);
  this.networkToolbar=new NetworkToolbar(this);
  tools.add(new NetworkTool("String_Node_Str",Icons.getLayerBasic(),Type.layer,BasicLayer.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getLayerContext(),Type.layer,ContextLayer.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getLayerRBF(),Type.layer,RadialBasisFunctionLayer.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseWeight(),Type.synapse,WeightedSynapse.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseWeightless(),Type.synapse,WeightlessSynapse.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseDirect(),Type.synapse,DirectSynapse.class));
  tools.add(new NetworkTool("String_Node_Str",Icons.getSynapseOneToOne(),Type.synapse,OneToOneSynapse.class));
}
Program: 17815
Project: 17815
Buggy source:
/** 
 * Creates new form UsersInput 
 */
public InputHopfield(final Frame owner){
  super(owner);
  setTitle("String_Node_Str");
  this.setSize(300,240);
  this.setLocation(200,100);
  final Container content=getBodyPanel();
  content.setLayout(new GridLayout(6,1,10,10));
}

Fixed version (ground truth):
/** 
 * Creates new form UsersInput 
 */
public InputHopfield(final Frame owner){
  super(owner);
  setTitle("String_Node_Str");
  this.setSize(300,240);
  this.setLocation(200,100);
  final Container content=getBodyPanel();
  content.setLayout(new GridLayout(3,2,10,10));
}
Program: 17816
Project: 17816
Buggy source:
/** 
 * @param encogObject the encogObject to set
 */
public void setEncogObject(final EncogPersistedObject encogObject){
  this.encogObject=encogObject;
}

Fixed version (ground truth):
/** 
 * @param encogObject the encogObject to set
 */
public void setEncogObject(final Object encogObject){
  this.encogObject=encogObject;
}
Program: 17817
Project: 17817
Buggy source:
/** 
 * @return the encogObject
 */
public EncogPersistedObject getEncogObject(){
  return this.encogObject;
}

Fixed version (ground truth):
/** 
 * @return the encogObject
 */
public Object getEncogObject(){
  return this.encogObject;
}
Program: 17818
Project: 17818
Buggy source:
public int getRowCount(){
  return this.matrix.getRows();
}

Fixed version (ground truth):
public int getRowCount(){
  return this.layer.getMatrix().getRows();
}
Program: 17819
Project: 17819
Buggy source:
public Object getValueAt(final int rowIndex,final int columnIndex){
  if (columnIndex == 0) {
    if (rowIndex == this.matrix.getRows() - 1) {
      return "String_Node_Str";
    }
    return "String_Node_Str" + (rowIndex + 1);
  }
  return "String_Node_Str" + this.matrix.get(rowIndex,columnIndex - 1);
}

Fixed version (ground truth):
public Object getValueAt(final int rowIndex,final int columnIndex){
  if (this.layer instanceof HopfieldLayer) {
    if (columnIndex == 0) {
      return "String_Node_Str" + (rowIndex + 1);
    }
    return "String_Node_Str" + this.layer.getMatrix().get(rowIndex,columnIndex - 1);
  }
 else {
    if (columnIndex == 0) {
      if (rowIndex == this.layer.getMatrix().getRows() - 1) {
        return "String_Node_Str";
      }
      return "String_Node_Str" + (rowIndex + 1);
    }
    return "String_Node_Str" + this.layer.getMatrix().get(rowIndex,columnIndex - 1);
  }
}
Program: 17820
Project: 17820
Buggy source:
public String getColumnName(final int columnIndex){
  if (columnIndex == 0) {
    return "String_Node_Str";
  }
  return "String_Node_Str" + columnIndex;
}

Fixed version (ground truth):
public String getColumnName(final int columnIndex){
  if (columnIndex == 0) {
    return "String_Node_Str";
  }
  if (this.layer instanceof HopfieldLayer) {
    return "String_Node_Str" + columnIndex;
  }
 else {
    return "String_Node_Str" + columnIndex;
  }
}
Program: 17821
Project: 17821
Buggy source:
public int getColumnCount(){
  return this.matrix.getCols() + 1;
}

Fixed version (ground truth):
public int getColumnCount(){
  return this.layer.getMatrix().getCols() + 1;
}
Program: 17822
Project: 17822
Buggy source:
public MatrixTableModel(final Matrix matrix){
  this.matrix=matrix;
}

Fixed version (ground truth):
public MatrixTableModel(final Layer layer){
  this.layer=layer;
}
Program: 17823
Project: 17823
Buggy source:
public void setValueAt(final Object value,final int rowIndex,final int columnIndex){
  this.matrix.set(rowIndex,columnIndex - 1,Double.parseDouble((String)value));
}

Fixed version (ground truth):
public void setValueAt(final Object value,final int rowIndex,final int columnIndex){
  this.layer.getMatrix().set(rowIndex,columnIndex - 1,Double.parseDouble((String)value));
}
Program: 17824
Project: 17824
Buggy source:
public MatrixFrame(final BasicNetwork data,final Matrix matrix){
  setSize(640,480);
  setTitle("String_Node_Str" + data.getName());
  setEncogObject(matrix);
  this.model=new MatrixTableModel(matrix);
  this.table=new JTable(this.model);
  this.scroll=new JScrollPane(this.table);
  getContentPane().add(this.scroll);
}

Fixed version (ground truth):
public MatrixFrame(final BasicNetwork data,final Layer layer){
  setSize(640,480);
  setTitle("String_Node_Str" + data.getName());
  setEncogObject(layer);
  this.model=new MatrixTableModel(layer);
  this.table=new JTable(this.model);
  this.scroll=new JScrollPane(this.table);
  getContentPane().add(this.scroll);
}
Program: 17825
Project: 17825
Buggy source:
private void performEditMatrix(){
  final Layer item=(Layer)this.contents.getSelectedValue();
  if (item.getMatrix() == null) {
    EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
    return;
  }
  if (getSubwindows().checkBeforeOpen(item.getMatrix(),MatrixFrame.class)) {
    final MatrixFrame frame=new MatrixFrame(getData(),item.getMatrix());
    frame.setVisible(true);
    getSubwindows().add(frame);
  }
}

Fixed version (ground truth):
private void performEditMatrix(){
  final Layer item=(Layer)this.contents.getSelectedValue();
  if (item.getMatrix() == null) {
    EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
    return;
  }
  if (getSubwindows().checkBeforeOpen(item.getMatrix(),MatrixFrame.class)) {
    final MatrixFrame frame=new MatrixFrame((BasicNetwork)getData(),item);
    frame.setVisible(true);
    getSubwindows().add(frame);
  }
}
Program: 17826
Project: 17826
Buggy source:
@Override public void windowDeactivated(WindowEvent arg0){
}

Fixed version (ground truth):
public void windowDeactivated(WindowEvent arg0){
}
Program: 17827
Project: 17827
Buggy source:
@Override public void windowOpened(WindowEvent arg0){
  setSize(640,480);
  Container content=this.getContentPane();
  content.setLayout(new BorderLayout());
  this.toolbar=new JToolBar();
  this.toolbar.setFloatable(false);
  this.toolbar.add(this.deleteLayer=new JButton("String_Node_Str"));
  this.toolbar.add(this.addLayer=new JButton("String_Node_Str"));
  this.toolbar.add(this.editLayer=new JButton("String_Node_Str"));
  this.addLayer.addActionListener(this);
  this.editLayer.addActionListener(this);
  this.deleteLayer.addActionListener(this);
  content.add(this.toolbar,BorderLayout.PAGE_START);
  JPanel content2=new JPanel();
  content2.setLayout(new BorderLayout());
  content.add(content2,BorderLayout.CENTER);
  JPanel topPanel=new JPanel();
  topPanel.setLayout(new FlowLayout());
  topPanel.add(new JLabel("String_Node_Str"));
  JPanel bottomPanel=new JPanel();
  bottomPanel.setLayout(new FlowLayout());
  bottomPanel.add(new JLabel("String_Node_Str"));
  content2.add(topPanel,BorderLayout.NORTH);
  content2.add(bottomPanel,BorderLayout.SOUTH);
  this.model=new NetworkListModel(this.data);
  this.contents=new JList(this.model);
  content2.add(new JScrollPane(this.contents),BorderLayout.CENTER);
  this.setTitle("String_Node_Str");
}

Fixed version (ground truth):
public void windowOpened(WindowEvent arg0){
  setSize(640,480);
  Container content=this.getContentPane();
  content.setLayout(new BorderLayout());
  this.toolbar=new JToolBar();
  this.toolbar.setFloatable(false);
  this.toolbar.add(this.deleteLayer=new JButton("String_Node_Str"));
  this.toolbar.add(this.addLayer=new JButton("String_Node_Str"));
  this.toolbar.add(this.editLayer=new JButton("String_Node_Str"));
  this.addLayer.addActionListener(this);
  this.editLayer.addActionListener(this);
  this.deleteLayer.addActionListener(this);
  content.add(this.toolbar,BorderLayout.PAGE_START);
  JPanel content2=new JPanel();
  content2.setLayout(new BorderLayout());
  content.add(content2,BorderLayout.CENTER);
  JPanel topPanel=new JPanel();
  topPanel.setLayout(new FlowLayout());
  topPanel.add(new JLabel("String_Node_Str"));
  JPanel bottomPanel=new JPanel();
  bottomPanel.setLayout(new FlowLayout());
  bottomPanel.add(new JLabel("String_Node_Str"));
  content2.add(topPanel,BorderLayout.NORTH);
  content2.add(bottomPanel,BorderLayout.SOUTH);
  this.model=new NetworkListModel(this.data);
  this.contents=new JList(this.model);
  content2.add(new JScrollPane(this.contents),BorderLayout.CENTER);
  this.setTitle("String_Node_Str");
}
Program: 17828
Project: 17828
Buggy source:
@Override public void windowIconified(WindowEvent arg0){
}

Fixed version (ground truth):
public void windowIconified(WindowEvent arg0){
}
Program: 17829
Project: 17829
Buggy source:
@Override public void windowClosed(WindowEvent arg0){
}

Fixed version (ground truth):
public void windowClosed(WindowEvent arg0){
}
Program: 17830
Project: 17830
Buggy source:
@Override public void actionPerformed(ActionEvent action){
  if (action.getSource() == this.addLayer) {
    performAddLayer();
  }
 else   if (action.getSource() == this.editLayer) {
    performEditLayer();
  }
 else   if (action.getSource() == this.deleteLayer) {
    performDeleteLayer();
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent action){
  if (action.getSource() == this.addLayer) {
    performAddLayer();
  }
 else   if (action.getSource() == this.editLayer) {
    performEditLayer();
  }
 else   if (action.getSource() == this.deleteLayer) {
    performDeleteLayer();
  }
}
Program: 17831
Project: 17831
Buggy source:
@Override public void windowActivated(WindowEvent arg0){
}

Fixed version (ground truth):
public void windowActivated(WindowEvent arg0){
}
Program: 17832
Project: 17832
Buggy source:
@Override public void windowClosing(WindowEvent arg0){
  EncogWorkBench.getInstance().getMainWindow().closeSubWindow(this);
}

Fixed version (ground truth):
public void windowClosing(WindowEvent arg0){
  EncogWorkBench.getInstance().getMainWindow().closeSubWindow(this);
}
Program: 17833
Project: 17833
Buggy source:
@Override public void windowDeiconified(WindowEvent arg0){
}

Fixed version (ground truth):
public void windowDeiconified(WindowEvent arg0){
}
Program: 17834
Project: 17834
Buggy source:
@Override public void removeListDataListener(ListDataListener arg0){
}

Fixed version (ground truth):
public void removeListDataListener(ListDataListener arg0){
}
Program: 17835
Project: 17835
Buggy source:
@Override public void addListDataListener(ListDataListener listener){
  this.getListeners().add(listener);
}

Fixed version (ground truth):
public void addListDataListener(ListDataListener listener){
  this.getListeners().add(listener);
}
Program: 17836
Project: 17836
Buggy source:
@Override public int getSize(){
  return this.network.getLayers().size();
}

Fixed version (ground truth):
public int getSize(){
  return this.network.getLayers().size();
}
Program: 17837
Project: 17837
Buggy source:
@Override public Object getElementAt(int i){
  return this.network.getLayers().get(i);
}

Fixed version (ground truth):
public Object getElementAt(int i){
  return this.network.getLayers().get(i);
}
Program: 17838
Project: 17838
Buggy source:
public String getIndentedApiTraits(int indent){
  StringBuilder retval=new StringBuilder();
  for (  String trait : _traits) {
    retval.append(StringUtils.leftPad("String_Node_Str",indent));
    retval.append("String_Node_Str");
    retval.append(trait);
    retval.append("String_Node_Str");
  }
  return retval.toString();
}

Fixed version (ground truth):
public String getIndentedApiTraits(int indent){
  StringBuilder retval=new StringBuilder();
  for (  String trait : _traits) {
    retval.append(StringUtils.leftPad("String_Node_Str",indent));
    retval.append("String_Node_Str");
    retval.append(trait);
    retval.append("String_Node_Str");
    retval.append(StringUtils.leftPad("String_Node_Str",2 * indent));
    retval.append("String_Node_Str");
  }
  return retval.toString();
}
Program: 17839
Project: 17839
Buggy source:
public RestApi filter(Iterable<Pattern> excludePatterns){
  RestApi filtered=new RestApi(_identifier);
  filtered.setApiBaseUrl(_apiBaseUrl);
  filtered.setApiTitle(_apiTitle);
  filtered.setApiVersion(_apiVersion);
  filtered.setApiDocumentation(_apiDocumentation);
  OUTER:   for (  Map.Entry<String,Resource> entry : _resources.entrySet()) {
    for (    Pattern excludePattern : excludePatterns)     if (excludePattern.matcher(entry.getKey()).matches())     continue OUTER;
    filtered._resources.put(entry.getKey(),entry.getValue());
  }
  return filtered;
}

Fixed version (ground truth):
public RestApi filter(Iterable<Pattern> excludePatterns){
  RestApi filtered=new RestApi(_identifier);
  filtered.setApiBaseUrl(_apiBaseUrl);
  filtered.setApiTitle(_apiTitle);
  filtered.setApiVersion(_apiVersion);
  filtered.setApiDocumentation(_apiDocumentation);
  filtered.setTraits(_traits);
  OUTER:   for (  Map.Entry<String,Resource> entry : _resources.entrySet()) {
    for (    Pattern excludePattern : excludePatterns)     if (excludePattern.matcher(entry.getKey()).matches())     continue OUTER;
    filtered._resources.put(entry.getKey(),entry.getValue());
  }
  return filtered;
}
Program: 17842
Project: 17842
Buggy source:
public void setApiBaseUrl(String apiBaseUrl){
  _apiBaseUrl=apiBaseUrl;
}

Fixed version (ground truth):
public void setApiBaseUrl(String apiBaseUrl){
  if (null != apiBaseUrl && !apiBaseUrl.trim().isEmpty()) {
    _apiBaseUrl=apiBaseUrl;
  }
}
Program: 17843
Project: 17843
Buggy source:
public void setApiDocumentation(String apiDocumentation){
  _apiDocumentation=apiDocumentation;
}

Fixed version (ground truth):
public void setApiDocumentation(String apiDocumentation){
  if (null != apiDocumentation && !apiDocumentation.trim().isEmpty()) {
    _apiDocumentation=apiDocumentation;
  }
}
Program: 17844
Project: 17844
Buggy source:
public void merge(RestApi api){
  _resources.putAll(api._resources);
}

Fixed version (ground truth):
public void merge(RestApi api){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + _apiTitle);
  System.out.println("String_Node_Str" + api.getApiTitle());
  if (null == _apiTitle || _apiTitle.trim().isEmpty()) {
    _apiTitle=api.getApiTitle();
  }
  if (null == _apiVersion || _apiVersion.trim().isEmpty()) {
    _apiVersion=api.getApiVersion();
  }
  if (null == _apiBaseUrl || _apiBaseUrl.trim().isEmpty()) {
    _apiBaseUrl=api.getApiBaseUrl();
  }
  if (null == _apiDocumentation || _apiDocumentation.trim().isEmpty()) {
    _apiDocumentation=api.getApiDocumentation();
  }
  _resources.putAll(api._resources);
}
Program: 17845
Project: 17845
Buggy source:
public void setApiVersion(String apiVersion){
  _apiVersion=apiVersion;
}

Fixed version (ground truth):
public void setApiVersion(String apiVersion){
  if (null != apiVersion && !apiVersion.trim().isEmpty()) {
    _apiVersion=apiVersion;
  }
}
Program: 17846
Project: 17846
Buggy source:
public void setApiTitle(String apiTitle){
  _apiTitle=apiTitle;
}

Fixed version (ground truth):
public void setApiTitle(String apiTitle){
  if (null != apiTitle && !apiTitle.trim().isEmpty()) {
    _apiTitle=apiTitle;
  }
}
Program: 17847
Project: 17847
Buggy source:
private JsonType jsonTypeFromTypeMirror(TypeMirror typeMirror,Collection<String> typeRecursionGuard){
  JsonType type;
  if (_memoizedTypeMirrors.containsKey(typeMirror)) {
    return _memoizedTypeMirrors.get(typeMirror);
  }
  if (isJsonPrimitive(typeMirror)) {
    type=new JsonPrimitive(typeMirror.toString());
  }
 else   if (typeMirror.getKind() == TypeKind.DECLARED) {
    DeclaredType declaredType=(DeclaredType)typeMirror;
    type=jsonTypeForDeclaredType(declaredType,declaredType.getTypeArguments(),typeRecursionGuard);
  }
 else   if (typeMirror.getKind() == TypeKind.VOID) {
    type=null;
  }
 else   if (typeMirror.getKind() == TypeKind.ARRAY) {
    TypeMirror componentType=((ArrayType)typeMirror).getComponentType();
    type=jsonTypeFromTypeMirror(componentType,typeRecursionGuard);
  }
 else {
    throw new UnsupportedOperationException(typeMirror.toString());
  }
  _memoizedTypeMirrors.put(typeMirror,type);
  return type;
}

Fixed version (ground truth):
private JsonType jsonTypeFromTypeMirror(TypeMirror typeMirror,Collection<String> typeRecursionGuard){
  JsonType type;
  if (_memoizedTypeMirrors.containsKey(typeMirror)) {
    return _memoizedTypeMirrors.get(typeMirror);
  }
  if (isJsonPrimitive(typeMirror)) {
    type=new JsonPrimitive(typeMirror.toString());
  }
 else   if (typeMirror.getKind() == TypeKind.DECLARED) {
    DeclaredType declaredType=(DeclaredType)typeMirror;
    type=jsonTypeForDeclaredType(declaredType,declaredType.getTypeArguments(),typeRecursionGuard);
  }
 else   if (typeMirror.getKind() == TypeKind.VOID) {
    type=null;
  }
 else   if (typeMirror.getKind() == TypeKind.ARRAY) {
    TypeMirror componentType=((ArrayType)typeMirror).getComponentType();
    type=jsonTypeFromTypeMirror(componentType,typeRecursionGuard);
  }
 else   if (typeMirror.getKind() == TypeKind.ERROR) {
    type=new JsonPrimitive("String_Node_Str");
  }
 else {
    throw new UnsupportedOperationException(typeMirror.toString());
  }
  _memoizedTypeMirrors.put(typeMirror,type);
  return type;
}
Program: 17848
Project: 17848
Buggy source:
public void merge(RestApi api){
  if (null == _apiTitle || _apiTitle.trim().isEmpty()) {
    _apiTitle=api.getApiTitle();
  }
  if (null == _apiVersion || _apiVersion.trim().isEmpty()) {
    _apiVersion=api.getApiVersion();
  }
  if (null == _apiBaseUrl || _apiBaseUrl.trim().isEmpty()) {
    _apiBaseUrl=api.getApiBaseUrl();
  }
 else   if (null != _apiBaseUrl && null != api.getApiBaseUrl() && !_apiBaseUrl.trim().equals(api.getApiBaseUrl().trim())) {
    _apiBaseUrl=null;
  }
  if (null == _apiDocumentation || _apiDocumentation.trim().isEmpty()) {
    _apiDocumentation=api.getApiDocumentation();
  }
  _resources.putAll(api._resources);
}

Fixed version (ground truth):
public void merge(RestApi api){
  if (null == _apiTitle || _apiTitle.trim().isEmpty()) {
    _apiTitle=api.getApiTitle();
  }
  if (null == _apiVersion || _apiVersion.trim().isEmpty()) {
    _apiVersion=api.getApiVersion();
  }
  if (null == _apiBaseUrl || _apiBaseUrl.trim().isEmpty()) {
    _apiBaseUrl=api.getApiBaseUrl();
  }
 else   if (null != _apiBaseUrl && null != api.getApiBaseUrl() && !_apiBaseUrl.trim().equals(api.getApiBaseUrl().trim())) {
    _apiBaseUrl=null;
  }
  if (null == _apiDocumentation || _apiDocumentation.trim().isEmpty()) {
    _apiDocumentation=api.getApiDocumentation();
  }
  _resources.putAll(api._resources);
  _traits.addAll(api._traits);
}
Program: 17850
Project: 17850
Buggy source:
/** 
 * Creates and returns a new   {@link Method} instance, and adds it tothe current resource location. If this is invoked multiple times with the same argument, multiple distinct  {@link Method} objectswill be returned.
 */
public Method newMethodDocumentation(String meth){
  Method method=new Method(meth);
  _methods.add(method);
  return method;
}

Fixed version (ground truth):
/** 
 * Creates and returns a new   {@link Method} instance, and adds it tothe current resource location. If this is invoked multiple times with the same argument, the same  {@link Method} objectwill be returned.
 */
public Method newMethodDocumentation(String meth){
  if (_methods.containsKey(meth)) {
    return _methods.get(meth);
  }
  Method method=new Method(meth);
  _methods.put(meth,method);
  return method;
}
Program: 17851
Project: 17851
Buggy source:
public Collection<Method> getRequestMethodDocs(){
  return _methods;
}

Fixed version (ground truth):
public Collection<Method> getRequestMethodDocs(){
  return _methods.values();
}
Program: 17852
Project: 17852
Buggy source:
public UrlFields getResourceUrlSubstitutions(){
  UrlFields aggregateUrlFields=new UrlFields();
  for (  Method method : _methods) {
    UrlFields fields=method.getMethodSpecificUrlSubstitutions();
    aggregateUrlFields.getFields().putAll(fields.getFields());
  }
  return aggregateUrlFields;
}

Fixed version (ground truth):
public UrlFields getResourceUrlSubstitutions(){
  UrlFields aggregateUrlFields=new UrlFields();
  for (  Method method : _methods.values()) {
    UrlFields fields=method.getMethodSpecificUrlSubstitutions();
    aggregateUrlFields.getFields().putAll(fields.getFields());
  }
  return aggregateUrlFields;
}
Program: 17853
Project: 17853
Buggy source:
/** 
 * Finds any request parameters that can be bound to (which are pojos) and adds each of the POJOs fields to the url parameters
 */
private void buildPojoQueryParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  if (doc.getRequestMethod().equals(RequestMethod.GET.name())) {
    RestDocumentation.Resource.Method.UrlFields subs=doc.getUrlParameters();
    for (    VariableElement var : executableElement.getParameters()) {
      if (implementationSupport.getPojoRequestParam(var) != null) {
        Element paramType=_typeUtils.asElement(var.asType());
        List<ExecutableElement> methods=ElementFilter.methodsIn(paramType.getEnclosedElements());
        for (        ExecutableElement method : methods) {
          if (method.getSimpleName().toString().startsWith("String_Node_Str") && method.getParameters().size() == 1) {
            String setterComment=processingEnv.getElementUtils().getDocComment(method);
            TypeMirror setterType=method.getParameters().get(0).asType();
            JsonType jsonType=jsonTypeFromTypeMirror(setterType,new HashSet<String>());
            String propName=StringUtils.uncapitalize(method.getSimpleName().toString().substring(3));
            subs.addField(propName,jsonType,fixCommentWhitespace(setterComment));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Finds any request parameters that can be bound to (which are pojos) and adds each of the POJOs fields to the url parameters
 */
private void buildPojoQueryParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  if (doc.getRequestMethod().equals(RequestMethod.GET.name())) {
    RestDocumentation.Resource.UrlFields subs=doc.getUrlParameters();
    for (    VariableElement var : executableElement.getParameters()) {
      if (implementationSupport.getPojoRequestParam(var) != null) {
        Element paramType=_typeUtils.asElement(var.asType());
        List<ExecutableElement> methods=ElementFilter.methodsIn(paramType.getEnclosedElements());
        for (        ExecutableElement method : methods) {
          if (method.getSimpleName().toString().startsWith("String_Node_Str") && method.getParameters().size() == 1) {
            String setterComment=processingEnv.getElementUtils().getDocComment(method);
            TypeMirror setterType=method.getParameters().get(0).asType();
            JsonType jsonType=jsonTypeFromTypeMirror(setterType,new HashSet<String>());
            String propName=StringUtils.uncapitalize(method.getSimpleName().toString().substring(3));
            subs.addField(propName,jsonType,fixCommentWhitespace(setterComment));
          }
        }
      }
    }
  }
}
Program: 17854
Project: 17854
Buggy source:
private void buildUrlParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.Method.UrlFields subs=doc.getUrlParameters();
  for (  VariableElement var : executableElement.getParameters()) {
    String reqParam=implementationSupport.getRequestParam(var);
    if (reqParam != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,reqParam,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}

Fixed version (ground truth):
private void buildUrlParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.UrlFields subs=doc.getUrlParameters();
  for (  VariableElement var : executableElement.getParameters()) {
    String reqParam=implementationSupport.getRequestParam(var);
    if (reqParam != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,reqParam,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}
Program: 17855
Project: 17855
Buggy source:
private void addUrlField(RestDocumentation.Resource.Method.UrlFields subs,VariableElement var,String annoValue,String description){
  String name=(annoValue == null || annoValue.isEmpty()) ? var.getSimpleName().toString() : annoValue;
  subs.addField(name,jsonTypeFromTypeMirror(var.asType(),new HashSet<String>()),description);
}

Fixed version (ground truth):
private void addUrlField(RestDocumentation.Resource.UrlFields subs,VariableElement var,String annoValue,String description){
  String name=(annoValue == null || annoValue.isEmpty()) ? var.getSimpleName().toString() : annoValue;
  subs.addField(name,jsonTypeFromTypeMirror(var.asType(),new HashSet<String>()),description);
}
Program: 17856
Project: 17856
Buggy source:
private void buildPathVariables(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.Method.UrlFields subs=doc.getUrlSubstitutions();
  for (  VariableElement var : executableElement.getParameters()) {
    String pathVariable=implementationSupport.getPathVariable(var);
    if (pathVariable != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,pathVariable,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}

Fixed version (ground truth):
private void buildPathVariables(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.UrlFields subs=doc.getUrlSubstitutions();
  for (  VariableElement var : executableElement.getParameters()) {
    String pathVariable=implementationSupport.getPathVariable(var);
    if (pathVariable != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,pathVariable,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}
Program: 17857
Project: 17857
Buggy source:
private void processElements(RoundEnvironment roundEnvironment,Collection<String> processedPackageNames,RestImplementationSupport implementationSupport){
  for (  Element e : roundEnvironment.getElementsAnnotatedWith(implementationSupport.getMappingAnnotationType())) {
    if (e instanceof ExecutableElement) {
      addPackageName(processedPackageNames,e);
      processRequestMappingMethod((ExecutableElement)e,implementationSupport);
    }
  }
}

Fixed version (ground truth):
private void processElements(RoundEnvironment roundEnvironment,Collection<String> processedPackageNames,RestImplementationSupport implementationSupport){
  for (  Element e : roundEnvironment.getElementsAnnotatedWith(implementationSupport.getMappingAnnotationType())) {
    if (e instanceof ExecutableElement) {
      if (isExecutableElementMarkedAsUndocumented((ExecutableElement)e)) {
        continue;
      }
      addPackageName(processedPackageNames,e);
      processRequestMappingMethod((ExecutableElement)e,implementationSupport);
    }
  }
}
Program: 17858
Project: 17858
Buggy source:
@Override public boolean process(Set<? extends TypeElement> supportedAnnotations,RoundEnvironment roundEnvironment){
  if (_isComplete)   return true;
  Collection<String> processedPackageNames=new LinkedHashSet<String>();
  processElements(roundEnvironment,processedPackageNames,new SpringMVCRestImplementationSupport());
  processElements(roundEnvironment,processedPackageNames,new JaxRSRestImplementationSupport());
  _docs.postProcess();
  if (_docs.getResources().size() > 0) {
    OutputStream fileOutput=null;
    try {
      FileObject file=getOutputFile();
      boolean exists=new File(file.getName()).exists();
      fileOutput=file.openOutputStream();
      _docs.toStream(fileOutput);
      processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE,String.format("String_Node_Str",_docs.getResources().size(),exists ? "String_Node_Str" : "String_Node_Str",file.getName()));
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
 finally {
      if (fileOutput != null) {
        try {
          fileOutput.close();
        }
 catch (        IOException ignored) {
        }
      }
    }
  }
  _isComplete=true;
  return true;
}

Fixed version (ground truth):
@Override public boolean process(Set<? extends TypeElement> supportedAnnotations,RoundEnvironment roundEnvironment){
  LOGGER.info("String_Node_Str");
  if (_isComplete)   return true;
  Collection<String> processedPackageNames=new LinkedHashSet<String>();
  processElements(roundEnvironment,processedPackageNames,new SpringMVCRestImplementationSupport());
  processElements(roundEnvironment,processedPackageNames,new JaxRSRestImplementationSupport());
  _docs.postProcess();
  if (_docs.getResources().size() > 0) {
    OutputStream fileOutput=null;
    try {
      FileObject file=getOutputFile();
      boolean exists=new File(file.getName()).exists();
      fileOutput=file.openOutputStream();
      _docs.toStream(fileOutput);
      processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE,String.format("String_Node_Str",_docs.getResources().size(),exists ? "String_Node_Str" : "String_Node_Str",file.getName()));
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
 finally {
      if (fileOutput != null) {
        try {
          fileOutput.close();
        }
 catch (        IOException ignored) {
        }
      }
    }
  }
  _isComplete=true;
  return true;
}
Program: 17859
Project: 17859
Buggy source:
/** 
 * Finds any request parameters that can be bound to (which are pojos) and adds each of the POJOs fields to the url parameters
 */
private void buildPojoQueryParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  if (doc.getRequestMethod().equals(RequestMethod.GET.name())) {
    RestDocumentation.Resource.Method.UrlFields subs=doc.getUrlParameters();
    for (    VariableElement var : executableElement.getParameters()) {
      if (implementationSupport.getPojoRequestParam(var) != null) {
        Element paramType=_typeUtils.asElement(var.asType());
        List<ExecutableElement> methods=ElementFilter.methodsIn(paramType.getEnclosedElements());
        for (        ExecutableElement method : methods) {
          if (method.getSimpleName().toString().startsWith("String_Node_Str") && method.getParameters().size() == 1) {
            String setterComment=processingEnv.getElementUtils().getDocComment(method);
            TypeMirror setterType=method.getParameters().get(0).asType();
            JsonType jsonType=jsonTypeFromTypeMirror(setterType,new HashSet<String>());
            String propName=StringUtils.uncapitalize(method.getSimpleName().toString().substring(3));
            subs.addField(propName,jsonType,fixCommentWhitespace(setterComment));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Finds any request parameters that can be bound to (which are pojos) and adds each of the POJOs fields to the url parameters
 */
private void buildPojoQueryParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  if (doc.getRequestMethod().equals(RequestMethod.GET.name())) {
    RestDocumentation.Resource.UrlFields subs=doc.getUrlParameters();
    for (    VariableElement var : executableElement.getParameters()) {
      if (implementationSupport.getPojoRequestParam(var) != null) {
        Element paramType=_typeUtils.asElement(var.asType());
        List<ExecutableElement> methods=ElementFilter.methodsIn(paramType.getEnclosedElements());
        for (        ExecutableElement method : methods) {
          if (method.getSimpleName().toString().startsWith("String_Node_Str") && method.getParameters().size() == 1) {
            String setterComment=processingEnv.getElementUtils().getDocComment(method);
            TypeMirror setterType=method.getParameters().get(0).asType();
            JsonType jsonType=jsonTypeFromTypeMirror(setterType,new HashSet<String>());
            String propName=StringUtils.uncapitalize(method.getSimpleName().toString().substring(3));
            subs.addField(propName,jsonType,fixCommentWhitespace(setterComment));
          }
        }
      }
    }
  }
}
Program: 17860
Project: 17860
Buggy source:
private void buildUrlParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.Method.UrlFields subs=doc.getUrlParameters();
  for (  VariableElement var : executableElement.getParameters()) {
    String reqParam=implementationSupport.getRequestParam(var);
    if (reqParam != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,reqParam,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}

Fixed version (ground truth):
private void buildUrlParameters(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.UrlFields subs=doc.getUrlParameters();
  for (  VariableElement var : executableElement.getParameters()) {
    String reqParam=implementationSupport.getRequestParam(var);
    if (reqParam != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,reqParam,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}
Program: 17861
Project: 17861
Buggy source:
private void addUrlField(RestDocumentation.Resource.Method.UrlFields subs,VariableElement var,String annoValue,String description){
  String name=(annoValue == null || annoValue.isEmpty()) ? var.getSimpleName().toString() : annoValue;
  subs.addField(name,jsonTypeFromTypeMirror(var.asType(),new HashSet<String>()),description);
}

Fixed version (ground truth):
private void addUrlField(RestDocumentation.Resource.UrlFields subs,VariableElement var,String annoValue,String description){
  String name=(annoValue == null || annoValue.isEmpty()) ? var.getSimpleName().toString() : annoValue;
  subs.addField(name,jsonTypeFromTypeMirror(var.asType(),new HashSet<String>()),description);
}
Program: 17862
Project: 17862
Buggy source:
private void buildPathVariables(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.Method.UrlFields subs=doc.getUrlSubstitutions();
  for (  VariableElement var : executableElement.getParameters()) {
    String pathVariable=implementationSupport.getPathVariable(var);
    if (pathVariable != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,pathVariable,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}

Fixed version (ground truth):
private void buildPathVariables(ExecutableElement executableElement,RestDocumentation.Resource.Method doc,RestImplementationSupport implementationSupport){
  RestDocumentation.Resource.UrlFields subs=doc.getUrlSubstitutions();
  for (  VariableElement var : executableElement.getParameters()) {
    String pathVariable=implementationSupport.getPathVariable(var);
    if (pathVariable != null) {
      String paramName=var.getSimpleName().toString();
      addUrlField(subs,var,pathVariable,findParamDescription(paramName,doc.getCommentText()));
    }
  }
}
Program: 17864
Project: 17864
Buggy source:
private void buildResponseFormat(TypeMirror type,RestDocumentation.Resource.Method doc){
  doc.setResponseBody(newJsonType(type));
}

Fixed version (ground truth):
private void buildResponseFormat(TypeMirror type,RestDocumentation.Resource.Method doc){
  doc.setResponseBody(jsonTypeFromTypeMirror(type,new HashSet<DeclaredType>()));
}
Program: 17865
Project: 17865
Buggy source:
public TypeVisitorImpl(DeclaredType type,List<? extends TypeMirror> typeArguments,Collection<DeclaredType> typeRecursionGuard){
  TypeElement elem=(TypeElement)type.asElement();
  _typeRecursionGuard=typeRecursionGuard;
  _type=type;
  List<? extends TypeParameterElement> generics=elem.getTypeParameters();
  for (int i=0; i < generics.size(); i++) {
    DeclaredType value=(typeArguments.isEmpty() || !(typeArguments.get(i) instanceof DeclaredType)) ? null : (DeclaredType)typeArguments.get(i);
    _typeArguments.put(generics.get(i).getSimpleName(),value);
  }
}

Fixed version (ground truth):
public TypeVisitorImpl(DeclaredType type,List<? extends TypeMirror> typeArguments,Collection<DeclaredType> typeRecursionGuard){
  TypeElement elem=(TypeElement)type.asElement();
  _typeRecursionDetector=typeRecursionGuard;
  _type=type;
  List<? extends TypeParameterElement> generics=elem.getTypeParameters();
  for (int i=0; i < generics.size(); i++) {
    DeclaredType value=(typeArguments.isEmpty() || !(typeArguments.get(i) instanceof DeclaredType)) ? null : (DeclaredType)typeArguments.get(i);
    _typeArguments.put(generics.get(i).getSimpleName(),value);
  }
}
Program: 17866
Project: 17866
Buggy source:
private void addFieldFromBeanMethod(JsonObject o,ExecutableElement executableElement){
  if (!isJsonBeanGetter(executableElement))   return;
  TypeMirror type=executableElement.getReturnType();
  String methodName=executableElement.getSimpleName().toString();
  int trimLength=methodName.startsWith("String_Node_Str") ? 2 : 3;
  String beanName=methodName.substring(trimLength + 1,methodName.length());
  beanName=methodName.substring(trimLength,trimLength + 1).toLowerCase() + beanName;
  List<DeclaredType> concreteTypes=new ArrayList();
  if (type instanceof TypeVariable) {
    type=getDeclaredTypeForTypeVariable((TypeVariable)type);
    if (type == null)     return;
  }
  String docComment=processingEnv.getElementUtils().getDocComment(executableElement);
  if (type instanceof DeclaredType) {
    TypeElement element=(TypeElement)((DeclaredType)type).asElement();
    for (    TypeParameterElement generic : element.getTypeParameters()) {
      concreteTypes.add(_typeArguments.get(generic.getSimpleName()));
    }
    Collection<DeclaredType> types=new HashSet<DeclaredType>(_typeRecursionGuard);
    types.add(_type);
    o.addField(beanName,newJsonType((DeclaredType)type,concreteTypes,types)).setCommentText(docComment);
  }
 else {
    o.addField(beanName,newJsonType(type)).setCommentText(docComment);
  }
}

Fixed version (ground truth):
private void addFieldFromBeanMethod(JsonObject o,ExecutableElement executableElement){
  if (!isJsonBeanGetter(executableElement))   return;
  TypeMirror type=executableElement.getReturnType();
  String methodName=executableElement.getSimpleName().toString();
  int trimLength=methodName.startsWith("String_Node_Str") ? 2 : 3;
  String beanName=methodName.substring(trimLength + 1,methodName.length());
  beanName=methodName.substring(trimLength,trimLength + 1).toLowerCase() + beanName;
  if (type instanceof TypeVariable) {
    type=getDeclaredTypeForTypeVariable((TypeVariable)type);
    if (type == null)     return;
  }
  String docComment=processingEnv.getElementUtils().getDocComment(executableElement);
  if (type instanceof DeclaredType) {
    JsonType jsonType=recurseForJsonType((DeclaredType)type);
    o.addField(beanName,jsonType).setCommentText(docComment);
  }
 else {
    o.addField(beanName,jsonTypeFromTypeMirror(type,new HashSet<DeclaredType>(_typeRecursionDetector))).setCommentText(docComment);
  }
}
Program: 17867
Project: 17867
Buggy source:
private void buildRequestBody(VariableElement var,RestDocumentation.Resource.Method doc){
  doc.setRequestBody(newJsonType(var.asType()));
}

Fixed version (ground truth):
private void buildRequestBody(VariableElement var,RestDocumentation.Resource.Method doc){
  doc.setRequestBody(jsonTypeFromTypeMirror(var.asType(),new HashSet<DeclaredType>()));
}
Program: 17869
Project: 17869
Buggy source:
@Override public JsonType visitPrimitive(PrimitiveType primitiveType,Void o){
  return newJsonType(primitiveType);
}

Fixed version (ground truth):
@Override public JsonType visitPrimitive(PrimitiveType primitiveType,Void o){
  return jsonTypeFromTypeMirror(primitiveType,new HashSet<DeclaredType>(_typeRecursionDetector));
}
Program: 17870
Project: 17870
Buggy source:
private JsonType buildType(DeclaredType declaredType,TypeElement element){
  if (_typeRecursionGuard.contains(declaredType))   return new JsonRecursiveObject(element.getSimpleName().toString());
  JsonObject json=new JsonObject();
  buildTypeContents(json,element);
  return json;
}

Fixed version (ground truth):
private JsonType buildType(DeclaredType declaredType,TypeElement element){
  if (_typeRecursionDetector.contains(declaredType))   return new JsonRecursiveObject(element.getSimpleName().toString());
  JsonObject json=new JsonObject();
  buildTypeContents(json,element);
  return json;
}
Program: 17871
Project: 17871
Buggy source:
private void addUrlField(RestDocumentation.Resource.Method.UrlFields subs,VariableElement var,String annoValue){
  String name=(annoValue == null || annoValue.isEmpty()) ? var.getSimpleName().toString() : annoValue;
  subs.addField(name,newJsonType(var.asType()));
}

Fixed version (ground truth):
private void addUrlField(RestDocumentation.Resource.Method.UrlFields subs,VariableElement var,String annoValue){
  String name=(annoValue == null || annoValue.isEmpty()) ? var.getSimpleName().toString() : annoValue;
  subs.addField(name,jsonTypeFromTypeMirror(var.asType(),new HashSet<DeclaredType>()));
}
Program: 17872
Project: 17872
Buggy source:
private boolean isJsonBeanGetter(ExecutableElement executableElement){
  if (executableElement.getKind() != ElementKind.METHOD)   return false;
  if (executableElement.getReturnType().getKind() == TypeKind.NULL)   return false;
  if (!(executableElement.getSimpleName().toString().startsWith("String_Node_Str") && executableElement.getParameters().size() == 0))   return false;
  return executableElement.getAnnotation(JsonIgnore.class) == null;
}

Fixed version (ground truth):
private boolean isJsonBeanGetter(ExecutableElement executableElement){
  if (executableElement.getKind() != ElementKind.METHOD)   return false;
  if (executableElement.getReturnType().getKind() == TypeKind.NULL)   return false;
  if (!(executableElement.getSimpleName().toString().startsWith("String_Node_Str") || executableElement.getSimpleName().toString().startsWith("String_Node_Str")))   return false;
  if (executableElement.getParameters().size() > 0)   return false;
  return executableElement.getAnnotation(JsonIgnore.class) == null;
}
Program: 17873
Project: 17873
Buggy source:
private void buildTypeContents(JsonObject o,TypeElement element){
  DeclaredType sup=(DeclaredType)element.getSuperclass();
  if (!isJsonPrimitive(sup))   buildTypeContents(o,(TypeElement)sup.asElement());
  for (  Element e : element.getEnclosedElements()) {
    if (e instanceof ExecutableElement) {
      addFieldFromBeanGetter(o,(ExecutableElement)e);
    }
  }
}

Fixed version (ground truth):
private void buildTypeContents(JsonObject o,TypeElement element){
  DeclaredType sup=(DeclaredType)element.getSuperclass();
  if (!isJsonPrimitive(sup))   buildTypeContents(o,(TypeElement)sup.asElement());
  for (  Element e : element.getEnclosedElements()) {
    if (e instanceof ExecutableElement) {
      addFieldFromBeanMethod(o,(ExecutableElement)e);
    }
  }
}
Program: 17874
Project: 17874
Buggy source:
/** 
 * Search of Companies based on space separated list of keywords
 * @param keywords
 * @return Search Result with count, start, total and list of companies
 */
Companies search(String keywords);

Fixed version (ground truth):
/** 
 * Search of Companies based on space separated list of keywords
 * @param keywords keywords to search with
 * @return Search Result with count, start, total and list of companies
 */
Companies search(String keywords);
Program: 17875
Project: 17875
Buggy source:
/** 
 * Retrieve Company Details based on unique integer id
 * @param id
 * @return company
 */
Company getCompany(int id);

Fixed version (ground truth):
/** 
 * Retrieve Company Details based on unique integer id
 * @param id the company ID
 * @return company
 */
Company getCompany(int id);