Program: 149316
Project: 149316
Buggy source:
protected void commit(){
  try {
    if (this.refreshing)     return;
    this.comitting=true;
    WSRole ws=(WSRole)(getXObject().getWsObject());
    ws.setName(role.getName());
    ws.setDescription(role.getDescription());
    Set<String> objectTypes=role.getSpecifications().keySet();
    ArrayList<WSRoleSpecification> wsSpecifications=new ArrayList<WSRoleSpecification>();
    for (Iterator iter=objectTypes.iterator(); iter.hasNext(); ) {
      String objectType=(String)iter.next();
      Role.Specification specification=role.getSpecifications().get(objectType);
      ArrayList<WSRoleSpecificationInstance> wsInstances=new ArrayList<WSRoleSpecificationInstance>();
      Set<String> instanceIds=specification.getInstances().keySet();
      for (Iterator iterator=instanceIds.iterator(); iterator.hasNext(); ) {
        String id=(String)iterator.next();
        Role.Specification.Instance instance=specification.getInstances().get(id);
        WSRoleSpecificationInstance wsInstance=new WSRoleSpecificationInstance(id,instance.isWritable(),instance.getParameters().toArray(new String[instance.getParameters().size()]));
        wsInstances.add(wsInstance);
      }
      WSRoleSpecification wsSpecification=new WSRoleSpecification(objectType,specification.isAdmin(),wsInstances.toArray(new WSRoleSpecificationInstance[wsInstances.size()]));
      wsSpecifications.add(wsSpecification);
    }
    ws.setSpecification(wsSpecifications.toArray(new WSRoleSpecification[wsSpecifications.size()]));
    this.comitting=false;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
protected void commit(){
  try {
    if (this.refreshing)     return;
    this.comitting=true;
    WSRole ws=(WSRole)(getXObject().getWsObject());
    ws.setDescription(desAntionComposite.getText());
    ws.setName(role.getName());
    Set<String> objectTypes=role.getSpecifications().keySet();
    ArrayList<WSRoleSpecification> wsSpecifications=new ArrayList<WSRoleSpecification>();
    for (Iterator iter=objectTypes.iterator(); iter.hasNext(); ) {
      String objectType=(String)iter.next();
      Role.Specification specification=role.getSpecifications().get(objectType);
      ArrayList<WSRoleSpecificationInstance> wsInstances=new ArrayList<WSRoleSpecificationInstance>();
      Set<String> instanceIds=specification.getInstances().keySet();
      for (Iterator iterator=instanceIds.iterator(); iterator.hasNext(); ) {
        String id=(String)iterator.next();
        Role.Specification.Instance instance=specification.getInstances().get(id);
        WSRoleSpecificationInstance wsInstance=new WSRoleSpecificationInstance(id,instance.isWritable(),instance.getParameters().toArray(new String[instance.getParameters().size()]));
        wsInstances.add(wsInstance);
      }
      WSRoleSpecification wsSpecification=new WSRoleSpecification(objectType,specification.isAdmin(),wsInstances.toArray(new WSRoleSpecificationInstance[wsInstances.size()]));
      wsSpecifications.add(wsSpecification);
    }
    ws.setSpecification(wsSpecifications.toArray(new WSRoleSpecification[wsSpecifications.size()]));
    this.comitting=false;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getSite().getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
  }
}