nus-yam/ex-repair huggingface dataset:
Program: 79712
Project: 79712
Buggy source:
@Override public void componentHidden(ComponentEvent event){
  ArrayList<UUID> newFilters=new ArrayList<UUID>(filters.keySet());
  newFilters.removeAll(originalFilters.keySet());
  ArrayList<UUID> modifiedFilters=new ArrayList<UUID>(filters.keySet());
  modifiedFilters.removeAll(newFilters);
  ArrayList<UUID> removedFilters=new ArrayList<UUID>(originalFilters.keySet());
  removedFilters.removeAll(filters.keySet());
  for (int i=0; i < modifiedFilters.size(); i++) {
    UUID uid=modifiedFilters.get(i);
    if (!filters.get(uid).isModified()) {
      modifiedFilters.remove(uid);
    }
 else {
      filters.get(uid).setModified(false);
    }
  }
  for (  FilterListener listener : filterListeners) {
    for (    UUID uid : newFilters) {
      listener.onAdd(filters.get(uid));
    }
    for (    UUID uid : modifiedFilters) {
      listener.onChange(filters.get(uid));
    }
    for (    UUID uid : removedFilters) {
      listener.onRemove(originalFilters.get(uid));
    }
  }
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
  prefs.setColorFilters(filters);
}

Fixed version (ground truth):
@Override public void componentHidden(ComponentEvent event){
  ArrayList<UUID> newFilters=new ArrayList<UUID>(filters.keySet());
  newFilters.removeAll(originalFilters.keySet());
  ArrayList<UUID> modifiedFilters=new ArrayList<UUID>(filters.keySet());
  modifiedFilters.removeAll(newFilters);
  ArrayList<UUID> removedFilters=new ArrayList<UUID>(originalFilters.keySet());
  removedFilters.removeAll(filters.keySet());
  ArrayList<UUID> tempFilters=new ArrayList<>(modifiedFilters);
  for (int i=0; i < tempFilters.size(); i++) {
    UUID uid=tempFilters.get(i);
    if (!filters.get(uid).isModified()) {
      modifiedFilters.remove(uid);
    }
 else {
      filters.get(uid).setModified(false);
    }
  }
  for (  FilterListener listener : filterListeners) {
    for (    UUID uid : newFilters) {
      listener.onAdd(filters.get(uid));
    }
    for (    UUID uid : modifiedFilters) {
      listener.onChange(filters.get(uid));
    }
    for (    UUID uid : removedFilters) {
      listener.onRemove(originalFilters.get(uid));
    }
  }
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
  prefs.setColorFilters(filters);
}
Program: 79713
Project: 79713
Buggy source:
@Override public LogTableColumn deserialize(JsonElement jsonElement,Type type,JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
  LogTableColumn column=null;
  column=new LogTableColumn();
  JsonObject object=jsonElement.getAsJsonObject();
  column.setIdentifier(object.get("String_Node_Str").getAsInt());
  column.setName(object.get("String_Node_Str").getAsString());
  column.setEnabled(object.get("String_Node_Str").getAsBoolean());
  column.setDefaultVisibleName(object.get("String_Node_Str").getAsString());
  column.setVisibleName(object.get("String_Node_Str").getAsString());
  column.setWidth(object.get("String_Node_Str").getAsInt());
  column.setType(object.get("String_Node_Str").getAsString());
  column.setReadonly(object.get("String_Node_Str").getAsBoolean());
  column.setOrder(object.get("String_Node_Str").getAsInt());
  column.setVisible(object.get("String_Node_Str").getAsBoolean());
  column.setDescription(object.get("String_Node_Str").getAsString());
  column.setIsRegEx(object.get("String_Node_Str").getAsBoolean());
  LogTableColumn.RegExData regExData=new LogTableColumn.RegExData();
  regExData.setRegExString(object.getAsJsonObject("String_Node_Str").get("String_Node_Str").getAsString());
  regExData.setRegExCaseSensitive(object.getAsJsonObject("String_Node_Str").get("String_Node_Str").getAsBoolean());
  column.setRegExData(regExData);
  return column;
}

Fixed version (ground truth):
@Override public LogTableColumn deserialize(JsonElement jsonElement,Type type,JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
  LogTableColumn column=null;
  column=new LogTableColumn();
  JsonObject object=jsonElement.getAsJsonObject();
  column.setIdentifier(object.get("String_Node_Str").getAsInt());
  column.setName(object.get("String_Node_Str").getAsString());
  column.setEnabled(object.get("String_Node_Str").getAsBoolean());
  column.setDefaultVisibleName(object.get("String_Node_Str").getAsString());
  column.setVisibleName(object.get("String_Node_Str").getAsString());
  column.setWidth(object.get("String_Node_Str").getAsInt());
  column.setType(object.get("String_Node_Str").getAsString());
  column.setReadonly(object.get("String_Node_Str").getAsBoolean());
  column.setOrder(object.get("String_Node_Str").getAsInt());
  column.setVisible(object.get("String_Node_Str").getAsBoolean());
  column.setDescription(object.get("String_Node_Str").getAsString());
  column.setIsRegEx(object.get("String_Node_Str").getAsBoolean());
  LogTableColumn.RegExData regExData=new LogTableColumn.RegExData();
  regExData.setRegExString(object.get("String_Node_Str").getAsString());
  regExData.setRegExCaseSensitive(object.get("String_Node_Str").getAsBoolean());
  column.setRegExData(regExData);
  return column;
}
Program: 79718
Project: 79718
Buggy source:
public ColorFilterDialog(Map<UUID,ColorFilter> filters,ArrayList<FilterListener> listeners){
  this.filters=filters;
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
  this.filterListeners=listeners;
  this.addComponentListener(this);
  buildDialog();
  pack();
}

