nus-yam/ex-repair huggingface dataset:
Program: 142543
Project: 142543
Buggy source:
public boolean execute(){
  attributeModel=workspace.getLookup().lookup(AttributeModel.class);
  graphModel=workspace.getLookup().lookup(GraphModel.class);
  DirectedGraph graph;
  if (exportVisible) {
    graph=graphModel.getDirectedGraph();
  }
 else {
    graph=graphModel.getDirectedGraph();
  }
  progressTicket.start(graph.getNodeCount() + graph.getEdgeCount());
  if (normalize) {
    computeNormalizeValues(graph);
  }
  graph.readLock();
  try {
    exportData(graph);
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  progressTicket.finish();
  graph.readUnlock();
  return true;
}

Fixed version (ground truth):
public boolean execute(){
  attributeModel=workspace.getLookup().lookup(AttributeModel.class);
  graphModel=workspace.getLookup().lookup(GraphModel.class);
  DirectedGraph graph;
  if (exportVisible) {
    graph=graphModel.getDirectedGraph();
  }
 else {
    graph=graphModel.getDirectedGraph();
  }
  progressTicket.start(graph.getNodeCount() + graph.getEdgeCount());
  graph.readLock();
  if (normalize) {
    computeNormalizeValues(graph);
  }
  try {
    exportData(graph);
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  progressTicket.finish();
  graph.readUnlock();
  return true;
}
Program: 142545
Project: 142545
Buggy source:
private void printEdge(Edge edge) throws IOException {
  printOpen("String_Node_Str");
  printTag("String_Node_Str" + edge.getId());
  printTag("String_Node_Str" + edge.getSource().getId());
  printTag("String_Node_Str" + edge.getTarget().getId());
  if (exportLabel && edge.getEdgeData().getLabel() != null) {
    printTag("String_Node_Str" + edge.getEdgeData().getLabel() + "String_Node_Str");
  }
  if (exportEdgeSize) {
    printTag("String_Node_Str" + edge.getWeight());
  }
  if (exportNotRecognizedElements) {
    for (int i=0; i < edge.getAttributes().countValues(); i++) {
      String s=attributeModel.getEdgeTable().getColumn(i).getTitle();
      if (edge.getAttributes().getValue(i) != null && !s.equals("String_Node_Str") && !s.equals("String_Node_Str")) {
        printTag(attributeModel.getEdgeTable().getColumn(i).getTitle().replace("String_Node_Str","String_Node_Str") + "String_Node_Str" + edge.getAttributes().getValue(i)+ "String_Node_Str");
      }
    }
  }
  printClose();
  progressTicket.progress();
}

Fixed version (ground truth):
private void printEdge(Edge edge) throws IOException {
  printOpen("String_Node_Str");
  printTag("String_Node_Str" + edge.getId());
  printTag("String_Node_Str" + edge.getSource().getId());
  printTag("String_Node_Str" + edge.getTarget().getId());
  if (exportLabel && edge.getEdgeData().getLabel() != null) {
    printTag("String_Node_Str" + edge.getEdgeData().getLabel() + "String_Node_Str");
  }
  if (exportEdgeSize) {
    printTag("String_Node_Str" + edge.getWeight());
  }
  if (exportNotRecognizedElements) {
    for (int i=0; i < edge.getAttributes().countValues(); i++) {
      String s=attributeModel.getEdgeTable().getColumn(i).getTitle();
      if (edge.getAttributes().getValue(i) != null && !s.equals("String_Node_Str") && !s.equals("String_Node_Str")) {
        printTag(formatString(s) + "String_Node_Str" + edge.getAttributes().getValue(i)+ "String_Node_Str");
      }
    }
  }
  printClose();
  progressTicket.progress();
}
Program: 142546
Project: 142546
Buggy source:
public boolean execute(){
  attributeModel=workspace.getLookup().lookup(AttributeModel.class);
  graphModel=workspace.getLookup().lookup(GraphModel.class);
  DirectedGraph graph;
  if (exportVisible) {
    graph=graphModel.getDirectedGraph();
  }
 else {
    graph=graphModel.getDirectedGraph();
  }
  progressTicket.start(graph.getNodeCount() + graph.getEdgeCount());
  graph.readLock();
  if (normalize) {
    computeNormalizeValues(graph);
  }
  try {
    exportData(graph);
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  progressTicket.finish();
  graph.readUnlock();
  return true;
}

Fixed version (ground truth):
public boolean execute(){
  attributeModel=workspace.getLookup().lookup(AttributeModel.class);
  graphModel=workspace.getLookup().lookup(GraphModel.class);
  DirectedGraph graph;
  if (exportVisible) {
    graph=graphModel.getDirectedGraph();
  }
 else {
    graph=graphModel.getDirectedGraph();
  }
  progressTicket.start(graph.getNodeCount() + graph.getEdgeCount());
  graph.readLock();
  if (normalize) {
    computeNormalizeValues(graph);
  }
  try {
    exportData(graph);
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  progressTicket.finish();
  graph.readUnlock();
  return !cancel;
}
Program: 142548
Project: 142548
Buggy source:
private void importData(LineNumberReader reader) throws Exception {
  Progress.start(progressTicket);
  ArrayList list;
  StreamTokenizer tokenizer=new StreamTokenizer(reader);
  tokenizer.ordinaryChar('[');
  tokenizer.ordinaryChar(']');
  tokenizer.wordChars('_','_');
  list=parseList(tokenizer);
  boolean ret=false;
  for (int i=0; i < list.size(); i++) {
    if ("String_Node_Str".equals(list.get(i)) && list.size() >= i + 2 && list.get(i + 1) instanceof ArrayList) {
      ret=parseGraph((ArrayList)list.get(i + 1));
    }
  }
  if (!ret) {
    report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class,"String_Node_Str"),Issue.Level.SEVERE));
  }
  Progress.finish(progressTicket);
}

Fixed version (ground truth):
private void importData(LineNumberReader reader) throws Exception {
  Progress.start(progressTicket);
  ArrayList list;
  StreamTokenizer tokenizer=new StreamTokenizer(reader);
  tokenizer.ordinaryChar('[');
  tokenizer.ordinaryChar(']');
  tokenizer.wordChars('_','_');
  String allowed="String_Node_Str";
  for (int i=0; i < allowed.length(); i++)   tokenizer.wordChars(allowed.charAt(i),allowed.charAt(i));
  list=parseList(tokenizer);
  boolean ret=false;
  for (int i=0; i < list.size(); i++) {
    if ("String_Node_Str".equals(list.get(i)) && list.size() >= i + 2 && list.get(i + 1) instanceof ArrayList) {
      ret=parseGraph((ArrayList)list.get(i + 1));
    }
  }
  if (!ret) {
    report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class,"String_Node_Str"),Issue.Level.SEVERE));
  }
  Progress.finish(progressTicket);
}
Program: 142549
Project: 142549
Buggy source:
private void initTransformersUI(){
  for (  ButtonGroup bg : buttonGroups) {
    for (Enumeration<AbstractButton> btns=bg.getElements(); btns.hasMoreElements(); ) {
      AbstractButton btn=btns.nextElement();
      remove(btn);
    }
  }
  if (model != null) {
    for (    String elmtType : controller.getElementTypes()) {
      ButtonGroup buttonGroup=new ButtonGroup();
      for (      final Transformer t : model.getTransformers(elmtType)) {
        TransformerUI u=controller.getUI(t);
        if (u != null) {
          JToggleButton btn=new JToggleButton(u.getIcon());
          btn.setToolTipText(u.getDisplayName());
          btn.addActionListener(new ActionListener(){
            public void actionPerformed(            ActionEvent e){
              model.setCurrentTransformer(t);
            }
          }
);
          btn.setName(u.getDisplayName());
          btn.setFocusPainted(false);
          buttonGroup.add(btn);
          add(btn);
        }
      }
      buttonGroups.add(buttonGroup);
    }
  }
}

