nus-yam/ex-repair huggingface dataset:
Program: 177191
Project: 177191
Buggy source:
/** 
 * Invokes javac on the specified source files.
 * @param classpath      The classpath.
 * @param compileDir     The compile directory.
 * @param additionalArgs Any additional arguments to the compiler.
 * @param sourceFiles    The source files.
 * @throws EnunciateException if the compile fails.
 */
public void invokeJavac(String classpath,File compileDir,List<String> additionalArgs,String[] sourceFiles) throws EnunciateException {
  List<String> args=new ArrayList<String>();
  args.add("String_Node_Str");
  args.add(classpath);
  if (isDebug()) {
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str");
  args.add(compileDir.getAbsolutePath());
  args.addAll(additionalArgs);
  args.addAll(Arrays.asList(sourceFiles));
  if (isDebug()) {
    StringBuilder message=new StringBuilder("String_Node_Str");
    for (    String arg : args) {
      message.append(' ');
      message.append(arg);
    }
    debug(message.toString());
  }
  compileDir.mkdirs();
  int procCode=com.sun.tools.javac.Main.compile(args.toArray(new String[args.size()]));
  if (procCode != 0) {
    throw new EnunciateException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Invokes javac on the specified source files.
 * @param classpath      The classpath.
 * @param compileDir     The compile directory.
 * @param additionalArgs Any additional arguments to the compiler.
 * @param sourceFiles    The source files.
 * @throws EnunciateException if the compile fails.
 */
public void invokeJavac(String classpath,File compileDir,List<String> additionalArgs,String[] sourceFiles) throws EnunciateException {
  if ((sourceFiles == null) || (sourceFiles.length == 0)) {
    warn("String_Node_Str");
    return;
  }
  List<String> args=new ArrayList<String>();
  args.add("String_Node_Str");
  args.add(classpath);
  if (isDebug()) {
    args.add("String_Node_Str");
  }
  args.add("String_Node_Str");
  args.add(compileDir.getAbsolutePath());
  args.addAll(additionalArgs);
  args.addAll(Arrays.asList(sourceFiles));
  if (isDebug()) {
    StringBuilder message=new StringBuilder("String_Node_Str");
    for (    String arg : args) {
      message.append(' ');
      message.append(arg);
    }
    debug(message.toString());
  }
  compileDir.mkdirs();
  int procCode=com.sun.tools.javac.Main.compile(args.toArray(new String[args.size()]));
  if (procCode != 0) {
    throw new EnunciateException("String_Node_Str");
  }
}
Program: 177193
Project: 177193
Buggy source:
/** 
 * Do the initialization logic.  Loads and initializes the deployment modules.
 * @return The deployment modules that were loaded and initialized.
 */
protected List<DeploymentModule> doInit() throws EnunciateException, IOException {
  if ((this.sourceFiles == null) || (this.sourceFiles.isEmpty())) {
    throw new EnunciateException("String_Node_Str");
  }
  if (isJavacCheck()) {
    invokeJavac(createTempDir(),getSourceFiles());
  }
  if (this.config == null) {
    this.config=loadConfig();
  }
  List<DeploymentModule> deploymentModules=this.config.getEnabledModules();
  initModules(deploymentModules);
  return deploymentModules;
}

Fixed version (ground truth):
/** 
 * Do the initialization logic.  Loads and initializes the deployment modules.
 * @return The deployment modules that were loaded and initialized.
 */
protected List<DeploymentModule> doInit() throws EnunciateException, IOException {
  if (isJavacCheck()) {
    invokeJavac(createTempDir(),getSourceFiles());
  }
  if (this.config == null) {
    this.config=loadConfig();
  }
  List<DeploymentModule> deploymentModules=this.config.getEnabledModules();
  initModules(deploymentModules);
  return deploymentModules;
}
Program: 177194
Project: 177194
Buggy source:
protected static Properties loadAndVerifyJettyProperties() throws IOException, IllegalStateException {
  properties=FileUtil.loadAndVerifyJettyPropertiesFile(jettyPropertiesPath,false);
  relativeContext=properties.getProperty("String_Node_Str",relativeContext);
  if (relativeContext == null) {
    throw new IllegalStateException("String_Node_Str" + jettyPropertiesPath);
  }
  String webappDir=properties.getProperty("String_Node_Str",webappHome.getAbsolutePath());
  if (webappDir == null) {
    throw new IllegalStateException("String_Node_Str" + jettyPropertiesPath);
  }
  webappHome=new File(webappDir);
  host=properties.getProperty("String_Node_Str","String_Node_Str");
  specifiedPort=Integer.parseInt(properties.getProperty("String_Node_Str","String_Node_Str" + DEFAULT_PORT));
  protocol=properties.getProperty("String_Node_Str","String_Node_Str");
  if (!webappHome.exists()) {
    throw new FileNotFoundException("String_Node_Str" + webappHome.getAbsolutePath());
  }
  return properties;
}

Fixed version (ground truth):
protected static Properties loadAndVerifyJettyProperties() throws IOException, IllegalStateException {
  properties=FileUtil.loadAndVerifyJettyPropertiesFile(jettyPropertiesPath,false);
  relativeContext=properties.getProperty("String_Node_Str",relativeContext);
  if (relativeContext == null) {
    throw new IllegalStateException("String_Node_Str" + jettyPropertiesPath);
  }
  String webappDir=properties.getProperty("String_Node_Str",(webappHome == null) ? null : webappHome.getAbsolutePath());
  if (webappDir == null) {
    throw new IllegalStateException("String_Node_Str" + jettyPropertiesPath);
  }
  webappHome=new File(webappDir);
  host=properties.getProperty("String_Node_Str","String_Node_Str");
  specifiedPort=Integer.parseInt(properties.getProperty("String_Node_Str","String_Node_Str" + DEFAULT_PORT));
  protocol=properties.getProperty("String_Node_Str","String_Node_Str");
  if (!webappHome.exists()) {
    throw new FileNotFoundException("String_Node_Str" + webappHome.getAbsolutePath());
  }
  return properties;
}
Program: 177195
Project: 177195
Buggy source:
@Override public boolean isBaseObject(){
  return getBaseType().getQname().equals(KnownXmlType.ANY_TYPE.getQname());
}

Fixed version (ground truth):
@Override public boolean isBaseObject(){
  return getSuperclass().getDeclaration() == null || Object.class.getName().equals(getSuperclass().getDeclaration().getQualifiedName());
}
Program: 177197
Project: 177197
Buggy source:
@Override public int hashCode(){
  int result;
  result=name.hashCode();
  result=31 * result + context.hashCode();
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  return toString().hashCode();
}
Program: 177198
Project: 177198
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  RESTNoun restNoun=(RESTNoun)o;
  return context.equals(restNoun.context) && name.equals(restNoun.name);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || !(o instanceof RESTNoun)) {
    return false;
  }
  RESTNoun restNoun=(RESTNoun)o;
  return toString().equals(restNoun.toString());
}
Program: 177199
Project: 177199
Buggy source:
/** 
 * tests the REST endpoint
 */
public void testRESTEndpoint() throws Exception {
}

Fixed version (ground truth):
/** 
 * tests the REST endpoint
 */
public void testRESTEndpoint() throws Exception {
  TypeDeclaration declaration=getDeclaration("String_Node_Str");
  RESTEndpoint endpoint=new RESTEndpoint((ClassDeclaration)declaration);
  ArrayList<RESTMethod> methods=new ArrayList<RESTMethod>(endpoint.getRESTMethods());
  assertEquals(3,methods.size());
  Iterator<RESTMethod> it=methods.iterator();
  while (it.hasNext()) {
    RESTMethod method=it.next();
    if ("String_Node_Str".equals(method.getSimpleName())) {
      assertEquals("String_Node_Str",method.getNoun().getContext());
      assertEquals("String_Node_Str",method.getNoun().getName());
      assertEquals("String_Node_Str",method.getNoun().toString());
    }
 else     if ("String_Node_Str".equals(method.getSimpleName())) {
      assertEquals("String_Node_Str",method.getNoun().getContext());
      assertEquals("String_Node_Str",method.getNoun().getName());
      assertEquals("String_Node_Str",method.getNoun().toString());
    }
 else     if ("String_Node_Str".equals(method.getSimpleName())) {
      assertEquals("String_Node_Str",method.getNoun().getContext());
      assertEquals("String_Node_Str",method.getNoun().getName());
      assertEquals("String_Node_Str",method.getNoun().toString());
    }
 else {
      fail("String_Node_Str" + method.getSimpleName());
    }
    it.remove();
  }
}
Program: 177203
Project: 177203
Buggy source:
/** 
 * Gets the REST resource identified by the given context and noun.
 * @param context The context.
 * @param noun The noun.
 * @return The resource, or null if none was found.
 */
public RESTResource getRESTResource(String context,String noun){
  for (  RESTResource restResource : RESTResources) {
    if ((restResource.getNounContext().equals(context)) && (restResource.getNoun().equals(noun))) {
      return restResource;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Gets the REST resource identified by the given context and noun.
 * @param noun The noun.
 * @param context The context.
 * @return The resource, or null if none was found.
 */
public RESTResource getRESTResource(String noun,String context){
  for (  RESTResource restResource : RESTResources) {
    if ((restResource.getNounContext().equals(context)) && (restResource.getNoun().equals(noun))) {
      return restResource;
    }
  }
  return null;
}
Program: 177205
Project: 177205
Buggy source:
public RESTResourceJSONExporter(String noun,String nounContext,RESTResourceFactory resourceFactory){
  super(noun,nounContext,resourceFactory);
}

Fixed version (ground truth):
public RESTResourceJSONExporter(RESTResource resource){
  super(resource);
}
Program: 177206
Project: 177206
Buggy source:
protected ModelAndView handleRequestInternal(HttpServletRequest request,HttpServletResponse response) throws Exception {
  String properNoun=null;
  Matcher matcher=urlPattern.matcher(request.getRequestURI());
  if (matcher.find()) {
    properNoun=matcher.group(1);
    if ("String_Node_Str".equals(properNoun)) {
      properNoun=null;
    }
  }
 else {
    response.sendError(HttpServletResponse.SC_NOT_FOUND,request.getRequestURI());
    return null;
  }
  String httpMethod=request.getMethod().toUpperCase();
  VerbType verb=null;
  if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.create;
  }
 else   if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.read;
  }
 else   if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.update;
  }
 else   if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.delete;
  }
 else {
    response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED,"String_Node_Str" + httpMethod);
    return null;
  }
  try {
    return handleRESTOperation(properNoun,verb,request,response);
  }
 catch (  Exception e) {
    if (this.exceptionHandler != null) {
      return this.exceptionHandler.resolveException(request,response,this,e);
    }
 else {
      throw e;
    }
  }
}

