nus-yam/ex-repair huggingface dataset:
Program: 189988
Project: 189988
Buggy source:
private void enableTableControls(){
  nodesButton.setEnabled(true);
  edgesButton.setEnabled(true);
  configurationButton.setEnabled(true);
  availableColumnsButton.setEnabled(true);
  filterTextField.setEnabled(true);
  columnComboBox.setEnabled(true);
  labelFilter.setEnabled(true);
}

Fixed version (ground truth):
private void enableTableControls(){
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      nodesButton.setEnabled(true);
      edgesButton.setEnabled(true);
      configurationButton.setEnabled(true);
      availableColumnsButton.setEnabled(true);
      filterTextField.setEnabled(true);
      columnComboBox.setEnabled(true);
      labelFilter.setEnabled(true);
    }
  }
);
}
Program: 189989
Project: 189989
Buggy source:
public void refreshModel(HierarchicalGraph graph,AttributeColumn[] cols,final DataTablesModel dataTablesModel){
  showingColumns=cols;
  DynamicModel dm=Lookup.getDefault().lookup(DynamicController.class).getModel();
  if (dm != null) {
    timeIntervalsRenderer.setMinMax(dm.getMin(),dm.getMax());
    currentTimeFormat=dm.getTimeFormat();
    timeIntervalsRenderer.setTimeFormat(currentTimeFormat);
    sparkLinesRenderer.setTimeFormat(currentTimeFormat);
  }
  timeIntervalsRenderer.setDrawGraphics(timeIntervalGraphics);
  refreshingTable=true;
  if (selectedNodes == null) {
    selectedNodes=getNodesFromSelectedRows();
  }
  NodeTreeModel nodeTreeModel=new NodeTreeModel(graph.wrapToTreeNode());
  final OutlineModel mdl=DefaultOutlineModel.createOutlineModel(nodeTreeModel,new NodeRowModel(cols),true);
  outlineTable.setRootVisible(false);
  outlineTable.setRenderDataProvider(new NodeRenderer());
  try {
    SwingUtilities.invokeAndWait(new Runnable(){
      public void run(){
        outlineTable.setModel(mdl);
        NodeDataTable.this.dataTablesModel=dataTablesModel;
        setNodesSelection(selectedNodes);
        selectedNodes=null;
      }
    }
);
  }
 catch (  InterruptedException ex) {
    Exceptions.printStackTrace(ex);
  }
catch (  InvocationTargetException ex) {
    Exceptions.printStackTrace(ex);
  }
  refreshingTable=false;
}

Fixed version (ground truth):
public void refreshModel(HierarchicalGraph graph,AttributeColumn[] cols,final DataTablesModel dataTablesModel){
  showingColumns=cols;
  DynamicModel dm=Lookup.getDefault().lookup(DynamicController.class).getModel();
  if (dm != null) {
    timeIntervalsRenderer.setMinMax(dm.getMin(),dm.getMax());
    currentTimeFormat=dm.getTimeFormat();
    timeIntervalsRenderer.setTimeFormat(currentTimeFormat);
    sparkLinesRenderer.setTimeFormat(currentTimeFormat);
  }
  timeIntervalsRenderer.setDrawGraphics(timeIntervalGraphics);
  refreshingTable=true;
  if (selectedNodes == null) {
    selectedNodes=getNodesFromSelectedRows();
  }
  NodeTreeModel nodeTreeModel=new NodeTreeModel(graph.wrapToTreeNode());
  final OutlineModel mdl=DefaultOutlineModel.createOutlineModel(nodeTreeModel,new NodeRowModel(cols),true);
  outlineTable.setRootVisible(false);
  outlineTable.setRenderDataProvider(new NodeRenderer());
  outlineTable.setModel(mdl);
  NodeDataTable.this.dataTablesModel=dataTablesModel;
  setNodesSelection(selectedNodes);
  selectedNodes=null;
  refreshingTable=false;
}
Program: 189991
Project: 189991
Buggy source:
public void execute(HierarchicalGraph graph,AttributeModel attributeModel){
  isCanceled=false;
  triangles(graph,attributeModel);
}

Fixed version (ground truth):
private void execute(HierarchicalGraph hgraph,AttributeModel attributeModel){
  isCanceled=false;
  triangles(hgraph,attributeModel);
}
Program: 189992
Project: 189992
Buggy source:
/** 
 * @param v - The specific node to count the triangles on.
 */
