nus-yam/ex-repair huggingface dataset:
Program: 190084
Project: 190084
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: 190085
Project: 190085
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: 190087
Project: 190087
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: 190089
Project: 190089
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: 190090
Project: 190090
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: 190091
Project: 190091
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: 190092
Project: 190092
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: 190093
Project: 190093
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: 190094
Project: 190094
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: 190095
Project: 190095
Buggy source:
public Component getStatusLineElement(){
  panel=new WorkspaceUISelectorPanel();
  return panel;
}

Fixed version (ground truth):
public Component getStatusLineElement(){
  ProjectController pc=Lookup.getDefault().lookup(ProjectController.class);
  pc.addWorkspaceListener(this);
  panel=new WorkspaceUISelectorPanel();
  return panel;
}
Program: 190096
Project: 190096
Buggy source:
/** 
 * Creates a preview node from the given source node.
 * @param previewGraph  the parent preview graph
 * @param sourceNode    the source node
 * @return              the generated preview node
 */
private NodeImpl createPreviewNode(GraphImpl previewGraph,org.gephi.graph.api.Node sourceNode){
  org.gephi.graph.api.NodeData sourceNodeData=sourceNode.getNodeData();
  org.gephi.graph.api.TextData sourceNodeTextData=sourceNodeData.getTextData();
  String label=sourceNodeData.getLabel();
  if (sourceNodeTextData != null && sourceNodeTextData.getText() != null && sourceNodeTextData.getText().isEmpty()) {
    label=sourceNodeTextData.getText();
  }
  float labelSize=1f;
  if (sourceNodeTextData != null) {
    labelSize=sourceNodeTextData.getSize();
  }
  if (previewGraph.getModel().getNodeSupervisor().getProportionalLabelSize()) {
    labelSize*=sourceNodeData.getRadius() / 10f;
  }
  NodeImpl previewNode=new NodeImpl(previewGraph,sourceNodeData.x(),-sourceNodeData.y(),sourceNodeData.getRadius(),label,labelSize,sourceNodeData.r(),sourceNodeData.g(),sourceNodeData.b());
  previewGraph.addNode(previewNode);
  nodeMap.put(sourceNode.getId(),previewNode);
  return previewNode;
}

Fixed version (ground truth):
/** 
 * Creates a preview node from the given source node.
 * @param previewGraph  the parent preview graph
 * @param sourceNode    the source node
 * @return              the generated preview node
 */
private NodeImpl createPreviewNode(GraphImpl previewGraph,org.gephi.graph.api.Node sourceNode){
  org.gephi.graph.api.NodeData sourceNodeData=sourceNode.getNodeData();
  org.gephi.graph.api.TextData sourceNodeTextData=sourceNodeData.getTextData();
  String label=sourceNodeData.getLabel();
  if (sourceNodeTextData != null && sourceNodeTextData.getText() != null && !sourceNodeTextData.getText().isEmpty()) {
    label=sourceNodeTextData.getText();
  }
  float labelSize=1f;
  if (sourceNodeTextData != null) {
    labelSize=sourceNodeTextData.getSize();
  }
  if (previewGraph.getModel().getNodeSupervisor().getProportionalLabelSize()) {
    labelSize*=sourceNodeData.getRadius() / 10f;
  }
  NodeImpl previewNode=new NodeImpl(previewGraph,sourceNodeData.x(),-sourceNodeData.y(),sourceNodeData.getRadius(),label,labelSize,sourceNodeData.r(),sourceNodeData.g(),sourceNodeData.b());
  previewGraph.addNode(previewNode);
  nodeMap.put(sourceNode.getId(),previewNode);
  return previewNode;
}
Program: 190097
Project: 190097
Buggy source:
public void removeChangeListener(ChangeListener listener){
  listeners.remove(listener);
}

Fixed version (ground truth):
public void removeChangeListener(ChangeListener listener){
  if (listeners != null) {
    listeners.remove(listener);
  }
}
Program: 190098
Project: 190098
Buggy source:
private boolean isSelected(){
  return FiltersTopComponent.findInstance().getUiModel().getSelectedRoot() == query;
}

