nus-yam/ex-repair huggingface dataset:
Program: 142713
Project: 142713
Buggy source:
public Class getColumnClass(){
  if (useSparklines && AttributeUtils.getDefault().isNumberListColumn(column)) {
    return NumberList.class;
  }
 else   if (useSparklines && AttributeUtils.getDefault().isDynamicNumberColumn(column)) {
    return column.getType().getType();
  }
 else   if (column.getType() == AttributeType.TIME_INTERVAL) {
    return TimeInterval.class;
  }
 else {
    return String.class;
  }
}

Fixed version (ground truth):
public Class getColumnClass(){
  if (useSparklines && attributeUtils.isNumberListColumn(column)) {
    return NumberList.class;
  }
 else   if (useSparklines && attributeUtils.isDynamicNumberColumn(column)) {
    return column.getType().getType();
  }
 else   if (column.getType() == AttributeType.TIME_INTERVAL) {
    return TimeInterval.class;
  }
 else   if (attributeUtils.isNumberColumn(column)) {
    return column.getType().getType();
  }
 else {
    return String.class;
  }
}
Program: 142715
Project: 142715
Buggy source:
public Object getMaximum(){
  return max;
}

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

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

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

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

Fixed version (ground truth):
public boolean evaluate(Graph graph,Edge edge){
  Object value=edge.getEdgeData().getAttributes().getValue(partition.getColumn().getIndex());
  int size=parts.size();
  for (int i=0; i < size; i++) {
    Object obj=parts.get(i).getValue();
    if (obj == null && value == null) {
      return true;
    }
 else     if (obj != null && value != null && obj.equals(value)) {
      return true;
    }
  }
  return false;
}
Program: 142720
Project: 142720
Buggy source:
public void selectVisible(Query query){
  if (query != null && model.getCurrentQuery() == query && !model.isFiltering()) {
    return;
  }
  model.setFiltering(false);
  model.setCurrentQuery(query);
  if (model.getFilterThread() != null) {
    model.getFilterThread().setRunning(false);
    model.setFilterThread(null);
  }
  GraphModel graphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
  graphModel.setVisibleView(null);
  if (model.getCurrentResult() != null) {
    graphModel.destroyView(model.getCurrentResult());
    model.setCurrentResult(null);
  }
  if (query != null) {
    FilterThread filterThread=new FilterThread(model);
    model.setFilterThread(filterThread);
    filterThread.setRootQuery((AbstractQueryImpl)query);
    filterThread.start();
  }
 else {
  }
}

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

Fixed version (ground truth):
public void selectNodes(Node[] nodes){
  if (nodes == null) {
    resetSelection();
    return;
  }
  if (!isCustomSelection()) {
    setCustomSelection();
  }
  Model[] models=new Model[nodes.length];
  for (int i=0; i < nodes.length; i++) {
    models[i]=nodes[i].getNodeData().getModel();
  }
  engine.selectObject(models);
}
Program: 142722
Project: 142722
Buggy source:
public FilterProperty[] getProperties(){
  try {
    return new FilterProperty[]{FilterProperty.createProperty(this,String.class,"String_Node_Str"),FilterProperty.createProperty(this,Integer.class,"String_Node_Str")};
  }
 catch (  NoSuchMethodException ex) {
    ex.printStackTrace();
  }
  return new FilterProperty[0];
}

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

Fixed version (ground truth):
public Graph filter(Graph graph){
  String str=pattern.toLowerCase();
  List<Node> nodes=new ArrayList<Node>();
  for (  Node n : graph.getNodes()) {
    if (n.getNodeData().getId().toLowerCase().contains(str)) {
      nodes.add(n);
    }
 else     if (n.getNodeData().getLabel().toLowerCase().contains(str)) {
      nodes.add(n);
    }
  }
  Set<Node> result=new HashSet<Node>();
  Set<Node> neighbours=new HashSet<Node>();
  neighbours.addAll(nodes);
  for (int i=0; i < depth; i++) {
    Node[] nei=neighbours.toArray(new Node[0]);
    neighbours.clear();
    for (    Node n : nei) {
      for (      Node neighbor : graph.getNeighbors(n)) {
        if (!result.contains(neighbor)) {
          neighbours.add(neighbor);
          result.add(neighbor);
        }
      }
    }
    if (neighbours.isEmpty()) {
      break;
    }
  }
  if (self) {
    result.addAll(nodes);
  }
  for (  Node node : graph.getNodes().toArray()) {
    if (!result.contains(node)) {
      graph.removeNode(node);
    }
  }
  return graph;
}
Program: 142724
Project: 142724
Buggy source:
public EdgeProcessor(Dhns dhns,GraphViewImpl view){
  this.dhns=dhns;
  this.treeStructure=view.getStructure();
  this.idGen=dhns.getIdGen();
  this.view=view;
  this.viewId=view.getViewId();
  this.edgeIterator=new ParamAVLIterator<AbstractEdge>();
}

