Program: 121696
Project: 121696
Buggy source:
public void refreshJobletNodes(boolean update,boolean coll){
  if (!coll || update) {
    JobletUtil util=new JobletUtil();
    IProcess jobletProcess=this.getNode().getComponent().getProcess();
    Set<IConnection> conns=new HashSet<IConnection>();
    List<? extends INode> jobletNodes=jobletProcess.getGraphicalNodes();
    boolean lockByOther=false;
    if (jobletProcess instanceof IProcess2) {
      lockByOther=util.lockByOthers(((IProcess2)jobletProcess).getProperty().getItem());
    }
    Map<String,List<? extends IElementParameter>> paraMap=new HashMap<String,List<? extends IElementParameter>>();
    for (    NodeContainer nc : nodeContainers) {
      if (this.node.getProcess() instanceof IProcess2) {
        if (!update) {
          paraMap.put(nc.getNode().getJoblet_unique_name(),nc.getNode().getElementParameters());
        }
        ((IProcess2)this.node.getProcess()).removeUniqueNodeName(nc.getNode().getUniqueName());
      }
    }
    nodeContainers.clear();
    jobletElements.clear();
    for (    INode inode : jobletNodes) {
      if ((inode instanceof Node)) {
        Node temNode=(Node)inode;
        conns.addAll(temNode.getIncomingConnections());
        conns.addAll(temNode.getOutgoingConnections());
        Node jnode=util.cloneNode(temNode,this.node.getProcess(),paraMap,lockByOther);
        NodeContainer nodeContainer=util.cloneNodeContainer(temNode.getNodeContainer(),jnode);
        jnode.setJobletnode(this.node);
        jnode.setJoblet_unique_name(temNode.getUniqueName());
        this.nodeContainers.add(nodeContainer);
        this.jobletElements.add(jnode);
        this.jobletElements.add(jnode.getNodeLabel());
        this.jobletElements.add(jnode.getNodeError());
        this.jobletElements.add(jnode.getNodeProgressBar());
      }
    }
    for (Iterator<IConnection> iter=conns.iterator(); iter.hasNext(); ) {
      IConnection con=iter.next();
      String sourceName=con.getSource().getUniqueName();
      String targetName=con.getTarget().getUniqueName();
      Node sourceNode=null;
      Node targetNode=null;
      for (      NodeContainer nodeC : nodeContainers) {
        Node connNode=nodeC.getNode();
        if (connNode.getJoblet_unique_name().equals(sourceName)) {
          sourceNode=connNode;
        }
        if (connNode.getJoblet_unique_name().equals(targetName)) {
          targetNode=connNode;
        }
        if (sourceNode != null && targetNode != null) {
          util.cloneConnection(con,sourceNode,targetNode);
          break;
        }
      }
    }
  }
}

Fixed version (ground truth):
public void refreshJobletNodes(boolean update,boolean coll){
  if (!coll || update) {
    JobletUtil util=new JobletUtil();
    IProcess jobletProcess=this.getNode().getComponent().getProcess();
    Set<IConnection> conns=new HashSet<IConnection>();
    List<? extends INode> jobletNodes=jobletProcess.getGraphicalNodes();
    boolean lockByOther=false;
    if (jobletProcess instanceof IProcess2) {
      lockByOther=util.lockByOthers(((IProcess2)jobletProcess).getProperty().getItem());
    }
    Map<String,List<? extends IElementParameter>> paraMap=new HashMap<String,List<? extends IElementParameter>>();
    for (    NodeContainer nc : nodeContainers) {
      if (this.node.getProcess() instanceof IProcess2) {
        if (!update) {
          paraMap.put(nc.getNode().getJoblet_unique_name(),nc.getNode().getElementParameters());
        }
        ((IProcess2)this.node.getProcess()).removeUniqueNodeName(nc.getNode().getUniqueName());
      }
    }
    nodeContainers.clear();
    jobletElements.clear();
    for (    INode inode : jobletNodes) {
      if ((inode instanceof Node)) {
        Node temNode=(Node)inode;
        conns.addAll(temNode.getIncomingConnections());
        conns.addAll(temNode.getOutgoingConnections());
        Node jnode=util.cloneNode(temNode,this.node.getProcess(),paraMap,lockByOther);
        if (!this.node.isActivate()) {
          jnode.setActivate(this.node.isActivate());
        }
        NodeContainer nodeContainer=util.cloneNodeContainer(temNode.getNodeContainer(),jnode);
        jnode.setJobletnode(this.node);
        jnode.setJoblet_unique_name(temNode.getUniqueName());
        this.nodeContainers.add(nodeContainer);
        this.jobletElements.add(jnode);
        this.jobletElements.add(jnode.getNodeLabel());
        this.jobletElements.add(jnode.getNodeError());
        this.jobletElements.add(jnode.getNodeProgressBar());
      }
    }
    for (Iterator<IConnection> iter=conns.iterator(); iter.hasNext(); ) {
      IConnection con=iter.next();
      String sourceName=con.getSource().getUniqueName();
      String targetName=con.getTarget().getUniqueName();
      Node sourceNode=null;
      Node targetNode=null;
      for (      NodeContainer nodeC : nodeContainers) {
        Node connNode=nodeC.getNode();
        if (connNode.getJoblet_unique_name().equals(sourceName)) {
          sourceNode=connNode;
        }
        if (connNode.getJoblet_unique_name().equals(targetName)) {
          targetNode=connNode;
        }
        if (sourceNode != null && targetNode != null) {
          util.cloneConnection(con,sourceNode,targetNode);
          break;
        }
      }
    }
  }
}