public void newVertex(int v){
  int[] A=new int[N];
  for (int i=network[v].length() - 1; (i >= 0) && (network[v].get(i) > v); i--) {
    int neighbor=network[v].get(i);
    A[neighbor]=network[v].getCount(i);
  }
  for (int i=network[v].length() - 1; i >= 0; i--) {
    int neighbor=network[v].get(i);
    for (int j=closest_in_array(neighbor); j >= 0; j--) {
      int next=network[neighbor].get(j);
      if (A[next] > 0) {
        triangles[next]+=network[v].getCount(i);
        triangles[v]+=network[v].getCount(i);
        triangles[neighbor]+=A[next];
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param v - The specific node to count the triangles on.
 */
private void newVertex(int v){
  int[] A=new int[N];
  for (int i=network[v].length() - 1; (i >= 0) && (network[v].get(i) > v); i--) {
    int neighbor=network[v].get(i);
    A[neighbor]=network[v].getCount(i);
  }
  for (int i=network[v].length() - 1; i >= 0; i--) {
    int neighbor=network[v].get(i);
    for (int j=closest_in_array(neighbor); j >= 0; j--) {
      int next=network[neighbor].get(j);
      if (A[next] > 0) {
        triangles[next]+=network[v].getCount(i);
        triangles[v]+=network[v].getCount(i);
        triangles[neighbor]+=A[next];
      }
    }
  }
}
Program: 189993
Project: 189993
Buggy source:
/** 
 * @param u
 * @param v
 */
public void tr_link_nohigh(int u,int v,int count){
  int iu=0, iv=0, w;
  while ((iu < network[u].length()) && (iv < network[v].length())) {
    if (network[u].get(iu) < network[v].get(iv)) {
      iu++;
    }
 else     if (network[u].get(iu) > network[v].get(iv)) {
      iv++;
    }
 else {
      w=network[u].get(iu);
      if (w >= K) {
        triangles[w]+=count;
      }
      iu++;
      iv++;
    }
  }
}

Fixed version (ground truth):
private void tr_link_nohigh(int u,int v,int count){
  int iu=0, iv=0, w;
  while ((iu < network[u].length()) && (iv < network[v].length())) {
    if (network[u].get(iu) < network[v].get(iv)) {
      iu++;
    }
 else     if (network[u].get(iu) > network[v].get(iv)) {
      iv++;
    }
 else {
      w=network[u].get(iu);
      if (w >= K) {
        triangles[w]+=count;
      }
      iu++;
      iv++;
    }
  }
}
Program: 189995
Project: 189995
Buggy source:
/** 
 * @param v
 * @return
 */
public int closest_in_array(int v){
  int right=network[v].length() - 1;
  if (right < 0) {
    return (-1);
  }
  if (network[v].get(0) >= v) {
    return (-1);
  }
  if (network[v].get(right) < v) {
    return (right);
  }
  if (network[v].get(right) == v) {
    return (right - 1);
  }
  int left=0, mid;
  while (right > left) {
    mid=(left + right) / 2;
    if (v < network[v].get(mid)) {
      right=mid - 1;
    }
 else     if (v > network[v].get(mid)) {
      left=mid + 1;
    }
 else {
      return (mid - 1);
    }
  }
  if (v > network[v].get(right)) {
    return (right);
  }
 else {
    return right - 1;
  }
}

Fixed version (ground truth):
private int closest_in_array(int v){
  int right=network[v].length() - 1;
  if (right < 0) {
    return (-1);
  }
  if (network[v].get(0) >= v) {
    return (-1);
  }
  if (network[v].get(right) < v) {
    return (right);
  }
  if (network[v].get(right) == v) {
    return (right - 1);
  }
  int left=0, mid;
  while (right > left) {
    mid=(left + right) / 2;
    if (v < network[v].get(mid)) {
      right=mid - 1;
    }
 else     if (v > network[v].get(mid)) {
      left=mid + 1;
    }
 else {
      return (mid - 1);
    }
  }
  if (v > network[v].get(right)) {
    return (right);
  }
 else {
    return right - 1;
  }
}
Program: 189997
Project: 189997
Buggy source:
/** 
 * @param col
 * @param S
 * @param graph
 * @param f
 * @param index
 * @param low_index
 * @param indicies
 */
private void tarjans(AttributeColumn col,LinkedList<Node> S,HierarchicalDirectedGraph graph,Node f,int[] index,int[] low_index,HashMap<Node,Integer> indicies){
  int id=indicies.get(f);
  index[id]=count;
  low_index[id]=count;
  count++;
  S.addFirst(f);
  EdgeIterable edgeIter=graph.getOutEdges(f);
  for (  Edge e : edgeIter) {
    Node u=graph.getOpposite(f,e);
    int x=indicies.get(u);
    if (index[x] == 0) {
      tarjans(col,S,graph,u,index,low_index,indicies);
      low_index[id]=Math.min(low_index[x],low_index[id]);
    }
 else     if (S.contains(u)) {
      low_index[id]=Math.min(low_index[id],index[x]);
    }
  }
  if (low_index[id] == index[id]) {
    Node v=null;
    while (v != f) {
      v=S.removeFirst();
      AttributeRow row=(AttributeRow)v.getNodeData().getAttributes();
      row.setValue(col,stronglyCount);
    }
    stronglyCount++;
  }
}

Fixed version (ground truth):
private void tarjans(AttributeColumn col,LinkedList<Node> S,HierarchicalDirectedGraph hgraph,Node f,int[] index,int[] low_index,HashMap<Node,Integer> indicies){
  int id=indicies.get(f);
  index[id]=count;
  low_index[id]=count;
  count++;
  S.addFirst(f);
  EdgeIterable edgeIter=hgraph.getOutEdgesAndMetaOutEdges(f);
  for (  Edge e : edgeIter) {
    Node u=hgraph.getOpposite(f,e);
    int x=indicies.get(u);
    if (index[x] == 0) {
      tarjans(col,S,hgraph,u,index,low_index,indicies);
      low_index[id]=Math.min(low_index[x],low_index[id]);
    }
 else     if (S.contains(u)) {
      low_index[id]=Math.min(low_index[id],index[x]);
    }
  }
  if (low_index[id] == index[id]) {
    Node v=null;
    while (v != f) {
      v=S.removeFirst();
      AttributeRow row=(AttributeRow)v.getNodeData().getAttributes();
      row.setValue(col,stronglyCount);
    }
    stronglyCount++;
  }
}
Program: 189998
Project: 189998
Buggy source:
public void top_tarjans(HierarchicalDirectedGraph graph,AttributeModel attributeModel){
  count=1;
  stronglyCount=0;
  AttributeTable nodeTable=attributeModel.getNodeTable();
  AttributeColumn componentCol=nodeTable.getColumn(STRONG);
  if (componentCol == null) {
    componentCol=nodeTable.addColumn(STRONG,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,new Integer(0));
  }
  graph.readLock();
  HashMap<Node,Integer> indicies=new HashMap<Node,Integer>();
  int v=0;
  for (  Node s : graph.getNodes()) {
    indicies.put(s,v);
    v++;
  }
  int N=graph.getNodeCount();
  int[] index=new int[N];
  int[] low_index=new int[N];
  while (true) {
    LinkedList<Node> S=new LinkedList<Node>();
    Node first=null;
    NodeIterable iter=graph.getNodes();
    for (    Node u : iter) {
      if (index[indicies.get(u)] == 0) {
        first=u;
        iter.doBreak();
        break;
      }
    }
    if (first == null) {
      graph.readUnlockAll();
      return;
    }
    tarjans(componentCol,S,graph,first,index,low_index,indicies);
  }
}

Fixed version (ground truth):
private void top_tarjans(HierarchicalDirectedGraph hgraph,AttributeModel attributeModel){
  count=1;
  stronglyCount=0;
  AttributeTable nodeTable=attributeModel.getNodeTable();
  AttributeColumn componentCol=nodeTable.getColumn(STRONG);
  if (componentCol == null) {
    componentCol=nodeTable.addColumn(STRONG,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,new Integer(0));
  }
  hgraph.readLock();
  HashMap<Node,Integer> indicies=new HashMap<Node,Integer>();
  int v=0;
  for (  Node s : hgraph.getNodes()) {
    indicies.put(s,v);
    v++;
  }
  int N=hgraph.getNodeCount();
  int[] index=new int[N];
  int[] low_index=new int[N];
  while (true) {
    LinkedList<Node> S=new LinkedList<Node>();
    Node first=null;
    NodeIterable iter=hgraph.getNodes();
    for (    Node u : iter) {
      if (index[indicies.get(u)] == 0) {
        first=u;
        iter.doBreak();
        break;
      }
    }
    if (first == null) {
      hgraph.readUnlockAll();
      return;
    }
    tarjans(componentCol,S,hgraph,first,index,low_index,indicies);
  }
}
Program: 190000
Project: 190000
Buggy source:
private boolean addEdgeAttributes(EdgeDraft edge,String prefix,ArrayList list){
  boolean ret=true;
  for (int i=0; i < list.size(); i+=2) {
    String key=(String)list.get(i);
    Object value=list.get(i + 1);
    if ("String_Node_Str".equals(key) || "String_Node_Str".equals(key) || "String_Node_Str".equals(key)|| "String_Node_Str".equals(key)) {
      continue;
    }
    if (value instanceof ArrayList) {
      ret=addEdgeAttributes(edge,prefix + "String_Node_Str" + key,(ArrayList)value);
      if (!ret) {
        break;
      }
    }
 else     if ("String_Node_Str".equals(key)) {
      if (value instanceof Double) {
        EdgeDraft.EdgeType type=((Double)value) == 1 ? EdgeDraft.EdgeType.DIRECTED : EdgeDraft.EdgeType.UNDIRECTED;
        edge.setType(type);
      }
 else {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class,"String_Node_Str",edge.toString()),Issue.Level.WARNING));
      }
    }
 else {
      AttributeTable edgeClass=container.getAttributeModel().getEdgeTable();
      AttributeColumn column=null;
      if ((column=edgeClass.getColumn(key)) == null) {
        column=edgeClass.addColumn(key,AttributeType.STRING);
        report.log("String_Node_Str" + column.getTitle() + "String_Node_Str"+ column.getType()+ "String_Node_Str");
      }
      edge.addAttributeValue(column,value.toString());
    }
  }
  return ret;
}

Fixed version (ground truth):
private boolean addEdgeAttributes(EdgeDraft edge,String prefix,ArrayList list){
  boolean ret=true;
  for (int i=0; i < list.size(); i+=2) {
    String key=(String)list.get(i);
    Object value=list.get(i + 1);
    if ("String_Node_Str".equals(key) || "String_Node_Str".equals(key) || "String_Node_Str".equals(key)|| "String_Node_Str".equals(key)|| "String_Node_Str".equals(key)) {
      continue;
    }
    if (value instanceof ArrayList) {
      ret=addEdgeAttributes(edge,prefix + "String_Node_Str" + key,(ArrayList)value);
      if (!ret) {
        break;
      }
    }
 else     if ("String_Node_Str".equals(key)) {
      if (value instanceof Double) {
        EdgeDraft.EdgeType type=((Double)value) == 1 ? EdgeDraft.EdgeType.DIRECTED : EdgeDraft.EdgeType.UNDIRECTED;
        edge.setType(type);
      }
 else {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class,"String_Node_Str",edge.toString()),Issue.Level.WARNING));
      }
    }
 else {
      AttributeTable edgeClass=container.getAttributeModel().getEdgeTable();
      AttributeColumn column=null;
      if ((column=edgeClass.getColumn(key)) == null) {
        column=edgeClass.addColumn(key,AttributeType.STRING);
        report.log("String_Node_Str" + column.getTitle() + "String_Node_Str"+ column.getType()+ "String_Node_Str");
      }
      edge.addAttributeValue(column,value.toString());
    }
  }
  return ret;
}
Program: 190001
Project: 190001
Buggy source:
private boolean parseEdge(ArrayList list){
  EdgeDraft edgeDraft=container.factory().newEdgeDraft();
  for (int i=0; i < list.size(); i+=2) {
    String key=(String)list.get(i);
    Object value=list.get(i + 1);
    if ("String_Node_Str".equals(key)) {
      NodeDraft source=container.getNode(value.toString());
      edgeDraft.setSource(source);
    }
 else     if ("String_Node_Str".equals(key)) {
      NodeDraft target=container.getNode(value.toString());
      edgeDraft.setTarget(target);
    }
 else     if ("String_Node_Str".equals(key)) {
      if (value instanceof Double) {
        edgeDraft.setWeight(((Double)value).floatValue());
      }
    }
 else     if ("String_Node_Str".equals(key)) {
      edgeDraft.setLabel(value.toString());
    }
  }
  boolean ret=addEdgeAttributes(edgeDraft,"String_Node_Str",list);
  container.addEdge(edgeDraft);
  return ret;
}