Fixed version (ground truth):
private boolean isSelected(){
  FilterController fc=Lookup.getDefault().lookup(FilterController.class);
  return fc.getModel().getCurrentQuery() == query;
}
Program: 190099
Project: 190099
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;
}
Program: 190100
Project: 190100
Buggy source:
@Override public Transferable paste() throws IOException {
  QueryNode queryNode=(QueryNode)dropNode;
  FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
  FilterLibrary library=filterController.getModel().getLibrary();
  library.saveQuery(queryNode.qetQuery());
  return null;
}

Fixed version (ground truth):
@Override public Transferable paste() throws IOException {
  QueryNode queryNode=(QueryNode)dropNode;
  FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
  FilterLibrary library=filterController.getModel().getLibrary();
  library.saveQuery(queryNode.getQuery());
  return null;
}
Program: 190101
Project: 190101
Buggy source:
@Override public PasteType getDropType(final Transferable t,int action,int index){
  if (category == null || !category.equals(FiltersExplorer.QUERIES)) {
    return null;
  }
  final Node dropNode=NodeTransfer.node(t,DnDConstants.ACTION_COPY_OR_MOVE);
  if (dropNode != null && dropNode instanceof QueryNode) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        QueryNode queryNode=(QueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        FilterLibrary library=filterController.getModel().getLibrary();
        library.saveQuery(queryNode.qetQuery());
        return null;
      }
    }
;
  }
  return null;
}

Fixed version (ground truth):
@Override public PasteType getDropType(final Transferable t,int action,int index){
  if (category == null || !category.equals(FiltersExplorer.QUERIES)) {
    return null;
  }
  final Node dropNode=NodeTransfer.node(t,DnDConstants.ACTION_COPY_OR_MOVE);
  if (dropNode != null && dropNode instanceof QueryNode) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        QueryNode queryNode=(QueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        FilterLibrary library=filterController.getModel().getLibrary();
        library.saveQuery(queryNode.getQuery());
        return null;
      }
    }
;
  }
  return null;
}
Program: 190102
Project: 190102
Buggy source:
private void saveExpandStatus(Node node){
  if (node instanceof RootNode) {
    RootNode rootNode=(RootNode)node;
    for (    Node n : rootNode.getChildren().getNodes()) {
      saveExpandStatus(n);
    }
  }
 else   if (node instanceof QueryNode) {
    QueryNode queryNode=(QueryNode)node;
    Node firstChild=queryNode.getChildren().getNodeAt(0);
    boolean parameterExpanded=false;
    if (firstChild != null && firstChild instanceof ParameterNode) {
      parameterExpanded=isExpanded(firstChild);
    }
    uiModel.setExpand(queryNode.qetQuery(),isExpanded(queryNode),parameterExpanded);
    for (    Node n : queryNode.getChildren().getNodes()) {
      saveExpandStatus(n);
    }
  }
}

Fixed version (ground truth):
private void saveExpandStatus(Node node){
  if (node instanceof RootNode) {
    RootNode rootNode=(RootNode)node;
    for (    Node n : rootNode.getChildren().getNodes()) {
      saveExpandStatus(n);
    }
  }
 else   if (node instanceof QueryNode) {
    QueryNode queryNode=(QueryNode)node;
    Node firstChild=queryNode.getChildren().getNodeAt(0);
    boolean parameterExpanded=false;
    if (firstChild != null && firstChild instanceof ParameterNode) {
      parameterExpanded=isExpanded(firstChild);
    }
    uiModel.setExpand(queryNode.getQuery(),isExpanded(queryNode),parameterExpanded);
    for (    Node n : queryNode.getChildren().getNodes()) {
      saveExpandStatus(n);
    }
  }
}
Program: 190103
Project: 190103
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) {
    if (uiModel == null) {
      return;
    }
    Node[] nodeArray=(Node[])evt.getNewValue();
    if (nodeArray.length > 0) {
      Node node=((Node[])evt.getNewValue())[0];
      if (node instanceof RootNode) {
        uiModel.setSelectedQuery(null);
        return;
      }
      while (!(node instanceof QueryNode)) {
        node=node.getParentNode();
        if (node.getParentNode() == null) {
          uiModel.setSelectedQuery(null);
          return;
        }
      }
      QueryNode queryNode=(QueryNode)node;
      final Query query=queryNode.qetQuery();
      new Thread(new Runnable(){
        public void run(){
          uiModel.setSelectedQuery(query);
        }
      }
).start();
    }
  }
}

