text:
#ifndef 	__GPU_SYSFS_HEADER_H__
#define 	__GPU_SYSFS_HEADER_H__

/* Linux kernel header. */
#include 	<linux/kobject.h>
#include 	<linux/string.h>
#include 	<linux/sysfs.h>
#include 	<linux/module.h>
#include 	<linux/init.h>
#include 	<linux/platform_device.h>
#include 	<linux/slab.h>

/* File handling related headers. */
#include 	<linux/fs.h>
#include 	<asm/segment.h>
#include 	<asm/uaccess.h>
#include 	<linux/buffer_head.h>
#include 	<linux/string.h>

/* Some necessary defines and typedefs. */
#define  	GPU_SYSFS_MODULE_NAME	"gpusysfs"
#define  	DEVNAME_SIZE			32
#define  	SRUK_FALSE      		1
#define  	SRUK_TRUE       		0
#define 	SRUK_DRV_NAME 			"sruk"
typedef 	unsigned int   		sruk_bool;
static const char 				sruk_drv_name[] = SRUK_DRV_NAME;

/* Device and attribute data structure. */
typedef struct sruk_os_device
{
	struct list_head 	entry;
	struct device 	   *dev;
	char 				devname[DEVNAME_SIZE];
} sruk_os_device;

typedef struct sruk_attribute
{
	int id;
	uintptr_t data;
} sruk_attribute;

typedef struct sruk_device
{
	sruk_os_device  	osdev;
} sruk_device;

/* *
 * *********************************************************************
 * Function prototypes for sysfs.
 * *********************************************************************
 * */
ssize_t gpu_min_clock_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_max_clock_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_busy_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_vol_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_freq_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_freq_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
ssize_t gpu_freq_table_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_governor_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_governor_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
ssize_t gpu_available_governor_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_cores_config_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_tmu_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_model_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_version_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t gpu_mem_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t fps_show(struct device *dev, struct device_attribute *attr, char *buf);
ssize_t fps_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);

/* *
 * *********************************************************************
 * File handling related function prototypes..
 * *********************************************************************
 * */
struct file* file_open(const char* path, int flags, int rights) ;
void 	file_close(struct file *file_ptr);
int 	file_read(struct file *file_ptr, unsigned long long offset, unsigned char* data, unsigned int size);
int 	file_write(struct file *file_ptr, unsigned long long offset, unsigned char* data, unsigned int size);
int 	file_sync(struct file* file_ptr);
int 	open_file_and_read_buffer(char *filename_and_path, char *input_buffer, int input_buffer_size);
int 	open_file_and_write_buffer(char *filename_and_path, const char *buffer, int buffer_size);

/* *
 * *********************************************************************
 * Buffer size for reading from sysfs files.
 * *********************************************************************
 * */
#define		INPUT_BUFFER_SIZE_16	16
#define		INPUT_BUFFER_SIZE_32	32
#define		INPUT_BUFFER_SIZE_64	64
#define		INPUT_BUFFER_SIZE_128	128
#define		INPUT_BUFFER_SIZE_256	256
#define		INPUT_BUFFER_SIZE_512	512

#endif 		/* __GPU_SYSFS_HEADER_H__ */


text:
package com.datastax.dse.driver.api.core.data.time;

import com.datastax.dse.driver.internal.core.search.DateRangeUtil;
import com.datastax.oss.driver.shaded.guava.common.base.Preconditions;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import java.text.ParseException;
import java.time.ZonedDateTime;
import java.util.Calendar;
import java.util.Objects;

/**
 * A date range bound.
 *
 *
It is composed of a {@link ZonedDateTime} field and a corresponding {@link
 * DateRangePrecision}.
 *
 *
Date range bounds are inclusive. The special value {@link #UNBOUNDED} denotes an un unbounded
 * (infinite) bound, represented by a {@code *} sign.
 *
 *
This class is immutable and thread-safe.
 */
public class DateRangeBound {

  /**
   * The unbounded {@link DateRangeBound} instance. It is syntactically represented by a {@code *}
   * (star) sign.
   */
  public static final DateRangeBound UNBOUNDED = new DateRangeBound();

  /**
   * Parses the given input as a lower date range bound.
   *
   *
The input should be a Lucene-compliant
   * string.
   *
   *
The returned bound will have its {@linkplain DateRangePrecision precision} inferred from the
   * input, and its timestamp will be {@linkplain DateRangePrecision#roundDown(ZonedDateTime)
   * rounded down} to that precision.
   *
   *
Note that, in order to align with the server's parsing behavior, dates will always be parsed
   * in the UTC time zone.
   *
   * @throws NullPointerException if {@code lowerBound} is {@code null}.
   * @throws ParseException if the given input cannot be parsed.
   */
  @NonNull
  public static DateRangeBound parseLowerBound(@NonNull String source) throws ParseException {
    Preconditions.checkNotNull(source);
    Calendar calendar = DateRangeUtil.parseCalendar(source);
    DateRangePrecision precision = DateRangeUtil.getPrecision(calendar);
    return (precision == null)
        ? UNBOUNDED
        : lowerBound(DateRangeUtil.toZonedDateTime(calendar), precision);
  }

  /**
   * Parses the given input as an upper date range bound.
   *
   *
The input should be a Lucene-compliant
   * string.
   *
   *
The returned bound will have its {@linkplain DateRangePrecision precision} inferred from the
   * input, and its timestamp will be {@linkplain DateRangePrecision#roundUp(ZonedDateTime)} rounded
   * up} to that precision.
   *
   *
Note that, in order to align with the server's behavior (e.g. when using date range literals
   * in CQL query strings), dates must always be in the UTC time zone: an optional trailing {@code
   * Z}" is allowed, but no other time zone ID (not even {@code UTC}, {@code GMT} or {@code +00:00})
   * is permitted.
   *
   * @throws NullPointerException if {@code upperBound} is {@code null}.
   * @throws ParseException if the given input cannot be parsed.
   */
  public static DateRangeBound parseUpperBound(String source) throws ParseException {
    Preconditions.checkNotNull(source);
    Calendar calendar = DateRangeUtil.parseCalendar(source);
    DateRangePrecision precision = DateRangeUtil.getPrecision(calendar);
    return (precision == null)
        ? UNBOUNDED
        : upperBound(DateRangeUtil.toZonedDateTime(calendar), precision);
  }

  /**
   * Creates a date range lower bound from the given date and precision. Temporal fields smaller
   * than the precision will be rounded down.
   */
  public static DateRangeBound lowerBound(ZonedDateTime timestamp, DateRangePrecision precision) {
    return new DateRangeBound(precision.roundDown(timestamp), precision);
  }

  /**
   * Creates a date range upper bound from the given date and precision. Temporal fields smaller
   * than the precision will be rounded up.
   */
  public static DateRangeBound upperBound(ZonedDateTime timestamp, DateRangePrecision precision) {
    return new DateRangeBound(precision.roundUp(timestamp), precision);
  }

  @Nullable private final ZonedDateTime timestamp;
  @Nullable private final DateRangePrecision precision;

  private DateRangeBound(@NonNull ZonedDateTime timestamp, @NonNull DateRangePrecision precision) {
    Preconditions.checkNotNull(timestamp);
    Preconditions.checkNotNull(precision);
    this.timestamp = timestamp;
    this.precision = precision;
  }

  // constructor used for the special UNBOUNDED value
  private DateRangeBound() {
    this.timestamp = null;
    this.precision = null;
  }

  /** Whether this bound is unbounded (i.e. denotes the special {@code *} value). */
  public boolean isUnbounded() {
    return this.timestamp == null && this.precision == null;
  }

  /**
   * Returns the timestamp of this bound.
   *
   * @throws IllegalStateException if this bound is {@linkplain #isUnbounded() unbounded}.
   */
  @NonNull
  public ZonedDateTime getTimestamp() {
    if (isUnbounded()) {
      throw new IllegalStateException(
          "Can't call this method on UNBOUNDED, use isUnbounded() to check first");
    }
    assert timestamp != null;
    return timestamp;
  }

  /**
   * Returns the precision of this bound.
   *
   * @throws IllegalStateException if this bound is {@linkplain #isUnbounded() unbounded}.
   */
  @NonNull
  public DateRangePrecision getPrecision() {
    if (isUnbounded()) {
      throw new IllegalStateException(
          "Can't call this method on UNBOUNDED, use isUnbounded() to check first");
    }
    assert precision != null;
    return precision;
  }

  /**
   * Returns this bound as a Lucene-compliant string.
   *
   *
Unbounded bounds always return "{@code *}"; all other bounds are formatted in one of the
   * common ISO-8601 datetime formats, depending on their precision.
   *
   *
Note that Lucene expects timestamps in UTC only. Timezone presence is always optional, and
   * if present, it must be expressed with the symbol "Z" exclusively. Therefore this method does
   * not include any timezone information in the returned string, except for bounds with {@linkplain
   * DateRangePrecision#MILLISECOND millisecond} precision, where the symbol "Z" is always appended
   * to the resulting string.
   */
  @NonNull
  @Override
  public String toString() {
    if (isUnbounded()) {
      return "*";
    } else {
      assert timestamp != null && precision != null;
      return precision.format(timestamp);
    }
  }

  @Override
  public boolean equals(@Nullable Object other) {
    if (other == this) {
      return true;
    } else if (other instanceof DateRangeBound) {
      DateRangeBound that = (DateRangeBound) other;
      return Objects.equals(this.timestamp, that.timestamp)
          && Objects.equals(this.precision, that.precision);
    } else {
      return false;
    }
  }

  @Override
  public int hashCode() {
    return Objects.hash(timestamp, precision);
  }
}

redpajama_set_name: RedPajamaGithub


text:
/*
 * Problem Link: https://leetcode.com/problems/reverse-integer/
 */

public class Solution {
    public int reverse(int x) {
        long answer=0;
        boolean positive = (x>=0)? true : false;
        while(x!=0){
            answer= answer*10 + x%10;
            x=x/10;
        }

        return (positive)? ((answer < Integer.MAX_VALUE && answer >=0 )? (int)answer : 0) : ((answer > Integer.MIN_VALUE && answer <0 )? (int)answer : 0) ;
    }
}


