nus-yam/ex-repair huggingface dataset:
Program: 142595
Project: 142595
Buggy source:
public Long getLowerLong(){
  return lowerLong;
}

Fixed version (ground truth):
public Long getLowerLong(){
  return (Long)lowerNumber;
}
Program: 142596
Project: 142596
Buggy source:
private boolean isDynamic(Filter filter){
  Query filterQuery=null;
  for (  Query q : filterModel.getCurrentQuery().getQueries(filter.getClass())) {
    if (q.getFilter() == filter) {
      filterQuery=q;
      break;
    }
  }
  if (filterQuery != null) {
    for (    Query query : filterQuery.getDescendantsAndSelf()) {
      if (query.getFilter().getClass().equals(DynamicRangeFilter.class)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isDynamic(Filter filter){
  if (filterModel.getCurrentQuery() == null) {
    return false;
  }
  Query filterQuery=null;
  for (  Query q : filterModel.getCurrentQuery().getQueries(filter.getClass())) {
    if (q.getFilter() == filter) {
      filterQuery=q;
      break;
    }
  }
  if (filterQuery != null) {
    for (    Query query : filterQuery.getDescendantsAndSelf()) {
      if (query.getFilter().getClass().equals(DynamicRangeFilter.class)) {
        return true;
      }
    }
  }
  return false;
}
Program: 142597
Project: 142597
Buggy source:
public void finish(){
  refreshRange();
}

Fixed version (ground truth):
public void finish(){
}
Program: 142598
Project: 142598
Buggy source:
public boolean init(Graph graph){
  HierarchicalGraph hg=graph.getGraphModel().getHierarchicalGraphVisible();
  dynamicHelper=new DynamicAttributesHelper(this,hg);
  if (range == null) {
    getValues();
    refreshRange();
  }
  values=new ArrayList<Object>();
  return true;
}

Fixed version (ground truth):
public boolean init(Graph graph){
  HierarchicalGraph hg=graph.getGraphModel().getHierarchicalGraphVisible();
  if (AttributeUtils.getDefault().isNodeColumn(column)) {
    if (graph.getNodeCount() == 0) {
      return false;
    }
  }
 else   if (AttributeUtils.getDefault().isEdgeColumn(column)) {
    if (hg.getTotalEdgeCount() == 0) {
      return false;
    }
  }
  dynamicHelper=new DynamicAttributesHelper(this,hg);
  refreshValues(hg);
  return true;
}
Program: 142599
Project: 142599
Buggy source:
public Object[] getValues(){
  if (values == null) {
    GraphModel gm=Lookup.getDefault().lookup(GraphController.class).getModel();
    HierarchicalGraph hgraph=gm.getHierarchicalGraphVisible();
    List<Object> vals=new ArrayList<Object>();
    if (AttributeUtils.getDefault().isNodeColumn(column)) {
      for (      Node n : hgraph.getNodes()) {
        Object val=n.getNodeData().getAttributes().getValue(column.getIndex());
        val=dynamicHelper.getDynamicValue(val);
        if (val != null) {
          vals.add(val);
        }
      }
    }
 else {
      for (      Edge e : hgraph.getEdgesAndMetaEdges()) {
        Object val=e.getEdgeData().getAttributes().getValue(column.getIndex());
        val=dynamicHelper.getDynamicValue(val);
        if (val != null) {
          vals.add(val);
        }
      }
    }
    if (vals.isEmpty()) {
      vals.add(0);
    }
    Comparable[] comparableArray=ComparableArrayConverter.convert(vals);
    min=AttributeUtils.getDefault().getMin(column,comparableArray);
    max=AttributeUtils.getDefault().getMax(column,comparableArray);
    refreshRange();
    return comparableArray;
  }
 else {
    Comparable[] comparableArray=ComparableArrayConverter.convert(values);
    min=AttributeUtils.getDefault().getMin(column,comparableArray);
    max=AttributeUtils.getDefault().getMax(column,comparableArray);
    return comparableArray;
  }
}

Fixed version (ground truth):
public Object[] getValues(){
  return values;
}
Program: 142600
Project: 142600
Buggy source:
public boolean evaluate(Graph graph,Edge edge){
  Object val=edge.getEdgeData().getAttributes().getValue(column.getIndex());
  val=dynamicHelper.getDynamicValue(val);
  if (val != null) {
    values.add(val);
    return range.isInRange(val);
  }
  return false;
}

Fixed version (ground truth):
public boolean evaluate(Graph graph,Edge edge){
  Object val=edge.getEdgeData().getAttributes().getValue(column.getIndex());
  val=dynamicHelper.getDynamicValue(val);
  if (val != null) {
    return range.isInRange((Number)val);
  }
  return false;
}
Program: 142601
Project: 142601
Buggy source:
public boolean init(Graph graph){
  HierarchicalGraph hgraph=(HierarchicalGraph)graph;
  dynamicHelper=new DynamicAttributesHelper(this,hgraph);
  if (range == null) {
    getValues();
    refreshRange();
  }
  values=new ArrayList<Float>(hgraph.getTotalEdgeCount());
  min=Float.POSITIVE_INFINITY;
  max=Float.NEGATIVE_INFINITY;
  return true;
}

Fixed version (ground truth):
public boolean init(Graph graph){
  HierarchicalGraph hgraph=(HierarchicalGraph)graph;
  if (hgraph.getTotalEdgeCount() == 0) {
    return false;
  }
  dynamicHelper=new DynamicAttributesHelper(this,hgraph);
  refreshValues(graph);
  return true;
}
Program: 142602
Project: 142602
Buggy source:
public Object[] getValues(){
  if (values == null) {
    GraphModel gm=Lookup.getDefault().lookup(GraphController.class).getModel();
    HierarchicalGraph hgraph=gm.getHierarchicalGraphVisible();
    Float[] weights=new Float[hgraph.getTotalEdgeCount()];
    int i=0;
    min=Float.MAX_VALUE;
    max=Float.MIN_VALUE;
    for (    Edge e : hgraph.getEdgesAndMetaEdges()) {
      float weight=dynamicHelper.getEdgeWeight(e);
      min=Math.min(min,weight);
      max=Math.max(max,weight);
      weights[i++]=weight;
    }
    refreshRange();
    return weights;
  }
 else {
    return values.toArray(new Float[0]);
  }
}

Fixed version (ground truth):
public Object[] getValues(){
  return values.toArray(new Float[0]);
}
Program: 142603
Project: 142603
Buggy source:
public void finish(){
  refreshRange();
}

Fixed version (ground truth):
public void finish(){
}
Program: 142604
Project: 142604
Buggy source:
public boolean evaluate(Graph graph,Edge edge){
  float weight=dynamicHelper.getEdgeWeight(edge);
  min=Math.min(min,weight);
  max=Math.max(max,weight);
  values.add(new Float(weight));
  return range.isInRange(weight);
}

Fixed version (ground truth):
public boolean evaluate(Graph graph,Edge edge){
  float weight=dynamicHelper.getEdgeWeight(edge);
  return range.isInRange(weight);
}
Program: 142606
Project: 142606
Buggy source:
public void stateChanged(ChangeEvent e){
  if (e.getSource() instanceof FilterUIModel) {
    if (uiModel.getSelectedQuery() != null && filterButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.filterVisible(uiModel.getSelectedRoot());
    }
 else     if (uiModel.getSelectedQuery() != null && selectButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.selectVisible(uiModel.getSelectedRoot());
    }
  }
  updateControls();
  updateEnabled(true);
}

Fixed version (ground truth):
public void stateChanged(ChangeEvent e){
  if (e.getSource() instanceof FilterUIModel) {
    if (uiModel.getSelectedQuery() != null && filterButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.filterVisible(uiModel.getSelectedRoot());
    }
 else     if (uiModel.getSelectedQuery() != null && selectButton.isSelected()) {
      FilterController controller=Lookup.getDefault().lookup(FilterController.class);
      controller.selectVisible(uiModel.getSelectedRoot());
    }
  }
 else   if (e.getSource() instanceof FilterModel) {
    if (uiModel.getSelectedQuery() != null && filterModel.getCurrentQuery() == null) {
      uiModel.setSelectedQuery(null);
    }
 else     if (filterModel.getCurrentQuery() != null && filterModel.getCurrentQuery() != uiModel.getSelectedQuery()) {
      uiModel.setSelectedQuery(filterModel.getCurrentQuery());
    }
  }
  updateControls();
  updateEnabled(true);
}
Program: 142607
Project: 142607
Buggy source:
public void setNodeFixed(Node node,boolean fixed){
  if (isNodeInGraph(node)) {
    node.getNodeData().setFixed(fixed);
  }
}

Fixed version (ground truth):
public void setNodeFixed(Node node,boolean fixed){
  node.getNodeData().setFixed(fixed);
}
Program: 142608
Project: 142608
Buggy source:
private void removeEdge(Edge edge,Graph graph){
  if (isEdgeInGraph(edge)) {
    graph.removeEdge(edge);
  }
}

Fixed version (ground truth):
private void removeEdge(Edge edge,Graph graph){
  graph.removeEdge(edge);
}
Program: 142609
Project: 142609
Buggy source:
public Node duplicateNode(Node node){
  if (isNodeInGraph(node)) {
    HierarchicalGraph hg=getHierarchicalGraph();
    Node copy=copyNodeRecursively(node,hg.getParent(node),hg);
    return copy;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public Node duplicateNode(Node node){
  HierarchicalGraph hg=getHierarchicalGraph();
  Node copy=copyNodeRecursively(node,hg.getParent(node),hg);
  return copy;
}
Program: 142610
Project: 142610
Buggy source:
private void removeNode(Node node,Graph graph){
  if (isNodeInGraph(node)) {
    graph.removeNode(node);
  }
}

Fixed version (ground truth):
private void removeNode(Node node,Graph graph){
  graph.removeNode(node);
}
Program: 142611
Project: 142611
Buggy source:
public void createEdges(Node source,Node[] allNodes,boolean directed){
  if (isNodeInGraph(source) && areNodesInGraph(allNodes)) {
    for (    Node n : allNodes) {
      if (n != source) {
        createEdge(source,n,directed);
      }
    }
  }
}

Fixed version (ground truth):
public void createEdges(Node source,Node[] allNodes,boolean directed){
  for (  Node n : allNodes) {
    if (n != source) {
      createEdge(source,n,directed);
    }
  }
}
Program: 142612
Project: 142612
Buggy source:
public boolean canMoveNodeToGroup(Node node,Node group){
  HierarchicalGraph hg=getHierarchicalGraph();
  return node != group && hg.getParent(node) == hg.getParent(group) && canUngroupNode(group) && isNodeInGraph(node);
}

Fixed version (ground truth):
public boolean canMoveNodeToGroup(Node node,Node group){
  HierarchicalGraph hg=getHierarchicalGraph();
  return node != group && hg.getParent(node) == hg.getParent(group) && canUngroupNode(group);
}
Program: 142613
Project: 142613
Buggy source:
public boolean canUngroupNode(Node node){
  if (!isNodeInGraph(node)) {
    return false;
  }
  boolean canUngroup;
  HierarchicalGraph hg=getHierarchicalGraph();
  canUngroup=getNodeChildrenCount(hg,node) > 0;
  return canUngroup;
}

Fixed version (ground truth):
public boolean canUngroupNode(Node node){
  boolean canUngroup;
  HierarchicalGraph hg=getHierarchicalGraph();
  canUngroup=getNodeChildrenCount(hg,node) > 0;
  return canUngroup;
}
Program: 142614
Project: 142614
Buggy source:
public boolean canGroupNodes(Node[] nodes){
  if (!areNodesInGraph(nodes)) {
    return false;
  }
  HierarchicalGraph hg=getHierarchicalGraph();
  Node parent=hg.getParent(nodes[0]);
  for (  Node n : nodes) {
    if (hg.getParent(n) != parent) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean canGroupNodes(Node[] nodes){
  HierarchicalGraph hg=getHierarchicalGraph();
  Node parent=hg.getParent(nodes[0]);
  for (  Node n : nodes) {
    if (hg.getParent(n) != parent) {
      return false;
    }
  }
  return true;
}
Program: 142615
Project: 142615
Buggy source:
public boolean isNodeInGroup(Node node){
  if (!isNodeInGraph(node)) {
    return false;
  }
  HierarchicalGraph hg=getHierarchicalGraph();
  return hg.getParent(node) != null;
}

Fixed version (ground truth):
public boolean isNodeInGroup(Node node){
  HierarchicalGraph hg=getHierarchicalGraph();
  return hg.getParent(node) != null;
}
Program: 142616
Project: 142616
Buggy source:
protected GLCapabilities getCaps(){
  GLCapabilities caps=new GLCapabilities();
  caps.setAlphaBits(8);
  caps.setDoubleBuffered(true);
  caps.setHardwareAccelerated(true);
  int antialisaing=vizController.getVizConfig().getAntialiasing();
  if (antialisaing == 0) {
    caps.setSampleBuffers(false);
  }
 else   if (antialisaing == 2) {
    caps.setSampleBuffers(true);
    caps.setNumSamples(2);
  }
 else   if (antialisaing == 4) {
    caps.setSampleBuffers(true);
    caps.setNumSamples(4);
  }
 else   if (antialisaing == 8) {
    caps.setSampleBuffers(true);
    caps.setNumSamples(8);
  }
 else   if (antialisaing == 16) {
    caps.setSampleBuffers(true);
    caps.setNumSamples(16);
  }
  return caps;
}

Fixed version (ground truth):
protected GLCapabilities getCaps(){
  GLCapabilities caps=new GLCapabilities();
  try {
    caps.setAlphaBits(8);
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);
    int antialisaing=vizController.getVizConfig().getAntialiasing();
    if (antialisaing == 0) {
      caps.setSampleBuffers(false);
    }
 else     if (antialisaing == 2) {
      caps.setSampleBuffers(true);
      caps.setNumSamples(2);
    }
 else     if (antialisaing == 4) {
      caps.setSampleBuffers(true);
      caps.setNumSamples(4);
    }
 else     if (antialisaing == 8) {
      caps.setSampleBuffers(true);
      caps.setNumSamples(8);
    }
 else     if (antialisaing == 16) {
      caps.setSampleBuffers(true);
      caps.setNumSamples(16);
    }
  }
 catch (  javax.media.opengl.GLException ex) {
    Exceptions.printStackTrace(ex);
  }
  return caps;
}
Program: 142617
Project: 142617
Buggy source:
/** 
 * Hack to have a current workpace when opening workspace
 * @param temporaryOpeningWorkspace the opening workspace or null
 */
public void setTemporaryOpeningWorkspace(WorkspaceImpl temporaryOpeningWorkspace){
  this.temporaryOpeningWorkspace=temporaryOpeningWorkspace;
}

Fixed version (ground truth):
/** 
 * Hack to have a current workpace when opening workspace
 * @param temporaryOpeningWorkspace the opening workspace or null
 */
public void setTemporaryOpeningWorkspace(WorkspaceImpl temporaryOpeningWorkspace){
  this.temporaryOpeningWorkspace=temporaryOpeningWorkspace;
  if (temporaryOpeningWorkspace != null) {
    fireWorkspaceEvent(EventType.INITIALIZE,temporaryOpeningWorkspace);
  }
}
Program: 142618
Project: 142618
Buggy source:
public void run(){
  JFrame frame=(JFrame)WindowManager.getDefault().getMainWindow();
  String title=frame.getTitle() + "String_Node_Str" + project.getLookup().lookup(ProjectInformation.class).getName();
  frame.setTitle(title);
}

Fixed version (ground truth):
public void run(){
  JFrame frame=(JFrame)WindowManager.getDefault().getMainWindow();
  String title=frame.getTitle();
  title=title.substring(0,title.indexOf('-') - 1);
  frame.setTitle(title);
}
Program: 142619
Project: 142619
Buggy source:
public void deleteWorkspace(){
  controller.deleteWorkspace(controller.getCurrentWorkspace());
}

Fixed version (ground truth):
public void deleteWorkspace(){
  if (controller.getCurrentProject().getLookup().lookup(WorkspaceProvider.class).getWorkspaces().length == 1) {
    saveProject=false;
    saveAsProject=false;
    projectProperties=false;
    closeProject=false;
    newWorkspace=false;
    deleteWorkspace=false;
    cleanWorkspace=false;
    duplicateWorkspace=false;
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        JFrame frame=(JFrame)WindowManager.getDefault().getMainWindow();
        String title=frame.getTitle();
        title=title.substring(0,title.indexOf('-') - 1);
        frame.setTitle(title);
      }
    }
);
  }
  controller.deleteWorkspace(controller.getCurrentWorkspace());
}
Program: 142620
Project: 142620
Buggy source:
private void createDefaultGroups(){
  groups=new VizToolbarGroup[4];
  groups[0]=new GlobalGroupBar();
  groups[1]=new NodeGroupBar();
  groups[2]=new EdgeGroupBar();
  groups[3]=new LabelGroupBar();
  VizModel model=VizController.getInstance().getVizModel();
  model.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getPropertyName().equals("String_Node_Str")) {
        VizModel model=VizController.getInstance().getVizModel();
        toolbar.setEnable(!model.isDefaultModel());
      }
    }
  }
);
}