Fixed version (ground truth):
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) {
    if (uiModel == null) {
      return;
    }
    Node[] nodeArray=(Node[])evt.getNewValue();
    if (nodeArray.length > 0) {
      Node node=((Node[])evt.getNewValue())[0];
      if (node instanceof RootNode) {
        uiModel.setSelectedQuery(null);
        return;
      }
      while (!(node instanceof QueryNode)) {
        node=node.getParentNode();
        if (node.getParentNode() == null) {
          uiModel.setSelectedQuery(null);
          return;
        }
      }
      QueryNode queryNode=(QueryNode)node;
      final Query query=queryNode.getQuery();
      new Thread(new Runnable(){
        public void run(){
          uiModel.setSelectedQuery(query);
        }
      }
).start();
    }
  }
}
Program: 190104
Project: 190104
Buggy source:
private void loadExpandStatus(Node node){
  if (node instanceof RootNode) {
    RootNode rootNode=(RootNode)node;
    for (    Node n : rootNode.getChildren().getNodes()) {
      loadExpandStatus(n);
    }
  }
 else   if (node instanceof QueryNode) {
    QueryNode queryNode=(QueryNode)node;
    if (uiModel.isExpanded(queryNode.qetQuery())) {
      expandNode(queryNode);
    }
    Node firstChild=queryNode.getChildren().getNodeAt(0);
    if (firstChild != null && firstChild instanceof ParameterNode) {
      if (uiModel.isParametersExpanded(queryNode.qetQuery())) {
        expandNode(firstChild);
      }
    }
    for (    Node n : queryNode.getChildren().getNodes()) {
      loadExpandStatus(n);
    }
  }
}

Fixed version (ground truth):
private void loadExpandStatus(Node node){
  if (node instanceof RootNode) {
    RootNode rootNode=(RootNode)node;
    for (    Node n : rootNode.getChildren().getNodes()) {
      loadExpandStatus(n);
    }
  }
 else   if (node instanceof QueryNode) {
    QueryNode queryNode=(QueryNode)node;
    if (uiModel.isExpanded(queryNode.getQuery())) {
      expandNode(queryNode);
    }
    Node firstChild=queryNode.getChildren().getNodeAt(0);
    if (firstChild != null && firstChild instanceof ParameterNode) {
      if (uiModel.isParametersExpanded(queryNode.getQuery())) {
        expandNode(firstChild);
      }
    }
    for (    Node n : queryNode.getChildren().getNodes()) {
      loadExpandStatus(n);
    }
  }
}
Program: 190105
Project: 190105
Buggy source:
@Override public Transferable paste() throws IOException {
  SavedQueryNode node=(SavedQueryNode)dropNode;
  FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
  filterController.add(node.getQuery());
  return null;
}

Fixed version (ground truth):
@Override public Transferable paste() throws IOException {
  QueryNode queryNode=(QueryNode)dropNode;
  FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
  filterController.removeSubQuery(queryNode.getQuery(),queryNode.getQuery().getParent());
  filterController.add(queryNode.getQuery());
  return null;
}
Program: 190106
Project: 190106
Buggy source:
@Override public PasteType getDropType(Transferable t,int action,int index){
  final Node dropNode=NodeTransfer.node(t,DnDConstants.ACTION_COPY_OR_MOVE);
  if (t.isDataFlavorSupported(FilterBuilderNode.DATA_FLAVOR)) {
    try {
      final FilterBuilder fb=(FilterBuilder)t.getTransferData(FilterBuilderNode.DATA_FLAVOR);
      return new PasteType(){
        @Override public Transferable paste() throws IOException {
          FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
          Query f=filterController.createQuery(fb.getFilter());
          filterController.add(f);
          return null;
        }
      }
;
    }
 catch (    UnsupportedFlavorException ex) {
      ex.printStackTrace();
    }
catch (    IOException ex) {
      ex.printStackTrace();
    }
  }
 else   if (dropNode != null && dropNode instanceof SavedQueryNode) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        SavedQueryNode node=(SavedQueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        filterController.add(node.getQuery());
        return null;
      }
    }
;
  }
  return null;
}