Fixed version (ground truth):
protected ModelAndView handleRequestInternal(HttpServletRequest request,HttpServletResponse response) throws Exception {
  String properNoun;
  Matcher matcher=urlPattern.matcher(request.getRequestURI());
  if (matcher.find()) {
    properNoun=matcher.group(1);
    if ("String_Node_Str".equals(properNoun)) {
      properNoun=null;
    }
  }
 else {
    response.sendError(HttpServletResponse.SC_NOT_FOUND,request.getRequestURI());
    return null;
  }
  String httpMethod=request.getMethod().toUpperCase();
  VerbType verb;
  if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.create;
  }
 else   if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.read;
  }
 else   if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.update;
  }
 else   if ("String_Node_Str".equals(httpMethod)) {
    verb=VerbType.delete;
  }
 else {
    response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED,"String_Node_Str" + httpMethod);
    return null;
  }
  try {
    return handleRESTOperation(properNoun,verb,request,response);
  }
 catch (  Exception e) {
    if (this.exceptionHandler != null) {
      return this.exceptionHandler.resolveException(request,response,this,e);
    }
 else {
      throw e;
    }
  }
}
Program: 177207
Project: 177207
Buggy source:
public RESTResourceXMLExporter(String noun,String nounContext,RESTResource resource){
  DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance();
  builderFactory.setNamespaceAware(false);
  try {
    documentBuilder=builderFactory.newDocumentBuilder();
  }
 catch (  ParserConfigurationException e) {
    throw new RuntimeException(e);
  }
  this.noun=noun;
  this.nounContext=nounContext;
  this.resource=resource;
  this.urlPattern=Pattern.compile(nounContext + "String_Node_Str" + noun+ "String_Node_Str");
}