text:
[![MIT License](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)
[![Ninja Sphere](https://img.shields.io/badge/works%20with-ninja%20sphere-8f72e3.svg)](http://ninjablocks.com)

Ninja Block driver to read data from Luxtronik2 based heat pump controllers (Siemens, Novelan, Wolf, Alpha Innotec)

This code was inspired by this code:

https://github.com/pfandfrei/luxtronik2

This is a driver for the Ninja Block ecosystem. Read this documentation for more information:

http://docs.ninja.is/quickstarts/driverrealm/installdrivers.html

Install this Driver with:

Manual Installation

cd into your drivers directory (/opt/ninja/drivers on your Ninja Block)

git clone git://github.com/cbrandlehner/ninja-luxtronik2.git

cd ninja-luxtronik2

npm install

sudo service ninjablock restart


text:
import React, { Component } from 'react';
import { connect } from 'react-redux';
import immutableChildrenToJS from 'binary-utils/lib/immutableChildrenToJS';

import shouldPureComponentUpdate from 'react-pure-render/function';
import TradingTimesCard from './TradingTimesCard';
import tradingTimesSelectors from './tradingTimesSelectors';

@connect(tradingTimesSelectors)
export default class TradingTimesContainer extends Component {

	shouldComponentUpdate = shouldPureComponentUpdate;

	render() {
		return (
			<TradingTimesCard
				{...immutableChildrenToJS(this.props)}
			/>
		);
	}
}


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ppapi/proxy/flash_file_resource.h"

#include "base/files/file_path.h"
#include "ipc/ipc_message.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/file_type_conversion.h"
#include "ppapi/shared_impl/scoped_pp_var.h"
#include "ppapi/shared_impl/time_conversion.h"
#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"

namespace ppapi {
namespace proxy {

namespace {

// Returns the path that a PPB_FileRef resource references as long as it is an
// PP_FILESYSTEMTYPE_EXTERNAL path. Returns an empty string on error.
std::string GetPathFromFileRef(PP_Resource file_ref) {
  thunk::EnterResourceNoLock<thunk::PPB_FileRef_API> enter(file_ref, true);
  if (enter.failed())
    return std::string();
  if (enter.object()->GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL)
    return std::string();
  ScopedPPVar var(ScopedPPVar::PassRef(), enter.object()->GetAbsolutePath());
  StringVar* string_var = StringVar::FromPPVar(var.get());
  if (!string_var)
    return std::string();
  return string_var->value();
}

}  // namespace

FlashFileResource::FlashFileResource(Connection connection,
                                     PP_Instance instance)
    : PluginResource(connection, instance) {
  SendCreate(BROWSER, PpapiHostMsg_FlashFile_Create());
}

FlashFileResource::~FlashFileResource() {
}

thunk::PPB_Flash_File_API* FlashFileResource::AsPPB_Flash_File_API() {
  return this;
}

int32_t FlashFileResource::OpenFile(PP_Instance /*instance*/,
                                    const char* path,
                                    int32_t mode,
                                    PP_FileHandle* file) {
  return OpenFileHelper(path, PepperFilePath::DOMAIN_MODULE_LOCAL, mode, file);
}

int32_t FlashFileResource::RenameFile(PP_Instance /*instance*/,
                                      const char* path_from,
                                      const char* path_to) {
  PepperFilePath pepper_from(PepperFilePath::DOMAIN_MODULE_LOCAL,
                             base::FilePath::FromUTF8Unsafe(path_from));
  PepperFilePath pepper_to(PepperFilePath::DOMAIN_MODULE_LOCAL,
                           base::FilePath::FromUTF8Unsafe(path_to));

  int32_t error = SyncCall<IPC::Message>(
      BROWSER, PpapiHostMsg_FlashFile_RenameFile(pepper_from, pepper_to));

  return error;
}

int32_t FlashFileResource::DeleteFileOrDir(PP_Instance /*instance*/,
                                           const char* path,
                                           PP_Bool recursive) {
  PepperFilePath pepper_path(PepperFilePath::DOMAIN_MODULE_LOCAL,
                             base::FilePath::FromUTF8Unsafe(path));

  int32_t error = SyncCall<IPC::Message>(
      BROWSER, PpapiHostMsg_FlashFile_DeleteFileOrDir(pepper_path,
                                                      PP_ToBool(recursive)));

  return error;
}

int32_t FlashFileResource::CreateDir(PP_Instance /*instance*/,
                                     const char* path) {
  PepperFilePath pepper_path(PepperFilePath::DOMAIN_MODULE_LOCAL,
                             base::FilePath::FromUTF8Unsafe(path));

  int32_t error = SyncCall<IPC::Message>(BROWSER,
      PpapiHostMsg_FlashFile_CreateDir(pepper_path));

  return error;
}

int32_t FlashFileResource::QueryFile(PP_Instance /*instance*/,
                                     const char* path,
                                     PP_FileInfo* info) {
  return QueryFileHelper(path, PepperFilePath::DOMAIN_MODULE_LOCAL, info);
}

int32_t FlashFileResource::GetDirContents(PP_Instance /*instance*/,
                                          const char* path,
                                          PP_DirContents_Dev** contents) {
  ppapi::DirContents entries;
  PepperFilePath pepper_path(PepperFilePath::DOMAIN_MODULE_LOCAL,
                             base::FilePath::FromUTF8Unsafe(path));

  int32_t error = SyncCall<PpapiPluginMsg_FlashFile_GetDirContentsReply>(
      BROWSER, PpapiHostMsg_FlashFile_GetDirContents(pepper_path), &entries);

  if (error == PP_OK) {
    // Copy the serialized dir entries to the output struct.
    *contents = new PP_DirContents_Dev;
    (*contents)->count = static_cast<int32_t>(entries.size());
    (*contents)->entries = new PP_DirEntry_Dev[entries.size()];
    for (size_t i = 0; i < entries.size(); i++) {
      const ppapi::DirEntry& source = entries[i];
      PP_DirEntry_Dev* dest = &(*contents)->entries[i];
      std::string name = source.name.AsUTF8Unsafe();
      char* name_copy = new char[name.size() + 1];
      memcpy(name_copy, name.c_str(), name.size() + 1);
      dest->name = name_copy;
      dest->is_dir = PP_FromBool(source.is_dir);
    }
  }

  return error;
}

void FlashFileResource::FreeDirContents(PP_Instance /*instance*/,
                                        PP_DirContents_Dev* contents) {
  for (int32_t i = 0; i < contents->count; ++i)
    delete[] contents->entries[i].name;
  delete[] contents->entries;
  delete contents;
}

int32_t FlashFileResource::CreateTemporaryFile(PP_Instance /*instance*/,
                                               PP_FileHandle* file) {
  if (!file)
    return PP_ERROR_BADARGUMENT;

  IPC::Message unused;
  ResourceMessageReplyParams reply_params;
  int32_t error = GenericSyncCall(BROWSER,
      PpapiHostMsg_FlashFile_CreateTemporaryFile(), &unused, &reply_params);
  if (error != PP_OK)
    return error;

  IPC::PlatformFileForTransit transit_file;
  if (!reply_params.TakeFileHandleAtIndex(0, &transit_file))
    return PP_ERROR_FAILED;

  *file = IPC::PlatformFileForTransitToPlatformFile(transit_file);
  return PP_OK;
}

int32_t FlashFileResource::OpenFileRef(PP_Instance /*instance*/,
                                       PP_Resource file_ref,
                                       int32_t mode,
                                       PP_FileHandle* file) {
  return OpenFileHelper(GetPathFromFileRef(file_ref),
                        PepperFilePath::DOMAIN_ABSOLUTE, mode, file);
}

int32_t FlashFileResource::QueryFileRef(PP_Instance /*instance*/,
                                        PP_Resource file_ref,
                                        PP_FileInfo* info) {
  return QueryFileHelper(GetPathFromFileRef(file_ref),
                         PepperFilePath::DOMAIN_ABSOLUTE, info);
}

int32_t FlashFileResource::OpenFileHelper(const std::string& path,
                                          PepperFilePath::Domain domain_type,
                                          int32_t mode,
                                          PP_FileHandle* file) {
  if (path.empty() ||
      !ppapi::PepperFileOpenFlagsToPlatformFileFlags(mode, NULL) ||
      !file)
    return PP_ERROR_BADARGUMENT;

  PepperFilePath pepper_path(domain_type, base::FilePath::FromUTF8Unsafe(path));

  IPC::Message unused;
  ResourceMessageReplyParams reply_params;
  int32_t error = GenericSyncCall(BROWSER,
      PpapiHostMsg_FlashFile_OpenFile(pepper_path, mode), &unused,
      &reply_params);
  if (error != PP_OK)
    return error;

  IPC::PlatformFileForTransit transit_file;
  if (!reply_params.TakeFileHandleAtIndex(0, &transit_file))
    return PP_ERROR_FAILED;

  *file = IPC::PlatformFileForTransitToPlatformFile(transit_file);
  return PP_OK;
}

int32_t FlashFileResource::QueryFileHelper(const std::string& path,
                                           PepperFilePath::Domain domain_type,
                                           PP_FileInfo* info) {
  if (path.empty() || !info)
    return PP_ERROR_BADARGUMENT;

  base::PlatformFileInfo file_info;
  PepperFilePath pepper_path(domain_type, base::FilePath::FromUTF8Unsafe(path));

  int32_t error = SyncCall<PpapiPluginMsg_FlashFile_QueryFileReply>(BROWSER,
      PpapiHostMsg_FlashFile_QueryFile(pepper_path), &file_info);

  if (error == PP_OK) {
    info->size = file_info.size;
    info->creation_time = TimeToPPTime(file_info.creation_time);
    info->last_access_time = TimeToPPTime(file_info.last_accessed);
    info->last_modified_time = TimeToPPTime(file_info.last_modified);
    info->system_type = PP_FILESYSTEMTYPE_EXTERNAL;
    if (file_info.is_directory)
      info->type = PP_FILETYPE_DIRECTORY;
    else
      info->type = PP_FILETYPE_REGULAR;
  }

  return error;
}

}  // namespace proxy
}  // namespace ppapi


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Ventanas;

import Modelo.Categoria;
import Modelo.Centro;
import Modelo.Trabajador;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author 7fbd06
 */
public class TrabajadorFormularioEdit extends javax.swing.JFrame {

    private List<Centro> centros;
    private Trabajador tra;
    private BuscarCentro bc;
    private BuscarUsuario bu;

    /**
     * Creates new form TrabajadorFormulario
     */
    public TrabajadorFormularioEdit(int id) {
        initComponents();
        tra = Trabajador.verTrabajador(id);
        jtNombre.setText(tra.getNombre());
        jtAp1.setText(tra.getAp1());
        jtAp2.setText(tra.getAp2());
        jtDireccion.setText(tra.getDireccion());
        jtDni.setText(tra.getDni());
        Double salario = tra.getSalario();
        String salarioS = salario.toString();
        jtSalario.setText(salarioS);
        jtTelEmp.setText(tra.getTelf_empresa());
        jtTelPer.setText(tra.getTelf_personal());
        jtfechanacimiento.setText(tra.getFechanac());
        jcCategoria.addItem(Categoria.Administrativo);
        jcCategoria.addItem(Categoria.Transportista);
        jidcentro.setText(String.valueOf(tra.getCentro().getId_centro()));
        jusuario.setText(tra.getUsuario().getUsuario());
    }

    public void setJidcentro(String id) {
        this.jidcentro.setText(id);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jltitulo = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jtNombre = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtAp1 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jtAp2 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jtDireccion = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jtTelEmp = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jtTelPer = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jcCategoria = new javax.swing.JComboBox();
        jLabel8 = new javax.swing.JLabel();
        jtSalario = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jlAviso = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jtDni = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jbuscarboton = new javax.swing.JButton();
        jidcentro = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jusuario = new javax.swing.JTextField();
        jbuscarboton1 = new javax.swing.JButton();
        jtfechanacimiento = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jltitulo.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jltitulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jltitulo.setText("Editar trabajador");

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel1.setText("Nombre");

        jtNombre.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel2.setText("Primer apellido");

        jtAp1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel3.setText("Segundo apellido");

        jtAp2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel4.setText("Dirección");

        jtDireccion.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel5.setText("Teléfono empresa");

        jtTelEmp.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel6.setText("Teléfono personal");

        jtTelPer.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel7.setText("Categoria");

        jcCategoria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcCategoriaActionPerformed(evt);
            }
        });

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel8.setText("Salario");

        jtSalario.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel9.setText("Fecha de nacimiento");

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jButton1.setText("Guardar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jlAviso.setForeground(new java.awt.Color(51, 153, 0));

        jLabel11.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel11.setText("DNI");

        jtDni.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel12.setText("Centro al que pertenece");

        jbuscarboton.setText("Buscar");
        jbuscarboton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbuscarbotonActionPerformed(evt);
            }
        });

        jidcentro.setEditable(false);
        jidcentro.setEnabled(false);
        jidcentro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jidcentroActionPerformed(evt);
            }
        });

        jLabel13.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel13.setText("Usuario");

        jusuario.setEditable(false);
        jusuario.setEnabled(false);
        jusuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jusuarioActionPerformed(evt);
            }
        });

        jbuscarboton1.setText("Buscar");
        jbuscarboton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbuscarboton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(347, 347, 347)
                        .addComponent(jltitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel7))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel11)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addGap(133, 133, 133)
                                .addComponent(jtSalario))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel2))
                                .addGap(50, 50, 50)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jtAp2)
                                    .addComponent(jtAp1)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 734, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addGap(114, 114, 114)
                                .addComponent(jtDireccion))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addGap(32, 32, 32)
                                .addComponent(jtfechanacimiento)
                                .addGap(695, 695, 695))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addGap(44, 44, 44)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jcCategoria, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jtTelEmp, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jtDni, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(29, 29, 29)
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jtTelPer, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(42, 42, 42))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel13)
                                .addGap(172, 172, 172)
                                .addComponent(jusuario, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addGap(43, 43, 43)
                                .addComponent(jidcentro, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(38, 38, 38)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jbuscarboton)
                            .addComponent(jbuscarboton1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jlAviso, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(79, 79, 79)
                        .addComponent(jButton1)
                        .addGap(107, 107, 107))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(jltitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(56, 56, 56)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jtAp1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jtAp2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jtTelEmp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel6)
                        .addComponent(jtTelPer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(83, 83, 83)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(jtDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(21, 21, 21)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jcCategoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jtSalario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(jtfechanacimiento))
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jlAviso)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(jidcentro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jbuscarboton))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(jusuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jbuscarboton1)))
                    .addComponent(jButton1))
                .addGap(16, 16, 16))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        String nombre = jtNombre.getText();
        String ap1 = jtAp1.getText();
        String ap2 = jtAp2.getText();
        String direccion = jtDireccion.getText();
        String telEmp = jtTelEmp.getText();
        String telPer = jtTelPer.getText();
        String categoria = jcCategoria.getSelectedItem().toString();
        String dni = jtDni.getText();
        double salario=0;
        if(jtSalario.getText().compareTo("")!=0){
            salario = Double.parseDouble(jtSalario.getText());
        }
        String fechanac=jtfechanacimiento.getText();
        Trabajador t = new Trabajador(dni ,nombre, ap1, ap2, direccion, telEmp, telPer, Categoria.Transportista, salario, fechanac);
        boolean correcto = t.modificarTrabajador();
        if(correcto){
            jlAviso.setText("Guardado correctamente");
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jcCategoriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcCategoriaActionPerformed

    }//GEN-LAST:event_jcCategoriaActionPerformed

    private void jbuscarbotonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbuscarbotonActionPerformed
        bc=new BuscarCentro();
        bc.setTfe(this);
        bc.setVisible(true);
    }//GEN-LAST:event_jbuscarbotonActionPerformed

    private void jidcentroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jidcentroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jidcentroActionPerformed

    private void jusuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jusuarioActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jusuarioActionPerformed

    private void jbuscarboton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbuscarboton1ActionPerformed
        bu=new BuscarUsuario();
        bu.setTfe(this);
        bu.setVisible(true);
    }//GEN-LAST:event_jbuscarboton1ActionPerformed

    void setjusuario(String ids) {
       jusuario.setText(ids);
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TrabajadorFormularioEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TrabajadorFormularioEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TrabajadorFormularioEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TrabajadorFormularioEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>
        int id = TrabajadorListado.getId();
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TrabajadorFormularioEdit(id).setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JButton jbuscarboton;
    private javax.swing.JButton jbuscarboton1;
    private javax.swing.JComboBox jcCategoria;
    private javax.swing.JTextField jidcentro;
    private javax.swing.JLabel jlAviso;
    private javax.swing.JLabel jltitulo;
    private javax.swing.JTextField jtAp1;
    private javax.swing.JTextField jtAp2;
    private javax.swing.JTextField jtDireccion;
    private javax.swing.JTextField jtDni;
    private javax.swing.JTextField jtNombre;
    private javax.swing.JTextField jtSalario;
    private javax.swing.JTextField jtTelEmp;
    private javax.swing.JTextField jtTelPer;
    private javax.swing.JTextField jtfechanacimiento;
    private javax.swing.JTextField jusuario;
    // End of variables declaration//GEN-END:variables
}