Fixed version (ground truth):
public EdgeProcessor(Dhns dhns,GraphViewImpl view){
  this.dhns=dhns;
  this.treeStructure=view.getStructure();
  this.view=view;
  this.viewId=view.getViewId();
  this.edgeIterator=new ParamAVLIterator<AbstractEdge>();
}
Program: 142725
Project: 142725
Buggy source:
public void attributesChanged(AttributeEvent event){
  if (event.getEventType().equals(AttributeEvent.EventType.ADD_COLUMN) || event.getEventType().equals(AttributeEvent.EventType.REMOVE_COLUMN)) {
    fireChangeEvent();
  }
}

Fixed version (ground truth):
public void attributesChanged(AttributeEvent event){
  if (event.getEventType().equals(AttributeEvent.EventType.ADD_COLUMN) || event.getEventType().equals(AttributeEvent.EventType.REMOVE_COLUMN)) {
    if (refreshTimer != null) {
      refreshTimer.restart();
    }
 else {
      refreshTimer=new Timer(1000,new ActionListener(){
        public void actionPerformed(        ActionEvent e){
          fireChangeEvent();
        }
      }
);
      refreshTimer.setRepeats(false);
      refreshTimer.start();
    }
  }
}
Program: 142726
Project: 142726
Buggy source:
public void deleteWorkspace(Workspace workspace){
  WorkspaceInformation wi=workspace.getLookup().lookup(WorkspaceInformation.class);
  WorkspaceProviderImpl workspaceProvider=wi.getProject().getLookup().lookup(WorkspaceProviderImpl.class);
  workspaceProvider.removeWorkspace(workspace);
  fireWorkspaceEvent(EventType.CLOSE,workspace);
  if (getCurrentWorkspace() == workspace) {
    Workspace toSelectWorkspace=workspaceProvider.getPrecedingWorkspace(workspace);
    if (toSelectWorkspace == null) {
      closeCurrentProject();
      return;
    }
 else {
      openWorkspace(toSelectWorkspace);
    }
  }
}

Fixed version (ground truth):
public void deleteWorkspace(Workspace workspace){
  WorkspaceInformation wi=workspace.getLookup().lookup(WorkspaceInformation.class);
  WorkspaceProviderImpl workspaceProvider=wi.getProject().getLookup().lookup(WorkspaceProviderImpl.class);
  Workspace toSelectWorkspace=null;
  if (getCurrentWorkspace() == workspace) {
    toSelectWorkspace=workspaceProvider.getPrecedingWorkspace(workspace);
  }
  workspaceProvider.removeWorkspace(workspace);
  fireWorkspaceEvent(EventType.CLOSE,workspace);
  if (getCurrentWorkspace() == workspace) {
    if (toSelectWorkspace == null) {
      closeCurrentProject();
    }
 else {
      openWorkspace(toSelectWorkspace);
    }
  }
}
Program: 142727
Project: 142727
Buggy source:
/** 
 * Used for export (writes XML date strings).
 * @param d a double to convert from
 * @return an XML date string.
 * @throws IllegalArgumentException if {@code d} is infinite.
 */