Fixed version (ground truth):
public ColorFilterDialog(LoggerPreferences prefs,ArrayList<FilterListener> listeners){
  this.filters=prefs.getColorFilters();
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
  this.filterListeners=listeners;
  this.prefs=prefs;
  this.addComponentListener(this);
  buildDialog();
  pack();
}
Program: 79719
Project: 79719
Buggy source:
@Override public void componentHidden(ComponentEvent event){
  ArrayList<UUID> newFilters=new ArrayList<UUID>(filters.keySet());
  newFilters.removeAll(originalFilters.keySet());
  ArrayList<UUID> modifiedFilters=new ArrayList<UUID>(filters.keySet());
  modifiedFilters.removeAll(newFilters);
  ArrayList<UUID> removedFilters=new ArrayList<UUID>(originalFilters.keySet());
  removedFilters.removeAll(filters.keySet());
  for (int i=0; i < modifiedFilters.size(); i++) {
    UUID uid=modifiedFilters.get(i);
    if (!filters.get(uid).isModified()) {
      modifiedFilters.remove(uid);
    }
 else {
      filters.get(uid).setModified(false);
    }
  }
  for (  FilterListener listener : filterListeners) {
    for (    UUID uid : newFilters) {
      listener.onAdd(filters.get(uid));
    }
    for (    UUID uid : modifiedFilters) {
      listener.onChange(filters.get(uid));
    }
    for (    UUID uid : removedFilters) {
      listener.onRemove(originalFilters.get(uid));
    }
  }
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
}

Fixed version (ground truth):
@Override public void componentHidden(ComponentEvent event){
  ArrayList<UUID> newFilters=new ArrayList<UUID>(filters.keySet());
  newFilters.removeAll(originalFilters.keySet());
  ArrayList<UUID> modifiedFilters=new ArrayList<UUID>(filters.keySet());
  modifiedFilters.removeAll(newFilters);
  ArrayList<UUID> removedFilters=new ArrayList<UUID>(originalFilters.keySet());
  removedFilters.removeAll(filters.keySet());
  for (int i=0; i < modifiedFilters.size(); i++) {
    UUID uid=modifiedFilters.get(i);
    if (!filters.get(uid).isModified()) {
      modifiedFilters.remove(uid);
    }
 else {
      filters.get(uid).setModified(false);
    }
  }
  for (  FilterListener listener : filterListeners) {
    for (    UUID uid : newFilters) {
      listener.onAdd(filters.get(uid));
    }
    for (    UUID uid : modifiedFilters) {
      listener.onChange(filters.get(uid));
    }
    for (    UUID uid : removedFilters) {
      listener.onRemove(originalFilters.get(uid));
    }
  }
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
  prefs.setColorFilters(filters);
}
Program: 79720
Project: 79720
Buggy source:
ColorFilterTableModel(Map<UUID,ColorFilter> filters,ArrayList<FilterListener> filterListeners){
  this.filters=filters;
  this.filterListeners=filterListeners;
}

Fixed version (ground truth):
ColorFilterTableModel(Map<UUID,ColorFilter> filters,ArrayList<FilterListener> filterListeners){
  this.filters=filters;
  for (  UUID uid : filters.keySet()) {
    rowUUIDs.put(rowUUIDs.size(),uid);
  }
  this.filterListeners=filterListeners;
}
Program: 79722
Project: 79722
Buggy source:
public void setBackgroundColor(Color backgroundColor){
  this.backgroundColor=backgroundColor;
}

Fixed version (ground truth):
public void setBackgroundColor(Color backgroundColor){
  this.backgroundColor=backgroundColor;
  this.modified=true;
}
Program: 79723
Project: 79723
Buggy source:
@Override public String toString(){
  return left + "String_Node_Str" + operation.representation+ "String_Node_Str"+ right;
}

Fixed version (ground truth):
@Override public String toString(){
  String lString=left.toString();
  if (left instanceof Pattern)   lString="String_Node_Str" + left + "String_Node_Str";
  String rString=right.toString();
  if (right instanceof Pattern)   rString="String_Node_Str" + right + "String_Node_Str";
  return lString + "String_Node_Str" + operation.representation+ "String_Node_Str"+ rString;
}
Program: 79729
Project: 79729
Buggy source:
@Override public void onChange(ColorFilter filter){
  if (!filter.isEnabled() || filter.getFilter() == null)   return;
synchronized (log) {
    for (int i=0; i < log.size(); i++) {
      boolean colorResult=log.get(i).testColorFilter(filter);
      if (colorResult)       logTable.getModel().fireTableRowsUpdated(i,i);
    }
  }
}

Fixed version (ground truth):
@Override public void onChange(ColorFilter filter){
  if (!filter.isEnabled() || filter.getFilter() == null)   return;
synchronized (log) {
    for (int i=0; i < log.size(); i++) {
      boolean colorResult=log.get(i).testColorFilter(filter,true);
      if (colorResult)       logTable.getModel().fireTableRowsUpdated(i,i);
    }
  }
}
Program: 79732
Project: 79732
Buggy source:
@Override public void onAdd(ColorFilter filter){
  if (!filter.isEnabled() || filter.getFilter() == null)   return;
synchronized (log) {
    for (int i=0; i < log.size(); i++) {
      boolean colorResult=log.get(i).testColorFilter(filter);
      if (colorResult)       logTable.getModel().fireTableRowsUpdated(i,i);
    }
  }
}

Fixed version (ground truth):
@Override public void onAdd(ColorFilter filter){
  if (!filter.isEnabled() || filter.getFilter() == null)   return;
synchronized (log) {
    for (int i=0; i < log.size(); i++) {
      boolean colorResult=log.get(i).testColorFilter(filter,false);
      if (colorResult)       logTable.getModel().fireTableRowsUpdated(i,i);
    }
  }
}
Program: 79733
Project: 79733
Buggy source:
@Override public void actionPerformed(ActionEvent actionEvent){
  colorFilterDialog=new ColorFilterDialog(colorFilters,filterListeners);
  colorFilterDialog.setVisible(true);
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent actionEvent){
  colorFilterDialog.setVisible(true);
}
Program: 79735
Project: 79735
Buggy source:
@Override public void onRemove(ColorFilter filter){
}