text:
title: Introduction to the Coding Interview Algorithms
block: Algorithms
superBlock: Coding Interview Prep
---
## Introduction to the Coding Interview Prep Algorithms

These challenges are meant to teach and challenge you with common algorithms that you will encounter in real life. Hopefully, these challenges will be a great learning experience and your programming and logical skills will improve.

In mathematics and computer science, an algorithm (/ˈælɡərɪðəm/ ) is an unambiguous specification of how to solve a class of problems. Algorithms can perform calculation, data processing and automated reasoning tasks.
In most of the coding interviews, foundation mostly means clear understanding of basic data structures and algorithms.

This course presents you with the most asked questions during the interviews to prepare your basic knowledge of Algorithms.
It will provide a clear and concise understanding and implementations of different Algorithms.

# Prerequisite: All the Algorithmic questions would require the solutions in Javascript. So, it's a good idea to complete the javascript course first.

It's a very good practise to use a whiteboard or a notepad to implement and practise the interview questions. Since most of the coding interviews use either a Whiteboard or a Notepad for writing the codes. So forget your nice IDEs and debuggers and start getting your hands dirty.

# Best Of Luck !!


text:
package io.scepta.util;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.w3c.dom.Element;
import org.w3c.dom.Node;

/**
 * This class provides DOM utility functions.
 *
 */
public class DOMUtil {

    /**
     * This method converts the supplied text into a DOM representation.
     *
     * @param text The text
     * @return The DOM representation
     * @throws Exception Failed to convert
     */
    public static org.w3c.dom.Document textToDoc(String text) throws Exception {
        java.io.InputStream is=new java.io.ByteArrayInputStream(text.getBytes());

        return (textToDoc(is));
    }

    /**
     * This method converts the supplied text into a DOM representation.
     *
     * @param is The input stream
     * @return The DOM representation
     * @throws Exception Failed to convert
     */
    public static org.w3c.dom.Document textToDoc(java.io.InputStream is) throws Exception {
        org.w3c.dom.Document ret=null;

        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        ret = dBuilder.parse(is);

        is.close();

        return (ret);
    }

    /**
     * This method converts the supplied DOM into a text representation.
     *
     * @param doc The DOM representation
     * @return The text
     * @throws Exception Failed to convert
     */
    public static String docToText(org.w3c.dom.Document doc) throws Exception {
        String ret=null;

        TransformerFactory factory=TransformerFactory.newInstance();
        Transformer transformer=factory.newTransformer();
        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");

        DOMSource source=new DOMSource(doc);

        java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();

        StreamResult result = new StreamResult(os);
        transformer.transform(source, result);

        ret = new String(os.toByteArray());

        os.close();

        return (ret);
    }