Fixed version (ground truth):
@Override public PasteType getDropType(Transferable t,int action,int index){
  final Node dropNode=NodeTransfer.node(t,DnDConstants.ACTION_COPY_OR_MOVE);
  if (t.isDataFlavorSupported(FilterBuilderNode.DATA_FLAVOR)) {
    try {
      final FilterBuilder fb=(FilterBuilder)t.getTransferData(FilterBuilderNode.DATA_FLAVOR);
      return new PasteType(){
        @Override public Transferable paste() throws IOException {
          FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
          Query f=filterController.createQuery(fb.getFilter());
          filterController.add(f);
          return null;
        }
      }
;
    }
 catch (    UnsupportedFlavorException ex) {
      ex.printStackTrace();
    }
catch (    IOException ex) {
      ex.printStackTrace();
    }
  }
 else   if (dropNode != null && dropNode instanceof SavedQueryNode) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        SavedQueryNode node=(SavedQueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        filterController.add(node.getQuery());
        return null;
      }
    }
;
  }
 else   if (dropNode != null && dropNode instanceof QueryNode && ((QueryNode)dropNode).getQuery().getParent() != null) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        QueryNode queryNode=(QueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        filterController.removeSubQuery(queryNode.getQuery(),queryNode.getQuery().getParent());
        filterController.add(queryNode.getQuery());
        return null;
      }
    }
;
  }
  return null;
}
Program: 190107
Project: 190107
Buggy source:
@Override public PasteType getDropType(final Transferable t,int action,int index){
  final Node dropNode=NodeTransfer.node(t,DnDConstants.ACTION_COPY_OR_MOVE);
  if (dropNode != null && dropNode instanceof QueryNode) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        QueryNode queryNode=(QueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        filterController.setSubQuery(parent,queryNode.qetQuery());
        return null;
      }
    }
;
  }
 else   if (t.isDataFlavorSupported(FilterBuilderNode.DATA_FLAVOR)) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        try {
          FilterBuilder builder=(FilterBuilder)t.getTransferData(FilterBuilderNode.DATA_FLAVOR);
          FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
          Query query=filterController.createQuery(builder.getFilter());
          filterController.setSubQuery(parent,query);
        }
 catch (        UnsupportedFlavorException ex) {
          Exceptions.printStackTrace(ex);
        }
        return null;
      }
    }
;
  }
  return null;
}

Fixed version (ground truth):
@Override public PasteType getDropType(final Transferable t,int action,int index){
  final Node dropNode=NodeTransfer.node(t,DnDConstants.ACTION_COPY_OR_MOVE);
  if (dropNode != null && dropNode instanceof QueryNode) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        QueryNode queryNode=(QueryNode)dropNode;
        FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
        filterController.setSubQuery(parent,queryNode.getQuery());
        return null;
      }
    }
;
  }
 else   if (t.isDataFlavorSupported(FilterBuilderNode.DATA_FLAVOR)) {
    return new PasteType(){
      @Override public Transferable paste() throws IOException {
        try {
          FilterBuilder builder=(FilterBuilder)t.getTransferData(FilterBuilderNode.DATA_FLAVOR);
          FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
          Query query=filterController.createQuery(builder.getFilter());
          filterController.setSubQuery(parent,query);
        }
 catch (        UnsupportedFlavorException ex) {
          Exceptions.printStackTrace(ex);
        }
        return null;
      }
    }
;
  }
  return null;
}
Program: 190108
Project: 190108
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
 */
public BidirectionalEdgeImpl(GraphImpl parent,float thickness,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,thickness,node1,node2,label,labelSize);
  arrows.add(new EdgeArrowB2Out(this));
  arrows.add(new EdgeArrowB1In(this));
  getDirectedEdgeSupervisor().addEdge(this);
}

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
 */
