Program: 143166
Project: 143166
Buggy source:
public void addEdge(EdgeDraft edgeDraft){
  if (edgeDraft == null) {
    throw new NullPointerException();
  }
  EdgeDraftImpl edgeDraftImpl=(EdgeDraftImpl)edgeDraft;
  if (edgeDraftImpl.getSource() == null) {
    String message=NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str");
    report.logIssue(new Issue(message,Level.SEVERE));
    return;
  }
  if (edgeDraftImpl.getTarget() == null) {
    String message=NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str");
    report.logIssue(new Issue(message,Level.SEVERE));
    return;
  }
  if (edgeDraftImpl.getSource() == edgeDraftImpl.getTarget() && !parameters.isSelfLoops()) {
    String message=NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str");
    report.logIssue(new Issue(message,Level.SEVERE));
    return;
  }
switch (parameters.getEdgeDefault()) {
case DIRECTED:
    EdgeDraft.EdgeType type1=edgeDraftImpl.getType();
  if (type1.equals(EdgeDraft.EdgeType.UNDIRECTED)) {
    report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str"),Level.WARNING));
  }
break;
case UNDIRECTED:
EdgeDraft.EdgeType type2=edgeDraftImpl.getType();
if (type2.equals(EdgeDraft.EdgeType.DIRECTED)) {
report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str"),Level.WARNING));
}
break;
case MIXED:
break;
}
String id=edgeDraftImpl.getId();
String sourceTargetId=edgeDraftImpl.getSource().getId() + "String_Node_Str" + edgeDraftImpl.getTarget().getId();
if (edgeMap.containsKey(id) || edgeSourceTargetMap.containsKey(sourceTargetId)) {
if (!parameters.isParallelEdges()) {
report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str"),Level.WARNING));
return;
}
 else {
report.logIssue(new Issue("String_Node_Str" + id + "String_Node_Str",Level.INFO));
return;
}
}
edgeSourceTargetMap.put(edgeDraftImpl.getSource().getId() + "String_Node_Str" + edgeDraftImpl.getTarget().getId(),edgeDraftImpl);
edgeMap.put(id,edgeDraftImpl);
}

Fixed version (ground truth):
public void addEdge(EdgeDraft edgeDraft){
  if (edgeDraft == null) {
    throw new NullPointerException();
  }
  EdgeDraftImpl edgeDraftImpl=(EdgeDraftImpl)edgeDraft;
  if (edgeDraftImpl.getSource() == null) {
    String message=NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str");
    report.logIssue(new Issue(message,Level.SEVERE));
    return;
  }
  if (edgeDraftImpl.getTarget() == null) {
    String message=NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str");
    report.logIssue(new Issue(message,Level.SEVERE));
    return;
  }
  if (edgeDraftImpl.getSource() == edgeDraftImpl.getTarget() && !parameters.isSelfLoops()) {
    String message=NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str");
    report.logIssue(new Issue(message,Level.SEVERE));
    return;
  }
  if (edgeDraftImpl.getType() != null) {
switch (parameters.getEdgeDefault()) {
case DIRECTED:
      EdgeDraft.EdgeType type1=edgeDraftImpl.getType();
    if (type1.equals(EdgeDraft.EdgeType.UNDIRECTED)) {
      report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str"),Level.WARNING));
    }
  break;
case UNDIRECTED:
EdgeDraft.EdgeType type2=edgeDraftImpl.getType();
if (type2.equals(EdgeDraft.EdgeType.DIRECTED)) {
report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str"),Level.WARNING));
}
break;
case MIXED:
break;
}
}
String id=edgeDraftImpl.getId();
String sourceTargetId=edgeDraftImpl.getSource().getId() + "String_Node_Str" + edgeDraftImpl.getTarget().getId();
if (edgeMap.containsKey(id) || edgeSourceTargetMap.containsKey(sourceTargetId)) {
if (!parameters.isParallelEdges()) {
report.logIssue(new Issue(NbBundle.getMessage(ImportContainerImpl.class,"String_Node_Str"),Level.WARNING));
return;
}
 else {
report.logIssue(new Issue("String_Node_Str" + id + "String_Node_Str",Level.INFO));
return;
}
}
edgeSourceTargetMap.put(edgeDraftImpl.getSource().getId() + "String_Node_Str" + edgeDraftImpl.getTarget().getId(),edgeDraftImpl);
edgeMap.put(id,edgeDraftImpl);
}