    /**
     * This method replaces the reference element with the child nodes
     * of the other element.
     *
     * @param ref The reference element
     * @param newNodes The element containing the new nodes
     */
    public static void replaceNodes(Element ref, Element newNodes) {
        Element parent=(Element)ref.getParentNode();

        while (newNodes.hasChildNodes()) {
            parent.insertBefore(newNodes.getFirstChild(), ref);
        }

        // Remove referenced node
        parent.removeChild(ref);
    }

    /**
     * This method replaces the reference element with the new node.
     *
     * @param ref The reference element
     * @param newNode The element
     */
    public static void replaceNode(Element ref, Element newNode) {
        Element parent=(Element)ref.getParentNode();

        parent.insertBefore(newNode, ref);

        // Remove referenced node
        parent.removeChild(ref);
    }

    /**
     * This method adds the supplied node as the first element within
     * the container.
     *
     * @param container The container
     * @param node The node
     */
    public static void insertFirst(Element container, Node node) {
        if (container.getFirstChild() == null) {
            container.appendChild(node);
        } else {
            container.insertBefore(node, container.getFirstChild());
        }
    }
}


text:
__TIB_DEFINITION_java_lang_Class __TIB_java_lang_Class = {
    0, // classInitializationBegan
    0, // classInitialized
    -1, // initializerThreadId
    __INIT_java_lang_Class, // classInitializer
    "java.lang.Class", // className
    "java.lang", // package
    JAVA_NULL, // enclosingClassName
    JAVA_NULL, // enclosingMethodName
    "<T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/reflect/AnnotatedElement;Ljava/lang/reflect/GenericDeclaration;Ljava/lang/reflect/Type;", // signature
    (__TIB_DEFINITION_TEMPLATE*) &__TIB_java_lang_Object, // extends
    sizeof(java_lang_Class), // sizeInstance
    XMLVM_TYPE_CLASS};

JAVA_OBJECT __CLASS_java_lang_Class;
JAVA_OBJECT __CLASS_java_lang_Class_1ARRAY;
JAVA_OBJECT __CLASS_java_lang_Class_2ARRAY;
JAVA_OBJECT __CLASS_java_lang_Class_3ARRAY;
//XMLVM_BEGIN_IMPLEMENTATION
//XMLVM_END_IMPLEMENTATION

static JAVA_LONG _STATIC_java_lang_Class_serialVersionUID;
static JAVA_OBJECT _STATIC_java_lang_Class_classLoader;

#include "xmlvm-reflection.h"

static XMLVM_FIELD_REFLECTION_DATA __field_reflection_data[] = {
};

static XMLVM_CONSTRUCTOR_REFLECTION_DATA __constructor_reflection_data[] = {
};

static JAVA_OBJECT constructor_dispatcher(JAVA_OBJECT constructor, JAVA_OBJECT arguments)
{
    XMLVM_NOT_IMPLEMENTED();
}

static XMLVM_METHOD_REFLECTION_DATA __method_reflection_data[] = {
};

static JAVA_OBJECT method_dispatcher(JAVA_OBJECT method, JAVA_OBJECT receiver, JAVA_OBJECT arguments)
{
    XMLVM_NOT_IMPLEMENTED();
}

void __INIT_java_lang_Class()
{
    staticInitializerLock(&__TIB_java_lang_Class);

    // While the static initializer mutex is locked, locally store the value of
    // whether class initialization began or not
    int initBegan = __TIB_java_lang_Class.classInitializationBegan;

    // Whether or not class initialization had already began, it has begun now
    __TIB_java_lang_Class.classInitializationBegan = 1;

    staticInitializerUnlock(&__TIB_java_lang_Class);

    JAVA_LONG curThreadId = (JAVA_LONG)pthread_self();
    if (initBegan) {
        if (__TIB_java_lang_Class.initializerThreadId != curThreadId) {
            // Busy wait until the other thread finishes initializing this class
            while (!__TIB_java_lang_Class.classInitialized) {
                // do nothing
            }
        }
    } else {
        __TIB_java_lang_Class.initializerThreadId = curThreadId;
        XMLVM_CLASS_USED("java.lang.Class")
        __INIT_IMPL_java_lang_Class();
    }
}

void __INIT_IMPL_java_lang_Class()
{
    // Initialize base class if necessary
    XMLVM_CLASS_INIT(java_lang_Object)
    __TIB_java_lang_Class.newInstanceFunc = __NEW_INSTANCE_java_lang_Class;
    // Copy vtable from base class
    XMLVM_MEMCPY(__TIB_java_lang_Class.vtable, __TIB_java_lang_Object.vtable, sizeof(__TIB_java_lang_Object.vtable));
    // Initialize vtable for this class
    __TIB_java_lang_Class.vtable[6] = (VTABLE_PTR) &xmlvm_unimplemented_native_method;
    __TIB_java_lang_Class.vtable[7] = (VTABLE_PTR) &xmlvm_unimplemented_native_method;
    __TIB_java_lang_Class.vtable[8] = (VTABLE_PTR) &xmlvm_unimplemented_native_method;
    __TIB_java_lang_Class.vtable[9] = (VTABLE_PTR) &java_lang_Class_getMethod___java_lang_String_java_lang_Class_1ARRAY;
    __TIB_java_lang_Class.vtable[10] = (VTABLE_PTR) &java_lang_Class_getTypeParameters__;
    __TIB_java_lang_Class.vtable[11] = (VTABLE_PTR) &xmlvm_unimplemented_native_method;
    __TIB_java_lang_Class.vtable[12] = (VTABLE_PTR) &xmlvm_unimplemented_native_method;
    __TIB_java_lang_Class.vtable[5] = (VTABLE_PTR) &java_lang_Class_toString__;
    xmlvm_init_native_java_lang_Class();
    // Initialize interface information
    __TIB_java_lang_Class.numImplementedInterfaces = 4;
    __TIB_java_lang_Class.implementedInterfaces = (__TIB_DEFINITION_TEMPLATE* (*)[1]) XMLVM_MALLOC(sizeof(__TIB_DEFINITION_TEMPLATE*) * 4);

    // Initialize interfaces if necessary and assign tib to implementedInterfaces

    XMLVM_CLASS_INIT(java_io_Serializable)

    __TIB_java_lang_Class.implementedInterfaces[0][0] = &__TIB_java_io_Serializable;

    XMLVM_CLASS_INIT(java_lang_reflect_AnnotatedElement)

    __TIB_java_lang_Class.implementedInterfaces[0][1] = &__TIB_java_lang_reflect_AnnotatedElement;

    XMLVM_CLASS_INIT(java_lang_reflect_GenericDeclaration)

    __TIB_java_lang_Class.implementedInterfaces[0][2] = &__TIB_java_lang_reflect_GenericDeclaration;

    XMLVM_CLASS_INIT(java_lang_reflect_Type)

    __TIB_java_lang_Class.implementedInterfaces[0][3] = &__TIB_java_lang_reflect_Type;
    // Initialize itable for this class
    __TIB_java_lang_Class.itableBegin = &__TIB_java_lang_Class.itable[0];
    __TIB_java_lang_Class.itable[XMLVM_ITABLE_IDX_java_lang_reflect_AnnotatedElement_getAnnotation___java_lang_Class] = __TIB_java_lang_Class.vtable[6];
    __TIB_java_lang_Class.itable[XMLVM_ITABLE_IDX_java_lang_reflect_AnnotatedElement_getAnnotations__] = __TIB_java_lang_Class.vtable[7];
    __TIB_java_lang_Class.itable[XMLVM_ITABLE_IDX_java_lang_reflect_AnnotatedElement_getDeclaredAnnotations__] = __TIB_java_lang_Class.vtable[8];
    __TIB_java_lang_Class.itable[XMLVM_ITABLE_IDX_java_lang_reflect_AnnotatedElement_isAnnotationPresent___java_lang_Class] = __TIB_java_lang_Class.vtable[11];
    __TIB_java_lang_Class.itable[XMLVM_ITABLE_IDX_java_lang_reflect_GenericDeclaration_getTypeParameters__] = __TIB_java_lang_Class.vtable[10];

    _STATIC_java_lang_Class_serialVersionUID = 3206093459760846163;
    _STATIC_java_lang_Class_classLoader = (java_lang_ClassLoader*) JAVA_NULL;

    __TIB_java_lang_Class.declaredFields = &__field_reflection_data[0];
    __TIB_java_lang_Class.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
    __TIB_java_lang_Class.constructorDispatcherFunc = constructor_dispatcher;
    __TIB_java_lang_Class.declaredConstructors = &__constructor_reflection_data[0];
    __TIB_java_lang_Class.numDeclaredConstructors = sizeof(__constructor_reflection_data) / sizeof(XMLVM_CONSTRUCTOR_REFLECTION_DATA);
    __TIB_java_lang_Class.methodDispatcherFunc = method_dispatcher;
    __TIB_java_lang_Class.declaredMethods = &__method_reflection_data[0];
    __TIB_java_lang_Class.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
    __CLASS_java_lang_Class = XMLVM_CREATE_CLASS_OBJECT(&__TIB_java_lang_Class);
    __TIB_java_lang_Class.clazz = __CLASS_java_lang_Class;
    __TIB_java_lang_Class.baseType = JAVA_NULL;
    __CLASS_java_lang_Class_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_lang_Class);
    __CLASS_java_lang_Class_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_lang_Class_1ARRAY);
    __CLASS_java_lang_Class_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_java_lang_Class_2ARRAY);
    java_lang_Class___CLINIT_();
    //XMLVM_BEGIN_WRAPPER[__INIT_java_lang_Class]
    //XMLVM_END_WRAPPER

    __TIB_java_lang_Class.classInitialized = 1;
}

void __DELETE_java_lang_Class(void* me, void* client_data)
{
    //XMLVM_BEGIN_WRAPPER[__DELETE_java_lang_Class]
    //XMLVM_END_WRAPPER
}