Fixed version (ground truth):
private void initTransformersUI(){
  for (  ButtonGroup bg : buttonGroups) {
    for (Enumeration<AbstractButton> btns=bg.getElements(); btns.hasMoreElements(); ) {
      AbstractButton btn=btns.nextElement();
      remove(btn);
    }
  }
  buttonGroups.clear();
  if (model != null) {
    for (    String elmtType : controller.getElementTypes()) {
      ButtonGroup buttonGroup=new ButtonGroup();
      for (      final Transformer t : model.getTransformers(elmtType)) {
        TransformerUI u=controller.getUI(t);
        if (u != null) {
          JToggleButton btn=new JToggleButton(u.getIcon());
          btn.setToolTipText(u.getDisplayName());
          btn.addActionListener(new ActionListener(){
            public void actionPerformed(            ActionEvent e){
              model.setCurrentTransformer(t);
            }
          }
);
          btn.setName(u.getDisplayName());
          btn.setFocusPainted(false);
          buttonGroup.add(btn);
          add(btn);
        }
      }
      buttonGroups.add(buttonGroup);
    }
  }
}
Program: 142550
Project: 142550
Buggy source:
private synchronized AttributeColumnImpl addColumn(String id,String title,AttributeType type,AttributeOrigin origin,Object defaultValue,AttributeValueDelegateProvider attributeValueDelegateProvider){
  if (title == null || title.isEmpty() || hasColumn(title)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (defaultValue != null) {
    if (defaultValue.getClass() != type.getType()) {
      if (defaultValue.getClass() == String.class) {
        defaultValue=type.parse((String)defaultValue);
      }
 else {
        throw new IllegalArgumentException("String_Node_Str");
      }
    }
    defaultValue=model.getManagedValue(defaultValue,type);
  }
  AttributeColumnImpl column=new AttributeColumnImpl(this,columns.size(),id,title,type,origin,defaultValue,attributeValueDelegateProvider);
  columns.add(column);
  columnsMap.put(id,column);
  if (title != null && !title.equals(id)) {
    columnsMap.put(title.toLowerCase(),column);
  }
  columnsSet.put(column,column);
  version++;
  model.fireAttributeEvent(new ColumnEvent(AttributeEvent.EventType.ADD_COLUMN,column));
  return column;
}

Fixed version (ground truth):
private synchronized AttributeColumnImpl addColumn(String id,String title,AttributeType type,AttributeOrigin origin,Object defaultValue,AttributeValueDelegateProvider attributeValueDelegateProvider){
  if (title == null || title.isEmpty() || hasColumn(title)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (defaultValue != null) {
    if (defaultValue.getClass() != type.getType()) {
      if (defaultValue.getClass() == String.class) {
        defaultValue=type.parse((String)defaultValue);
      }
 else {
        throw new IllegalArgumentException("String_Node_Str");
      }
    }
    defaultValue=model.getManagedValue(defaultValue,type);
  }
  AttributeColumnImpl column=new AttributeColumnImpl(this,columns.size(),id,title,type,origin,defaultValue,attributeValueDelegateProvider);
  columns.add(column);
  columnsMap.put(id,column);
  if (title != null && !title.equals(id)) {
    columnsMap.put(title,column);
  }
  columnsSet.put(column,column);
  version++;
  model.fireAttributeEvent(new ColumnEvent(AttributeEvent.EventType.ADD_COLUMN,column));
  return column;
}
Program: 142551
Project: 142551
Buggy source:
public boolean add(int node){
  nodes.addLast(new Integer(node));
  weightSum+=structure.weights[node];
  if (!isRandomized) {
    min=Math.min(node,min);
  }
  return true;
}

Fixed version (ground truth):
public boolean add(int node){
  nodes.addLast(new Integer(node));
  weightSum+=structure.weights[node];
  return true;
}
Program: 142552
Project: 142552
Buggy source:
public void seed(int node){
  nodes.add(node);
  weightSum+=structure.weights[node];
  min=node;
}

Fixed version (ground truth):
public void seed(int node){
  nodes.add(node);
  weightSum+=structure.weights[node];
}
Program: 142553
Project: 142553
Buggy source:
private void zoomOut(){
  int M=communities.size();
  LinkedList<ModEdge>[] newTopology=new LinkedList[M];
  int index=0;
  nodeCommunities=new Community[M];
  nodeConnections=new HashMap[M];
  HashMap<Integer,Community> newInvMap=new HashMap<Integer,Community>();
  for (int i=0; i < communities.size(); i++) {
    Community com=communities.get(i);
    nodeConnections[index]=new HashMap<Community,Integer>();
    newTopology[index]=new LinkedList<ModEdge>();
    nodeCommunities[index]=new Community(com);
    Set<Community> iter=com.connections.keySet();
    double weightSum=0;
    Community hidden=new Community(structure);
    for (    Integer nodeInt : com.nodes) {
      Community oldHidden=invMap.get(nodeInt);
      hidden.nodes.addAll(oldHidden.nodes);
    }
    newInvMap.put(index,hidden);
    for (    Community adjCom : iter) {
      int target=communities.indexOf(adjCom);
      int weight=com.connections.get(adjCom);
      weightSum+=weight;
      ModEdge e=new ModEdge(index,target,weight);
      newTopology[index].add(e);
    }
    weights[index]=weightSum;
    nodeCommunities[index].seed(index);
    index++;
  }
  communities.clear();
  for (int i=0; i < M; i++) {
    Community com=nodeCommunities[i];
    communities.add(com);
    for (    ModEdge e : newTopology[i]) {
      nodeConnections[i].put(nodeCommunities[e.target],e.weight);
      com.connections.put(nodeCommunities[e.target],e.weight);
    }
  }
  N=M;
  topology=newTopology;
  invMap=newInvMap;
}

Fixed version (ground truth):
private void zoomOut(){
  int M=communities.size();
  LinkedList<ModEdge>[] newTopology=new LinkedList[M];
  int index=0;
  nodeCommunities=new Community[M];
  nodeConnections=new HashMap[M];
  HashMap<Integer,Community> newInvMap=new HashMap<Integer,Community>();
  for (int i=0; i < communities.size(); i++) {
    Community com=communities.get(i);
    nodeConnections[index]=new HashMap<Community,Integer>();
    newTopology[index]=new LinkedList<ModEdge>();
    nodeCommunities[index]=new Community(com);
    Set<Community> iter=com.connections.keySet();
    double weightSum=0;
    Community hidden=new Community(structure);
    for (    Integer nodeInt : com.nodes) {
      Community oldHidden=invMap.get(nodeInt);
      hidden.nodes.addAll(oldHidden.nodes);
    }
    newInvMap.put(index,hidden);
    for (    Community adjCom : iter) {
      int target=communities.indexOf(adjCom);
      int weight=com.connections.get(adjCom);
      if (target == index)       weightSum+=2 * weight;
 else       weightSum+=weight;
      ModEdge e=new ModEdge(index,target,weight);
      newTopology[index].add(e);
    }
    weights[index]=weightSum;
    nodeCommunities[index].seed(index);
    index++;
  }
  communities.clear();
  for (int i=0; i < M; i++) {
    Community com=nodeCommunities[i];
    communities.add(com);
    for (    ModEdge e : newTopology[i]) {
      nodeConnections[i].put(nodeCommunities[e.target],e.weight);
      com.connections.put(nodeCommunities[e.target],e.weight);
    }
  }
  N=M;
  topology=newTopology;
  invMap=newInvMap;
}
Program: 142555
Project: 142555
Buggy source:
public boolean remove(int node){
  boolean result=nodes.remove(new Integer(node));
  weightSum-=structure.weights[node];
  if (nodes.size() == 0) {
    structure.communities.remove(this);
  }
  if (!isRandomized) {
    if (node == min.intValue()) {
      min=Integer.MAX_VALUE;
      for (      Integer other : nodes) {
        min=Math.min(other,min);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
public boolean remove(int node){
  boolean result=nodes.remove(new Integer(node));
  weightSum-=structure.weights[node];
  if (nodes.size() == 0) {
    structure.communities.remove(this);
  }
  return result;
}
Program: 142556
Project: 142556
Buggy source:
private double q(int node,Community community){
  Integer edgesToInt=structure.nodeConnections[node].get(community);
  double edgesTo=0;
  if (edgesToInt != null) {
    edgesTo=edgesToInt.doubleValue();
  }
  double weightSum=community.weightSum;
  double nodeWeight=structure.weights[node];
  double qValue=edgesTo - (nodeWeight * weightSum) / (2.0 * structure.graphWeightSum);
  if ((structure.nodeCommunities[node] == community) && (structure.nodeCommunities[node].size() > 1)) {
    qValue=edgesTo - (nodeWeight * (weightSum - nodeWeight)) / (2.0 * structure.graphWeightSum);
  }
  return qValue;
}

Fixed version (ground truth):
private double q(int node,Community community){
  Integer edgesToInt=structure.nodeConnections[node].get(community);
  double edgesTo=0;
  if (edgesToInt != null) {
    edgesTo=edgesToInt.doubleValue();
  }
  double weightSum=community.weightSum;
  double nodeWeight=structure.weights[node];
  double qValue=edgesTo - (nodeWeight * weightSum) / (2.0 * structure.graphWeightSum);
  if ((structure.nodeCommunities[node] == community) && (structure.nodeCommunities[node].size() > 1)) {
    qValue=edgesTo - (nodeWeight * (weightSum - nodeWeight)) / (2.0 * structure.graphWeightSum);
  }
  if ((structure.nodeCommunities[node] == community) && (structure.nodeCommunities[node].size() == 1)) {
    qValue=0.;
  }
  return qValue;
}
Program: 142560
Project: 142560
Buggy source:
public boolean execute(){
  GraphModel graphModel=workspace.getLookup().lookup(GraphModel.class);
  Graph graph=null;
  if (exportVisible) {
    graph=graphModel.getGraphVisible();
  }
 else {
    graph=graphModel.getGraph();
  }
  try {
    exportData(graph);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return !cancel;
}

Fixed version (ground truth):
public boolean execute(){
  GraphModel graphModel=workspace.getLookup().lookup(GraphModel.class);
  HierarchicalGraph graph=null;
  if (exportVisible) {
    graph=graphModel.getHierarchicalGraphVisible();
  }
 else {
    graph=graphModel.getHierarchicalGraph();
  }
  try {
    exportData(graph);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return !cancel;
}
Program: 142561
Project: 142561
Buggy source:
private void exportData(Graph graph) throws Exception {
  int max=graph.getNodeCount(), i=1;
  HashMap<Integer,Integer> idx=new HashMap<Integer,Integer>(3 * max / 2 + 1);
  Progress.start(progressTicket,max);
  writer.append("String_Node_Str" + max + "String_Node_Str");
  for (  Node node : graph.getNodes()) {
    writer.append(Integer.toString(i));
    writer.append("String_Node_Str" + node.getNodeData().getLabel() + "String_Node_Str");
    if (nodeCoords) {
      writer.append("String_Node_Str" + node.getNodeData().x() + "String_Node_Str"+ node.getNodeData().y()+ "String_Node_Str"+ node.getNodeData().z());
    }
    writer.append("String_Node_Str");
    idx.put(node.getId(),i++);
  }
  if (graph instanceof UndirectedGraph) {
    writer.append("String_Node_Str");
  }
 else {
    writer.append("String_Node_Str");
  }
  for (  Edge edge : graph.getEdges()) {
    if (cancel) {
      break;
    }
    if (edge != null) {
      writer.append(Integer.toString(idx.get(edge.getSource().getId())) + "String_Node_Str");
      writer.append(Integer.toString(idx.get(edge.getTarget().getId())));
      if (edgeWeight) {
        writer.append("String_Node_Str" + edge.getWeight());
      }
      writer.append("String_Node_Str");
    }
    Progress.progress(progressTicket);
  }
  graph.readUnlockAll();
  Progress.finish(progressTicket);
}

Fixed version (ground truth):
private void exportData(HierarchicalGraph graph) throws Exception {
  int max=graph.getNodeCount(), i=1;
  HashMap<String,Integer> idx=new HashMap<String,Integer>(3 * max / 2 + 1);
  Progress.start(progressTicket,max);
  graph.readLock();
  writer.append("String_Node_Str" + max + "String_Node_Str");
  for (  Node node : graph.getNodes()) {
    writer.append(Integer.toString(i));
    writer.append("String_Node_Str" + node.getNodeData().getLabel() + "String_Node_Str");
    if (nodeCoords) {
      writer.append("String_Node_Str" + node.getNodeData().x() + "String_Node_Str"+ node.getNodeData().y()+ "String_Node_Str"+ node.getNodeData().z());
    }
    writer.append("String_Node_Str");
    idx.put(node.getNodeData().getId(),i++);
  }
  if (graph instanceof UndirectedGraph) {
    writer.append("String_Node_Str");
  }
 else {
    writer.append("String_Node_Str");
  }
  for (  Edge edge : graph.getEdges()) {
    if (cancel) {
      break;
    }
    if (edge != null) {
      writer.append(Integer.toString(idx.get(edge.getSource().getNodeData().getId())) + "String_Node_Str");
      writer.append(Integer.toString(idx.get(edge.getTarget().getNodeData().getId())));
      if (edgeWeight) {
        writer.append("String_Node_Str" + edge.getWeight());
      }
      writer.append("String_Node_Str");
    }
    Progress.progress(progressTicket);
  }
  graph.readUnlockAll();
  Progress.finish(progressTicket);
}
Program: 142562
Project: 142562
Buggy source:
public String getReport(){
  Map<Double,Integer> dist=new HashMap<Double,Integer>();
  for (int i=0; i < N; i++) {
    Double d=nodeClustering[i];
    if (dist.containsKey(d)) {
      Integer v=dist.get(d);
      dist.put(d,v + 1);
    }
 else {
      dist.put(d,1);
    }
  }
  XYSeries dSeries=ChartUtils.createXYSeries(dist,"String_Node_Str");
  XYSeriesCollection dataset=new XYSeriesCollection();
  dataset.addSeries(dSeries);
  JFreeChart chart=ChartFactory.createScatterPlot("String_Node_Str","String_Node_Str","String_Node_Str",dataset,PlotOrientation.VERTICAL,true,false,false);
  ChartUtils.decorateChart(chart);
  ChartUtils.scaleChart(chart,dSeries,false);
  String imageFile=ChartUtils.renderChart(chart,"String_Node_Str");
  NumberFormat f=new DecimalFormat("String_Node_Str");
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + (isDirected ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ f.format(avgClusteringCoeff)+ "String_Node_Str"+ imageFile+ "String_Node_Str"+ "String_Node_Str";
}

Fixed version (ground truth):
public String getReport(){
  Map<Double,Integer> dist=new HashMap<Double,Integer>();
  for (int i=0; i < N; i++) {
    Double d=nodeClustering[i];
    if (dist.containsKey(d)) {
      Integer v=dist.get(d);
      dist.put(d,v + 1);
    }
 else {
      dist.put(d,1);
    }
  }
  XYSeries dSeries=ChartUtils.createXYSeries(dist,"String_Node_Str");
  XYSeriesCollection dataset=new XYSeriesCollection();
  dataset.addSeries(dSeries);
  JFreeChart chart=ChartFactory.createScatterPlot("String_Node_Str","String_Node_Str","String_Node_Str",dataset,PlotOrientation.VERTICAL,true,false,false);
  ChartUtils.decorateChart(chart);
  ChartUtils.scaleChart(chart,dSeries,false);
  String imageFile=ChartUtils.renderChart(chart,"String_Node_Str");
  NumberFormat f=new DecimalFormat("String_Node_Str");
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + (isDirected ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ f.format(avgClusteringCoeff)+ "String_Node_Str"+ "String_Node_Str"+ totalTriangles+ "String_Node_Str"+ "String_Node_Str"+ imageFile+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
}
Program: 142563
Project: 142563
Buggy source:
public void execute(HierarchicalGraph hgraph,AttributeModel attributeModel){
  isCanceled=false;
  bruteForce(hgraph,attributeModel);
}

Fixed version (ground truth):
public void execute(HierarchicalGraph hgraph,AttributeModel attributeModel){
  isCanceled=false;
  triangles(hgraph,attributeModel);
}
Program: 142565
Project: 142565
Buggy source:
public String getReport(){
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + (isDirected ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ componentCount+ "String_Node_Str"+ (isDirected ? "String_Node_Str" + stronglyCount + "String_Node_Str" : "String_Node_Str")+ "String_Node_Str";
  return report;
}

Fixed version (ground truth):
public String getReport(){
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + (isDirected ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ componentCount+ "String_Node_Str"+ (isDirected ? "String_Node_Str" + stronglyCount + "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  return report;
}
Program: 142566
Project: 142566
Buggy source:
/** 
 * @return
 */
public String getReport(){
  String htmlIMG1="String_Node_Str";
  String htmlIMG2="String_Node_Str";
  String htmlIMG3="String_Node_Str";
  try {
    TempDir tempDir=TempDirUtils.createTempDir();
    htmlIMG1=createImageFile(tempDir,betweenness,"String_Node_Str","String_Node_Str","String_Node_Str");
    htmlIMG2=createImageFile(tempDir,closeness,"String_Node_Str","String_Node_Str","String_Node_Str");
    htmlIMG3=createImageFile(tempDir,eccentricity,"String_Node_Str","String_Node_Str","String_Node_Str");
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + (isDirected ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ diameter+ "String_Node_Str"+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ avgDist+ "String_Node_Str"+ "String_Node_Str"+ shortestPaths+ "String_Node_Str"+ htmlIMG1+ "String_Node_Str"+ htmlIMG2+ "String_Node_Str"+ htmlIMG3+ "String_Node_Str";
  return report;
}

Fixed version (ground truth):
/** 
 * @return
 */
public String getReport(){
  String htmlIMG1="String_Node_Str";
  String htmlIMG2="String_Node_Str";
  String htmlIMG3="String_Node_Str";
  try {
    TempDir tempDir=TempDirUtils.createTempDir();
    htmlIMG1=createImageFile(tempDir,betweenness,"String_Node_Str","String_Node_Str","String_Node_Str");
    htmlIMG2=createImageFile(tempDir,closeness,"String_Node_Str","String_Node_Str","String_Node_Str");
    htmlIMG3=createImageFile(tempDir,eccentricity,"String_Node_Str","String_Node_Str","String_Node_Str");
  }
 catch (  IOException ex) {
    Exceptions.printStackTrace(ex);
  }
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + (isDirected ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ diameter+ "String_Node_Str"+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ avgDist+ "String_Node_Str"+ "String_Node_Str"+ shortestPaths+ "String_Node_Str"+ htmlIMG1+ "String_Node_Str"+ htmlIMG2+ "String_Node_Str"+ htmlIMG3+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  return report;
}
Program: 142568
Project: 142568
Buggy source:
public String getReport(){
  NumberFormat f=new DecimalFormat("String_Node_Str");
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (isRandomized ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ f.format(modularity)+ "String_Node_Str"+ "String_Node_Str"+ structure.communities.size()+ "String_Node_Str";
  return report;
}

Fixed version (ground truth):
public String getReport(){
  NumberFormat f=new DecimalFormat("String_Node_Str");
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (isRandomized ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ f.format(modularity)+ "String_Node_Str"+ "String_Node_Str"+ structure.communities.size()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  return report;
}
Program: 142569
Project: 142569
Buggy source:
/** 
 * @return
 */
public String getReport(){
  Map<Double,Integer> dist=new HashMap<Double,Integer>();
  for (int i=0; i < pageranks.length; i++) {
    Double d=pageranks[i];
    if (dist.containsKey(d)) {
      Integer v=dist.get(d);
      dist.put(d,v + 1);
    }
 else {
      dist.put(d,1);
    }
  }
  XYSeries dSeries=ChartUtils.createXYSeries(dist,"String_Node_Str");
  XYSeriesCollection dataset=new XYSeriesCollection();
  dataset.addSeries(dSeries);
  JFreeChart chart=ChartFactory.createXYLineChart("String_Node_Str","String_Node_Str","String_Node_Str",dataset,PlotOrientation.VERTICAL,true,false,false);
  ChartUtils.decorateChart(chart);
  ChartUtils.scaleChart(chart,dSeries,true);
  String imageFile=ChartUtils.renderChart(chart,"String_Node_Str");
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + epsilon + "String_Node_Str"+ "String_Node_Str"+ probability+ "String_Node_Str"+ imageFile+ "String_Node_Str";
  return report;
}

Fixed version (ground truth):
/** 
 * @return
 */
public String getReport(){
  Map<Double,Integer> dist=new HashMap<Double,Integer>();
  for (int i=0; i < pageranks.length; i++) {
    Double d=pageranks[i];
    if (dist.containsKey(d)) {
      Integer v=dist.get(d);
      dist.put(d,v + 1);
    }
 else {
      dist.put(d,1);
    }
  }
  XYSeries dSeries=ChartUtils.createXYSeries(dist,"String_Node_Str");
  XYSeriesCollection dataset=new XYSeriesCollection();
  dataset.addSeries(dSeries);
  JFreeChart chart=ChartFactory.createXYLineChart("String_Node_Str","String_Node_Str","String_Node_Str",dataset,PlotOrientation.VERTICAL,true,false,false);
  ChartUtils.decorateChart(chart);
  ChartUtils.scaleChart(chart,dSeries,true);
  String imageFile=ChartUtils.renderChart(chart,"String_Node_Str");
  String report="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + epsilon + "String_Node_Str"+ "String_Node_Str"+ probability+ "String_Node_Str"+ imageFile+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  return report;
}
Program: 142571
Project: 142571
Buggy source:
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;
    }
  }
}

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) {
    int position=inPosition(x,r);
switch (position) {
case LOC_RESIZE_FROM:
      highlightedComponent=HighlightedComponent.LEFT_HOOK;
    currentState=TimelineState.RESIZE_FROM;
  break;
case LOC_RESIZE_CENTER:
highlightedComponent=HighlightedComponent.CENTER_HOOK;
currentState=TimelineState.MOVING;
break;
case LOC_RESIZE_TO:
highlightedComponent=HighlightedComponent.RIGHT_HOOK;
currentState=TimelineState.RESIZE_TO;
break;
default :
break;
}
}
}
Program: 142572
Project: 142572
Buggy source:
public void mouseMoved(MouseEvent evt){
  if (model == null) {
    return;
  }
  currentMousePositionX=evt.getX();
  int x=currentMousePositionX;
  float w=getWidth();
  int r=settings.selection.visibleHookWidth;
  HighlightedComponent old=highlightedComponent;
  Cursor newCursor=null;
  int a=0;
  if (inRange(x,(int)sf - 1,(int)sf + r + 1)) {
    newCursor=CURSOR_LEFT_HOOK;
    highlightedComponent=HighlightedComponent.LEFT_HOOK;
  }
 else   if (inRange(x,(int)sf + r,(int)st - r)) {
    highlightedComponent=HighlightedComponent.CENTER_HOOK;
    newCursor=CURSOR_CENTRAL_HOOK;
  }
 else   if (inRange(x,(int)st - r - 1,(int)st + 1)) {
    highlightedComponent=HighlightedComponent.RIGHT_HOOK;
    newCursor=CURSOR_RIGHT_HOOK;
  }
 else {
    highlightedComponent=HighlightedComponent.NONE;
    newCursor=CURSOR_DEFAULT;
  }
  if (newCursor != getCursor()) {
    setCursor(newCursor);
  }
  repaint();
}

Fixed version (ground truth):
public void mouseMoved(MouseEvent evt){
  if (model == null) {
    return;
  }
  currentMousePositionX=evt.getX();
  int x=currentMousePositionX;
  float w=getWidth();
  int r=settings.selection.visibleHookWidth;
  HighlightedComponent old=highlightedComponent;
  Cursor newCursor=null;
  int a=0;
  int position=inPosition(x,r);
switch (position) {
case LOC_RESIZE_FROM:
    newCursor=CURSOR_LEFT_HOOK;
  highlightedComponent=HighlightedComponent.LEFT_HOOK;
break;
case LOC_RESIZE_CENTER:
highlightedComponent=HighlightedComponent.CENTER_HOOK;
newCursor=CURSOR_CENTRAL_HOOK;
break;
case LOC_RESIZE_TO:
highlightedComponent=HighlightedComponent.RIGHT_HOOK;
newCursor=CURSOR_RIGHT_HOOK;
break;
default :
highlightedComponent=HighlightedComponent.NONE;
newCursor=CURSOR_DEFAULT;
break;
}
if (newCursor != getCursor()) {
setCursor(newCursor);
}
repaint();
}
Program: 142573
Project: 142573
Buggy source:
public void actionPerformed(ActionEvent e){
  ExporterUI exporterUI=exportController.getExportController().getUI(selectedExporter);
  if (exporterUI != null) {
    JPanel panel=exporterUI.getPanel();
    exporterUI.setup(selectedExporter);
    DialogDescriptor dd=new DialogDescriptor(panel,NbBundle.getMessage(GraphFileExporterUI.class,"String_Node_Str",selectedBuilder.getName()));
    Object result=DialogDisplayer.getDefault().notify(dd);
    exporterUI.unsetup(result == NotifyDescriptor.OK_OPTION);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  ExporterUI exporterUI=exportController.getExportController().getUI(selectedExporter);
  if (exporterUI != null) {
    JPanel panel=exporterUI.getPanel();
    exporterUI.setup(selectedExporter);
    DialogDescriptor dd=new DialogDescriptor(panel,NbBundle.getMessage(GraphFileExporterUI.class,"String_Node_Str",selectedBuilder.getName()));
    TopDialog topDialog=new TopDialog(dialog,dd.getTitle(),dd.isModal(),dd,dd.getClosingOptions(),dd.getButtonListener());
    topDialog.setVisible(true);
    Object result=(dd.getValue() != null) ? dd.getValue() : NotifyDescriptor.CLOSED_OPTION;
    exporterUI.unsetup(result == NotifyDescriptor.OK_OPTION);
  }
}
Program: 142575
Project: 142575
Buggy source:
@Override protected JDialog createDialog(Component parent) throws HeadlessException {
  JDialog dialog=super.createDialog(parent);
  dialog.setSize(640,480);
  dialog.setResizable(true);
  Component c=dialog.getContentPane().getComponent(0);
  if (c != null && c instanceof JComponent) {
    Insets insets=((JComponent)c).getInsets();
    southPanel.setBorder(BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right));
  }
  dialog.getContentPane().add(southPanel,BorderLayout.SOUTH);
  return dialog;
}

Fixed version (ground truth):
@Override protected JDialog createDialog(Component parent) throws HeadlessException {
  dialog=super.createDialog(parent);
  dialog.setSize(640,480);
  dialog.setResizable(true);
  Component c=dialog.getContentPane().getComponent(0);
  if (c != null && c instanceof JComponent) {
    Insets insets=((JComponent)c).getInsets();
    southPanel.setBorder(BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right));
  }
  dialog.getContentPane().add(southPanel,BorderLayout.SOUTH);
  return dialog;
}
Program: 142576
Project: 142576
Buggy source:
private PreviewTopComponent(){
  initComponents();
  setName(NbBundle.getMessage(PreviewTopComponent.class,"String_Node_Str"));
  setIcon(ImageUtilities.loadImage(ICON_PATH));
  if (UIUtils.isAquaLookAndFeel()) {
    previewPanel.setBackground(UIManager.getColor("String_Node_Str"));
  }
  if (UIUtils.isAquaLookAndFeel()) {
    southToolbar.setBackground(UIManager.getColor("String_Node_Str"));
  }
  bannerPanel.setVisible(false);
  sketch=new ProcessingPreview();
  sketchPanel.add(sketch,BorderLayout.CENTER);
  Thread initProcessing=new Thread(new Runnable(){
    public void run(){
      try {
        Thread.sleep(200);
      }
 catch (      InterruptedException ex) {
        Exceptions.printStackTrace(ex);
      }
      SwingUtilities.invokeLater(new Runnable(){
        public void run(){
          sketch.init();
          sketch.registerPost(processingListener);
          sketch.registerPre(processingListener);
        }
      }
);
    }
  }
);
  initProcessing.start();
  PreviewUIController.findInstance();
  ((JColorButton)backgroundButton).addPropertyChangeListener(JColorButton.EVENT_COLOR,new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      PreviewController controller=Lookup.getDefault().lookup(PreviewController.class);
      controller.setBackgroundColor((Color)evt.getNewValue());
    }
  }
);
  southBusyLabel.setVisible(false);
  resetZoomButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      sketch.resetZoom();
    }
  }
);
}

Fixed version (ground truth):
private PreviewTopComponent(){
  initComponents();
  setName(NbBundle.getMessage(PreviewTopComponent.class,"String_Node_Str"));
  setIcon(ImageUtilities.loadImage(ICON_PATH));
  if (UIUtils.isAquaLookAndFeel()) {
    previewPanel.setBackground(UIManager.getColor("String_Node_Str"));
  }
  if (UIUtils.isAquaLookAndFeel()) {
    southToolbar.setBackground(UIManager.getColor("String_Node_Str"));
  }
  bannerPanel.setVisible(false);
  sketch=new ProcessingPreview();
  sketch.init();
  sketch.registerPost(processingListener);
  sketch.registerPre(processingListener);
  sketchPanel.add(sketch,BorderLayout.CENTER);
  PreviewUIController.findInstance();
  ((JColorButton)backgroundButton).addPropertyChangeListener(JColorButton.EVENT_COLOR,new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent evt){
      PreviewController controller=Lookup.getDefault().lookup(PreviewController.class);
      controller.setBackgroundColor((Color)evt.getNewValue());
    }
  }
);
  southBusyLabel.setVisible(false);
  resetZoomButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      sketch.resetZoom();
    }
  }
);
}
Program: 142578
Project: 142578
Buggy source:
@Override protected JDialog createDialog(Component parent) throws HeadlessException {
  JDialog dialog=super.createDialog(parent);
  Component c=dialog.getContentPane().getComponent(0);
  if (c != null && c instanceof JComponent) {
    Insets insets=((JComponent)c).getInsets();
    southPanel.setBorder(BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right));
  }
  dialog.getContentPane().add(southPanel,BorderLayout.SOUTH);
  return dialog;
}

Fixed version (ground truth):
@Override protected JDialog createDialog(Component parent) throws HeadlessException {
  JDialog dialog=super.createDialog(parent);
  dialog.setSize(640,480);
  dialog.setResizable(true);
  Component c=dialog.getContentPane().getComponent(0);
  if (c != null && c instanceof JComponent) {
    Insets insets=((JComponent)c).getInsets();
    southPanel.setBorder(BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right));
  }
  dialog.getContentPane().add(southPanel,BorderLayout.SOUTH);
  return dialog;
}
Program: 142579
Project: 142579
Buggy source:
@Override public Connection getConnection(String connectionUrl,String username,String passwd) throws SQLException {
  return DriverManager.getConnection(connectionUrl,username,passwd);
}