public BidirectionalEdgeImpl(GraphImpl parent,Edge edge,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,edge,node1,node2,label,labelSize);
  arrows.add(new EdgeArrowB2Out(this));
  arrows.add(new EdgeArrowB1In(this));
  getDirectedEdgeSupervisor().addEdge(this);
}
Program: 190109
Project: 190109
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 DirectedEdgeImpl(GraphImpl parent,float thickness,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,thickness,node1,node2,label,labelSize);
  arrows.add(new EdgeArrowB1Out(this));
  arrows.add(new EdgeArrowB2In(this));
  if (node1.hasLabel()) {
    miniLabels.add(new EdgeMiniLabelB1(this));
  }
  if (node2.hasLabel()) {
    miniLabels.add(new EdgeMiniLabelB2(this));
  }
}

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 DirectedEdgeImpl(GraphImpl parent,Edge edge,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,edge,node1,node2,label,labelSize);
  arrows.add(new EdgeArrowB1Out(this));
  arrows.add(new EdgeArrowB2In(this));
  if (node1.hasLabel()) {
    miniLabels.add(new EdgeMiniLabelB1(this));
  }
  if (node2.hasLabel()) {
    miniLabels.add(new EdgeMiniLabelB2(this));
  }
}
Program: 190110
Project: 190110
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,float thickness,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,thickness);
  this.node1=node1;
  this.node2=node2;
  direction=new Vector(this.node2.getPosition());
  direction.sub(new Vector(this.node1.getPosition()));
  length=direction.mag();
  direction.normalize();
  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;
  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: 190111
Project: 190111
Buggy source:
/** 
 * Creates a preview unidirectional edge from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview unidirectional edge
 */
private UnidirectionalEdgeImpl createPreviewUnidirectionalEdge(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  org.gephi.graph.api.TextData sourceEdgeTextData=sourceEdgeData.getTextData();
  String label=sourceEdgeData.getLabel();
  if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {
    label=sourceEdgeTextData.getText();
  }
  float labelSize=1f;
  if (sourceEdgeTextData != null) {
    labelSize=sourceEdgeTextData.getSize();
  }
  UnidirectionalEdgeImpl previewEdge=new UnidirectionalEdgeImpl(previewGraph,sourceEdge.getWeight(),nodeMap.get(sourceEdge.getSource().getId()),nodeMap.get(sourceEdge.getTarget().getId()),label,labelSize);
  previewGraph.addUnidirectionalEdge(previewEdge);
  return previewEdge;
}

Fixed version (ground truth):
/** 
 * Creates a preview unidirectional edge from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview unidirectional edge
 */
private UnidirectionalEdgeImpl createPreviewUnidirectionalEdge(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  org.gephi.graph.api.TextData sourceEdgeTextData=sourceEdgeData.getTextData();
  String label=sourceEdgeData.getLabel();
  if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {
    label=sourceEdgeTextData.getText();
  }
  float labelSize=1f;
  if (sourceEdgeTextData != null) {
    labelSize=sourceEdgeTextData.getSize();
  }
  UnidirectionalEdgeImpl previewEdge=new UnidirectionalEdgeImpl(previewGraph,sourceEdge,nodeMap.get(sourceEdge.getSource().getId()),nodeMap.get(sourceEdge.getTarget().getId()),label,labelSize);
  previewGraph.addUnidirectionalEdge(previewEdge);
  return previewEdge;
}
Program: 190112
Project: 190112
Buggy source:
/** 
 * Creates a preview bidirectional edge from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview bidirectional edge
 */
private BidirectionalEdgeImpl createPreviewBidirectionalEdge(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  org.gephi.graph.api.TextData sourceEdgeTextData=sourceEdgeData.getTextData();
  String label=sourceEdgeData.getLabel();
  if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {
    label=sourceEdgeTextData.getText();
  }
  float labelSize=1f;
  if (sourceEdgeTextData != null) {
    labelSize=sourceEdgeTextData.getSize();
  }
  BidirectionalEdgeImpl previewEdge=new BidirectionalEdgeImpl(previewGraph,sourceEdge.getWeight(),nodeMap.get(sourceEdge.getSource().getId()),nodeMap.get(sourceEdge.getTarget().getId()),label,labelSize);
  previewGraph.addBidirectionalEdge(previewEdge);
  return previewEdge;
}

Fixed version (ground truth):
/** 
 * Creates a preview bidirectional edge from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview bidirectional edge
 */