void __INIT_INSTANCE_MEMBERS_java_lang_Class(JAVA_OBJECT me, int derivedClassWillRegisterFinalizer)
{
    __INIT_INSTANCE_MEMBERS_java_lang_Object(me, 0 || derivedClassWillRegisterFinalizer);
    ((java_lang_Class*) me)->fields.java_lang_Class.tib_ = (java_lang_Object*) JAVA_NULL;
    //XMLVM_BEGIN_WRAPPER[__INIT_INSTANCE_MEMBERS_java_lang_Class]
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT __NEW_java_lang_Class()
{    XMLVM_CLASS_INIT(java_lang_Class)
java_lang_Class* me = (java_lang_Class*) XMLVM_MALLOC(sizeof(java_lang_Class));
    me->tib = &__TIB_java_lang_Class;
    __INIT_INSTANCE_MEMBERS_java_lang_Class(me, 0);
    //XMLVM_BEGIN_WRAPPER[__NEW_java_lang_Class]
    //XMLVM_END_WRAPPER
    return me;
}

JAVA_OBJECT __NEW_INSTANCE_java_lang_Class()
{
    JAVA_OBJECT me = JAVA_NULL;
    return me;
}

JAVA_LONG java_lang_Class_GET_serialVersionUID()
{
    XMLVM_CLASS_INIT(java_lang_Class)
    return _STATIC_java_lang_Class_serialVersionUID;
}

void java_lang_Class_PUT_serialVersionUID(JAVA_LONG v)
{
    XMLVM_CLASS_INIT(java_lang_Class)
_STATIC_java_lang_Class_serialVersionUID = v;
}

JAVA_OBJECT java_lang_Class_GET_classLoader()
{
    XMLVM_CLASS_INIT(java_lang_Class)
    return _STATIC_java_lang_Class_classLoader;
}

void java_lang_Class_PUT_classLoader(JAVA_OBJECT v)
{
    XMLVM_CLASS_INIT(java_lang_Class)
_STATIC_java_lang_Class_classLoader = v;
}

//XMLVM_NATIVE[void java_lang_Class_initNativeLayer__()]

void java_lang_Class___INIT____java_lang_Object(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class___INIT____java_lang_Object]
    XMLVM_ENTER_METHOD("java.lang.Class", "<init>", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    _r0.o = me;
    _r1.o = n1;
    XMLVM_SOURCE_POSITION("Class.java", 127)
    XMLVM_CHECK_NPE(0)
    java_lang_Object___INIT___(_r0.o);
    XMLVM_SOURCE_POSITION("Class.java", 128)
    XMLVM_CHECK_NPE(0)
    ((java_lang_Class*) _r0.o)->fields.java_lang_Class.tib_ = _r1.o;
    XMLVM_SOURCE_POSITION("Class.java", 129)
    XMLVM_EXIT_METHOD()
    return;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getStackClasses___int_boolean(JAVA_INT n1, JAVA_BOOLEAN n2)]

JAVA_OBJECT java_lang_Class_forName___java_lang_String(JAVA_OBJECT n1)
{
    XMLVM_CLASS_INIT(java_lang_Class)
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_forName___java_lang_String]
    XMLVM_ENTER_METHOD("java.lang.Class", "forName", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    _r2.o = n1;
    XMLVM_SOURCE_POSITION("Class.java", 189)
    _r0.i = 1;
    _r1.o = JAVA_NULL;
    _r0.o = java_lang_Class_forName___java_lang_String_boolean_java_lang_ClassLoader(_r2.o, _r0.i, _r1.o);
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_forName___java_lang_String_boolean_java_lang_ClassLoader(JAVA_OBJECT n1, JAVA_BOOLEAN n2, JAVA_OBJECT n3)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getClasses__(JAVA_OBJECT me)]

//XMLVM_NATIVE[void java_lang_Class_verify__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getAnnotation___java_lang_Class(JAVA_OBJECT me, JAVA_OBJECT n1)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getAnnotations__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getCanonicalName__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getCanonicalName__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getCanonicalName", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    _r3.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 277)
    XMLVM_CHECK_NPE(3)
    _r0.i = java_lang_Class_isAnonymousClass__(_r3.o);
    if (_r0.i != 0) goto label12;
    XMLVM_CHECK_NPE(3)
    _r0.i = java_lang_Class_isLocalClass__(_r3.o);
    if (_r0.i == 0) goto label14;
    label12:;
    XMLVM_SOURCE_POSITION("Class.java", 279)
    _r0.o = JAVA_NULL;
    label13:;
    XMLVM_SOURCE_POSITION("Class.java", 284)
    XMLVM_EXIT_METHOD()
    return _r0.o;
    label14:;
    XMLVM_SOURCE_POSITION("Class.java", 281)
    XMLVM_CHECK_NPE(3)
    _r0.i = java_lang_Class_isPrimitive__(_r3.o);
    if (_r0.i == 0) goto label25;
    XMLVM_SOURCE_POSITION("Class.java", 282)
    XMLVM_CHECK_NPE(3)
    _r0.o = java_lang_Class_getSimpleName__(_r3.o);
    goto label13;
    label25:;
    XMLVM_CHECK_NPE(3)
    _r0.o = java_lang_Class_getPackage__(_r3.o);
    if (_r0.o != JAVA_NULL) goto label42;
    // ""
    _r0.o = xmlvm_create_java_string_from_pool(21);
    label33:;
    _r1.i = 36;
    _r2.i = 46;
    XMLVM_CHECK_NPE(0)
    _r0.o = java_lang_String_replace___char_char(_r0.o, _r1.i, _r2.i);
    goto label13;
    label42:;
    _r0.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder___INIT___(_r0.o);
    XMLVM_CHECK_NPE(3)
    _r1.o = java_lang_Class_getPackage__(_r3.o);

    // Red class access removed: java.lang.Package::getName
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_CHECK_NPE(0)
    _r0.o = java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    // "."
    _r1.o = xmlvm_create_java_string_from_pool(52);
    XMLVM_CHECK_NPE(0)
    _r0.o = java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    XMLVM_CHECK_NPE(3)
    _r1.o = java_lang_Class_getSimpleName__(_r3.o);
    XMLVM_CHECK_NPE(0)
    _r0.o = java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(0)
    _r0.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r0.o)->tib->vtable[5])(_r0.o);
    goto label33;
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT java_lang_Class_getClassLoader__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getClassLoader__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getClassLoader", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    _r1.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 301)
    _r0.o = java_lang_Class_GET_classLoader();
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT java_lang_Class_getClassLoaderImpl__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getClassLoaderImpl__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getClassLoaderImpl", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    _r1.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 317)
    _r0.o = java_lang_Class_GET_classLoader();
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getComponentType__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getConstructor___java_lang_Class_1ARRAY(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getConstructor___java_lang_Class_1ARRAY]
    XMLVM_ENTER_METHOD("java.lang.Class", "getConstructor", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    _r1.o = me;
    _r2.o = n1;
    XMLVM_SOURCE_POSITION("Class.java", 347)
    XMLVM_CHECK_NPE(1)
    _r0.o = java_lang_Class_getDeclaredConstructor___java_lang_Class_1ARRAY(_r1.o, _r2.o);
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getConstructors__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getDeclaredAnnotations__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getDeclaredClasses__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getDeclaredConstructor___java_lang_Class_1ARRAY(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getDeclaredConstructor___java_lang_Class_1ARRAY]
    XMLVM_ENTER_METHOD("java.lang.Class", "getDeclaredConstructor", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    _r5.o = me;
    _r6.o = n1;
    XMLVM_SOURCE_POSITION("Class.java", 409)
    XMLVM_CHECK_NPE(5)
    _r0.o = java_lang_Class_getDeclaredConstructors__(_r5.o);
    _r1.i = 0;
    label5:;
    XMLVM_SOURCE_POSITION("Class.java", 410)
    _r2.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r0.o));
    if (_r1.i >= _r2.i) goto label26;
    XMLVM_SOURCE_POSITION("Class.java", 411)
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    _r2.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i];
    XMLVM_CHECK_NPE(2)
    _r2.o = java_lang_reflect_Constructor_getParameterTypes__(_r2.o);
    _r2.i = java_lang_Class_arrayEqual___java_lang_Object_1ARRAY_java_lang_Object_1ARRAY(_r6.o, _r2.o);
    if (_r2.i == 0) goto label23;
    XMLVM_SOURCE_POSITION("Class.java", 412)
    XMLVM_CHECK_NPE(0)
    XMLVM_CHECK_ARRAY_BOUNDS(_r0.o, _r1.i);
    _r2.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r0.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r1.i];
    XMLVM_EXIT_METHOD()
    return _r2.o;
    label23:;
    _r1.i = _r1.i + 1;
    goto label5;
    label26:;
    XMLVM_SOURCE_POSITION("Class.java", 415)

    // Red class access removed: java.lang.NoSuchMethodException::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r3.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(3)
    java_lang_StringBuilder___INIT___(_r3.o);
    XMLVM_CHECK_NPE(5)
    _r4.o = java_lang_Class_getName__(_r5.o);
    XMLVM_CHECK_NPE(3)
    _r3.o = java_lang_StringBuilder_append___java_lang_String(_r3.o, _r4.o);
    // ".<init>"
    _r4.o = xmlvm_create_java_string_from_pool(53);
    XMLVM_CHECK_NPE(3)
    _r3.o = java_lang_StringBuilder_append___java_lang_String(_r3.o, _r4.o);
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(3)
    _r3.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r3.o)->tib->vtable[5])(_r3.o);

    // Red class access removed: java.lang.NoSuchMethodException::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_THROW_CUSTOM(_r2.o)
    //XMLVM_END_WRAPPER
}