public static String getXMLDateStringFromDouble(double d){
  try {
    DatatypeFactory dateFactory=DatatypeFactory.newInstance();
    if (Double.isInfinite(d)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    GregorianCalendar gc=new GregorianCalendar();
    gc.setTimeInMillis((long)d);
    return dateFactory.newXMLGregorianCalendar(gc).toXMLFormat().substring(0,23);
  }
 catch (  DatatypeConfigurationException ex) {
    Exceptions.printStackTrace(ex);
    return "String_Node_Str";
  }
}

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

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

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

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

Fixed version (ground truth):
public double getMin(){
  if (lowMap.isEmpty()) {
    return Double.NEGATIVE_INFINITY;
  }
 else {
    return lowMap.firstKey();
  }
}
Program: 142734
Project: 142734
Buggy source:
public void transform(Transformer transformer){
  AbstractTransformer abstractTransformer=(AbstractTransformer)transformer;
  Ranking ranking=abstractTransformer.getRanking();
  RankingResultImpl rankingResult=new RankingResultImpl();
  rankingResult.transformer=transformer;
  rankingResult.ranking=ranking;
  Graph graph=Lookup.getDefault().lookup(GraphController.class).getModel().getGraphVisible();
  if (ranking instanceof NodeRanking) {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Node node : graph.getNodes().toArray()) {
      Object rank=ranking.getValue(node);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(node,normalizedValue);
        }
      }
      rankingResult.addResult(node,rank,result);
    }
  }
 else {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Edge edge : graph.getEdges().toArray()) {
      Object rank=ranking.getValue(edge);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(edge,normalizedValue);
        }
      }
      rankingResult.addResult(edge,rank,result);
    }
  }
  rankingEventBus.publishResults(rankingResult);
}

Fixed version (ground truth):
public void transform(Transformer transformer){
  AbstractTransformer abstractTransformer=(AbstractTransformer)transformer;
  Ranking ranking=abstractTransformer.getRanking();
  RankingResultImpl rankingResult=new RankingResultImpl();
  rankingResult.transformer=transformer;
  rankingResult.ranking=ranking;
  Graph graph=Lookup.getDefault().lookup(GraphController.class).getModel().getGraphVisible();
  boolean refreshed=RankingFactory.refreshRanking((AbstractRanking)ranking,graph);
  if (ranking instanceof NodeRanking) {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Node node : graph.getNodes().toArray()) {
      Object rank=ranking.getValue(node);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(node,normalizedValue);
        }
      }
      rankingResult.addResult(node,rank,result);
    }
  }
 else {
    ((AbstractRanking)ranking).setGraph(graph);
    for (    Edge edge : graph.getEdges().toArray()) {
      Object rank=ranking.getValue(edge);
      Object result=null;
      if (rank != null) {
        float normalizedValue=ranking.normalize(rank);
        if (transformer.isInBounds(normalizedValue)) {
          result=transformer.transform(edge,normalizedValue);
        }
      }
      rankingResult.addResult(edge,rank,result);
    }
  }
  rankingEventBus.publishResults(rankingResult);
  if (refreshed) {
    rankingModelImpl.fireChangeEvent();
  }
}
Program: 142735
Project: 142735
Buggy source:
private void fireChangeEvent(){
  ChangeEvent changeEvent=new ChangeEvent(this);
  for (  ChangeListener changeListener : listeners) {
    changeListener.stateChanged(changeEvent);
  }
}