Fixed version (ground truth):
private void createDefaultGroups(){
  groups=new VizToolbarGroup[4];
  groups[0]=new GlobalGroupBar();
  groups[1]=new NodeGroupBar();
  groups[2]=new EdgeGroupBar();
  groups[3]=new LabelGroupBar();
  VizModel model=VizController.getInstance().getVizModel();
  model.addPropertyChangeListener(new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      if (evt.getPropertyName().equals("String_Node_Str")) {
        VizModel model=VizController.getInstance().getVizModel();
        toolbar.setEnable(!model.isDefaultModel());
        ((NodeGroupBar)groups[1]).setModelValues(model);
        ((EdgeGroupBar)groups[2]).setModelValues(model);
        ((LabelGroupBar)groups[3]).setModelValues(model);
      }
    }
  }
);
}
Program: 142622
Project: 142622
Buggy source:
public Graph filter(Graph graph){
  HierarchicalGraph hgraph=(HierarchicalGraph)graph;
  String str=pattern.toLowerCase();
  List<Node> nodes=new ArrayList<Node>();
  for (  Node n : hgraph.getNodes()) {
    if (n.getNodeData().getId().toLowerCase().contains(str)) {
      nodes.add(n);
    }
 else     if ((n.getNodeData().getLabel() != null) && 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 : hgraph.getNeighbors(n)) {
        if (!result.contains(neighbor)) {
          neighbours.add(neighbor);
          result.add(neighbor);
        }
      }
    }
    if (neighbours.isEmpty()) {
      break;
    }
  }
  if (self) {
    result.addAll(nodes);
  }
  for (  Node node : hgraph.getNodes().toArray()) {
    if (!result.contains(node)) {
      hgraph.removeNode(node);
    }
  }
  return hgraph;
}