Fixed version (ground truth):
@Override public Connection getConnection(String connectionUrl,String username,String passwd) throws SQLException {
  if (!connectionUrl.contains("String_Node_Str")) {
    String dbname=connectionUrl.substring(connectionUrl.lastIndexOf('/') + 1);
    String url=connectionUrl.substring(0,connectionUrl.lastIndexOf('/'));
    connectionUrl=url + "String_Node_Str" + dbname;
  }
  return DriverManager.getConnection(connectionUrl,username,passwd);
}
Program: 142580
Project: 142580
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().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;
}

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);
  }
 else {
    result.removeAll(nodes);
  }
  for (  Node node : hgraph.getNodes().toArray()) {
    if (!result.contains(node)) {
      hgraph.removeNode(node);
    }
  }
  return hgraph;
}
Program: 142581
Project: 142581
Buggy source:
private void attributesEdgeColumns(AttributeModel attributeModel){
  List<AttributeColumn> cols=new ArrayList<AttributeColumn>();
  if (attributeModel != null) {
    for (    AttributeColumn column : attributeModel.getEdgeTable().getColumns()) {
      if (!isEdgeDefaultColumn(column.getId())) {
        cols.add(column);
      }
    }
  }
  edgeColumns=cols.toArray(new AttributeColumn[0]);
}