Fixed version (ground truth):
public void fireChangeEvent(){
  ChangeEvent changeEvent=new ChangeEvent(this);
  for (  ChangeListener changeListener : listeners) {
    changeListener.stateChanged(changeEvent);
  }
}
Program: 142736
Project: 142736
Buggy source:
public void setTimeIntervalMax(String timeIntervalMax){
  try {
    this.timeIntervalMax=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMax);
  }
 catch (  Exception ex) {
    try {
      this.timeIntervalMax=Double.parseDouble(timeIntervalMax);
    }
 catch (    Exception ex2) {
    }
  }
  if (this.timeIntervalMax == null) {
    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)) {
    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: 142737
Project: 142737
Buggy source:
public void setTimeIntervalMin(String timeIntervalMin){
  try {
    this.timeIntervalMin=DynamicUtilities.getDoubleFromXMLDateString(timeIntervalMin);
  }
 catch (  Exception ex) {
    try {
      this.timeIntervalMin=Double.parseDouble(timeIntervalMin);
    }
 catch (    Exception ex2) {
    }
  }
  if (this.timeIntervalMin == null) {
    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)) {
    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: 142738
Project: 142738
Buggy source:
public void actionPerformed(ActionEvent e){
  for (  Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
    entry.setValue(Color.BLACK);
  }
  setup(partition,edgeColorTransformer);
  revalidate();
  repaint();
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  for (  Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
    entry.setValue(Color.BLACK);
  }
  setup(partition,edgeColorTransformer,false);
  revalidate();
  repaint();
}
Program: 142739
Project: 142739
Buggy source:
public void setup(Partition partition,Transformer transformer){
  removeAll();
  edgeColorTransformer=(EdgeColorTransformer)transformer;
  if (edgeColorTransformer.getMap().isEmpty()) {
    List<Color> colors=PaletteUtils.getSequenceColors(partition.getPartsCount());
    int i=0;
    for (    Part p : partition.getParts()) {
      edgeColorTransformer.getMap().put(p.getValue(),colors.get(i));
      i++;
    }
  }
  this.partition=partition;
  for (  final Part p : partition.getParts()) {
    JLabel partLabel=new JLabel(p.getDisplayName());
    add(partLabel);
    final ColorChooser colorChooser=new ColorChooser(edgeColorTransformer.getMap().get(p.getValue()));
    colorChooser.setPreferredSize(new Dimension(16,16));
    colorChooser.setMaximumSize(new Dimension(16,16));
    colorChooser.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        edgeColorTransformer.getMap().put(p.getValue(),colorChooser.getColor());
      }
    }
);
    add(colorChooser,"String_Node_Str");
  }
}

Fixed version (ground truth):
public void setup(Partition partition,Transformer transformer,boolean color){
  removeAll();
  edgeColorTransformer=(EdgeColorTransformer)transformer;
  if (color) {
    List<Color> colors=PaletteUtils.getSequenceColors(partition.getPartsCount());
    int i=0;
    for (    Part p : partition.getParts()) {
      edgeColorTransformer.getMap().put(p.getValue(),colors.get(i));
      i++;
    }
  }
  this.partition=partition;
  for (  final Part p : partition.getParts()) {
    JLabel partLabel=new JLabel(p.getDisplayName());
    add(partLabel);
    final ColorChooser colorChooser=new ColorChooser(edgeColorTransformer.getMap().get(p.getValue()));
    colorChooser.setPreferredSize(new Dimension(16,16));
    colorChooser.setMaximumSize(new Dimension(16,16));
    colorChooser.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        edgeColorTransformer.getMap().put(p.getValue(),colorChooser.getColor());
      }
    }
);
    add(colorChooser,"String_Node_Str");
  }
}
Program: 142740
Project: 142740
Buggy source:
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(EdgeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      edgeColorTransformer.getMap().clear();
      setup(partition,edgeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,edgeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}

Fixed version (ground truth):
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(EdgeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.setIcon(ImageUtilities.loadImageIcon("String_Node_Str",false));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      edgeColorTransformer.getMap().clear();
      setup(partition,edgeColorTransformer,true);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : edgeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,edgeColorTransformer,false);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}
Program: 142741
Project: 142741
Buggy source:
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer);
}

Fixed version (ground truth):
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer,true);
}
Program: 142742
Project: 142742
Buggy source:
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      nodeColorTransformer.getMap().clear();
      setup(partition,nodeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : nodeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,nodeColorTransformer);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}

Fixed version (ground truth):
private void createPopup(){
  popupMenu=new JPopupMenu();
  JMenuItem randomizeItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  randomizeItem.setIcon(ImageUtilities.loadImageIcon("String_Node_Str",false));
  randomizeItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      nodeColorTransformer.getMap().clear();
      setup(partition,nodeColorTransformer,true);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(randomizeItem);
  JMenuItem allBlackItem=new JMenuItem(NbBundle.getMessage(NodeColorTransformerPanel.class,"String_Node_Str"));
  allBlackItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      for (      Entry<Object,Color> entry : nodeColorTransformer.getMap().entrySet()) {
        entry.setValue(Color.BLACK);
      }
      setup(partition,nodeColorTransformer,false);
      revalidate();
      repaint();
    }
  }
);
  popupMenu.add(allBlackItem);
}
Program: 142744
Project: 142744
Buggy source:
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer);
}

Fixed version (ground truth):
public void setup(Partition partition,Transformer transformer){
  panel.setup(partition,transformer,true);
}
Program: 142745
Project: 142745
Buggy source:
private void setValue(int index,AttributeValueImpl value){
  updateColumns();
  this.values[index]=value;
  attributeTable.model.fireAttributeEvent(new ValueEvent(EventType.SET_VALUE,attributeTable,object,value));
}