Fixed version (ground truth):
public RESTResourceXMLExporter(RESTResource resource){
  DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance();
  builderFactory.setNamespaceAware(false);
  try {
    documentBuilder=builderFactory.newDocumentBuilder();
  }
 catch (  ParserConfigurationException e) {
    throw new RuntimeException(e);
  }
  this.resource=resource;
}
Program: 177208
Project: 177208
Buggy source:
@Override protected void initApplicationContext() throws BeansException {
  super.initApplicationContext();
  if (resource == null) {
    throw new ApplicationContextException("String_Node_Str" + this.noun + "String_Node_Str"+ this.nounContext+ "String_Node_Str");
  }
  Set<VerbType> supportedVerbs=resource.getSupportedVerbs();
  String[] supportedMethods=new String[supportedVerbs.size()];
  int i=0;
  for (  VerbType supportedVerb : supportedVerbs) {
    String method;
switch (supportedVerb) {
case create:
      method="String_Node_Str";
    break;
case read:
  method="String_Node_Str";
break;
case update:
method="String_Node_Str";
break;
case delete:
method="String_Node_Str";
break;
default :
throw new IllegalStateException("String_Node_Str" + supportedVerb);
}
supportedMethods[i++]=method;
}
setSupportedMethods(supportedMethods);
}

Fixed version (ground truth):
@Override protected void initApplicationContext() throws BeansException {
  super.initApplicationContext();
  if (resource == null) {
    throw new ApplicationContextException("String_Node_Str");
  }
  String noun=resource.getNoun();
  String nounContext=resource.getNounContext();
  this.urlPattern=Pattern.compile(nounContext + "String_Node_Str" + noun+ "String_Node_Str");
  Set<VerbType> supportedVerbs=resource.getSupportedVerbs();
  String[] supportedMethods=new String[supportedVerbs.size()];
  int i=0;
  for (  VerbType supportedVerb : supportedVerbs) {
    String method;
switch (supportedVerb) {
case create:
      method="String_Node_Str";
    break;
case read:
  method="String_Node_Str";
break;
case update:
method="String_Node_Str";
break;
case delete:
method="String_Node_Str";
break;
default :
throw new IllegalStateException("String_Node_Str" + supportedVerb);
}
supportedMethods[i++]=method;
}
setSupportedMethods(supportedMethods);
}
Program: 177209
Project: 177209
Buggy source:
public Object getInstance(Object impl){
  return impl;
}

Fixed version (ground truth):
public Object getInstance(Object impl,Class... interfaces){
  return impl;
}
Program: 177210
Project: 177210
Buggy source:
/** 
 * Gets an instance of the specified service.
 * @param impl The base implementation object.
 * @return The instance.
 */
Object getInstance(Object impl);

Fixed version (ground truth):
/** 
 * Gets an instance of the specified service.
 * @param impl The base implementation object.
 * @param interfaces The interfaces to be implemented.
 * @return The instance.
 */
Object getInstance(Object impl,Class... interfaces);
Program: 177211
Project: 177211
Buggy source:
public EnunciateAnnotationProcessor(Enunciate enunciate) throws EnunciateException {
  super(null);
  if (enunciate == null) {
    throw new EnunciateException("String_Node_Str");
  }
 else   if (enunciate.getConfig() == null) {
    throw new EnunciateException("String_Node_Str");
  }
  this.enunciate=enunciate;
  EnunciateConfiguration config=this.enunciate.getConfig();
  String baseURL=config.getDeploymentProtocol() + "String_Node_Str" + config.getDeploymentHost();
  if (config.getDeploymentContext() != null) {
    baseURL+=config.getDeploymentContext();
  }
 else   if ((config.getLabel() != null) && (!"String_Node_Str".equals(config.getLabel()))) {
    baseURL+=("String_Node_Str" + config.getLabel());
  }
  this.deploymentBaseURL=baseURL;
}

Fixed version (ground truth):
public EnunciateAnnotationProcessor(Enunciate enunciate,String... additionalApiClasses) throws EnunciateException {
  super(null);
  if (enunciate == null) {
    throw new EnunciateException("String_Node_Str");
  }
 else   if (enunciate.getConfig() == null) {
    throw new EnunciateException("String_Node_Str");
  }
  this.enunciate=enunciate;
  EnunciateConfiguration config=this.enunciate.getConfig();
  String baseURL=config.getDeploymentProtocol() + "String_Node_Str" + config.getDeploymentHost();
  if (config.getDeploymentContext() != null) {
    baseURL+=config.getDeploymentContext();
  }
 else   if ((config.getLabel() != null) && (!"String_Node_Str".equals(config.getLabel()))) {
    baseURL+=("String_Node_Str" + config.getLabel());
  }
  this.deploymentBaseURL=baseURL;
  this.additionalApiClasses=additionalApiClasses;
}
Program: 177213
Project: 177213
Buggy source:
public EnunciateAnnotationProcessorFactory(Enunciate enunciate) throws EnunciateException {
  this.processor=new EnunciateAnnotationProcessor(enunciate);
  this.round=0;
}

Fixed version (ground truth):
public EnunciateAnnotationProcessorFactory(Enunciate enunciate,String... additionalApiClasses) throws EnunciateException {
  this.processor=new EnunciateAnnotationProcessor(enunciate,additionalApiClasses);
  this.round=0;
}
Program: 177215
Project: 177215
Buggy source:
/** 
 * The type of the accessor.
 * @return The type of the accessor.
 */