Fixed version (ground truth):
public Graph filter(Graph graph){
  HierarchicalGraph hgraph=(HierarchicalGraph)graph;
  String str=pattern.toLowerCase();
  List<Node> nodes=new ArrayList<Node>();
  for (  Node n : hgraph.getNodes()) {
    if (n.getNodeData().getId().toLowerCase().equals(str)) {
      nodes.add(n);
    }
 else     if ((n.getNodeData().getLabel() != null) && n.getNodeData().getLabel().toLowerCase().equals(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 : hgraph.getNeighbors(n)) {
        if (!result.contains(neighbor)) {
          neighbours.add(neighbor);
          result.add(neighbor);
        }
      }
    }
    if (neighbours.isEmpty()) {
      break;
    }
  }
  if (self) {
    result.addAll(nodes);
  }
  for (  Node node : hgraph.getNodes().toArray()) {
    if (!result.contains(node)) {
      hgraph.removeNode(node);
    }
  }
  return hgraph;
}
Program: 142623
Project: 142623
Buggy source:
public void mouseExited(MouseEvent e){
  if (currentState == TimelineState.IDLE) {
    highlightedComponent=HighlightedComponent.NONE;
  }
  mouseInside=false;
  repaint();
}

Fixed version (ground truth):
public void mouseExited(MouseEvent e){
  if (currentState == TimelineState.IDLE) {
    highlightedComponent=HighlightedComponent.NONE;
    latestMousePositionX=e.getX();
    currentMousePositionX=latestMousePositionX;
  }
  mouseInside=false;
  repaint();
}
Program: 142625
Project: 142625
Buggy source:
public void mousePressed(MouseEvent e){
  if (model == null) {
    return;
  }
  int x=e.getX();
  float w=getWidth();
  int r=16;
  if (currentState == TimelineState.IDLE) {
    if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
      currentState=TimelineState.RESIZE_FROM;
    }
 else     if (inRange(x,(int)sf + r,(int)st - r)) {
      highlightedComponent=HighlightedComponent.CENTER_HOOK;
      currentState=TimelineState.MOVING;
    }
 else     if (inRange(x,(int)st - r - 1,(int)st + 1)) {
      highlightedComponent=HighlightedComponent.RIGHT_HOOK;
      currentState=TimelineState.RESIZE_TO;
    }
  }
}