Fixed version (ground truth):
@Override public void onRemove(ColorFilter filter){
  if (!filter.isEnabled() || filter.getFilter() == null)   return;
synchronized (log) {
    for (int i=0; i < log.size(); i++) {
      boolean wasPresent=log.get(i).matchingColorFilters.remove(filter.getUid());
      if (wasPresent)       logTable.getModel().fireTableRowsUpdated(i,i);
    }
  }
}
Program: 79736
Project: 79736
Buggy source:
public ColorFilterDialog(ArrayList<ColorFilter> filters,ArrayList<FilterListener> listeners){
  this.filters=filters;
  this.filterListeners=listeners;
  buildDialog();
  pack();
}

Fixed version (ground truth):
public ColorFilterDialog(Map<UUID,ColorFilter> filters,ArrayList<FilterListener> listeners){
  this.filters=filters;
  this.originalFilters=new HashMap<UUID,ColorFilter>(filters);
  this.filterListeners=listeners;
  this.addComponentListener(this);
  buildDialog();
  pack();
}
Program: 79738
Project: 79738
Buggy source:
public void onClick(int row,int column){
  if (row < filters.size() && column == 5) {
    this.filters.remove(row);
    this.fireTableDataChanged();
  }
}

Fixed version (ground truth):
public void onClick(int row,int column){
  if (row != -1 && row < filters.size() && column == 5) {
synchronized (rowUUIDs) {
      this.filters.remove(rowUUIDs.get(row));
      this.fireTableRowsDeleted(row,row);
      rowUUIDs.remove(row);
      for (int i=row + 1; i <= rowUUIDs.size(); i++) {
        rowUUIDs.put(i - 1,rowUUIDs.get(i));
        rowUUIDs.remove(i);
      }
    }
  }
}
Program: 79739
Project: 79739
Buggy source:
@Override public Object getValueAt(int row,int col){
switch (col) {
case 0:
    return (filters.get(row).getName() == null ? "String_Node_Str" : filters.get(row).getName());
case 1:
  return (filters.get(row).getFilterString() == null ? "String_Node_Str" : filters.get(row).getFilterString());
case 2:
return (filters.get(row).getForegroundColor() == null ? Color.BLACK : filters.get(row).getForegroundColor());
case 3:
return (filters.get(row).getBackgroundColor() == null ? Color.WHITE : filters.get(row).getBackgroundColor());
case 4:
return filters.get(row).isEnabled();
case 5:
return removeButton;
default :
return false;
}
}

Fixed version (ground truth):
@Override public Object getValueAt(int row,int col){
switch (col) {
case 0:
    return (filters.get(rowUUIDs.get(row)).getName() == null ? "String_Node_Str" : filters.get(rowUUIDs.get(row)).getName());
case 1:
  return (filters.get(rowUUIDs.get(row)).getFilterString() == null ? "String_Node_Str" : filters.get(rowUUIDs.get(row)).getFilterString());
case 2:
return (filters.get(rowUUIDs.get(row)).getForegroundColor() == null ? Color.BLACK : filters.get(rowUUIDs.get(row)).getForegroundColor());
case 3:
return (filters.get(rowUUIDs.get(row)).getBackgroundColor() == null ? Color.WHITE : filters.get(rowUUIDs.get(row)).getBackgroundColor());
case 4:
return filters.get(rowUUIDs.get(row)).isEnabled();
case 5:
return removeButton;
default :
return false;
}
}
Program: 79740
Project: 79740
Buggy source:
ColorFilterTableModel(ArrayList<ColorFilter> filters,ArrayList<FilterListener> filterListeners){
  this.filters=filters;
  this.filterListeners=filterListeners;
}

Fixed version (ground truth):
ColorFilterTableModel(Map<UUID,ColorFilter> filters,ArrayList<FilterListener> filterListeners){
  this.filters=filters;
  this.filterListeners=filterListeners;
}
Program: 79741
Project: 79741
Buggy source:
public void addFilter(ColorFilter filter){
  filters.add(filter);
  for (  FilterListener listener : filterListeners) {
    listener.onAdd(filter);
  }
  this.fireTableDataChanged();
}

Fixed version (ground truth):
public void addFilter(ColorFilter filter){
  int i=filters.size();
  rowUUIDs.put(i,filter.getUid());
  filters.put(filter.getUid(),filter);
  this.fireTableRowsInserted(i,i);
}
Program: 79742
Project: 79742
Buggy source:
public Filter getFilterAtRow(int row){
  return filters.get(row).getFilter();
}

Fixed version (ground truth):
public Filter getFilterAtRow(int row){
  return filters.get(rowUUIDs.get(row)).getFilter();
}
Program: 79743
Project: 79743
Buggy source:
public void setValueAt(Object value,int row,int col){
switch (col) {
case 0:
    filters.get(row).setName((String)value);
  break;
case 1:
{
  ColorFilter filter=filters.get(row);
  filter.setFilterString((String)value);
  try {
    filter.setFilter(FilterCompiler.parseString((String)value));
  }
 catch (  Filter.FilterException e) {
    filter.setFilter(null);
  }
  break;
}
case 2:
filters.get(row).setForegroundColor((Color)value);
break;
case 3:
filters.get(row).setBackgroundColor((Color)value);
break;
case 4:
filters.get(row).setEnabled((Boolean)value);
break;
default :
return;
}
for (FilterListener listener : filterListeners) {
listener.onChange(filters.get(row));
}
}