Fixed version (ground truth):
private void setValue(int index,AttributeValueImpl value){
  updateColumns();
  AttributeValueImpl oldValue=this.values[index];
  this.values[index]=value;
  if (!((oldValue == null && value == null) || (oldValue != null && oldValue.equals(value.getValue())))) {
    attributeTable.model.fireAttributeEvent(new ValueEvent(EventType.SET_VALUE,attributeTable,object,value));
  }
}
Program: 142746
Project: 142746
Buggy source:
public Object getValue(){
  if (column.getOrigin() != AttributeOrigin.DELEGATE) {
    return value;
  }
 else {
    if (value == null)     return null;
    AttributeValueDelegateProvider attributeValueDelegateProvider=column.getProvider();
    Object result;
    if (AttributeUtilsImpl.getDefault().isEdgeColumn(column))     result=attributeValueDelegateProvider.getEdgeValue(column,value);
 else     if (AttributeUtilsImpl.getDefault().isNodeColumn(column))     result=attributeValueDelegateProvider.getNodeValue(column,value);
 else     throw new AssertionError();
    if (result.getClass().isArray())     result=ListFactory.fromArray(result);
    return result;
  }
}

Fixed version (ground truth):
public Object getValue(){
  if (column.getOrigin() != AttributeOrigin.DELEGATE) {
    return value;
  }
 else {
    if (value == null) {
      return null;
    }
    AttributeValueDelegateProvider attributeValueDelegateProvider=column.getProvider();
    Object result;
    if (AttributeUtilsImpl.getDefault().isEdgeColumn(column)) {
      result=attributeValueDelegateProvider.getEdgeValue(column,value);
    }
 else     if (AttributeUtilsImpl.getDefault().isNodeColumn(column)) {
      result=attributeValueDelegateProvider.getNodeValue(column,value);
    }
 else {
      throw new AssertionError();
    }
    if (result.getClass().isArray()) {
      result=ListFactory.fromArray(result);
    }
    return result;
  }
}
Program: 142748
Project: 142748
Buggy source:
public float getSize(float normalizedValue){
  if (interpolator != null) {
    normalizedValue=interpolator.interpolate(normalizedValue);
  }
  return normalizedValue * maxSize + minSize;
}

Fixed version (ground truth):
public float getSize(float normalizedValue){
  if (interpolator != null) {
    normalizedValue=interpolator.interpolate(normalizedValue);
  }
  return normalizedValue * (maxSize - minSize) + minSize;
}
Program: 142749
Project: 142749
Buggy source:
public FilterLibraryImpl(){
  content=new InstanceContent();
  lookup=new AbstractLookup(content);
  for (  FilterBuilder builder : Lookup.getDefault().lookupAll(FilterBuilder.class)) {
    content.add(builder);
  }
  for (  Query query : Lookup.getDefault().lookupAll(Query.class)) {
    content.add(query);
  }
  for (  CategoryBuilder catBuilder : Lookup.getDefault().lookupAll(CategoryBuilder.class)) {
    content.add(catBuilder);
  }
  content.add(new HierarchicalGraphMask());
  buildBuildersMap();
}

Fixed version (ground truth):
public FilterLibraryImpl(){
  content=new InstanceContent();
  lookup=new AbstractLookup(content);
  for (  FilterBuilder builder : Lookup.getDefault().lookupAll(FilterBuilder.class)) {
    content.add(builder);
  }
  for (  Query query : Lookup.getDefault().lookupAll(Query.class)) {
    content.add(query);
  }
  for (  CategoryBuilder catBuilder : Lookup.getDefault().lookupAll(CategoryBuilder.class)) {
    content.add(catBuilder);
  }
  content.add(new HierarchicalGraphMask());
}
Program: 142750
Project: 142750
Buggy source:
public FilterBuilder getBuilder(Filter filter){
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  buildBuildersMap();
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  return null;
}