JAVA_BOOLEAN java_lang_Class_arrayEqual___java_lang_Object_1ARRAY_java_lang_Object_1ARRAY(JAVA_OBJECT n1, JAVA_OBJECT n2)
{
    XMLVM_CLASS_INIT(java_lang_Class)
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_arrayEqual___java_lang_Object_1ARRAY_java_lang_Object_1ARRAY]
    XMLVM_ENTER_METHOD("java.lang.Class", "arrayEqual", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    _r5.o = n1;
    _r6.o = n2;
    _r4.i = 1;
    _r3.i = 0;
    XMLVM_SOURCE_POSITION("Class.java", 419)
    if (_r5.o != JAVA_NULL) goto label13;
    XMLVM_SOURCE_POSITION("Class.java", 420)
    if (_r6.o == JAVA_NULL) goto label9;
    _r1.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r6.o));
    if (_r1.i != 0) goto label11;
    label9:;
    _r1 = _r4;
    label10:;
    XMLVM_SOURCE_POSITION("Class.java", 437)
    XMLVM_EXIT_METHOD()
    return _r1.i;
    label11:;
    _r1 = _r3;
    goto label10;
    label13:;
    XMLVM_SOURCE_POSITION("Class.java", 423)
    if (_r6.o != JAVA_NULL) goto label22;
    XMLVM_SOURCE_POSITION("Class.java", 424)
    _r1.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r5.o));
    if (_r1.i != 0) goto label20;
    _r1 = _r4;
    goto label10;
    label20:;
    _r1 = _r3;
    goto label10;
    label22:;
    XMLVM_SOURCE_POSITION("Class.java", 427)
    _r1.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r5.o));
    _r2.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r6.o));
    if (_r1.i == _r2.i) goto label28;
    _r1 = _r3;
    XMLVM_SOURCE_POSITION("Class.java", 428)
    goto label10;
    label28:;
    XMLVM_SOURCE_POSITION("Class.java", 431)
    _r0.i = 0;
    label29:;
    _r1.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r5.o));
    if (_r0.i >= _r1.i) goto label43;
    XMLVM_SOURCE_POSITION("Class.java", 432)
    XMLVM_CHECK_NPE(5)
    XMLVM_CHECK_ARRAY_BOUNDS(_r5.o, _r0.i);
    _r1.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r5.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_CHECK_NPE(6)
    XMLVM_CHECK_ARRAY_BOUNDS(_r6.o, _r0.i);
    _r2.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r6.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    if (_r1.o == _r2.o) goto label40;
    _r1 = _r3;
    XMLVM_SOURCE_POSITION("Class.java", 433)
    goto label10;
    label40:;
    _r0.i = _r0.i + 1;
    goto label29;
    label43:;
    _r1 = _r4;
    goto label10;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getDeclaredConstructors__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getDeclaredField___java_lang_String(JAVA_OBJECT me, JAVA_OBJECT n1)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getDeclaredFields__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getDeclaredMethod___java_lang_String_java_lang_Class_1ARRAY(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_OBJECT n2)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getDeclaredMethod___java_lang_String_java_lang_Class_1ARRAY]
    XMLVM_ENTER_METHOD("java.lang.Class", "getDeclaredMethod", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    XMLVMElem _r8;
    _r6.o = me;
    _r7.o = n1;
    _r8.o = n2;
    XMLVM_SOURCE_POSITION("Class.java", 509)
    XMLVM_CHECK_NPE(6)
    _r2.o = java_lang_Class_getDeclaredMethods__(_r6.o);
    _r0.i = 0;
    label5:;
    XMLVM_SOURCE_POSITION("Class.java", 510)
    _r3.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r2.o));
    if (_r0.i >= _r3.i) goto label34;
    XMLVM_SOURCE_POSITION("Class.java", 511)
    XMLVM_CHECK_NPE(2)
    XMLVM_CHECK_ARRAY_BOUNDS(_r2.o, _r0.i);
    _r1.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r2.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_SOURCE_POSITION("Class.java", 512)
    //java_lang_reflect_Method_getName__[13]
    XMLVM_CHECK_NPE(1)
    _r3.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_reflect_Method*) _r1.o)->tib->vtable[13])(_r1.o);
    //java_lang_String_equals___java_lang_Object[1]
    XMLVM_CHECK_NPE(7)
    _r3.i = (*(JAVA_BOOLEAN (*)(JAVA_OBJECT, JAVA_OBJECT)) ((java_lang_String*) _r7.o)->tib->vtable[1])(_r7.o, _r3.o);
    if (_r3.i == 0) goto label31;
    XMLVM_CHECK_NPE(1)
    _r3.o = java_lang_reflect_Method_getParameterTypes__(_r1.o);
    _r3.i = java_lang_Class_arrayEqual___java_lang_Object_1ARRAY_java_lang_Object_1ARRAY(_r8.o, _r3.o);
    if (_r3.i == 0) goto label31;
    XMLVM_SOURCE_POSITION("Class.java", 514)
    XMLVM_EXIT_METHOD()
    return _r1.o;
    label31:;
    _r0.i = _r0.i + 1;
    goto label5;
    label34:;
    XMLVM_SOURCE_POSITION("Class.java", 517)

    // Red class access removed: java.lang.NoSuchMethodException::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r4.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(4)
    java_lang_StringBuilder___INIT___(_r4.o);
    XMLVM_CHECK_NPE(6)
    _r5.o = java_lang_Class_getName__(_r6.o);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r5.o);
    // "."
    _r5.o = xmlvm_create_java_string_from_pool(52);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r5.o);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r7.o);
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(4)
    _r4.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r4.o)->tib->vtable[5])(_r4.o);

    // Red class access removed: java.lang.NoSuchMethodException::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_THROW_CUSTOM(_r3.o)
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getDeclaredMethods__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getDeclaringClass__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getDeclaringClass__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getDeclaringClass", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    _r1.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 543)
    XMLVM_CHECK_NPE(1)
    _r0.i = java_lang_Class_isArray__(_r1.o);
    if (_r0.i != 0) goto label12;
    XMLVM_CHECK_NPE(1)
    _r0.i = java_lang_Class_isPrimitive__(_r1.o);
    if (_r0.i == 0) goto label14;
    label12:;
    XMLVM_SOURCE_POSITION("Class.java", 544)
    _r0.o = JAVA_NULL;
    label13:;
    XMLVM_SOURCE_POSITION("Class.java", 546)
    XMLVM_EXIT_METHOD()
    return _r0.o;
    label14:;
    XMLVM_CHECK_NPE(1)
    _r0.o = java_lang_Class_getEnclosingClass__(_r1.o);
    goto label13;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getEnclosingClass__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getEnclosingConstructor__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getEnclosingMethod__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getEnumConstants__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getField___java_lang_String(JAVA_OBJECT me, JAVA_OBJECT n1)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getFields__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getGenericInterfaces__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getGenericInterfaces__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getGenericInterfaces", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    _r2.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 632)

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r1.o = JAVA_NULL;

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_SOURCE_POSITION("Class.java", 633)
    XMLVM_CHECK_NPE(2)
    _r1.o = java_lang_Class_getSignatureAttribute__(_r2.o);

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::parseForClass
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_SOURCE_POSITION("Class.java", 634)

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser,org.apache.harmony.luni.lang.reflect.ListOfTypes::interfaceTypes
    XMLVM_RED_CLASS_DEPENDENCY();

    // Red class access removed: org.apache.harmony.luni.lang.reflect.Types::getClonedTypeArray
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_EXIT_METHOD()
    return _r1.o;
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT java_lang_Class_getGenericSuperclass__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getGenericSuperclass__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getGenericSuperclass", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    _r2.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 646)

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r1.o = JAVA_NULL;

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_SOURCE_POSITION("Class.java", 647)
    XMLVM_CHECK_NPE(2)
    _r1.o = java_lang_Class_getSignatureAttribute__(_r2.o);

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::parseForClass
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_SOURCE_POSITION("Class.java", 648)

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser,java.lang.reflect.Type::superclassType
    XMLVM_RED_CLASS_DEPENDENCY();

    // Red class access removed: org.apache.harmony.luni.lang.reflect.Types::getType
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_EXIT_METHOD()
    return _r1.o;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getInterfaces__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getMethod___java_lang_String_java_lang_Class_1ARRAY(JAVA_OBJECT me, JAVA_OBJECT n1, JAVA_OBJECT n2)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getMethod___java_lang_String_java_lang_Class_1ARRAY]
    XMLVM_ENTER_METHOD("java.lang.Class", "getMethod", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    XMLVMElem _r8;
    _r6.o = me;
    _r7.o = n1;
    _r8.o = n2;
    XMLVM_SOURCE_POSITION("Class.java", 684)
    XMLVM_CHECK_NPE(6)
    _r2.o = java_lang_Class_getMethods__(_r6.o);
    _r0.i = 0;
    label5:;
    XMLVM_SOURCE_POSITION("Class.java", 685)
    _r3.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r2.o));
    if (_r0.i >= _r3.i) goto label34;
    XMLVM_SOURCE_POSITION("Class.java", 686)
    XMLVM_CHECK_NPE(2)
    XMLVM_CHECK_ARRAY_BOUNDS(_r2.o, _r0.i);
    _r1.o = ((JAVA_ARRAY_OBJECT*) (((org_xmlvm_runtime_XMLVMArray*) _r2.o)->fields.org_xmlvm_runtime_XMLVMArray.array_))[_r0.i];
    XMLVM_SOURCE_POSITION("Class.java", 687)
    //java_lang_reflect_Method_getName__[13]
    XMLVM_CHECK_NPE(1)
    _r3.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_reflect_Method*) _r1.o)->tib->vtable[13])(_r1.o);
    //java_lang_String_equals___java_lang_Object[1]
    XMLVM_CHECK_NPE(7)
    _r3.i = (*(JAVA_BOOLEAN (*)(JAVA_OBJECT, JAVA_OBJECT)) ((java_lang_String*) _r7.o)->tib->vtable[1])(_r7.o, _r3.o);
    if (_r3.i == 0) goto label31;
    XMLVM_CHECK_NPE(1)
    _r3.o = java_lang_reflect_Method_getParameterTypes__(_r1.o);
    _r3.i = java_lang_Class_arrayEqual___java_lang_Object_1ARRAY_java_lang_Object_1ARRAY(_r8.o, _r3.o);
    if (_r3.i == 0) goto label31;
    XMLVM_SOURCE_POSITION("Class.java", 689)
    XMLVM_EXIT_METHOD()
    return _r1.o;
    label31:;
    _r0.i = _r0.i + 1;
    goto label5;
    label34:;
    XMLVM_SOURCE_POSITION("Class.java", 692)

    // Red class access removed: java.lang.NoSuchMethodException::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r4.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(4)
    java_lang_StringBuilder___INIT___(_r4.o);
    XMLVM_CHECK_NPE(6)
    _r5.o = java_lang_Class_getName__(_r6.o);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r5.o);
    // "."
    _r5.o = xmlvm_create_java_string_from_pool(52);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r5.o);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r7.o);
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(4)
    _r4.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r4.o)->tib->vtable[5])(_r4.o);

    // Red class access removed: java.lang.NoSuchMethodException::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_THROW_CUSTOM(_r3.o)
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT java_lang_Class_getMethods__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getMethods__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getMethods", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    XMLVMElem _r3;
    XMLVMElem _r4;
    XMLVMElem _r5;
    XMLVMElem _r6;
    XMLVMElem _r7;
    _r7.o = me;
    _r6.i = 0;
    XMLVM_SOURCE_POSITION("Class.java", 713)
    XMLVM_CHECK_NPE(7)
    _r3.o = java_lang_Class_getDeclaredMethods__(_r7.o);
    XMLVM_SOURCE_POSITION("Class.java", 714)
    XMLVM_CHECK_NPE(7)
    _r1.o = java_lang_Class_getSuperclass__(_r7.o);
    if (_r1.o != JAVA_NULL) goto label13;
    XMLVM_SOURCE_POSITION("Class.java", 715)
    _r4 = _r3;
    label12:;
    XMLVM_SOURCE_POSITION("Class.java", 716)
    XMLVM_SOURCE_POSITION("Class.java", 722)
    XMLVM_EXIT_METHOD()
    return _r4.o;
    label13:;
    XMLVM_SOURCE_POSITION("Class.java", 718)
    XMLVM_CHECK_NPE(1)
    _r2.o = java_lang_Class_getMethods__(_r1.o);
    XMLVM_SOURCE_POSITION("Class.java", 719)
    _r4.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r3.o));
    _r5.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r2.o));
    _r4.i = _r4.i + _r5.i;
    XMLVM_CLASS_INIT(java_lang_reflect_Method)
    _r0.o = XMLVMArray_createSingleDimension(__CLASS_java_lang_reflect_Method, _r4.i);
    XMLVM_SOURCE_POSITION("Class.java", 720)
    _r4.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r3.o));
    java_lang_System_arraycopy___java_lang_Object_int_java_lang_Object_int_int(_r3.o, _r6.i, _r0.o, _r6.i, _r4.i);
    XMLVM_SOURCE_POSITION("Class.java", 721)
    _r4.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r3.o));
    _r5.i = XMLVMArray_count(((org_xmlvm_runtime_XMLVMArray*) _r2.o));
    java_lang_System_arraycopy___java_lang_Object_int_java_lang_Object_int_int(_r2.o, _r6.i, _r0.o, _r4.i, _r5.i);
    _r4 = _r0;
    goto label12;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_INT java_lang_Class_getModifiers__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getName__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getSimpleName__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getProtectionDomain__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getPDImpl__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getResource___java_lang_String(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getResource___java_lang_String]
    XMLVM_ENTER_METHOD("java.lang.Class", "getResource", "?")
    volatile XMLVMElem _r0;
    volatile XMLVMElem _r1;
    volatile XMLVMElem _r2;
    volatile XMLVMElem _r3;
    volatile XMLVMElem _r4;
    volatile XMLVMElem _r5;
    volatile XMLVMElem _r6;
    volatile XMLVMElem _r7;
    volatile XMLVMElem _r8;
    volatile XMLVMElem _r9;
    _r8.o = me;
    _r9.o = n1;
    _r6.i = 46;
    // "/"
    _r7.o = xmlvm_create_java_string_from_pool(54);
    XMLVM_SOURCE_POSITION("Class.java", 796)
    _r2.o = __NEW_java_io_File();
    XMLVM_CHECK_NPE(2)
    java_io_File___INIT____java_lang_String(_r2.o, _r9.o);
    XMLVM_SOURCE_POSITION("Class.java", 798)
    XMLVM_CHECK_NPE(2)
    _r4.i = java_io_File_exists__(_r2.o);
    if (_r4.i != 0) goto label33;
    XMLVM_SOURCE_POSITION("Class.java", 800)
    // "/"
    _r4.o = xmlvm_create_java_string_from_pool(54);
    XMLVM_CHECK_NPE(9)
    _r4.i = java_lang_String_startsWith___java_lang_String(_r9.o, _r7.o);
    if (_r4.i == 0) goto label68;
    XMLVM_SOURCE_POSITION("Class.java", 801)
    _r4.i = 1;
    XMLVM_CHECK_NPE(9)
    _r9.o = java_lang_String_substring___int(_r9.o, _r4.i);
    label28:;
    XMLVM_SOURCE_POSITION("Class.java", 813)
    _r2.o = __NEW_java_io_File();
    XMLVM_CHECK_NPE(2)
    java_io_File___INIT____java_lang_String(_r2.o, _r9.o);
    label33:;
    XMLVM_SOURCE_POSITION("Class.java", 816)
    XMLVM_CHECK_NPE(2)
    _r4.i = java_io_File_exists__(_r2.o);
    if (_r4.i == 0) goto label125;
    XMLVM_TRY_BEGIN(w556aaac44b1c26)
    // Begin try
    XMLVM_SOURCE_POSITION("Class.java", 818)

    // Red class access removed: java.net.URL::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r5.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(5)
    java_lang_StringBuilder___INIT___(_r5.o);
    // "file://"
    _r6.o = xmlvm_create_java_string_from_pool(55);
    XMLVM_CHECK_NPE(5)
    _r5.o = java_lang_StringBuilder_append___java_lang_String(_r5.o, _r6.o);
    XMLVM_CHECK_NPE(2)
    _r6.o = java_io_File_getAbsolutePath__(_r2.o);
    XMLVM_CHECK_NPE(5)
    _r5.o = java_lang_StringBuilder_append___java_lang_String(_r5.o, _r6.o);
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(5)
    _r5.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r5.o)->tib->vtable[5])(_r5.o);

    // Red class access removed: java.net.URL::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    // End try
    XMLVM_TRY_END
    XMLVM_CATCH_BEGIN(w556aaac44b1c26)
    XMLVM_CATCH_END(w556aaac44b1c26)
    XMLVM_RESTORE_EXCEPTION_ENV(w556aaac44b1c26)
    label67:;
    XMLVM_SOURCE_POSITION("Class.java", 823)
    XMLVM_EXIT_METHOD()
    return _r4.o;
    label68:;
    XMLVM_SOURCE_POSITION("Class.java", 803)
    XMLVM_CHECK_NPE(8)
    _r3.o = java_lang_Class_getName__(_r8.o);
    XMLVM_SOURCE_POSITION("Class.java", 804)
    XMLVM_CHECK_NPE(3)
    _r0.i = java_lang_String_lastIndexOf___int(_r3.o, _r6.i);
    _r4.i = -1;
    if (_r0.i == _r4.i) goto label114;
    XMLVM_SOURCE_POSITION("Class.java", 805)
    XMLVM_SOURCE_POSITION("Class.java", 806)
    _r4.i = 0;
    XMLVM_CHECK_NPE(3)
    _r4.o = java_lang_String_substring___int_int(_r3.o, _r4.i, _r0.i);
    _r5.i = 47;
    XMLVM_CHECK_NPE(4)
    _r3.o = java_lang_String_replace___char_char(_r4.o, _r6.i, _r5.i);
    label90:;
    XMLVM_SOURCE_POSITION("Class.java", 811)
    _r4.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(4)
    java_lang_StringBuilder___INIT___(_r4.o);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r3.o);
    // "/"
    _r5.o = xmlvm_create_java_string_from_pool(54);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r7.o);
    XMLVM_CHECK_NPE(4)
    _r4.o = java_lang_StringBuilder_append___java_lang_String(_r4.o, _r9.o);
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(4)
    _r9.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r4.o)->tib->vtable[5])(_r4.o);
    goto label28;
    label114:;
    XMLVM_SOURCE_POSITION("Class.java", 808)
    // ""
    _r3.o = xmlvm_create_java_string_from_pool(21);
    goto label90;
    label117:;
    XMLVM_SOURCE_POSITION("Class.java", 819)
    java_lang_Thread* curThread_w556aaac44b1c59 = (java_lang_Thread*)java_lang_Thread_currentThread__();
    _r4.o = curThread_w556aaac44b1c59->fields.java_lang_Thread.xmlvmException_;
    _r1 = _r4;
    XMLVM_SOURCE_POSITION("Class.java", 820)
    _r4.o = __NEW_java_lang_RuntimeException();
    XMLVM_CHECK_NPE(4)
    java_lang_RuntimeException___INIT____java_lang_Throwable(_r4.o, _r1.o);
    XMLVM_THROW_CUSTOM(_r4.o)
    label125:;
    _r4.o = JAVA_NULL;
    goto label67;
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT java_lang_Class_getResourceAsStream___java_lang_String(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getResourceAsStream___java_lang_String]
    XMLVM_ENTER_METHOD("java.lang.Class", "getResourceAsStream", "?")
    volatile XMLVMElem _r0;
    volatile XMLVMElem _r1;
    volatile XMLVMElem _r2;
    volatile XMLVMElem _r3;
    volatile XMLVMElem _r4;
    _r3.o = me;
    _r4.o = n1;
    _r2.o = JAVA_NULL;
    XMLVM_SOURCE_POSITION("Class.java", 842)
    XMLVM_CHECK_NPE(3)
    _r1.o = java_lang_Class_getResource___java_lang_String(_r3.o, _r4.o);
    if (_r1.o != JAVA_NULL) goto label8;
    label7:;
    XMLVM_SOURCE_POSITION("Class.java", 843)
    XMLVM_SOURCE_POSITION("Class.java", 849)
    XMLVM_EXIT_METHOD()
    return _r2.o;
    label8:;
    XMLVM_TRY_BEGIN(w556aaac45b1c12)
    // Begin try
    XMLVM_SOURCE_POSITION("Class.java", 847)

    // Red class access removed: java.net.URL::openStream
    XMLVM_RED_CLASS_DEPENDENCY();
    // End try
    XMLVM_TRY_END
    XMLVM_CATCH_BEGIN(w556aaac45b1c12)
        XMLVM_CATCH_SPECIFIC(w556aaac45b1c12,java_io_IOException,13)
    XMLVM_CATCH_END(w556aaac45b1c12)
    XMLVM_RESTORE_EXCEPTION_ENV(w556aaac45b1c12)
    goto label7;
    label13:;
    XMLVM_SOURCE_POSITION("Class.java", 848)
    java_lang_Thread* curThread_w556aaac45b1c16 = (java_lang_Thread*)java_lang_Thread_currentThread__();
    _r0.o = curThread_w556aaac45b1c16->fields.java_lang_Thread.xmlvmException_;
    goto label7;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getSigners__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getSuperclass__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_getTypeParameters__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getTypeParameters__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getTypeParameters", "?")
    volatile XMLVMElem _r0;
    volatile XMLVMElem _r1;
    volatile XMLVMElem _r2;
    _r2.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 885)
    java_lang_Object_acquireLockRecursive__(_r2.o);
    XMLVM_TRY_BEGIN(w556aaac48b1b4)
    // Begin try

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();
    _r1.o = JAVA_NULL;

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_SOURCE_POSITION("Class.java", 886)
    XMLVM_CHECK_NPE(2)
    _r1.o = java_lang_Class_getSignatureAttribute__(_r2.o);

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser::parseForClass
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_SOURCE_POSITION("Class.java", 887)

    // Red class access removed: org.apache.harmony.luni.lang.reflect.GenericSignatureParser,java.lang.reflect.TypeVariable[]::formalTypeParameters
    XMLVM_RED_CLASS_DEPENDENCY();

    // Red class access removed: java.lang.reflect.TypeVariable[]::clone
    XMLVM_RED_CLASS_DEPENDENCY();

    // Red class access removed: java.lang.reflect.TypeVariable[]::check-cast
    XMLVM_RED_CLASS_DEPENDENCY();
    // End try
    XMLVM_TRY_END
    XMLVM_CATCH_BEGIN(w556aaac48b1b4)
        XMLVM_CATCH_SPECIFIC(w556aaac48b1b4,java_lang_Object,24)
    XMLVM_CATCH_END(w556aaac48b1b4)
    XMLVM_RESTORE_EXCEPTION_ENV(w556aaac48b1b4)
    java_lang_Object_releaseLockRecursive__(_r2.o);
    XMLVM_EXIT_METHOD()
    return _r1.o;
    label24:;
    java_lang_Thread* curThread_w556aaac48b1b8 = (java_lang_Thread*)java_lang_Thread_currentThread__();
    _r1.o = curThread_w556aaac48b1b8->fields.java_lang_Thread.xmlvmException_;
    java_lang_Object_releaseLockRecursive__(_r2.o);
    XMLVM_THROW_CUSTOM(_r1.o)
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isAnnotation__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isAnnotationPresent___java_lang_Class(JAVA_OBJECT me, JAVA_OBJECT n1)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isAnonymousClass__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isArray__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isAssignableFrom___java_lang_Class(JAVA_OBJECT me, JAVA_OBJECT n1)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isEnum__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isInstance___java_lang_Object(JAVA_OBJECT me, JAVA_OBJECT n1)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isInterface__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isLocalClass__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isMemberClass__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isPrimitive__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_isSynthetic__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_newInstance__(JAVA_OBJECT me)]