private BidirectionalEdgeImpl createPreviewBidirectionalEdge(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  org.gephi.graph.api.TextData sourceEdgeTextData=sourceEdgeData.getTextData();
  String label=sourceEdgeData.getLabel();
  if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {
    label=sourceEdgeTextData.getText();
  }
  float labelSize=1f;
  if (sourceEdgeTextData != null) {
    labelSize=sourceEdgeTextData.getSize();
  }
  BidirectionalEdgeImpl previewEdge=new BidirectionalEdgeImpl(previewGraph,sourceEdge,nodeMap.get(sourceEdge.getSource().getId()),nodeMap.get(sourceEdge.getTarget().getId()),label,labelSize);
  previewGraph.addBidirectionalEdge(previewEdge);
  return previewEdge;
}
Program: 190113
Project: 190113
Buggy source:
/** 
 * Creates a preview self-loop from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview self-loop
 */
private SelfLoopImpl createPreviewSelfLoop(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  SelfLoopImpl previewSelfLoop=new SelfLoopImpl(previewGraph,sourceEdge.getWeight(),nodeMap.get(sourceEdge.getSource().getId()));
  previewGraph.addSelfLoop(previewSelfLoop);
  return previewSelfLoop;
}

Fixed version (ground truth):
/** 
 * Creates a preview self-loop from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview self-loop
 */
private SelfLoopImpl createPreviewSelfLoop(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  SelfLoopImpl previewSelfLoop=new SelfLoopImpl(previewGraph,sourceEdge,nodeMap.get(sourceEdge.getSource().getId()));
  previewGraph.addSelfLoop(previewSelfLoop);
  return previewSelfLoop;
}
Program: 190114
Project: 190114
Buggy source:
/** 
 * Creates a preview undirected edge from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview undirected edge
 */
private UndirectedEdgeImpl createPreviewUndirectedEdge(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  org.gephi.graph.api.TextData sourceEdgeTextData=sourceEdgeData.getTextData();
  String label=sourceEdgeData.getLabel();
  if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {
    label=sourceEdgeTextData.getText();
  }
  float labelSize=1f;
  if (sourceEdgeTextData != null) {
    labelSize=sourceEdgeTextData.getSize();
  }
  UndirectedEdgeImpl previewEdge=new UndirectedEdgeImpl(previewGraph,sourceEdge.getWeight(),nodeMap.get(sourceEdge.getSource().getId()),nodeMap.get(sourceEdge.getTarget().getId()),label,labelSize);
  previewGraph.addUndirectedEdge(previewEdge);
  return previewEdge;
}

Fixed version (ground truth):
/** 
 * Creates a preview undirected edge from the given source edge.
 * @param previewGraph  the parent preview graph
 * @param sourceEdge    the source edge
 * @return              the generated preview undirected edge
 */
private UndirectedEdgeImpl createPreviewUndirectedEdge(GraphImpl previewGraph,org.gephi.graph.api.Edge sourceEdge){
  org.gephi.graph.api.EdgeData sourceEdgeData=sourceEdge.getEdgeData();
  org.gephi.graph.api.TextData sourceEdgeTextData=sourceEdgeData.getTextData();
  String label=sourceEdgeData.getLabel();
  if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {
    label=sourceEdgeTextData.getText();
  }
  float labelSize=1f;
  if (sourceEdgeTextData != null) {
    labelSize=sourceEdgeTextData.getSize();
  }
  UndirectedEdgeImpl previewEdge=new UndirectedEdgeImpl(previewGraph,sourceEdge,nodeMap.get(sourceEdge.getSource().getId()),nodeMap.get(sourceEdge.getTarget().getId()),label,labelSize);
  previewGraph.addUndirectedEdge(previewEdge);
  return previewEdge;
}
Program: 190115
Project: 190115
Buggy source:
/** 
 * Constructor.
 * @param parent     the parent graph of the self-loop
 * @param thickness  the self-loop's thickness
 * @param node       the self-loop's related node
 */
public SelfLoopImpl(GraphImpl parent,float thickness,NodeImpl node){
  super(parent,thickness);
  this.node=node;
  genCurve();
  getSelfLoopSupervisor().addSelfLoop(this);
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param parent     the parent graph of the self-loop
 * @param thickness  the self-loop's thickness
 * @param node       the self-loop's related node
 */
public SelfLoopImpl(GraphImpl parent,Edge edge,NodeImpl node){
  super(parent,edge.getWeight());
  this.node=node;
  if (edge.getEdgeData().r() != -1) {
    originalColor=new Color(edge.getEdgeData().r(),edge.getEdgeData().g(),edge.getEdgeData().b(),edge.getEdgeData().alpha());
  }
 else {
    originalColor=null;
  }
  genCurve();
  getSelfLoopSupervisor().addSelfLoop(this);
}
Program: 190116
Project: 190116
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
 */
public UndirectedEdgeImpl(GraphImpl parent,float thickness,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,thickness,node1,node2,label,labelSize);
  getUndirectedEdgeSupervisor().addEdge(this);
}

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
 */