Fixed version (ground truth):
public void mousePressed(MouseEvent e){
  if (model == null) {
    return;
  }
  int x=e.getX();
  latestMousePositionX=x;
  currentMousePositionX=latestMousePositionX;
  int r=16;
  if (currentState == TimelineState.IDLE) {
    if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
      currentState=TimelineState.RESIZE_FROM;
    }
 else     if (inRange(x,(int)sf + r,(int)st - r)) {
      highlightedComponent=HighlightedComponent.CENTER_HOOK;
      currentState=TimelineState.MOVING;
    }
 else     if (inRange(x,(int)st - r - 1,(int)st + 1)) {
      highlightedComponent=HighlightedComponent.RIGHT_HOOK;
      currentState=TimelineState.RESIZE_TO;
    }
  }
}
Program: 142626
Project: 142626
Buggy source:
public void mouseReleased(MouseEvent evt){
  latestMousePositionX=null;
  currentState=TimelineState.IDLE;
  this.getParent().repaint();
}

Fixed version (ground truth):
public void mouseReleased(MouseEvent evt){
  latestMousePositionX=evt.getX();
  currentMousePositionX=latestMousePositionX;
  currentState=TimelineState.IDLE;
  this.getParent().repaint();
}
Program: 142627
Project: 142627
Buggy source:
public void mouseEntered(MouseEvent e){
  latestMousePositionX=e.getX();
  currentMousePositionX=latestMousePositionX;
  mouseInside=true;
}