Fixed version (ground truth):
public void setValueAt(Object value,int row,int col){
switch (col) {
case 0:
    filters.get(rowUUIDs.get(row)).setName((String)value);
  break;
case 1:
{
  ColorFilter filter=filters.get(rowUUIDs.get(row));
  filter.setFilterString((String)value);
  try {
    filter.setFilter(FilterCompiler.parseString((String)value));
  }
 catch (  Filter.FilterException e) {
    filter.setFilter(null);
  }
  break;
}
case 2:
filters.get(rowUUIDs.get(row)).setForegroundColor((Color)value);
break;
case 3:
filters.get(rowUUIDs.get(row)).setBackgroundColor((Color)value);
break;
case 4:
filters.get(rowUUIDs.get(row)).setEnabled((Boolean)value);
break;
default :
return;
}
}
Program: 79744
Project: 79744
Buggy source:
public boolean testColorFilter(ColorFilter colorFilter){
  if (colorFilter.getFilter().matches(this)) {
    this.setForegroundColor(colorFilter.getForegroundColor());
    this.setBackgroundColor(colorFilter.getBackgroundColor());
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean testColorFilter(ColorFilter colorFilter,boolean retest){
  if (!colorFilter.isEnabled() || colorFilter.getFilter() == null)   return false;
  if (!this.matchingColorFilters.contains(colorFilter.getUid())) {
    if (colorFilter.getFilter().matches(this)) {
      this.matchingColorFilters.add(colorFilter.getUid());
      return true;
    }
 else {
      return false;
    }
  }
 else   if (retest) {
    if (!colorFilter.getFilter().matches(this)) {
      this.matchingColorFilters.remove(colorFilter.getUid());
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 79746
Project: 79746
Buggy source:
@Override public String getColumnName(int columnIndex){
  return (String)this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getVisibleName();
}

Fixed version (ground truth):
@Override public String getColumnName(int columnIndex){
  return (String)this.getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).getVisibleName();
}
Program: 79747
Project: 79747
Buggy source:
@Override public Class<?> getColumnClass(int columnIndex){
  Class clazz;
  try {
    String columnClassType=(String)getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getType();
switch (columnClassesType.valueOf(columnClassType.toUpperCase())) {
case INT:
      clazz=Integer.class;
    break;
case SHORT:
  clazz=Short.class;
break;
case DOUBLE:
clazz=Double.class;
break;
case LONG:
clazz=Long.class;
break;
case BOOLEAN:
clazz=Boolean.class;
break;
default :
clazz=String.class;
break;
}
}
 catch (Exception e) {
clazz=String.class;
}
return clazz;
}

Fixed version (ground truth):
@Override public Class<?> getColumnClass(int columnIndex){
  Class clazz;
  try {
    String columnClassType=(String)getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).getType();
switch (columnClassesType.valueOf(columnClassType.toUpperCase())) {
case INT:
      clazz=Integer.class;
    break;
case SHORT:
  clazz=Short.class;
break;
case DOUBLE:
clazz=Double.class;
break;
case LONG:
clazz=Long.class;
break;
case BOOLEAN:
clazz=Boolean.class;
break;
default :
clazz=String.class;
break;
}
}
 catch (Exception e) {
clazz=String.class;
}
return clazz;
}
Program: 79748
Project: 79748
Buggy source:
@Override public int getColumnCount(){
  if (this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList() != null)   return this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().size();
 else   return 0;
}

Fixed version (ground truth):
@Override public int getColumnCount(){
  if (this.getTableHeaderColumnsDetails().getAllColumnsDefinitionList() != null)   return this.getTableHeaderColumnsDetails().getAllColumnsDefinitionList().size();
 else   return 0;
}
Program: 79749
Project: 79749
Buggy source:
@Override public boolean isCellEditable(int rowIndex,int columnIndex){
  if (this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).isReadonly()) {
    return false;
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
@Override public boolean isCellEditable(int rowIndex,int columnIndex){
  return !this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).isReadonly();
}
Program: 79750
Project: 79750
Buggy source:
@Override public Object getValueAt(int rowIndex,int columnIndex){
  if (entries.size() - 1 < rowIndex)   return "String_Node_Str";
  LogEntry logEntry=entries.get(rowIndex);
  String colName=getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getName();
  if (colName.equals("String_Node_Str")) {
    return rowIndex + 1;
  }
 else {
    Object tempValue=logEntry.getValueByName(colName);
    if (getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getType().equals("String_Node_Str")) {
      if (tempValue != null && !((String)tempValue.toString()).isEmpty())       return Integer.valueOf(String.valueOf(logEntry.getValueByName((String)getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getName())));
 else       return -1;
    }
 else     if (getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getType().equals("String_Node_Str")) {
      if (tempValue != null && !((String)tempValue.toString()).isEmpty())       return Short.valueOf(String.valueOf(logEntry.getValueByName((String)getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getName())));
 else       return -1;
    }
 else     return logEntry.getValueByName((String)getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).getName());
  }
}

Fixed version (ground truth):
@Override public Object getValueAt(int rowIndex,int columnIndex){
  if (rowIndex >= entries.size())   return null;
  LogEntry logEntry=entries.get(rowIndex);
  String colName=getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).getName();
  if (colName.equals("String_Node_Str")) {
    return rowIndex + 1;
  }
 else {
    Object tempValue=logEntry.getValueByName(colName);
    if (getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).getType().equals("String_Node_Str")) {
      if (tempValue != null && !((String)tempValue.toString()).isEmpty())       return Integer.valueOf(String.valueOf(logEntry.getValueByName(colName)));
 else       return -1;
    }
 else     if (getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).getType().equals("String_Node_Str")) {
      if (tempValue != null && !((String)tempValue.toString()).isEmpty())       return Short.valueOf(String.valueOf(logEntry.getValueByName(colName)));
 else       return -1;
    }
 else     return logEntry.getValueByName(colName);
  }
}
Program: 79751
Project: 79751
Buggy source:
@Override public void changeSelection(int row,int col,boolean toggle,boolean extend){
  if (this.getModel().getData().size() >= row) {
    LogEntry logEntry=this.getModel().getData().get(this.convertRowIndexToModel(row));
    requestViewer.setMessage(logEntry.requestResponse.getRequest(),true);
    if (logEntry.requestResponse.getResponse() != null)     responseViewer.setMessage(logEntry.requestResponse.getResponse(),false);
 else     responseViewer.setMessage(helpers.stringToBytes("String_Node_Str"),false);
    this.getModel().setCurrentlyDisplayedItem(logEntry.requestResponse);
    super.changeSelection(row,col,toggle,extend);
  }
}