public TypeMirror getAccessorType(){
  TypeMirror accessorType;
  Declaration delegate=getDelegate();
  if (delegate instanceof FieldDeclaration) {
    accessorType=((FieldDeclaration)delegate).getType();
  }
 else {
    accessorType=((PropertyDeclaration)delegate).getPropertyType();
  }
  return accessorType;
}

Fixed version (ground truth):
/** 
 * The type of the accessor.
 * @return The type of the accessor.
 */
public TypeMirror getAccessorType(){
  TypeMirror accessorType;
  Declaration delegate=getDelegate();
  if (delegate instanceof FieldDeclaration) {
    accessorType=((FieldDeclaration)delegate).getType();
  }
 else {
    accessorType=((PropertyDeclaration)delegate).getPropertyType();
  }
  MapType mapType=MapTypeUtil.findMapType(accessorType);
  if (mapType != null) {
    accessorType=mapType;
  }
  return accessorType;
}
Program: 177216
Project: 177216
Buggy source:
/** 
 * The qname for the referenced element, if this element is a reference to a global element, or null if this element is not a reference element.
 * @return The qname for the referenced element, if exists.
 */
public QName getRef(){
  QName ref=null;
  XmlType baseType=getBaseType();
  if (baseType.isAnonymous()) {
    TypeDefinition baseTypeDef=((XmlClassType)baseType).getTypeDefinition();
    if (baseTypeDef.getAnnotation(XmlRootElement.class) != null) {
      RootElementDeclaration rootElement=new RootElementDeclaration((ClassDeclaration)baseTypeDef.getDelegate(),baseTypeDef);
      ref=new QName(rootElement.getNamespace(),rootElement.getName());
    }
  }
  return ref;
}

Fixed version (ground truth):
/** 
 * The qname for the referenced element, if this element is a reference to a global element, or null if this element is not a reference element.
 * @return The qname for the referenced element, if exists.
 */
public QName getRef(){
  QName ref=null;
  XmlType baseType=getBaseType();
  if ((baseType.isAnonymous()) && (baseType instanceof XmlClassType)) {
    TypeDefinition baseTypeDef=((XmlClassType)baseType).getTypeDefinition();
    if (baseTypeDef.getAnnotation(XmlRootElement.class) != null) {
      RootElementDeclaration rootElement=new RootElementDeclaration((ClassDeclaration)baseTypeDef.getDelegate(),baseTypeDef);
      ref=new QName(rootElement.getNamespace(),rootElement.getName());
    }
  }
  return ref;
}
Program: 177218
Project: 177218
Buggy source:
public TypeMirror getType(){
  return property.getPropertyType();
}

Fixed version (ground truth):
public TypeMirror getType(){
  TypeMirror propertyType=property.getPropertyType();
  MapType mapType=MapTypeUtil.findMapType(propertyType);
  if (mapType != null) {
    propertyType=mapType;
  }
  return propertyType;
}
Program: 177220
Project: 177220
Buggy source:
public MapType(InterfaceType interfaceType,TypeMirror keyType,TypeMirror valueType){
  super(interfaceType);
  this.keyType=keyType;
  this.valueType=valueType;
}

Fixed version (ground truth):
public MapType(InterfaceType interfaceType,TypeMirror keyType,TypeMirror valueType){
  super(interfaceType);
  TypeMirror mapKeyType=MapTypeUtil.findMapType(keyType);
  if (mapKeyType != null) {
    this.keyType=mapKeyType;
  }
 else {
    this.keyType=keyType;
  }
  TypeMirror mapValueType=MapTypeUtil.findMapType(valueType);
  if (mapValueType != null) {
    this.valueType=mapValueType;
  }
 else {
    this.valueType=valueType;
  }
}
Program: 177221
Project: 177221
Buggy source:
protected Iterator<EndpointInterface> getLoop(TemplateModel model) throws TemplateException {
  WsdlInfo wsdl=this.wsdl;
  if (wsdl == null) {
    wsdl=(WsdlInfo)model.getVariable("String_Node_Str");
    if (wsdl == null) {
      throw new MissingParameterException("String_Node_Str");
    }
  }
  return wsdl.getEndpointInterfaces().iterator();
}

Fixed version (ground truth):
protected Iterator<EndpointInterface> getLoop(TemplateModel model) throws TemplateException {
  WsdlInfo wsdl=this.wsdl;
  if (wsdl == null) {
    throw new MissingParameterException("String_Node_Str");
  }
  return wsdl.getEndpointInterfaces().iterator();
}
Program: 177222
Project: 177222
Buggy source:
protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
  WebMethod webMethod=this.webMethod;
  if (webMethod == null) {
    webMethod=(WebMethod)model.getVariable("String_Node_Str");
    if (webMethod == null) {
      throw new MissingParameterException("String_Node_Str");
    }
  }
  return webMethod.getWebFaults().iterator();
}

Fixed version (ground truth):
protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
  WebMethod webMethod=this.webMethod;
  if (webMethod == null) {
    throw new MissingParameterException("String_Node_Str");
  }
  return webMethod.getWebFaults().iterator();
}
Program: 177223
Project: 177223
Buggy source:
protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
  WsdlInfo wsdl=this.wsdl;
  if (wsdl == null) {
    wsdl=(WsdlInfo)model.getVariable("String_Node_Str");
    if (wsdl == null) {
      throw new MissingParameterException("String_Node_Str");
    }
  }
  HashMap<String,WebFault> declaredFaults=new HashMap<String,WebFault>();
  for (  EndpointInterface ei : wsdl.getEndpointInterfaces()) {
    Collection<WebMethod> webMethods=ei.getWebMethods();
    for (    WebMethod webMethod : webMethods) {
      for (      WebFault webFault : webMethod.getWebFaults()) {
        declaredFaults.put(webFault.getQualifiedName(),webFault);
      }
    }
  }
  return declaredFaults.values().iterator();
}

