org.apache.poi.util.IntList

public class IntList
{
    private int[]            _array;
    private int              _limit;
    private static final int _default_size = 128;

    /**
     * create an IntList of default size
     */

    public IntList()
    {
        this(_default_size);
    }

    /**
     * create a copy of an existing IntList
     *
     * @param list the existing IntList
     */

    public IntList(final IntList list)
    {
        this(list._array.length);
        System.arraycopy(list._array, 0, _array, 0, _array.length);
        _limit = list._limit;
    }

    /**
     * create an IntList with a predefined initial size
     *
     * @param initialCapacity the size for the internal array
     */

    public IntList(final int initialCapacity)
    {
        _array = new int[ initialCapacity ];
        _limit = 0;
    }

    /**
     * add the specfied value at the specified index
     *
     * @param index the index where the new value is to be added
     * @param value the new value
     *
     * @exception IndexOutOfBoundsException if the index is out of
     *            range (index < 0 || index > size()).
     */

    public void add(final int index, final int value)
    {
        if (index > _limit)
        {
            throw new IndexOutOfBoundsException();
        }
        else if (index == _limit)
        {
            add(value);
        }
        else
        {

            if (_limit == _array.length)
            {
                growArray(_limit * 2);
            }
            System.arraycopy(_array, index, _array, index + 1,
                             _limit - index);
            _array[ index ] = value;
            _limit++;
        }
    }

    /**
     * Appends the specified element to the end of this list
     *
     * @param value element to be appended to this list.
     *
     * @return true (as per the general contract of the Collection.add
     *         method).
     */

    public boolean add(final int value)
    {
        if (_limit == _array.length)
        {
            growArray(_limit * 2);
        }
        _array[ _limit++ ] = value;
        return true;
    }

    /**
     * Appends all of the elements in the specified collection to the
     * end of this list, in the order that they are returned by the
     * specified collection's iterator.  The behavior of this
     * operation is unspecified if the specified collection is
     * modified while the operation is in progress.  (Note that this
     * will occur if the specified collection is this list, and it's
     * nonempty.)
     *
     * @param c collection whose elements are to be added to this
     *          list.
     *
     * @return true if this list changed as a result of the call.
     */

    public boolean addAll(final IntList c)
    {
        if (c._limit != 0)
        {
            if ((_limit + c._limit) > _array.length)
            {
                growArray(_limit + c._limit);
            }
            System.arraycopy(c._array, 0, _array, _limit, c._limit);
            _limit += c._limit;
        }
        return true;
    }

    /**
     * Inserts all of the elements in the specified collection into
     * this list at the specified position.  Shifts the element
     * currently at that position (if any) and any subsequent elements
     * to the right (increases their indices).  The new elements will
     * appear in this list in the order that they are returned by the
     * specified collection's iterator.  The behavior of this
     * operation is unspecified if the specified collection is
     * modified while the operation is in progress.  (Note that this
     * will occur if the specified collection is this list, and it's
     * nonempty.)
     *
     * @param index index at which to insert first element from the
     *              specified collection.
     * @param c elements to be inserted into this list.
     *
     * @return true if this list changed as a result of the call.
     *
     * @exception IndexOutOfBoundsException if the index is out of
     *            range (index < 0 || index > size())
     */

    public boolean addAll(final int index, final IntList c)
    {
        if (index > _limit)
        {
            throw new IndexOutOfBoundsException();
        }
        if (c._limit != 0)
        {
            if ((_limit + c._limit) > _array.length)
            {
                growArray(_limit + c._limit);
            }

            System.arraycopy(_array, index, _array, index + c._limit,
                             _limit - index);

            System.arraycopy(c._array, 0, _array, index, c._limit);
            _limit += c._limit;
        }
        return true;
    }

    /**
     * Removes all of the elements from this list.  This list will be
     * empty after this call returns (unless it throws an exception).
     */

    public void clear()
    {
        _limit = 0;
    }

    /**
     * Returns true if this list contains the specified element.  More
     * formally, returns true if and only if this list contains at
     * least one element e such that o == e
     *
     * @param o element whose presence in this list is to be tested.
     *
     * @return true if this list contains the specified element.
     */

    public boolean contains(final int o)
    {
        boolean rval = false;

        for (int j = 0; !rval && (j < _limit); j++)
        {
            if (_array[ j ] == o)
            {
                rval = true;
            }
        }
        return rval;
    }

    /**
     * Returns true if this list contains all of the elements of the
     * specified collection.
     *
     * @param c collection to be checked for containment in this list.
     *
     * @return true if this list contains all of the elements of the
     *         specified collection.
     */

    public boolean containsAll(final IntList c)
    {
        boolean rval = true;

        if (this != c)
        {
            for (int j = 0; rval && (j < c._limit); j++)
            {
                if (!contains(c._array[ j ]))
                {
                    rval = false;
                }
            }
        }
        return rval;
    }

    /**
     * Compares the specified object with this list for equality.
     * Returns true if and only if the specified object is also a
     * list, both lists have the same size, and all corresponding
     * pairs of elements in the two lists are equal.  (Two elements e1
     * and e2 are equal if e1 == e2.)  In other words, two lists are
     * defined to be equal if they contain the same elements in the
     * same order.  This definition ensures that the equals method
     * works properly across different implementations of the List
     * interface.
     *
     * @param o the object to be compared for equality with this list.
     *
     * @return true if the specified object is equal to this list.
     */

    public boolean equals(final Object o)
    {
        boolean rval = this == o;

        if (!rval && (o != null) && (o.getClass() == this.getClass()))
        {
            IntList other = ( IntList ) o;

            if (other._limit == _limit)
            {

                rval = true;
                for (int j = 0; rval && (j < _limit); j++)
                {
                    rval = _array[ j ] == other._array[ j ];
                }
            }
        }
        return rval;
    }

    /**
     * Returns the element at the specified position in this list.
     *
     * @param index index of element to return.
     *
     * @return the element at the specified position in this list.
     *
     * @exception IndexOutOfBoundsException if the index is out of
     *            range (index < 0 || index >= size()).
     */

    public int get(final int index)
    {
        if (index >= _limit)
        {
            throw new IndexOutOfBoundsException();
        }
        return _array[ index ];
    }

    /**
     * Returns the hash code value for this list.  The hash code of a
     * list is defined to be the result of the following calculation:
     *
     * <code>
     * hashCode = 1;
     * Iterator i = list.iterator();
     * while (i.hasNext()) {
     *      Object obj = i.next();
     *      hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
     * }
     * </code>
     *
     * This ensures that list1.equals(list2) implies that
     * list1.hashCode()==list2.hashCode() for any two lists, list1 and
     * list2, as required by the general contract of Object.hashCode.
     *
     * @return the hash code value for this list.
     */

    public int hashCode()
    {
        int hash = 0;

        for (int j = 0; j < _limit; j++)
        {
            hash = (31 * hash) + _array[ j ];
        }
        return hash;
    }

    /**
     * Returns the index in this list of the first occurrence of the
     * specified element, or -1 if this list does not contain this
     * element.  More formally, returns the lowest index i such that
     * (o == get(i)), or -1 if there is no such index.
     *
     * @param o element to search for.
     *
     * @return the index in this list of the first occurrence of the
     *         specified element, or -1 if this list does not contain
     *         this element.
     */

    public int indexOf(final int o)
    {
        int rval = 0;

        for (; rval < _limit; rval++)
        {
            if (o == _array[ rval ])
            {
                break;
            }
        }
        if (rval == _limit)
        {
        }
        return rval;
    }

    /**
     * Returns true if this list contains no elements.
     *
     * @return true if this list contains no elements.
     */

    public boolean isEmpty()
    {
        return _limit == 0;
    }

    /**
     * Returns the index in this list of the last occurrence of the
     * specified element, or -1 if this list does not contain this
     * element.  More formally, returns the highest index i such that
     * (o == get(i)), or -1 if there is no such index.
     *
     * @param o element to search for.
     *
     * @return the index in this list of the last occurrence of the
     *         specified element, or -1 if this list does not contain
     *         this element.
     */

    public int lastIndexOf(final int o)
    {
        int rval = _limit - 1;

        for (; rval >= 0; rval--)
        {
            if (o == _array[ rval ])
            {
                break;
            }
        }
        return rval;
    }

    /**
     * Removes the element at the specified position in this list.
     * Shifts any subsequent elements to the left (subtracts one from
     * their indices).  Returns the element that was removed from the
     * list.
     *
     * @param index the index of the element to removed.
     *
     * @return the element previously at the specified position.
     *
     * @exception IndexOutOfBoundsException if the index is out of
     *            range (index < 0 || index >= size()).
     */

    public int remove(final int index)
    {
        if (index >= _limit)
        {
            throw new IndexOutOfBoundsException();
        }
        int rval = _array[ index ];

        System.arraycopy(_array, index + 1, _array, index, _limit - index);
        _limit--;
        return rval;
    }

    /**
     * Removes the first occurrence in this list of the specified
     * element (optional operation).  If this list does not contain
     * the element, it is unchanged.  More formally, removes the
     * element with the lowest index i such that (o.equals(get(i)))
     * (if such an element exists).
     *
     * @param o element to be removed from this list, if present.
     *
     * @return true if this list contained the specified element.
     */

    public boolean removeValue(final int o)
    {
        boolean rval = false;

        for (int j = 0; !rval && (j < _limit); j++)
        {
            if (o == _array[ j ])
            {
                System.arraycopy(_array, j + 1, _array, j, _limit - j);
                _limit--;
                rval = true;
            }
        }
        return rval;
    }