Fixed version (ground truth):
@Override public void changeSelection(int row,int col,boolean toggle,boolean extend){
  MoreHelp.showMessage("String_Node_Str" + col + "String_Node_Str"+ this.convertColumnIndexToModel(col)+ "String_Node_Str"+ this.convertColumnIndexToView(col));
  if (this.getModel().getData().size() >= row) {
    LogEntry logEntry=this.getModel().getData().get(this.convertRowIndexToModel(row));
    requestViewer.setMessage(logEntry.requestResponse.getRequest(),true);
    if (logEntry.requestResponse.getResponse() != null)     responseViewer.setMessage(logEntry.requestResponse.getResponse(),false);
 else     responseViewer.setMessage(helpers.stringToBytes("String_Node_Str"),false);
    this.getModel().setCurrentlyDisplayedItem(logEntry.requestResponse);
    super.changeSelection(row,col,toggle,extend);
  }
}
Program: 79752
Project: 79752
Buggy source:
public void generatingTableColumns(){
  for (int i=0; i < this.getModel().getColumnCount(); i++) {
    TableColumn column=this.getColumnModel().getColumn(i);
    column.setMinWidth(50);
    column.setIdentifier(this.getModel().getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(i).getId());
    column.setPreferredWidth((int)this.getModel().getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(i).getWidth());
    if (this.getModel().getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(i).getType().equals("String_Node_Str") || this.getModel().getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(i).getType().equals("String_Node_Str") || this.getModel().getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(i).getType().equals("String_Node_Str"))     column.setCellRenderer(new LeftTableCellRenderer());
  }
}

Fixed version (ground truth):
public void generatingTableColumns(){
  for (int i=0; i < this.getModel().getColumnCount(); i++) {
    TableColumn column=this.getColumnModel().getColumn(i);
    column.setMinWidth(50);
    column.setIdentifier(this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getId());
    column.setPreferredWidth((int)this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getWidth());
    if (this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getType().equals("String_Node_Str") || this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getType().equals("String_Node_Str") || this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getType().equals("String_Node_Str"))     column.setCellRenderer(new LeftTableCellRenderer());
  }
}
Program: 79753
Project: 79753
Buggy source:
@Override public boolean isCellEditable(int rowIndex,int columnIndex){
  return !this.getTableHeaderColumnsDetails().getVisibleColumnsDefinitionList().get(columnIndex).isReadonly();
}

Fixed version (ground truth):
@Override public boolean isCellEditable(int rowIndex,int columnIndex){
  return !this.getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnIndex).isReadonly();
}
Program: 79754
Project: 79754
Buggy source:
@Override public void changeSelection(int row,int col,boolean toggle,boolean extend){
  MoreHelp.showMessage("String_Node_Str" + col + "String_Node_Str"+ this.convertColumnIndexToModel(col)+ "String_Node_Str"+ this.convertColumnIndexToView(col));
  if (this.getModel().getData().size() >= row) {
    LogEntry logEntry=this.getModel().getData().get(this.convertRowIndexToModel(row));
    requestViewer.setMessage(logEntry.requestResponse.getRequest(),true);
    if (logEntry.requestResponse.getResponse() != null)     responseViewer.setMessage(logEntry.requestResponse.getResponse(),false);
 else     responseViewer.setMessage(helpers.stringToBytes("String_Node_Str"),false);
    this.getModel().setCurrentlyDisplayedItem(logEntry.requestResponse);
    super.changeSelection(row,col,toggle,extend);
  }
}

Fixed version (ground truth):
@Override public void changeSelection(int row,int col,boolean toggle,boolean extend){
  if (this.getModel().getData().size() >= row) {
    LogEntry logEntry=this.getModel().getData().get(this.convertRowIndexToModel(row));
    requestViewer.setMessage(logEntry.requestResponse.getRequest(),true);
    if (logEntry.requestResponse.getResponse() != null)     responseViewer.setMessage(logEntry.requestResponse.getResponse(),false);
 else     responseViewer.setMessage(helpers.stringToBytes("String_Node_Str"),false);
    this.getModel().setCurrentlyDisplayedItem(logEntry.requestResponse);
    super.changeSelection(row,col,toggle,extend);
  }
}
Program: 79756
Project: 79756
Buggy source:
private void saveOrderTableChange(){
  String tempTableIDsStringByOrder="String_Node_Str";
  Enumeration<TableColumn> tblCols=this.getColumnModel().getColumns();
  for (; tblCols.hasMoreElements(); ) {
    tempTableIDsStringByOrder+=tblCols.nextElement().getIdentifier() + this.getModel().getTableHeaderColumnsDetails().getIdCanaryParam();
  }
  if (isDebug) {
    stdout.println("String_Node_Str" + tempTableIDsStringByOrder + "String_Node_Str"+ this.getModel().getTableHeaderColumnsDetails().getTableIDsStringByOrder());
  }
  if (!this.getModel().getTableHeaderColumnsDetails().getTableIDsStringByOrder().equals(tempTableIDsStringByOrder)) {
    if (isDebug) {
      stdout.println("String_Node_Str");
    }
    int counter=1;
    tblCols=this.getColumnModel().getColumns();
    for (; tblCols.hasMoreElements(); ) {
      int columnNumber=(Integer)tblCols.nextElement().getIdentifier();
      this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnNumber).setOrder(counter);
      counter++;
    }
    this.getModel().getTableHeaderColumnsDetails().setTableIDsStringByOrder(tempTableIDsStringByOrder);
    saveTableChanges();
  }
}

Fixed version (ground truth):
private void saveOrderTableChange(){
  String tempTableIDsStringByOrder="String_Node_Str";
  for (  TableColumn tblCol : Collections.list(this.getColumnModel().getColumns())) {
    tempTableIDsStringByOrder+=tblCol.getIdentifier() + this.getModel().getTableHeaderColumnsDetails().getIdCanaryParam();
  }
  if (isDebug) {
    stdout.println("String_Node_Str" + tempTableIDsStringByOrder + "String_Node_Str"+ this.getModel().getTableHeaderColumnsDetails().getTableIDsStringByOrder());
  }
  if (!this.getModel().getTableHeaderColumnsDetails().getTableIDsStringByOrder().equals(tempTableIDsStringByOrder)) {
    if (isDebug) {
      stdout.println("String_Node_Str");
    }
    int counter=1;
    for (    TableColumn tblCol : Collections.list(this.getColumnModel().getColumns())) {
      int columnNumber=(Integer)tblCol.getIdentifier();
      this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(columnNumber).setOrder(counter);
      counter++;
    }
    this.getModel().getTableHeaderColumnsDetails().setTableIDsStringByOrder(tempTableIDsStringByOrder);
    saveTableChanges();
  }
}
Program: 79757
Project: 79757
Buggy source:
public void generatingTableColumns(){
  for (int i=0; i < this.getModel().getColumnCount(); i++) {
    TableColumn column=this.getColumnModel().getColumn(i);
    column.setMinWidth(50);
    column.setIdentifier(this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getId());
    column.setPreferredWidth((int)this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getWidth());
    if (this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getType().equals("String_Node_Str") || this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getType().equals("String_Node_Str") || this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(i).getType().equals("String_Node_Str"))     column.setCellRenderer(new LeftTableCellRenderer());
  }
}