Fixed version (ground truth):
private void attributesEdgeColumns(AttributeModel attributeModel){
  List<AttributeColumn> cols=new ArrayList<AttributeColumn>();
  if (exportAttributes && attributeModel != null) {
    for (    AttributeColumn column : attributeModel.getEdgeTable().getColumns()) {
      if (!isEdgeDefaultColumn(column.getId())) {
        cols.add(column);
      }
    }
  }
  edgeColumns=cols.toArray(new AttributeColumn[0]);
}
Program: 142582
Project: 142582
Buggy source:
private void attributesNodeColumns(AttributeModel attributeModel){
  List<AttributeColumn> cols=new ArrayList<AttributeColumn>();
  if (attributeModel != null) {
    for (    AttributeColumn column : attributeModel.getNodeTable().getColumns()) {
      if (!isNodeDefaultColumn(column.getId())) {
        cols.add(column);
      }
    }
  }
  nodeColumns=cols.toArray(new AttributeColumn[0]);
}

Fixed version (ground truth):
private void attributesNodeColumns(AttributeModel attributeModel){
  List<AttributeColumn> cols=new ArrayList<AttributeColumn>();
  if (exportAttributes && attributeModel != null) {
    for (    AttributeColumn column : attributeModel.getNodeTable().getColumns()) {
      if (!isNodeDefaultColumn(column.getId())) {
        cols.add(column);
      }
    }
  }
  nodeColumns=cols.toArray(new AttributeColumn[0]);
}
Program: 142583
Project: 142583
Buggy source:
public Float getUpperFloat(){
  return upperFloat;
}