public UndirectedEdgeImpl(GraphImpl parent,Edge edge,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,edge,node1,node2,label,labelSize);
  getUndirectedEdgeSupervisor().addEdge(this);
}
Program: 190117
Project: 190117
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
 */
public UnidirectionalEdgeImpl(GraphImpl parent,float thickness,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,thickness,node1,node2,label,labelSize);
  getDirectedEdgeSupervisor().addEdge(this);
}

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
 */
public UnidirectionalEdgeImpl(GraphImpl parent,Edge edge,NodeImpl node1,NodeImpl node2,String label,float labelSize){
  super(parent,edge,node1,node2,label,labelSize);
  getDirectedEdgeSupervisor().addEdge(this);
}
Program: 190118
Project: 190118
Buggy source:
@Override public void setAsText(String s){
  if (supportsCustomColorMode() && colorizerFactory.matchCustomColorMode(s)) {
    Pattern p=Pattern.compile("String_Node_Str");
    Matcher m=p.matcher(s);
    if (m.lookingAt()) {
      int r=Integer.valueOf(m.group(1));
      int g=Integer.valueOf(m.group(2));
      int b=Integer.valueOf(m.group(3));
      setValue(colorizerFactory.createCustomColorMode(r,g,b));
    }
  }
 else   if (supportsNodeOriginalColorMode() && colorizerFactory.matchNodeOriginalColorMode(s)) {
    setValue(colorizerFactory.createNodeOriginalColorMode());
  }
 else   if (supportsParentColorMode() && colorizerFactory.matchParentColorMode(s)) {
    setValue(colorizerFactory.createParentColorMode());
  }
 else   if (supportsEdgeB1ColorMode() && colorizerFactory.matchEdgeB1ColorMode(s)) {
    setValue(colorizerFactory.createEdgeB1ColorMode());
  }
 else   if (supportsEdgeB2ColorMode() && colorizerFactory.matchEdgeB2ColorMode(s)) {
    setValue(colorizerFactory.createEdgeB2ColorMode());
  }
 else   if (supportsEdgeBothBColorMode() && colorizerFactory.matchEdgeBothBColorMode(s)) {
    setValue(colorizerFactory.createEdgeBothBColorMode());
  }
}

Fixed version (ground truth):
@Override public void setAsText(String s){
  if (supportsCustomColorMode() && colorizerFactory.matchCustomColorMode(s)) {
    Pattern p=Pattern.compile("String_Node_Str");
    Matcher m=p.matcher(s);
    if (m.lookingAt()) {
      int r=Integer.valueOf(m.group(1));
      int g=Integer.valueOf(m.group(2));
      int b=Integer.valueOf(m.group(3));
      setValue(colorizerFactory.createCustomColorMode(r,g,b));
    }
  }
 else   if (supportsNodeOriginalColorMode() && colorizerFactory.matchNodeOriginalColorMode(s)) {
    setValue(colorizerFactory.createNodeOriginalColorMode());
  }
 else   if (supportsParentColorMode() && colorizerFactory.matchParentColorMode(s)) {
    setValue(colorizerFactory.createParentColorMode());
  }
 else   if (supportsEdgeB1ColorMode() && colorizerFactory.matchEdgeB1ColorMode(s)) {
    setValue(colorizerFactory.createEdgeB1ColorMode());
  }
 else   if (supportsEdgeB2ColorMode() && colorizerFactory.matchEdgeB2ColorMode(s)) {
    setValue(colorizerFactory.createEdgeB2ColorMode());
  }
 else   if (supportsEdgeBothBColorMode() && colorizerFactory.matchEdgeBothBColorMode(s)) {
    setValue(colorizerFactory.createEdgeBothBColorMode());
  }
 else   if (supportEdgeOriginalColorMode() && colorizerFactory.matchEdgeOriginalColorMode(s)) {
    setValue(colorizerFactory.createEdgeOriginalColorMode());
  }
}