Fixed version (ground truth):
public void generatingTableColumns(){
  for (  TableColumn column : Collections.list(this.getColumnModel().getColumns())) {
    TableStructure colStructure=this.getModel().getTableHeaderColumnsDetails().getAllColumnsDefinitionList().get(column.getModelIndex());
    column.setMinWidth(50);
    column.setIdentifier(colStructure.getId());
    column.setPreferredWidth((int)colStructure.getWidth());
    if (colStructure.getType().equals("String_Node_Str") || colStructure.getType().equals("String_Node_Str") || colStructure.getType().equals("String_Node_Str"))     column.setCellRenderer(new LeftTableCellRenderer());
    if (!colStructure.isVisible())     getColumnModel().removeColumn(column);
  }
}
Program: 79758
Project: 79758
Buggy source:
@Override public boolean include(Entry<? extends Object,? extends Object> entry){
  LogTableModel tableModel=(LogTableModel)entry.getModel();
  Object lValue=this.left, rValue=this.right;
  try {
    int columnNo=tableModel.getColumnIndexByName(this.left.toString());
    lValue=entry.getValue(tableModel.getTable().convertColumnIndexToModel(columnNo));
  }
 catch (  NullPointerException nPException) {
  }
  try {
    int columnNo=tableModel.getColumnIndexByName(this.right.toString());
    rValue=entry.getValue(tableModel.getTable().convertColumnIndexToModel(columnNo));
  }
 catch (  NullPointerException nPException) {
  }
  if (this.left instanceof Pattern) {
    return ((Pattern)lValue).matcher(rValue.toString()).matches();
  }
 else   if (this.right instanceof Pattern) {
    return ((Pattern)rValue).matcher(lValue.toString()).matches();
  }
  try {
    return checkValue(lValue,this.operation,rValue);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean include(Entry<? extends Object,? extends Object> entry){
  LogTableModel tableModel=(LogTableModel)entry.getModel();
  Object lValue=this.left, rValue=this.right;
  try {
    int columnNo=tableModel.getColumnIndexByName(this.left.toString());
    lValue=entry.getValue(columnNo);
  }
 catch (  NullPointerException nPException) {
  }
  try {
    int columnNo=tableModel.getColumnIndexByName(this.right.toString());
    rValue=entry.getValue(tableModel.getTable().convertColumnIndexToModel(columnNo));
  }
 catch (  NullPointerException nPException) {
  }
  if (this.left instanceof Pattern) {
    return ((Pattern)lValue).matcher(rValue.toString()).matches();
  }
 else   if (this.right instanceof Pattern) {
    return ((Pattern)rValue).matcher(lValue.toString()).matches();
  }
  try {
    return checkValue(lValue,this.operation,rValue);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
}
Program: 79760
Project: 79760
Buggy source:
@Override public void handle(Message<Buffer> message){
  try {
    boolean isTenantSession=isTenantSession();
    boolean tenantMatch;
    if (isTenantSession) {
      boolean containsTenantHeader=message.headers().contains(TENANT_HEADER);
      if (containsTenantHeader) {
        String tenantHeaderValue=message.headers().get(TENANT_HEADER);
        tenantMatch=tenant.equals(tenantHeaderValue) || "String_Node_Str".equals(tenantHeaderValue);
      }
 else {
        tenantMatch=false;
      }
    }
 else {
      tenantMatch=true;
    }
    if (tenantMatch) {
      Buffer in=message.body();
      PublishMessage pm=(PublishMessage)decoder.dec(in);
      handlePublishMessageReceived(pm);
    }
  }
 catch (  Throwable e) {
    Container.logger().error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void handle(Message<Buffer> message){
  try {
    boolean tenantMatch=tenantMatch(message);
    if (tenantMatch) {
      Buffer in=message.body();
      PublishMessage pm=(PublishMessage)decoder.dec(in);
      handlePublishMessageReceived(pm);
    }
  }
 catch (  Throwable e) {
    Container.logger().error(e.getMessage(),e);
  }
}
Program: 79761
Project: 79761
Buggy source:
private String calculatePublishTenant(PublishMessage publishMessage){
  boolean isTenantSession=isTenantSession();
  if (isTenantSession) {
    return tenant;
  }
 else {
    String topic=publishMessage.getTopicName();
    String t;
    boolean slashFirst=topic.startsWith("String_Node_Str");
    if (slashFirst) {
      int idx=topic.indexOf('/',1);
      if (idx > 1)       t=topic.substring(1,idx);
 else       t=topic.substring(1);
    }
 else {
      int idx=topic.indexOf('/',0);
      if (idx > 0)       t=topic.substring(0,idx);
 else       t=topic;
    }
    return t;
  }
}

Fixed version (ground truth):
private String calculatePublishTenant(String topic){
  boolean isTenantSession=isTenantSession();
  if (isTenantSession) {
    return tenant;
  }
 else {
    String t;
    boolean slashFirst=topic.startsWith("String_Node_Str");
    if (slashFirst) {
      int idx=topic.indexOf('/',1);
      if (idx > 1)       t=topic.substring(1,idx);
 else       t=topic.substring(1);
    }
 else {
      int idx=topic.indexOf('/',0);
      if (idx > 0)       t=topic.substring(0,idx);
 else       t=topic;
    }
    return t;
  }
}
Program: 79762
Project: 79762
Buggy source:
public void handleSubscribeMessage(SubscribeMessage subscribeMessage){
  try {
    final int messageID=subscribeMessage.getMessageID();
    if (this.messageConsumer == null) {
      messageConsumer=vertx.eventBus().consumer(ADDRESS);
      messageConsumer.handler(this);
    }
    matchingSubscriptionsCache.clear();
    List<SubscribeMessage.Couple> subs=subscribeMessage.subscriptions();
    for (    SubscribeMessage.Couple s : subs) {
      String topicFilter=s.getTopicFilter();
      Subscription sub=new Subscription();
      sub.setQos(s.getQos());
      sub.setTopicFilter(topicFilter);
      this.subscriptions.put(topicFilter,sub);
      if (retainSupport) {
        storeManager.getRetainedMessagesByTopicFilter(tenant,topicFilter,(        List<PublishMessage> retainedMessages) -> {
          if (retainedMessages != null) {
            int incrMessageID=messageID;
            for (            PublishMessage retainedMessage : retainedMessages) {
switch (retainedMessage.getQos()) {
case LEAST_ONE:
case EXACTLY_ONCE:
                retainedMessage.setMessageID(++incrMessageID);
            }
            retainedMessage.setRetainFlag(true);
            handlePublishMessageReceived(retainedMessage);
          }
        }
      }
);
    }
  }
}
 catch (Throwable e) {
  Container.logger().error(e.getMessage());
}
}

Fixed version (ground truth):
public void handleSubscribeMessage(SubscribeMessage subscribeMessage){
  try {
    final int messageID=subscribeMessage.getMessageID();
    if (this.messageConsumer == null) {
      messageConsumer=vertx.eventBus().consumer(ADDRESS);
      messageConsumer.handler(this);
    }
    matchingSubscriptionsCache.clear();
    List<SubscribeMessage.Couple> subs=subscribeMessage.subscriptions();
    for (    SubscribeMessage.Couple s : subs) {
      String topicFilter=s.getTopicFilter();
      Subscription sub=new Subscription();
      sub.setQos(s.getQos());
      sub.setTopicFilter(topicFilter);
      this.subscriptions.put(topicFilter,sub);
      String publishTenant=calculatePublishTenant(topicFilter);
      if (retainSupport) {
        storeManager.getRetainedMessagesByTopicFilter(publishTenant,topicFilter,(        List<PublishMessage> retainedMessages) -> {
          if (retainedMessages != null) {
            int incrMessageID=messageID;
            for (            PublishMessage retainedMessage : retainedMessages) {
switch (retainedMessage.getQos()) {
case LEAST_ONE:
case EXACTLY_ONCE:
                retainedMessage.setMessageID(++incrMessageID);
            }
            retainedMessage.setRetainFlag(true);
            handlePublishMessageReceived(retainedMessage);
          }
        }
      }
);
    }
  }
}
 catch (Throwable e) {
  Container.logger().error(e.getMessage());
}
}
Program: 79763
Project: 79763
Buggy source:
public void shutdown(){
  if (messageConsumer != null && cleanSession) {
    messageConsumer.unregister();
    messageConsumer=null;
  }
  vertx=null;
}

Fixed version (ground truth):
public void shutdown(){
  if (messageConsumer != null && cleanSession) {
    messageConsumer.unregister();
    messageConsumer=null;
  }
  stopKeepAliveTimer();
  vertx=null;
}
Program: 79764
Project: 79764
Buggy source:
public StoreManager(Vertx vertx,String tenant,ITopicsManager topicsManager){
  this.vertx=vertx;
  this.tenant=tenant;
  this.topicsManager=topicsManager;
  this.encoder=new MQTTEncoder();
  this.decoder=new MQTTDecoder();
}

Fixed version (ground truth):
public StoreManager(Vertx vertx,String tenant,ITopicsManager topicsManager){
  this.vertx=vertx;
  this.encoder=new MQTTEncoder();
  this.decoder=new MQTTDecoder();
}
Program: 79765
Project: 79765
Buggy source:
private JsonObject saveRetainMessage(JsonObject request){
  String topic=request.getString("String_Node_Str");
  byte[] message=request.getBinary("String_Node_Str");
  String tenant=request.getString("String_Node_Str");
  if (tenant != null)   topic=tenant + topic;
  db.put(topic,message);
  JsonObject response=new JsonObject();
  response.put("String_Node_Str",topic).put("String_Node_Str",message);
  return response;
}

Fixed version (ground truth):
private JsonObject saveRetainMessage(JsonObject request){
  String topic=request.getString("String_Node_Str");
  String tenant=request.getString("String_Node_Str");
  byte[] message=request.getBinary("String_Node_Str");
  Map<String,byte[]> db=db(tenant);
  db.put(topic,message);
  JsonObject response=new JsonObject();
  response.put("String_Node_Str",topic).put("String_Node_Str",message);
  return response;
}
Program: 79766
Project: 79766
Buggy source:
private JsonObject getRetainedMessagesByTopicFilter(JsonObject request){
  String topicFilter=request.getString("String_Node_Str");
  String tenant=request.getString("String_Node_Str");
  if (tenant != null) {
    topicFilter=tenant + topicFilter;
  }
  List<JsonObject> list=new ArrayList<>();
  for (  String topic : db.keySet()) {
    boolean topicMatch=topicsManager.match(topic,topicFilter);
    if (topicMatch) {
      byte[] message=db.get(topic);
      JsonObject item=new JsonObject().put("String_Node_Str",topic).put("String_Node_Str",message);
      list.add(item);
    }
  }
  JsonObject response=new JsonObject();
  response.put("String_Node_Str",new JsonArray(list));
  return response;
}

Fixed version (ground truth):
private JsonObject getRetainedMessagesByTopicFilter(JsonObject request){
  String topicFilter=request.getString("String_Node_Str");
  String tenant=request.getString("String_Node_Str");
  List<JsonObject> list=new ArrayList<>();
  Map<String,byte[]> db=db(tenant);
  for (  String topic : db.keySet()) {
    boolean topicMatch=topicsManager.match(topic,topicFilter);
    if (topicMatch) {
      byte[] message=db.get(topic);
      JsonObject item=new JsonObject().put("String_Node_Str",topic).put("String_Node_Str",message);
      list.add(item);
    }
  }
  JsonObject response=new JsonObject();
  response.put("String_Node_Str",new JsonArray(list));
  return response;
}
Program: 79767
Project: 79767
Buggy source:
private JsonObject deleteRetainMessage(JsonObject request){
  String topic=request.getString("String_Node_Str");
  String tenant=request.getString("String_Node_Str");
  if (tenant != null)   topic=tenant + topic;
  db.remove(topic);
  JsonObject response=new JsonObject();
  response.put("String_Node_Str",true);
  return response;
}

Fixed version (ground truth):
private JsonObject deleteRetainMessage(JsonObject request){
  String topic=request.getString("String_Node_Str");
  String tenant=request.getString("String_Node_Str");
  Map<String,byte[]> db=db(tenant);
  db.remove(topic);
  JsonObject response=new JsonObject();
  response.put("String_Node_Str",true);
  return response;
}
Program: 79768
Project: 79768
Buggy source:
@Override protected void encode(PingRespMessage msg,ByteBuf out){
  out.writeByte(AbstractMessage.PINGRESP << 4).writeByte(0);
}

Fixed version (ground truth):
@Override protected void encode(PingRespMessage msg,ByteBuf out){
  byte flags=Utils.encodeFlags(msg);
  out.writeByte(AbstractMessage.PINGRESP << 4 | flags).writeByte(0);
}
Program: 79769
Project: 79769
Buggy source:
@Override protected void encode(PubCompMessage msg,ByteBuf out){
  out.writeByte(AbstractMessage.PUBCOMP << 4);
  out.writeBytes(Utils.encodeRemainingLength(2));
  out.writeShort(msg.getMessageID());
}

Fixed version (ground truth):
@Override protected void encode(PubCompMessage msg,ByteBuf out){
  byte flags=Utils.encodeFlags(msg);
  out.writeByte(AbstractMessage.PUBCOMP << 4 | flags);
  out.writeBytes(Utils.encodeRemainingLength(2));
  out.writeShort(msg.getMessageID());
}
Program: 79770
Project: 79770
Buggy source:
@Override protected void encode(PubRecMessage msg,ByteBuf out){
  out.writeByte(AbstractMessage.PUBREC << 4);
  out.writeBytes(Utils.encodeRemainingLength(2));
  out.writeShort(msg.getMessageID());
}

Fixed version (ground truth):
@Override protected void encode(PubRecMessage msg,ByteBuf out){
  byte flags=Utils.encodeFlags(msg);
  out.writeByte(AbstractMessage.PUBREC << 4 | flags);
  out.writeBytes(Utils.encodeRemainingLength(2));
  out.writeShort(msg.getMessageID());
}
Program: 79771
Project: 79771
Buggy source:
@Override protected void encode(PubRelMessage msg,ByteBuf out){
  out.writeByte(AbstractMessage.PUBREL << 4);
  out.writeBytes(Utils.encodeRemainingLength(2));
  out.writeShort(msg.getMessageID());
}

Fixed version (ground truth):
@Override protected void encode(PubRelMessage msg,ByteBuf out){
  byte flags=Utils.encodeFlags(msg);
  out.writeByte(AbstractMessage.PUBREL << 4 | flags);
  out.writeBytes(Utils.encodeRemainingLength(2));
  out.writeShort(msg.getMessageID());
}
Program: 79772
Project: 79772
Buggy source:
static byte encodeFlags(AbstractMessage message){
  byte flags=0;
  if (message.isDupFlag()) {
    flags|=0x08;
  }
  if (message.isRetainFlag()) {
    flags|=0x01;
  }
  flags|=((message.getQos().ordinal() & 0x03) << 1);
  return flags;
}

Fixed version (ground truth):
static byte encodeFlags(AbstractMessage message){
  byte flags=0;
  if (message.isDupFlag()) {
    flags|=0x08;
  }
  if (message.isRetainFlag()) {
    flags|=0x01;
  }
  AbstractMessage.QOSType qos=message.getQos();
  if (qos != null) {
    int qosOrdinal=qos.ordinal();
    flags|=((qosOrdinal & 0x03) << 1);
  }
  return flags;
}
Program: 79773
Project: 79773
Buggy source:
protected void handleConnectMessage(ConnectMessage connectMessage) throws Exception {
  ConnectMessage connect=connectMessage;
  clientID=connect.getClientID();
  cleanSession=connect.isCleanSession();
  tenant=getTenant(connectMessage);
  topicsManager=new MQTTTopicsManager(vertx,tenant);
  store=new MQTTStoreManager(vertx,tenant);
  boolean clientIDExists=clientIDExists(clientID);
  container.logger().info("String_Node_Str" + clientID);
  if (clientIDExists) {
    container.logger().info("String_Node_Str" + clientID + "String_Node_Str");
  }
 else {
    addClientID(clientID);
  }
  republishPendingMessages();
  if (connect.isWillFlag()) {
    String willMsg=connect.getWillMessage();
    byte willQos=connect.getWillQos();
    String willTopic=connect.getWillTopic();
    storeWillMessage(willMsg,willQos,willTopic);
  }
}

Fixed version (ground truth):
protected void handleConnectMessage(ConnectMessage connectMessage) throws Exception {
  ConnectMessage connect=connectMessage;
  clientID=connect.getClientID();
  cleanSession=connect.isCleanSession();
  tenant=getTenant(connectMessage);
  topicsManager=new MQTTTopicsManager(vertx,tenant);
  store=new MQTTStoreManager(vertx,tenant);
  boolean clientIDExists=clientIDExists(clientID);
  container.logger().info("String_Node_Str" + clientID);
  if (clientIDExists) {
    container.logger().info("String_Node_Str" + clientID + "String_Node_Str");
  }
 else {
    addClientID(clientID);
  }
  if (connect.isWillFlag()) {
    String willMsg=connect.getWillMessage();
    byte willQos=connect.getWillQos();
    String willTopic=connect.getWillTopic();
    storeWillMessage(willMsg,willQos,willTopic);
  }
}