    /**
     * Removes from this list all the elements that are contained in
     * the specified collection
     *
     * @param c collection that defines which elements will be removed
     *          from this list.
     *
     * @return true if this list changed as a result of the call.
     */

    public boolean removeAll(final IntList c)
    {
        boolean rval = false;

        for (int j = 0; j < c._limit; j++)
        {
            if (removeValue(c._array[ j ]))
            {
                rval = true;
            }
        }
        return rval;
    }

    /**
     * Retains only the elements in this list that are contained in
     * the specified collection.  In other words, removes from this
     * list all the elements that are not contained in the specified
     * collection.
     *
     * @param c collection that defines which elements this set will
     *          retain.
     *
     * @return true if this list changed as a result of the call.
     */

    public boolean retainAll(final IntList c)
    {
        boolean rval = false;

        for (int j = 0; j < _limit; )
        {
            if (!c.contains(_array[ j ]))
            {
                remove(j);
                rval = true;
            }
            else
            {
                j++;
            }
        }
        return rval;
    }

    /**
     * Replaces the element at the specified position in this list
     * with the specified element
     *
     * @param index index of element to replace.
     * @param element element to be stored at the specified position.
     *
     * @return the element previously at the specified position.
     *
     * @exception IndexOutOfBoundsException if the index is out of
     *            range (index < 0 || index >= size()).
     */

    public int set(final int index, final int element)
    {
        if (index >= _limit)
        {
            throw new IndexOutOfBoundsException();
        }
        int rval = _array[ index ];

        _array[ index ] = element;
        return rval;
    }

    /**
     * Returns the number of elements in this list. If this list
     * contains more than Integer.MAX_VALUE elements, returns
     * Integer.MAX_VALUE.
     *
     * @return the number of elements in this IntList
     */

    public int size()
    {
        return _limit;
    }

    /**
     * Returns an array containing all of the elements in this list in
     * proper sequence.  Obeys the general contract of the
     * Collection.toArray method.
     *
     * @return an array containing all of the elements in this list in
     *         proper sequence.
     */

    public int [] toArray()
    {
        int[] rval = new int[ _limit ];

        System.arraycopy(_array, 0, rval, 0, _limit);
        return rval;
    }

    /**
     * Returns an array containing all of the elements in this list in
     * proper sequence.  Obeys the general contract of the
     * Collection.toArray(Object[]) method.
     *
     * @param a the array into which the elements of this list are to
     *          be stored, if it is big enough; otherwise, a new array
     *          is allocated for this purpose.
     *
     * @return an array containing the elements of this list.
     */

    public int [] toArray(final int [] a)
    {
        int[] rval;

        if (a.length == _limit)
        {
            System.arraycopy(_array, 0, a, 0, _limit);
            rval = a;
        }
        else
        {
            rval = toArray();
        }
        return rval;
    }