Fixed version (ground truth):
protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
  WsdlInfo wsdl=this.wsdl;
  if (wsdl == null) {
    throw new MissingParameterException("String_Node_Str");
  }
  HashMap<String,WebFault> declaredFaults=new HashMap<String,WebFault>();
  for (  EndpointInterface ei : wsdl.getEndpointInterfaces()) {
    Collection<WebMethod> webMethods=ei.getWebMethods();
    for (    WebMethod webMethod : webMethods) {
      for (      WebFault webFault : webMethod.getWebFaults()) {
        declaredFaults.put(webFault.getQualifiedName(),webFault);
      }
    }
  }
  return declaredFaults.values().iterator();
}
Program: 177224
Project: 177224
Buggy source:
protected Iterator<WebMessage> getLoop(TemplateModel model) throws TemplateException {
  WebMethod webMethod=this.webMethod;
  if (webMethod == null) {
    webMethod=(WebMethod)model.getVariable("String_Node_Str");
  }
  WsdlInfo wsdlInfo=this.wsdl;
  if (wsdlInfo == null) {
    wsdlInfo=(WsdlInfo)model.getVariable("String_Node_Str");
  }
  if ((webMethod == null) && (wsdlInfo == null)) {
    throw new MissingParameterException("String_Node_Str","String_Node_Str");
  }
  Collection<WebMessage> messages;
  if (webMethod != null) {
    messages=webMethod.getMessages();
  }
 else {
    messages=new ArrayList<WebMessage>();
    HashSet<String> foundFaults=new HashSet<String>();
    for (    EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
      Collection<WebMethod> webMethods=ei.getWebMethods();
      for (      WebMethod method : webMethods) {
        for (        WebMessage webMessage : method.getMessages()) {
          if (webMessage.isFault() && !foundFaults.add(((WebFault)webMessage).getQualifiedName())) {
            continue;
          }
          messages.add(webMessage);
        }
      }
    }
  }
  Collection<WebMessage> io=new ArrayList<WebMessage>();
  for (  WebMessage message : messages) {
    boolean include=(includeHeaders || !message.isHeader());
    include&=(includeOutput || !message.isOutput());
    include&=(includeInput || !message.isInput());
    include&=(includeFaults || !message.isFault());
    if (include) {
      io.add(message);
    }
  }
  return io.iterator();
}

Fixed version (ground truth):
protected Iterator<WebMessage> getLoop(TemplateModel model) throws TemplateException {
  WebMethod webMethod=this.webMethod;
  WsdlInfo wsdlInfo=this.wsdl;
  if ((webMethod == null) && (wsdlInfo == null)) {
    throw new MissingParameterException("String_Node_Str","String_Node_Str");
  }
  Collection<WebMessage> messages;
  if (webMethod != null) {
    messages=webMethod.getMessages();
  }
 else {
    messages=new ArrayList<WebMessage>();
    HashSet<String> foundFaults=new HashSet<String>();
    for (    EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
      Collection<WebMethod> webMethods=ei.getWebMethods();
      for (      WebMethod method : webMethods) {
        for (        WebMessage webMessage : method.getMessages()) {
          if (webMessage.isFault() && !foundFaults.add(((WebFault)webMessage).getQualifiedName())) {
            continue;
          }
          messages.add(webMessage);
        }
      }
    }
  }
  Collection<WebMessage> io=new ArrayList<WebMessage>();
  for (  WebMessage message : messages) {
    boolean include=(includeHeaders || !message.isHeader());
    include&=(includeOutput || !message.isOutput());
    include&=(includeInput || !message.isInput());
    include&=(includeFaults || !message.isFault());
    if (include) {
      io.add(message);
    }
  }
  return io.iterator();
}
Program: 177225
Project: 177225
Buggy source:
protected Iterator<WebMethod> getLoop(TemplateModel model) throws TemplateException {
  EndpointInterface endpointInterface=this.endpointInterface;
  if (endpointInterface == null) {
    endpointInterface=(EndpointInterface)model.getVariable("String_Node_Str");
    if (endpointInterface == null) {
      throw new MissingParameterException("String_Node_Str");
    }
  }
  return endpointInterface.getWebMethods().iterator();
}

Fixed version (ground truth):
protected Iterator<WebMethod> getLoop(TemplateModel model) throws TemplateException {
  EndpointInterface endpointInterface=this.endpointInterface;
  if (endpointInterface == null) {
    throw new MissingParameterException("String_Node_Str");
  }
  return endpointInterface.getWebMethods().iterator();
}
Program: 177227
Project: 177227
Buggy source:
/** 
 * Loads the configuration specified by the given stream.
 * @param in The stream.
 */
public void load(InputStream in) throws IOException, SAXException {
  Digester digester=createDigester();
  digester.setErrorHandler(this);
  digester.setValidating(true);
  digester.setSchema(EnunciateConfiguration.class.getResource("String_Node_Str").toString());
  digester.push(this);
  digester.addSetProperties("String_Node_Str");
  digester.addObjectCreate("String_Node_Str","String_Node_Str",DefaultValidator.class);
  digester.addSetNext("String_Node_Str","String_Node_Str");
  digester.addCallMethod("String_Node_Str","String_Node_Str",2);
  digester.addCallParam("String_Node_Str",0,"String_Node_Str");
  digester.addCallParam("String_Node_Str",1,"String_Node_Str");
  for (  DeploymentModule module : getAllModules()) {
    String pattern=String.format("String_Node_Str",module.getName());
    digester.addRule(pattern,new PushModuleRule(module));
    digester.addSetProperties(pattern);
    RuleSet configRules=module.getConfigurationRules();
    if (configRules != null) {
      digester.addRuleSet(configRules);
    }
  }
  digester.parse(in);
}

Fixed version (ground truth):
/** 
 * Loads the configuration specified by the given stream.
 * @param in The stream.
 */