Fixed version (ground truth):
public void mouseEntered(MouseEvent e){
  if (currentState == TimelineState.IDLE) {
    latestMousePositionX=e.getX();
    currentMousePositionX=latestMousePositionX;
  }
  mouseInside=true;
}
Program: 142628
Project: 142628
Buggy source:
public void mouseClicked(MouseEvent e){
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent e){
  latestMousePositionX=e.getX();
  currentMousePositionX=latestMousePositionX;
}
Program: 142629
Project: 142629
Buggy source:
public void dynamicModelChanged(DynamicModelEvent event){
  if (event.getSource() == dynamicModel) {
switch (event.getEventType()) {
case VISIBLE_INTERVAL:
      fireTimelineModelEvent(new TimelineModelEvent(TimelineModelEvent.EventType.VISIBLE_INTERVAL,this,event.getData()));
    break;
case MIN_CHANGED:
  setModelMin((Double)event.getData());
break;
case MAX_CHANGED:
setModelMax((Double)event.getData());
break;
}
}
}

Fixed version (ground truth):
public void dynamicModelChanged(DynamicModelEvent event){
  if (event.getSource() == dynamicModel) {
    unit=(dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATE) || dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATETIME)) ? DateTime.class : Double.class;
switch (event.getEventType()) {
case VISIBLE_INTERVAL:
      fireTimelineModelEvent(new TimelineModelEvent(TimelineModelEvent.EventType.VISIBLE_INTERVAL,this,event.getData()));
    break;
case MIN_CHANGED:
  setModelMin((Double)event.getData());
break;
case MAX_CHANGED:
setModelMax((Double)event.getData());
break;
}
}
}
Program: 142630
Project: 142630
Buggy source:
public void setup(DynamicModel dynamicModel){
  dynamicController=Lookup.getDefault().lookup(DynamicController.class);
  this.dynamicModel=dynamicModel;
  enabled=!Double.isInfinite(dynamicModel.getVisibleInterval().getLow()) && !Double.isInfinite(dynamicModel.getVisibleInterval().getHigh());
  dynamicController.addModelListener(this);
  unit=dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATE) ? DateTime.class : null;
  customMin=Double.NEGATIVE_INFINITY;
  customMax=Double.POSITIVE_INFINITY;
  modelMin=Double.NEGATIVE_INFINITY;
  modelMax=Double.POSITIVE_INFINITY;
  setModelMin(dynamicModel.getMin());
  setModelMax(dynamicModel.getMax());
  refreshEnabled();
}