    private void growArray(final int new_size)
    {
        int   size      = (new_size == _array.length) ? new_size + 1
                                                      : new_size;
        int[] new_array = new int[ size ];

        System.arraycopy(_array, 0, new_array, 0, _limit);
        _array = new_array;

    public void clear()
    {
        _limit = 0;

    public int size()
    {
        return _limit;

    public IntList()
    {
        this(_default_size);


@XmlRootElement(name = "groovy")
public class GroovyExpression extends ExpressionType {
    public GroovyExpression() {
    }

    public GroovyExpression(String expression) {
        super(expression);
    }

    public String getLanguage() {
        return "groovy";


public class RollingFileAppender extends FileAppender {
  /**
     A string constant used in naming the option for setting the
     maximum size of the log file. Current value of this string constant is
     MaxFileSize.

     @deprecated Options are now handled using the JavaBeans paradigm.
     This constant is not longer needed and will be removed in the
     near term.

   */
  static final public String MAX_FILE_SIZE_OPTION = "MaxFileSize";

   /**
     A string constant used in naming the option for setting the the
     number of backup files to retain. Current value of this string
     constant is MaxBackupIndex.

     @deprecated Options are now handled using the JavaBeans paradigm.
     This constant is not longer needed and will be removed in the
     near term.
 */
  static final public String MAX_BACKUP_INDEX_OPTION = "MaxBackupIndex";

  /**
     The default maximum file size is 10MB.
  */
  protected long maxFileSize = 10*1024*1024;

  /**
     There is one backup file by default.
   */
  protected int  maxBackupIndex  = 1;

  /**
     The default constructor simply calls its {@link
     FileAppender#FileAppender parents constructor}.  */
  public
  RollingFileAppender() {
    super();
  }

  /**
    Instantiate a RollingFileAppender and open the file designated by
    filename. The opened filename will become the ouput
    destination for this appender.

If the append parameter is true, the file will be
    appended to. Otherwise, the file desginated by
    filename will be truncated before being opened.
  */
  public
  RollingFileAppender(Layout layout, String filename, boolean append)
                                      throws IOException {
    super(layout, filename, append);
  }

  /**
     Instantiate a FileAppender and open the file designated by
    filename. The opened filename will become the output
    destination for this appender.

The file will be appended to.  */
  public
  RollingFileAppender(Layout layout, String filename) throws IOException {
    super(layout, filename);
  }

  /**
     Returns the value of the MaxBackupIndex option.
   */
  public
  int getMaxBackupIndex() {
    return maxBackupIndex;
  }

 /**
    Get the maximum size that the output file is allowed to reach
    before being rolled over to backup files.

    @since 1.1
 */
  public
  long getMaximumFileSize() {
    return maxFileSize;
  }

  /**
     Retuns the option names for this component, namely {@link
     #MAX_FILE_SIZE_OPTION} and {@link #MAX_BACKUP_INDEX_OPTION} in
     addition to the options of {@link FileAppender#getOptionStrings}

     @deprecated We now use JavaBeans introspection to configure
     components. Options strings are no longer needed.
  */
  public
  String[] getOptionStrings() {

    return OptionConverter.concatanateArrays(super.getOptionStrings(),
		 new String[] {MAX_FILE_SIZE_OPTION, MAX_BACKUP_INDEX_OPTION});
  }

  /**
     Implements the usual roll over behaviour.

If MaxBackupIndex is positive, then files
     {File.1, ..., File.MaxBackupIndex -1}
     are renamed to {File.2, ...,
     File.MaxBackupIndex}. Moreover, File is
     renamed File.1 and closed. A new File is
     created to receive further log output.

If MaxBackupIndex is equal to zero, then the
     File is truncated with no backup files created.

   */
  public // synchronization not necessary since doAppend is alreasy synched
  void rollOver() {
    File target;
    File file;

    LogLog.debug("rolling over count=" + ((CountingQuietWriter) qw).getCount());
    LogLog.debug("maxBackupIndex="+maxBackupIndex);

    // If maxBackups <= 0, then there is no file renaming to be done.
    if(maxBackupIndex > 0) {
      // Delete the oldest file, to keep Windows happy.
      file = new File(fileName + '.' + maxBackupIndex);
      if (file.exists())
       file.delete();

      // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}
      for (int i = maxBackupIndex - 1; i >= 1; i--) {
	file = new File(fileName + "." + i);
	if (file.exists()) {
	  target = new File(fileName + '.' + (i + 1));
	  LogLog.debug("Renaming file " + file + " to " + target);
	  file.renameTo(target);
	}
      }

      // Rename fileName to fileName.1
      target = new File(fileName + "." + 1);

      this.closeFile(); // keep windows happy.

      file = new File(fileName);
      LogLog.debug("Renaming file " + file + " to " + target);
      file.renameTo(target);
    }

    try {
      // This will also close the file. This is OK since multiple
      // close operations are safe.
      this.setFile(fileName, false);
    }
    catch(IOException e) {
      LogLog.error("setFile("+fileName+", false) call failed.", e);
    }
  }

  public
  synchronized
  void setFile(String fileName, boolean append) throws IOException {
    super.setFile(fileName, append);
    if(append) {
      File f = new File(fileName);
      ((CountingQuietWriter) qw).setCount(f.length());
    }
  }

  /**

     @deprecated Use the setter method for the option directly instead
     of the generic setOption method.

  */
  public
  void setOption(String key, String value) {
    super.setOption(key, value);
    if(key.equalsIgnoreCase(MAX_FILE_SIZE_OPTION)) {
      maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
    }
    else if(key.equalsIgnoreCase(MAX_BACKUP_INDEX_OPTION)) {
      maxBackupIndex = OptionConverter.toInt(value, maxBackupIndex);
    }
  }

  /**
     Set the maximum number of backup files to keep around.

The MaxBackupIndex option determines how many backup
     files are kept before the oldest is erased. This option takes
     a positive integer value. If set to zero, then there will be no
     backup files and the log file will be truncated when it reaches
     MaxFileSize.
   */
  public
  void setMaxBackupIndex(int maxBackups) {
    this.maxBackupIndex = maxBackups;
  }

  /**
     Set the maximum size that the output file is allowed to reach
     before being rolled over to backup files.

     @deprecated Use {@link #setMaximumFileSize} instead.
   */
  public
  void setMaxFileSize(long maxFileSize) {
    this.maxFileSize = maxFileSize;
  }

  /**
     Set the maximum size that the output file is allowed to reach
     before being rolled over to backup files.

This method is equivalent to {@link #setMaxFileSize} except
     that it is required for differentiating the setter taking a
     long argument from the setter taking a
     String argument by the JavaBeans {@link
     java.beans.Introspector Introspector}.

     @see #setMaxFileSize(String)
 */
  public
  void setMaximumFileSize(long maxFileSize) {
    this.maxFileSize = maxFileSize;
  }

  /**
     Set the maximum size that the output file is allowed to reach
     before being rolled over to backup files.

In configuration files, the MaxFileSize option takes an
     long integer in the range 0 - 2^63. You can specify the value
     with the suffixes "KB", "MB" or "GB" so that the integer is
     interpreted being expressed respectively in kilobytes, megabytes
     or gigabytes. For example, the value "10KB" will be interpreted
     as 10240.
   */
  public
  void setMaxFileSize(String value) {
    maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);
  }

  protected
  void setQWForFiles(Writer writer) {
     this.qw = new CountingQuietWriter(writer, errorHandler);
  }

  /**
     This method differentiates RollingFileAppender from its super
     class.

     @since 0.9.0
  */
  protected
  void subAppend(LoggingEvent event) {
    super.subAppend(event);
    if((fileName != null) &&
                     ((CountingQuietWriter) qw).getCount() >= maxFileSize)
      this.rollOver();

FUNC_DECL IF PARAM PARAM IF CALL CALL ASSIGN ASSIGN CALL CALL BINARY_OP LITERAL_ANCHOR


public class And extends ResourceSelectorContainer implements ResourceSelector {

    /**
     * Default constructor.
     */
    public And() {
    }

    /**
     * Convenience constructor.
     * @param r the ResourceSelector[] to add.
     */
    public And(ResourceSelector[] r) {
        super(r);
    }

    /**
     * Return true if this Resource is selected.
     * @param r the Resource to check.
     * @return whether the Resource was selected.
     */
    public boolean isSelected(Resource r) {
        for (Iterator i = getSelectors(); i.hasNext();) {
            if (!((ResourceSelector) i.next()).isSelected(r)) {
                return false;
            }
        }
        return true;

FUNC_DECL RETURN LOOP PARAM LITERAL_ANCHOR CALL IF CALL RETURN CALL LITERAL_ANCHOR


public class NoTypeConversionAvailableException extends RuntimeCamelException {
    private final Object value;
    private final Class type;

    public NoTypeConversionAvailableException(Object value, Class type) {
        super("No type converter available to convert from type: " + (value != null ? value.getClass() : null)
              + " to the required type " + type.getName() + " with value " + value);
        this.value = value;
        this.type = type;
    }

    /**
     * Returns the value which could not be converted
     */
    public Object getValue() {
        return value;
    }

    /**
     * Returns the required <tt>to</tt> type
     */
    public Class getType() {
        return type;
    }

    /**
     * Returns the required <tt>from</tt> type.
     * Returns <tt>null</tt> if the provided value was null.
     */
    public Class getFromType() {
        if (value != null) {
            return value.getClass();
        } else {
            return null;

    public Class getType() {
        return type;


public class StaticMethodTypeConverter implements TypeConverter {
    private final Method method;

    public StaticMethodTypeConverter(Method method) {
        this.method = method;
    }

    @Override
    public String toString() {
        return "StaticMethodTypeConverter: " + method;
    }

    public <T> T convertTo(Class<T> type, Object value) {
        return (T) ObjectHelper.invokeMethod(method, null, value);

FUNC_DECL RETURN PARAM PARAM CALL LITERAL_ANCHOR


public class Agent {

    /**
     * Diagnostic logger.
     * @deprecated
     */
  static Logger log = Logger.getLogger(Agent.class);

    /**
     * Create new instance.
     * @deprecated
     */
  public Agent() {
  }

    /**
     * Creates a new instance of com.sun.jdmk.comm.HtmlAdapterServer
     * using reflection.
     *
     * @since 1.2.16
     * @return new instance.
     */
  private static Object createServer() {
      Object newInstance = null;
      try {
        newInstance = Class.forName(
                "com.sun.jdmk.comm.HtmlAdapterServer").newInstance();
      } catch (ClassNotFoundException ex) {
          throw new RuntimeException(ex.toString());
      } catch (InstantiationException ex) {
          throw new RuntimeException(ex.toString());
      } catch (IllegalAccessException ex) {
          throw new RuntimeException(ex.toString());
      }
      return newInstance;
  }

    /**
     * Invokes HtmlAdapterServer.start() using reflection.
     *
     * @since 1.2.16
     * @param server instance of com.sun.jdmk.comm.HtmlAdapterServer.
     */
  private static void startServer(final Object server) {
      try {
          server.getClass().getMethod("start", new Class[0]).
                  invoke(server, new Object[0]);
      } catch(InvocationTargetException ex) {
          Throwable cause = ex.getTargetException();
          if (cause instanceof RuntimeException) {
              throw (RuntimeException) cause;
          } else if (cause != null) {
              if (cause instanceof InterruptedException
                      || cause instanceof InterruptedIOException) {
                  Thread.currentThread().interrupt();
              }
              throw new RuntimeException(cause.toString());
          } else {
              throw new RuntimeException();
          }
      } catch(NoSuchMethodException ex) {
          throw new RuntimeException(ex.toString());
      } catch(IllegalAccessException ex) {
        throw new RuntimeException(ex.toString());
    }
  }

    /**
     * Starts instance of HtmlAdapterServer.
     * @deprecated
      */
  public void start() {

    MBeanServer server = MBeanServerFactory.createMBeanServer();
    Object html = createServer();

    try {
      log.info("Registering HtmlAdaptorServer instance.");
      server.registerMBean(html, new ObjectName("Adaptor:name=html,port=8082"));
      log.info("Registering HierarchyDynamicMBean instance.");
      HierarchyDynamicMBean hdm = new HierarchyDynamicMBean();
      server.registerMBean(hdm, new ObjectName("log4j:hiearchy=default"));
    } catch(JMException e) {
      log.error("Problem while registering MBeans instances.", e);
      return;
    } catch(RuntimeException e) {
      log.error("Problem while registering MBeans instances.", e);
      return;
    }
    startServer(html);

FUNC_DECL RETURN TRY VAR_DECL CATCH CATCH CATCH THROW_RAISE THROW_RAISE THROW_RAISE ASSIGN LITERAL_ANCHOR CALL CALL CALL CALL CALL CALL CALL LITERAL_ANCHOR CALL


org.apache.xalan.xsltc.compiler.Message

final class Message extends Instruction {
    private boolean _terminate = false;

    public void parseContents(Parser parser) {
	String termstr = getAttribute("terminate");
	if (termstr != null) {
            _terminate = termstr.equals("yes");
	}
	parseChildren(parser);
    }

    public Type typeCheck(SymbolTable stable) throws TypeCheckError {
	typeCheckContents(stable);
	return Type.Void;
    }

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
	final ConstantPoolGen cpg = classGen.getConstantPool();
	final InstructionList il = methodGen.getInstructionList();

	il.append(classGen.loadTranslet());

        switch (elementCount()) {
            case 0:
                il.append(new PUSH(cpg, ""));
            break;
            case 1:
                SyntaxTreeNode child = (SyntaxTreeNode) elementAt(0);
                if (child instanceof Text) {
                    il.append(new PUSH(cpg, ((Text) child).getText()));
                    break;
                }
            default:
                il.append(methodGen.loadHandler());

                il.append(new NEW(cpg.addClass(STREAM_XML_OUTPUT)));
                il.append(methodGen.storeHandler());

                il.append(new NEW(cpg.addClass(STRING_WRITER)));
                il.append(DUP);
                il.append(DUP);
                il.append(new INVOKESPECIAL(
                    cpg.addMethodref(STRING_WRITER, "<init>", "()V")));

                il.append(methodGen.loadHandler());
                il.append(new INVOKESPECIAL(
                    cpg.addMethodref(STREAM_XML_OUTPUT, "<init>",
                                     "()V")));

                il.append(methodGen.loadHandler());
                il.append(SWAP);
                il.append(new INVOKEVIRTUAL(
                    cpg.addMethodref(OUTPUT_BASE, "setWriter",
                                     "("+WRITER_SIG+")V")));

                il.append(methodGen.loadHandler());
                il.append(new INVOKEVIRTUAL(
                    cpg.addMethodref(OUTPUT_BASE, "setEncoding",
                                     "("+STRING_SIG+")V")));

                il.append(methodGen.loadHandler());
                il.append(ICONST_1);
                il.append(new INVOKEVIRTUAL(
                    cpg.addMethodref(OUTPUT_BASE, "setOmitXMLDeclaration",
                                     "(Z)V")));

                il.append(methodGen.loadHandler());
                il.append(new INVOKEVIRTUAL(
                    cpg.addMethodref(OUTPUT_BASE, "startDocument",
                                     "()V")));

                translateContents(classGen, methodGen);

                il.append(methodGen.loadHandler());
                il.append(new INVOKEVIRTUAL(
                    cpg.addMethodref(OUTPUT_BASE, "endDocument",
                                     "()V")));

                il.append(new INVOKEVIRTUAL(
                    cpg.addMethodref(STRING_WRITER, "toString",
                                     "()" + STRING_SIG)));

                il.append(SWAP);
                il.append(methodGen.storeHandler());
            break;
        }

	il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
						     "displayMessage",
						     "("+STRING_SIG+")V")));

	if (_terminate == true) {
	    final int einit = cpg.addMethodref("java.lang.RuntimeException",
					       "<init>",
					       "(Ljava/lang/String;)V");
	    il.append(new NEW(cpg.addClass("java.lang.RuntimeException")));
	    il.append(DUP);
	    il.append(new PUSH(cpg,"Termination forced by an " +
			           "xsl:message instruction"));
	    il.append(new INVOKESPECIAL(einit));
	    il.append(ATHROW);


public class CamelDestination extends AbstractDestination implements Configurable {
    protected static final String BASE_BEAN_NAME_SUFFIX = ".camel-destination-base";
    private static final Logger LOG = LogUtils.getL7dLogger(CamelDestination.class);
    CamelContext camelContext;
    String camelUri;
    final ConduitInitiator conduitInitiator;
    private CamelTransportBase base;
    private Endpoint endpoint;

    public CamelDestination(CamelContext camelContext, Bus bus, ConduitInitiator ci, EndpointInfo info) throws IOException {
        super(getTargetReference(info, bus), info);
        this.camelContext = camelContext;

        base = new CamelTransportBase(camelContext, bus, endpointInfo, true, BASE_BEAN_NAME_SUFFIX);

        conduitInitiator = ci;

        initConfig();
    }

    protected Logger getLogger() {
        return LOG;
    }

    /**
     * @param inMessage the incoming message
     * @return the inbuilt backchannel
     */
    protected Conduit getInbuiltBackChannel(Message inMessage) {
        return new BackChannelConduit(EndpointReferenceUtils.getAnonymousEndpointReference(), inMessage);
    }

    public void activate() {
        getLogger().log(Level.INFO, "CamelDestination activate().... ");

        try {
            getLogger().log(Level.FINE, "establishing Camel connection");
            endpoint = camelContext.getEndpoint(camelUri);
        } catch (Exception ex) {
            getLogger().log(Level.SEVERE, "Camel connect failed with EException : ", ex);
        }
    }

    public void deactivate() {
        base.close();
    }

    public void shutdown() {
        getLogger().log(Level.FINE, "CamelDestination shutdown()");
        this.deactivate();
    }

    protected void incoming(Exchange exchange) {
        getLogger().log(Level.FINE, "server received request: ", exchange);

        byte[] bytes = base.unmarshal(exchange);

        MessageImpl inMessage = new MessageImpl();
        inMessage.setContent(InputStream.class, new ByteArrayInputStream(bytes));
        base.populateIncomingContext(exchange, inMessage, CamelConstants.CAMEL_SERVER_REQUEST_HEADERS);
        inMessage.put(CamelConstants.CAMEL_REQUEST_MESSAGE, exchange);

        inMessage.setDestination(this);

        incomingObserver.onMessage(inMessage);
    }

    public String getBeanName() {
        return endpointInfo.getName().toString() + ".camel-destination";
    }

    private void initConfig() {
        /*
         * this.runtimePolicy = endpointInfo.getTraversedExtensor(new
         * ServerBehaviorPolicyType(), ServerBehaviorPolicyType.class);
         * this.serverConfig = endpointInfo.getTraversedExtensor(new
         * ServerConfig(), ServerConfig.class); this.address =
         * endpointInfo.getTraversedExtensor(new AddressType(),
         * AddressType.class); this.sessionPool =
         * endpointInfo.getTraversedExtensor(new SessionPoolType(),
         * SessionPoolType.class);
         */
    }

    protected class ConsumerProcessor implements Processor {
        public void process(Exchange exchange) {
            try {
                incoming(exchange);
            } catch (Throwable ex) {
                getLogger().log(Level.WARNING, "Failed to process incoming message : ", ex);
            }
        }
    }

    protected class BackChannelConduit extends AbstractConduit {
        protected Message inMessage;

        BackChannelConduit(EndpointReferenceType ref, Message message) {
            super(ref);
            inMessage = message;
        }

        /**
         * Register a message observer for incoming messages.
         *
         * @param observer the observer to notify on receipt of incoming
         */
        public void setMessageObserver(MessageObserver observer) {
        }

        /**
         * Send an outbound message, assumed to contain all the name-value
         * mappings of the corresponding input message (if any).
         *
         * @param message the message to be sent.
         */
        public void prepare(Message message) throws IOException {
            message.put(CamelConstants.CAMEL_REQUEST_MESSAGE, inMessage.get(CamelConstants.CAMEL_REQUEST_MESSAGE));
            message.setContent(OutputStream.class, new CamelOutputStream(inMessage));
        }

        protected Logger getLogger() {
            return LOG;
        }

    }

    private class CamelOutputStream extends CachedOutputStream {
        private Message inMessage;
        private Producer<Exchange> replyTo;
        private Producer<Exchange> sender;

        public CamelOutputStream(Message m) {
            super();
            inMessage = m;
        }

        private void commitOutputMessage() throws IOException {

            final String replyToUri = getReplyToDestination(inMessage);

            base.template.send(replyToUri, new Processor() {
                public void process(Exchange reply) {
                    base.marshal(currentStream.toString(), replyToUri, reply);

                    setReplyCorrelationID(inMessage, reply);

                    base.setMessageProperties(inMessage, reply);

                    getLogger().log(Level.FINE, "just server sending reply: ", reply);
                }
            });
        }

        @Override
        protected void doFlush() throws IOException {
        }

        @Override
        protected void doClose() throws IOException {
            commitOutputMessage();
        }

        @Override
        protected void onWrite() throws IOException {
        }
    }

    protected String getReplyToDestination(Message inMessage) {
        if (inMessage.get(CamelConstants.CAMEL_REBASED_REPLY_TO) != null) {
            return (String)inMessage.get(CamelConstants.CAMEL_REBASED_REPLY_TO);
        } else {
            return base.getReplyDestination();
        }
    }

    protected void setReplyCorrelationID(Message inMessage, Exchange reply) {
        Object value = inMessage.get(CamelConstants.CAMEL_CORRELATION_ID);
        if (value != null) {
            reply.getIn().setHeader(CamelConstants.CAMEL_CORRELATION_ID, value);

FUNC_DECL TRY CATCH CALL ASSIGN CALL CALL CALL CALL CALL LITERAL_ANCHOR CALL LITERAL_ANCHOR LITERAL_ANCHOR

FUNC_DECL VAR_DECL VAR_DECL PARAM CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL LITERAL_ANCHOR

FUNC_DECL IF PARAM BINARY_OP RETURN RETURN LITERAL_ANCHOR CALL CALL CALL

FUNC_DECL PARAM PARAM PARAM PARAM CALL ASSIGN ASSIGN ASSIGN CALL CALL LITERAL_ANCHOR


org.apache.xml.utils.Trie

public class Trie
{

  /** Size of the m_nextChar array.  */
  public static final int ALPHA_SIZE = 128;

  /** The root node of the tree.    */
  Node m_Root;

  /**
   * Construct the trie.
   */
  public Trie()
  {
    m_Root = new Node();
  }

  /**
   * Put an object into the trie for lookup.
   *
   * @param key must be a 7-bit ASCII string
   * @param value any java object.
   *
   * @return The old object that matched key, or null.
   */
  public Object put(String key, Object value)
  {

    final int len = key.length();
    Node node = m_Root;

    for (int i = 0; i < len; i++)
    {
      Node nextNode = node.m_nextChar[Character.toUpperCase(key.charAt(i))];

      if (nextNode != null)
      {
        node = nextNode;
      }
      else
      {
        for (; i < len; i++)
        {
          Node newNode = new Node();

          node.m_nextChar[Character.toUpperCase(key.charAt(i))] = newNode;
          node = newNode;
        }

        break;
      }
    }

    Object ret = node.m_Value;

    node.m_Value = value;

    return ret;
  }

  /**
   * Get an object that matches the key.
   *
   * @param key must be a 7-bit ASCII string
   *
   * @return The object that matches the key, or null.
   */
  public Object get(String key)
  {

    final int len = key.length();
    Node node = m_Root;

    for (int i = 0; i < len; i++)
    {
      try
      {
        node = node.m_nextChar[Character.toUpperCase(key.charAt(i))];
      }
      catch (ArrayIndexOutOfBoundsException e)
      {

        node = null;
      }

      if (node == null)
        return null;
    }

    return node.m_Value;
  }

  /**
   * <meta name="usage" content="internal"/>
   * The node representation for the trie.
   */
  class Node
  {

    /**
     * Constructor, creates a Node[ALPHA_SIZE].
     */
    Node()
    {
      m_nextChar = new Node[ALPHA_SIZE];
      m_Value = null;
    }

    /** The next nodes.   */
    Node m_nextChar[];

    /** The value.   */
    Object m_Value;

  public Trie()
  {
    m_Root = new Node();


org.apache.tools.ant.taskdefs.Basename

public class Basename extends Task {
    private File file;
    private String property;
    private String suffix;

    /**
     * file or directory to get base name from
     * @param file file or directory to get base name from
     */
    public void setFile(File file) {
        this.file = file;
    }

    /**
    * Property to set base name to.
     * @param property name of property
    */
    public void setProperty(String property) {
        this.property  = property;
    }

    /**
    * Optional suffix to remove from base name.
     * @param suffix suffix to remove from base name
    */
    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    /**
     * do the work
     * @throws BuildException if required attributes are not supplied
     * property and attribute are required attributes
     */
    public void execute() throws BuildException {
        if (property == null) {
            throw new BuildException("property attribute required", getLocation());
        }
        if (file == null) {
            throw new BuildException("file attribute required", getLocation());
        }
        String value = file.getName();
        if (suffix != null && value.endsWith(suffix)) {
            int pos = value.length() - suffix.length();
            if (pos > 0 && suffix.charAt(0) != '.'
                && value.charAt(pos - 1) == '.') {
                pos--;
            }
            value = value.substring(0, pos);
        }
        getProject().setNewProperty(property, value);


public class XmlReportParser {
    private static class SaxXmlReportParser {
        private final class XmlReportParserHandler extends DefaultHandler {
            private String organisation;

            private String module;

            private String branch;

            private String revision;

            private int position;

            private Date pubdate;

            private boolean skip;

            private ModuleRevisionId mrid;

            private boolean isDefault;

            private SortedMap revisionsMap = new TreeMap(); // Use a TreeMap to order by

            private List revisionArtifacts = null;

            public void startElement(String uri, String localName, String qName,
                    Attributes attributes) throws SAXException {
                if ("module".equals(qName)) {
                    organisation = attributes.getValue("organisation");
                    module = attributes.getValue("name");
                } else if ("revision".equals(qName)) {
                    revisionArtifacts = new ArrayList();
                    branch = attributes.getValue("branch");
                    revision = attributes.getValue("name");
                    isDefault = Boolean.valueOf(attributes.getValue("default")).booleanValue();
                    // retrieve position from file. If no position is found, it may be an old
                    // report generated with a previous version,
                    // in which case, we put it at the last position
                    String pos = attributes.getValue("position");
                    position = pos == null ? getMaxPos() + 1 : Integer.valueOf(pos).intValue();
                    if (attributes.getValue("error") != null
                            || attributes.getValue("evicted") != null) {
                        skip = true;
                    } else {
                        revisionsMap.put(new Integer(position), revisionArtifacts);
                        mrid = ModuleRevisionId.newInstance(organisation, module, branch,
                            revision, ExtendableItemHelper.getExtraAttributes(attributes,
                                "extra-"));
                        mrids.add(mrid);
                        if (isDefault) {
                            defaultMrids.add(mrid);
                        } else {
                            Artifact metadataArtifact =
                                DefaultArtifact.newIvyArtifact(mrid, pubdate);
                            MetadataArtifactDownloadReport madr =
                                new MetadataArtifactDownloadReport(metadataArtifact);
                            metadataReports.put(mrid, madr);
                            realMrids.add(mrid);
                        }
                        try {
                            pubdate = Ivy.DATE_FORMAT.parse(attributes.getValue("pubdate"));
                            skip = false;
                        } catch (ParseException e) {
                            throw new IllegalArgumentException("invalid publication date for "
                                    + organisation + " " + module + " " + revision + ": "
                                    + attributes.getValue("pubdate"));
                        }
                    }
                } else if ("metadata-artifact".equals(qName)) {
                    if (skip) {
                        return;
                    }
                    MetadataArtifactDownloadReport madr =
                        (MetadataArtifactDownloadReport) metadataReports.get(mrid);
                    if (madr != null) {
                        madr.setDownloadStatus(
                            DownloadStatus.fromString(attributes.getValue("status")));
                        madr.setDownloadDetails(attributes.getValue("details"));
                        madr.setSize(Long.parseLong(attributes.getValue("size")));
                        madr.setDownloadTimeMillis(Long.parseLong(attributes.getValue("time")));
                        madr.setSearched(parseBoolean(attributes.getValue("searched")));
                        if (attributes.getValue("location") != null) {
                            madr.setLocalFile(new File(attributes.getValue("location")));
                        }
                        if (attributes.getValue("original-local-location") != null) {
                            madr.setOriginalLocalFile(
                                new File(attributes.getValue("original-local-location")));
                        }
                        if (attributes.getValue("origin-location") != null) {
                            if (ArtifactOrigin.isUnknown(attributes.getValue("origin-location"))) {
                                madr.setArtifactOrigin(ArtifactOrigin.unkwnown(madr.getArtifact()));
                            } else {
                                madr.setArtifactOrigin(
                                    new ArtifactOrigin(
                                        madr.getArtifact(),
                                        parseBoolean(attributes.getValue("origin-is-local")),
                                        attributes.getValue("origin-location")));
                            }
                        }
                    }
                } else if ("artifact".equals(qName)) {
                    if (skip) {
                        return;
                    }
                    String status = attributes.getValue("status");
                    String artifactName = attributes.getValue("name");
                    String type = attributes.getValue("type");
                    String ext = attributes.getValue("ext");
                    Artifact artifact = new DefaultArtifact(mrid, pubdate, artifactName,
                            type, ext, ExtendableItemHelper.getExtraAttributes(attributes,
                                "extra-"));
                    ArtifactDownloadReport aReport = new ArtifactDownloadReport(artifact);
                    aReport.setDownloadStatus(DownloadStatus.fromString(status));
                    aReport.setDownloadDetails(attributes.getValue("details"));
                    aReport.setSize(Long.parseLong(attributes.getValue("size")));
                    aReport.setDownloadTimeMillis(Long.parseLong(attributes.getValue("time")));
                    if (attributes.getValue("location") != null) {
                        aReport.setLocalFile(new File(attributes.getValue("location")));
                    }
                    revisionArtifacts.add(aReport);
                } else if ("origin-location".equals(qName)) {
                    if (skip) {
                        return;
                    }
                    ArtifactDownloadReport aReport = (ArtifactDownloadReport)
                        revisionArtifacts.get(revisionArtifacts.size() - 1);

                    if (ArtifactOrigin.isUnknown(attributes.getValue("location"))) {
                        aReport.setArtifactOrigin(ArtifactOrigin.unkwnown(aReport.getArtifact()));
                    } else {
                        aReport.setArtifactOrigin(
                            new ArtifactOrigin(
                                aReport.getArtifact(),
                                parseBoolean(attributes.getValue("is-local")),
                                attributes.getValue("location")));
                    }
                } else if ("info".equals(qName)) {
                    String organisation = attributes.getValue("organisation");
                    String name = attributes.getValue("module");
                    String branch = attributes.getValue("branch");
                    String revision = attributes.getValue("revision");
                    Map extraAttributes = new HashMap();
                    for (int i = 0; i < attributes.getLength(); i++) {
                        String attName = attributes.getQName(i);
                        if (attName.startsWith("extra-")) {
                            String extraAttrName = attName.substring("extra-".length());
                            String extraAttrValue = attributes.getValue(i);
                            extraAttributes.put(extraAttrName, extraAttrValue);
                        }
                    }
                    mRevisionId = ModuleRevisionId.newInstance(organisation, name, branch,
                        revision, extraAttributes);
                }
            }

            public void endElement(String uri, String localName, String qname)
                    throws SAXException {
                if ("dependencies".equals(qname)) {
                    // add the artifacts in the correct order
                    for (Iterator it = revisionsMap.values().iterator(); it.hasNext();) {
                        List artifactReports = (List) it.next();
                        SaxXmlReportParser.this.artifactReports.addAll(artifactReports);
                        for (Iterator iter = artifactReports.iterator(); iter.hasNext();) {
                            ArtifactDownloadReport artifactReport
                                = (ArtifactDownloadReport) iter.next();
                            if (artifactReport.getDownloadStatus() != DownloadStatus.FAILED) {
                                artifacts.add(artifactReport.getArtifact());
                            }
                        }

                    }
                }
            }

            private int getMaxPos() {
                return revisionsMap.isEmpty() ? -1 : ((Integer) revisionsMap.keySet()
                        .toArray()[revisionsMap.size() - 1]).intValue();
            }
        }

        private List/*<ModuleRevisionId>*/ mrids;

        private List/*<ModuleRevisionId>*/ defaultMrids;

        private List/*<ModuleRevisionId>*/ realMrids;

        private List/*<Artifact>*/ artifacts;

        private List/*<ArtifactDownloadReport>*/ artifactReports;

        private Map/*<ModuleRevisionId,MetadataArtifactDownloadReport>*/ metadataReports;

        private ModuleRevisionId mRevisionId;

        private File report;

        SaxXmlReportParser(File report) {
            artifacts = new ArrayList();
            artifactReports = new ArrayList();
            mrids = new ArrayList();
            defaultMrids = new ArrayList();
            realMrids = new ArrayList();
            metadataReports = new HashMap();
            this.report = report;
        }

        public void parse() throws Exception {
            SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
            saxParser.parse(report, new XmlReportParserHandler());
        }

        private static boolean parseBoolean(String str) {
            return (str != null) && str.equalsIgnoreCase("true");
        }

        public List getArtifacts() {
            return artifacts;
        }

        public List getArtifactReports() {
            return artifactReports;
        }

        public List getModuleRevisionIds() {
            return mrids;
        }

        public List getRealModuleRevisionIds() {
            return realMrids;
        }

        public ModuleRevisionId getResolvedModule() {
            return mRevisionId;
        }

        public MetadataArtifactDownloadReport getMetadataArtifactReport(ModuleRevisionId id) {
            return (MetadataArtifactDownloadReport) metadataReports.get(id);
        }
    }

    private SaxXmlReportParser parser = null;

    public void parse(File report) throws ParseException {
        if (!report.exists()) {
            throw new IllegalStateException("Report file '" + report.getAbsolutePath()
                    + "' does not exist.");
        }

        parser = new SaxXmlReportParser(report);
        try {
            parser.parse();
        } catch (Exception e) {
            ParseException pe = new ParseException("failed to parse report: " + report + ": "
                    + e.getMessage(), 0);
            pe.initCause(e);
            throw pe;
        }
    }

    public Artifact[] getArtifacts() {
        return (Artifact[]) parser.getArtifacts().toArray(
            new Artifact[parser.getArtifacts().size()]);
    }

    public ArtifactDownloadReport[] getArtifactReports() {
        return (ArtifactDownloadReport[]) parser.getArtifactReports().toArray(
            new ArtifactDownloadReport[parser.getArtifactReports().size()]);
    }

    public ModuleRevisionId[] getDependencyRevisionIds() {
        return (ModuleRevisionId[]) parser.getModuleRevisionIds().toArray(
            new ModuleRevisionId[parser.getModuleRevisionIds().size()]);
    }

    public ModuleRevisionId[] getRealDependencyRevisionIds() {
        return (ModuleRevisionId[]) parser.getRealModuleRevisionIds().toArray(
            new ModuleRevisionId[parser.getRealModuleRevisionIds().size()]);
    }

    public MetadataArtifactDownloadReport getMetadataArtifactReport(ModuleRevisionId id) {
        return parser.getMetadataArtifactReport(id);
    }

    /**
     * Returns the <tt>ModuleRevisionId</tt> of the resolved module.
     */
    public ModuleRevisionId getResolvedModule() {
        return parser.getResolvedModule();


public class FloatingWindowContainer extends JFrame implements DockableWindowContainer
{
	//{{{ FloatingWindowContainer constructor
	public FloatingWindowContainer(DockableWindowManager dockableWindowManager,
		boolean clone)
	{
		this.dockableWindowManager = dockableWindowManager;
		this.clone = clone;
		setIconImage(GUIUtilities.getPluginIcon());
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);

		Box caption = new Box(BoxLayout.X_AXIS);
		caption.add(menu = new RolloverButton(GUIUtilities
			.loadIcon("ToolbarMenu.gif")));
		menu.addMouseListener(new MouseHandler());
		Box separatorBox = new Box(BoxLayout.Y_AXIS);
		separatorBox.add(Box.createVerticalStrut(3));
		separatorBox.add(new JSeparator(JSeparator.HORIZONTAL));
		separatorBox.add(Box.createVerticalStrut(3));
		caption.add(separatorBox);
		getContentPane().add(BorderLayout.NORTH,caption);
	} //}}}

	//{{{ register() method
	public void register(DockableWindowManager.Entry entry)
	{
		this.entry = entry;
		setTitle(entry.title);

		getContentPane().add(BorderLayout.CENTER,entry.win);

		pack();
		GUIUtilities.loadGeometry(this,entry.factory.name);
		setVisible(true);
	} //}}}

	//{{{ remove() method
	public void remove(DockableWindowManager.Entry entry)
	{
		entry.container = null;
		dispose();
	} //}}}

	//{{{ unregister() method
	public void unregister(DockableWindowManager.Entry entry)
	{
		dispose();
	} //}}}

	//{{{ show() method
	public void show(final DockableWindowManager.Entry entry)
	{
		if(entry == null)
			dispose();
		else
		{
			toFront();
			requestFocus();
			SwingUtilities.invokeLater(new Runnable()
			{
				public void run()
				{
					if(entry.win instanceof DefaultFocusComponent)
					{
						((DefaultFocusComponent)entry.win)
							.focusOnDefaultComponent();
					}
					else
					{
						entry.win.requestDefaultFocus();
					}
				}
			});
		}
	} //}}}

	//{{{ isVisible() method
	public boolean isVisible(DockableWindowManager.Entry entry)
	{
		return true;
	} //}}}

	//{{{ dispose() method
	public void dispose()
	{
		GUIUtilities.saveGeometry(this,entry.factory.name);
		entry.container = null;
		entry.win = null;
		super.dispose();
	} //}}}

	//{{{ getDockableWindowManager() method
	public DockableWindowManager getDockableWindowManager()
	{
		return dockableWindowManager;
	} //}}}

	//{{{ getMinimumSize() method
	public Dimension getMinimumSize()
	{
		return new Dimension(0,0);
	} //}}}

	//{{{ Private members
	private DockableWindowManager dockableWindowManager;
	private boolean clone;
	private DockableWindowManager.Entry entry;
	private JButton menu;
	//}}}

	//{{{ MouseHandler class
	class MouseHandler extends MouseAdapter
	{
		JPopupMenu popup;

		public void mousePressed(MouseEvent evt)
		{
			if(popup != null && popup.isVisible())
				popup.setVisible(false);
			else
			{
				popup = dockableWindowManager.createPopupMenu(
					FloatingWindowContainer.this,
					entry.factory.name,clone);
				GUIUtilities.showPopupMenu(popup,
					menu,menu.getX(),menu.getY() + menu.getHeight(),
					false);

FUNC_DECL PARAM CALL CALL CALL CALL CALL ASSIGN LITERAL_ANCHOR CALL

FUNC_DECL VAR_DECL VAR_DECL PARAM PARAM CALL CALL CALL CALL CALL CALL CALL CALL CALL ASSIGN ASSIGN CALL CALL CALL CALL CALL CALL ASSIGN CALL CALL LITERAL_ANCHOR LITERAL_ANCHOR CALL CALL LITERAL_ANCHOR


org.apache.tools.ant.NoBannerLogger

public class NoBannerLogger extends DefaultLogger {

    /**
     * Name of the current target, if it should
     * be displayed on the next message. This is
     * set when a target starts building, and reset
     * to null after the first message for
     * the target is logged.
     */
    protected String targetName;

    /** Sole constructor. */
    public NoBannerLogger() {
    }

    /**
     * Notes the name of the target so it can be logged
     * if it generates any messages.
     *
     * @param event A BuildEvent containing target information.
     *              Must not be null.
     */
    public void targetStarted(BuildEvent event) {
        targetName = event.getTarget().getName();
    }

    /**
     * Resets the current target name to null.
     *
     * @param event Ignored in this implementation.
     */
    public void targetFinished(BuildEvent event) {
        targetName = null;
    }

    /**
     * Logs a message for a target if it is of an appropriate
     * priority, also logging the name of the target if this
     * is the first message which needs to be logged for the
     * target.
     *
     * @param event A BuildEvent containing message information.
     *              Must not be null.
     */
    public void messageLogged(BuildEvent event) {

        if (event.getPriority() > msgOutputLevel
            || null == event.getMessage()
            || "".equals(event.getMessage().trim())) {
                return;
        }

        if (null != targetName) {
            out.println(StringUtils.LINE_SEP + targetName + ":");
            targetName = null;
        }

        super.messageLogged(event);


final public class RootCategory extends Logger {

  /**
     The root category names itself as "root". However, the root
     category cannot be retrieved by name.
  */
  public
  RootCategory(Level level) {
    super("root");
    setLevel(level);
  }

  /**
     Return the assigned level value without walking the category
     hierarchy.
  */
  final
  public
  Level getChainedLevel() {
    return level;
  }

  /**
     Setting a null value to the level of the root category may have catastrophic
     results. We prevent this here.

     @since 0.8.3 */
  final
  public
  void setLevel(Level level) {
    if(level == null) {
      LogLog.error("You have tried to set a null level to root.",
		   new Throwable());
    }
    else {
      this.level = level;
    }
  }

  final
  public
  void setPriority(Level level) {
    setLevel(level);

  Level getChainedLevel() {
    return level;


org.apache.camel.Route

public class Route<E extends Exchange> {
    public static final String ID_PROPERTY = "id";
    public static final String PARENT_PROPERTY = "parent";
    public static final String GROUP_PROPERTY = "group";

    private final Map<String, Object> properties = new HashMap<String, Object>(16);
    private Endpoint<E> endpoint;
    private List<Service> services = new ArrayList<Service>();

    public Route(Endpoint<E> endpoint) {
        this.endpoint = endpoint;
    }

    public Route(Endpoint<E> endpoint, Service... services) {
        this(endpoint);
        for (Service service : services) {
            addService(service);
        }
    }

    @Override
    public String toString() {
        return "Route";
    }

    public Endpoint<E> getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(Endpoint<E> endpoint) {
        this.endpoint = endpoint;
    }

    /**
     * This property map is used to associate information about
     * the route.
     */
    public Map<String, Object> getProperties() {
        return properties;
    }

    public List<Service> getServicesForRoute() throws Exception {
        List<Service> servicesForRoute = new ArrayList<Service>(getServices());
        addServices(servicesForRoute);
        return servicesForRoute;
    }

    /**
     * Returns the additional services required for this particular route
     */
    public List<Service> getServices() {
        return services;
    }

    public void setServices(List<Service> services) {
        this.services = services;
    }

    public void addService(Service service) {
        getServices().add(service);
    }

    /**
     * Strategy method to allow derived classes to lazily load services for the route
     */
    protected void addServices(List<Service> services) throws Exception {

FUNC_DECL RETURN VAR_DECL CALL CALL CALL


public class TTCCLayout extends DateLayout {

  // Internal representation of options
  private boolean threadPrinting    = true;
  private boolean categoryPrefixing = true;
  private boolean contextPrinting   = true;

  protected final StringBuffer buf = new StringBuffer(256);

  /**
     Instantiate a TTCCLayout object with {@link
     org.apache.log4j.helpers.RelativeTimeDateFormat} as the date
     formatter in the local time zone.

     @since 0.7.5 */
  public TTCCLayout() {
    this.setDateFormat(RELATIVE_TIME_DATE_FORMAT, null);
  }

  /**
     Instantiate a TTCCLayout object using the local time zone. The
     DateFormat used will depend on the dateFormatType.

This constructor just calls the {@link
     DateLayout#setDateFormat} method.

     */
  public TTCCLayout(String dateFormatType) {
    this.setDateFormat(dateFormatType);
  }

  /**
     The ThreadPrinting option specifies whether the name of the
     current thread is part of log output or not. This is true by default.
   */
  public
  void setThreadPrinting(boolean threadPrinting) {
    this.threadPrinting = threadPrinting;
  }

  /**
     Returns value of the ThreadPrinting option.
   */
  public
  boolean getThreadPrinting() {
    return threadPrinting;
  }

  /**
     The CategoryPrefixing option specifies whether {@link Category}
     name is part of log output or not. This is true by default.
   */
  public
  void setCategoryPrefixing(boolean categoryPrefixing) {
    this.categoryPrefixing = categoryPrefixing;
  }

  /**
     Returns value of the CategoryPrefixing option.
   */
  public
  boolean getCategoryPrefixing() {
    return categoryPrefixing;
  }

  /**
     The ContextPrinting option specifies log output will include
     the nested context information belonging to the current thread.
     This is true by default.
   */
  public
  void setContextPrinting(boolean contextPrinting) {
    this.contextPrinting = contextPrinting;
  }

  /**
     Returns value of the ContextPrinting option.
   */
  public
  boolean getContextPrinting() {
    return contextPrinting;
  }

  /**
   In addition to the level of the statement and message, the
   returned byte array includes time, thread, category and {@link NDC}
   information.

Time, thread, category and diagnostic context are printed
   depending on options.

    @param event The event to format

  */
  public
  String format(LoggingEvent event) {

    // Reset buf
    buf.setLength(0);

    dateFormat(buf, event);

    if(this.threadPrinting) {
      buf.append('[');
      buf.append(event.getThreadName());
      buf.append("] ");
    }
    buf.append(event.getLevel().toString());
    buf.append(' ');

    if(this.categoryPrefixing) {
      buf.append(event.getLoggerName());
      buf.append(' ');
    }

    if(this.contextPrinting) {
       String ndc = event.getNDC();

      if(ndc != null) {
	buf.append(ndc);
	buf.append(' ');
      }
    }
    buf.append("- ");
    buf.append(event.getRenderedMessage());
    buf.append(LINE_SEP);
    return buf.toString();
  }

 /**
     The TTCCLayout does not handle the throwable contained within
     {@link LoggingEvent LoggingEvents}. Thus, it returns
     true.

     @since version 0.8.4 */
  public
  boolean ignoresThrowable() {
    return true;

FUNC_DECL RETURN IF IF IF PARAM CALL CALL CALL CALL CALL CALL CALL CALL CALL LITERAL_ANCHOR IF VAR_DECL LITERAL_ANCHOR CALL LITERAL_ANCHOR BINARY_OP CALL CALL CALL CALL CALL CALL LITERAL_ANCHOR CALL LITERAL_ANCHOR CALL LITERAL_ANCHOR CALL LITERAL_ANCHOR CALL CALL LITERAL_ANCHOR


public class ValueRangeRecord
    extends Record
{
    public final static short      sid                             = 0x101f;
    private  double     field_1_minimumAxisValue;
    private  double     field_2_maximumAxisValue;
    private  double     field_3_majorIncrement;
    private  double     field_4_minorIncrement;
    private  double     field_5_categoryAxisCross;
    private  short      field_6_options;
    private BitField   automaticMinimum                           = new BitField(0x1);
    private BitField   automaticMaximum                           = new BitField(0x2);
    private BitField   automaticMajor                             = new BitField(0x4);
    private BitField   automaticMinor                             = new BitField(0x8);
    private BitField   automaticCategoryCrossing                  = new BitField(0x10);
    private BitField   logarithmicScale                           = new BitField(0x20);
    private BitField   valuesInReverse                            = new BitField(0x40);
    private BitField   crossCategoryAxisAtMaximum                 = new BitField(0x80);
    private BitField   reserved                                   = new BitField(0x100);

    public ValueRangeRecord()
    {

    }

    /**
     * Constructs a ValueRange record and sets its fields appropriately.
     *
     * @param id    id must be 0x101f or an exception
     *              will be throw upon validation
     * @param size  size the size of the data area of the record
     * @param data  data of the record (should not contain sid/len)
     */

    public ValueRangeRecord(short id, short size, byte [] data)
    {
        super(id, size, data);
    }

    /**
     * Constructs a ValueRange record and sets its fields appropriately.
     *
     * @param id    id must be 0x101f or an exception
     *              will be throw upon validation
     * @param size  size the size of the data area of the record
     * @param data  data of the record (should not contain sid/len)
     * @param offset of the record's data
     */

    public ValueRangeRecord(short id, short size, byte [] data, int offset)
    {
        super(id, size, data, offset);
    }

    /**
     * Checks the sid matches the expected side for this record
     *
     * @param id   the expected sid.
     */
    protected void validateSid(short id)
    {
        if (id != sid)
        {
            throw new RecordFormatException("Not a ValueRange record");
        }
    }

    protected void fillFields(byte [] data, short size, int offset)
    {
        field_1_minimumAxisValue        = LittleEndian.getDouble(data, 0x0 + offset);
        field_2_maximumAxisValue        = LittleEndian.getDouble(data, 0x8 + offset);
        field_3_majorIncrement          = LittleEndian.getDouble(data, 0x10 + offset);
        field_4_minorIncrement          = LittleEndian.getDouble(data, 0x18 + offset);
        field_5_categoryAxisCross       = LittleEndian.getDouble(data, 0x20 + offset);
        field_6_options                 = LittleEndian.getShort(data, 0x28 + offset);

    }

    public String toString()
    {
        StringBuffer buffer = new StringBuffer();

        buffer.append("[ValueRange]\n");

        buffer.append("    .minimumAxisValue     = ")
            .append(" (").append(getMinimumAxisValue()).append(" )\n");

        buffer.append("    .maximumAxisValue     = ")
            .append(" (").append(getMaximumAxisValue()).append(" )\n");

        buffer.append("    .majorIncrement       = ")
            .append(" (").append(getMajorIncrement()).append(" )\n");

        buffer.append("    .minorIncrement       = ")
            .append(" (").append(getMinorIncrement()).append(" )\n");

        buffer.append("    .categoryAxisCross    = ")
            .append(" (").append(getCategoryAxisCross()).append(" )\n");

        buffer.append("    .options              = ")
            .append("0x")
            .append(HexDump.toHex((short)getOptions()))
            .append(" (").append(getOptions()).append(" )\n");
        buffer.append("         .automaticMinimum         = ").append(isAutomaticMinimum    ()).append('\n');
        buffer.append("         .automaticMaximum         = ").append(isAutomaticMaximum    ()).append('\n');
        buffer.append("         .automaticMajor           = ").append(isAutomaticMajor      ()).append('\n');
        buffer.append("         .automaticMinor           = ").append(isAutomaticMinor      ()).append('\n');
        buffer.append("         .automaticCategoryCrossing     = ").append(isAutomaticCategoryCrossing()).append('\n');
        buffer.append("         .logarithmicScale         = ").append(isLogarithmicScale    ()).append('\n');
        buffer.append("         .valuesInReverse          = ").append(isValuesInReverse     ()).append('\n');
        buffer.append("         .crossCategoryAxisAtMaximum     = ").append(isCrossCategoryAxisAtMaximum()).append('\n');
        buffer.append("         .reserved                 = ").append(isReserved            ()).append('\n');

        buffer.append("[/ValueRange]\n");
        return buffer.toString();
    }

    public int serialize(int offset, byte[] data)
    {
        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));

        LittleEndian.putDouble(data, 4 + offset, field_1_minimumAxisValue);
        LittleEndian.putDouble(data, 12 + offset, field_2_maximumAxisValue);
        LittleEndian.putDouble(data, 20 + offset, field_3_majorIncrement);
        LittleEndian.putDouble(data, 28 + offset, field_4_minorIncrement);
        LittleEndian.putDouble(data, 36 + offset, field_5_categoryAxisCross);
        LittleEndian.putShort(data, 44 + offset, field_6_options);

        return getRecordSize();
    }

    /**
     * Size of record (exluding 4 byte header)
     */
    public int getRecordSize()
    {
        return 4 + 8 + 8 + 8 + 8 + 8 + 2;
    }

    public short getSid()
    {
        return this.sid;
    }

    /**
     * Get the minimum axis value field for the ValueRange record.
     */
    public double getMinimumAxisValue()
    {
        return field_1_minimumAxisValue;
    }

    /**
     * Set the minimum axis value field for the ValueRange record.
     */
    public void setMinimumAxisValue(double field_1_minimumAxisValue)
    {
        this.field_1_minimumAxisValue = field_1_minimumAxisValue;
    }

    /**
     * Get the maximum axis value field for the ValueRange record.
     */
    public double getMaximumAxisValue()
    {
        return field_2_maximumAxisValue;
    }

    /**
     * Set the maximum axis value field for the ValueRange record.
     */
    public void setMaximumAxisValue(double field_2_maximumAxisValue)
    {
        this.field_2_maximumAxisValue = field_2_maximumAxisValue;
    }

    /**
     * Get the major increment field for the ValueRange record.
     */
    public double getMajorIncrement()
    {
        return field_3_majorIncrement;
    }

    /**
     * Set the major increment field for the ValueRange record.
     */
    public void setMajorIncrement(double field_3_majorIncrement)
    {
        this.field_3_majorIncrement = field_3_majorIncrement;
    }

    /**
     * Get the minor increment field for the ValueRange record.
     */
    public double getMinorIncrement()
    {
        return field_4_minorIncrement;
    }

    /**
     * Set the minor increment field for the ValueRange record.
     */
    public void setMinorIncrement(double field_4_minorIncrement)
    {
        this.field_4_minorIncrement = field_4_minorIncrement;
    }

    /**
     * Get the category axis cross field for the ValueRange record.
     */
    public double getCategoryAxisCross()
    {
        return field_5_categoryAxisCross;
    }

    /**
     * Set the category axis cross field for the ValueRange record.
     */
    public void setCategoryAxisCross(double field_5_categoryAxisCross)
    {
        this.field_5_categoryAxisCross = field_5_categoryAxisCross;
    }

    /**
     * Get the options field for the ValueRange record.
     */
    public short getOptions()
    {
        return field_6_options;
    }

    /**
     * Set the options field for the ValueRange record.
     */
    public void setOptions(short field_6_options)
    {
        this.field_6_options = field_6_options;
    }

    /**
     * Sets the automatic minimum field value.
     * automatic minimum value selected
     */
    public void setAutomaticMinimum(boolean value)
    {
        field_6_options = automaticMinimum.setShortBoolean(field_6_options, value);
    }

    /**
     * automatic minimum value selected
     * @return  the automatic minimum field value.
     */
    public boolean isAutomaticMinimum()
    {
        return automaticMinimum.isSet(field_6_options);
    }

    /**
     * Sets the automatic maximum field value.
     * automatic maximum value selected
     */
    public void setAutomaticMaximum(boolean value)
    {
        field_6_options = automaticMaximum.setShortBoolean(field_6_options, value);
    }

    /**
     * automatic maximum value selected
     * @return  the automatic maximum field value.
     */
    public boolean isAutomaticMaximum()
    {
        return automaticMaximum.isSet(field_6_options);
    }

    /**
     * Sets the automatic major field value.
     * automatic major unit selected
     */
    public void setAutomaticMajor(boolean value)
    {
        field_6_options = automaticMajor.setShortBoolean(field_6_options, value);
    }

    /**
     * automatic major unit selected
     * @return  the automatic major field value.
     */
    public boolean isAutomaticMajor()
    {
        return automaticMajor.isSet(field_6_options);
    }

    /**
     * Sets the automatic minor field value.
     * automatic minor unit selected
     */
    public void setAutomaticMinor(boolean value)
    {
        field_6_options = automaticMinor.setShortBoolean(field_6_options, value);
    }

    /**
     * automatic minor unit selected
     * @return  the automatic minor field value.
     */
    public boolean isAutomaticMinor()
    {
        return automaticMinor.isSet(field_6_options);
    }

    /**
     * Sets the automatic category crossing field value.
     * category crossing point is automatically selected
     */
    public void setAutomaticCategoryCrossing(boolean value)
    {
        field_6_options = automaticCategoryCrossing.setShortBoolean(field_6_options, value);
    }

    /**
     * category crossing point is automatically selected
     * @return  the automatic category crossing field value.
     */
    public boolean isAutomaticCategoryCrossing()
    {
        return automaticCategoryCrossing.isSet(field_6_options);
    }

    /**
     * Sets the logarithmic scale field value.
     * use logarithmic scale
     */
    public void setLogarithmicScale(boolean value)
    {
        field_6_options = logarithmicScale.setShortBoolean(field_6_options, value);
    }

    /**
     * use logarithmic scale
     * @return  the logarithmic scale field value.
     */
    public boolean isLogarithmicScale()
    {
        return logarithmicScale.isSet(field_6_options);
    }

    /**
     * Sets the values in reverse field value.
     * values are reverses in graph
     */
    public void setValuesInReverse(boolean value)
    {
        field_6_options = valuesInReverse.setShortBoolean(field_6_options, value);
    }

    /**
     * values are reverses in graph
     * @return  the values in reverse field value.
     */
    public boolean isValuesInReverse()
    {
        return valuesInReverse.isSet(field_6_options);
    }

    /**
     * Sets the cross category axis at maximum field value.
     * category axis to cross at maximum value
     */
    public void setCrossCategoryAxisAtMaximum(boolean value)
    {
        field_6_options = crossCategoryAxisAtMaximum.setShortBoolean(field_6_options, value);
    }

    /**
     * category axis to cross at maximum value
     * @return  the cross category axis at maximum field value.
     */
    public boolean isCrossCategoryAxisAtMaximum()
    {
        return crossCategoryAxisAtMaximum.isSet(field_6_options);
    }

    /**
     * Sets the reserved field value.
     * reserved, must equal 1 (excel dev. guide says otherwise)
     */
    public void setReserved(boolean value)
    {
        field_6_options = reserved.setShortBoolean(field_6_options, value);
    }

    /**
     * reserved, must equal 1 (excel dev. guide says otherwise)
     * @return  the reserved field value.
     */
    public boolean isReserved()
    {
        return reserved.isSet(field_6_options);


org.apache.poi.hssf.util.CellReference

public class CellReference {

    /** Creates new CellReference */
    private int row;
    private int col;
    private String sheetName;
    private boolean rowAbs;
    private boolean colAbs;

    public CellReference(String cellRef) {
        String[] parts = separateRefParts(cellRef);
        sheetName = parts[0];
        String ref = parts[1];
        if (ref.charAt(0) == '$') {
            colAbs=true;
            ref=ref.substring(1);
        }
        col = convertColStringToNum(ref);
        ref=parts[2];
        if (ref.charAt(0) == '$') {
            rowAbs=true;
            ref=ref.substring(1);
        }
        row = Integer.parseInt(ref)-1;
    }

    public CellReference(int pRow, int pCol) {
        this(pRow,pCol,false,false);
    }

    public CellReference(int pRow, int pCol, boolean pAbsRow, boolean pAbsCol) {
        row=pRow;col=pCol;
        rowAbs = pAbsRow;
        colAbs=pAbsCol;

    }

    public int getRow(){return row;}
    public short getCol(){return (short) col;}
    public boolean isRowAbsolute(){return rowAbs;}
    public boolean isColAbsolute(){return colAbs;}
    public String getSheetName(){return sheetName;}

    /**
     * takes in a column reference portion of a CellRef and converts it from
     * ALPHA-26 number format to 0-based base 10.
     */
    private int convertColStringToNum(String ref) {
        int len = ref.length();
        int retval=0;
        int pos = 0;

        for (int k = ref.length()-1; k > -1; k--) {
            char thechar = ref.charAt(k);
            if ( pos == 0) {
                retval += (Character.getNumericValue(thechar)-9);
            } else {
                retval += (Character.getNumericValue(thechar)-9) * (pos * 26);
            }
            pos++;
        }
        return retval-1;
    }

    /**
     * Seperates the row from the columns and returns an array.  Element in
     * position one is the substring containing the columns still in ALPHA-26
     * number format.
     */
    private String[] separateRefParts(String reference) {

        String retval[] = new String[3];

        int start = reference.indexOf("!");
        if (start != -1) retval[0] = reference.substring(0, start);
        start += 1;

        int length = reference.length();

        char[] chars = reference.toCharArray();
        int loc = start;
        if (chars[loc]=='$') loc++;
        for (; loc < chars.length; loc++) {
            if (Character.isDigit(chars[loc]) || chars[loc] == '$') {
                break;
            }
        }

        retval[1] = reference.substring(start,loc);
        retval[2] = reference.substring(loc);
        return retval;
    }

    /**
     * takes in a 0-based base-10 column and returns a ALPHA-26 representation
     */
    private static String convertNumToColString(int col) {
        String retval = null;
        int mod = col % 26;
        int div = col / 26;
        char small=(char)(mod + 65);
        char big = (char)(div + 64);

        if (div == 0) {
            retval = ""+small;
        } else {
            retval = ""+big+""+small;
        }

        return retval;
    }

    public String toString() {
        StringBuffer retval = new StringBuffer();
        retval.append( (colAbs)?"$":"");
        retval.append( convertNumToColString(col));
        retval.append((rowAbs)?"$":"");
        retval.append(row+1);

    return retval.toString();

FUNC_DECL PARAM PARAM PARAM PARAM ASSIGN ASSIGN ASSIGN ASSIGN


public class NoPropertySetStreamException extends HPSFException
{

    /**
     *
Constructor

     */
    public NoPropertySetStreamException()
    {
        super();
    }

    /**
     *
Constructor

     *
     * @param msg The exception's message string
     */
    public NoPropertySetStreamException(final String msg)
    {
        super(msg);
    }

    /**
     *
Constructor

     *
     * @param reason This exception's underlying reason
     */
    public NoPropertySetStreamException(final Throwable reason)
    {
        super(reason);
    }

    /**
     *
Constructor

     *
     * @param msg The exception's message string
     * @param reason This exception's underlying reason
     */
    public NoPropertySetStreamException(final String msg,
                                        final Throwable reason)
    {
        super(msg, reason);


org.apache.ivy.util.filter.AndFilter

public class AndFilter implements Filter {
    private Filter op1;

    private Filter op2;

    public AndFilter(Filter op1, Filter op2) {
        this.op1 = op1;
        this.op2 = op2;
    }

    public Filter getOp1() {
        return op1;
    }

    public Filter getOp2() {
        return op2;
    }

    public boolean accept(Object o) {
        return op1.accept(o) && op2.accept(o);

    public Filter getOp1() {
        return op1;

    public Filter getOp2() {
        return op2;

FUNC_DECL RETURN PARAM BINARY_OP CALL CALL


public class FtpOperationFailedException extends RuntimeCamelException {
    private final int code;
    private final String reason;

    public FtpOperationFailedException(int code, String reason) {
        super("Ftp operation failed: " + reason + ". Code: " + code);
        this.code = code;
        this.reason = reason;
    }

    public FtpOperationFailedException(int code, String reason, String message) {
        this(code, reason + " " + message);
    }

    /**
     * Return the FTP failure code
     */
    public int getCode() {
        return code;
    }

    /**
     * Return the FTP failure reason
     */
    public String getReason() {
        return reason;

    public int getCode() {
        return code;