public void load(InputStream in) throws IOException, SAXException {
  Digester digester=createDigester();
  digester.setErrorHandler(this);
  digester.setValidating(true);
  digester.setSchema(EnunciateConfiguration.class.getResource("String_Node_Str").toString());
  digester.push(this);
  digester.addSetProperties("String_Node_Str");
  digester.addObjectCreate("String_Node_Str","String_Node_Str",DefaultValidator.class);
  digester.addSetNext("String_Node_Str","String_Node_Str");
  digester.addCallMethod("String_Node_Str","String_Node_Str",2);
  digester.addCallParam("String_Node_Str",0,"String_Node_Str");
  digester.addCallParam("String_Node_Str",1,"String_Node_Str");
  digester.addCallMethod("String_Node_Str","String_Node_Str",2);
  digester.addCallParam("String_Node_Str",0,"String_Node_Str");
  digester.addCallParam("String_Node_Str",1,"String_Node_Str");
  for (  DeploymentModule module : getAllModules()) {
    String pattern=String.format("String_Node_Str",module.getName());
    digester.addRule(pattern,new PushModuleRule(module));
    digester.addSetProperties(pattern);
    RuleSet configRules=module.getConfigurationRules();
    if (configRules != null) {
      digester.addRuleSet(configRules);
    }
  }
  digester.parse(in);
}
Program: 177229
Project: 177229
Buggy source:
public EnunciateFreemarkerModel(){
  this.namespacesToPrefixes=loadKnownNamespaces();
  this.knownTypes=loadKnownTypes();
  this.namespacesToSchemas=new HashMap<String,SchemaInfo>();
  this.namespacesToWsdls=new HashMap<String,WsdlInfo>();
  setVariable("String_Node_Str",this.namespacesToPrefixes);
  setVariable("String_Node_Str",this.namespacesToSchemas);
  setVariable("String_Node_Str",this.namespacesToWsdls);
}

Fixed version (ground truth):
public EnunciateFreemarkerModel(){
  this.namespacesToPrefixes=loadKnownNamespaces();
  this.knownTypes=loadKnownTypes();
  this.namespacesToSchemas=new HashMap<String,SchemaInfo>();
  this.namespacesToWsdls=new HashMap<String,WsdlInfo>();
  setVariable("String_Node_Str",new ArrayList<String>(this.namespacesToPrefixes.keySet()));
  setVariable("String_Node_Str",this.namespacesToPrefixes);
  setVariable("String_Node_Str",this.namespacesToSchemas);
  setVariable("String_Node_Str",this.namespacesToWsdls);
}
Program: 177230
Project: 177230
Buggy source:
/** 
 * Get the imported namespaces used by this WSDL.
 * @return The imported namespaces used by this WSDL.
 */
public Set<String> getImportedNamespaces(){
  Collection<EndpointInterface> endpointInterfaces=getEndpointInterfaces();
  if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) {
    throw new IllegalStateException("String_Node_Str" + getTargetNamespace() + "String_Node_Str");
  }
  TreeSet<String> importedNamespaces=new TreeSet<String>();
  for (  EndpointInterface endpointInterface : endpointInterfaces) {
    importedNamespaces.addAll(endpointInterface.getReferencedNamespaces());
  }
  return importedNamespaces;
}

Fixed version (ground truth):
/** 
 * Get the imported namespaces used by this WSDL.
 * @return The imported namespaces used by this WSDL.
 */
public Set<String> getImportedNamespaces(){
  Collection<EndpointInterface> endpointInterfaces=getEndpointInterfaces();
  if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) {
    throw new IllegalStateException("String_Node_Str" + getTargetNamespace() + "String_Node_Str");
  }
  HashSet<String> importedNamespaces=new HashSet<String>();
  for (  EndpointInterface endpointInterface : endpointInterfaces) {
    importedNamespaces.addAll(endpointInterface.getReferencedNamespaces());
  }
  return importedNamespaces;
}
Program: 177231
Project: 177231
Buggy source:
/** 
 * The qname for the referenced accessor, if this accessor is a reference to a global element, or null if this element is not a reference element.
 * @return The qname for the referenced element, if exists.
 */