Fixed version (ground truth):
public FilterBuilder getBuilder(Filter filter){
  if (buildersMap == null) {
    buildBuildersMap();
  }
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  buildBuildersMap();
  if (buildersMap.get(filter.getClass()) != null) {
    return buildersMap.get(filter.getClass());
  }
  return null;
}
Program: 142751
Project: 142751
Buggy source:
/** 
 * Constructor.
 * @param parent     the parent graph of the edge
 * @param thickness  the edge's thickness
 * @param node1      the edge's node 1
 * @param node2      the edge's node 2
 * @param label      the edge's label
 * @param labelSize  the edge's label size
 */
protected EdgeImpl(GraphImpl parent,Edge edge,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,edge.getWeight());
  this.node1=node1;
  this.node2=node2;
  direction=new Vector(this.node2.getPosition());
  direction.sub(new Vector(this.node1.getPosition()));
  length=direction.mag();
  direction.normalize();
  if (edge.getEdgeData().r() != -1) {
    originalColor=new Color(edge.getEdgeData().r(),edge.getEdgeData().g(),edge.getEdgeData().b(),edge.getEdgeData().alpha());
  }
 else {
    originalColor=null;
  }
  genCurves();
  if (null != label) {
    this.label=new EdgeLabelImpl(this,label,labelSize);
  }
 else {
    this.label=null;
  }
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param parent     the parent graph of the edge
 * @param thickness  the edge's thickness
 * @param node1      the edge's node 1
 * @param node2      the edge's node 2
 * @param label      the edge's label
 * @param labelSize  the edge's label size
 */
protected EdgeImpl(GraphImpl parent,Edge edge,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,edge.getWeight());
  this.node1=node1;
  this.node2=node2;
  this.metaEdge=edge instanceof MetaEdge;
  direction=new Vector(this.node2.getPosition());
  direction.sub(new Vector(this.node1.getPosition()));
  length=direction.mag();
  direction.normalize();
  if (edge.getEdgeData().r() != -1) {
    originalColor=new Color(edge.getEdgeData().r(),edge.getEdgeData().g(),edge.getEdgeData().b(),edge.getEdgeData().alpha());
  }
 else {
    originalColor=null;
  }
  genCurves();
  if (null != label) {
    this.label=new EdgeLabelImpl(this,label,labelSize);
  }
 else {
    this.label=null;
  }
}
Program: 142752
Project: 142752
Buggy source:
/** 
 * Creates a preview graph from the given mixed graph.
 * @param sourceGraph   the mixed graph
 * @return              a generated preview graph
 */
public GraphImpl createPreviewGraph(PreviewModel model,HierarchicalMixedGraph sourceGraph){
  GraphImpl previewGraph=new GraphImpl(model);
  for (  org.gephi.graph.api.Node sourceNode : sourceGraph.getNodes()) {
    createPreviewNode(previewGraph,sourceNode);
  }
  for (  org.gephi.graph.api.Edge sourceEdge : sourceGraph.getEdgesAndMetaEdges()) {
    if (sourceEdge.getWeight() <= 0) {
      continue;
    }
    if (sourceEdge.isSelfLoop()) {
      createPreviewSelfLoop(previewGraph,sourceEdge);
      continue;
    }
    if (sourceEdge.isDirected()) {
      if (isBidirectional(sourceGraph,sourceEdge)) {
        createPreviewBidirectionalEdge(previewGraph,sourceEdge);
      }
 else {
        createPreviewUnidirectionalEdge(previewGraph,sourceEdge);
      }
    }
 else {
      createPreviewUndirectedEdge(previewGraph,sourceEdge);
    }
  }
  nodeMap.clear();
  return previewGraph;
}

Fixed version (ground truth):
/** 
 * Creates a preview graph from the given mixed graph.
 * @param sourceGraph   the mixed graph
 * @return              a generated preview graph
 */