Fixed version (ground truth):
public void setup(DynamicModel dynamicModel){
  dynamicController=Lookup.getDefault().lookup(DynamicController.class);
  this.dynamicModel=dynamicModel;
  enabled=!Double.isInfinite(dynamicModel.getVisibleInterval().getLow()) && !Double.isInfinite(dynamicModel.getVisibleInterval().getHigh());
  dynamicController.addModelListener(this);
  unit=(dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATE) || dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATETIME)) ? DateTime.class : Double.class;
  customMin=Double.NEGATIVE_INFINITY;
  customMax=Double.POSITIVE_INFINITY;
  modelMin=Double.NEGATIVE_INFINITY;
  modelMax=Double.POSITIVE_INFINITY;
  setModelMin(dynamicModel.getMin());
  setModelMax(dynamicModel.getMax());
  refreshEnabled();
}
Program: 142631
Project: 142631
Buggy source:
public void readModel(XMLStreamReader reader,DynamicModelImpl model) throws XMLStreamException {
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
        String val=reader.getAttributeValue(null,"String_Node_Str");
        if (val.equals("String_Node_Str")) {
          model.setTimeFormat(DynamicModel.TimeFormat.DATE);
        }
 else {
          model.setTimeFormat(DynamicModel.TimeFormat.DOUBLE);
        }
      }
    break;
case XMLStreamReader.END_ELEMENT:
  if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
    end=true;
  }
break;
}
}
}

Fixed version (ground truth):
public void readModel(XMLStreamReader reader,DynamicModelImpl model) throws XMLStreamException {
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
        String val=reader.getAttributeValue(null,"String_Node_Str");
        if (val.equalsIgnoreCase("String_Node_Str")) {
          model.setTimeFormat(DynamicModel.TimeFormat.DATE);
        }
        if (val.equalsIgnoreCase("String_Node_Str")) {
          model.setTimeFormat(DynamicModel.TimeFormat.DATETIME);
        }
 else {
          model.setTimeFormat(DynamicModel.TimeFormat.DOUBLE);
        }
      }
    break;
case XMLStreamReader.END_ELEMENT:
  if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
    end=true;
  }