JAVA_OBJECT java_lang_Class_toString__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_toString__]
    XMLVM_ENTER_METHOD("java.lang.Class", "toString", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    _r2.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 1031)
    _r0.o = __NEW_java_lang_StringBuilder();
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder___INIT___(_r0.o);
    XMLVM_SOURCE_POSITION("Class.java", 1032)
    XMLVM_CHECK_NPE(2)
    _r1.i = java_lang_Class_isPrimitive__(_r2.o);
    if (_r1.i != 0) goto label27;
    XMLVM_SOURCE_POSITION("Class.java", 1033)
    XMLVM_CHECK_NPE(2)
    _r1.i = java_lang_Class_isInterface__(_r2.o);
    if (_r1.i == 0) goto label39;
    XMLVM_SOURCE_POSITION("Class.java", 1034)
    // "interface"
    _r1.o = xmlvm_create_java_string_from_pool(56);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    label22:;
    XMLVM_SOURCE_POSITION("Class.java", 1038)
    // " "
    _r1.o = xmlvm_create_java_string_from_pool(57);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    label27:;
    XMLVM_SOURCE_POSITION("Class.java", 1040)
    XMLVM_CHECK_NPE(2)
    _r1.o = java_lang_Class_getName__(_r2.o);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    XMLVM_SOURCE_POSITION("Class.java", 1041)
    //java_lang_StringBuilder_toString__[5]
    XMLVM_CHECK_NPE(0)
    _r1.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_StringBuilder*) _r0.o)->tib->vtable[5])(_r0.o);
    XMLVM_EXIT_METHOD()
    return _r1.o;
    label39:;
    XMLVM_SOURCE_POSITION("Class.java", 1036)
    // "class"
    _r1.o = xmlvm_create_java_string_from_pool(58);
    XMLVM_CHECK_NPE(0)
    java_lang_StringBuilder_append___java_lang_String(_r0.o, _r1.o);
    goto label22;
    //XMLVM_END_WRAPPER
}