Fixed version (ground truth):
public Float getUpperFloat(){
  return (Float)upperNumber;
}
Program: 142584
Project: 142584
Buggy source:
public boolean isInRange(Object value){
  if (rangeType == Double.class) {
    return isInRange((Double)value);
  }
 else   if (rangeType == Float.class) {
    return isInRange((Float)value);
  }
 else   if (rangeType == Integer.class) {
    return isInRange((Integer)value);
  }
 else   if (rangeType == Long.class) {
    return isInRange((Long)value);
  }
  return false;
}

Fixed version (ground truth):
public boolean isInRange(Number value){
  if (rangeType == Double.class) {
    return isInRange((Double)value);
  }
 else   if (rangeType == Float.class) {
    return isInRange((Float)value);
  }
 else   if (rangeType == Integer.class) {
    return isInRange((Integer)value);
  }
 else   if (rangeType == Long.class) {
    return isInRange((Long)value);
  }
 else   if (rangeType == Byte.class) {
    return isInRange((Byte)value);
  }
 else   if (rangeType == Short.class) {
    return isInRange((Short)value);
  }
  return false;
}
Program: 142585
Project: 142585
Buggy source:
public Object getUpperBound(){
  if (rangeType == Double.class) {
    return upperDouble;
  }
 else   if (rangeType == Float.class) {
    return upperFloat;
  }
 else   if (rangeType == Integer.class) {
    return upperInteger;
  }
 else   if (rangeType == Long.class) {
    return upperLong;
  }
  return null;
}

