rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (hook == null) { ClassEmitter oe = new ClassEmitter(outer); oe.declare_field(Constants.PRIVATE_FINAL_STATIC, STATIC_HOOK_FLAG, Type.BOOLEAN_TYPE, null, null); CodeEmitter e = oe.begin_method(Constants.ACC_STATIC, STATIC_HOOK, null, null); Label ok = e.make_label(); e.getstatic(classType, STATIC_HOOK_FLAG, Type.BOOLE...
if (staticHook == null) { staticHookSig = new Signature("CGLIB$STATICHOOK" + getNextHook(), "()V"); staticHook = begin_method(Constants.ACC_STATIC, staticHookSig, null, null); if (staticInit != null) { staticInit.invoke_static_this(staticHookSig); }
public CodeEmitter getStaticHook() { if (TypeUtils.isInterface(access)) { throw new IllegalStateException("static hook is invalid for this class"); } if (hook == null) { ClassEmitter oe = new ClassEmitter(outer); oe.declare_field(Constants.PRIVATE_FINAL_ST...
return hook;
return staticHook;
public CodeEmitter getStaticHook() { if (TypeUtils.isInterface(access)) { throw new IllegalStateException("static hook is invalid for this class"); } if (hook == null) { ClassEmitter oe = new ClassEmitter(outer); oe.declare_field(Constants.PRIVATE_FINAL_ST...
public void setTarget(ClassVisitor cv, ClassVisitor outer) {
public void setTarget(ClassVisitor cv) {
public void setTarget(ClassVisitor cv, ClassVisitor outer) { this.cv = cv; this.outer = outer; fieldInfo = new HashMap(); seenStatic = false; hook = null; ended = false; }
this.outer = outer;
public void setTarget(ClassVisitor cv, ClassVisitor outer) { this.cv = cv; this.outer = outer; fieldInfo = new HashMap(); seenStatic = false; hook = null; ended = false; }
seenStatic = false; hook = null; ended = false;
staticInit = staticHook = null; staticHookSig = null;
public void setTarget(ClassVisitor cv, ClassVisitor outer) { this.cv = cv; this.outer = outer; fieldInfo = new HashMap(); seenStatic = false; hook = null; ended = false; }
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic");
createLogger();
public CSMARTGrappaAdapter(BirdFrame birdFrame, CSMARTFrame frame) { super(); this.birdFrame = birdFrame; this.frame = frame; log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.generic"); }
if (clazz.isInterface()) {
Class superclass = clazz.getSuperclass(); if (superclass != null) { addDeclaredMethods(methodList, superclass); }
private static void addDeclaredMethods(List methodList, Class clazz) { methodList.addAll(java.util.Arrays.asList(clazz.getDeclaredMethods())); if (clazz.isInterface()) { Class[] interfaces = clazz.getInterfaces(); for (int i = 0; i < interfaces.length; i++) { addDe...
} else { Class superclass = clazz.getSuperclass(); if (superclass != null) { addDeclaredMethods(methodList, superclass); } }
private static void addDeclaredMethods(List methodList, Class clazz) { methodList.addAll(java.util.Arrays.asList(clazz.getDeclaredMethods())); if (clazz.isInterface()) { Class[] interfaces = clazz.getInterfaces(); for (int i = 0; i < interfaces.length; i++) { addDe...
getImpl().setOption(SocketOptions.SO_KEEPALIVE, new Boolean(on));
getImpl().setOption(SocketOptions.SO_KEEPALIVE, Boolean.valueOf(on));
public void setKeepAlive (boolean on) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); getImpl().setOption(SocketOptions.SO_KEEPALIVE, new Boolean(on)); }
getImpl().setOption(SocketOptions.SO_OOBINLINE, new Boolean(on));
getImpl().setOption(SocketOptions.SO_OOBINLINE, Boolean.valueOf(on));
public void setOOBInline (boolean on) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); getImpl().setOption(SocketOptions.SO_OOBINLINE, new Boolean(on)); }
getImpl().setOption (SocketOptions.SO_REUSEADDR, new Boolean (on));
getImpl().setOption (SocketOptions.SO_REUSEADDR, Boolean.valueOf(on));
public void setReuseAddress (boolean on) throws SocketException { getImpl().setOption (SocketOptions.SO_REUSEADDR, new Boolean (on)); }
getImpl().setOption(SocketOptions.SO_LINGER, new Boolean(false));
getImpl().setOption(SocketOptions.SO_LINGER, Boolean.valueOf(false));
public void setSoLinger(boolean on, int linger) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); if (on == true) { if (linger < 0) throw new IllegalArgumentException("SO_LINGER must be >= 0"); if (linger > 65535) linger = 6553...
getImpl().setOption(SocketOptions.TCP_NODELAY, new Boolean(on));
getImpl().setOption(SocketOptions.TCP_NODELAY, Boolean.valueOf(on));
public void setTcpNoDelay (boolean on) throws SocketException { if (isClosed()) throw new SocketException("socket is closed"); getImpl().setOption(SocketOptions.TCP_NODELAY, new Boolean(on)); }
if (_todir != null && !_todir.isDirectory()) {
if (_todir != null && _todir.exists() && !_todir.isDirectory()) {
public void execute() throws BuildException { Ivy ivy = getIvyInstance(); _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); if (_cache == null) { _cache = ivy.getDefaultCache(); } _conf...
il = new InstructionList(); MethodGen writeReplace = new MethodGen(ACC_PRIVATE, Type.OBJECT, new Type[] {}, null, "writeReplace", cg.getClassName(), il, cp); int wreplaceIndex ; if( wreplace == null ){ wreplaceIndex = addWriteReplace(cp); }else{ wreplaceIndex = cp.addMethodref( wreplace.getDeclaringClass().getName(),...
private static void addConstructor(ClassGen cg, java.lang.reflect.Method wreplace ) throws Throwable { //single arg constructor String parentClass = cg.getSuperclassName(); InstructionFactory factory = new InstructionFactory(cg); ConstantPoolGen cp ...
throw new InternalError(e.toString());
InternalError ie = new InternalError(); ie.initCause(e); throw ie;
public URL getURL() { try { return new URL(loader.baseURL, name, loader.classloader.getURLStreamHandler("file")); } catch(MalformedURLException e) { throw new InternalError(e.toString()); } }
super(classloader, url); dir = new File(url.getFile());
super(classloader, getCanonicalFileURL(url)); dir = new File(baseURL.getFile());
FileURLLoader(URLClassLoader classloader, URL url) { super(classloader, url); // Note that this must be a "file" protocol URL. dir = new File(url.getFile()); }
else return null;
return null;
Resource getResource(String name) { File file = new File(dir, name); if (file.exists() && !file.isDirectory()) return new FileResource(this, name, file); else return null; }
super(classloader, baseURL);
super(classloader, getCanonicalFileURL(baseURL));
public JarURLLoader(URLClassLoader classloader, URL baseURL) { super(classloader, baseURL); // cache url prefix for all resources in this jar url String external = baseURL.toExternalForm(); StringBuffer sb = new StringBuffer(external.length() + 6); sb.append("jar:"); sb.appe...
throw new InternalError(e.toString());
InternalError ie = new InternalError(); ie.initCause(e); throw ie;
URL getURL() { try { return new URL(((JarURLLoader)loader).baseJarURL, name, loader.classloader.getURLStreamHandler("jar")); } catch(MalformedURLException e) { throw new InternalError(e.toString()); } }
WOComponent component = context.component(); String observeFieldID = (String) valueForBinding("observeFieldID", component); String updateContainerID = (String) valueForBinding("updateContainerID", component); if (observeFieldID != null && updateContainerID != null) { AjaxUtils.appendScriptHeader(response); NSDictionary...
WOComponent component = context.component(); String observeFieldID = (String) valueForBinding("observeFieldID", component); String updateContainerID = (String) valueForBinding("updateContainerID", component); if (observeFieldID != null && updateContainerID != null) { AjaxUtils.appendScriptHeader(response); NSDictionary...
public void appendToResponse(WOResponse response, WOContext context) { WOComponent component = context.component(); String observeFieldID = (String) valueForBinding("observeFieldID", component); String updateContainerID = (String) valueForBinding("updateContainerID", component); if (observeFieldID != null...
NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("frequency", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOption("decay", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOption("onLoading", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new AjaxOptio...
NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("frequency", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOption("decay", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOption("onLoading", AjaxOption.SCRIPT)); ajaxOptionsArray.addObject(new AjaxOptio...
public NSDictionary createAjaxOptions(WOComponent component) { NSMutableArray ajaxOptionsArray = new NSMutableArray(); ajaxOptionsArray.addObject(new AjaxOption("frequency", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOption("decay", AjaxOption.NUMBER)); ajaxOptionsArray.addObject(new AjaxOpti...
return null; }
WOResponse response = AjaxUtils.createResponse(request, context); return response; }
public WOActionResults handleRequest(WORequest request, WOContext context) { return null; }
String hostName = ""; try { InetAddress myAddr = InetAddress.getLocalHost(); hostName = myAddr.getHostName(); } catch (Exception e) { } listenerId = CSMART_LISTENER + hostName + "-" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
public CSMART() { setTitle("CSMART"); csmart = this; createLog(); // Write initial CSMART info to the log file if (log.isShoutEnabled()) { log.shout(writeDebug()); } String hostName = ""; try { InetAddress myAddr = InetAddress.getLocalHost(); hostName = myAddr.getHostName(); ...
if(listenerId == null) { String hostName = ""; try { InetAddress myAddr = InetAddress.getLocalHost(); hostName = myAddr.getHostName(); } catch (Exception e) { } listenerId = CSMART_LISTENER + hostName + "-" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); }
public static String getNodeListenerId() { return listenerId; }
public CSMARTConsoleView(CSMART csmart, Experiment experiment) { this.model = new CSMARTConsoleModel(experiment, csmart); createLogger(); initGUI();
public CSMARTConsoleView() { this(null, null);
public CSMARTConsoleView(CSMART csmart, Experiment experiment) { this.model = new CSMARTConsoleModel(experiment, csmart); createLogger(); initGUI(); }
if(log.isDebugEnabled()) { log.debug("MultiVal for: " + name); }
public void callSetter(String setterName, String type, Object[] arguments) { String name = setterName.substring(3); if(log.isWarnEnabled() && arguments.length > 1) { log.warn("Arguments is greater than one!"); } PGPropData data = new PGPropData(); data.setName(name); if(arguments[0] instanceof ...
data.setType("Collection"); data.setSubType(type);
public void callSetter(String setterName, String type, Object[] arguments) { String name = setterName.substring(3); if(log.isWarnEnabled() && arguments.length > 1) { log.warn("Arguments is greater than one!"); } PGPropData data = new PGPropData(); data.setName(name); if(arguments[0] instanceof ...
data.setType(type);
public void callSetter(String setterName, String type, Object[] arguments) { String name = setterName.substring(3); if(log.isWarnEnabled() && arguments.length > 1) { log.warn("Arguments is greater than one!"); } PGPropData data = new PGPropData(); data.setName(name); if(arguments[0] instanceof ...
int i; if ((i = type.indexOf("<")) > -1) { int j = type.lastIndexOf(">"); return getType(type.substring(0, i).trim()); } else if ((i = type.indexOf("/")) > -1) { return getType(type.substring(0, i).trim()); } else { return type; }
return type;
public String getType(String type) { int i; if ((i = type.indexOf("<")) > -1) { // deal with collections int j = type.lastIndexOf(">"); return getType(type.substring(0, i).trim()); // deal with measures } else if ((i = type.indexOf("/")) > -1) { return getType(type.substring(0, i).trim()); ...
if(log.isDebugEnabled()) { log.debug("Collection Size: " + c.size()); }
public Object parseExpr(String type, String arg) { int i; type = type.trim(); arg = arg.trim(); if ((i = type.indexOf("<")) >= 0) { int j = type.lastIndexOf(">"); String ctype = type.substring(0, i).trim(); String etype = type.substring(i + 1, j).trim(); Collection c = null; if (c...
if (at != null) at.transform(coords, 0, coords, 0, 3); return SEG_CUBICTO;
result = SEG_CUBICTO; break; default: throw new NoSuchElementException("cubic iterator out of bounds");
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi...
throw new NoSuchElementException("cubic iterator out of bounds");
if (at != null) at.transform(coords, 0, coords, 0, 3); return result;
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi...
if (at != null) at.transform(coords, 0, coords, 0, 3); return SEG_CUBICTO; } throw new NoSuchElementException("cubic iterator out of bounds");
result = SEG_CUBICTO; break; default: throw new NoSuchElementException("cubic iterator out of bounds"); } if (at != null) at.transform(coords, 0, coords, 0, 3); return result;
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi...
if (at != null) at.transform(coords, 0, coords, 0, 3); return SEG_CUBICTO;
result = SEG_CUBICTO; break; default: throw new NoSuchElementException("cubic iterator out of bounds");
public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ...
throw new NoSuchElementException("cubic iterator out of bounds");
if (at != null) at.transform(coords, 0, coords, 0, 3); return result;
public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ...
EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, spec.entityName()); NSArray pkNames = (NSArray) entity.primaryKeyAttributes().valueForKey("name"); spec.setFetchesRawRows(true); spec.setRawRowKeyPaths(pkNames);
public static NSArray primaryKeyValuesInRange(EOEditingContext ec, EOFetchSpecification spec, int start, int end) { EOSQLExpression sql = ERXEOAccessUtilities.sqlExpressionForFetchSpecification(ec, spec, start, end); String sqlString = sql.statement(); StringBuffer buf = new StringBuffe...
String sqlString = sql.statement(); StringBuffer buf = new StringBuffer(); buf.append("select "); EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, spec.entityName()); NSArray attributesColumnNames = (NSArray) entity.primaryKeyAttributes().valueForKey("columnName"); for (Enumeration e = attributesColumnNames.objec...
public static NSArray primaryKeyValuesInRange(EOEditingContext ec, EOFetchSpecification spec, int start, int end) { EOSQLExpression sql = ERXEOAccessUtilities.sqlExpressionForFetchSpecification(ec, spec, start, end); String sqlString = sql.statement(); StringBuffer buf = new StringBuffe...
spec.setFetchesRawRows(true); spec.setRawRowKeyPaths(entity.primaryKeyAttributeNames());
public static NSArray primaryKeyValuesInRange(EOEditingContext ec, EOFetchSpecification spec, int start, int end) { EOSQLExpression sql = ERXEOAccessUtilities.sqlExpressionForFetchSpecification(ec, spec, start, end); String sqlString = sql.statement(); StringBuffer buf = new StringBuffe...
boolean filteringDirectObjects = ((filterValue != null) && (filterValue.indexOf(PropertyNames.DIRECT_OBJECT) >= 0));
private void makePlanGraph() { // get community<->agent mapping getCommunities(); if (communityToAgents == null || communityToAgents.size() == 0) return; // nothing to graph // get filter ULPlanFilter filter = new ULPlanFilter(communityToAgents); if (!filter.preFilter()) return; // user c...
if (!(filteringDirectObjects)) { nodeObjects = processDirectObjects(nodeObjects); }
private void makePlanGraph() { // get community<->agent mapping getCommunities(); if (communityToAgents == null || communityToAgents.size() == 0) return; // nothing to graph // get filter ULPlanFilter filter = new ULPlanFilter(communityToAgents); if (!filter.preFilter()) return; // user c...
super._rtrimFunctionName = null;
public PostgresqlExpression(EOEntity entity) { super(entity); }
String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) {
String type = eoattribute.valueType(); if ("NSTimestamp".equals(type)) {
public boolean shouldUseBindVariableForAttribute(EOAttribute eoattribute) { String type = columnTypeStringForAttribute(eoattribute); if ("timestamp".equals(type)) { return false; } else { return true; } }
typeName = typeName.replace('[', '_');
typeName = typeName.replace('[', '_').replace(';','$');
private static String getFieldName(String typeName) { int arrayCount = typeName.lastIndexOf('['); typeName = typeName.replace('.', '_'); // TODO? if (arrayCount >= 0) { typeName = "ARRAY" + arrayCount + "$" + typeName; } typeName = typeName.replace('[', '_'); ret...
RemoteListenable rl = node.getRemoteListenable(); List listenerNames = rl.list(); for (int j = 0; j < listenerNames.size(); j++) { String s = (String)listenerNames.get(j); if (s.equals(CSMART.getNodeListenerId())) return true;
if (node != null) { RemoteListenable rl = node.getRemoteListenable(); List listenerNames = rl.list(); for (int j = 0; j < listenerNames.size(); j++) { String s = (String)listenerNames.get(j); if (s.equals(CSMART.getNodeListenerId())) return true; } } else { if (log.isWarnEnabled()) log.warn("findListener got null Remot...
private boolean findListener(RemoteHost appServer, String name) { try { RemoteProcess node = appServer.getRemoteProcess(name); RemoteListenable rl = node.getRemoteListenable(); List listenerNames = rl.list(); for (int j = 0; j < listenerNames.size(); j++) { String s = (String)listenerNam...
try { node.getRemoteListenable().flushOutput(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("killAllProceses: Exception flushing output for " + name, e);
if (node != null) { try { node.getRemoteListenable().flushOutput(); } catch (Exception e) { if (log.isWarnEnabled()) { log.warn("killAllProceses: Exception flushing output for " + name, e); }
private synchronized void killAllProcessesWorker() { Set names = nodeToAppServer.keySet(); for (Iterator i = names.iterator(); i.hasNext(); ) { String name = (String)i.next(); AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name); RemoteHost appServer = desc.appServer; try { R...
if (log.isDebugEnabled()) { log.debug("About to kill process " + name); } node.destroy();
private synchronized void killAllProcessesWorker() { Set names = nodeToAppServer.keySet(); for (Iterator i = names.iterator(); i.hasNext(); ) { String name = (String)i.next(); AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name); RemoteHost appServer = desc.appServer; try { R...
RemoteListenable rl = node.getRemoteListenable(); List listenerNames = rl.list(); for (int j = 0; j < listenerNames.size(); j++) { String s = (String)listenerNames.get(j); if (s.equals(CSMART.getNodeListenerId())) { if (log.isDebugEnabled()) { log.debug("Killing node listener: " + s + " for node: " + name); } try { rl...
if (node != null) { RemoteListenable rl = node.getRemoteListenable(); List listenerNames = rl.list(); for (int j = 0; j < listenerNames.size(); j++) { String s = (String)listenerNames.get(j); if (s.equals(CSMART.getNodeListenerId())) { if (log.isDebugEnabled()) { log.debug("Killing node listener: " + s + " for node: " ...
private synchronized void killListenerWorker() { Set names = nodeToAppServer.keySet(); for (Iterator i = names.iterator(); i.hasNext(); ) { String name = (String)i.next(); AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name); RemoteHost appServer = desc.appServer; try { Remot...
} try { rl.removeListener(s); } catch (Exception e) { if (log.isErrorEnabled()) { log.error("killListener: Exception killing listener for " + name + ": ", e);
try { rl.flushOutput(); } catch (Exception e) { if (log.isErrorEnabled()) { log.error("killListener: Exception flushing output for " + name + ": ", e); }
private synchronized void killListenerWorker() { Set names = nodeToAppServer.keySet(); for (Iterator i = names.iterator(); i.hasNext(); ) { String name = (String)i.next(); AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name); RemoteHost appServer = desc.appServer; try { Remot...
} } }
try { rl.removeListener(s); } catch (Exception e) { if (log.isErrorEnabled()) { log.error("killListener: Exception killing listener for " + name + ": ", e); } } } } } else { if (log.isWarnEnabled()) log.warn("killListener got null RemoteProcess for " + name); }
private synchronized void killListenerWorker() { Set names = nodeToAppServer.keySet(); for (Iterator i = names.iterator(); i.hasNext(); ) { String name = (String)i.next(); AppServerDesc desc = (AppServerDesc)nodeToAppServer.get(name); RemoteHost appServer = desc.appServer; try { Remot...
int item_index = vec.indexOf(arg);
int item_index = -1; for (int j = 0; j < vec.size(); ++j) { CollationElement e = (CollationElement) vec.elementAt (j); if (arg.equals (e.key)) { item_index = j; break; } }
public RuleBasedCollator (String rules) throws ParseException { this.rules = rules; this.frenchAccents = false; // We keep each rule in order in a vector. At the end we traverse // the vector and compute collation values from it. int insertion_index = 0; Vector vec = new Vector (); StringBuffer...
return ((c >= 0x0009 && c <= 0x000d) || (c >= 0x0020 && c <= 0x002f)
return ((c >= 0x0021 && c <= 0x002f)
private final boolean is_special (char c) { // Rules from JCL book. return ((c >= 0x0009 && c <= 0x000d) || (c >= 0x0020 && c <= 0x002f) || (c >= 0x003a && c <= 0x0040) || (c >= 0x005b && c <= 0x0060) || (c >= 0x007b && c <= 0x007e)); }
char c = rules.charAt(index); if (c == '\'' && index + 2 < len && rules.charAt(index + 2) == '\'' && is_special (rules.charAt(index + 1))) index += 2; else if (is_special (c) || Character.isWhitespace(c))
char c = rules.charAt (index); if (c == '\'' && index + 2 < len && rules.charAt (index + 2) == '\'') { result.append (rules.charAt (index + 1)); index += 2; } else if (is_special (c))
private final int text_argument (String rules, int index, StringBuffer result) { result.setLength(0); int len = rules.length(); while (index < len) { char c = rules.charAt(index); if (c == '\'' && index + 2 < len && rules.charAt(index + 2) == '\'' && is_special (rules.charAt(index + 1))) ...
result.append(c); ++index;
else if (!Character.isWhitespace (c)) result.append (c); ++index;
private final int text_argument (String rules, int index, StringBuffer result) { result.setLength(0); int len = rules.length(); while (index < len) { char c = rules.charAt(index); if (c == '\'' && index + 2 < len && rules.charAt(index + 2) == '\'' && is_special (rules.charAt(index + 1))) ...
result = performParentAction(submitActionName());
result = parent() != null ? parent().valueForKey(submitActionName()) : null;
public void switchSubmitTab() { Object result = null; if (submitActionName() != null && !submitActionName().equals("")) { result = performParentAction(submitActionName()); } if (result==null || ERXUtilities.booleanValue(result)) { switchTab(); } }
String pbuf = (cap.getOffscreenFloatingPointBuffers() ? "T |" : "F |"); pbuf += (cap.getOffscreenRenderToTexture() ? "T | " : "F | "); pbuf += (cap.getOffscreenRenderToTextureRectangle() ? t : f);
String pbuf = (cap.getPbufferFloatingPointBuffers() ? "T |" : "F |"); pbuf += (cap.getPbufferRenderToTexture() ? "T | " : "F | "); pbuf += (cap.getPbufferRenderToTextureRectangle() ? t : f);
private JTable tabulateTable(ArrayList/*<GLCapabilities>*/ capabilities, ArrayList/*<Integer>*/ indices) { capabilities.trimToSize(); data = new Object[capabilities.size()][colNames.length]; String t = "T", f = "F"; for (int pfd = 0; pfd < capabilities.size(); pfd++) { ...
task.getProperty(ABCTask.PROP_RATE).setValue(new Integer(factor * demand));
task.getProperty(ABCTask.PROP_RATE).setValue(new Long(factor * demand));
private String addCustomerAgent(String name, int index, int factor, int duration, double vital, int chaos, int distance, int direction, String[] roles, String initializer ) { Property p = null; ABCAgent agent = new ABCAgent(getName().toString(), name, index); addChild(agent); ABCTaskFile ...
task.getProperty(ABCTask.PROP_DURATION).setValue(new Integer(duration));
task.getProperty(ABCTask.PROP_DURATION).setValue(new Long(duration));
private String addCustomerAgent(String name, int index, int factor, int duration, double vital, int chaos, int distance, int direction, String[] roles, String initializer ) { Property p = null; ABCAgent agent = new ABCAgent(getName().toString(), name, index); addChild(agent); ABCTaskFile ...
if (_cancelDelegate==null && _cancelNextPage==null) throw new RuntimeException("Cancel callback is not present"); return (_cancelDelegate!=null ? _cancelDelegate.nextPage(this) : _cancelNextPage);
return cancelAction();
public WOComponent cancelClicked() { if (_cancelDelegate==null && _cancelNextPage==null) throw new RuntimeException("Cancel callback is not present"); return (_cancelDelegate!=null ? _cancelDelegate.nextPage(this) : _cancelNextPage); }
if (_okNextPage==null && _okDelegate==null) throw new RuntimeException("Ok callback is not present"); return (_okDelegate!=null ? _okDelegate.nextPage(this) : _okNextPage);
return confirmAction();
public WOComponent okClicked() { if (_okNextPage==null && _okDelegate==null) throw new RuntimeException("Ok callback is not present"); return (_okDelegate!=null ? _okDelegate.nextPage(this) : _okNextPage); }
public void setCancelNextPage(WOComponent page) { _cancelNextPage=page; }
public void setCancelNextPage(WOComponent page) { setCancelPage(page); }
public void setCancelNextPage(WOComponent page) { _cancelNextPage=page; }
public void setOkDelegate(NextPageDelegate okDelegate) { _okDelegate=okDelegate; }
public void setOkDelegate(NextPageDelegate okDelegate) { setConfirmDelegate(_okDelegate); }
public void setOkDelegate(NextPageDelegate okDelegate) { _okDelegate=okDelegate; }
public void setOkNextPage(WOComponent page) { _okNextPage=page; }
public void setOkNextPage(WOComponent page) { setNextPage(page); }
public void setOkNextPage(WOComponent page) { _okNextPage=page; }
int pixelStride = getNumComponents(); int[] bandOffsets = new int[pixelStride]; for (int i=0; i<pixelStride; i++) bandOffsets[i] = i; return new ComponentSampleModel(transferType, w, h, pixelStride, pixelStride*w, bandOffsets);
int pixelStride, scanlineStride; int[] bandOffsets; pixelStride = getNumComponents(); scanlineStride = pixelStride * w; bandOffsets = new int[pixelStride]; for (int i = 0; i < pixelStride; i++) bandOffsets[i] = i; switch (transferType) { case DataBuffer.TYPE_BYTE: case DataBuffer.TYPE_USHORT: return new PixelInter...
public SampleModel createCompatibleSampleModel(int w, int h) { int pixelStride = getNumComponents(); /* TODO: Maybe we don't need to create a new offset array each time, but rather use the same array every time. */ int[] bandOffsets = new int[pixelStride]; for (int i=0; i<pixelStride; i++) band...
protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType)
public ColorModel(int bits)
protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) { this.pixel_bits = pixel_bits; this.bits = bits; this.cspace = cspace; this.hasAlpha = hasAlpha; this.isAlphaPremultiplied = isAlphaP...
this.pixel_bits = pixel_bits; this.bits = bits; this.cspace = cspace; this.hasAlpha = hasAlpha; this.isAlphaPremultiplied = isAlphaPremultiplied; this.transparency = transparency; this.transferType = transferType;
this(bits * 4, nArray(bits, 4), null, true, false, TRANSLUCENT, Buffers.smallestAppropriateTransferType(bits * 4));
protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) { this.pixel_bits = pixel_bits; this.bits = bits; this.cspace = cspace; this.hasAlpha = hasAlpha; this.isAlphaPremultiplied = isAlphaP...
if (networkInterfaces == null) networkInterfaces = getRealNetworkInterfaces ();
Vector networkInterfaces = getRealNetworkInterfaces ();
public static NetworkInterface getByInetAddress (InetAddress addr) throws SocketException { if (networkInterfaces == null) networkInterfaces = getRealNetworkInterfaces (); for (Enumeration interfaces = networkInterfaces.elements (); interfaces.hasMoreElements (); ) { NetworkInte...
if (networkInterfaces == null) networkInterfaces = getRealNetworkInterfaces ();
Vector networkInterfaces = getRealNetworkInterfaces ();
public static NetworkInterface getByName (String name) throws SocketException { if (networkInterfaces == null) networkInterfaces = getRealNetworkInterfaces (); for (Enumeration e = networkInterfaces.elements (); e.hasMoreElements (); ) { NetworkInterface tmp = (NetworkInterface) e.n...
if (networkInterfaces == null) networkInterfaces = getRealNetworkInterfaces ();
Vector networkInterfaces = getRealNetworkInterfaces ();
public static Enumeration getNetworkInterfaces () throws SocketException { if (networkInterfaces == null) networkInterfaces = getRealNetworkInterfaces (); Enumeration tmp = networkInterfaces.elements (); if (tmp.hasMoreElements ()) return tmp; return null; }
result += address.toString () + separator;
result += address.toString () + ";" + separator;
public String toString () { // FIXME: check if this is correct String result; String separator = System.getProperty ("line.separator"); result = "name: " + getDisplayName () + " (" + getName () + ") addresses:" + separator; for (Enumeration e = inetAddresses.elements (); e.hasMoreElements...
public void addToBothSidesOfDifficulty(er.bugtracker.Difficulty object) {
public void addToBothSidesOfDifficulty(Difficulty object) {
public void addToBothSidesOfDifficulty(er.bugtracker.Difficulty object) { addObjectToBothSidesOfRelationshipWithKey(object, "difficulty"); }
public void addToBothSidesOfRequirementSubType(er.bugtracker.RequirementSubType object) {
public void addToBothSidesOfRequirementSubType(RequirementSubType object) {
public void addToBothSidesOfRequirementSubType(er.bugtracker.RequirementSubType object) { addObjectToBothSidesOfRelationshipWithKey(object, "requirementSubType"); }
public void addToBothSidesOfRequirementType(er.bugtracker.RequirementType object) {
public void addToBothSidesOfRequirementType(RequirementType object) {
public void addToBothSidesOfRequirementType(er.bugtracker.RequirementType object) { addObjectToBothSidesOfRelationshipWithKey(object, "requirementType"); }
public er.bugtracker.Difficulty difficulty() { return (er.bugtracker.Difficulty)storedValueForKey("difficulty");
public Difficulty difficulty() { return (Difficulty)storedValueForKey("difficulty");
public er.bugtracker.Difficulty difficulty() { return (er.bugtracker.Difficulty)storedValueForKey("difficulty"); }
public void removeFromBothSidesOfDifficulty(er.bugtracker.Difficulty object) {
public void removeFromBothSidesOfDifficulty(Difficulty object) {
public void removeFromBothSidesOfDifficulty(er.bugtracker.Difficulty object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "difficulty"); }
public void removeFromBothSidesOfRequirementSubType(er.bugtracker.RequirementSubType object) {
public void removeFromBothSidesOfRequirementSubType(RequirementSubType object) {
public void removeFromBothSidesOfRequirementSubType(er.bugtracker.RequirementSubType object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "requirementSubType"); }
public void removeFromBothSidesOfRequirementType(er.bugtracker.RequirementType object) {
public void removeFromBothSidesOfRequirementType(RequirementType object) {
public void removeFromBothSidesOfRequirementType(er.bugtracker.RequirementType object) { removeObjectFromBothSidesOfRelationshipWithKey(object, "requirementType"); }
public er.bugtracker.RequirementSubType requirementSubType() { return (er.bugtracker.RequirementSubType)storedValueForKey("requirementSubType");
public RequirementSubType requirementSubType() { return (RequirementSubType)storedValueForKey("requirementSubType");
public er.bugtracker.RequirementSubType requirementSubType() { return (er.bugtracker.RequirementSubType)storedValueForKey("requirementSubType"); }
public er.bugtracker.RequirementType requirementType() { return (er.bugtracker.RequirementType)storedValueForKey("requirementType");
public RequirementType requirementType() { return (RequirementType)storedValueForKey("requirementType");
public er.bugtracker.RequirementType requirementType() { return (er.bugtracker.RequirementType)storedValueForKey("requirementType"); }
public void setDifficulty(er.bugtracker.Difficulty aValue) {
public void setDifficulty(Difficulty aValue) {
public void setDifficulty(er.bugtracker.Difficulty aValue) { takeStoredValueForKey(aValue, "difficulty"); }
public void setRequirementSubType(er.bugtracker.RequirementSubType aValue) {
public void setRequirementSubType(RequirementSubType aValue) {
public void setRequirementSubType(er.bugtracker.RequirementSubType aValue) { takeStoredValueForKey(aValue, "requirementSubType"); }
public void setRequirementType(er.bugtracker.RequirementType aValue) {
public void setRequirementType(RequirementType aValue) {
public void setRequirementType(er.bugtracker.RequirementType aValue) { takeStoredValueForKey(aValue, "requirementType"); }
return new CharBufferImpl (this);
return new CharBufferImpl (backing_buffer, arrayOffset () + position (), remaining ());
public CharBuffer slice() { return new CharBufferImpl (this); }
if (start < 0 || end > length () || start > end)
if (start < 0 || start > length () || end < start || end > length ())
final public CharSequence subSequence (int start, int end) { if (start < 0 || end > length () || start > end) throw new IndexOutOfBoundsException (); // No support for direct buffers yet. // assert array () != null; return new CharBufferImpl (array (), position () + start, ...
if(totalValue != null && totalValue.key().indexOf("~") == 0) { return DRCriteria.doubleForValue(WOOgnl.factory().getValue(totalValue.key().substring(1), recordGroup()));
if(totalValue != null) { if(totalValue.key().indexOf("~") == 0) { return DRCriteria.doubleForValue(WOOgnl.factory().getValue(totalValue.key().substring(1), recordGroup())); } else { String totalKey = (String)totalValue.attribute().userInfo().objectForKey("total"); if(totalKey != null) { return DRCriteria.doubleForValue...
public double totalValueTotal() { if(totalValue != null && totalValue.key().indexOf("~") == 0) { return DRCriteria.doubleForValue(WOOgnl.factory().getValue(totalValue.key().substring(1), recordGroup())); } return totalValue.total(); }
public ConfigurationResolveReport(Ivy ivy, ModuleDescriptor md, String conf, Date date) {
public ConfigurationResolveReport(Ivy ivy, ModuleDescriptor md, String conf, Date date, File cache) {
public ConfigurationResolveReport(Ivy ivy, ModuleDescriptor md, String conf, Date date) { _ivy = ivy; _md = md; _conf = conf; _date = date; }
File previousReportFile = new File(cache, XmlReportOutputter.getReportFileName(md.getModuleRevisionId().getModuleId(), conf)); if (previousReportFile.exists()) { try { _previousDeps = Arrays.asList(new XmlReportParser().getDependencyRevisionIds(md.getModuleRevisionId().getModuleId(), conf, cache)); } catch (Exception e...
public ConfigurationResolveReport(Ivy ivy, ModuleDescriptor md, String conf, Date date) { _ivy = ivy; _md = md; _conf = conf; _date = date; }
maximumIntegerDigits = 309;
maximumIntegerDigits = MAXIMUM_INTEGER_DIGITS;
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExpon...
int fraction_begin = dest.length();
protected void formatInternal (double number, FormatBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && (fieldPos.getField() == INTEGER_FIELD || fieldPos.getFieldAttribute() == NumberFormat.Field.IN...
} if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD) { fieldPos.setBeginIndex(fraction_begin); fieldPos.setEndIndex(dest.length());
protected void formatInternal (double number, FormatBuffer dest, FieldPosition fieldPos) { // A very special case. if (Double.isNaN(number)) { dest.append(symbols.getNaN()); if (fieldPos != null && (fieldPos.getField() == INTEGER_FIELD || fieldPos.getFieldAttribute() == NumberFormat.Field.IN...
StringBuffer buf = new StringBuffer ();
StringBuffer int_buf = new StringBuffer ();
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
int last = index + maximumIntegerDigits;
int exp_index = -1; int last = index + MAXIMUM_INTEGER_DIGITS;
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
last_group = index;
last_group = index+1;
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
exp_part = false;
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
buf.append('.');
buf = frac_buf = new StringBuffer(); frac_buf.append('.');
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
buf.append('E');
buf = exp_buf = new StringBuffer();
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
buf.insert(0, '-'); String t = buf.toString();
int_buf.insert(0, '-'); if (exp_buf != null) { int exponent_value; try { exponent_value = Integer.parseInt(exp_buf.toString()); } catch (NumberFormatException x1) { pos.setErrorIndex(exp_index); return null; } if (frac_buf == null) { for (int i = 0; i < exponent_value; i++) int_buf.append('0'); use_long = true; ...
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
try { result = new Long (t); } catch (NumberFormatException x1)
if (use_long) { try { result = new Long (t); } catch (NumberFormatException x1) { } } else
public Number parse (String str, ParsePosition pos) { // Our strategy is simple: copy the text into a buffer, // translating or omitting locale-specific information. Then // let Double or Long convert the number for us. boolean is_neg = false; int index = pos.getIndex(); StringBuffer buf = new Str...
log.info("Expression took " + millisecondsNeeded + " ms : " + expression);
log.debug("Expression took " + millisecondsNeeded + " ms : " + expression);
public void adaptorChannelDidEvaluateExpression(EOAdaptorChannel channel, EOSQLExpression expression) { if(log == null) { log = ERXLogger.getERXLogger("er.extensions.ERXAdaptorChannelDelegate.sqlLogging"); } if(log.isDebugEnabled()) { long millisecondsNeeded = System.curr...
public NamespaceHelper(String _namespaceUri, String _prefix, String localName) throws ParserConfigurationException {
public NamespaceHelper(String _namespaceUri, String _prefix, Document _document) {
public NamespaceHelper(String _namespaceUri, String _prefix, String localName) throws ParserConfigurationException { this.namespaceUri = _namespaceUri; this.prefix = _prefix; setDocument(DocumentHelper.createDocument(getNamespaceURI(), getQualifiedName(localName), null)); ...