Fixed version (ground truth):
private boolean parseEdge(ArrayList list){
  EdgeDraft edgeDraft=container.factory().newEdgeDraft();
  for (int i=0; i < list.size(); i+=2) {
    String key=(String)list.get(i);
    Object value=list.get(i + 1);
    if ("String_Node_Str".equals(key)) {
      NodeDraft source=container.getNode(value.toString());
      edgeDraft.setSource(source);
    }
 else     if ("String_Node_Str".equals(key)) {
      NodeDraft target=container.getNode(value.toString());
      edgeDraft.setTarget(target);
    }
 else     if ("String_Node_Str".equals(key) || "String_Node_Str".equals(key)) {
      if (value instanceof Double) {
        edgeDraft.setWeight(((Double)value).floatValue());
      }
    }
 else     if ("String_Node_Str".equals(key)) {
      edgeDraft.setLabel(value.toString());
    }
  }
  boolean ret=addEdgeAttributes(edgeDraft,"String_Node_Str",list);
  container.addEdge(edgeDraft);
  return ret;
}
Program: 190004
Project: 190004
Buggy source:
private boolean isEdgeDefaultColumn(String id){
  for (  EdgeColumnsGDF c : defaultEdgeColumnsGDFs) {
    if (c.title.equals(id.toLowerCase())) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isEdgeDefaultColumn(String id){
  for (  EdgeColumnsGDF c : defaultEdgeColumnsGDFs) {
    if (c.title.equalsIgnoreCase(id)) {
      return true;
    }
  }
  return false;
}
Program: 190005
Project: 190005
Buggy source:
private boolean isNodeDefaultColumn(String id){
  for (  NodeColumnsGDF c : defaultNodeColumnsGDFs) {
    if (c.title.equals(id.toLowerCase())) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isNodeDefaultColumn(String id){
  for (  NodeColumnsGDF c : defaultNodeColumnsGDFs) {
    if (c.title.equalsIgnoreCase(id)) {
      return true;
    }
  }
  return false;
}
Program: 190006
Project: 190006
Buggy source:
public WorkspaceInformationImpl(Project project,String name){
  this.project=project;
  this.name=name;
}

Fixed version (ground truth):
public WorkspaceInformationImpl(Project project,String name){
  this.project=project;
  this.name=name;
  ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  if (pc.getCurrentWorkspace() == null) {
    count=0;
  }
  count++;
}
Program: 190007
Project: 190007
Buggy source:
public SearchOptions(Edge[] edgesToSearch,Pattern regexPattern,boolean onlyMatchWholeAttributeValue){
  this.edgesToSearch=edgesToSearch;
  this.regexPattern=regexPattern;
  this.onlyMatchWholeAttributeValue=onlyMatchWholeAttributeValue;
  searchNodes=false;
}

Fixed version (ground truth):
/** 
 * Setup options to search on edges with the given pattern. If edgesToSearch is null, all edges of the graph will be used.
 * @param edgesToSearch
 * @param regexPattern
 * @param onlyMatchWholeAttributeValue
 */
public SearchOptions(Edge[] edgesToSearch,Pattern regexPattern,boolean onlyMatchWholeAttributeValue){
  this.edgesToSearch=edgesToSearch;
  this.regexPattern=regexPattern;
  this.onlyMatchWholeAttributeValue=onlyMatchWholeAttributeValue;
  searchNodes=false;
}
Program: 190008
Project: 190008
Buggy source:
private SearchResult findOnNodes(SearchOptions searchOptions,int rowIndex,int columnIndex){
  GraphElementsController gec=Lookup.getDefault().lookup(GraphElementsController.class);
  SearchResult result=null;
  Node[] nodes=searchOptions.getNodesToSearch();
  AttributeRow row;
  Object value;
  for (; rowIndex < nodes.length; rowIndex++) {
    if (!gec.isNodeInGraph(nodes[rowIndex])) {
      continue;
    }
    row=(AttributeRow)nodes[rowIndex].getNodeData().getAttributes();
    for (; columnIndex < row.countValues(); columnIndex++) {
      value=row.getValue(columnIndex);
      result=matchRegex(value,searchOptions,rowIndex,columnIndex);
      if (result != null) {
        result.setFoundNode(nodes[rowIndex]);
        return result;
      }
      searchOptions.setRegionStart(0);
    }
    columnIndex=0;
  }
  return result;
}

Fixed version (ground truth):
private SearchResult findOnNodes(SearchOptions searchOptions,int rowIndex,int columnIndex){
  GraphElementsController gec=Lookup.getDefault().lookup(GraphElementsController.class);
  SearchResult result=null;
  Set<Integer> columnsToSearch=searchOptions.getColumnsToSearch();
  boolean searchAllColumns=columnsToSearch.isEmpty();
  Node[] nodes=searchOptions.getNodesToSearch();
  AttributeRow row;
  Object value;
  for (; rowIndex < nodes.length; rowIndex++) {
    if (!gec.isNodeInGraph(nodes[rowIndex])) {
      continue;
    }
    row=(AttributeRow)nodes[rowIndex].getNodeData().getAttributes();
    for (; columnIndex < row.countValues(); columnIndex++) {
      if (searchAllColumns || columnsToSearch.contains(columnIndex)) {
        value=row.getValue(columnIndex);
        result=matchRegex(value,searchOptions,rowIndex,columnIndex);
        if (result != null) {
          result.setFoundNode(nodes[rowIndex]);
          return result;
        }
      }
      searchOptions.setRegionStart(0);
    }
    searchOptions.setRegionStart(0);
    columnIndex=0;
  }
  return result;
}
Program: 190009
Project: 190009
Buggy source:
private SearchResult findOnEdges(SearchOptions searchOptions,int rowIndex,int columnIndex){
  GraphElementsController gec=Lookup.getDefault().lookup(GraphElementsController.class);
  SearchResult result=null;
  Edge[] edges=searchOptions.getEdgesToSearch();
  AttributeRow row;
  Object value;
  for (; rowIndex < edges.length; rowIndex++) {
    if (!gec.isEdgeInGraph(edges[rowIndex])) {
      continue;
    }
    row=(AttributeRow)edges[rowIndex].getEdgeData().getAttributes();
    for (; columnIndex < row.countValues(); columnIndex++) {
      value=row.getValue(columnIndex);
      result=matchRegex(value,searchOptions,rowIndex,columnIndex);
      if (result != null) {
        result.setFoundEdge(edges[rowIndex]);
        return result;
      }
      searchOptions.setRegionStart(0);
    }
    columnIndex=0;
  }
  return result;
}

Fixed version (ground truth):
private SearchResult findOnEdges(SearchOptions searchOptions,int rowIndex,int columnIndex){
  GraphElementsController gec=Lookup.getDefault().lookup(GraphElementsController.class);
  SearchResult result=null;
  Set<Integer> columnsToSearch=searchOptions.getColumnsToSearch();
  boolean searchAllColumns=columnsToSearch.isEmpty();
  Edge[] edges=searchOptions.getEdgesToSearch();
  AttributeRow row;
  Object value;
  for (; rowIndex < edges.length; rowIndex++) {
    if (!gec.isEdgeInGraph(edges[rowIndex])) {
      continue;
    }
    row=(AttributeRow)edges[rowIndex].getEdgeData().getAttributes();
    for (; columnIndex < row.countValues(); columnIndex++) {
      if (searchAllColumns || columnsToSearch.contains(columnIndex)) {
        value=row.getValue(columnIndex);
        result=matchRegex(value,searchOptions,rowIndex,columnIndex);
        if (result != null) {
          result.setFoundEdge(edges[rowIndex]);
          return result;
        }
      }
      searchOptions.setRegionStart(0);
    }
    searchOptions.setRegionStart(0);
    columnIndex=0;
  }
  return result;
}
Program: 190010
Project: 190010
Buggy source:
/** 
 * <p>Adds a new column to the specified table with the given title and type of column.</p> <p>The title for the new column can't be repeated in the table, null or an empty string.</p>. <p>The id of the column will be set to the title.</p> <p>The <code>AttributeOrigin</code> of the column will be set to <code>DATA</code>.</p> <p>Default column value will be set to null.</p>
 * @param table Table to add the column
 * @param title Title for the new column, can't be repeated in the table, null or empty string
 * @param type Type for the new column
 * @return The created column or null if title is not correct
 */
AttributeColumn addAttributeColumn(AttributeTable table,String title,AttributeType type);

Fixed version (ground truth):
/** 
 * <p>Adds a new column to the specified table with the given title and type of column.</p> <p>The title for the new column can't be repeated in the table, null or an empty string.</p>. <p>The id of the column will be set to the title.</p> <p>The <code>AttributeOrigin</code> of the column will be set to <code>DATA</code>.</p> <p>Default column value will be set to null.</p>
 * @param table Table to add the column
 * @param title Title for the new column, can't be repeated in the table, null or empty string
 * @param type Type for the new column
 * @return The created column or null if the column could not be created
 */
AttributeColumn addAttributeColumn(AttributeTable table,String title,AttributeType type);
Program: 190011
Project: 190011
Buggy source:
/** 
 * <p>Duplicates a given column of a table and copies al row values.</p> <p>If the <code>AttributeType</code> for the new column is different from the old column type, it will try to parse each value. If it is not possible, the value will be set to null.</p> <p>The title for the new column can't be repeated in the table, null or an empty string.</p>. <p>The id of the column will be set to the title.</p> <p>The <code>AttributeOrigin</code> of the column will be set to <code>DATA</code>.</p> <p>Default column value will be set to null.</p>
 * @param table Table of the column to duplicate
 * @param column Column to duplicate
 * @param title Title for the new column
 * @param type AttributeType for the new column
 * @return The created column or null if title is not correct
 */
AttributeColumn duplicateColumn(AttributeTable table,AttributeColumn column,String title,AttributeType type);

Fixed version (ground truth):
/** 
 * <p>Duplicates a given column of a table and copies al row values.</p> <p>If the <code>AttributeType</code> for the new column is different from the old column type, it will try to parse each value. If it is not possible, the value will be set to null.</p> <p>The title for the new column can't be repeated in the table, null or an empty string.</p>. <p>The id of the column will be set to the title.</p> <p>The <code>AttributeOrigin</code> of the column will be set to <code>DATA</code>.</p> <p>Default column value will be set to null.</p>
 * @param table Table of the column to duplicate
 * @param column Column to duplicate
 * @param title Title for the new column
 * @param type AttributeType for the new column
 * @return The created column or null if the column could not be created
 */
AttributeColumn duplicateColumn(AttributeTable table,AttributeColumn column,String title,AttributeType type);
Program: 190015
Project: 190015
Buggy source:
/** 
 * <p>Creates and edge between source and target node (if it does not already exist), directed or undirected.</p> <p>If a edge with the given id already exists, no edge will be created.</p> <p>This will not create a self-loop.</p>
 * @param source Source node
 * @param target Target node
 * @param directed Indicates if the edge has to be directed
 * @return New edge if the edge was created succesfully, null otherwise
 */
Edge createEdge(String id,Node source,Node target,boolean directed);

Fixed version (ground truth):
/** 
 * <p>Creates and edge between source and target node (if it does not already exist), directed or undirected.</p> <p>If a edge with the given id already exists, no edge will be created.</p>
 * @param source Source node
 * @param target Target node
 * @param directed Indicates if the edge has to be directed
 * @return New edge if the edge was created succesfully, null otherwise
 */
Edge createEdge(String id,Node source,Node target,boolean directed);
Program: 190017
Project: 190017
Buggy source:
public AttributeColumn createBooleanMatchesColumn(AttributeTable table,AttributeColumn column,String newColumnTitle,Pattern pattern){
  if (pattern != null) {
    AttributeColumn newColumn=addAttributeColumn(table,newColumnTitle,AttributeType.BOOLEAN);
    if (newColumn == null) {
      return null;
    }
    Matcher matcher;
    Object value;
    for (    Attributes row : getTableAttributeRows(table)) {
      value=row.getValue(column.getIndex());
      if (value != null) {
        matcher=pattern.matcher(value.toString());
      }
 else {
        matcher=pattern.matcher("String_Node_Str");
      }
      row.setValue(newColumn.getIndex(),new Boolean(matcher.matches()));
    }
    return newColumn;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public AttributeColumn createBooleanMatchesColumn(AttributeTable table,AttributeColumn column,String newColumnTitle,Pattern pattern){
  if (pattern != null) {
    AttributeColumn newColumn=addAttributeColumn(table,newColumnTitle,AttributeType.BOOLEAN);
    if (newColumn == null) {
      return null;
    }
    Matcher matcher;
    Object value;
    for (    Attributes row : getTableAttributeRows(table)) {
      value=row.getValue(column.getIndex());
      if (value != null) {
        matcher=pattern.matcher(value.toString());
      }
 else {
        matcher=pattern.matcher("String_Node_Str");
      }
      row.setValue(newColumn.getIndex(),matcher.matches());
    }
    return newColumn;
  }
 else {
    return null;
  }
}
Program: 190019
Project: 190019
Buggy source:
public Edge createEdge(String id,Node source,Node target,boolean directed){
  Edge newEdge;
  if (getGraph().getEdge(id) == null) {
    if (source != target) {
      if (directed) {
        newEdge=buildEdge(id,source,target,true);
        if (getDirectedGraph().addEdge(newEdge)) {
          return newEdge;
        }
 else {
          return null;
        }
      }
 else {
        newEdge=buildEdge(id,source,target,false);
        if (getUndirectedGraph().addEdge(newEdge)) {
          return newEdge;
        }
 else {
          return null;
        }
      }
    }
 else {
      return null;
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public Edge createEdge(String id,Node source,Node target,boolean directed){
  Edge newEdge;
  if (source != target) {
    if (directed) {
      newEdge=buildEdge(id,source,target,true);
      if (getDirectedGraph().addEdge(newEdge)) {
        return newEdge;
      }
 else {
        return null;
      }
    }
 else {
      newEdge=buildEdge(id,source,target,false);
      if (getUndirectedGraph().addEdge(newEdge)) {
        return newEdge;
      }
 else {
        return null;
      }
    }
  }
 else {
    return null;
  }
}
Program: 190020
Project: 190020
Buggy source:
private Node buildNode(String label,String id){
  Node newNode=Lookup.getDefault().lookup(GraphController.class).getModel().factory().newNode(id);
  getGraph().setId(newNode,id);
  newNode.getNodeData().setLabel(label);
  return newNode;
}

Fixed version (ground truth):
private Node buildNode(String label,String id){
  Node newNode=Lookup.getDefault().lookup(GraphController.class).getModel().factory().newNode();
  getGraph().setId(newNode,id);
  newNode.getNodeData().setLabel(label);
  return newNode;
}
Program: 190022
Project: 190022
Buggy source:
public Object getValueFor(ImmutableTreeNode node){
  Node graphNode=node.getNode();
  if (graphNode.getId() == -1) {
    return null;
  }
  Attributes row=graphNode.getNodeData().getAttributes();
  Object value=row.getValue(column.getIndex());
  if (useSparklines && (AttributeUtils.getDefault().isNumberListColumn(column) || AttributeUtils.getDefault().isDynamicNumberColumn(column))) {
    return value;
  }
 else   if (column.getType() == AttributeType.TIME_INTERVAL) {
    return value;
  }
 else {
    if (value != null) {
      if (value instanceof DynamicType) {
        return ((DynamicType)value).toString(currentTimeFormat == TimeFormat.DOUBLE);
      }
 else {
        return value.toString();
      }
    }
 else {
      return null;
    }
  }
}

Fixed version (ground truth):
public Object getValueFor(ImmutableTreeNode node){
  Node graphNode=node.getNode();
  if (graphNode.getId() == -1) {
    return null;
  }
  Attributes row=graphNode.getNodeData().getAttributes();
  Object value=row.getValue(column.getIndex());
  if (useSparklines && (attributeUtils.isNumberListColumn(column) || attributeUtils.isDynamicNumberColumn(column))) {
    return value;
  }
 else   if (column.getType() == AttributeType.TIME_INTERVAL) {
    return value;
  }
 else   if (attributeUtils.isNumberColumn(column)) {
    return value;
  }
 else {
    if (value != null) {
      if (value instanceof DynamicType) {
        return ((DynamicType)value).toString(currentTimeFormat == TimeFormat.DOUBLE);
      }
 else {
        return value.toString();
      }
    }
 else {
      return null;
    }
  }
}
Program: 190023
Project: 190023
Buggy source:
public Class getColumnClass(){
  if (useSparklines && AttributeUtils.getDefault().isNumberListColumn(column)) {
    return NumberList.class;
  }
 else   if (useSparklines && AttributeUtils.getDefault().isDynamicNumberColumn(column)) {
    return column.getType().getType();
  }
 else   if (column.getType() == AttributeType.TIME_INTERVAL) {
    return TimeInterval.class;
  }
 else {
    return String.class;
  }
}

Fixed version (ground truth):
public Class getColumnClass(){
  if (useSparklines && attributeUtils.isNumberListColumn(column)) {
    return NumberList.class;
  }
 else   if (useSparklines && attributeUtils.isDynamicNumberColumn(column)) {
    return column.getType().getType();
  }
 else   if (column.getType() == AttributeType.TIME_INTERVAL) {
    return TimeInterval.class;
  }
 else   if (attributeUtils.isNumberColumn(column)) {
    return column.getType().getType();
  }
 else {
    return String.class;
  }
}
Program: 190025
Project: 190025
Buggy source:
public void actionPerformed(ActionEvent e){
  try {
    stream.reset();
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  ImportControllerUI importController=Lookup.getDefault().lookup(ImportControllerUI.class);
  importController.importStream(stream,importer);
  WelcomeTopComponent.this.close();
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  try {
    stream.reset();
  }
 catch (  IOException ex) {
  }
  ImportControllerUI importController=Lookup.getDefault().lookup(ImportControllerUI.class);
  importController.importStream(stream,importer);
  WelcomeTopComponent.this.close();
}
Program: 190030
Project: 190030
Buggy source:
public FilterProperty[] getProperties(){
  try {
    return new FilterProperty[]{FilterProperty.createProperty(this,String.class,"String_Node_Str"),FilterProperty.createProperty(this,Integer.class,"String_Node_Str")};
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
  return new FilterProperty[0];
}

Fixed version (ground truth):
public FilterProperty[] getProperties(){
  try {
    return new FilterProperty[]{FilterProperty.createProperty(this,String.class,"String_Node_Str"),FilterProperty.createProperty(this,Integer.class,"String_Node_Str"),FilterProperty.createProperty(this,Boolean.class,"String_Node_Str")};
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
  return new FilterProperty[0];
}
Program: 190031
Project: 190031
Buggy source:
public Graph filter(Graph graph){
  String str=pattern.toLowerCase();
  List<Node> nodes=new ArrayList<Node>();
  for (  Node n : graph.getNodes()) {
    if (n.getNodeData().getId().toLowerCase().contains(str)) {
      nodes.add(n);
    }
 else     if (n.getNodeData().getLabel().toLowerCase().contains(str)) {
      nodes.add(n);
    }
  }
  Set<Node> result=new HashSet<Node>();
  Set<Node> neighbours=new HashSet<Node>();
  neighbours.addAll(nodes);
  for (int i=0; i < depth; i++) {
    Node[] nei=neighbours.toArray(new Node[0]);
    neighbours.clear();
    for (    Node n : nei) {
      for (      Node neighbor : graph.getNeighbors(n)) {
        if (!result.contains(neighbor)) {
          neighbours.add(neighbor);
          result.add(neighbor);
        }
      }
    }
    if (neighbours.isEmpty()) {
      break;
    }
  }
  for (  Node node : graph.getNodes().toArray()) {
    if (!result.contains(node)) {
      graph.removeNode(node);
    }
  }
  return graph;
}

Fixed version (ground truth):
public Graph filter(Graph graph){
  String str=pattern.toLowerCase();
  List<Node> nodes=new ArrayList<Node>();
  for (  Node n : graph.getNodes()) {
    if (n.getNodeData().getId().toLowerCase().contains(str)) {
      nodes.add(n);
    }
 else     if (n.getNodeData().getLabel().toLowerCase().contains(str)) {
      nodes.add(n);
    }
  }
  Set<Node> result=new HashSet<Node>();
  Set<Node> neighbours=new HashSet<Node>();
  neighbours.addAll(nodes);
  for (int i=0; i < depth; i++) {
    Node[] nei=neighbours.toArray(new Node[0]);
    neighbours.clear();
    for (    Node n : nei) {
      for (      Node neighbor : graph.getNeighbors(n)) {
        if (!result.contains(neighbor)) {
          neighbours.add(neighbor);
          result.add(neighbor);
        }
      }
    }
    if (neighbours.isEmpty()) {
      break;
    }
  }
  if (self) {
    result.addAll(nodes);
  }
  for (  Node node : graph.getNodes().toArray()) {
    if (!result.contains(node)) {
      graph.removeNode(node);
    }
  }
  return graph;
}
Program: 190032
Project: 190032
Buggy source:
public boolean evaluate(Graph graph,Edge edge){
  Object value=edge.getEdgeData().getAttributes().getValue(partition.getColumn().getIndex());
  if (value != null) {
    int size=parts.size();
    for (int i=0; i < size; i++) {
      Object obj=parts.get(i).getValue();
      if (obj == null && value == null) {
        return true;
      }
 else       if (obj != null && obj.equals(value)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean evaluate(Graph graph,Edge edge){
  Object value=edge.getEdgeData().getAttributes().getValue(partition.getColumn().getIndex());
  int size=parts.size();
  for (int i=0; i < size; i++) {
    Object obj=parts.get(i).getValue();
    if (obj == null && value == null) {
      return true;
    }
 else     if (obj != null && value != null && obj.equals(value)) {
      return true;
    }
  }
  return false;
}
Program: 190033
Project: 190033
Buggy source:
public Object getMaximum(){
  return max;
}

Fixed version (ground truth):
public Object getMaximum(){
  if (max == null) {
    refreshValues();
  }
  return max;
}
Program: 190034
Project: 190034
Buggy source:
public Object getMinimun(){
  return min;
}

Fixed version (ground truth):
public Object getMinimun(){
  if (min == null) {
    refreshValues();
  }
  return min;
}
Program: 190035
Project: 190035
Buggy source:
public EqualNumberFilter(AttributeColumn column){
  this.column=column;
  this.dynamicHelper=new DynamicAttributesHelper(this,null);
  GraphModel gm=Lookup.getDefault().lookup(GraphController.class).getModel();
  Graph graph=gm.getGraph();
  List<Object> vals=new ArrayList<Object>();
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    for (    Node n : graph.getNodes()) {
      Object val=n.getNodeData().getAttributes().getValue(column.getIndex());
      if (val != null) {
        vals.add(val);
      }
    }
  }
 else {
    for (    Edge e : graph.getEdges()) {
      Object val=e.getEdgeData().getAttributes().getValue(column.getIndex());
      if (val != null) {
        vals.add(val);
      }
    }
  }
  Comparable[] comparableArray=ComparableArrayConverter.convert(vals);
  min=AttributeUtils.getDefault().getMin(column,comparableArray);
  max=AttributeUtils.getDefault().getMax(column,comparableArray);
}

Fixed version (ground truth):
public EqualNumberFilter(AttributeColumn column){
  this.column=column;
  this.dynamicHelper=new DynamicAttributesHelper(this,null);
}
Program: 190036
Project: 190036
Buggy source:
public void finish(){
  if (!Double.isInfinite(min)) {
    timelineController.setMin(min);
  }
  if (!Double.isInfinite(max)) {
    timelineController.setMax(max);
  }
}

Fixed version (ground truth):
public void finish(){
  if (!Double.isInfinite(min)) {
  }
  if (!Double.isInfinite(max)) {
  }
}
Program: 190037
Project: 190037
Buggy source:
public EdgeProcessor(Dhns dhns,GraphViewImpl view){
  this.dhns=dhns;
  this.treeStructure=view.getStructure();
  this.idGen=dhns.getIdGen();
  this.view=view;
  this.viewId=view.getViewId();
  this.edgeIterator=new ParamAVLIterator<AbstractEdge>();
}

Fixed version (ground truth):
public EdgeProcessor(Dhns dhns,GraphViewImpl view){
  this.dhns=dhns;
  this.treeStructure=view.getStructure();
  this.view=view;
  this.viewId=view.getViewId();
  this.edgeIterator=new ParamAVLIterator<AbstractEdge>();
}
Program: 190038
Project: 190038
Buggy source:
public void selectVisible(Query query){
  if (query != null && model.getCurrentQuery() == query && !model.isFiltering()) {
    return;
  }
  model.setFiltering(false);
  model.setCurrentQuery(query);
  if (model.getFilterThread() != null) {
    model.getFilterThread().setRunning(false);
    model.setFilterThread(null);
  }
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  graphModel.setVisibleView(null);
  if (model.getCurrentResult() != null) {
    graphModel.destroyView(model.getCurrentResult());
    model.setCurrentResult(null);
  }
  if (query != null) {
    FilterThread filterThread=new FilterThread(model);
    model.setFilterThread(filterThread);
    filterThread.setRootQuery((AbstractQueryImpl)query);
    filterThread.start();
  }
 else {
  }
}

Fixed version (ground truth):
public void selectVisible(Query query){
  if (query != null && model.getCurrentQuery() == query && !model.isFiltering()) {
    return;
  }
  model.setFiltering(false);
  model.setCurrentQuery(query);
  if (model.getFilterThread() != null) {
    model.getFilterThread().setRunning(false);
    model.setFilterThread(null);
  }
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  graphModel.setVisibleView(null);
  if (model.getCurrentResult() != null) {
    graphModel.destroyView(model.getCurrentResult());
    model.setCurrentResult(null);
  }
  if (query != null) {
    FilterThread filterThread=new FilterThread(model);
    model.setFilterThread(filterThread);
    filterThread.setRootQuery((AbstractQueryImpl)query);
    filterThread.start();
  }
 else {
    VisualizationController visController=Lookup.getDefault().lookup(VisualizationController.class);
    if (visController != null) {
      visController.selectNodes(null);
    }
  }
}
Program: 190039
Project: 190039
Buggy source:
public void selectNodes(Node[] nodes){
  if (!isCustomSelection()) {
    setCustomSelection();
  }
  Model[] models=new Model[nodes.length];
  for (int i=0; i < nodes.length; i++) {
    models[i]=nodes[i].getNodeData().getModel();
  }
  engine.selectObject(models);
}

Fixed version (ground truth):
public void selectNodes(Node[] nodes){
  if (nodes == null) {
    resetSelection();
    return;
  }
  if (!isCustomSelection()) {
    setCustomSelection();
  }
  Model[] models=new Model[nodes.length];
  for (int i=0; i < nodes.length; i++) {
    models[i]=nodes[i].getNodeData().getModel();
  }
  engine.selectObject(models);
}
Program: 190040
Project: 190040
Buggy source:
public void attributesChanged(AttributeEvent event){
  if (event.getEventType().equals(AttributeEvent.EventType.ADD_COLUMN) || event.getEventType().equals(AttributeEvent.EventType.REMOVE_COLUMN)) {
    fireChangeEvent();
  }
}

Fixed version (ground truth):
public void attributesChanged(AttributeEvent event){
  if (event.getEventType().equals(AttributeEvent.EventType.ADD_COLUMN) || event.getEventType().equals(AttributeEvent.EventType.REMOVE_COLUMN)) {
    if (refreshTimer != null) {
      refreshTimer.restart();
    }
 else {
      refreshTimer=new Timer(1000,new ActionListener(){
        public void actionPerformed(        ActionEvent e){
          fireChangeEvent();
        }
      }
);
      refreshTimer.setRepeats(false);
      refreshTimer.start();
    }
  }
}
Program: 190041
Project: 190041
Buggy source:
/** 
 * Used for export (writes XML date strings).
 * @param d a double to convert from
 * @return an XML date string.
 * @throws IllegalArgumentException if {@code d} is infinite.
 */
public static String getXMLDateStringFromDouble(double d){
  try {
    DatatypeFactory dateFactory=DatatypeFactory.newInstance();
    if (Double.isInfinite(d)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    GregorianCalendar gc=new GregorianCalendar();
    gc.setTimeInMillis((long)d);
    return dateFactory.newXMLGregorianCalendar(gc).toXMLFormat().substring(0,23);
  }
 catch (  DatatypeConfigurationException ex) {
    Exceptions.printStackTrace(ex);
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * Used for export (writes XML date strings).
 * @param d a double to convert from
 * @return an XML date string.
 * @throws IllegalArgumentException if {@code d} is infinite.
 */
public static String getXMLDateStringFromDouble(double d){
  try {
    DatatypeFactory dateFactory=DatatypeFactory.newInstance();
    if (d == Double.NEGATIVE_INFINITY) {
      return "String_Node_Str";
    }
 else     if (d == Double.POSITIVE_INFINITY) {
      return "String_Node_Str";
    }
    GregorianCalendar gc=new GregorianCalendar();
    gc.setTimeInMillis((long)d);
    return dateFactory.newXMLGregorianCalendar(gc).toXMLFormat().substring(0,23);
  }
 catch (  DatatypeConfigurationException ex) {
    Exceptions.printStackTrace(ex);
    return "String_Node_Str";
  }
}
Program: 190042
Project: 190042
Buggy source:
/** 
 * Returns the leftmost point or   {@code Double.POSITIVE_INFINITY} in caseof no intervals.
 * @return the leftmost point.
 */
public double getLow(){
  if (isEmpty()) {
    return Double.POSITIVE_INFINITY;
  }
  return minimum().getLow();
}

Fixed version (ground truth):
/** 
 * Returns the leftmost point or   {@code Double.NEGATIVE_INFINITY} in caseof no intervals.
 * @return the leftmost point.
 */
public double getLow(){
  if (isEmpty()) {
    return Double.NEGATIVE_INFINITY;
  }
  return minimum().getLow();
}
Program: 190043
Project: 190043
Buggy source:
/** 
 * Returns the rightmost point or   {@code Double.NEGATIVE_INFINITY} in caseof no intervals.
 * @return the rightmost point.
 */
public double getHigh(){
  if (isEmpty()) {
    return Double.NEGATIVE_INFINITY;
  }
  return root.left.max;
}

Fixed version (ground truth):
/** 
 * Returns the rightmost point or   {@code Double.POSITIVE_INFINITY} in caseof no intervals.
 * @return the rightmost point.
 */
public double getHigh(){
  if (isEmpty()) {
    return Double.POSITIVE_INFINITY;
  }
  return root.left.max;
}
Program: 190044
Project: 190044
Buggy source:
public double getMax(){
  if (lowMap.isEmpty() && highMap.isEmpty()) {
    return Double.POSITIVE_INFINITY;
  }
 else   if (highMap.isEmpty()) {
    return lowMap.lastKey();
  }
 else {
    return highMap.lastKey();
  }
}

Fixed version (ground truth):
public double getMax(){
  if (highMap.isEmpty()) {
    return Double.POSITIVE_INFINITY;
  }
 else {
    return highMap.lastKey();
  }
}
Program: 190045
Project: 190045
Buggy source:
public double getMin(){
  if (lowMap.isEmpty() && highMap.isEmpty()) {
    return Double.NEGATIVE_INFINITY;
  }
 else   if (lowMap.isEmpty()) {
    return highMap.firstKey();
  }
 else {
    return lowMap.firstKey();
  }
}

Fixed version (ground truth):
public double getMin(){
  if (lowMap.isEmpty()) {
    return Double.NEGATIVE_INFINITY;
  }
 else {
    return lowMap.firstKey();
  }
}
Program: 190046
Project: 190046
Buggy source:
public static boolean isDynamicNodePartitionColumn(AttributeColumn column,Graph graph,TimeInterval timeInterval,Estimator estimator){
  Set values=new HashSet();
  int nonNullvalues=0;
  for (  Node n : graph.getNodes()) {
    Object value=n.getNodeData().getAttributes().getValue(column.getIndex());
    value=getDynamicValue(value,timeInterval,estimator);
    if (value != null) {
      nonNullvalues++;
    }
    values.add(value);
  }
  if (values.size() < 9f / 10f * nonNullvalues) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean isDynamicNodePartitionColumn(AttributeColumn column,Graph graph,TimeInterval timeInterval,Estimator estimator){
  if (column.getType().isDynamicType() && !Number.class.isAssignableFrom(column.getType().getType())) {
    estimator=Estimator.FIRST;
  }
  Set values=new HashSet();
  int nonNullvalues=0;
  for (  Node n : graph.getNodes()) {
    Object value=n.getNodeData().getAttributes().getValue(column.getIndex());
    value=getDynamicValue(value,timeInterval,estimator);
    if (value != null) {
      nonNullvalues++;
    }
    values.add(value);
  }
  if (values.size() < 9f / 10f * nonNullvalues) {
    return true;
  }
  return false;
}