Fixed version (ground truth):
public Object getUpperBound(){
  return upperNumber;
}
Program: 142586
Project: 142586
Buggy source:
public Range(Object lowerBound,Object upperBound){
  if (lowerBound instanceof Double) {
    lowerDouble=(Double)lowerBound;
    upperDouble=(Double)upperBound;
    rangeType=Double.class;
  }
 else   if (lowerBound instanceof Float) {
    lowerFloat=(Float)lowerBound;
    upperFloat=(Float)upperBound;
    rangeType=Float.class;
  }
 else   if (lowerBound instanceof Integer) {
    lowerInteger=(Integer)lowerBound;
    upperInteger=(Integer)upperBound;
    rangeType=Integer.class;
  }
 else   if (lowerBound instanceof Long) {
    lowerLong=(Long)lowerBound;
    upperLong=(Long)upperBound;
    rangeType=Long.class;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
public Range(Number lowerBound,Number upperBound,Number min,Number max){
  this(lowerBound,upperBound);
  if (!min.getClass().equals(lowerBound.getClass()) || !min.getClass().equals(max.getClass())) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.min=min;
  this.max=max;
}
Program: 142587
Project: 142587
Buggy source:
public Double getLowerDouble(){
  return lowerDouble;
}

Fixed version (ground truth):
public Double getLowerDouble(){
  return (Double)lowerNumber;
}
Program: 142588
Project: 142588
Buggy source:
public Float getLowerFloat(){
  return lowerFloat;
}

Fixed version (ground truth):
public Float getLowerFloat(){
  return (Float)lowerNumber;
}
Program: 142589
Project: 142589
Buggy source:
public Integer getUpperInteger(){
  return upperInteger;
}

Fixed version (ground truth):
public Integer getUpperInteger(){
  return (Integer)upperNumber;
}
Program: 142590
Project: 142590
Buggy source:
public Integer getLowerInteger(){
  return lowerInteger;
}

Fixed version (ground truth):
public Integer getLowerInteger(){
  return (Integer)lowerNumber;
}
Program: 142591
Project: 142591
Buggy source:
public Double getUpperDouble(){
  return upperDouble;
}

Fixed version (ground truth):
public Double getUpperDouble(){
  return (Double)upperNumber;
}
Program: 142592
Project: 142592
Buggy source:
@Override public String toString(){
  if (rangeType == Double.class) {
    return lowerDouble.toString() + "String_Node_Str" + upperDouble.toString();
  }
 else   if (rangeType == Float.class) {
    return lowerFloat.toString() + "String_Node_Str" + upperFloat.toString();
  }
 else   if (rangeType == Integer.class) {
    return lowerInteger.toString() + "String_Node_Str" + upperInteger.toString();
  }
 else   if (rangeType == Long.class) {
    return lowerLong.toString() + "String_Node_Str" + upperLong.toString();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return lowerNumber + "String_Node_Str" + upperNumber;
}
Program: 142593
Project: 142593
Buggy source:
public Object getLowerBound(){
  if (rangeType == Double.class) {
    return lowerDouble;
  }
 else   if (rangeType == Float.class) {
    return lowerFloat;
  }
 else   if (rangeType == Integer.class) {
    return lowerInteger;
  }
 else   if (rangeType == Long.class) {
    return lowerLong;
  }
  return null;
}

Fixed version (ground truth):
public Number getLowerBound(){
  return lowerNumber;
}
Program: 142594
Project: 142594
Buggy source:
public Long getUpperLong(){
  return upperLong;
}

Fixed version (ground truth):
public Long getUpperLong(){
  return (Long)upperNumber;
}