JAVA_OBJECT java_lang_Class_getPackage__(JAVA_OBJECT me)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_getPackage__]
    XMLVM_ENTER_METHOD("java.lang.Class", "getPackage", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    _r1.o = me;
    XMLVM_SOURCE_POSITION("Class.java", 1053)
    XMLVM_CHECK_NPE(1)
    _r0.o = java_lang_Class_getPackageString__(_r1.o);

    // Red class access removed: java.lang.Package::getPackage
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_EXIT_METHOD()
    return _r0.o;
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getPackageString__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_BOOLEAN java_lang_Class_desiredAssertionStatus__(JAVA_OBJECT me)]

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_asSubclass___java_lang_Class(JAVA_OBJECT me, JAVA_OBJECT n1)]

JAVA_OBJECT java_lang_Class_cast___java_lang_Object(JAVA_OBJECT me, JAVA_OBJECT n1)
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class_cast___java_lang_Object]
    XMLVM_ENTER_METHOD("java.lang.Class", "cast", "?")
    XMLVMElem _r0;
    XMLVMElem _r1;
    XMLVMElem _r2;
    _r1.o = me;
    _r2.o = n1;
    XMLVM_SOURCE_POSITION("Class.java", 1092)
    if (_r2.o == JAVA_NULL) goto label12;
    //java_lang_Object_getClass__[3]
    XMLVM_CHECK_NPE(2)
    _r0.o = (*(JAVA_OBJECT (*)(JAVA_OBJECT)) ((java_lang_Object*) _r2.o)->tib->vtable[3])(_r2.o);
    XMLVM_CHECK_NPE(1)
    _r0.i = java_lang_Class_isAssignableFrom___java_lang_Class(_r1.o, _r0.o);
    if (_r0.i == 0) goto label13;
    label12:;
    XMLVM_SOURCE_POSITION("Class.java", 1093)
    XMLVM_EXIT_METHOD()
    return _r2.o;
    label13:;
    XMLVM_SOURCE_POSITION("Class.java", 1095)

    // Red class access removed: java.lang.ClassCastException::new-instance
    XMLVM_RED_CLASS_DEPENDENCY();

    // Red class access removed: java.lang.ClassCastException::<init>
    XMLVM_RED_CLASS_DEPENDENCY();
    XMLVM_THROW_CUSTOM(_r0.o)
    //XMLVM_END_WRAPPER
}

//XMLVM_NATIVE[JAVA_OBJECT java_lang_Class_getSignatureAttribute__(JAVA_OBJECT me)]

void java_lang_Class___CLINIT_()
{
    //XMLVM_BEGIN_WRAPPER[java_lang_Class___CLINIT___]
    XMLVM_ENTER_METHOD("java.lang.Class", "<clinit>", "?")
    XMLVMElem _r0;
    XMLVM_SOURCE_POSITION("Class.java", 118)
    _r0.o = __NEW_org_xmlvm_runtime_XMLVMClassLoader();
    XMLVM_CHECK_NPE(0)
    org_xmlvm_runtime_XMLVMClassLoader___INIT___(_r0.o);
    java_lang_Class_PUT_classLoader( _r0.o);
    XMLVM_SOURCE_POSITION("Class.java", 124)
    XMLVM_EXIT_METHOD()
    return;
    //XMLVM_END_WRAPPER
}


text:
package geoipupdate

import (
	"net/http"
)

// NewClient creates an *http.Client for use in updating.
func NewClient(
	config *Config,
) *http.Client {
	transport := http.DefaultTransport
	if config.Proxy != nil {
		proxy := http.ProxyURL(config.Proxy)
		transport.(*http.Transport).Proxy = proxy
	}
	return &http.Client{Transport: transport}
}

// GetFilename returns the filename for the given edition ID.
func GetFilename(
	_ *Config,
	editionID string,
	_ *http.Client,
) (string, error) { //nolint:unparam // the error return value was kept for API compatibility
	return editionID + ".mmdb", nil
}


text:
module ActionMessager
  class Base
    include ActionController::UrlWriter if Object.const_defined?(:ActionController)

    class_inheritable_accessor :jabber_settings

    class << self
      def connection
        raise ArgumentError.new('You must supply jabber credentials to use ActionMessager') unless [jabber_settings[:username], jabber_settings[:password]].select(&:blank?).empty?
        @connection ||= Jabber::Simple.new(jabber_settings[:username], jabber_settings[:password])
      end

      def method_missing(method, *args)
        method.to_s =~ /deliver_.+?/ ? deliver(method.to_s.gsub(/deliver_/, '').intern, *args) : super
      end

      def deliver(method, *args)
        messager = new
        msg      = messager.send(method, *args)

        messager.recipients.each do |recipient|
          connection.deliver recipient, msg
        end
      end

      private :new
    end

    attr_accessor :recipients
  end
end