public QName getRef(){
  String namespace=getNamespace();
  String typeNamespace=getTypeDefinition().getTargetNamespace();
  if (!namespace.equals(typeNamespace)) {
    return new QName(namespace,getName());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * The qname for the referenced accessor, if this accessor is a reference to a global element, or null if this element is not a reference element.
 * @return The qname for the referenced element, if exists.
 */
public QName getRef(){
  String namespace=getNamespace();
  String typeNamespace=getTypeDefinition().getTargetNamespace();
  if (namespace == null) {
    if (typeNamespace != null) {
      return new QName(namespace,getName());
    }
  }
 else   if (!namespace.equals(typeNamespace)) {
    return new QName(namespace,getName());
  }
  return null;
}
Program: 177232
Project: 177232
Buggy source:
/** 
 * The namespace of this package, or null if none.
 * @return The namespace of this package.
 */
public String getNamespace(){
  String namespace="String_Node_Str";
  if (xmlSchema != null) {
    namespace=xmlSchema.namespace();
  }
  return namespace;
}

Fixed version (ground truth):
/** 
 * The namespace of this package, or null if none.
 * @return The namespace of this package.
 */
public String getNamespace(){
  String namespace=null;
  if (xmlSchema != null) {
    namespace=xmlSchema.namespace();
  }
  return namespace;
}
Program: 177233
Project: 177233
Buggy source:
/** 
 * The set of namespace URIs that this web service references.
 * @return The set of namespace URIs that this web service references.
 */
public Set<String> getReferencedNamespaces(){
  TreeSet<String> namespaces=new TreeSet<String>();
  namespaces.add(getTargetNamespace());
  Collection<WebMethod> webMethods=getWebMethods();
  for (  WebMethod webMethod : webMethods) {
    namespaces.addAll(webMethod.getReferencedNamespaces());
  }
  return namespaces;
}

Fixed version (ground truth):
/** 
 * The set of namespace URIs that this web service references.
 * @return The set of namespace URIs that this web service references.
 */
public Set<String> getReferencedNamespaces(){
  HashSet<String> namespaces=new HashSet<String>();
  namespaces.add(getTargetNamespace());
  Collection<WebMethod> webMethods=getWebMethods();
  for (  WebMethod webMethod : webMethods) {
    namespaces.addAll(webMethod.getReferencedNamespaces());
  }
  return namespaces;
}
Program: 177234
Project: 177234
Buggy source:
/** 
 * A set of the reference namespace for this method.
 * @return A set of the reference namespace for this method.
 */
public Set<String> getReferencedNamespaces(){
  TreeSet<String> namespaces=new TreeSet<String>();
  Collection<WebMessage> messages=getMessages();
  for (  WebMessage message : messages) {
    for (    WebMessagePart part : message.getParts()) {
      namespaces.add(part.getElementQName().getNamespaceURI());
      if (part instanceof ImplicitSchemaElement) {
        ImplicitSchemaElement implicitElement=(ImplicitSchemaElement)part;
        QName typeQName=implicitElement.getTypeQName();
        if (typeQName != null) {
          namespaces.add(typeQName.getNamespaceURI());
        }
        if (implicitElement instanceof ImplicitRootElement) {
          for (          ImplicitChildElement childElement : ((ImplicitRootElement)implicitElement).getChildElements()) {
            namespaces.add(childElement.getTypeQName().getNamespaceURI());
          }
        }
      }
    }
  }
  return namespaces;
}

Fixed version (ground truth):
/** 
 * A set of the reference namespace for this method.
 * @return A set of the reference namespace for this method.
 */
public Set<String> getReferencedNamespaces(){
  HashSet<String> namespaces=new HashSet<String>();
  Collection<WebMessage> messages=getMessages();
  for (  WebMessage message : messages) {
    for (    WebMessagePart part : message.getParts()) {
      namespaces.add(part.getElementQName().getNamespaceURI());
      if (part instanceof ImplicitSchemaElement) {
        ImplicitSchemaElement implicitElement=(ImplicitSchemaElement)part;
        QName typeQName=implicitElement.getTypeQName();
        if (typeQName != null) {
          namespaces.add(typeQName.getNamespaceURI());
        }
        if (implicitElement instanceof ImplicitRootElement) {
          for (          ImplicitChildElement childElement : ((ImplicitRootElement)implicitElement).getChildElements()) {
            namespaces.add(childElement.getTypeQName().getNamespaceURI());
          }
        }
      }
    }
  }
  return namespaces;
}
Program: 177235
Project: 177235
Buggy source:
public ValidationResult validateElementRef(ElementRef elementRef){
  ValidationResult result=validateAccessor(elementRef);
  if (elementRef.getChoices().isEmpty()) {
    XmlTypeMirror baseType=elementRef.getBaseType();
    result.addError(elementRef.getPosition(),"String_Node_Str" + new QName(baseType.getNamespace(),baseType.getName()).toString() + "String_Node_Str");
  }
  if ((elementRef.getAnnotation(XmlElement.class) != null) || (elementRef.getAnnotation(XmlElements.class) != null)) {
    result.addError(elementRef.getPosition(),"String_Node_Str");
  }
  if (elementRef.isWrapped()) {
    XmlElementWrapper wrapper=elementRef.getAnnotation(XmlElementWrapper.class);
    if ((!"String_Node_Str".equals(wrapper.namespace())) && (!elementRef.getTypeDefinition().getTargetNamespace().equals(wrapper.namespace()))) {
      result.addError(elementRef.getPosition(),"String_Node_Str" + "String_Node_Str");
    }
  }
  return result;
}

Fixed version (ground truth):
public ValidationResult validateElementRef(ElementRef elementRef){
  ValidationResult result=validateAccessor(elementRef);
  if (elementRef.getChoices().isEmpty()) {
    XmlTypeMirror baseType=elementRef.getBaseType();
    result.addError(elementRef.getPosition(),"String_Node_Str" + new QName(baseType.getNamespace(),baseType.getName()).toString() + "String_Node_Str");
  }
  if ((elementRef.getAnnotation(XmlElement.class) != null) || (elementRef.getAnnotation(XmlElements.class) != null)) {
    result.addError(elementRef.getPosition(),"String_Node_Str");
  }
  if (elementRef.isWrapped()) {
    XmlElementWrapper wrapper=elementRef.getAnnotation(XmlElementWrapper.class);
    String namespace=wrapper.namespace();
    String typeNamespace=elementRef.getTypeDefinition().getTargetNamespace();
    if (namespace == null) {
      namespace="String_Node_Str";
    }
    if (typeNamespace == null) {
      typeNamespace="String_Node_Str";
    }
    if ((!"String_Node_Str".equals(namespace)) && (!typeNamespace.equals(namespace))) {
      result.addError(elementRef.getPosition(),"String_Node_Str" + "String_Node_Str");
    }
  }
  return result;
}
Program: 177236
Project: 177236
Buggy source:
public ValidationResult validateElement(Element element){
  ValidationResult result=validateAccessor(element);
  XmlElements xmlElements=element.getAnnotation(XmlElements.class);
  if ((element.isCollectionType()) && (element.getBaseType() != KnownXmlType.ANY_TYPE) && (xmlElements != null)&& (xmlElements.value() != null)&& (xmlElements.value().length > 1)) {
    result.addError(element.getPosition(),"String_Node_Str");
  }
  if (element.isWrapped()) {
    XmlElementWrapper wrapper=element.getAnnotation(XmlElementWrapper.class);
    if ((!"String_Node_Str".equals(wrapper.namespace())) && (!element.getTypeDefinition().getTargetNamespace().equals(wrapper.namespace()))) {
      result.addError(element.getPosition(),"String_Node_Str" + "String_Node_Str");
    }
  }
  return result;
}

Fixed version (ground truth):
public ValidationResult validateElement(Element element){
  ValidationResult result=validateAccessor(element);
  XmlElements xmlElements=element.getAnnotation(XmlElements.class);
  if ((element.isCollectionType()) && (element.getBaseType() != KnownXmlType.ANY_TYPE) && (xmlElements != null)&& (xmlElements.value() != null)&& (xmlElements.value().length > 1)) {
    result.addError(element.getPosition(),"String_Node_Str");
  }
  if (element.isWrapped()) {
    XmlElementWrapper wrapper=element.getAnnotation(XmlElementWrapper.class);
    String namespace=wrapper.namespace();
    String typeNamespace=element.getTypeDefinition().getTargetNamespace();
    if (namespace == null) {
      namespace="String_Node_Str";
    }
    if (typeNamespace == null) {
      typeNamespace="String_Node_Str";
    }
    if ((!"String_Node_Str".equals(namespace)) && (!typeNamespace.equals(namespace))) {
      result.addError(element.getPosition(),"String_Node_Str" + "String_Node_Str");
    }
  }
  return result;
}
Program: 177237
Project: 177237
Buggy source:
/** 
 * Processes the template.  Assumes that the model is already established.
 */
public void processTemplate() throws IOException, TemplateException {
  Configuration configuration=getConfiguration();
  Template template=configuration.getTemplate(getTemplateURL().toString());
  FreemarkerModel model=FreemarkerModel.get();
  if (model == null) {
    throw new IOException("String_Node_Str");
  }
  template.process(model,new OutputStreamWriter(System.out));
}

Fixed version (ground truth):
/** 
 * Processes the template.  Assumes that the model is already established.
 */
public void processTemplate() throws IOException, TemplateException {
  Configuration configuration=getConfiguration();
  configuration.setDefaultEncoding("String_Node_Str");
  Template template=configuration.getTemplate(getTemplateURL().toString());
  FreemarkerModel model=FreemarkerModel.get();
  if (model == null) {
    throw new IOException("String_Node_Str");
  }
  template.process(model,new OutputStreamWriter(System.out));
}
Program: 177238
Project: 177238
Buggy source:
public boolean isEndpointInterface(TypeDeclaration declaration){
  boolean is=false;
  WebService ws=declaration.getAnnotation(WebService.class);
  if (ws != null) {
    is=(declaration instanceof InterfaceDeclaration);
    if (!is && declaration instanceof ClassDeclaration) {
      is=(ws.endpointInterface() == null);
    }
  }
  return is;
}

Fixed version (ground truth):
public boolean isEndpointInterface(TypeDeclaration declaration){
  boolean is=false;
  WebService ws=declaration.getAnnotation(WebService.class);
  if (ws != null) {
    is=(declaration instanceof InterfaceDeclaration) || ((ws.endpointInterface() != null) && (!"String_Node_Str".equals(ws.endpointInterface())));
  }
  return is;
}
Program: 177239
Project: 177239
Buggy source:
public void testValidity() throws Exception {
  DefaultJAXWSValidator validator=new DefaultJAXWSValidator();
  TypeDeclaration declaration=getDeclaration("String_Node_Str");
  assertFalse(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  declaration=getDeclaration("String_Node_Str");
  assertTrue(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  declaration=getDeclaration("String_Node_Str");
  assertTrue(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  declaration=getDeclaration("String_Node_Str");
  assertTrue(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
}

Fixed version (ground truth):
@Test public void testValidity() throws Exception {
  DefaultJAXWSValidator validator=new DefaultJAXWSValidator();
  TypeDeclaration declaration=getDeclaration("String_Node_Str");
  assertFalse(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  ValidationException e) {
  }
  declaration=getDeclaration("String_Node_Str");
  assertTrue(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  ValidationException e) {
  }
  declaration=getDeclaration("String_Node_Str");
  assertTrue(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  ValidationException e) {
  }
  declaration=getDeclaration("String_Node_Str");
  assertTrue(validator.isEndpointInterface(declaration));
  try {
    new EndpointInterface(declaration,validator);
    fail("String_Node_Str");
  }
 catch (  ValidationException e) {
  }
}
Program: 177240
Project: 177240
Buggy source:
@Override public void onDetached(){
  for (  Chunk chunk : observingChunks) {
    if (chunk.isLoaded()) {
      chunk.removeObserver(getOwner());
    }
  }
  observingChunks.clear();
}

Fixed version (ground truth):
@Override public void onDetached(){
  for (  Chunk chunk : observingChunks) {
    if (chunk.isLoaded()) {
      chunk.removeObserver(getOwner());
    }
  }
  observingChunks.clear();
  if (this instanceof Listener) {
    Spout.getEventManager().unRegisterEvents((Listener)this);
  }
}
Program: 177242
Project: 177242
Buggy source:
@Override public void execute(Event event) throws EventException {
  try {
    if (!checkClass.isAssignableFrom(event.getClass())) {
      throw new EventException("String_Node_Str");
    }
    method.invoke(listener,event);
  }
 catch (  InvocationTargetException e) {
    if (e.getCause() instanceof EventException) {
      throw (EventException)e.getCause();
    }
    throw new EventException(e.getCause());
  }
catch (  Throwable t) {
    throw new EventException(t);
  }
}

Fixed version (ground truth):
@Override public void execute(Event event) throws EventException {
  try {
    if (!clazz.isAssignableFrom(event.getClass())) {
      throw new EventException("String_Node_Str");
    }
    method.invoke(listener,event);
  }
 catch (  InvocationTargetException e) {
    if (e.getCause() instanceof EventException) {
      throw (EventException)e.getCause();
    }
    throw new EventException(e.getCause());
  }
catch (  Throwable t) {
    throw new EventException(t);
  }
}
Program: 177243
Project: 177243
Buggy source:
@Override public void onEvent(SyncedMapEvent event){
  session.send(true,new SyncedMapMessage(event.getAssociatedObject().getId(),SyncedMapEvent.Action.ADD,event.getModifiedElements()));
}

Fixed version (ground truth):
@Override public void onEvent(SyncedMapEvent event){
  Entity e=Spout.getEngine().getEntity(playerUUID);
  if (e == null || !(e instanceof Player)) {
    SyncedMapRegistry.getRegistrationMap().unregisterListener(this);
  }
  session.send(true,new SyncedMapMessage(event.getAssociatedObject().getId(),SyncedMapEvent.Action.ADD,event.getModifiedElements()));
}