public GraphImpl createPreviewGraph(PreviewModel model,HierarchicalMixedGraph sourceGraph){
  GraphImpl previewGraph=new GraphImpl(model);
  for (  org.gephi.graph.api.Node sourceNode : sourceGraph.getNodes()) {
    createPreviewNode(previewGraph,sourceNode);
  }
  calculateMinMaxWeight(sourceGraph,previewGraph);
  for (  org.gephi.graph.api.Edge sourceEdge : sourceGraph.getEdgesAndMetaEdges()) {
    if (sourceEdge.getWeight() <= 0) {
      continue;
    }
    if (sourceEdge.isSelfLoop()) {
      createPreviewSelfLoop(previewGraph,sourceEdge);
      continue;
    }
    if (sourceEdge.isDirected()) {
      if (isBidirectional(sourceGraph,sourceEdge)) {
        createPreviewBidirectionalEdge(previewGraph,sourceEdge);
      }
 else {
        createPreviewUnidirectionalEdge(previewGraph,sourceEdge);
      }
    }
 else {
      createPreviewUndirectedEdge(previewGraph,sourceEdge);
    }
  }
  nodeMap.clear();
  return previewGraph;
}
Program: 142754
Project: 142754
Buggy source:
public void defaultValues(){
  curvedFlag=true;
  colorizer=new EdgeBothBColorMode();
  showLabelsFlag=false;
  shortenLabelsFlag=false;
  labelMaxChar=10;
  baseLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,10);
  labelColorizer=new ParentColorMode();
  showMiniLabelsFlag=false;
  shortenMiniLabelsFlag=false;
  miniLabelMaxChar=10;
  miniLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,8);
  miniLabelAddedRadius=15f;
  miniLabelColorizer=new ParentColorMode();
  showArrowsFlag=true;
  arrowAddedRadius=65f;
  arrowSize=20f;
  arrowColorizer=new ParentColorMode();
  edgeScale=new Float(1f);
}

Fixed version (ground truth):
public void defaultValues(){
  curvedFlag=true;
  colorizer=new EdgeBothBColorMode();
  showLabelsFlag=false;
  shortenLabelsFlag=false;
  labelMaxChar=10;
  baseLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,10);
  labelColorizer=new ParentColorMode();
  showMiniLabelsFlag=false;
  shortenMiniLabelsFlag=false;
  miniLabelMaxChar=10;
  miniLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,8);
  miniLabelAddedRadius=15f;
  miniLabelColorizer=new ParentColorMode();
  showArrowsFlag=true;
  arrowAddedRadius=65f;
  arrowSize=20f;
  arrowColorizer=new ParentColorMode();
  edgeScale=new Float(1f);
  rescaleWeight=Boolean.TRUE;
}
Program: 142756
Project: 142756
Buggy source:
/** 
 * Adds the given edge to the list of the supervised edges. It updates the edges with the supervisor's values.
 * @param edge  the edge to supervise
 */
public void addEdge(EdgeImpl edge){
  getSupervisedEdges().add(edge);
  colorEdge(edge);
  colorEdgeLabel(edge);
  updateEdgeLabelValue(edge);
  adjustEdgeLabelFont(edge);
}

Fixed version (ground truth):
/** 
 * Adds the given edge to the list of the supervised edges. It updates the edges with the supervisor's values.
 * @param edge  the edge to supervise
 */