break;
}
}
}
Program: 142632
Project: 142632
Buggy source:
public void writeModel(XMLStreamWriter writer,DynamicModelImpl model) throws XMLStreamException {
  writer.writeStartElement("String_Node_Str");
  writer.writeStartElement("String_Node_Str");
  if (model.getTimeFormat().equals(DynamicModel.TimeFormat.DATE)) {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
  writer.writeEndElement();
  writer.writeEndElement();
}

Fixed version (ground truth):
public void writeModel(XMLStreamWriter writer,DynamicModelImpl model) throws XMLStreamException {
  writer.writeStartElement("String_Node_Str");
  writer.writeStartElement("String_Node_Str");
  if (model.getTimeFormat().equals(DynamicModel.TimeFormat.DATETIME)) {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
 else   if (model.getTimeFormat().equals(DynamicModel.TimeFormat.DATE)) {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
  writer.writeEndElement();
  writer.writeEndElement();
}
Program: 142633
Project: 142633
Buggy source:
public void setTimeIntervalMax(String timeIntervalMax){
  if (timeFormat.equals(TimeFormat.DATE)) {
    try {
      this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
}

Fixed version (ground truth):
public void setTimeIntervalMax(String timeIntervalMax){
  if (timeFormat.equals(TimeFormat.DATE) || timeFormat.equals(TimeFormat.DATETIME)) {
    try {
      this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
}
Program: 142634
Project: 142634
Buggy source:
public void setTimeIntervalMin(String timeIntervalMin){
  if (timeFormat.equals(TimeFormat.DATE)) {
    try {
      this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
}

Fixed version (ground truth):
public void setTimeIntervalMin(String timeIntervalMin){
  if (timeFormat.equals(TimeFormat.DATE) || timeFormat.equals(TimeFormat.DATETIME)) {
    try {
      this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
}
Program: 142636
Project: 142636
Buggy source:
public void mouseExited(MouseEvent e){
  if (currentState == TimelineState.IDLE) {
    highlightedComponent=HighlightedComponent.NONE;
  }
  mouseInside=false;
  repaint();
}

Fixed version (ground truth):
public void mouseExited(MouseEvent e){
  if (currentState == TimelineState.IDLE) {
    highlightedComponent=HighlightedComponent.NONE;
    latestMousePositionX=e.getX();
    currentMousePositionX=latestMousePositionX;
  }
  mouseInside=false;
  repaint();
}
Program: 142638
Project: 142638
Buggy source:
public void mousePressed(MouseEvent e){
  if (model == null) {
    return;
  }
  int x=e.getX();
  float w=getWidth();
  int r=16;
  if (currentState == TimelineState.IDLE) {
    if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
      currentState=TimelineState.RESIZE_FROM;
    }
 else     if (inRange(x,(int)sf + r,(int)st - r)) {
      highlightedComponent=HighlightedComponent.CENTER_HOOK;
      currentState=TimelineState.MOVING;
    }
 else     if (inRange(x,(int)st - r - 1,(int)st + 1)) {
      highlightedComponent=HighlightedComponent.RIGHT_HOOK;
      currentState=TimelineState.RESIZE_TO;
    }
  }
}

Fixed version (ground truth):
public void mousePressed(MouseEvent e){
  if (model == null) {
    return;
  }
  int x=e.getX();
  latestMousePositionX=x;
  currentMousePositionX=latestMousePositionX;
  int r=16;
  if (currentState == TimelineState.IDLE) {
    if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
      currentState=TimelineState.RESIZE_FROM;
    }
 else     if (inRange(x,(int)sf + r,(int)st - r)) {
      highlightedComponent=HighlightedComponent.CENTER_HOOK;
      currentState=TimelineState.MOVING;
    }
 else     if (inRange(x,(int)st - r - 1,(int)st + 1)) {
      highlightedComponent=HighlightedComponent.RIGHT_HOOK;
      currentState=TimelineState.RESIZE_TO;
    }
  }
}
Program: 142639
Project: 142639
Buggy source:
public void mouseReleased(MouseEvent evt){
  latestMousePositionX=null;
  currentState=TimelineState.IDLE;
  this.getParent().repaint();
}

Fixed version (ground truth):
public void mouseReleased(MouseEvent evt){
  latestMousePositionX=evt.getX();
  currentMousePositionX=latestMousePositionX;
  currentState=TimelineState.IDLE;
  this.getParent().repaint();
}
Program: 142640
Project: 142640
Buggy source:
public void mouseEntered(MouseEvent e){
  latestMousePositionX=e.getX();
  currentMousePositionX=latestMousePositionX;
  mouseInside=true;
}

Fixed version (ground truth):
public void mouseEntered(MouseEvent e){
  if (currentState == TimelineState.IDLE) {
    latestMousePositionX=e.getX();
    currentMousePositionX=latestMousePositionX;
  }
  mouseInside=true;
}
Program: 142641
Project: 142641
Buggy source:
public void mouseClicked(MouseEvent e){
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent e){
  latestMousePositionX=e.getX();
  currentMousePositionX=latestMousePositionX;
}
Program: 142642
Project: 142642
Buggy source:
public void dynamicModelChanged(DynamicModelEvent event){
  if (event.getSource() == dynamicModel) {
switch (event.getEventType()) {
case VISIBLE_INTERVAL:
      fireTimelineModelEvent(new TimelineModelEvent(TimelineModelEvent.EventType.VISIBLE_INTERVAL,this,event.getData()));
    break;
case MIN_CHANGED:
  setModelMin((Double)event.getData());
break;
case MAX_CHANGED:
setModelMax((Double)event.getData());
break;
}
}
}

Fixed version (ground truth):
public void dynamicModelChanged(DynamicModelEvent event){
  if (event.getSource() == dynamicModel) {
    unit=(dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATE) || dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATETIME)) ? DateTime.class : Double.class;
switch (event.getEventType()) {
case VISIBLE_INTERVAL:
      fireTimelineModelEvent(new TimelineModelEvent(TimelineModelEvent.EventType.VISIBLE_INTERVAL,this,event.getData()));
    break;
case MIN_CHANGED:
  setModelMin((Double)event.getData());
break;
case MAX_CHANGED:
setModelMax((Double)event.getData());
break;
}
}
}
Program: 142643
Project: 142643
Buggy source:
public void setup(DynamicModel dynamicModel){
  dynamicController=Lookup.getDefault().lookup(DynamicController.class);
  this.dynamicModel=dynamicModel;
  enabled=!Double.isInfinite(dynamicModel.getVisibleInterval().getLow()) && !Double.isInfinite(dynamicModel.getVisibleInterval().getHigh());
  dynamicController.addModelListener(this);
  unit=dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATE) ? DateTime.class : null;
  customMin=Double.NEGATIVE_INFINITY;
  customMax=Double.POSITIVE_INFINITY;
  modelMin=Double.NEGATIVE_INFINITY;
  modelMax=Double.POSITIVE_INFINITY;
  setModelMin(dynamicModel.getMin());
  setModelMax(dynamicModel.getMax());
  refreshEnabled();
}

Fixed version (ground truth):
public void setup(DynamicModel dynamicModel){
  dynamicController=Lookup.getDefault().lookup(DynamicController.class);
  this.dynamicModel=dynamicModel;
  enabled=!Double.isInfinite(dynamicModel.getVisibleInterval().getLow()) && !Double.isInfinite(dynamicModel.getVisibleInterval().getHigh());
  dynamicController.addModelListener(this);
  unit=(dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATE) || dynamicModel.getTimeFormat().equals(DynamicModel.TimeFormat.DATETIME)) ? DateTime.class : Double.class;
  customMin=Double.NEGATIVE_INFINITY;
  customMax=Double.POSITIVE_INFINITY;
  modelMin=Double.NEGATIVE_INFINITY;
  modelMax=Double.POSITIVE_INFINITY;
  setModelMin(dynamicModel.getMin());
  setModelMax(dynamicModel.getMax());
  refreshEnabled();
}
Program: 142644
Project: 142644
Buggy source:
public void readModel(XMLStreamReader reader,DynamicModelImpl model) throws XMLStreamException {
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
        String val=reader.getAttributeValue(null,"String_Node_Str");
        if (val.equals("String_Node_Str")) {
          model.setTimeFormat(DynamicModel.TimeFormat.DATE);
        }
 else {
          model.setTimeFormat(DynamicModel.TimeFormat.DOUBLE);
        }
      }
    break;
case XMLStreamReader.END_ELEMENT:
  if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
    end=true;
  }
break;
}
}
}

Fixed version (ground truth):
public void readModel(XMLStreamReader reader,DynamicModelImpl model) throws XMLStreamException {
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
        String val=reader.getAttributeValue(null,"String_Node_Str");
        if (val.equalsIgnoreCase("String_Node_Str")) {
          model.setTimeFormat(DynamicModel.TimeFormat.DATE);
        }
        if (val.equalsIgnoreCase("String_Node_Str")) {
          model.setTimeFormat(DynamicModel.TimeFormat.DATETIME);
        }
 else {
          model.setTimeFormat(DynamicModel.TimeFormat.DOUBLE);
        }
      }
    break;
case XMLStreamReader.END_ELEMENT:
  if ("String_Node_Str".equalsIgnoreCase(reader.getLocalName())) {
    end=true;
  }
break;
}
}
}
Program: 142645
Project: 142645
Buggy source:
public void writeModel(XMLStreamWriter writer,DynamicModelImpl model) throws XMLStreamException {
  writer.writeStartElement("String_Node_Str");
  writer.writeStartElement("String_Node_Str");
  if (model.getTimeFormat().equals(DynamicModel.TimeFormat.DATE)) {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
  writer.writeEndElement();
  writer.writeEndElement();
}

Fixed version (ground truth):
public void writeModel(XMLStreamWriter writer,DynamicModelImpl model) throws XMLStreamException {
  writer.writeStartElement("String_Node_Str");
  writer.writeStartElement("String_Node_Str");
  if (model.getTimeFormat().equals(DynamicModel.TimeFormat.DATETIME)) {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
 else   if (model.getTimeFormat().equals(DynamicModel.TimeFormat.DATE)) {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
 else {
    writer.writeAttribute("String_Node_Str","String_Node_Str");
  }
  writer.writeEndElement();
  writer.writeEndElement();
}
Program: 142646
Project: 142646
Buggy source:
public void setTimeIntervalMax(String timeIntervalMax){
  if (timeFormat.equals(TimeFormat.DATE)) {
    try {
      this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
}

Fixed version (ground truth):
public void setTimeIntervalMax(String timeIntervalMax){
  if (timeFormat.equals(TimeFormat.DATE) || timeFormat.equals(TimeFormat.DATETIME)) {
    try {
      this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMax),Level.SEVERE));
    }
  }
}
Program: 142647
Project: 142647
Buggy source:
public void setTimeIntervalMin(String timeIntervalMin){
  if (timeFormat.equals(TimeFormat.DATE)) {
    try {
      this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
}

Fixed version (ground truth):
public void setTimeIntervalMin(String timeIntervalMin){
  if (timeFormat.equals(TimeFormat.DATE) || timeFormat.equals(TimeFormat.DATETIME)) {
    try {
      this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
 else {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str",timeIntervalMin),Level.SEVERE));
    }
  }
}
Program: 142653
Project: 142653
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.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;
    }
  }
}

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 (column.getType() == AttributeType.BOOLEAN) {
    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: 142654
Project: 142654
Buggy source:
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;
  }
}

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   if (column.getType() == AttributeType.BOOLEAN) {
    return Boolean.class;
  }
 else {
    return String.class;
  }
}
Program: 142655
Project: 142655
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;
}