bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
|---|---|---|
public IRubyObject newMethod(IRubyObject receiver, String name, boolean bound) { ICallable method = searchMethod(name); if (method.isUndefined()) { throw getRuntime().newNameError("undefined method `" + name + "' for class `" + this.getName() + "'"); } RubyMethod newMethod = null; if (bound) { newMethod = RubyMethod.newMethod(method.getImplementationClass(), name, this, name, method, receiver); } else { newMethod = RubyUnboundMethod.newUnboundMethod(method.getImplementationClass(), name, this, name, method); } newMethod.infectBy(this); return newMethod; }
|
public IRubyObject newMethod(IRubyObject receiver, String name, boolean bound) { ICallable method = searchMethod(name); if (method.isUndefined()) { throw getRuntime().newNameError("undefined method `" + name + "' for class `" + this.getName() + "'"); } RubyMethod newMethod = null; if (bound) { newMethod = RubyMethod.newMethod(method.getImplementationClass(), name, this, name, method, receiver); } else { newMethod = RubyUnboundMethod.newUnboundMethod(method.getImplementationClass(), name, this, name, method); } newMethod.infectBy(this); return newMethod; }
| 3,237,253
|
public IRubyObject op_cmp(IRubyObject obj) { if (this == obj) { return getRuntime().newFixnum(0); } if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError( "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } RubyModule module = (RubyModule)obj; if (module.isKindOfModule(this)) { return getRuntime().newFixnum(1); } else if (this.isKindOfModule(module)) { return getRuntime().newFixnum(-1); } return getRuntime().getNil(); }
|
public IRubyObject op_cmp(IRubyObject obj) { if (this == obj) { return getRuntime().newFixnum(0); } if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError( "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } RubyModule module = (RubyModule)obj; if (module.isKindOfModule(this)) { return getRuntime().newFixnum(1); } else if (this.isKindOfModule(module)) { return getRuntime().newFixnum(-1); } return getRuntime().getNil(); }
| 3,237,254
|
public IRubyObject op_cmp(IRubyObject obj) { if (this == obj) { return getRuntime().newFixnum(0); } if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError( "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } RubyModule module = (RubyModule)obj; if (module.isKindOfModule(this)) { return getRuntime().newFixnum(1); } else if (this.isKindOfModule(module)) { return getRuntime().newFixnum(-1); } return getRuntime().getNil(); }
|
public IRubyObject op_cmp(IRubyObject obj) { if (this == obj) { return getRuntime().newFixnum(0); } if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError( "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } RubyModule module = (RubyModule)obj; if (module.isKindOfModule(this)) { return getRuntime().newFixnum(1); } else if (this.isKindOfModule(module)) { return getRuntime().newFixnum(-1); } return getRuntime().getNil(); }
| 3,237,255
|
public IRubyObject op_cmp(IRubyObject obj) { if (this == obj) { return getRuntime().newFixnum(0); } if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError( "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } RubyModule module = (RubyModule)obj; if (module.isKindOfModule(this)) { return getRuntime().newFixnum(1); } else if (this.isKindOfModule(module)) { return getRuntime().newFixnum(-1); } return getRuntime().getNil(); }
|
public IRubyObject op_cmp(IRubyObject obj) { if (this == obj) { return getRuntime().newFixnum(0); } if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError( "<=> requires Class or Module (" + getMetaClass().getName() + " given)"); } RubyModule module = (RubyModule)obj; if (module.isKindOfModule(this)) { return getRuntime().newFixnum(1); } else if (this.isKindOfModule(module)) { return getRuntime().newFixnum(-1); } return getRuntime().getNil(); }
| 3,237,256
|
public IRubyObject op_le(IRubyObject obj) { if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError("compared with non class/module"); } if (isKindOfModule((RubyModule)obj)) { return getRuntime().getTrue(); } else if (((RubyModule)obj).isKindOfModule(this)) { return getRuntime().getFalse(); } return getRuntime().getNil(); }
|
public IRubyObject op_le(IRubyObject obj) { if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError("compared with non class/module"); } if (isKindOfModule((RubyModule)obj)) { return getRuntime().getTrue(); } else if (((RubyModule)obj).isKindOfModule(this)) { return getRuntime().getFalse(); } return getRuntime().getNil(); }
| 3,237,257
|
public IRubyObject op_le(IRubyObject obj) { if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError("compared with non class/module"); } if (isKindOfModule((RubyModule)obj)) { return getRuntime().getTrue(); } else if (((RubyModule)obj).isKindOfModule(this)) { return getRuntime().getFalse(); } return getRuntime().getNil(); }
|
public IRubyObject op_le(IRubyObject obj) { if (!(obj instanceof RubyModule)) { throw getRuntime().newTypeError("compared with non class/module"); } if (isKindOfModule((RubyModule)obj)) { return getRuntime().getTrue(); } else if (((RubyModule)obj).isKindOfModule(this)) { return getRuntime().getFalse(); } return getRuntime().getNil(); }
| 3,237,258
|
public IRubyObject op_lt(IRubyObject obj) { return obj == this ? getRuntime().getFalse() : op_le(obj); }
|
public IRubyObject op_lt(IRubyObject obj) { return obj == this ? getRuntime().getFalse() : op_le(obj); }
| 3,237,259
|
public RubyArray public_instance_methods(IRubyObject[] args) { return instance_methods(args, Visibility.PUBLIC); }
|
public RubyArray public_instance_methods(IRubyObject[] args) { return instance_methods(args, Visibility.PUBLIC); }
| 3,237,260
|
public void removeCachedMethod(String name) { getMethods().remove(name); }
|
public void removeCachedMethod(String name) { getMethods().remove(name); }
| 3,237,261
|
public IRubyObject removeCvar(IRubyObject name) { // Wrong Parameter ? if (!IdUtil.isClassVariable(name.asSymbol())) { throw getRuntime().newNameError("wrong class variable name " + name.asSymbol()); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject value = removeInstanceVariable(name.asSymbol()); if (value != null) { return value; } if (isClassVarDefined(name.asSymbol())) { throw getRuntime().newNameError("cannot remove " + name.asSymbol() + " for " + getName()); } throw getRuntime().newNameError("class variable " + name.asSymbol() + " not defined for " + getName()); }
|
public IRubyObject removeCvar(IRubyObject name) { // Wrong Parameter ? if (!IdUtil.isClassVariable(name.asSymbol())) { throw getRuntime().newNameError("wrong class variable name " + name.asSymbol(), name.asSymbol()); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject value = removeInstanceVariable(name.asSymbol()); if (value != null) { return value; } if (isClassVarDefined(name.asSymbol())) { throw getRuntime().newNameError("cannot remove " + name.asSymbol() + " for " + getName()); } throw getRuntime().newNameError("class variable " + name.asSymbol() + " not defined for " + getName()); }
| 3,237,262
|
public IRubyObject removeCvar(IRubyObject name) { // Wrong Parameter ? if (!IdUtil.isClassVariable(name.asSymbol())) { throw getRuntime().newNameError("wrong class variable name " + name.asSymbol()); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject value = removeInstanceVariable(name.asSymbol()); if (value != null) { return value; } if (isClassVarDefined(name.asSymbol())) { throw getRuntime().newNameError("cannot remove " + name.asSymbol() + " for " + getName()); } throw getRuntime().newNameError("class variable " + name.asSymbol() + " not defined for " + getName()); }
|
public IRubyObject removeCvar(IRubyObject name) { // Wrong Parameter ? if (!IdUtil.isClassVariable(name.asSymbol())) { throw getRuntime().newNameError("wrong class variable name " + name.asSymbol()); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject value = removeInstanceVariable(name.asSymbol()); if (value != null) { return value; } if (isClassVarDefined(name.asSymbol())) { throw cannotRemoveError(name.asSymbol()); } throw getRuntime().newNameError("class variable " + name.asSymbol() + " not defined for " + getName()); }
| 3,237,263
|
public IRubyObject removeCvar(IRubyObject name) { // Wrong Parameter ? if (!IdUtil.isClassVariable(name.asSymbol())) { throw getRuntime().newNameError("wrong class variable name " + name.asSymbol()); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject value = removeInstanceVariable(name.asSymbol()); if (value != null) { return value; } if (isClassVarDefined(name.asSymbol())) { throw getRuntime().newNameError("cannot remove " + name.asSymbol() + " for " + getName()); } throw getRuntime().newNameError("class variable " + name.asSymbol() + " not defined for " + getName()); }
|
public IRubyObject removeCvar(IRubyObject name) { // Wrong Parameter ? if (!IdUtil.isClassVariable(name.asSymbol())) { throw getRuntime().newNameError("wrong class variable name " + name.asSymbol()); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject value = removeInstanceVariable(name.asSymbol()); if (value != null) { return value; } if (isClassVarDefined(name.asSymbol())) { throw getRuntime().newNameError("cannot remove " + name.asSymbol() + " for " + getName()); } throw getRuntime().newNameError("class variable " + name.asSymbol() + " not defined for " + getName(), name.asSymbol()); }
| 3,237,264
|
public void removeMethod(String name) { if (this == getRuntime().getObject()) { getRuntime().secure(4); } if (getRuntime().getSafeLevel() >= 4 && !isTaint()) { throw getRuntime().newSecurityError("Insecure: can't remove method"); } testFrozen("class/module"); // We can safely reference methods here instead of doing getMethods() since if we // are adding we are not using a IncludedModuleWrapper. synchronized(getMethods()) { ICallable method = (ICallable) getMethods().remove(name); if (method == null) { throw getRuntime().newNameError("method '" + name + "' not defined in " + getName()); } getRuntime().getCacheMap().remove(name, method); } }
|
public void removeMethod(String name) { if (this == getRuntime().getObject()) { getRuntime().secure(4); } if (getRuntime().getSafeLevel() >= 4 && !isTaint()) { throw getRuntime().newSecurityError("Insecure: can't remove method"); } testFrozen("class/module"); // We can safely reference methods here instead of doing getMethods() since if we // are adding we are not using a IncludedModuleWrapper. synchronized(getMethods()) { ICallable method = (ICallable) getMethods().remove(name); if (method == null) { throw getRuntime().newNameError("method '" + name + "' not defined in " + getName(), name); } getRuntime().getCacheMap().remove(name, method); } }
| 3,237,265
|
public void removeMethod(String name) { if (this == getRuntime().getObject()) { getRuntime().secure(4); } if (getRuntime().getSafeLevel() >= 4 && !isTaint()) { throw getRuntime().newSecurityError("Insecure: can't remove method"); } testFrozen("class/module"); // We can safely reference methods here instead of doing getMethods() since if we // are adding we are not using a IncludedModuleWrapper. synchronized(getMethods()) { ICallable method = (ICallable) getMethods().remove(name); if (method == null) { throw getRuntime().newNameError("method '" + name + "' not defined in " + getName()); } getRuntime().getCacheMap().remove(name, method); } }
|
public void removeMethod(String name) { if (this == getRuntime().getObject()) { getRuntime().secure(4); } if (getRuntime().getSafeLevel() >= 4 && !isTaint()) { throw getRuntime().newSecurityError("Insecure: can't remove method"); } testFrozen("class/module"); // We can safely reference methods here instead of doing getMethods() since if we // are adding we are not using a IncludedModuleWrapper. synchronized(getMethods()) { ICallable method = (ICallable) getMethods().remove(name); if (method == null) { throw getRuntime().newNameError("method '" + name + "' not defined in " + getName()); } getRuntime().getCacheMap().remove(name, method); } }
| 3,237,266
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id, id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
| 3,237,267
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
| 3,237,268
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw cannotRemoveError(id); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
| 3,237,269
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName()); }
|
public IRubyObject remove_class_variable(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isClassVariable(id)) { throw getRuntime().newNameError("wrong class variable name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = removeInstanceVariable(id); if (variable != null) { return variable; } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("class variable " + id + " not defined for " + getName(), id); }
| 3,237,270
|
public IRubyObject remove_const(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isConstant(id)) { throw getRuntime().newNameError("wrong constant name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = getInstanceVariable(id); if (variable != null) { return removeInstanceVariable(id); } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("constant " + id + " not defined for " + getName()); }
|
public IRubyObject remove_const(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isConstant(id)) { throw wrongConstantNameError(id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = getInstanceVariable(id); if (variable != null) { return removeInstanceVariable(id); } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("constant " + id + " not defined for " + getName()); }
| 3,237,271
|
public IRubyObject remove_const(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isConstant(id)) { throw getRuntime().newNameError("wrong constant name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = getInstanceVariable(id); if (variable != null) { return removeInstanceVariable(id); } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("constant " + id + " not defined for " + getName()); }
|
public IRubyObject remove_const(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isConstant(id)) { throw getRuntime().newNameError("wrong constant name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = getInstanceVariable(id); if (variable != null) { return removeInstanceVariable(id); } if (isClassVarDefined(id)) { throw cannotRemoveError(id); } throw getRuntime().newNameError("constant " + id + " not defined for " + getName()); }
| 3,237,272
|
public IRubyObject remove_const(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isConstant(id)) { throw getRuntime().newNameError("wrong constant name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = getInstanceVariable(id); if (variable != null) { return removeInstanceVariable(id); } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("constant " + id + " not defined for " + getName()); }
|
public IRubyObject remove_const(IRubyObject name) { String id = name.asSymbol(); if (!IdUtil.isConstant(id)) { throw getRuntime().newNameError("wrong constant name " + id); } if (!isTaint() && getRuntime().getSafeLevel() >= 4) { throw getRuntime().newSecurityError("Insecure: can't remove class variable"); } testFrozen("class/module"); IRubyObject variable = getInstanceVariable(id); if (variable != null) { return removeInstanceVariable(id); } if (isClassVarDefined(id)) { throw getRuntime().newNameError("cannot remove " + id + " for " + getName()); } throw getRuntime().newNameError("constant " + id + " not defined for " + getName(), id); }
| 3,237,273
|
public ICallable searchMethod(String name) { for (RubyModule searchModule = this; searchModule != null; searchModule = searchModule.getSuperClass()) { // included modules use delegates methods for we need to synchronize on result of getMethods synchronized(searchModule.getMethods()) { // See if current class has method or if it has been cached here already ICallable method = (ICallable) searchModule.getMethods().get(name); if (method != null) { if (searchModule != this) { addCachedMethod(name, method); } return method; } } } return UndefinedMethod.getInstance(); }
|
public ICallable searchMethod(String name) { for (RubyModule searchModule = this; searchModule != null; searchModule = searchModule.getSuperClass()) { // included modules use delegates methods for we need to synchronize on result of getMethods synchronized(searchModule.getMethods()) { // See if current class has method or if it has been cached here already ICallable method = (ICallable) searchModule.getMethods().get(name); if (method != null) { if (searchModule != this) { addCachedMethod(name, method); } return method; } } } return UndefinedMethod.getInstance(); }
| 3,237,274
|
public IRubyObject setClassVar(String name, IRubyObject value) { RubyModule module = getModuleWithInstanceVar(name); if (module == null) { module = this; } return module.setInstanceVariable(name, value, CVAR_TAINT_ERROR, CVAR_FREEZE_ERROR); }
|
public IRubyObject setClassVar(String name, IRubyObject value) { RubyModule module = getModuleWithInstanceVar(name); if (module == null) { module = this; } return module.setInstanceVariable(name, value, CVAR_TAINT_ERROR, CVAR_FREEZE_ERROR); }
| 3,237,275
|
public IRubyObject setConstant(String name, IRubyObject value) { IRubyObject result = setInstanceVariable(name, value, "Insecure: can't set constant", "class/module"); // if adding a module under a constant name, set that module's basename to the constant name if (value instanceof RubyModule) { RubyModule module = (RubyModule)value; if (module.getBaseName() == null) { module.setBaseName(name); module.setParent(this); } /* module.setParent(this); */ } return result; }
|
public IRubyObject setConstant(String name, IRubyObject value) { IRubyObject result = setInstanceVariable(name, value, "Insecure: can't set constant", "class/module"); // if adding a module under a constant name, set that module's basename to the constant name if (value instanceof RubyModule) { RubyModule module = (RubyModule)value; if (module.getBaseName() == null) { module.setBaseName(name); module.setParent(this); } /* module.setParent(this); */ } return result; }
| 3,237,276
|
public IRubyObject setConstant(String name, IRubyObject value) { IRubyObject result = setInstanceVariable(name, value, "Insecure: can't set constant", "class/module"); // if adding a module under a constant name, set that module's basename to the constant name if (value instanceof RubyModule) { RubyModule module = (RubyModule)value; if (module.getBaseName() == null) { module.setBaseName(name); module.setParent(this); } /* module.setParent(this); */ } return result; }
|
public IRubyObject setConstant(String name, IRubyObject value) { IRubyObject result = setInstanceVariable(name, value, "Insecure: can't set constant", "class/module"); // if adding a module under a constant name, set that module's basename to the constant name if (value instanceof RubyModule) { RubyModule module = (RubyModule)value; if (module.getBaseName() == null) { module.setBaseName(name); module.setParent(this); } /* module.setParent(this); */ } return result; }
| 3,237,277
|
public void undef(String name) { IRuby runtime = getRuntime(); if (this == runtime.getObject()) { runtime.secure(4); } if (runtime.getSafeLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen("module"); if (name.equals("__id__") || name.equals("__send__")) { getRuntime().getWarnings().warn("undefining `"+ name +"' may cause serious problem"); } ICallable method = searchMethod(name); if (method.isUndefined()) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { IRubyObject obj = getInstanceVariable("__attached__"); if (obj != null && obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw getRuntime().newNameError("Undefined method " + name + " for" + s0 + " '" + c.getName() + "'"); } addMethod(name, UndefinedMethod.getInstance()); }
|
public void undef(String name) { IRuby runtime = getRuntime(); if (this == runtime.getObject()) { runtime.secure(4); } if (runtime.getSafeLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen("module"); if (name.equals("__id__") || name.equals("__send__")) { getRuntime().getWarnings().warn("undefining `"+ name +"' may cause serious problem"); } ICallable method = searchMethod(name); if (method.isUndefined()) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { IRubyObject obj = getInstanceVariable("__attached__"); if (obj != null && obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw getRuntime().newNameError("Undefined method " + name + " for" + s0 + " '" + c.getName() + "'", name); } addMethod(name, UndefinedMethod.getInstance()); }
| 3,237,278
|
public static RubyModule unmarshalFrom(UnmarshalStream input) throws java.io.IOException { String name = input.unmarshalString(); IRuby runtime = input.getRuntime(); RubyModule result = runtime.getClassFromPath(name); if (result == null) { throw runtime.newNameError("uninitialized constant " + name); } input.registerLinkTarget(result); return result; }
|
public static RubyModule unmarshalFrom(UnmarshalStream input) throws java.io.IOException { String name = input.unmarshalString(); IRuby runtime = input.getRuntime(); RubyModule result = runtime.getClassFromPath(name); if (result == null) { throw runtime.newNameError("uninitialized constant " + name, name); } input.registerLinkTarget(result); return result; }
| 3,237,279
|
public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod()); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getMethod(RubyObject.class, "respond_to", RubyObject.class)); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", RubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod()); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); Ruby ruby = objectClass.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); }
|
public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod(1)); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getMethod(RubyObject.class, "respond_to", RubyObject.class)); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", RubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod()); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); Ruby ruby = objectClass.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); }
| 3,237,280
|
public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod()); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getMethod(RubyObject.class, "respond_to", RubyObject.class)); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", RubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod()); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); Ruby ruby = objectClass.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); }
|
public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod()); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getOptMethod(RubyObject.class, "respond_to")); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", RubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod()); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); Ruby ruby = objectClass.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); }
| 3,237,281
|
public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod()); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getMethod(RubyObject.class, "respond_to", RubyObject.class)); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", RubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod()); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); Ruby ruby = objectClass.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); }
|
public static void createObjectClass(RubyModule objectClass) { objectClass.defineMethod("==", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("=~", CallbackFactory.getFalseMethod()); objectClass.defineMethod("clone", CallbackFactory.getMethod(RubyObject.class, "rbClone")); objectClass.defineMethod("dup", CallbackFactory.getMethod(RubyObject.class, "dup")); objectClass.defineMethod("eql?", CallbackFactory.getMethod(RubyObject.class, "equal", RubyObject.class)); objectClass.defineMethod("respond_to?", CallbackFactory.getMethod(RubyObject.class, "respond_to", RubyObject.class)); objectClass.defineMethod("extend", CallbackFactory.getOptMethod(RubyObject.class, "extend")); objectClass.defineMethod("freeze", CallbackFactory.getMethod(RubyObject.class, "freeze")); objectClass.defineMethod("frozen?", CallbackFactory.getMethod(RubyObject.class, "frozen")); objectClass.defineMethod("id", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("hash", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("__id__", CallbackFactory.getMethod(RubyObject.class, "id")); objectClass.defineMethod("inspect", CallbackFactory.getMethod(RubyObject.class, "inspect")); objectClass.defineMethod("instance_eval", CallbackFactory.getOptMethod(RubyObject.class, "instance_eval")); objectClass.defineMethod("instance_of?", CallbackFactory.getMethod(RubyObject.class, "instance_of", RubyModule.class)); objectClass.defineMethod("instance_variables", CallbackFactory.getMethod(RubyObject.class, "instance_variables")); objectClass.defineMethod("is_a?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("kind_of?", CallbackFactory.getMethod(RubyObject.class, "kind_of", RubyModule.class)); objectClass.defineMethod("method", CallbackFactory.getMethod(RubyObject.class, "method", RubyObject.class)); objectClass.defineMethod("methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("nil?", CallbackFactory.getFalseMethod(0)); objectClass.defineMethod("private_methods", CallbackFactory.getMethod(RubyObject.class, "private_methods")); objectClass.defineMethod("protected_methods", CallbackFactory.getMethod(RubyObject.class, "protected_methods")); objectClass.defineMethod("public_methods", CallbackFactory.getMethod(RubyObject.class, "methods")); objectClass.defineMethod("send", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("__send__", CallbackFactory.getOptMethod(RubyObject.class, "send", RubyObject.class)); objectClass.defineMethod("taint", CallbackFactory.getMethod(RubyObject.class, "taint")); objectClass.defineMethod("tainted?", CallbackFactory.getMethod(RubyObject.class, "tainted")); objectClass.defineMethod("to_a", CallbackFactory.getMethod(RubyObject.class, "to_a")); objectClass.defineMethod("to_s", CallbackFactory.getMethod(RubyObject.class, "to_s")); objectClass.defineMethod("type", CallbackFactory.getMethod(RubyObject.class, "type")); objectClass.defineMethod("untaint", CallbackFactory.getMethod(RubyObject.class, "untaint")); objectClass.defineAlias("===", "=="); objectClass.defineAlias("class", "type"); objectClass.defineAlias("equal?", "=="); Ruby ruby = objectClass.getRuby(); ruby.defineGlobalFunction("method_missing", CallbackFactory.getOptMethod(RubyObject.class, "method_missing", RubyObject.class)); }
| 3,237,282
|
public RubyBoolean respond_to(RubyObject methodName) { String name; if (methodName instanceof RubySymbol) { name = ((RubySymbol) methodName).toId(); } else if (methodName instanceof RubyString) { name = ((RubyString) methodName).getValue(); } else { throw new ArgumentError(getRuby(), "not a symbol"); } //Look in cache CacheEntry ent = getRuby().getMethodCache().getEntry(getRubyClass(), name); if (ent != null) { //Check to see if it's private and we're not including privates(return false) //otherwise return true return ruby.getTrue(); } //Get from instance IMethod method = getRubyClass().searchMethod(name); if (method != null) { return ruby.getTrue(); } return ruby.getFalse(); }
|
public RubyBoolean respond_to(RubyObject methodName) { String name; if (methodName instanceof RubySymbol) { name = ((RubySymbol) methodName).toId(); } else if (methodName instanceof RubyString) { name = ((RubyString) methodName).getValue(); } else { throw new ArgumentError(getRuby(), "not a symbol"); } //Look in cache CacheEntry ent = getRuby().getMethodCache().getEntry(getRubyClass(), name); if (ent != null) { //Check to see if it's private and we're not including privates(return false) //otherwise return true return ruby.getTrue(); } //Get from instance IMethod method = getRubyClass().searchMethod(name); if (method != null) { return ruby.getTrue(); } return ruby.getFalse(); }
| 3,237,284
|
public boolean respondsTo(String methodName) { return respond_to(RubySymbol.newSymbol(getRuby(), methodName)).isTrue(); }
|
public boolean respondsTo(String methodName) { return respond_to(new RubyObject[]{RubySymbol.newSymbol(getRuby(), methodName)}).isTrue(); }
| 3,237,285
|
public void visitColon2Node(Colon2Node iVisited) { Node node = iVisited.getLeftNode(); // TODO: Made this more colon3 friendly because of cpath production // rule in grammar (it is convenient to think of them as the same thing // at a grammar level even though evaluation is). if (node == null) { result = runtime.getClasses().getObjectClass().getConstant(iVisited.getName()); } else { eval(iVisited.getLeftNode()); if (result instanceof RubyModule) { result = ((RubyModule) result).getConstant(iVisited.getName()); } else { result = result.callMethod(iVisited.getName()); } } }
|
public void visitColon2Node(Colon2Node iVisited) { Node node = iVisited.getLeftNode(); // TODO: Made this more colon3 friendly because of cpath production // rule in grammar (it is convenient to think of them as the same thing // at a grammar level even though evaluation is). if (node == null) { result = runtime.getClasses().getObjectClass().getConstant(iVisited.getName()); } else { eval(iVisited.getLeftNode()); if (result instanceof RubyModule) { result = ((RubyModule) result).getConstantAtOrConstantMissing(iVisited.getName()); } else { result = result.callMethod(iVisited.getName()); } } }
| 3,237,287
|
public void visitColon3Node(Colon3Node iVisited) { result = runtime.getClasses().getObjectClass().getConstant(iVisited.getName()); }
|
public void visitColon3Node(Colon3Node iVisited) { result = runtime.getClasses().getClass(iVisited.getName()); if (result == null) { result = runtime.getClasses().getObjectClass().getConstant(iVisited.getName()); } }
| 3,237,288
|
final public Broker getBroker() { // this method can be unsynch. because the broker manages its own // state, plus the only time the _broker will be shutdown or null // is after the last servlet has shutdown--so why would anyone be // accessing us then? if they do the _broker will throw exceptions // complaining that it has been shut down, or they'll get a null here. return _broker; }
|
final public Broker getBroker() { // this method can be unsynch. because the broker manages its own // state, plus the only time the _broker will be shutdown or null // is after the last servlet has shutdown--so why would anyone be // accessing us then? if they do the _broker will throw exceptions // complaining that it has been shut down, or they'll get a null here. return _broker; }
| 3,237,289
|
final public String getConfig(String key) throws NotFoundException { try { return (String) _broker.get("config", key); } catch (NotFoundException e) { throw e; } catch (ResourceException e) { throw new NotFoundException(e.toString(), e); } }
|
final public String getConfig(String key) throws NotFoundException { try { return (String) _broker.get("config", key); } catch (NotFoundException e) { throw e; } catch (ResourceException e) { throw new NotFoundException(e.toString(), e); } }
| 3,237,290
|
final public String getConfig(String key) throws NotFoundException { try { return (String) _broker.get("config", key); } catch (NotFoundException e) { throw e; } catch (ResourceException e) { throw new NotFoundException(e.toString(), e); } }
|
final public String getConfig(String key) throws NotFoundException { try { return (String) _broker.get("config", key); } catch (NotFoundException e) { throw e; } catch (ResourceException e) { throw new NotFoundException(e.toString(), e); } }
| 3,237,291
|
final public Template getTemplate(String key) throws ResourceException { return (Template) _tmplProvider.get(key); }
|
final public Template getTemplate(String key) throws ResourceException { return (Template) _tmplProvider.get(key); }
| 3,237,292
|
final public Template getTemplate(String key) throws ResourceException { return (Template) _tmplProvider.get(key); }
|
final public Template getTemplate(String key) throws ResourceException { return (Template) _tmplProvider.get(key); }
| 3,237,293
|
final public String getURL(String url) throws ResourceException { return (String) _urlProvider.get(url); }
|
final public String getURL(String url) throws ResourceException { return (String) _urlProvider.get(url); }
| 3,237,294
|
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); c.setPool(cpool); } else c.reinitialize(req, resp); return c; }
|
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); c.setPool(cpool); } else c.reinitialize(req, resp); return c; }
| 3,237,295
|
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); c.setPool(cpool); } else c.reinitialize(req, resp); return c; }
|
final public WebContext getWebContext(HttpServletRequest req, HttpServletResponse resp) { Pool cpool = (Pool) _webContextCache.get(); WebContext c = (WebContext) cpool.get(); if (c == null) { c = _webContext.newInstance(req,resp); c.setPool(cpool); } else c.reinitialize(req, resp); return c; }
| 3,237,296
|
final public void writeTemplate (String templateName, java.io.OutputStream out, Context context) throws java.io.IOException, ResourceException, PropertyException { writeTemplate (templateName, out, getConfig (WMConstants.TEMPLATE_OUTPUT_ENCODING), context); }
|
final public void writeTemplate (String templateName, java.io.OutputStream out, Context context) throws java.io.IOException, ResourceException, PropertyException { writeTemplate (templateName, out, getConfig (WMConstants.TEMPLATE_OUTPUT_ENCODING), context); }
| 3,237,297
|
public List childNodes() { return Collections.EMPTY_LIST; }
|
public List childNodes() { return EMPTY_LIST; }
| 3,237,299
|
protected void init () throws InitException { String eehClass; // Initialize the property operator cache _propertyOperators.init(this, _config); // Write out our properties as debug records if (_log.loggingDebug()) { String[] properties = _config.getKeys(); Arrays.sort(properties); for (int i = 0; i < properties.length; i++) { _log.debug("Property " + properties[i] + ": " + _config.getSetting(properties[i])); } } // set up profiling ProfileSystem ps = ProfileSystem.getInstance(); int pRate = _config.getIntegerSetting("Profile.rate", 0); int pTime = _config.getIntegerSetting("Profile.time", 60000); _log.debug("Profiling rate=" + pRate + " time=" + pTime); if ((pRate != 0) && (pTime != 0)) { _prof = ps.newProfileCategory(_name, pRate, pTime); _log.debug("ProfileSystem.newProfileCategory: " + _prof); } else { _prof = null; } if (_prof != null) { _log.notice("Profiling started: " + _prof); } else { _log.info("Profiling not started."); } // set up providers _config.processListSetting("Providers", new ProviderSettingHandler()); if (_providers.size() == 0) { _log.error("No Providers specified"); throw new InitException("No Providers specified in configuration"); } // load tools loadTools("Tools"); loadTools("WebContextTools"); eehClass = _config.getSetting("ExceptionHandler"); if (eehClass != null && !eehClass.equals("")) { try { _eeHandler = (EvaluationExceptionHandler) classForName(eehClass).newInstance(); } catch (Exception e) { _log.warning("Unable to instantiate exception handler of class " + eehClass + "; " + e); } } if (_eeHandler == null) { _eeHandler = new DefaultEvaluationExceptionHandler(); } _eeHandler.init(this, _config); // Initialize function map SubSettings fnSettings = new SubSettings(_config, "Functions"); String[] fns = fnSettings.getKeys(); for (int i = 0; fns != null && i < fns.length; i++) { String fn = fns[i]; String fnSetting = fnSettings.getSetting(fn); int lastDot = fnSetting.lastIndexOf('.'); if (lastDot == -1) { throw new IllegalArgumentException("Bad function declaration for " + fn + ": " + fnSetting + ". This setting must include full class name followed by a '.' and method name"); } String fnClassName = fnSetting.substring(0, lastDot); String fnMethName = fnSetting.substring(lastDot + 1); // function type may be static, instance, or factory. Default is static String fnType = _config.getSetting("Function." + fn + ".type", "static"); Object[] args = null; if ("factory".equals(fnType)) { //TODO: implement this!!! // get function from a factory method // declared class/method is the factory class/instance method // get the factory class method name //String factoryMeth = _config.getSetting("Function." + fn + ".factory.method"); } if (!"static".equals(fnType)) { // get arg string String argString = _config.getSetting("Function." + fn + ".args"); if (argString != null) { if (!argString.startsWith("[")) { argString = "[" + argString + "]"; } org.webmacro.engine.StringTemplate tmpl = new org.webmacro.engine.StringTemplate(this, "#set $args=" + argString); Context argContext = new Context(this); try { tmpl.evaluateAsString(argContext); } catch (Exception e) { _log.error("Unable to evaluate arguments to function " + fn + ". The specified string was " + argString + ".", e); } args = (Object[]) argContext.get("args"); _log.debug("Args for function " + fn + ": " + Arrays.asList(args)); } } Class c = null; try { c = Class.forName(fnClassName); } catch (Exception e) { _log.error("Unable to load class " + fnClassName + " for function " + fn, e); } Object o = c; try { if (c != null) { if ("instance".equals(fnType)) { // instantiate the class o = IntrospectionUtils.instantiate(c, args); } } MethodWrapper mw = new MethodWrapper(o, fnMethName); _functionMap.put(fn, mw); } catch (Exception e) { _log.error("Unable to instantiate the function " + fn + " using the supplied configuration.", e); } } }
|
protected void init () throws InitException { String eehClass; // Initialize the property operator cache _propertyOperators.init(this, _config); // Write out our properties as debug records if (_log.loggingDebug()) { String[] properties = _config.getKeys(); Arrays.sort(properties); for (int i = 0; i < properties.length; i++) { _log.debug("Property " + properties[i] + ": " + _config.getSetting(properties[i])); } } // set up profiling ProfileSystem ps = ProfileSystem.getInstance(); int pRate = _config.getIntegerSetting("Profile.rate", 0); int pTime = _config.getIntegerSetting("Profile.time", 60000); _log.debug("Profiling rate=" + pRate + " time=" + pTime); if ((pRate != 0) && (pTime != 0)) { _prof = ps.newProfileCategory(_name, pRate, pTime); _log.debug("ProfileSystem.newProfileCategory: " + _prof); } else { _prof = null; } if (_prof != null) { _log.notice("Profiling started: " + _prof); } else { _log.info("Profiling not started."); } // set up providers _config.processListSetting("Providers", new ProviderSettingHandler()); if (_providers.size() == 0) { _log.error("No Providers specified"); throw new InitException("No Providers specified in configuration"); } // load tools loadTools("ContextTools"); loadTools("WebContextTools"); eehClass = _config.getSetting("ExceptionHandler"); if (eehClass != null && !eehClass.equals("")) { try { _eeHandler = (EvaluationExceptionHandler) classForName(eehClass).newInstance(); } catch (Exception e) { _log.warning("Unable to instantiate exception handler of class " + eehClass + "; " + e); } } if (_eeHandler == null) { _eeHandler = new DefaultEvaluationExceptionHandler(); } _eeHandler.init(this, _config); // Initialize function map SubSettings fnSettings = new SubSettings(_config, "Functions"); String[] fns = fnSettings.getKeys(); for (int i = 0; fns != null && i < fns.length; i++) { String fn = fns[i]; String fnSetting = fnSettings.getSetting(fn); int lastDot = fnSetting.lastIndexOf('.'); if (lastDot == -1) { throw new IllegalArgumentException("Bad function declaration for " + fn + ": " + fnSetting + ". This setting must include full class name followed by a '.' and method name"); } String fnClassName = fnSetting.substring(0, lastDot); String fnMethName = fnSetting.substring(lastDot + 1); // function type may be static, instance, or factory. Default is static String fnType = _config.getSetting("Function." + fn + ".type", "static"); Object[] args = null; if ("factory".equals(fnType)) { //TODO: implement this!!! // get function from a factory method // declared class/method is the factory class/instance method // get the factory class method name //String factoryMeth = _config.getSetting("Function." + fn + ".factory.method"); } if (!"static".equals(fnType)) { // get arg string String argString = _config.getSetting("Function." + fn + ".args"); if (argString != null) { if (!argString.startsWith("[")) { argString = "[" + argString + "]"; } org.webmacro.engine.StringTemplate tmpl = new org.webmacro.engine.StringTemplate(this, "#set $args=" + argString); Context argContext = new Context(this); try { tmpl.evaluateAsString(argContext); } catch (Exception e) { _log.error("Unable to evaluate arguments to function " + fn + ". The specified string was " + argString + ".", e); } args = (Object[]) argContext.get("args"); _log.debug("Args for function " + fn + ": " + Arrays.asList(args)); } } Class c = null; try { c = Class.forName(fnClassName); } catch (Exception e) { _log.error("Unable to load class " + fnClassName + " for function " + fn, e); } Object o = c; try { if (c != null) { if ("instance".equals(fnType)) { // instantiate the class o = IntrospectionUtils.instantiate(c, args); } } MethodWrapper mw = new MethodWrapper(o, fnMethName); _functionMap.put(fn, mw); } catch (Exception e) { _log.error("Unable to instantiate the function " + fn + " using the supplied configuration.", e); } } }
| 3,237,300
|
public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } return globalProjectData; }
|
public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } return globalProjectData; }
| 3,237,301
|
public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } return globalProjectData; }
|
public static ProjectData getGlobalProjectData() { if (globalProjectData != null) return globalProjectData; File dataFile = CoverageDataFileHandler.getDefaultDataFile(); // Read projectData from the serialized file. if (dataFile.isFile()) { //System.out.println("Cobertura: Loading global project data from " + dataFile.getAbsolutePath()); globalProjectData = CoverageDataFileHandler .loadCoverageData(dataFile); } if (globalProjectData == null) { // We could not read from the serialized file, so create a new object. System.out.println("Cobertura: Coverage data file " + dataFile.getAbsolutePath() + " either does not exist or is not readable. Creating a new data file."); globalProjectData = new ProjectData(); // Add a hook to save the data when the JVM exits saveTimer = new SaveTimer(); Runtime.getRuntime().addShutdownHook(new Thread(saveTimer)); // Possibly also save the coverage data every x seconds? //Timer timer = new Timer(true); //timer.schedule(saveTimer, 100); } return globalProjectData; }
| 3,237,302
|
private RubyTime(IRuby runtime, RubyClass rubyClass) { super(runtime, rubyClass); }
|
public RubyTime(IRuby runtime, RubyClass rubyClass) { super(runtime, rubyClass); }
| 3,237,303
|
public RubyArray to_a() { return getRuntime().newArray(new IRubyObject[] { sec(), min(), hour(), mday(), month(), year(), wday(), yday(), isdst(), zone() }); }
|
public RubyArray to_a() { return getRuntime().newArray(new IRubyObject[] { sec(), min(), hour(), mday(), month(), year(), wday(), yday(), isdst(), zone() }); }
| 3,237,304
|
public Object evaluate (Context context) throws PropertyException { Object o = _object; // evaluate the _object reference down to its base object while (o instanceof Macro) o = ((Macro) o).evaluate(context); if (o == null) { // the Variable to check isn't in the Context. if (_required) { // but it should be throw new PropertyException .NoSuchVariableException(_object.getName()); } else { // but it's not required to be there, so get out now // can't check the type of a null object return null; } } // check it and throw if requried class isn't compatible // with class of specified object if (!_class.isAssignableFrom(o.getClass())) throw new PropertyException.InvalidTypeException(_object.getName(), _class); return null; }
|
public Object evaluate (Context context) throws PropertyException { Object o = _object; // evaluate the _object reference down to its base object while (o instanceof Macro && o != UndefinedMacro.getInstance()) o = ((Macro) o).evaluate(context); if (o == null) { // the Variable to check isn't in the Context. if (_required) { // but it should be throw new PropertyException .NoSuchVariableException(_object.getName()); } else { // but it's not required to be there, so get out now // can't check the type of a null object return null; } } // check it and throw if requried class isn't compatible // with class of specified object if (!_class.isAssignableFrom(o.getClass())) throw new PropertyException.InvalidTypeException(_object.getName(), _class); return null; }
| 3,237,306
|
public Object evaluate (Context context) throws PropertyException { Object o = _object; // evaluate the _object reference down to its base object while (o instanceof Macro) o = ((Macro) o).evaluate(context); if (o == null) { // the Variable to check isn't in the Context. if (_required) { // but it should be throw new PropertyException .NoSuchVariableException(_object.getName()); } else { // but it's not required to be there, so get out now // can't check the type of a null object return null; } } // check it and throw if requried class isn't compatible // with class of specified object if (!_class.isAssignableFrom(o.getClass())) throw new PropertyException.InvalidTypeException(_object.getName(), _class); return null; }
|
public Object evaluate (Context context) throws PropertyException { Object o = _object; // evaluate the _object reference down to its base object while (o instanceof Macro) o = ((Macro) o).evaluate(context); if (o == null || o == UndefinedMacro.getInstance()) { // the Variable to check isn't in the Context. if (_required) { // but it should be throw new PropertyException .NoSuchVariableException(_object.getName()); } else { // but it's not required to be there, so get out now // can't check the type of a null object return null; } } // check it and throw if requried class isn't compatible // with class of specified object if (!_class.isAssignableFrom(o.getClass())) throw new PropertyException.InvalidTypeException(_object.getName(), _class); return null; }
| 3,237,307
|
public static ResultSetDataTable create( Connection conn, String sql, int maxRows) throws SQLException { return create(conn, sql, maxRows, 0); }
|
public static ResultSetDataTable create( Connection conn, String sql) throws SQLException { return create(conn, sql, maxRows, 0); }
| 3,237,310
|
public static ResultSetDataTable create( Connection conn, String sql, int maxRows) throws SQLException { return create(conn, sql, maxRows, 0); }
|
public static ResultSetDataTable create( Connection conn, String sql, int maxRows) throws SQLException { return create(conn, sql, DEFAULT_MAX_ROWS, 0); }
| 3,237,311
|
protected void parseBeanDefinitions(Element root, BeanDefinitionParserDelegate delegate) { String namespaceUri = root.getNamespaceURI(); if (!DomUtils.nodeNameEquals(root, "beans") && !delegate.isDefaultNamespace(namespaceUri)) { delegate.parseCustomElement(root, false); } else { super.parseBeanDefinitions(root, delegate); } }
|
protected void parseBeanDefinitions(Element root, BeanDefinitionParserDelegate delegate) { String namespaceUri = root.getNamespaceURI(); if (!DomUtils.nodeNameEquals(root, "beans") && !delegate.isDefaultNamespace(namespaceUri)) { try { try { Method m = BeanDefinitionParserDelegate.class.getMethod("parseCustomElement", new Class[] { Element.class }); m.invoke(delegate, new Object[] { root }); } catch (NoSuchMethodException e) { try { Method m = BeanDefinitionParserDelegate.class.getMethod("parseCustomElement", new Class[] { Element.class, boolean.class }); m.invoke(delegate, new Object[] { root, Boolean.FALSE }); } catch (NoSuchMethodException e2) { throw new IllegalStateException(e); } } } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } throw new RuntimeException(e); } } else { super.parseBeanDefinitions(root, delegate); } }
| 3,237,312
|
public void execute(PInputEvent e) { if(e.getCamera().getViewScale() < 1) { Thumbnail t = (Thumbnail)e.getPickedNode(); Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = t.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); e.getCamera().addChild(semanticNode); } }
|
public void execute(PInputEvent e) { if(e.getCamera().getViewScale() < 1) { Thumbnail t = (Thumbnail)e.getPickedNode(); Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = t.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); PCamera camera = e.getCamera(); for(int i=0; i<camera.getChildrenCount();i++) { Object child = camera.getChild(i); if(child instanceof SemanticZoomNode) { camera.removeChild((SemanticZoomNode)child); i = camera.getChildrenCount(); } } camera.addChild(0,semanticNode); } }
| 3,237,313
|
public List childNodes() { return Collections.EMPTY_LIST; }
|
public List childNodes() { return EMPTY_LIST; }
| 3,237,314
|
private void initActions(BrowserModel targetModel) { // theoretically shouldn't happen if(targetModel == null) { return; } defaultTDownActions = new MouseDownActions(); defaultTOverActions = new MouseOverActions(); selectThumbnailAction = PiccoloActionFactory.getSelectThumbnailAction(targetModel); popupMenuAction = PiccoloActionFactory.getPopupMenuAction(targetModel); defaultTDownActions.setMouseClickAction(PiccoloModifiers.NORMAL, selectThumbnailAction); defaultTDownActions.setMouseDoubleClickAction(PiccoloModifiers.NORMAL, PiccoloActions.OPEN_IMAGE_ACTION); defaultTDownActions.setMouseClickAction(PiccoloModifiers.POPUP, popupMenuAction); semanticLayer = new HoverManager(this); semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); semanticExitThumbnailAction = PiccoloActionFactory.getOverlayExitAction(this,semanticLayer); hoverThumbnailAction = PiccoloActionFactory.getImageEnterAction(this); exitThumbnailAction = PiccoloActionFactory.getImageExitAction(this); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); }
|
private void initActions(BrowserModel targetModel) { // theoretically shouldn't happen if(targetModel == null) { return; } defaultTDownActions = new MouseDownActions(); defaultTOverActions = new MouseOverActions(); selectThumbnailAction = PiccoloActionFactory.getSelectThumbnailAction(targetModel); popupMenuAction = PiccoloActionFactory.getPopupMenuAction(targetModel); defaultTDownActions.setMouseClickAction(PiccoloModifiers.NORMAL, selectThumbnailAction); defaultTDownActions.setMouseDoubleClickAction(PiccoloModifiers.NORMAL, PiccoloActions.OPEN_IMAGE_ACTION); defaultTDownActions.setMouseClickAction(PiccoloModifiers.POPUP, popupMenuAction); semanticLayer = new HoverManager(this); semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(browserModel, this,semanticLayer); semanticExitThumbnailAction = PiccoloActionFactory.getOverlayExitAction(this,semanticLayer); hoverThumbnailAction = PiccoloActionFactory.getImageEnterAction(this); exitThumbnailAction = PiccoloActionFactory.getImageExitAction(this); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); }
| 3,237,317
|
public void modeChanged(String className, BrowserMode mode) { // boooooo. if(className == null) { return; } else if(className.equals(BrowserModel.PAN_MODE_NAME)) { if(mode == BrowserMode.HAND_MODE) { // TODO: change drag listener here } else if(mode == BrowserMode.NO_HAND_MODE) { // TODO: change back. } } else if(className.equals(BrowserModel.MAJOR_UI_MODE_NAME)) { if(mode == BrowserMode.DEFAULT_MODE) { // TODO: fill this in } } else if(className.equals(BrowserModel.SELECT_MODE_NAME)) { if(mode == BrowserMode.SELECTING_MODE) { selectionInProgress = true; oldModeMap.put(BrowserModel.SEMANTIC_MODE_NAME, browserModel.getCurrentMode(BrowserModel.SEMANTIC_MODE_NAME)); browserModel.setCurrentMode(BrowserModel.SEMANTIC_MODE_NAME, BrowserMode.NOOP_MODE); repaint(); } else { selectionInProgress = false; browserModel.setCurrentMode(BrowserModel.SEMANTIC_MODE_NAME, (BrowserMode)oldModeMap.remove(BrowserModel.SEMANTIC_MODE_NAME)); repaint(); } } else if(className.equals(BrowserModel.ZOOM_MODE_NAME)) { if(mode == BrowserMode.ZOOM_TO_FIT_MODE) { setZoomToScale(true); } else if(mode == BrowserMode.ZOOM_ACTUAL_MODE) { setZoomToScale(false); setZoomLevel(1); } else if(mode == BrowserMode.ZOOM_50_MODE) { setZoomToScale(false); setZoomLevel(0.5); } else if(mode == BrowserMode.ZOOM_75_MODE) { setZoomToScale(false); setZoomLevel(0.75); } else if(mode == BrowserMode.ZOOM_200_MODE) { setZoomToScale(false); setZoomLevel(2); } } else if(className.equals(BrowserModel.SEMANTIC_MODE_NAME)) { if(mode == BrowserMode.NOOP_MODE) { defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, PiccoloAction.PNOOP_ACTION); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, PiccoloAction.PNOOP_ACTION); setThumbnailOverActions(defaultTOverActions); } if(mode == BrowserMode.IMAGE_NAME_MODE) { defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, hoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, exitThumbnailAction); setThumbnailOverActions(defaultTOverActions); } else if(mode == BrowserMode.SEMANTIC_ZOOMING_MODE) { semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(this,semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); setThumbnailOverActions(defaultTOverActions); } } }
|
public void modeChanged(String className, BrowserMode mode) { // boooooo. if(className == null) { return; } else if(className.equals(BrowserModel.PAN_MODE_NAME)) { if(mode == BrowserMode.HAND_MODE) { // TODO: change drag listener here } else if(mode == BrowserMode.NO_HAND_MODE) { // TODO: change back. } } else if(className.equals(BrowserModel.MAJOR_UI_MODE_NAME)) { if(mode == BrowserMode.DEFAULT_MODE) { // TODO: fill this in } } else if(className.equals(BrowserModel.SELECT_MODE_NAME)) { if(mode == BrowserMode.SELECTING_MODE) { selectionInProgress = true; oldModeMap.put(BrowserModel.SEMANTIC_MODE_NAME, browserModel.getCurrentMode(BrowserModel.SEMANTIC_MODE_NAME)); browserModel.setCurrentMode(BrowserModel.SEMANTIC_MODE_NAME, BrowserMode.NOOP_MODE); repaint(); } else { selectionInProgress = false; browserModel.setCurrentMode(BrowserModel.SEMANTIC_MODE_NAME, (BrowserMode)oldModeMap.remove(BrowserModel.SEMANTIC_MODE_NAME)); repaint(); } } else if(className.equals(BrowserModel.ZOOM_MODE_NAME)) { if(mode == BrowserMode.ZOOM_TO_FIT_MODE) { setZoomToScale(true); } else if(mode == BrowserMode.ZOOM_ACTUAL_MODE) { setZoomToScale(false); setZoomLevel(1); } else if(mode == BrowserMode.ZOOM_50_MODE) { setZoomToScale(false); setZoomLevel(0.5); } else if(mode == BrowserMode.ZOOM_75_MODE) { setZoomToScale(false); setZoomLevel(0.75); } else if(mode == BrowserMode.ZOOM_200_MODE) { setZoomToScale(false); setZoomLevel(2); } } else if(className.equals(BrowserModel.SEMANTIC_MODE_NAME)) { if(mode == BrowserMode.NOOP_MODE) { defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, PiccoloAction.PNOOP_ACTION); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, PiccoloAction.PNOOP_ACTION); setThumbnailOverActions(defaultTOverActions); } if(mode == BrowserMode.IMAGE_NAME_MODE) { defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, hoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, exitThumbnailAction); setThumbnailOverActions(defaultTOverActions); } else if(mode == BrowserMode.SEMANTIC_ZOOMING_MODE) { semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(browserModel, this,semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); defaultTOverActions.setMouseExitAction(PiccoloModifiers.NORMAL, semanticExitThumbnailAction); setThumbnailOverActions(defaultTOverActions); } } }
| 3,237,318
|
public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D)g; // cheapo hack to prevent apparent delay in annotation loading if(firstTimeShown) { Font font = new Font(null,Font.PLAIN,10); AttributedString str = new AttributedString("hi"); g2.setFont(font); FontRenderContext frc = g2.getFontRenderContext(); LineBreakMeasurer measurer = new LineBreakMeasurer(str.getIterator(),frc); firstTimeShown = false; } g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); super.paintComponent(g2); System.err.println("repainting..."); }
|
public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D)g; // cheapo hack to prevent apparent delay in annotation loading if(firstTimeShown) { Font font = new Font(null,Font.PLAIN,10); AttributedString str = new AttributedString("hi"); g2.setFont(font); FontRenderContext frc = g2.getFontRenderContext(); LineBreakMeasurer measurer = new LineBreakMeasurer(str.getIterator(),frc); firstTimeShown = false; } g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); super.paintComponent(g2); }
| 3,237,319
|
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
|
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xa7ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0xa7ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
| 3,237,321
|
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
|
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0xa7ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0xa7ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
| 3,237,322
|
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x87ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
|
private final int jjMoveNfa_0(int startState, int curPos){ int[] nextStates; int startsAt = 0; jjnewStateCnt = 48; int i = 1; jjstateSet[0] = startState; int j, kind = 0x7fffffff; for (;;) { if (++jjround == 0x7fffffff) ReInitRounds(); if (curChar < 64) { long l = 1L << curChar; MatchLoop: do { switch(jjstateSet[--i]) { case 10: case 9: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 7: if ((0xfc00ffffffffffffL & l) != 0L) { if (kind > 32) kind = 32; } else if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); if ((0x3ff000000000000L & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0x100000200L & l) != 0L) { if (kind > 27) kind = 27; } else if (curChar == 13) jjAddStates(9, 10); else if (curChar == 10) { if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); } if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 49: case 1: jjCheckNAddStates(11, 13); break; case 48: jjCheckNAddStates(11, 13); break; case 3: jjCheckNAddStates(14, 16); break; case 6: jjCheckNAddStates(17, 20); break; case 11: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; jjstateSet[jjnewStateCnt++] = 11; break; case 13: if (curChar == 32) jjstateSet[jjnewStateCnt++] = 14; break; case 14: if (curChar == 32 && kind > 26) kind = 26; break; case 15: if ((0x100000200L & l) != 0L && kind > 27) kind = 27; break; case 16: if ((0xfc00ffffffffffffL & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 20: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 21: if (curChar == 46) jjstateSet[jjnewStateCnt++] = 22; break; case 22: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 25: if (curChar == 58) jjstateSet[jjnewStateCnt++] = 26; break; case 26: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x87ffe06000000000L & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0xa7ffe06000000000L & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 29: if (curChar == 40) jjCheckNAdd(30); break; case 30: if ((0xfffffdffffffdbffL & l) != 0L) jjCheckNAddTwoStates(30, 31); break; case 31: if (curChar == 41 && kind > 20) kind = 20; break; case 32: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 40: if ((0x3ff000000000000L & l) != 0L) jjCheckNAddStates(33, 36); break; case 41: if (curChar != 10) break; if (kind > 25) kind = 25; jjCheckNAddTwoStates(42, 44); break; case 42: case 43: if (curChar == 10 && kind > 24) kind = 24; break; case 44: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 43; break; case 45: if (curChar == 13) jjAddStates(9, 10); break; case 46: if (curChar == 10) jjCheckNAddTwoStates(42, 44); break; case 47: if (curChar == 10 && kind > 25) kind = 25; break; default : break; } } while(i != startsAt); } else if (curChar < 128) { long l = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 10: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 15) kind = 15; jjCheckNAdd(9); } else if (curChar == 64) { if (kind > 16) kind = 16; jjCheckNAdd(11); } break; case 7: if ((0x7fffffe07fffffeL & l) != 0L) { if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); } else if ((0xf8000001f8000001L & l) != 0L) { if (kind > 32) kind = 32; } if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); else if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; else if (curChar == 91) jjstateSet[jjnewStateCnt++] = 0; if (curChar == 94) jjCheckNAdd(9); break; case 49: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 48: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); else if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 0: if (curChar == 91) jjCheckNAddTwoStates(1, 2); break; case 1: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(11, 13); break; case 2: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 3; break; case 3: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(14, 16); break; case 4: if (curChar == 93 && kind > 9) kind = 9; break; case 5: if (curChar == 93) jjstateSet[jjnewStateCnt++] = 4; break; case 6: if ((0xffffffffdfffffffL & l) != 0L) jjCheckNAddStates(17, 20); break; case 8: if (curChar == 94) jjCheckNAdd(9); break; case 9: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 15) kind = 15; jjCheckNAdd(9); break; case 11: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; jjCheckNAdd(11); break; case 12: if (curChar == 94) jjstateSet[jjnewStateCnt++] = 10; break; case 16: if ((0xf8000001f8000001L & l) != 0L && kind > 32) kind = 32; break; case 17: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAddStates(4, 8); break; case 18: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(18, 19); break; case 19: if (curChar == 64) jjCheckNAdd(20); break; case 20: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(20, 21); break; case 22: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAdd(23); break; case 23: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 19) kind = 19; jjCheckNAddStates(21, 23); break; case 24: if ((0x7fffffe07fffffeL & l) != 0L) jjCheckNAddTwoStates(24, 25); break; case 26: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAddStates(24, 26); break; case 27: if ((0x47fffffe87ffffffL & l) == 0L) break; if (kind > 20) kind = 20; jjCheckNAdd(27); break; case 28: if ((0x47fffffe87ffffffL & l) != 0L) jjCheckNAddTwoStates(28, 29); break; case 30: jjAddStates(37, 38); break; case 32: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 23) kind = 23; jjCheckNAdd(32); break; case 33: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(0, 3); break; case 34: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(34, 35); break; case 35: if ((0x7fffffe00000000L & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddTwoStates(35, 36); break; case 36: if ((0x7fffffeL & l) == 0L) break; if (kind > 21) kind = 21; jjCheckNAddStates(27, 29); break; case 37: if ((0x7fffffeL & l) != 0L) jjCheckNAddTwoStates(37, 38); break; case 38: if ((0x7fffffe00000000L & l) != 0L) jjCheckNAddStates(30, 32); break; case 39: if (curChar == 96 && kind > 22) kind = 22; break; case 40: if ((0x7fffffeL & l) != 0L) jjCheckNAddStates(33, 36); break; default : break; } } while(i != startsAt); } else { int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); MatchLoop: do { switch(jjstateSet[--i]) { case 7: if ((jjbitVec0[i2] & l2) != 0L && kind > 32) kind = 32; break; case 49: case 1: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 48: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(11, 13); break; case 3: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(14, 16); break; case 6: if ((jjbitVec0[i2] & l2) != 0L) jjCheckNAddStates(17, 20); break; case 30: if ((jjbitVec0[i2] & l2) != 0L) jjAddStates(37, 38); break; default : break; } } while(i != startsAt); } if (kind != 0x7fffffff) { jjmatchedKind = kind; jjmatchedPos = curPos; kind = 0x7fffffff; } ++curPos; if ((i = jjnewStateCnt) == (startsAt = 48 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } }}
| 3,237,323
|
public void testGetUserImages(Map options) { T t = new T(IllegalArgumentException.class){ @Override public void doTest(Object[] arg) { manager.getUserImages((Map)arg[0]); } }; t.blowup(true,new PojoOptions().allExps()); t.blowup(false,new PojoOptions().exp(1)); }
|
public void testGetUserImages(Map options) { T t = new T(IllegalArgumentException.class){ @Override public void doTest(Object[] arg) { manager.getUserImages((Map)arg[0]); } }; t.blowup(true,new PojoOptions().allExps()); t.blowup(false,new PojoOptions().exp(1)); }
| 3,237,324
|
public IObject map(ModelBased source){ if (source == null) { return null; } else if (target2model.containsKey(source)){ return (IObject) target2model.get(source); } else { IObject model = source.asIObject(this); target2model.put(source,model); return model; } }
|
public IObject map(ModelBased source){ if (source == null) { return null; } else if (target2model.containsKey(source)){ return (IObject) target2model.get(source); } else { IObject model = source.asIObject(this); target2model.put(source,model); return model; } }
| 3,237,325
|
public static IRubyObject grep_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject matcher = ((RubyArray) arg1).entry(0); RubyArray resultArray = (RubyArray) ((RubyArray) arg1).entry(1); if (matcher.callMethod("===", blockArg).isTrue()) { resultArray.append(self.getRuntime().yield(blockArg).toRubyObject()); } return self.getRuntime().getNil(); }
|
public static IRubyObject grep_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject matcher = ((RubyArray) arg1).entry(0); RubyArray resultArray = (RubyArray) ((RubyArray) arg1).entry(1); if (matcher.callMethod("===", blockArg).isTrue()) { resultArray.append(self.getRuntime().yield(blockArg)); } return self.getRuntime().getNil(); }
| 3,237,326
|
public static IRubyObject max_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject maxItem = ((RubyArray) arg1).pop(); if (maxItem.isNil()) { ((RubyArray) arg1).append(blockArg); } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem)).toRubyObject()) > 0) { ((RubyArray) arg1).append(blockArg); } else { ((RubyArray) arg1).append(maxItem); } return self.getRuntime().getNil(); }
|
public static IRubyObject max_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject maxItem = ((RubyArray) arg1).pop(); if (maxItem.isNil()) { ((RubyArray) arg1).append(blockArg); } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem))) > 0) { ((RubyArray) arg1).append(blockArg); } else { ((RubyArray) arg1).append(maxItem); } return self.getRuntime().getNil(); }
| 3,237,327
|
public static IRubyObject min_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject maxItem = ((RubyArray) arg1).pop(); if (maxItem.isNil()) { ((RubyArray) arg1).append(blockArg); } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem)).toRubyObject()) < 0) { ((RubyArray) arg1).append(blockArg); } else { ((RubyArray) arg1).append(maxItem); } return self.getRuntime().getNil(); }
|
public static IRubyObject min_iter_i(IRubyObject blockArg, IRubyObject arg1, IRubyObject self) { IRubyObject maxItem = ((RubyArray) arg1).pop(); if (maxItem.isNil()) { ((RubyArray) arg1).append(blockArg); } else if (RubyFixnum.fix2int(self.getRuntime().yield(RubyArray.newArray(self.getRuntime(), blockArg, maxItem))) < 0) { ((RubyArray) arg1).append(blockArg); } else { ((RubyArray) arg1).append(maxItem); } return self.getRuntime().getNil(); }
| 3,237,328
|
public void exchange(Request out, Reply in) throws ImageServiceException, IOException { //Sanity checks. if (out == null) throw new NullPointerException("No request."); if (in == null) throw new NullPointerException("No reply."); //Build HTTP request, send it, and wait for response. //Then read the response into the Reply object. HttpClient comLink = getCommunicationLink(); HttpMethodBase method = null; try { method = out.marshal(); method.setPath(getRequestPath()); comLink.executeMethod(method); in.unmarshal(method, this); } finally { //Required by Http Client library. if (method != null) method.releaseConnection(); } }
|
public void exchange(Request out, Reply in) throws ImageServiceException, IOException { //Sanity checks. if (out == null) throw new NullPointerException("No request."); if (in == null) throw new NullPointerException("No reply."); //Build HTTP request, send it, and wait for response. //Then read the response into the Reply object. HttpClient comLink = getCommunicationLink(); HttpMethod method = null; try { method = out.marshal(); method.setPath(getRequestPath()); comLink.executeMethod(method); in.unmarshal(method, this); } finally { //Required by Http Client library. if (method != null) method.releaseConnection(); } }
| 3,237,329
|
private JToolBar buildMovieBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(play); tb.add(pause); tb.add(stop); tb.add(rewind); tb.add(forward); tb.addSeparator(); JLabel label = new JLabel(" Rate "); tb.add(label); tb.add(fps); return tb; }
|
private JToolBar buildMovieBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(play); tb.add(pause); tb.add(stop); tb.add(rewind); tb.add(forward); tb.addSeparator(); JLabel label = new JLabel(" Rate "); tb.add(label); tb.add(fps); return tb; }
| 3,237,331
|
private JToolBar buildRenderingBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(render); tb.addSeparator(); tb.add(inspector); tb.addSeparator(); tb.add(saveAs); return tb; }
|
private JToolBar buildRenderingBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); tb.add(render); tb.addSeparator(); tb.add(inspector); tb.addSeparator(); tb.add(saveAs); return tb; }
| 3,237,333
|
private JToolBar buildTextFieldBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); tb.addSeparator(); label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); return tb; }
|
private JToolBar buildTextFieldBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); tb.addSeparator(); label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); return tb; }
| 3,237,334
|
private JToolBar buildTextFieldBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); tb.addSeparator(); label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); return tb; }
|
private JToolBar buildTextFieldBar() { JToolBar tb = new JToolBar(); tb.setFloatable(false); JLabel label = new JLabel(" Z "); label.setForeground(STEELBLUE); tb.add(label); tb.add(zField); tb.add(zLabel); tb.addSeparator(); label = new JLabel(" T "); label.setForeground(STEELBLUE); tb.add(label); tb.add(tField); tb.add(tLabel); return tb; }
| 3,237,335
|
private void buildToolBar() { setFloatable(false); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(buildTextFieldBar()); addSeparator(SEPARATOR); add(buildRenderingBar()); addSeparator(SEPARATOR); add(buildMovieBar()); addSeparator(SEPARATOR_END); }
|
private void buildToolBar() { setFloatable(false); setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(buildTextFieldBar()); addSeparator(SEPARATOR); add(buildRenderingBar()); addSeparator(SEPARATOR); add(buildMovieBar()); addSeparator(SEPARATOR_END); }
| 3,237,336
|
private void initMovieComponents(Registry registry, int maxT) { //buttons IconManager im = IconManager.getInstance(registry); saveAs = new JButton(im.getIcon(IconManager.SAVEAS)); saveAs.setToolTipText( UIUtilities.formatToolTipText("Bring up the save image window.")); inspector = new JButton(im.getIcon(IconManager.INSPECTOR)); inspector.setToolTipText( UIUtilities.formatToolTipText("Bring up the inspector panel.")); render = new JButton(im.getIcon(IconManager.RENDER)); render.setToolTipText( UIUtilities.formatToolTipText("Bring up the rendering panel.")); play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText( UIUtilities.formatToolTipText("Play movie from current timepoint.")); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText(UIUtilities.formatToolTipText("Stop movie.")); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText( UIUtilities.formatToolTipText("Go to the first timepoint.")); forward = new JButton(im.getIcon(IconManager.FORWARD)); forward.setToolTipText( UIUtilities.formatToolTipText("Go to the last timepoint.")); pause = new JButton(im.getIcon(IconManager.PLAYER_PAUSE)); pause.setToolTipText( UIUtilities.formatToolTipText("Stop the movie.")); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+maxT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)."; editor.setToolTipText(UIUtilities.formatToolTipText(s)); fps.setEditor(editor); //only one timepoint. boolean b; if (maxT == 0) b = false; else b = true; play.setEnabled(b); rewind.setEnabled(b); stop.setEnabled(b); pause.setEnabled(b); forward.setEnabled(b); fps.setEnabled(b); editor.setEnabled(b); }
|
private void initMovieComponents(Registry registry, int maxT) { //buttons IconManager im = IconManager.getInstance(registry); saveAs = new JButton(im.getIcon(IconManager.SAVEAS)); saveAs.setToolTipText( UIUtilities.formatToolTipText("Bring up the save image window.")); inspector = new JButton(im.getIcon(IconManager.INSPECTOR)); inspector.setToolTipText( UIUtilities.formatToolTipText("Bring up the inspector panel.")); render = new JButton(im.getIcon(IconManager.RENDER)); render.setToolTipText( UIUtilities.formatToolTipText("Bring up the rendering panel.")); play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText( UIUtilities.formatToolTipText("Play movie from current timepoint.")); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText(UIUtilities.formatToolTipText("Stop movie.")); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText( UIUtilities.formatToolTipText("Go to the first timepoint.")); forward = new JButton(im.getIcon(IconManager.FORWARD)); forward.setToolTipText( UIUtilities.formatToolTipText("Go to the last timepoint.")); pause = new JButton(im.getIcon(IconManager.PLAYER_PAUSE)); pause.setToolTipText( UIUtilities.formatToolTipText("Stop the movie.")); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+maxT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)."; editor.setToolTipText(UIUtilities.formatToolTipText(s)); fps.setEditor(editor); //only one timepoint. boolean b; if (maxT == 0) b = false; else b = true; play.setEnabled(b); rewind.setEnabled(b); stop.setEnabled(b); pause.setEnabled(b); forward.setEnabled(b); fps.setEnabled(b); editor.setEnabled(b); }
| 3,237,337
|
private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); }
|
private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); }
| 3,237,338
|
private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); }
|
private void initTextFields(int t, int z, int maxT, int maxZ) { zLabel = new JLabel("/"+maxZ); tLabel = new JLabel("/"+maxT); tField = new JTextField(); tField = new JTextField(""+t, (""+maxT).length()); if (maxT-1 == 0) tField.setEditable(false); tField.setForeground(STEELBLUE); tField.setToolTipText( UIUtilities.formatToolTipText("Enter a timepoint.")); zField = new JTextField(""+z, (""+maxZ).length()); zField.setForeground(STEELBLUE); zField.setToolTipText( UIUtilities.formatToolTipText("Enter a Z point")); if (maxZ-1 == 0) zField.setEditable(false); }
| 3,237,339
|
public DatasetSummary createDataset(List projectSummaries, List imageSummaries, DatasetData retVal, DatasetSummary dProto) throws DSOutOfServiceException, DSAccessException { //Make a new proto if none was provided. if (dProto == null) dProto = new DatasetSummary(); //Create a new project Object Criteria c = UserMapper.getUserStateCriteria(); Dataset d = (Dataset) gateway.createNewData(Dataset.class); d.setName(retVal.getName()); d.setDescription(retVal.getDescription()); d.setOwner(gateway.getCurrentUser(c)); gateway.markForUpdate(d); gateway.updateMarkedData(); //prepare list for Manager. List pIds = new ArrayList(), iIds = new ArrayList(); if (projectSummaries != null) { Iterator i = projectSummaries.iterator(); while (i.hasNext()) pIds.add(new Integer(((ProjectSummary) i.next()).getID())); } if (imageSummaries != null) { Iterator j = imageSummaries.iterator(); while (j.hasNext()) iIds.add(new Integer(((ImageSummary) j.next()).getID())); } if (pIds.size() != 0) gateway.addDatasetToProjects(d.getID(), pIds); if (iIds.size() != 0) gateway.addImagesToDataset(d.getID(), iIds); //fill in the proto dProto.setID(d.getID()); dProto.setName(d.getName()); return dProto; }
|
public DatasetSummary createDataset(List projectSummaries, List imageSummaries, DatasetData retVal, DatasetSummary dProto) throws DSOutOfServiceException, DSAccessException { //Make a new proto if none was provided. if (dProto == null) dProto = new DatasetSummary(); //Create a new project Object Criteria c = UserMapper.getUserStateCriteria(); Dataset d = (Dataset) gateway.createNewData(Dataset.class); d.setName(retVal.getName()); d.setDescription(retVal.getDescription()); d.setOwner(gateway.getCurrentUser(c)); gateway.markForUpdate(d); gateway.updateMarkedData(); //prepare list for Manager. List pIds = new ArrayList(), iIds = new ArrayList(); if (projectSummaries != null) { Iterator i = projectSummaries.iterator(); while (i.hasNext()) pIds.add(new Integer(((ProjectSummary) i.next()).getID())); } if (imageSummaries != null) { Iterator j = imageSummaries.iterator(); while (j.hasNext()) iIds.add(new Integer(((ImageSummary) j.next()).getID())); } if (pIds.size() != 0) gateway.addDatasetToProjects(d.getID(), pIds); if (iIds.size() != 0) gateway.addImagesToDataset(d.getID(), iIds); //fill in the proto dProto.setID(d.getID()); dProto.setName(d.getName()); return dProto; }
| 3,237,341
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
| 3,237,342
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
| 3,237,343
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
| 3,237,344
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
|
public List retrieveImages(int datasetID) throws DSOutOfServiceException, DSAccessException { //Define the criteria by which the object graph is pulled out. Criteria c = DatasetMapper.buildImagesCriteria(datasetID); //Load the graph defined by criteria. Dataset dataset = (Dataset) gateway.retrieveData(Dataset.class, c); //List of image summary object. List images = null; if (dataset != null) //Put the server data into the corresponding client object. images = DatasetMapper.fillListImages(dataset); return images; }
| 3,237,345
|
public RubyObject eval(Ruby ruby, RubyObject self) { ruby.setSourceLine(getLine()); Node x = getConditionNode(); if (getConditionNode().eval(ruby, self).isTrue()) { return self.eval(getBodyNode()); } else { return self.eval(getElseNode()); } }
|
public RubyObject eval(Ruby ruby, RubyObject self) { ruby.setSourceLine(getLine()); Node x = getConditionNode(); if (x.eval(ruby, self).isTrue()) { return self.eval(getBodyNode()); } else { return self.eval(getElseNode()); } }
| 3,237,346
|
public IRubyObject getBackref() { if (getScope().hasLocalValues()) { return getScope().getValue(1); } return getNil(); }
|
public IRubyObject getBackref() { if (getScope().hasLocalVariables()) { return getScope().getValue(1); } return getNil(); }
| 3,237,347
|
public IRubyObject getLastline() { if (getScope().hasLocalValues()) { return getScope().getValue(0); } return RubyString.nilString(this); }
|
public IRubyObject getLastline() { if (getScope().hasLocalVariables()) { return getScope().getValue(0); } return RubyString.nilString(this); }
| 3,237,348
|
public void setBackref(IRubyObject match) { if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); } getScope().setValue(1, match); }
|
public void setBackref(IRubyObject match) { if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); } getScope().setValue(1, match); }
| 3,237,349
|
public void setLastline(IRubyObject value) { if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); } getScope().setValue(0, value); }
|
public void setLastline(IRubyObject value) { if (! getScope().hasLocalValues()) { getScope().setLocalNames(new ArrayList(Arrays.asList(new String[] { "_", "~" }))); } getScope().setValue(0, value); }
| 3,237,350
|
public RubyObject eval(Ruby ruby, RubyObject self) { if (ruby.getRubyClass() == null) { throw new TypeError(ruby, "no outer class/module"); } RubyModule superClass = null; if (getSuperNode() != null) { superClass = getSuperClass(ruby, self, getSuperNode()); } RubyClass rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (ruby.getRubyClass().isConstantDefined(getClassNameId())) { rubyClass = (RubyClass)ruby.getRubyClass().getConstant(getClassNameId()); } if (rubyClass != null) { if (!rubyClass.isClass()) { throw new TypeError(ruby, getClassNameId() + " is not a class"); } if (superClass != null) { RubyModule tmp = rubyClass.getSuperClass(); if (tmp.isSingleton()) { tmp = tmp.getSuperClass(); } while (tmp.isIncluded()) { tmp = tmp.getSuperClass(); } if (tmp != superClass) { superClass = tmp; //goto override_class; if (superClass == null) { superClass = ruby.getClasses().getObjectClass(); } rubyClass = ruby.defineClass(getClassNameId(), (RubyClass)superClass); ruby.getRubyClass().setConstant(getClassNameId(), rubyClass); rubyClass.setClassPath(ruby.getRubyClass(), getClassNameId()); // end goto } } if (ruby.getSafeLevel() >= 4) { throw new RubySecurityException(ruby, "extending class prohibited"); } // rb_clear_cache(); } else { //override_class: if (superClass == null) { superClass = ruby.getClasses().getObjectClass(); } rubyClass = ruby.defineClass(getClassNameId(), (RubyClass)superClass); ruby.getRubyClass().setConstant(getClassNameId(), rubyClass); rubyClass.setClassPath(ruby.getRubyClass(), getClassNameId()); } if (ruby.getWrapper() != null) { rubyClass.getSingletonClass().includeModule(ruby.getWrapper()); rubyClass.includeModule(ruby.getWrapper()); } return ((ScopeNode)getBodyNode()).setupModule(ruby, rubyClass); }
|
public RubyObject eval(Ruby ruby, RubyObject self) { if (ruby.getRubyClass() == null) { throw new TypeError(ruby, "no outer class/module"); } RubyModule superClass = null; if (getSuperNode() != null) { superClass = getSuperClass(ruby, self, getSuperNode()); } RubyClass rubyClass = null; // if ((ruby_class == getRuby().getObjectClass()) && rb_autoload_defined(node.nd_cname())) { // rb_autoload_load(node.nd_cname()); // } if (ruby.getRubyClass().isConstantDefined(getClassNameId())) { rubyClass = (RubyClass)ruby.getRubyClass().getConstant(getClassNameId()); } if (rubyClass != null) { if (!rubyClass.isClass()) { throw new TypeError(ruby, getClassNameId() + " is not a class"); } if (superClass != null) { RubyModule tmp = rubyClass.getSuperClass(); if (tmp.isSingleton()) { tmp = tmp.getSuperClass(); } while (tmp.isIncluded()) { tmp = tmp.getSuperClass(); } if (tmp != superClass) { superClass = tmp; //goto override_class; if (superClass == null) { superClass = ruby.getClasses().getObjectClass(); } rubyClass = ruby.defineClass(getClassNameId(), (RubyClass)superClass); ruby.getRubyClass().setConstant(getClassNameId(), rubyClass); rubyClass.setClassPath(ruby.getRubyClass(), getClassNameId()); // end goto } } if (ruby.getSafeLevel() >= 4) { throw new RubySecurityException(ruby, "extending class prohibited"); } // rb_clear_cache(); } else { //override_class: if (superClass == null) { superClass = ruby.getClasses().getObjectClass(); } rubyClass = ruby.defineClass(getClassNameId(), (RubyClass)superClass); ruby.getRubyClass().setConstant(getClassNameId(), rubyClass); rubyClass.setClassPath(ruby.getRubyClass(), getClassNameId()); } if (ruby.getWrapper() != null) { rubyClass.extendObject(ruby.getWrapper()); rubyClass.includeModule(ruby.getWrapper()); } return ((ScopeNode)getBodyNode()).setupModule(ruby, rubyClass); }
| 3,237,351
|
public IRubyObject getpeername() { return JavaObject.wrap(getRuntime(), socket.getRemoteSocketAddress()); }
|
public IRubyObject getpeername() { if (socketChannel instanceof SocketChannel) { return JavaObject.wrap(getRuntime(), ((SocketChannel) socketChannel).socket().getRemoteSocketAddress()); } else { throw getRuntime().newIOError("Not Supported"); } }
| 3,237,352
|
public IRubyObject getsockname() { return JavaObject.wrap(getRuntime(), socket.getLocalSocketAddress()); }
|
public IRubyObject getsockname() { if (socketChannel instanceof SocketChannel) { return JavaObject.wrap(getRuntime(), ((SocketChannel) socketChannel).socket().getLocalSocketAddress()); } else if (socketChannel instanceof ServerSocketChannel) { return JavaObject.wrap(getRuntime(), ((ServerSocketChannel) socketChannel).socket().getLocalSocketAddress()); } else { throw getRuntime().newIOError("Not Supported"); } }
| 3,237,353
|
public IRubyObject initialize(IRubyObject arg) { socket = extractSocket(arg); try { handler = new IOHandlerSocket(getRuntime(), socket.getInputStream(), socket.getOutputStream()); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } registerIOHandler(handler); modes = handler.getModes(); return this; }
|
public IRubyObject initialize(IRubyObject arg) { socketChannel = extractSocketChannel(arg); try { handler = new IOHandlerSocket(getRuntime(), socket.getInputStream(), socket.getOutputStream()); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } registerIOHandler(handler); modes = handler.getModes(); return this; }
| 3,237,354
|
public IRubyObject initialize(IRubyObject arg) { socket = extractSocket(arg); try { handler = new IOHandlerSocket(getRuntime(), socket.getInputStream(), socket.getOutputStream()); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } registerIOHandler(handler); modes = handler.getModes(); return this; }
|
public IRubyObject initialize(IRubyObject arg) { socket = extractSocket(arg); try { handler = new IOHandlerNio(getRuntime(), socketChannel); } catch (IOException e) { throw getRuntime().newIOError(e.getMessage()); } registerIOHandler(handler); modes = handler.getModes(); return this; }
| 3,237,355
|
public IRubyObject recv(IRubyObject[] args) { try { return getRuntime().newString(((IOHandlerSocket) handler).recv(RubyNumeric.fix2int(args[0]))); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (EOFException e) { // recv returns nil on EOF return getRuntime().getNil(); } catch (IOException e) { // All errors to sysread should be SystemCallErrors, but on a closed stream // Ruby returns an IOError. Java throws same exception for all errors so // we resort to this hack... if ("Socket not open".equals(e.getMessage())) { throw getRuntime().newIOError(e.getMessage()); } throw getRuntime().newSystemCallError(e.getMessage()); } }
|
public IRubyObject recv(IRubyObject[] args) { try { return getRuntime().newString(((IOHandlerNio) handler).recv(RubyNumeric.fix2int(args[0]))); } catch (IOHandler.BadDescriptorException e) { throw getRuntime().newErrnoEBADFError(); } catch (EOFException e) { // recv returns nil on EOF return getRuntime().getNil(); } catch (IOException e) { // All errors to sysread should be SystemCallErrors, but on a closed stream // Ruby returns an IOError. Java throws same exception for all errors so // we resort to this hack... if ("Socket not open".equals(e.getMessage())) { throw getRuntime().newIOError(e.getMessage()); } throw getRuntime().newSystemCallError(e.getMessage()); } }
| 3,237,356
|
public IRubyObject shutdown(IRubyObject[] args) { if (getRuntime().getSafeLevel() >= 4 && tainted().isFalse()) { throw getRuntime().newSecurityError("Insecure: can't shutdown socket"); } int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { throw getRuntime().newArgumentError("`how' should be either 0, 1, 2"); } if (how != SHUTDOWN_BOTH) { throw getRuntime().newNotImplementedError("Shutdown currently only works with how=2"); } return close(); }
|
public IRubyObject shutdown(IRubyObject[] args) { if (getRuntime().getSafeLevel() >= 4 && tainted().isFalse()) { throw getRuntime().newSecurityError("Insecure: can't shutdown socket"); } int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { throw getRuntime().newArgumentError("`how' should be either 0, 1, 2"); } if (how != SHUTDOWN_BOTH) { throw getRuntime().newNotImplementedError("Shutdown currently only works with how=2"); } return close(); }
| 3,237,357
|
public IRubyObject shutdown(IRubyObject[] args) { if (getRuntime().getSafeLevel() >= 4 && tainted().isFalse()) { throw getRuntime().newSecurityError("Insecure: can't shutdown socket"); } int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { throw getRuntime().newArgumentError("`how' should be either 0, 1, 2"); } if (how != SHUTDOWN_BOTH) { throw getRuntime().newNotImplementedError("Shutdown currently only works with how=2"); } return close(); }
|
public IRubyObject shutdown(IRubyObject[] args) { if (getRuntime().getSafeLevel() >= 4 && tainted().isFalse()) { throw getRuntime().newSecurityError("Insecure: can't shutdown socket"); } int how = args.length > 0 ? RubyNumeric.fix2int(args[0]) : SHUTDOWN_BOTH; if (how != SHUTDOWN_RECEIVER && how != SHUTDOWN_SENDER && how != SHUTDOWN_BOTH) { throw getRuntime().newArgumentError("`how' should be either 0, 1, 2"); } if (how != 2) { throw getRuntime().newNotImplementedError("Shutdown currently only works with how=2"); } return close(); }
| 3,237,358
|
private boolean login() { final SessionManager sessionManager = SparkManager.getSessionManager(); boolean hasErrors = false; String errorMessage = null; // Handle specifyed Workgroup String serverName = getServerName(); if (!hasErrors) { localPref = SettingsManager.getLocalPreferences(); SmackConfiguration.setPacketReplyTimeout(localPref.getTimeOut() * 1000); // Get connection try { int port = localPref.getXmppPort(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString).intValue(); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } connection.connect(); String resource = localPref.getResource(); if (!ModelUtil.hasLength(resource)) { resource = "spark"; } connection.login(getUsername(), getPassword(), resource, false); // Subscriptions are always manual Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); sessionManager.setServerAddress(connection.getServiceName()); sessionManager.initializeSession(connection, getUsername(), getPassword()); final String jid = getUsername() + '@' + sessionManager.getServerAddress() + "/" + resource; sessionManager.setJID(jid); } catch (Exception xee) { if (!loginDialog.isVisible()) { loginDialog.setVisible(true); } if (xee instanceof XMPPException) { XMPPException xe = (XMPPException)xee; final XMPPError error = xe.getXMPPError(); int errorCode = 0; if (error != null) { errorCode = error.getCode(); } if (errorCode == 401) { errorMessage = SparkRes.getString(SparkRes.INVALID_USERNAME_PASSWORD); } else if (errorCode == 502 || errorCode == 504) { errorMessage = SparkRes.getString(SparkRes.SERVER_UNAVAILABLE); } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } // Log Error Log.warning("Exception in Login:", xee); hasErrors = true; } } if (hasErrors) { progressBar.setVisible(false); //progressBar.setIndeterminate(false); // Show error dialog if (loginDialog.isVisible()) { JOptionPane.showMessageDialog(loginDialog, errorMessage, SparkRes.getString(SparkRes.ERROR_DIALOG_TITLE), JOptionPane.ERROR_MESSAGE); } setEnabled(true); return false; } // Since the connection and workgroup are valid. Add a ConnectionListener connection.addConnectionListener(SparkManager.getSessionManager()); // Persist information localPref.setUsername(getUsername()); String encodedPassword = null; try { encodedPassword = Encryptor.encrypt(getPassword()); } catch (Exception e) { Log.error("Error encrypting password.", e); } localPref.setPassword(encodedPassword); localPref.setSavePassword(savePasswordBox.isSelected()); localPref.setAutoLogin(autoLoginBox.isSelected()); localPref.setServer(serverField.getText()); SettingsManager.saveSettings(); return !hasErrors; }
|
private boolean login() { final SessionManager sessionManager = SparkManager.getSessionManager(); boolean hasErrors = false; String errorMessage = null; // Handle specifyed Workgroup String serverName = getServerName(); if (!hasErrors) { localPref = SettingsManager.getLocalPreferences(); SmackConfiguration.setPacketReplyTimeout(localPref.getTimeOut() * 1000); // Get connection try { int port = localPref.getXmppPort(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString).intValue(); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { connection = new SSLXMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { connection = new SSLXMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } connection.connect(); String resource = localPref.getResource(); if (!ModelUtil.hasLength(resource)) { resource = "spark"; } connection.login(getUsername(), getPassword(), resource, false); // Subscriptions are always manual Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); sessionManager.setServerAddress(connection.getServiceName()); sessionManager.initializeSession(connection, getUsername(), getPassword()); final String jid = getUsername() + '@' + sessionManager.getServerAddress() + "/" + resource; sessionManager.setJID(jid); } catch (Exception xee) { if (!loginDialog.isVisible()) { loginDialog.setVisible(true); } if (xee instanceof XMPPException) { XMPPException xe = (XMPPException)xee; final XMPPError error = xe.getXMPPError(); int errorCode = 0; if (error != null) { errorCode = error.getCode(); } if (errorCode == 401) { errorMessage = SparkRes.getString(SparkRes.INVALID_USERNAME_PASSWORD); } else if (errorCode == 502 || errorCode == 504) { errorMessage = SparkRes.getString(SparkRes.SERVER_UNAVAILABLE); } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } // Log Error Log.warning("Exception in Login:", xee); hasErrors = true; } } if (hasErrors) { progressBar.setVisible(false); //progressBar.setIndeterminate(false); // Show error dialog if (loginDialog.isVisible()) { JOptionPane.showMessageDialog(loginDialog, errorMessage, SparkRes.getString(SparkRes.ERROR_DIALOG_TITLE), JOptionPane.ERROR_MESSAGE); } setEnabled(true); return false; } // Since the connection and workgroup are valid. Add a ConnectionListener connection.addConnectionListener(SparkManager.getSessionManager()); // Persist information localPref.setUsername(getUsername()); String encodedPassword = null; try { encodedPassword = Encryptor.encrypt(getPassword()); } catch (Exception e) { Log.error("Error encrypting password.", e); } localPref.setPassword(encodedPassword); localPref.setSavePassword(savePasswordBox.isSelected()); localPref.setAutoLogin(autoLoginBox.isSelected()); localPref.setServer(serverField.getText()); SettingsManager.saveSettings(); return !hasErrors; }
| 3,237,359
|
private boolean login() { final SessionManager sessionManager = SparkManager.getSessionManager(); boolean hasErrors = false; String errorMessage = null; // Handle specifyed Workgroup String serverName = getServerName(); if (!hasErrors) { localPref = SettingsManager.getLocalPreferences(); SmackConfiguration.setPacketReplyTimeout(localPref.getTimeOut() * 1000); // Get connection try { int port = localPref.getXmppPort(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString).intValue(); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new XMPPConnection(localPref.getXmppHost(), port, serverName); } } connection.connect(); String resource = localPref.getResource(); if (!ModelUtil.hasLength(resource)) { resource = "spark"; } connection.login(getUsername(), getPassword(), resource, false); // Subscriptions are always manual Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); sessionManager.setServerAddress(connection.getServiceName()); sessionManager.initializeSession(connection, getUsername(), getPassword()); final String jid = getUsername() + '@' + sessionManager.getServerAddress() + "/" + resource; sessionManager.setJID(jid); } catch (Exception xee) { if (!loginDialog.isVisible()) { loginDialog.setVisible(true); } if (xee instanceof XMPPException) { XMPPException xe = (XMPPException)xee; final XMPPError error = xe.getXMPPError(); int errorCode = 0; if (error != null) { errorCode = error.getCode(); } if (errorCode == 401) { errorMessage = SparkRes.getString(SparkRes.INVALID_USERNAME_PASSWORD); } else if (errorCode == 502 || errorCode == 504) { errorMessage = SparkRes.getString(SparkRes.SERVER_UNAVAILABLE); } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } // Log Error Log.warning("Exception in Login:", xee); hasErrors = true; } } if (hasErrors) { progressBar.setVisible(false); //progressBar.setIndeterminate(false); // Show error dialog if (loginDialog.isVisible()) { JOptionPane.showMessageDialog(loginDialog, errorMessage, SparkRes.getString(SparkRes.ERROR_DIALOG_TITLE), JOptionPane.ERROR_MESSAGE); } setEnabled(true); return false; } // Since the connection and workgroup are valid. Add a ConnectionListener connection.addConnectionListener(SparkManager.getSessionManager()); // Persist information localPref.setUsername(getUsername()); String encodedPassword = null; try { encodedPassword = Encryptor.encrypt(getPassword()); } catch (Exception e) { Log.error("Error encrypting password.", e); } localPref.setPassword(encodedPassword); localPref.setSavePassword(savePasswordBox.isSelected()); localPref.setAutoLogin(autoLoginBox.isSelected()); localPref.setServer(serverField.getText()); SettingsManager.saveSettings(); return !hasErrors; }
|
private boolean login() { final SessionManager sessionManager = SparkManager.getSessionManager(); boolean hasErrors = false; String errorMessage = null; // Handle specifyed Workgroup String serverName = getServerName(); if (!hasErrors) { localPref = SettingsManager.getLocalPreferences(); SmackConfiguration.setPacketReplyTimeout(localPref.getTimeOut() * 1000); // Get connection try { int port = localPref.getXmppPort(); int checkForPort = serverName.indexOf(":"); if (checkForPort != -1) { String portString = serverName.substring(checkForPort + 1); if (ModelUtil.hasLength(portString)) { // Set new port. port = Integer.valueOf(portString).intValue(); } } boolean useSSL = localPref.isSSL(); boolean hostPortConfigured = localPref.isHostAndPortConfigured(); if (useSSL) { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new SSLXMPPConnection(localPref.getXmppHost(), port, serverName); } } else { if (!hostPortConfigured) { connection = new XMPPConnection(serverName); } else { connection = new SSLXMPPConnection(localPref.getXmppHost(), port, serverName); } } connection.connect(); String resource = localPref.getResource(); if (!ModelUtil.hasLength(resource)) { resource = "spark"; } connection.login(getUsername(), getPassword(), resource, false); // Subscriptions are always manual Roster roster = connection.getRoster(); roster.setSubscriptionMode(Roster.SubscriptionMode.manual); sessionManager.setServerAddress(connection.getServiceName()); sessionManager.initializeSession(connection, getUsername(), getPassword()); final String jid = getUsername() + '@' + sessionManager.getServerAddress() + "/" + resource; sessionManager.setJID(jid); } catch (Exception xee) { if (!loginDialog.isVisible()) { loginDialog.setVisible(true); } if (xee instanceof XMPPException) { XMPPException xe = (XMPPException)xee; final XMPPError error = xe.getXMPPError(); int errorCode = 0; if (error != null) { errorCode = error.getCode(); } if (errorCode == 401) { errorMessage = SparkRes.getString(SparkRes.INVALID_USERNAME_PASSWORD); } else if (errorCode == 502 || errorCode == 504) { errorMessage = SparkRes.getString(SparkRes.SERVER_UNAVAILABLE); } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } } else { errorMessage = SparkRes.getString(SparkRes.UNRECOVERABLE_ERROR); } // Log Error Log.warning("Exception in Login:", xee); hasErrors = true; } } if (hasErrors) { progressBar.setVisible(false); //progressBar.setIndeterminate(false); // Show error dialog if (loginDialog.isVisible()) { JOptionPane.showMessageDialog(loginDialog, errorMessage, SparkRes.getString(SparkRes.ERROR_DIALOG_TITLE), JOptionPane.ERROR_MESSAGE); } setEnabled(true); return false; } // Since the connection and workgroup are valid. Add a ConnectionListener connection.addConnectionListener(SparkManager.getSessionManager()); // Persist information localPref.setUsername(getUsername()); String encodedPassword = null; try { encodedPassword = Encryptor.encrypt(getPassword()); } catch (Exception e) { Log.error("Error encrypting password.", e); } localPref.setPassword(encodedPassword); localPref.setSavePassword(savePasswordBox.isSelected()); localPref.setAutoLogin(autoLoginBox.isSelected()); localPref.setServer(serverField.getText()); SettingsManager.saveSettings(); return !hasErrors; }
| 3,237,360
|
EvalThread(String name, String script) { this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); }
|
EvalThread(String name, String script) { this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); }
| 3,237,361
|
public void run() { ruby.getRuntime().loadScript(name, script, false); out.close(); }
|
public void run() { ruby.getRuntime().loadScript(name, script, false); out.close(); }
| 3,237,362
|
public static void main(String args[]) { //@START int NUM = Integer.parseInt(args[0]); boolean [] flags = new boolean[8192 + 1]; int count = 0; while (NUM-- > 0) { count = 0; for (int i=2; i <= 8192; i++) { flags[i] = true; } for (int i=2; i <= 8192; i++) { if (flags[i]) { // remove all multiples of prime: i for (int k=i+i; k <= 8192; k+=i) { flags[k] = false; } count++; } } } System.out.print("Count: " + count + "\n"); //@END }
|
public static void main(String args[]) { //@START int NUM = Integer.parseInt(args[0]); boolean [] flags = new boolean[8192 + 1]; int count = 0; while (NUM-- > 0) { count = 0; for (int i=2; i <= 8192; i++) { flags[i] = true; } for (int i=2; i <= 8192; i++) { if (flags[i]) { // remove all multiples of prime: i for (int k=i+i; k <= 8192; k+=i) { flags[k] = false; } count++; } } } System.out.print("Count: " + count + "\n"); //@END }
| 3,237,363
|
public void execute() { ZoomVisitor visitor = new ZoomVisitor(model); Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else selectedDisplay.accept(visitor); }
|
public void execute() { ZoomVisitor visitor = new ZoomVisitor(model); Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else selectedDisplay.accept(visitor); }
| 3,237,364
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.