public void addEdge(EdgeImpl edge){
  getSupervisedEdges().add(edge);
  colorEdge(edge);
  colorEdgeLabel(edge);
  updateEdgeLabelValue(edge);
  adjustEdgeLabelFont(edge);
  if (rescaleWeight) {
    float min=edge.getMetaEdge() ? edge.getGraph().getMinMetaWeight() : edge.getGraph().getMinWeight();
    float max=edge.getMetaEdge() ? edge.getGraph().getMaxMetaWeight() : edge.getGraph().getMaxWeight();
    float ratio=(GraphImpl.WEIGHT_MAXIMUM - GraphImpl.WEIGHT_MINIMUM) / (max - min);
    float weight=(edge.getThickness() - min) * ratio + GraphImpl.WEIGHT_MINIMUM;
    edge.setThickness(weight);
  }
}
Program: 142757
Project: 142757
Buggy source:
public SupervisorPropery[] getProperties(){
  final String CATEGORY="String_Node_Str";
  try {
    return new SupervisorPropery[]{SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Float.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,EdgeColorizer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str",EdgeColorizerPropertyEditor.class)};
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return new SupervisorPropery[0];
}

Fixed version (ground truth):
public SupervisorPropery[] getProperties(){
  final String CATEGORY="String_Node_Str";
  try {
    return new SupervisorPropery[]{SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Float.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,EdgeColorizer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str",EdgeColorizerPropertyEditor.class)};
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return new SupervisorPropery[0];
}
Program: 142758
Project: 142758
Buggy source:
public void defaultValues(){
  show=true;
  colorizer=new CustomColorMode(0,0,0);
  edgeScale=new Float(1f);
}

Fixed version (ground truth):
public void defaultValues(){
  show=true;
  colorizer=new CustomColorMode(0,0,0);
  edgeScale=new Float(1f);
  rescaleWeight=Boolean.TRUE;
}
Program: 142759
Project: 142759
Buggy source:
public SupervisorPropery[] getProperties(){
  final String CATEGORY="String_Node_Str";
  try {
    return new SupervisorPropery[]{SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Float.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,EdgeColorizer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str",EdgeColorizerPropertyEditor.class),SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Integer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Font.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,EdgeChildColorizer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str",EdgeChildColorizerPropertyEditor.class)};
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return new SupervisorPropery[0];
}

Fixed version (ground truth):
public SupervisorPropery[] getProperties(){
  final String CATEGORY="String_Node_Str";
  try {
    return new SupervisorPropery[]{SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Float.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,EdgeColorizer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str",EdgeColorizerPropertyEditor.class),SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Boolean.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Integer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,Font.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str"),SupervisorPropery.createProperty(this,EdgeChildColorizer.class,"String_Node_Str",CATEGORY,"String_Node_Str","String_Node_Str","String_Node_Str",EdgeChildColorizerPropertyEditor.class)};
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return new SupervisorPropery[0];
}
Program: 142760
Project: 142760
Buggy source:
public void defaultValues(){
  curvedFlag=true;
  colorizer=new EdgeBothBColorMode();
  showLabelsFlag=false;
  shortenLabelsFlag=false;
  labelMaxChar=10;
  baseLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,10);
  labelColorizer=new ParentColorMode();
  edgeScale=new Float(1f);
}

Fixed version (ground truth):
public void defaultValues(){
  curvedFlag=true;
  colorizer=new EdgeBothBColorMode();
  showLabelsFlag=false;
  shortenLabelsFlag=false;
  labelMaxChar=10;
  baseLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,10);
  labelColorizer=new ParentColorMode();
  edgeScale=new Float(1f);
  rescaleWeight=Boolean.TRUE;
}
Program: 142761
Project: 142761
Buggy source:
public void defaultValues(){
  curvedFlag=true;
  colorizer=new EdgeB1ColorMode();
  showLabelsFlag=false;
  shortenLabelsFlag=false;
  labelMaxChar=10;
  baseLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,10);
  labelColorizer=new ParentColorMode();
  showMiniLabelsFlag=false;
  shortenMiniLabelsFlag=false;
  miniLabelMaxChar=10;
  miniLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,8);
  miniLabelAddedRadius=15f;
  miniLabelColorizer=new ParentColorMode();
  showArrowsFlag=true;
  arrowAddedRadius=65f;
  arrowSize=20f;
  arrowColorizer=new ParentColorMode();
  edgeScale=new Float(1f);
}

Fixed version (ground truth):
public void defaultValues(){
  curvedFlag=true;
  colorizer=new EdgeB1ColorMode();
  showLabelsFlag=false;
  shortenLabelsFlag=false;
  labelMaxChar=10;
  baseLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,10);
  labelColorizer=new ParentColorMode();
  showMiniLabelsFlag=false;
  shortenMiniLabelsFlag=false;
  miniLabelMaxChar=10;
  miniLabelFont=new Font(Font.SANS_SERIF,Font.PLAIN,8);
  miniLabelAddedRadius=15f;
  miniLabelColorizer=new ParentColorMode();
  showArrowsFlag=true;
  arrowAddedRadius=65f;
  arrowSize=20f;
  arrowColorizer=new ParentColorMode();
  edgeScale=new Float(1f);
  rescaleWeight=Boolean.TRUE;
}
Program: 142762
Project: 142762
Buggy source:
@Override public boolean isInOctreeLeaf(Octant leaf){
  return ((ModelImpl)obj.getModel()).getOctants()[0] == leaf;
}

Fixed version (ground truth):
@Override public boolean isInOctreeLeaf(Octant leaf){
  if (obj.getModel() == null) {
    return false;
  }
  return ((ModelImpl)obj.getModel()).getOctants()[0] == leaf;
}